A very important influence was language / writing. There were many words used in China that are from Japan. When Ancient China was growing, they conveniently took these words from Japan.
Songs that were considered to be classics in Ancient China turned out to be songs adapted from Japan.
Ancient Chinese also learned and developed some technologies that Japan had. For example, architecture was similar because they used each others ideas.
The influence that Chinese had on Japan comes back around and influences China. This is because Ancient China spread cultural diffusion by making their belief in Buddhism spread which helped them. This happened at the same time as Confucianism concepts were occurring in Japan.