Thank you for your reply.
“Mr?” Yes, I’a lawyer 🙂
I’ve decided to make a comparison between the current post ID and the related post IDs. If the post ID is greater than related post ID, then it means that it is an incoming relation. At least this applies to my situation.