during tang dynasty this area was under the korean kingdom of balhae