News matching method fusing topic and entity knowledge
By integrating topic and entity knowledge into a news matching method, and utilizing the BERT-ECTM model and Manhattan distance calculation, the problems of diverse and redundant information in news data are solved, achieving more efficient news matching results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-14
- Publication Date
- 2026-03-10
AI Technical Summary
Existing news matching methods cannot effectively handle the diversity and redundancy of news data, resulting in inaccurate text similarity calculations and failing to meet the needs of public opinion information supervision.
A news matching method that integrates topic and entity knowledge is proposed. The topic distribution vector is obtained through the BERT-ECTM model, entity knowledge is identified by combining mainstream entity recognition models, and the news matching degree is calculated by Manhattan distance to enhance semantic information calculation.
It improves the accuracy and calculation speed of news matching, effectively handles the diversity and redundancy of news data, and enhances the performance of news matching.
Smart Images

Figure CN115292447B_ABST
Abstract
Description
Technical Field
[0001] This invention proposes a news matching method that integrates topic and entity knowledge, belonging to the field of natural language processing technology. Background Technology
[0002] With the increasing intensity of public opinion information supervision, accurately matching news related to specific cases from massive amounts of news is a crucial part of public opinion information supervision. News matching is the foundation for deeper research in the legal field, such as intelligent question answering and information retrieval, and is also one of the key tasks of public opinion information supervision in the legal field. It mainly involves calculating the similarity score of the text to be matched, and then determining whether it matches based on the similarity score.
[0003] Current research on news matching is limited. This invention, based on the task characteristics, considers it as a text similarity calculation task, primarily referring to the semantic similarity of the texts to be matched. However, conventional text similarity calculations mainly target short texts with similar or symmetrical structures. News data, on the other hand, comes from a wide range of sources and exhibits diverse content, leading to significant semantic and structural differences and the inclusion of redundant information. Therefore, conventional text similarity calculation methods are not suitable for news matching tasks.
[0004] The news topic mainly includes the methods and processes of the crime, primarily using verbs, while the entity knowledge mainly includes time, place, people, and organizations. Clearly, the topic and entity knowledge share similar or identical characteristics. Based on this analysis, a news matching method that integrates topic and entity knowledge is proposed. Summary of the Invention
[0005] This invention provides a news matching method that integrates topic and entity knowledge. It enhances the semantic information of the text to be matched, assists in calculating the similarity of the texts, and thus improves the performance of news matching. The method obtains topic distribution vectors through a topic information generation model (BERT-ECTM), then uses mainstream entity recognition models to identify the entity knowledge (person names, times, locations, and organization names) of the news, and obtains entity knowledge embedding vectors through templated word vectors. Simultaneously, it fuses these two vectors with the semantic representation vector of the news context to obtain the representation vector of the text to be matched, and finally uses Manhattan distance to calculate the matching degree between the two.
[0006] The technical solution of this invention is: a news matching method that integrates topic and entity knowledge. The method obtains a topic distribution vector through a topic information generation model, then identifies the entity knowledge of the news using a mainstream entity recognition model, and obtains an entity knowledge embedding vector through a templated word vector method. At the same time, the topic distribution vector and the entity knowledge embedding vector are fused with the news context semantic representation vector to obtain a preferred news context semantic text embedding vector to be matched, and then the Manhattan distance is used to calculate the matching degree between the two.
[0007] As a further aspect of the present invention, the specific steps of the news matching method that integrates topic and entity knowledge are as follows:
[0008] Step 1: Corpus preprocessing: Preprocess parallel training corpora, validation corpora, and test corpora of different sizes for model training, parameter tuning, and performance testing.
[0009] Step 2, Text Encoding: After obtaining the preprocessed news document data, it is trained using the WoBERT model to obtain word embedding representations with contextual semantic information, thereby obtaining the bag-of-words representation vector and word embedding vector of the news text; the input encoding vector during the training process is a combination of the three embedding representations of words, sentences and positions;
[0010] Step 3, Topic Extraction: Use the topic information generation model BERT-ECTM to obtain topic distribution vectors to acquire news corpora; specifically, input the bag-of-words representation vectors and word embedding vectors of the news texts obtained in Step 2 into the topic analysis model to obtain the topic distribution of the news.
[0011] Step 4, Entity Knowledge Extraction: After performing named entity recognition on the input news article to be matched, output its named entity annotation information, selecting the "NR, NS, NT, and T" part-of-speech tags; use the template embedding method to obtain the entity embeddings in the news article, using the embedding of "e" to represent the entity knowledge embedding vector, and use the smoothing method in max pooling to obtain the entity embedding of each entity; after linearly transforming the word embedding vector of the BERT-encoded news text obtained in Step 2, concatenate it with the topic distribution vector of the news article obtained in Step 3 and the entity knowledge embedding vector obtained in Step 4 to obtain the context semantic text embedding vector of the news article to be matched with preferences, which is used for subsequent text matching calculations;
[0012] Step 5: Matching: Based on the obtained contextual semantic text embedding vectors of the news articles to be matched with the preference, first calculate the Manhattan distance between the semantic representation vectors of the two articles, and then normalize them using the sigmoid function to calculate the matching degree between news article a and news article b, which is the similarity score.
[0013] As a further aspect of the present invention, the specific steps of Step 1 are as follows:
[0014] Step 1.1: Select several trending cases, crawl related news, and manually proofread the news related to the cases.
[0015] Step 1.2: Based on the hot news corpus obtained in Step 1.1, use the news matching dataset construction method to form "news-news" pairs, with 500 pairs of positive and negative examples for each category of news, for a total of 13,000 pairs;
[0016] Step 1.3: Based on Step 1.2, divide the entire dataset into 10,600 training pairs, 1,200 validation pairs, and 1,200 test pairs.
[0017] As a further aspect of the present invention, the specific steps of Step 3 are as follows:
[0018] Step 3.1: Convert the bag-of-words representation vector of the news text obtained from the encoding module. and word embedding vectors Input the data into the topic analysis model to obtain the topic distribution with preferences;
[0019] Step 3.2: Sampling from the topic, using the topic of the nth word, and combining the topic with the word embedding vector of the news article. Decoding yields the topic-word distribution W with preferences. dn ;
[0020] Step 3.3, then the topic-word distribution vector W dn The input is processed through a multi-head self-attention mechanism to obtain a new, more biased topic distribution vector:
[0021] W dn ~BERT-ECTM(Q d N d )
[0022]
[0023] Among them W dn This represents a topic-word distribution vector with a preference, and Multi-Head-Attention represents the computation process of the multi-head self-attention mechanism. d This represents a more preferred topic distribution vector, which is incorporated into news matching to improve its performance. d represents the dimension of the topic distribution vector.
[0024] As a further aspect of the present invention, the specific steps of Step 4 are as follows:
[0025] Step 4.1: The Chinese named entity recognition tool jieba is used to identify case-related entities in news articles. When the text input is the news article to be matched, named entity recognition is performed, and its named entity annotation information is output. The part-of-speech tags "NR, NS, NT, and T" are selected, where NR corresponds to the entity category of person names, NS corresponds to place names, NT corresponds to organization names, T corresponds to time, and the entity is represented by m... i express;
[0026] Step 4.2: Because the amount of entity knowledge in news articles is limited, conventional entity embedding encoding methods are not reasonable. Therefore, the template embedding method is used to obtain the entity embeddings e in the news articles. i The specific approach is as follows: The embedding of "e" is used to represent the entity knowledge embedding vector mentioned later. The smoothing method in max pooling, namely log-sumexp pooling, is used to obtain the embedding vector for each entity m. i entity embedding e i :
[0027]
[0028] Where i represents the number of entity knowledge items, p represents the dimension of entity knowledge embedding, and p is equal to the dimension d of the topic distribution vector; n represents the number of words in the entire text. i Indicates the order of entity words in a sentence;
[0029] Step 4.3: First, embed the word embedding vectors of the BERT-encoded news articles. Perform a linear transformation to obtain Then, it is concatenated with the topic distribution vector and entity knowledge embedding vector of the news to obtain the semantic text embedding vector of the news context to be matched with preference, which is used for subsequent text matching calculation;
[0030]
[0031] Where q represents the embedding dimension of the news context semantics, and M d This represents a more preferred topic distribution vector.
[0032] As a further aspect of the present invention, the specific steps of Step 5 are as follows:
[0033] Step 5.1: Based on the contextual semantic representation vectors H of the news a and news b to be matched with preferences obtained in Step 4... qa and H qb The first step is to calculate H. qa and Hqb The Manhattan distance was chosen as the loss function because news articles have significant differences in both structure and semantics. Calculating the direct differences between news articles to determine whether they match is generally ineffective. Therefore, based on the definition of the Manhattan distance, it is inferred that it is more suitable for calculating the actual distance between the news articles to be matched and further determining whether they match.
[0034] Step 5.2: Normalize the obtained Manhattan distance using the sigmoid function to calculate the matching degree between news a and news b, which is the similarity score.
[0035] Similarity(N out ,X out ) = 1 - sigmoid(manhattan(H qa H qb ))
[0036] P = Simlarity(H) qa H qb )
[0037] Where P represents the matching score calculated for the text to be matched. When P > 0.6, the news to be matched is predicted to be a match.
[0038] The beneficial effects of this invention are:
[0039] 1. This invention improves upon existing text matching methods by integrating topic knowledge and entity knowledge for similarity calculation, thereby maximizing the accuracy and speed of text matching.
[0040] 2. This invention improves the text matching framework by inputting news texts into pseudo-Twin networks using the same parameters to more intuitively compare similarity.
[0041] 3. Manhattan distance is chosen as the loss function because news articles vary significantly in both structure and semantics. Calculating the direct differences between news articles to determine a match is generally ineffective. Therefore, based on the definition of Manhattan distance, it can be inferred that it is more suitable for calculating the actual distance between the news articles to be matched, and further determining whether a match exists.
[0042] 4. This invention integrates automatically generated topics and entity knowledge identified by mainstream methods to enhance the semantic information of the text to be matched and assist in calculating the similarity of the texts to be matched, thereby improving the performance of news matching. In the experiment, this invention uses the news topic analysis model (BERT-ECTM) and mainstream entity recognition tools to obtain the topic and entity knowledge of the news to be matched, respectively. The features of information and entity knowledge are used to assist in the contextual semantic understanding of the news. At the same time, a pseudo-Twin network is constructed to calculate the similarity score between the two to determine whether they match. It is worth mentioning that integrating topic and entity knowledge to calculate the matching score can effectively improve the calculation speed and accuracy.
[0043] 5. To demonstrate the performance of the proposed news matching method that integrates topic and entity knowledge, this invention conducts relevant verification based on a news matching dataset. Experimental results show that, compared with the baseline model, the proposed method is significantly more effective, outperforming the baseline model in evaluation metrics, with a maximum F1 score improvement of nearly 5%. Attached Figure Description
[0044] Figure 1 This is a diagram of the overall structure of the model proposed in this invention. Detailed Implementation
[0045] Example 1: As Figure 1 As shown, the news matching method that integrates topic and entity knowledge includes the following specific steps:
[0046] Step 1: Corpus Preprocessing. Parallel training, validation, and test corpora of varying sizes are preprocessed for model training, parameter tuning, and performance testing. High-frequency trending news events from recent years are analyzed, and 13 representative cases with high public attention are selected. Relevant news is crawled from websites such as Sina Weibo, Baidu News, and Tianya Forum. After manual verification, relevant news articles related to these 13 cases are selected. A news matching dataset is constructed to create "news-news" pairs, with 500 positive and 500 negative pairs for each category, totaling 13,000 pairs. The division of the training, test, and validation sets in the dataset is shown in Table 1.
[0047] Table 1 Experimental Data
[0048]
[0049] Step 2, Text Encoding: After obtaining the preprocessed news document data, it is trained using the WoBERT model to obtain word embedding representations with contextual semantic information, thereby obtaining the bag-of-words representation vector and word embedding vector of the news text; the input encoding vector during the training process is a combination of the three embedding representations of words, sentences and positions;
[0050] Step 3, Topic Extraction: Use the topic information generation model BERT-ECTM to obtain topic distribution vectors to acquire news corpora; specifically, input the bag-of-words representation vectors and word embedding vectors of the news texts obtained in Step 2 into the topic analysis model to obtain the topic distribution of the news.
[0051] The specific steps of Step 3 are as follows:
[0052] Step 3.1: Convert the bag-of-words representation vector of the news text obtained from the encoding module. and word embedding vectors Input the data into the topic analysis model to obtain the topic distribution with preferences;
[0053] Step 3.2: Sampling from the topic, using the topic of the nth word, and combining the topic with the word embedding vector of the news article. Decoding yields the topic-word distribution W with preferences. dn ;
[0054] Step 3.3, then the topic-word distribution vector W dn The input is processed through a multi-head self-attention mechanism to obtain a new, more biased topic distribution vector:
[0055] W dn ~BERT-ECTM(Q d N d )
[0056]
[0057] Among them W dn This represents a topic-word distribution vector with a preference, and Multi-Head-Attention represents the computation process of the multi-head self-attention mechanism. d This represents a more preferred topic distribution vector, which is incorporated into news matching to improve its performance. d represents the dimension of the topic distribution vector.
[0058] To verify the rationality of each module in the proposed model, a module ablation comparison experiment was designed. "-Topic" indicates removing the topic-words of the news and only incorporating entity knowledge for matching; conversely, "-Entity Knowledge" indicates removing the entity knowledge of the news and only incorporating topic-words for matching. "Bert-Encoder" indicates removing both the topic and entity knowledge of the news and only using the context representation vector encoded by BERT for matching. The experimental comparison results are shown in Table 2.
[0059] Table 2 Ablation Experiment
[0060]
[0061] As shown in Table 2, when the ablation experiment of this invention was conducted, the performance of the model incorporating topic and entity knowledge improved by more than 3.2% compared to the method using only BERT encoding. At the same time, when this module was ablated, the model experienced a performance decrease of approximately 2%, regardless of whether it was topic or entity knowledge. This verifies the rationality and robustness of the model design of this invention. Topic and entity knowledge are particularly important for news matching tasks.
[0062] Step 4, Entity Knowledge Extraction: After performing named entity recognition on the input news article to be matched, output its named entity annotation information, selecting the "NR, NS, NT, and T" part-of-speech tags; use the template embedding method to obtain the entity embeddings in the news article, using the embedding of "e" to represent the entity knowledge embedding vector, and use the smoothing method in max pooling to obtain the entity embedding of each entity; after linearly transforming the word embedding vector of the BERT-encoded news text obtained in Step 2, concatenate it with the topic distribution vector of the news article obtained in Step 3 and the entity knowledge embedding vector obtained in Step 4 to obtain the context semantic text embedding vector of the news article to be matched with preferences, which is used for subsequent text matching calculations;
[0063] The specific steps of Step 4 are as follows:
[0064] Step 4.1: The Chinese named entity recognition tool jieba is used to identify case-related entities in news articles. When the text input is the news article to be matched, named entity recognition is performed, and its named entity annotation information is output. The part-of-speech tags "NR, NS, NT, and T" are selected, where NR corresponds to the entity category of person names, NS corresponds to place names, NT corresponds to organization names, T corresponds to time, and the entity is represented by m... i express;
[0065] Step 4.2: Because the amount of entity knowledge in news articles is limited, conventional entity embedding encoding methods are not reasonable. Therefore, the template embedding method is used to obtain the entity embeddings e in the news articles. i The specific approach is as follows: The embedding of "e" is used to represent the entity knowledge embedding vector mentioned later. The smoothing method in max pooling, namely log-sumexp pooling, is used to obtain the embedding vector for each entity m. i entity embedding e i :
[0066]
[0067] Where i represents the number of entity knowledge items, p represents the dimension of entity knowledge embedding, and p is equal to the dimension d of the topic distribution vector; n represents the number of words in the entire text. iIndicates the order of entity words in a sentence;
[0068] Step 4.3: First, embed the word embedding vectors of the BERT-encoded news articles. Perform a linear transformation to obtain Then, it is concatenated with the topic distribution vector and entity knowledge embedding vector of the news to obtain the semantic text embedding vector of the news context to be matched with preference, which is used for subsequent text matching calculation;
[0069]
[0070] Where q represents the embedding dimension of the news context semantics, and M d This represents a more preferred topic distribution vector.
[0071] Step 5: Matching: Based on the obtained contextual semantic text embedding vectors of the news articles to be matched with the preference, first calculate the Manhattan distance between the semantic representation vectors of the two articles, and then normalize them using the sigmoid function to calculate the matching degree between news article a and news article b, which is the similarity score.
[0072] As a further aspect of the present invention, the specific steps of Step 5 are as follows:
[0073] Step 5.1: Based on the contextual semantic representation vectors H of the news a and news b to be matched with preferences obtained in Step 4... qa and H qb The first step is to calculate H. qa and H qb The Manhattan distance was chosen as the loss function because news articles have significant differences in both structure and semantics. Calculating the direct differences between news articles to determine whether they match is generally ineffective. Therefore, based on the definition of the Manhattan distance, it is inferred that it is more suitable for calculating the actual distance between the news articles to be matched and further determining whether they match.
[0074] Step 5.2: Normalize the obtained Manhattan distance using the sigmoid function to calculate the matching degree between news a and news b, which is the similarity score.
[0075] Similarity(N out ,X out ) = 1 - sigmoid(manhattan(H qa H qb ))
[0076] P = Simlarity(H) qa H qb )
[0077] Where P represents the matching score calculated for the text to be matched. When P > 0.6, the news to be matched is predicted to be a match.
[0078] To demonstrate the effectiveness of the proposed method, precision (P), recall (R), and F1 score are used as evaluation metrics to compare it with the following four models:
[0079] Siamese BILSTM: Paul Neculoiu et al. proposed a Siamese network model based on a bidirectional recurrent neural network to calculate the similarity between two texts.
[0080] HASM: Li Lanjun et al. proposed a Siamese network model (HASM) based on a hierarchical attention mechanism to calculate the similarity of texts. This method compresses long documents based on TextRank and uses the hierarchical attention mechanism to encode and summarize each level to obtain the document representation.
[0081] Un-siamese Nertwork: Zhao Chengding et al. proposed a news relevance analysis method based on an asymmetric twin network model. In this paper, Zhao et al. used a headline compression method to solve the problem of excessive redundant information in news documents, while integrating case element supervision and guidance coding information into news documents.
[0082] BIMPM: Wang et al. proposed a Siamese network model for multi-angle interactive matching, which utilizes information from more angles to calculate the similarity of texts.
[0083] Table 3. BLEU Value Evaluation Results (%)
[0084]
[0085] As shown in Table 3, the Siamese BILSTM and HASM methods perform only moderately well on the news matching dataset. This analysis reveals that news documents are long, with significant structural and semantic differences, and contain a lot of redundant information. Information encoded using hierarchical attention mechanisms suffers loss during compression and propagation between modules. Furthermore, the excessive length of news data and the strong interference from redundant information make it difficult to capture effective case information. In contrast, the Un-siamese Nertwork and BIMPM methods show relatively improved performance on the news matching dataset. The main reason for the improved performance of the Un-siamese Nertwork method is that Zhao et al. combined the headline with news document compression to alleviate the interference of redundant information, and the integration of case elements for attention mechanism calculation aimed to capture more effective information and reduce the interference of redundant information. The main reason for the improved performance of the BIMPM method is that Wang et al. performed interactive matching of the text to be matched from different angles and concatenated it into the original document representation vector to obtain more mutually effective key information for matching.
[0086] It is worth mentioning that the method proposed in this invention can achieve good results without the aforementioned complex operations. This demonstrates that the unique topic and entity knowledge information between news articles can make the semantic information of the text to be matched more favorable, capturing sufficient key information for news matching tasks, thereby assisting in achieving good performance in news matching. Compared with the baseline model, the F1 score is improved by up to 5.5%, which proves that the method proposed in this invention is more suitable for imbalanced document matching tasks such as news articles.
[0087] To further verify the effectiveness of topic and entity knowledge in news matching tasks, this paper uses a simple concatenation method to concatenate the encoded news to be matched and topic and entity knowledge with other baseline models for experimental analysis. Here, -F1 represents the true F1 value of the baseline model without the addition of topic and entity knowledge, as shown in Table 4 (where Topic-Entity is used to represent topic and entity knowledge).
[0088] Table 4. BLEU Value Evaluation Results (%)
[0089]
[0090] As shown in Table 4, the F1 scores of all baseline models significantly improved after incorporating topic and entity knowledge into the baseline models. This demonstrates that integrating topic and entity knowledge to guide news matching is effective, because topic and entity knowledge represent the core knowledge of news and can improve the similarity of the documents to be matched.
[0091] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. A method for news matching by fusing topics with entity knowledge, characterized in that: The topic distribution vector is obtained through the topic information generation model, and then the entity knowledge of the news is recognized by using a mainstream entity recognition model, and the entity knowledge embedding vector is obtained by using the template word vector method, and the topic distribution vector and the entity knowledge embedding vector are fused with the news context semantic representation vector to obtain the preferred matching news context semantic text embedding vector, and then the Manhattan distance is used to calculate the matching degree; The specific steps of the news matching method of fusing topics and entity knowledge are as follows: Step 1, corpus preprocessing: preprocessing different sizes of parallel training corpus, validation corpus and test corpus for model training, parameter tuning and effect testing; Step 2, text encoding: after obtaining the preprocessed news document data, the data is trained through the WoBERT model to obtain word embedding representation with context semantic information, so as to obtain the bag-of-words representation vector and word embedding vector of the news text; The input encoding vector in the training process is the combination of word, sentence and position embedding representation; Step 3, topic extraction: use the topic information generation model BERT-ECTM to obtain the topic distribution vector to obtain the news corpus; Specifically, input the bag-of-words representation vector and word embedding vector of the news text obtained in Step 2 into the topic analysis model to obtain the topic distribution of the news; Step 4, entity knowledge extraction: after inputting the news to be matched for named entity recognition, output the named entity annotation information, and select the "NR, NS, NT and T" part-of-speech tags; Use the template Embedding method to obtain the entity embedding in the news, use the embedding of "e" to represent the entity knowledge embedding vector, and use the smoothing method in the maximum pooling to obtain the entity embedding of each entity; After linear transformation of the BERT encoded word embedding vector of the news text obtained in Step 2, the news topic distribution vector obtained in Step 3 and the entity knowledge embedding vector obtained in Step 4 are spliced to obtain the preferred matching news context semantic text embedding vector, which is used for subsequent text matching calculation; Step 5, matching: according to the obtained preferred matching news context semantic text embedding vector, first calculate the Manhattan distance of the semantic representation vectors of the two, and then perform normalization processing through the sigmoid function, so as to calculate the matching degree of news a and news b, that is, the similarity score; The specific steps of Step 3 are: Step 3.1: Convert the bag-of-words representation vector of the news text obtained from the encoding module. and word embedding vectors Input the data into the topic analysis model to obtain the topic distribution with preferences; Step 3.2, sampling from topics, using the topic of the nth word, according to the topic, combining the word embedding vector of the news Decoding to obtain a topic-word distribution with preferences ; Step 3.3, then the topic-word distribution vector The new more preferred topic distribution vector is obtained by calculating in the input multi-head self-attention mechanism. ; ; wherein represents the preferred topic distribution-word distribution vector, Mulit-Head-Attention represents the calculation process of the multi-head self-attention mechanism, represents the more preferred topic distribution vector, which is integrated into the news matching to improve its performance, d represents the dimension size of the topic distribution vector. 2.The method of claim 1, wherein: The specific steps of Step 1 are: Step 1.1, select several hot cases, crawl related news, and select several hot news related to the cases through manual correction method; Step 1.2, using the news matching data set construction method on the hot news corpus obtained in Step 1.1, construct "news-news" pairs, each category of news positive and negative examples is 500 pairs, a total of 13000 pairs; Step 1.3, on the basis of Step 1.2, the entire data set is divided into 10600 pairs of training set, 1200 pairs of validation set and 1200 pairs of test set. 3.The method of claim 1, wherein: The specific steps of Step 4 are: Step 4.1, the Chinese named entity recognition tool jieba is used to recognize the case related entity knowledge in the news. After the text input is matched with the news for named entity recognition, the named entity annotation information is output, and the "NR, NS, NT and T" word nature labels are selected, wherein NR corresponds to the entity category of the name, NS corresponds to the place name, NT corresponds to the organization name, and T corresponds to the time. The entity is represented by . Step4.2、Because the entity knowledge of news is limited, the conventional entity embedding coding method is not reasonable, so the template Embedding method is used to obtain the entity embedding in news ; The specific method is to use the embedding of "e" to represent the entity knowledge embedding vector mentioned in the subsequent text, and use the smoothing method in max pooling, that is, log-sumexp pooling to obtain the entity embedding of each entity : : ; where i represents the number of entity knowledge, p represents the dimension size of entity knowledge embedding, p is equal to the dimension size d of the topic distribution vector; n represents the number of words in the whole chapter, n i represents the ranking of entity words in the sentence; Step4.3、First, the word embedding vector of the news encoded by BERT is linearly transformed to obtain ; then it is spliced with the topic distribution vector and entity knowledge embedding vector of the news to obtain the context semantic text embedding vector of the preferred to-be-matched news, which is used for subsequent text matching calculation; ; where q denotes the embedding dimension size of the news context semantics, represents the more preferred topic distribution vector.
4. The method of claim 1, wherein the step of fusing the topic and entity knowledge comprises: The specific steps of Step 5 are: Step 5.1, according to the context semantic representation vector of the preferred news a and news b to be matched obtained in Step 4 and The first step is to calculate the Manhattan distance of and ; the Manhattan distance is selected as the loss function because the news has great difference in structure and semantics, and the direct difference of the news is generally calculated to judge whether to match; therefore, according to the definition of Manhattan distance, it is inferred that it is more suitable to calculate the actual distance of the news to be matched to further judge whether to match; Step 5.2, the obtained Manhattan distance is normalized by sigmoid function, so as to calculate the matching degree of news a and news b, that is, the similarity score; ; ; Wherein P represents the matching score calculated by the to-be-matched text, and when P>0.6, it is predicted that the to-be-matched news is matched.