China has stepped up its shelling of Vietnamese border fortifications in what diplomatic sources here see as a bid to blunt Vietnam's latest offensive against Peking-backed guerrilla forces in Cambodia by threatening wider Chinese involvement in the Indochina war.

Western and Asian diplomats, however, think China is not likely to launch a major military assault across its border with Vietnam.

Border clashes between the two communist rivals have intensified since late last week when Chinese artillery batteries fired on Vietnamese positions in response to what Peking charged were repeated armed provocations by Vietnamese troops. Vietnam has heatedly denied the charges amid some of the heaviest border fighting in nearly four years.

According to one western diplomat, the Chinese bombardment "is a reaction to the whole pattern of Vietnamese aggression along the Thai-Cambodian border" where guerrilla groups fighting Vietnamese in Cambodia have bases.

The Chinese action "does not presage an imminent assault," the diplomat said, because "the Chinese don't have the military muscle in place" to successfully challenge seasoned, Soviet-equipped Vietnamese troops. "But they do have the capacity to keep up the level of tension" on the border to prevent Vietnam from committing more troops to its Cambodian campaign.

Quoting western intelligence sources, diplomats said the Chinese shelling had been "widespread" from positions in Yunnan and Guanxi provinces, on China's border with Vietnam. They said details on the types of artillery involved and the extent of damage were not available.

According to these estimates, there has been no major buildup of troops on either side of the border. Analysts, however, did not rule out the possibility of an expanded Chinese offensive.

"The key to the situation is held by Vietnam," said one Asian diplomat, pointing out that Peking has publicly guaranteed to defend Thailand's security. If Vietnamese forces mount a full-scale attack against Cambodian insurgent strongholds in Thai territory, the diplomat said, "the Chinese would be forced to do something drastic."

Echoing recent anti-Vietnamese talk here, Foreign Ministry spokesman Qi Huanyuan said today, "The Chinese government hereby issues a stern warning: the Vietnamese authorities must immediately stop their armed provocations against China's border areas, or China will reserve the right to fight back."

According to diplomats here, however, China does not appear eager for a full-scale military confrontation with Vietnam. Any "punitive" campaign, they said, would severely strain China's finances and involve huge costs in men and equipment. It might also risk a blow to China's prestige internationally.

In February 1979, China invaded Vietnam in what it referred to as a defensive campaign to "teach Vietnam a lesson" following Vietnam's occupation of Cambodia. China is thought to have lost more than 30,000 men, about three times the Vietnamese casualties, before it withdrew after a month of fighting.

"The Chinese are not anxious to teach Vietnam a second 'lesson,' " said the Asian diplomat, "unless their security is substantially threatened or the major resistance forces in Cambodia are threatened with annihilation."

"The Chinese simply want to remind the Vietnamese," said another diplomat, "that they will have to look over their shoulders when they go after Thailand."

China already has gained limited objectives by tying up half of Hanoi's top combat divisions, stationed north of Hanoi as a counterweight to the Chinese, sources said.

In a related develoment, Prince Norodom Sihanouk, president of the anti-Vietnamese Democratic Cambodia coalition and Cambodia's former head-of-state, said today that top Chinese officials had told him in recent talks here that the Cambodian insurgents should be prepared for "a long, long struggle."

In a meeting with foreign and Chinese reporters, Sihanouk said: "It appears China does not want to be considered by public opinion as provocative. The next step must be taken by the Vietnamese."

In a view thought to reflect Peking's policy, Sihanouk said, "I'm sure the Chinese will refrain from sending infantry into Vietnam." If the Vietnamese use regular infantry troops on the border, however, he indicated the Chinese would be compelled to "teach" Vietnam "a second lesson."