News recommendation method and device, storage medium and computer device
By acquiring news text and user characteristics and behavioral data, and utilizing semantic prediction models and data fusion technology, the problem of low accuracy in news recommendations has been solved, achieving more efficient matching of user interests and improving user experience.
Patent Information
- Application Number
- CN202310872582.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-17
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2043-07-17
AI Technical Summary
The accuracy of news recommendations in existing technologies is low, resulting in a poor user experience, mainly because random recommendation methods cannot accurately identify user interests.
By acquiring news text, user feature data, and behavioral data, semantic prediction is performed using a pre-set semantic prediction model to generate semantic information vectors. These vectors are then combined with data fusion feature vectors to determine target news texts for recommendation.
It improved the accuracy of news recommendations, enhanced the user experience, and ensured that the recommended news better matched the user's interests.
Smart Images

Figure CN116932898B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of information technology and digital medical technology, and in particular to a news recommendation method, apparatus, storage medium and computer equipment. Background Technology
[0002] With the rapid development of self-media, a large amount of news is produced every day, such as news about personal health information. In order to increase the readership of news and ensure that users see the news information, it is necessary to recommend news to users.
[0003] Currently, news is typically recommended to users randomly. However, this random recommendation method results in the received news not being of interest to the user, leading to low recommendation accuracy and a negative user experience. Summary of the Invention
[0004] This invention provides a news recommendation method, apparatus, storage medium, and computer device, which mainly improve the accuracy of news recommendations and enhance the user experience.
[0005] According to a first aspect of the present invention, a news recommendation method is provided, comprising:
[0006] Obtain the news text, as well as the feature data and behavioral data of the users to be recommended;
[0007] The news text is input into a preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text.
[0008] The feature data and the behavior data are fused together to generate a fused feature vector.
[0009] Based on the semantic information vector and the data fusion feature vector, a target news text is determined in the news text, and the target news text is recommended to the user to be recommended.
[0010] Optionally, before inputting the news text into a preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text, the method further includes:
[0011] Construct a pre-defined initial semantic prediction model and obtain sample news texts;
[0012] Determine the twin sample news text corresponding to the sample news text;
[0013] The preset initial semantic prediction model is defined, and a first eliminated neuron is determined from among the neurons with a first preset elimination probability value, and a second eliminated neuron is determined from among the neurons with a second preset elimination probability value.
[0014] The first eliminated neuron is removed from each neuron to obtain a preset initial semantic prediction model containing the first remaining neuron. The sample news text is then input into the preset initial semantic prediction model containing the first remaining neuron for semantic prediction to obtain the first predicted semantic vector corresponding to the sample news text.
[0015] The second eliminated neuron is removed from each of the neurons to obtain a preset initial semantic prediction model containing the second remaining neurons. The twin sample news text is then input into the preset initial semantic prediction model containing the second remaining neurons for semantic prediction to obtain the second predicted semantic vector corresponding to the twin sample news text.
[0016] Based on the similarity between the first predicted semantic vector and the second predicted semantic vector, a loss function corresponding to the preset initial semantic prediction model is generated, and the preset semantic prediction model is constructed based on the loss function.
[0017] Optionally, the step of inputting the news text into a preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text includes:
[0018] Identify each word segment contained in the news text, and determine the word vector corresponding to each word segment;
[0019] Identify each sentence contained in the news text, and determine the sentence vector corresponding to each sentence;
[0020] Identify each character contained in the news text and determine the position vector corresponding to each character;
[0021] The word vectors, sentence vectors, and position vectors are concatenated to obtain the concatenated feature vector corresponding to the news text.
[0022] The concatenated feature vector is input into the preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text.
[0023] Optionally, the preset semantic prediction model is a preset natural language processing model, which includes a multi-head attention layer and a feedforward neural network layer. The step of inputting the concatenated feature vector into the preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text includes:
[0024] The concatenated feature vectors are input into each head attention layer for feature extraction to obtain the output vectors of each head attention layer corresponding to the news text.
[0025] Multiply the output vector of each head attention layer by the weight coefficients corresponding to each head attention layer and sum them to obtain the weighted feature vector corresponding to the news text;
[0026] The weighted feature vector is added to the concatenated feature vector to obtain the intermediate feature vector corresponding to the news text;
[0027] The intermediate feature vector is input into the feedforward neural network layer for feature extraction to obtain the semantic information vector corresponding to the news text.
[0028] Optionally, the step of performing data fusion processing on the feature data and the behavior data to generate a data fusion feature vector includes:
[0029] Determine the first embedding vector corresponding to the feature data, and determine the second embedding vector corresponding to the behavior data;
[0030] The first embedding vector and the second embedding vector are fused to obtain a data fusion feature vector.
[0031] Optionally, the step of fusing the first embedding vector and the second embedding vector to obtain a data fusion feature vector includes:
[0032] The first embedding vector and the second embedding vector are weighted and fused to obtain the first fused vector;
[0033] The first embedding vector and the second embedding vector are fused using mutual information feature selection to obtain a second fused vector.
[0034] The first and second embedding vectors are fused using correlation coefficient feature selection to obtain a third fused vector.
[0035] The first fusion vector, the second fusion vector, and the third fusion vector are transformed using a preset transformation function to obtain a data fusion feature vector.
[0036] Optionally, determining the target news text in the news text based on the semantic information vector and the data fusion feature vector includes:
[0037] Calculate the dot product between the data fusion feature vector and each of the semantic information vectors to obtain the recommendation score for each news text.
[0038] Among the recommended scores, a target recommended score greater than a preset threshold is determined, and the news text corresponding to the target recommended score is determined as the target news text to be recommended to the user.
[0039] According to a second aspect of the present invention, a news recommendation device is provided, comprising:
[0040] The acquisition unit is used to acquire news text, as well as feature data and behavioral data of the users to be recommended;
[0041] The prediction unit is used to input the news text into a preset semantic prediction model to perform semantic prediction and obtain the semantic information vector corresponding to the news text.
[0042] A fusion processing unit is used to perform data fusion processing on the feature data and the behavior data to generate a data fusion feature vector;
[0043] The determining unit is configured to determine the target news text in the news text based on the semantic information vector and the data fusion feature vector, and recommend the target news text to the user to be recommended.
[0044] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the above-described news recommendation method.
[0045] According to a fourth aspect of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described news recommendation method.
[0046] According to the news recommendation method, apparatus, storage medium, and computer equipment provided by the present invention, compared with the current method of randomly recommending hot news to users, the present invention obtains news text, as well as feature data and behavioral data corresponding to the user to be recommended; inputs the news text into a preset semantic prediction model for semantic prediction to obtain a semantic information vector corresponding to the news text; simultaneously, performs data fusion processing on the feature data and the behavioral data to generate a data fusion feature vector; finally, based on the semantic information vector and the data fusion feature vector, determines the target news text in the news text and recommends the target news text to the user to be recommended. Thus, by determining the semantic information vector corresponding to the news text, and simultaneously determining the data fusion feature vector corresponding to the user based on the user's feature data and behavioral data, the present invention recommends news of interest to the user based on the semantic information vector and the data fusion feature vector. In other words, by comprehensively analyzing the semantic information of the news and the user's feature data and behavioral data, and recommending news of interest to the user based on the analysis results, the accuracy of news recommendation can be improved, thereby enhancing the user experience. Attached Figure Description
[0047] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0048] Figure 1 A flowchart of a news recommendation method provided by an embodiment of the present invention is shown;
[0049] Figure 2 This invention provides a flowchart of another news recommendation method according to an embodiment of the invention.
[0050] Figure 3 This diagram illustrates the structure of a news recommendation device according to an embodiment of the present invention.
[0051] Figure 4 This diagram illustrates the structure of another news recommendation device provided in an embodiment of the present invention.
[0052] Figure 5 A schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation
[0053] The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the present application can be combined with each other.
[0054] Currently, the method of randomly recommending trending news to users results in users receiving news that is not of interest to them, leading to low accuracy in news recommendations and a reduced user experience.
[0055] To address the above problems, embodiments of the present invention provide a news recommendation method, such as... Figure 1 As shown, the method includes:
[0056] 101. Obtain the news text, as well as the feature data and behavioral data of the users to be recommended.
[0057] The news text includes medical news text, such as personal health record text, but can also be news text from other fields. The feature data includes the age, occupation, gender, income level, interests, family members, etc. of the user to be recommended. The behavioral data refers to the historical clicks of the user to be recommended on various news items.
[0058] In this embodiment of the invention, multiple news texts can first be retrieved from a database or webpage. Simultaneously, characteristic data such as the age, occupation, interests, and family members of the user to be recommended are obtained from the news management platform. Furthermore, the click history of the user on various news articles is determined; for example, if 10 news articles were recommended to the user over a period of time, it is determined whether the user clicked and read these 10 articles. Then, based on the semantic information of the news texts, the user's characteristic data, and behavioral data, news of interest to the user is recommended, which improves the accuracy of news recommendations and enhances the user experience. It should be noted that the user's characteristic data and behavioral data are data related to news recommendations stored in the news management platform, and are not the user's private data.
[0059] 102. Input the news text into the preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text.
[0060] After acquiring the news text, it is input into a preset semantic prediction model for semantic prediction. The preset semantic prediction model can output the semantic information vector of the news text. Then, news is recommended to the user based on the semantic information vector of the news text. In the process of recommending news to the user, by fully grasping the semantic information of the news, the recommendation can avoid the situation of blindly and randomly recommending news to the user, which would lead to recommendation errors. Therefore, the embodiments of the present invention can improve the accuracy of news recommendation and thus enhance the user experience.
[0061] 103. Perform data fusion processing on feature data and behavioral data to generate a data fusion feature vector.
[0062] In this embodiment of the invention, feature data and behavioral data belong to different dimensions of data. In order to fully explore the data information between behavioral data and feature data, it is necessary to fuse feature data and behavioral data to obtain a data fusion feature vector. Then, based on the data fusion feature vector and the semantic information vector of the news text, news of interest to users can be recommended. Thus, by comprehensively analyzing the user's features and behavior, as well as the news text, news recommendations can be made to the user, so that the recommended news is the behavior that the user is interested in, which can improve the accuracy of news recommendations and thus enhance the user's experience.
[0063] 104. Based on semantic information vectors and data fusion feature vectors, identify target news texts in news texts and recommend the target news texts to users to be recommended.
[0064] In this invention, the target news text is the news text that the user is interested in and wants to recommend. In this embodiment, the acquired news text is the news text that needs to be recommended to the user at this stage. There are multiple news texts, such as 100. First, the semantic information vectors of 100 news articles are determined. Simultaneously, the data fusion feature vector corresponding to the user's feature data and behavioral data is determined. Finally, based on the semantic information vectors and data fusion feature vectors of the 100 news articles, at least one target news text that the user is interested in is selected from the 100 news articles, and then recommended to the user. By comprehensively analyzing the semantic information of the news and the user's feature data and behavioral data, and recommending news that the user is interested in based on the analysis results, the accuracy of news recommendation can be improved, thereby enhancing the user experience.
[0065] According to the news recommendation method provided by this invention, compared with the current method of randomly recommending hot news to users, this invention obtains news text, as well as feature data and behavioral data corresponding to the user to be recommended; inputs the news text into a preset semantic prediction model for semantic prediction to obtain a semantic information vector corresponding to the news text; simultaneously, performs data fusion processing on the feature data and the behavioral data to generate a data fusion feature vector; finally, based on the semantic information vector and the data fusion feature vector, determines the target news text in the news text and recommends the target news text to the user to be recommended. Thus, by determining the semantic information vector corresponding to the news text, and simultaneously determining the data fusion feature vector corresponding to the user based on the user's feature data and behavioral data, news of interest to the user is recommended based on the semantic information vector and the data fusion feature vector. In other words, by comprehensively analyzing the semantic information of the news and the user's feature data and behavioral data, and recommending news of interest to the user based on the analysis results, the accuracy of news recommendation can be improved, thereby enhancing the user experience.
[0066] Furthermore, to better illustrate the above-described news recommendation process, as a refinement and extension of the above embodiments, this invention provides another news recommendation method, such as... Figure 2 As shown, the method includes:
[0067] 201. Obtain the news text, as well as the feature data and behavioral data of the users to be recommended.
[0068] Specifically, multiple news texts, as well as user feature data and behavioral data, can be obtained from the news management platform. Then, based on the semantic information vector of the news texts and the user's feature data and behavioral data, news that the user is interested in can be recommended.
[0069] 202. Identify each word segment contained in the news text and determine the word vector corresponding to each word segment.
[0070] 203. Identify the sentences contained in the news text and determine the sentence vector corresponding to each sentence.
[0071] 204. Determine the individual characters contained in the news text and the corresponding position vector for each character.
[0072] 205. Concatenate the word vectors, sentence vectors, and position vectors to obtain the concatenated feature vector corresponding to the news text.
[0073] Specifically, if the news text is: "Regularly eating vegetarian food is beneficial to physical health", after performing word segmentation on it, the respective word segments corresponding to the news text are: "regularly / eat / vegetarian food / is beneficial to / body / health". Subsequently, methods such as word embedding are used to determine the word vectors corresponding to each word segment. At the same time, if the news text is an article and contains multiple sentences, the sentence vectors corresponding to each sentence are determined. According to the context of each sentence, each sentence is encoded to obtain the sentence vector corresponding to each sentence, or each sentence is processed using a sentence embedding program to obtain the sentence vector corresponding to each sentence. At the same time, each character contained in the news text is determined, and according to the position information of each character in the news text, the position vector corresponding to each character is determined. For example, if the news text is "Regularly eating vegetarian food is beneficial to physical health", the position of the character "beneficial" in the news text is 6, and the position information of the character "health" in the news text is 11. In this way, the position information corresponding to each character in the news text can be determined. Subsequently, based on the position information, the position vector corresponding to each character is determined. Then, the word vectors, sentence vectors, and position vectors are horizontally concatenated to obtain the concatenated feature vector corresponding to the news text. Finally, based on the concatenated feature vector, the semantic information vector corresponding to the news text is determined. Thus, through the word vectors corresponding to each word in the news text, the sentence vectors corresponding to each sentence, and the position vectors corresponding to each character, the word features, sentence features, and position features in the news text can be fully analyzed during the process of semantic prediction, thereby improving the prediction accuracy of the semantic information vector of the news text and further improving the recommendation accuracy of the news.
[0074] 206. Input the concatenated feature vector into a preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text.
[0075] In this embodiment of the invention, to improve the prediction accuracy of the preset semantic prediction model, before predicting the semantic information of news text using the preset semantic prediction model, it is first necessary to train and construct the preset semantic prediction model. Based on this, the specific construction method includes: constructing a preset initial semantic prediction model and obtaining sample news text; determining the twin sample news text corresponding to the sample news text; determining each neuron included in the preset initial semantic prediction model, and determining a first eliminated neuron from each neuron using a first preset elimination probability value, and determining a second eliminated neuron from each neuron using a second preset elimination probability value; removing the first eliminated neuron from each neuron to obtain a preset initial semantic prediction model containing a first remaining neuron. The model is tested, and the sample news text is input into the preset initial semantic prediction model containing the first remaining neurons for semantic prediction to obtain the first predicted semantic vector corresponding to the sample news text; the second eliminated neurons are removed from each neuron to obtain the preset initial semantic prediction model containing the second remaining neurons, and the twin sample news text is input into the preset initial semantic prediction model containing the second remaining neurons for semantic prediction to obtain the second predicted semantic vector corresponding to the twin sample news text; based on the similarity between the first predicted semantic vector and the second predicted semantic vector, a loss function corresponding to the preset initial semantic prediction model is generated, and based on the loss function, the preset semantic prediction model is constructed.
[0076] Among them, the twin sample news text is a news sample obtained by copying the sample news text. The first preset elimination probability value is a value set according to actual needs, and the second preset elimination probability value is a value set according to actual needs.
[0077] Specifically, the preset initial semantic prediction model is composed of multiple neurons. During the training of the preset initial semantic prediction model, this embodiment of the invention can use the dropout mechanism to train the preset initial semantic prediction model. The specific training method is as follows: some neurons can be randomly disabled in each neuron according to the first preset elimination probability value. For example, if the first preset elimination probability value is 0.5 and the preset initial semantic prediction model contains 20 neurons, then 10 neurons are randomly disabled in the 20 neurons, and the remaining 10 neurons continue to work. At this time, the sample news text is input into the preset initial semantic prediction model containing 10 neurons for semantic prediction, and the first predicted semantic vector corresponding to the sample news text is obtained. Similarly, if the second preset elimination probability value is 0.4, and the preset initial semantic prediction model contains 20 neurons, then 8 neurons are randomly disabled from the 20 neurons, and the remaining 12 neurons continue to work. At this time, the twin sample news text is input into the preset initial semantic prediction model containing 12 neurons for semantic prediction, and the second predicted semantic vector corresponding to the twin sample news text is obtained. Then, the KL divergence loss function is used to measure the similarity between the first predicted semantic vector and the second predicted semantic vector, and the parameters in the preset initial semantic prediction model are continuously optimized according to the similarity, and finally the preset semantic prediction model with optimal parameters is obtained.
[0078] Furthermore, after constructing the preset semantic prediction model, it is necessary to use the preset semantic prediction model to predict the semantic information of the news text. Based on this, step 206 specifically includes: inputting the concatenated feature vector into each head attention layer for feature extraction to obtain the output vector of each head attention layer corresponding to the news text; multiplying the output vector of each head attention layer with the weight coefficients corresponding to each head attention layer and summing them to obtain the weighted feature vector corresponding to the news text; adding the weighted feature vector to the concatenated feature vector to obtain the intermediate feature vector corresponding to the news text; and inputting the intermediate feature vector into the feedforward neural network layer for feature extraction to obtain the semantic information vector corresponding to the news text.
[0079] The preset semantic prediction model is a preset natural language processing model (BERT model), which includes a multi-head attention layer and a feedforward neural network layer.
[0080] Specifically, different attention layers correspond to different weights. By randomly initializing the preset word language processing model, the weights under different attention layers can be obtained. Specifically, the concatenated feature vector is input into different attention layers to obtain the attention layer output vectors of the concatenated feature vector under different attention layers. The attention layer output vectors under different attention layers are multiplied and summed with the weights under different attention layers to obtain the weighted feature vector. Then, the weighted feature vector is added to the residual of the concatenated feature vector to obtain the intermediate feature vector. The intermediate feature vector is then input into the feedforward neural network layer to obtain the semantic information vector output by the feedforward neural network layer.
[0081] 207. Perform data fusion processing on feature data and behavioral data to create a data fusion feature vector.
[0082] In this embodiment of the invention, user feature data and behavior data belong to different dimensions of data. In order to obtain more information hidden in the feature data and behavior data, it is necessary to fuse the feature data and behavior data. Based on this, the steps specifically include: determining a first embedding vector corresponding to the feature data and determining a second embedding vector corresponding to the behavior data; fusing the first embedding vector and the second embedding vector to obtain a data fusion feature vector. Specifically, the process of fusing the first embedding vector and the second embedding vector includes: performing weighted fusion on the first embedding vector and the second embedding vector to obtain a first fusion vector; performing mutual information feature selection fusion on the first embedding vector and the second embedding vector to obtain a second fusion vector; performing correlation coefficient feature selection fusion on the first embedding vector and the second embedding vector to obtain a third fusion vector; and transforming the first fusion vector, the second fusion vector, and the third fusion vector using a preset transformation function to obtain a data fusion feature vector.
[0083] Specifically, firstly, the first characters contained in the feature data are determined. Then, word embedding methods such as Word2Vec are used to convert each character in the feature data into a first embedding vector. Similarly, the second characters contained in the behavior data are determined, and word embedding methods such as Word2Vec are used to convert each character in the behavior data into a second embedding vector. Then, the first and second embedding vectors are weighted and averaged to obtain a first fusion vector. The weights are set according to the importance of different dimensions. For example, in personal health information text, the user's feature data is more important than the user's behavior data; therefore, a higher weight can be assigned to the first embedding vector corresponding to the user's feature data. Simultaneously, feature vectors of different dimensions are selected based on the importance of the features. Specifically, the mutual information algorithm can be used to select the importance of features. The mutual information feature selection fusion algorithm is a filtering selection algorithm. This is a measure of the interdependence between features, specifically the relevance of the first and second embedding vectors to the news text. Based on this relevance, the first and second embedding vectors are selected to identify the feature vector with the strongest relevance to the news text recommendation, which is then used as the second fusion vector. Simultaneously, a correlation coefficient feature selection fusion process is applied to the first and second embedding vectors to obtain the third fusion vector. This process involves first determining the first correlation coefficient between the first embedding vector and the news recommendation result, and then determining the second correlation coefficient between the second embedding vector and the news recommendation result. Finally, the feature vector corresponding to the largest correlation coefficient is selected as the third fusion vector. A preset transformation function is then used to transform the first, second, and third fusion vectors to obtain the data fusion feature vector. This preset function can be set according to actual conditions; this embodiment does not impose any restrictions. This implementation example can fully utilize the relationships between data, extract more latent features, and simultaneously handle both high-order and low-order processing, making data utilization more efficient and the subsequent prediction results more accurate, meeting the needs of practical application scenarios.
[0084] 208. Based on semantic information vectors and data fusion feature vectors, identify target news texts in news texts and recommend the target news texts to users to be recommended.
[0085] In this embodiment of the invention, after determining the semantic information vector corresponding to the news text, and the data fusion feature vector corresponding to the user's feature data and behavioral data, it is necessary to recommend news of interest to the user based on the semantic information vector and the data fusion feature vector. Specifically, the steps include: calculating the dot product between the data fusion feature vector and each of the semantic information vectors to obtain a recommendation score for each news text; determining a target recommendation score greater than a preset threshold among the recommendation scores, and identifying the news text corresponding to the target recommendation score as the target news text to be recommended to the user.
[0086] The preset threshold is a value set according to actual needs. Specifically, if there are 3 news texts, the inner product between the semantic information vector and the data fusion feature vector corresponding to each of the 3 news texts is calculated. This yields a recommendation score of 30 for the first news text, 45 for the second, and 56 for the third. The preset threshold is 40. Therefore, the second and third news texts are ultimately recommended to the user. By comprehensively analyzing the semantic information of the news and the user's feature and behavioral data, and recommending news of interest to the user based on the analysis results, the accuracy of news recommendations can be improved, thereby enhancing the user experience.
[0087] According to another news recommendation method, apparatus, storage medium, and computer device provided by the present invention, compared with the current method of randomly recommending hot news to users, the present invention obtains news text, as well as feature data and behavioral data corresponding to the user to be recommended; inputs the news text into a preset semantic prediction model for semantic prediction to obtain a semantic information vector corresponding to the news text; simultaneously, performs data fusion processing on the feature data and the behavioral data to generate a data fusion feature vector; finally, based on the semantic information vector and the data fusion feature vector, determines the target news text in the news text and recommends the target news text to the user to be recommended. Thus, by determining the semantic information vector corresponding to the news text, and simultaneously determining the data fusion feature vector corresponding to the user based on the user's feature data and behavioral data, the present invention recommends news of interest to the user based on the semantic information vector and the data fusion feature vector. In other words, by comprehensively analyzing the semantic information of the news and the user's feature data and behavioral data, and recommending news of interest to the user based on the analysis results, the accuracy of news recommendation can be improved, thereby enhancing the user experience.
[0088] Furthermore, as Figure 1 In specific implementation, embodiments of the present invention provide a news recommendation device, such as... Figure 3As shown, the device includes: an acquisition unit 31, a prediction unit 32, a fusion processing unit 33, and a determination unit 34.
[0089] The acquisition unit 31 can be used to acquire news text, as well as feature data and behavioral data corresponding to the user to be recommended.
[0090] The prediction unit 32 can be used to input the news text into a preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text.
[0091] The fusion processing unit 33 can be used to perform data fusion processing on the feature data and the behavior data to generate a data fusion feature vector.
[0092] The determining unit 34 can be used to determine the target news text in the news text based on the semantic information vector and the data fusion feature vector, and recommend the target news text to the user to be recommended.
[0093] In specific application scenarios, in order to construct a pre-defined semantic prediction model, such as Figure 4 As shown, the device also includes a construction unit 35.
[0094] The construction unit 35 can be used to construct a preset initial semantic prediction model and obtain sample news text.
[0095] The determining unit 34 can also be used to determine the twin sample news text corresponding to the sample news text.
[0096] The determining unit 34 can also be used to determine each neuron included in the preset initial semantic prediction model, and to determine the first eliminated neuron among the neurons with a first preset elimination probability value, and to determine the second eliminated neuron among the neurons with a second preset elimination probability value.
[0097] The prediction unit 32 can also be used to remove the first eliminated neuron from each neuron to obtain a preset initial semantic prediction model containing the first remaining neuron, and input the sample news text into the preset initial semantic prediction model containing the first remaining neuron for semantic prediction to obtain the first predicted semantic vector corresponding to the sample news text.
[0098] The prediction unit 32 can also be used to remove the second eliminated neuron from each neuron to obtain a preset initial semantic prediction model containing the second remaining neuron, and input the twin sample news text into the preset initial semantic prediction model containing the second remaining neuron for semantic prediction to obtain the second predicted semantic vector corresponding to the twin sample news text.
[0099] The construction unit 35 can be specifically used to generate a loss function corresponding to the preset initial semantic prediction model based on the similarity between the first predicted semantic vector and the second predicted semantic vector, and to construct the preset semantic prediction model based on the loss function.
[0100] In specific application scenarios, in order to determine the semantic information vector corresponding to the news text, the prediction unit 32 includes a first determination module 321, a splicing module 322, and a prediction module 323.
[0101] The first determining module 321 can be used to determine each word segment contained in the news text and to determine the word vector corresponding to each word segment.
[0102] The first determining module 321 can also be used to determine each sentence contained in the news text and to determine the sentence vector corresponding to each sentence.
[0103] The first determining module 321 can also be used to determine each character contained in the news text and determine the position vector corresponding to each character.
[0104] The splicing module 322 can be used to splice the word vector, the sentence vector and the position vector to obtain the spliced feature vector corresponding to the news text.
[0105] The prediction module 323 can be used to input the spliced feature vector into the preset semantic prediction model to perform semantic prediction and obtain the semantic information vector corresponding to the news text.
[0106] In a specific application scenario, in order to predict the semantic information vector of a news text, the prediction module 323 can be used to input the concatenated feature vector into each head attention layer for feature extraction, thereby obtaining the output vector of each head attention layer corresponding to the news text; multiply the output vector of each head attention layer with the weight coefficients corresponding to each head attention layer and sum them to obtain the weighted feature vector corresponding to the news text; add the weighted feature vector to the concatenated feature vector to obtain the intermediate feature vector corresponding to the news text; and input the intermediate feature vector into the feedforward neural network layer for feature extraction to obtain the semantic information vector corresponding to the news text.
[0107] In specific application scenarios, in order to generate data fusion feature vectors, the fusion processing unit 33 includes a second determining module 331 and a fusion processing module 332.
[0108] The second determining module 331 can be used to determine the first embedding vector corresponding to the feature data and the second embedding vector corresponding to the behavior data.
[0109] The fusion processing module 332 can be used to fuse the first embedding vector and the second embedding vector to obtain a data fusion feature vector.
[0110] In specific application scenarios, in order to obtain the data fusion feature vector, the fusion processing module 332 can be used to perform weighted fusion of the first embedding vector and the second embedding vector to obtain a first fusion vector; perform mutual information feature selection fusion of the first embedding vector and the second embedding vector to obtain a second fusion vector; perform correlation coefficient feature selection fusion of the first embedding vector and the second embedding vector to obtain a third fusion vector; and use a preset transformation function to transform the first fusion vector, the second fusion vector, and the third fusion vector to obtain the data fusion feature vector.
[0111] In specific application scenarios, in order to determine the target news text to recommend to the user, the determining unit 34 includes a calculation module 341 and a recommendation module 342.
[0112] The calculation module 341 can be used to calculate the inner product between the data fusion feature vector and each of the semantic information vectors to obtain the recommendation score corresponding to each news text.
[0113] The recommendation module 342 can be used to determine a target recommendation score that is greater than a preset threshold among the various recommendation scores, and to determine the news text corresponding to the target recommendation score as the target news text to be recommended to the user.
[0114] It should be noted that other corresponding descriptions of the various functional modules involved in the news recommendation device provided in this embodiment of the invention can be found in [reference]. Figure 1 The corresponding description of the method shown will not be repeated here.
[0115] Based on the above, Figure 1Accordingly, this embodiment of the invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the following steps: acquiring news text, and feature data and behavioral data corresponding to the user to be recommended; inputting the news text into a preset semantic prediction model for semantic prediction to obtain a semantic information vector corresponding to the news text; performing data fusion processing on the feature data and the behavioral data to generate a data fusion feature vector; determining a target news text in the news text based on the semantic information vector and the data fusion feature vector, and recommending the target news text to the user to be recommended.
[0116] Based on the above, Figure 1 The method shown and as Figure 3 The embodiment of the device shown in the invention also provides a physical structure diagram of a computer device, such as... Figure 5 As shown, the computer device includes: a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor. Both the memory 42 and the processor 41 are mounted on a bus 43. When the processor 41 executes the program, it performs the following steps: acquiring news text, and feature data and behavioral data corresponding to the user to be recommended; inputting the news text into a preset semantic prediction model for semantic prediction to obtain a semantic information vector corresponding to the news text; performing data fusion processing on the feature data and the behavioral data to generate a data fusion feature vector; based on the semantic information vector and the data fusion feature vector, determining a target news text in the news text, and recommending the target news text to the user to be recommended.
[0117] Through the technical solution of this invention, the invention acquires news text, as well as feature data and behavioral data corresponding to the user to be recommended; inputs the news text into a preset semantic prediction model for semantic prediction to obtain a semantic information vector corresponding to the news text; simultaneously, performs data fusion processing on the feature data and the behavioral data to generate a data fusion feature vector; finally, based on the semantic information vector and the data fusion feature vector, determines the target news text in the news text and recommends the target news text to the user to be recommended. Thus, by determining the semantic information vector corresponding to the news text, and simultaneously determining the data fusion feature vector corresponding to the user based on the user's feature data and behavioral data, the invention recommends news of interest to the user based on the semantic information vector and the data fusion feature vector. In other words, by comprehensively analyzing the semantic information of the news and the user's feature data and behavioral data, and recommending news of interest to the user based on the analysis results, the accuracy of news recommendation can be improved, thereby enhancing the user experience.
[0118] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0119] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A news recommendation method, characterized in that, include: Obtain the news text, as well as the feature data and behavioral data of the users to be recommended; The news text is input into a preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text. The process involves determining a first embedding vector corresponding to the feature data and a second embedding vector corresponding to the behavior data; performing weighted fusion on the first and second embedding vectors to obtain a first fusion vector; performing mutual information feature selection fusion on the first and second embedding vectors to obtain a second fusion vector; performing correlation coefficient feature selection fusion on the first and second embedding vectors to obtain a third fusion vector; and using a preset transformation function to transform the first, second, and third fusion vectors to obtain a data fusion feature vector. Based on the semantic information vector and the data fusion feature vector, a target news text is determined in the news text, and the target news text is recommended to the user to be recommended.
2. The method according to claim 1, characterized in that, Before inputting the news text into a preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text, the method further includes: Construct a pre-defined initial semantic prediction model and obtain sample news texts; Determine the twin sample news text corresponding to the sample news text; The preset initial semantic prediction model is defined, and a first eliminated neuron is determined from among the neurons with a first preset elimination probability value, and a second eliminated neuron is determined from among the neurons with a second preset elimination probability value. The first eliminated neuron is removed from each neuron to obtain a preset initial semantic prediction model containing the first remaining neuron. The sample news text is then input into the preset initial semantic prediction model containing the first remaining neuron for semantic prediction to obtain the first predicted semantic vector corresponding to the sample news text. The second eliminated neuron is removed from each of the neurons to obtain a preset initial semantic prediction model containing the second remaining neurons. The twin sample news text is then input into the preset initial semantic prediction model containing the second remaining neurons for semantic prediction to obtain the second predicted semantic vector corresponding to the twin sample news text. Based on the similarity between the first predicted semantic vector and the second predicted semantic vector, a loss function corresponding to the preset initial semantic prediction model is generated, and the preset semantic prediction model is constructed based on the loss function.
3. The method according to claim 1, characterized in that, The step of inputting the news text into a preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text includes: Identify each word segment contained in the news text, and determine the word vector corresponding to each word segment; Identify each sentence contained in the news text, and determine the sentence vector corresponding to each sentence; Identify each character contained in the news text and determine the position vector corresponding to each character; The word vectors, sentence vectors, and position vectors are concatenated to obtain the concatenated feature vector corresponding to the news text. The concatenated feature vector is input into the preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text.
4. The method according to claim 3, characterized in that, The preset semantic prediction model is a preset natural language processing model, which includes a multi-head attention layer and a feedforward neural network layer. The step of inputting the concatenated feature vector into the preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text includes: The concatenated feature vectors are input into each head attention layer for feature extraction to obtain the output vectors of each head attention layer corresponding to the news text. Multiply the output vector of each head attention layer by the weight coefficients corresponding to each head attention layer and sum them to obtain the weighted feature vector corresponding to the news text; The weighted feature vector is added to the concatenated feature vector to obtain the intermediate feature vector corresponding to the news text; The intermediate feature vector is input into the feedforward neural network layer for feature extraction to obtain the semantic information vector corresponding to the news text.
5. The method according to claim 1, characterized in that, The step of determining the target news text in the news text based on the semantic information vector and the data fusion feature vector includes: Calculate the dot product between the data fusion feature vector and each of the semantic information vectors to obtain the recommendation score for each news text. Among the recommended scores, a target recommended score greater than a preset threshold is determined, and the news text corresponding to the target recommended score is determined as the target news text to be recommended to the user.
6. A news recommendation device, characterized in that, include: The acquisition unit is used to acquire news text, as well as feature data and behavioral data of the users to be recommended; The prediction unit is used to input the news text into a preset semantic prediction model to perform semantic prediction and obtain the semantic information vector corresponding to the news text. The fusion processing unit is configured to: determine a first embedding vector corresponding to the feature data and a second embedding vector corresponding to the behavior data; perform weighted fusion on the first embedding vector and the second embedding vector to obtain a first fusion vector; perform mutual information feature selection fusion on the first embedding vector and the second embedding vector to obtain a second fusion vector; perform correlation coefficient feature selection fusion on the first embedding vector and the second embedding vector to obtain a third fusion vector; and perform transformation processing on the first fusion vector, the second fusion vector, and the third fusion vector using a preset transformation function to obtain a data fusion feature vector. The determining unit is configured to determine the target news text in the news text based on the semantic information vector and the data fusion feature vector, and recommend the target news text to the user to be recommended.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Text recommendation method, intelligent terminal and computer readable storage medium
CN113536785A
News text and comment correlation analysis method based on comparative learning
CN115146629A
Collaborative filtering recommendation method based on attribute knowledge introduction
CN115203580A