A method and an apparatus for recommending a message. The method for recommending a message in the present disclosure includes separately parsing a first message published by a first user on a network and a second message published by a second user on the network, obtaining interest description information of the first message and topic description information of the second message, where the second user is another user except the first user, comparing the topic description information with the interest description information, and calculating a similarity of the topic description information and the interest description information; and if the similarity is greater than or equal to a predetermined value, pushing the second message published by the second user to the first user. A user can conveniently and flexibly obtain a message in which the user is interested in the embodiments of the present disclosure.
Please help me write a proper abstract based on the patent claims. CLAIM: 1. A method for recommending a message, comprising: separately parsing a first message published by a first user on a network and a second message published by a second user on the network; obtaining interest description information of the first message and topic description information of the second message, wherein the second user is another user except the first user; comparing the topic description information with the interest description information; calculating a similarity of the topic description information and the interest description information; and pushing the second message published by the second user to the first user when the similarity is greater than or equal to a predetermined value. 2. The method according to claim 1, wherein the interest description information comprises probability distribution information of the first message published by the first user on K topics, wherein the topic description information comprises probability distribution information of the second message published by the second user on the K topics, wherein K is an integer that is greater than 0, wherein comparing the topic description information with the interest description information comprises comparing the probability distribution information of the second message on the K topics with the probability distribution information of the first message on the K topics, and wherein calculating the similarity of the topic description information and the interest description information comprises calculating a similarity of the probability distribution information of the second message on the K topics and the probability distribution information of the first message on the K topics. 3. The method according to claim 2, wherein separately parsing the first message published by the first user on the network and the second message published by the second user on the network comprises separately parsing the first message published by the first user on the network and the second message published by the second user on the network, and wherein obtaining interest description information of the first message and topic description information of the second message comprises: obtaining allocation information of each word in the first message and the second message on the K topics; and separately determining the interest description information of the first message and the topic description information of the second message according to the allocation information. 4. The method according to claim 3, wherein separately parsing the first message published by the first user on the network and the second message published by the second user on the network, obtaining allocation information of each word in the first message and the second message on the K topics, and separately determining the interest description information of the first message and the topic description information of the second message according to the allocation information comprises: randomly allocating each word in a message to any one of the K topics; obtaining allocation information of each word in the message on the K topics after random allocation, wherein the message comprises the first message or the second message; starting from a first word in the message, determining, using a Gibbs sampling method and according to a probability that the word belongs to another topic, whether the word needs to be reallocated to the another topic; further allocating the word to a topic to which the word needs to be allocated, until all words in the message are traversed when the word needs to be reallocated to the another topic; updating allocation information of a word that needs to be reallocated in the message on the K topics after the traversal; repeating the traversal until a quantity of repeating times reaches a first predetermined value; stopping the traversal when a proportion occupied by a word that needs to be reallocated to a topic in all words in all messages published by a user that sends the message is less than a second predetermined value; obtaining current allocation information of each word in the message on the K topics after the last traversal; determining, according to current allocation information of each word in the first message on the K topics, the interest description information of the first message when the message is the first message; and determining, according to current allocation information of each word in the second message on the K topics, the topic description information of the second message when the message is the second message. 5. The method according to claim 2, wherein comparing the probability distribution information of the second message on the K topics with the probability distribution information of the first message on the K topics, and calculating a similarity of the probability distribution information of the second message on the K topics and the probability distribution information of the first message on the K topics comprises using a cosine similarity algorithm: s  ( u , d ) = ∑ i = 1 K  p i  q i ∑ i = 1 K  p i 2  ∑ i = 1 K  q i 2 , wherein s(u, d) represents the similarity of the interest description information of the first message and the topic description information of the second message, u represents the interest description information of the first message, d represents the topic description information of the second message, pi represents an ith component of a vector u, and qi represents an ith component of a vector d. 6. The method according to claim 2, wherein comparing the probability distribution information of the second message on the K topics with the probability distribution information of the first message on the K topics, and calculating a similarity of the probability distribution information of the second message on the K topics and the probability distribution information of the first message on the K topics specifically comprises using a KL divergence algorithm: KL  ( u , d ) = ∑ i = 1 K  p i  ln  p i q i , wherein KL(u, d) represents the similarity of the interest description information of the first message and the topic description information of the second message, u represents the interest description information of the first message, d represents the topic description information of the second message, pi represents an ith component of a vector u, and qi represents an ith component of a vector d. 7. An apparatus for recommending a message, comprising: a memory comprising instructions; a processor coupled to the memory, wherein when the instructions are executed by the processor, the instructions cause the processor to: separately parse a first message published by a first user on a network and a second message published by a second user on the network; obtain interest description information of the first message and topic description information of the second message, wherein the second user is another user except the first user; compare the topic description information with the interest description information; calculate a similarity of the topic description information and the interest description information; and push a message published by the second user to the first user when the similarity is greater than or equal to a predetermined value. 8. The apparatus according to claim 7, wherein the interest description information comprises probability distribution information of the first message published by the first user on K topics, wherein the topic description information comprises probability distribution information of the second message published by the second user on the K topics, wherein K is an integer that is greater than 0, and wherein the instructions further cause the processor to: compare the probability distribution information of the second message on the K topics with the probability distribution information of the first message on the K topics; and calculate a similarity of the probability distribution information of the second message on the K topics and the probability distribution information of the first message on the K topics. 9. The apparatus according to claim 8, wherein the instructions further cause the processor to: separately parse the first message published by the first user on the network and the second message published by the second user on the network; obtain allocation information of each word in the first message and the second message on the K topics; and separately determine the interest description information of the first message and the topic description information of the second message according to the allocation information. 10. The apparatus according to claim 9, wherein the instructions further cause the processor to: randomly allocate each word in a message to any one of the K topics; obtain allocation information of each word in the message on the K topics after random allocation, wherein the message comprises the first message or the second message; use a Gibbs sampling method to determine, starting from a first word in the message and according to a probability that the word belongs to another topic, whether the word needs to be reallocated to the another topic; further allocate the word to a topic to which the word needs to be allocated until all words in the message are traversed when the word needs to be reallocated to the another topic; update allocation information of a word that needs to be reallocated in the message on the K topics after the traversal; repeat the traversal until a quantity of repeating times reaches a first predetermined value; stop the traversal when a proportion occupied by a word that needs to be reallocated to a topic in all words in all messages published by a user that sends the message is less than a second predetermined value; obtain current allocation information of each word in the message on the K topics after the last traversal; and determine, according to current allocation information of each word in the first message on the K topics, the interest description information of the first message when the message is the first message; and determine, according to current allocation information of each word in the second message on the K topics, the topic description information of the second message when the message is the second message. 11. The apparatus according to claim 8, wherein the instructions further cause the processor to use a cosine similarity algorithm: s  ( u , d ) = ∑ i = 1 K  p i  q i ∑ i = 1 K  p i 2  ∑ i = 1 K  q i 2 , and wherein s(u, d) represents the similarity of the interest description information of the first message and the topic description information of the second message, u represents the interest description information of the first message, d represents the topic description information of the second message, pi represents an ith component of a vector u, and qi represents an ith component of a vector d. 12. The apparatus according to claim 8, wherein the instructions further cause the processor to use a KL divergence algorithm: KL  ( u , d ) = ∑ i = 1 K  p i  ln  p i q i , and wherein KL(u, d) represents the similarity of the interest description information of the first message and the topic description information of the second message, u represents the interest description information of the first message, d represents the topic description information of the second message, pu represents an ith component of a vector u, and qi represents an ith component of a vector d.