Two weeks of tough trade talks have failed to persuade Japanese officials to lower barriers to increased imports of American beef, citrus and cigarettes, but the two nations' negotiators have reached a tentative agreement to provide equal access to each other's markets in the growing field of high technology.

The talks, which ended over the weekend, came at a time of deteriorating trade relations between the United States and Japan as America's declining trade balance and the recession combine to fuel a growing protectionist mood in this country. Deputy Assistant Trade Representative Joseph A. Massey said the Japanese negotiators refused to take seriously this growing threat of protectionist barriers against Japan.

"We've done our best to convince the Japanese that the wolf is at the door," said Massey.

A new set of talks began yesterday as part of monthly American contacts with Japanese officials in an effort to speed the reduction of trade barriers. U.S. Assistant Trade Representative James M. Murphy pushed for relaxation of Japanese import and quality inspection standards on food additives and cosmetics, which he argued were designed more to hamper American imports than protect Japanese consumers.

The Japanese barriers to the sale of American cigarettes are considered particularly onerous by the Reagan administration because all the barriers are set by the Japanese government. These include restrictions by the public monopoly corporation Japan Tobacco and Salt on cigarette marketing and advertising and the number of retail outlets that can handle the American products. These restrictions fall on top of a 35 percent tariff that lifts the price of American cigarettes to $1.02 a pack, compared with 65 cents for Japanese brands.

These barriers, as well as the ones that impede the import of American beef and citrus products, reflect the strong political clout of Japanese farmers in their legislature.

But American tobacco companies and farmers see Japan as a major potential market for their products. Japan's cigarette consumption is the fourth highest in the world. Even with restrictions against their sales, American products are extremely popular there.

Deputy U.S. Trade Representative David R. Macdonald estimated before the Senate Foreign Relations Committee in September that American cigarettes could capture between one-fourth and one-half the Japanese market, which could bring in about $2-billion in annual sales. This would mean a 12 percent reduction in last year's $15.8 billion trade deficit with Japan.

High technology could become the area of sharpest trade friction between the United States and Japan as many officials here fear that a highly-focused, government-aided Japanese effort will push its firms ahead of American competitors in the field of high speed computers vital to national defense.

According to reports from Tokyo, negotiators agreed to submit to their governments recommendations designed to make sure each country had equal access to the other's markets. At present, Japan exports about $150 million more in semiconductors to the United States than American firms sell to Japan.

"Our job is to assure than U.S. companies have the same opportunity to participate in Japan as Japanese companies have had in the United States," said Deputy Assistant Secretary of Commerce Clyde Prestowitz, who headed the U.S. side of the high technology negotiations.