Vietnam's volatile borders with Cambodia and China have become the scene of escalating skirmishes in the past two weeks as Hanoi prepares what diplomats here expect will be a major offensive against Cambodia in late November or December.

Vietnam has denied charges by Peking and Phnom Penh that its army is massed to invade Cambodia. But the official Vietnam news agency quoted a Foreign Ministry spokesman this week as saying "to defend the lives and property of our people and firmly defend the southwestern border of our homeland, we are determined to counterattack the adventurous violations of our sacred territory."

Analysts here still say it is unlikely that Asia's two greatest military powers, China and Vietnam, will escalate their border feud to a full-scale conflict. They say the rash of Chinese raids into Vietnam reported by Hanoi in the last few weeks are only attempts by Peking to divert the Vietnamese from their real target, Cambodia.

The Cambodians reported killing 405 Vietnamese troops in Cambodian territory earlier, this month. Hanoi in turn reported killing 471 Cambodian troops intruding into Tayninh and Longan provinces in recent weeks, but these clashes seem only a prelude to heavier fighting. Both Cambodia and Vietnam are still suffering the effects of heavy rains, which have ruined a sizable portion of their rice crop as well as bogged down their troops. They are not expected to resume the full-scale border war that raged in January and June until after the monsoon ends in late November.

The Vietnamese have at least 100,000 to 120,000 troops stationed along the Cambodian border. That may be one reason why the Chinese have not appeared to make any serious moves recently to reinforce their border, knowing that the Vietnamese are intent on attacking the much smaller Cambodian forces. Cambodia may have about 60,000 soldiers to throw up against the Vietnamese. The Cambodians fought well earlier this year and are well supplied with Chinese weapons and ammunition.

Analysts here tend to doubt a recent report by an official Vietnamese army newspaper that "China is massing many divisions and large quantities of hardware within four to six miles of the Vietnam-China border." Vietnamese reports of Chinese border raids are accepted here as generally accurate, however.

"I expect the Chinese are anticipating what the Vietnamese plan to do in Cambodia, and are trying to scare them off," one analyst said.

Vietnamese Vice Foreign Minister Canh Phong formally protested to the Chinese embassy in Hanoi an Oct. 13 incident in which Chinese troops allegedly ambushed three Vietnamese border guards on Vietnam's territory near the village of Salam. The Hanoi protest said two of the guards were killed and the third captured and taken into China.

Wednesday the official Vietnam news agency said thousands of Chinese troops and police and some Chinese aircraft had crossed the border in 19 separate incidents between Oct. 13 and 17. Most of the raids, as described by the Vietnamese, seemed to be harassing runs, intruding only a few meters into Vietnamese territory.

Peking is supporting Cambodia to stymie what it says are Vietnamese plans to take over all of Indochina. China considers Vietnam a client state of its arch-rival, the Soviet Union. This summer it was the Chinese who were complaining about Vietnamese violations of their border, including an incident in which they said Vietnamese troops fortified a hill in Chinese territory. In the last two weeks Peking has said relatively little about the border, however.

The Vietnamese, in turn, have charged the Cambodians with massive atrocities against their own people and against Vietnamese living in villages near the Cambodian border. They have said the Cambodians are attacking them with Chinese weapons aided by Chinese soldiers in the guise of advisers. Analysts here think most of those attacks are against Vietnamese troops stationed a few miles inside Cambodia.