Chinese president Xi Jinping has sent North Korean leader Kim Jong-un a rare message "out of politeness," Beijing said on Thursday, in his first public communication with his wayward neighbour for more than a year.

The note signalled a possible improvement in their strained relationship, which has soured over Pyongyang's growing weapons ambitions even though Beijing is its longtime ally and economic benefactor.

Mr Xi's message, dated Wednesday, was sent in response to congratulations from the North Korean leader last week for securing a second term as the head of China's ruling party.

"I wish that under the new situation the Chinese side would make efforts with the DPRK side to promote the relations between the two parties and the two countries to sustainable soundness and stable development," Mr Xi said, according to the North's KCNA news agency, addressing Kim as "Comrade Chairman".