I imagine that the Persians and Chinese knew about each other since even the Romans and Chinese had vague interactions with each other. The Persians, being between the Romans and Chinese, must have interacted with the Chinese. Was there any direct trade or were there any wars between the two?
The first known interaction was reported by Zhang Qian, a Chinese explorer. He wrote that they were an advanced civilization, and commented on their currency, wine, cultivation and walled cities and also of the amount of cities. This was in 126 BCE and the two people started trading embassies and missions and had a peaceful relationship.
As they entered the Sassanid Period the two civilizations benefited greatly from trade on the silk road and were very close. Both of them worked together to guard the trade routes, and they continued to send missions to each other. The Persians were noted to send great entertainers to the Chinese courts.
After Persia was conquered by Islam, the relations continued. However in 751, the Abbasid Caliphate and the Chinese had a border dispute. They proceeded to battle over Syr Dara at the Battle of Talas. The Persians won a great victory, and after the battle, relations returned to normal, trading envoys, goods and missions between the two, and working together.
The problem with this question is that there have been Persian and Chinese Empires more or less continuously for the past 2200 years. The Persian heartland of Fars and the Chinese Central Plains together represent two of the oldest and most continuous loci of political power on the planet. In the context of trade and contact, for much of the past thousand years Persian was the lingua franca of the Indian Ocean, which historically probably the most dynamic commercial zone on the planet, and China was the largest economy.
If you mean during the Parthian period, yes, the Chinese knew about them, but we can't say much for the reverse because we actually know distressingly little about the Parthians.