As far back as the Tang dynasty, China had trade contact with the Arab world.
Tips
grammar
Almost always paired with 就 (jiù) in the main clause to emphasize that the action happened earlier than expected: 早在X,Y就Z. The 就 is structural — drop it and the sentence sounds incomplete.
memory
Just 早 ('early') + 在 ('at/in') = 'already at [some past time]' — the 早 does the 'as early as' work, 在 introduces the time.