CN116932898A - News recommendation method and device, storage medium and computer equipment - Google Patents

News recommendation method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN116932898A
CN116932898A CN202310872582.1A CN202310872582A CN116932898A CN 116932898 A CN116932898 A CN 116932898A CN 202310872582 A CN202310872582 A CN 202310872582A CN 116932898 A CN116932898 A CN 116932898A
Authority
CN
China
Prior art keywords
vector
news
news text
semantic
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310872582.1A
Other languages
Chinese (zh)
Inventor
陈浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202310872582.1A priority Critical patent/CN116932898A/en
Publication of CN116932898A publication Critical patent/CN116932898A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a news recommending method, a device, a storage medium and computer equipment, relates to the technical field of information and digital medical treatment, and mainly aims to improve the recommending accuracy of news and the experience of a user. The method comprises the following steps: acquiring news texts, and feature data and behavior data corresponding to users to be recommended; inputting the news text into a preset semantic prediction model to perform semantic prediction to obtain a semantic information vector corresponding to the news text; performing data fusion processing on the characteristic data and the behavior data to generate a data fusion characteristic vector; and 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.

Description

News recommendation method and device, storage medium and computer equipment
Technical Field
The present invention relates to the field of information technology and the field of digital medical technology, and in particular, to a news recommending method, a news recommending device, a storage medium, and a computer device.
Background
With the rapid development of self-media, a large amount of news, for example, news about personal health information, is produced every day, and news recommendation is required to the user in order to increase the reading amount of news while allowing the user to see the news information.
Currently, users are typically randomly recommended by hot news. However, this random recommendation approach results in the received news not being the news of interest to the user, resulting in lower accuracy of the news recommendation, while also reducing the user's experience.
Disclosure of Invention
The invention provides a news recommending method, a news recommending device, a storage medium and computer equipment, which mainly aim to improve the recommending accuracy of news and the experience of users.
According to a first aspect of the present invention, there is provided a news recommending method, comprising:
acquiring news texts, and feature data and behavior data corresponding to users to be recommended;
inputting the news text into a preset semantic prediction model to perform semantic prediction to obtain a semantic information vector corresponding to the news text;
performing data fusion processing on the characteristic data and the behavior data to generate a data fusion characteristic vector;
And 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.
Optionally, before the inputting the news text into a preset semantic prediction model to perform semantic prediction to obtain the semantic information vector corresponding to the news text, the method further includes:
constructing a preset initial semantic prediction model, and acquiring a sample news text;
determining a twin sample news text corresponding to the sample news text;
determining each neuron contained in the preset initial semantic prediction model, determining a first eliminated neuron in each neuron according to a first preset elimination probability value, and determining a second eliminated neuron in each neuron according to a second preset elimination probability value;
removing the first elimination neurons from the neurons to obtain a preset initial semantic prediction model containing first residual neurons, and inputting the sample news text into the preset initial semantic prediction model containing the first residual neurons to perform semantic prediction to obtain a first prediction semantic vector corresponding to the sample news text;
Removing the second elimination neurons from the neurons to obtain a preset initial semantic prediction model containing second residual neurons, and inputting the twin sample news text into the preset initial semantic prediction model containing the second residual neurons to perform semantic prediction to obtain a second prediction semantic vector corresponding to the twin sample news text;
and generating a loss function corresponding to the preset initial semantic prediction model based on the similarity between the first prediction semantic vector and the second prediction semantic vector, and constructing the preset semantic prediction model based on the loss function.
Optionally, inputting the news text into a preset semantic prediction model to perform semantic prediction, to obtain a semantic information vector corresponding to the news text, including:
determining each word segmentation contained in the news text, and determining word vectors corresponding to each word segmentation;
determining each sentence contained in the news text, and determining a sentence vector corresponding to each sentence;
determining each character contained in the news text, and determining a position vector corresponding to each character;
Splicing the word vector, the sentence vector and the position vector to obtain a spliced feature vector corresponding to the news text;
inputting the spliced feature vector into the preset semantic prediction model to perform semantic prediction, and obtaining a semantic information vector corresponding to the news text.
Optionally, the preset semantic prediction model is a preset natural language processing model, the preset natural language processing model includes a multi-head attention layer and a feedforward neural network layer, the spliced feature vector is input into the preset semantic prediction model to perform semantic prediction, so as to obtain a semantic information vector corresponding to the news text, and the method includes:
respectively inputting the spliced feature vectors to each attention layer for feature extraction to obtain output vectors of each attention layer corresponding to the news text;
multiplying the output vector of each attention layer with the weight coefficient corresponding to each attention layer and summing to obtain a weight weighting feature vector corresponding to the news text;
adding the weight weighted feature vector and the spliced feature vector to obtain an intermediate feature vector corresponding to the news text;
And inputting the intermediate feature vector into the feedforward neural network layer to perform feature extraction, and obtaining a semantic information vector corresponding to the news text.
Optionally, the performing data fusion processing on the feature data and the behavior data to generate a data fusion feature vector includes:
determining a first embedded vector corresponding to the characteristic data and determining a second embedded vector corresponding to the behavior data;
and carrying out fusion processing on the first embedded vector and the second embedded vector to obtain a data fusion characteristic vector.
Optionally, the fusing processing is performed on the first embedded vector and the second embedded vector to obtain a data fusion feature vector, which includes:
carrying out weighted fusion on the first embedded vector and the second embedded vector to obtain a first fusion vector;
performing mutual information feature selection fusion on the first embedded vector and the second embedded vector to obtain a second fusion vector;
performing correlation coefficient feature selection fusion on the first embedded vector and the second embedded vector to obtain a third fusion vector;
and transforming the first fusion vector, the second fusion vector and the third fusion vector by using a preset transformation function to obtain a data fusion feature vector.
Optionally, the determining, based on the semantic information vector and the data fusion feature vector, a target news text in the news text includes:
calculating the vector inner product between the data fusion feature vector and each semantic information vector to obtain a recommendation score corresponding to each news text;
and determining a target recommendation score greater than a preset threshold value in the recommendation scores, and determining a news text corresponding to the target recommendation score as a target news text recommended to the user to be recommended.
According to a second aspect of the present invention, there is provided a news recommender comprising:
the acquisition unit is used for acquiring the news text, and the feature data and the behavior data corresponding to the user to be recommended;
the prediction unit is used for inputting the news text into a preset semantic prediction model to carry out semantic prediction, so as to obtain a semantic information vector corresponding to the news text;
the fusion processing unit is used for carrying out data fusion processing on the characteristic data and the behavior data to generate a data fusion characteristic vector;
and the determining unit is used for determining a target news text in the news texts based on the semantic information vector and the data fusion feature vector, and recommending the target news text to the user to be recommended.
According to a third aspect of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above news recommendation method.
According to a fourth aspect of the present invention there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above news recommendation method when executing the program.
According to the news recommending method, the device, the storage medium and the computer equipment, compared with the mode of randomly recommending hot news to users at present, the news recommending method, the device and the computer equipment have the advantages that news texts, feature data and behavior data corresponding to users to be recommended are obtained; inputting the news text into a preset semantic prediction model for semantic prediction to obtain a semantic information vector corresponding to the news text; meanwhile, carrying out data fusion processing on the characteristic data and the behavior data to generate a data fusion characteristic vector; and finally, determining a target news text in the news text based on the semantic information vector and the data fusion feature vector, recommending the target news text to the user to be recommended, and simultaneously determining the data fusion feature vector corresponding to the user according to the feature data and the behavior data of the user by determining the semantic information vector corresponding to the news text, and finally recommending the news of interest to the user according to the semantic information vector and the data fusion feature vector, namely comprehensively analyzing the semantic information of the news and the feature data and the behavior data of the user, recommending the news of interest to the user according to the analysis result, so that the recommending accuracy of the news can be improved, and the experience of the user can be improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 shows a flow chart of a news recommending method provided by an embodiment of the application;
FIG. 2 is a flowchart of another news recommendation method provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of a news recommending device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another news recommending device according to an embodiment of the present application;
fig. 5 shows a schematic physical structure of a computer device according to an embodiment of the present application.
Detailed Description
The application will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other.
At present, by randomly recommending hot news to a user, news received by the user is not interesting news, so that the recommending accuracy of the news is low, and the experience of the user is reduced.
In order to solve the above problem, an embodiment of the present invention provides a news recommendation method, as shown in fig. 1, including:
101. and acquiring news texts, and feature data and behavior data corresponding to the users to be recommended.
The news texts include medical field news texts, such as personal health archive texts, and also can be other field news texts, and the feature data includes data of ages, professions, sexes, income levels, hobbies, family members and the like of users to be recommended, and the behavior data refers to historical click conditions of the users to be recommended on various news.
For the embodiment of the invention, a plurality of news texts can be acquired in a database or a webpage, at the same time, characteristic data such as age, occupation, interests, family members and the like of a user to be recommended are acquired in a news management platform, and meanwhile, click conditions of the user to be recommended on various news are acquired and determined, for example, 10 news are recommended to the user in total in a past period of time, whether the user clicks for reading the 10 news is determined, and then interested news is recommended to the user according to semantic information of the news texts, the characteristic data and behavior data of the user, so that the recommendation accuracy of the news can be improved, and the experience of the user can be improved. The feature data and behavior data of the user are data related to news recommendation stored in the news management platform, and are not privacy data of the user.
102. Inputting the news text into a preset semantic prediction model to perform semantic prediction, and obtaining a semantic information vector corresponding to the news text.
After the news text is obtained, the news text is input into a preset semantic prediction model to carry out semantic prediction, semantic information vectors of the news text can be output through the preset semantic prediction model, then news recommendation is carried out on a user according to the semantic information vectors of the news text, and in the process of recommending news to the user, news recommendation is carried out by completely mastering the semantic information of the news, so that the situation of recommendation errors caused by directly and blindly randomly recommending the news to the user can be avoided, and the recommendation accuracy of the news can be improved, and the experience of the user can be further improved.
103. And carrying out data fusion processing on the characteristic data and the behavior data to generate a data fusion characteristic vector.
For the embodiment of the invention, the feature data and the behavior data belong to different dimension data, in order to fully discover the data information between the behavior data and the feature data, fusion processing is needed to be carried out on the feature data and the behavior data to obtain the data fusion feature vector, and then interested news recommendation is carried out on a user according to the semantic information vector of the data fusion feature vector and the news text, so that the news recommendation is carried out on the user through comprehensively analyzing the features and the behaviors of the user and the news text, the recommended news is the interested behavior of the user, namely, the recommendation accuracy of the news can be improved, and the experience of the user can be further improved.
104. And 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.
The target news text is a news text which is interested by the user to be recommended. For the embodiment of the invention, the acquired news texts are news texts which need to be recommended to the user at the present stage, the number of the news texts is more than 100, namely, the semantic information vectors of 100 news are firstly determined, meanwhile, the data fusion and feature vectors which correspond to the feature data and the behavior data of the user together are determined, at least one target news text which is interested by the user is finally selected from 100 news according to the semantic information vectors and the data fusion feature vectors of the 100 news texts, and the target news text is finally recommended to the user, so that the news which is interested by the news is recommended to the user through comprehensively analyzing the semantic information of the news and the feature data and the behavior data of the user according to the analysis result, the recommendation accuracy of the news can be improved, and the experience sense of the user can be further improved.
According to the news recommending method provided by the invention, compared with the current mode of randomly recommending hot news to users, the news recommending method provided by the invention is characterized in that news texts, and feature data and behavior data corresponding to users to be recommended are obtained; inputting the news text into a preset semantic prediction model for semantic prediction to obtain a semantic information vector corresponding to the news text; meanwhile, carrying out data fusion processing on the characteristic data and the behavior data to generate a data fusion characteristic vector; and finally, determining a target news text in the news text based on the semantic information vector and the data fusion feature vector, recommending the target news text to the user to be recommended, and simultaneously determining the data fusion feature vector corresponding to the user according to the feature data and the behavior data of the user by determining the semantic information vector corresponding to the news text, and finally recommending the news of interest to the user according to the semantic information vector and the data fusion feature vector, namely comprehensively analyzing the semantic information of the news and the feature data and the behavior data of the user, recommending the news of interest to the user according to the analysis result, so that the recommending accuracy of the news can be improved, and the experience of the user can be improved.
Further, in order to better illustrate the above process of recommending news, as a refinement and expansion of the above embodiment, another news recommending method is provided in the embodiment of the present invention, as shown in fig. 2, where the method includes:
201. and acquiring news texts, and feature data and behavior data corresponding to the users to be recommended.
Specifically, a plurality of news texts, as well as feature data and behavior data of the user, may be acquired in the news management platform, and then news of interest to the user is recommended to the user according to semantic information vectors of the news texts, the feature data and the behavior data of the user.
202. And determining each word segmentation contained in the news text, and determining word vectors corresponding to each word segmentation.
203. And determining each sentence contained in the news text, and determining a sentence vector corresponding to each sentence.
204. And determining each character contained in the news text, and determining a position vector corresponding to each character.
205. And splicing the word vector, the sentence vector and the position vector to obtain a spliced feature vector corresponding to the news text.
Specifically, if the news text is: the regular eating element is beneficial to physical health, and word segmentation processing is carried out on the regular eating element, so that each word segmentation corresponding to the news text is obtained by: "often/eat/plain/help/physical/health", then determining word vectors corresponding to each word segment by using word embedding and other methods, meanwhile, if the news text is an article, the article contains a plurality of sentences, sentence vectors corresponding to the sentences are determined, and according to the context of the sentences, encoding each sentence to obtain sentence vector corresponding to each sentence, or processing each sentence by using sentence embedding program to obtain sentence vector corresponding to each sentence, meanwhile, each character contained in the news text is determined, and a position vector corresponding to each character is determined according to the position information of each character in the news text, for example, if the news text is "frequently eaten to be beneficial to physical health", the character "help" has a position of 6 in the news text, the character has a position information of 11 in the news text, according to the method, the position information corresponding to each character in the news text can be determined, then the position vector corresponding to each character is determined according to the position information, then word vectors, sentence vectors and the position vectors are transversely spliced to obtain splice feature vectors corresponding to the news text, finally the semantic information vectors corresponding to the news text are determined according to the splice feature vectors, therefore, word characteristics, sentence characteristics and position characteristics in the news text can be fully analyzed in the process of semantic prediction through word vectors corresponding to all words in the news text, sentence vectors corresponding to all sentences and position vectors corresponding to all characters, therefore, the prediction accuracy of the semantic information vector of the news text can be improved, and the recommendation accuracy of news can be improved.
206. Inputting the spliced feature vectors into a preset semantic prediction model to perform semantic prediction, and obtaining semantic information vectors corresponding to the news text.
For the embodiment of the invention, in order to improve the prediction precision of the preset semantic prediction model, before predicting the semantic information of the news text by using the preset semantic prediction model, the preset semantic prediction model needs to be trained and constructed, and based on the preset semantic prediction model, the specific construction method comprises the following steps: constructing a preset initial semantic prediction model, and acquiring a sample news text; determining a twin sample news text corresponding to the sample news text; determining each neuron contained in the preset initial semantic prediction model, determining a first eliminated neuron in each neuron according to a first preset elimination probability value, and determining a second eliminated neuron in each neuron according to a second preset elimination probability value; removing the first elimination neurons from the neurons to obtain a preset initial semantic prediction model containing first residual neurons, and inputting the sample news text into the preset initial semantic prediction model containing the first residual neurons to perform semantic prediction to obtain a first prediction semantic vector corresponding to the sample news text; removing the second elimination neurons from the neurons to obtain a preset initial semantic prediction model containing second residual neurons, and inputting the twin sample news text into the preset initial semantic prediction model containing the second residual neurons to perform semantic prediction to obtain a second prediction semantic vector corresponding to the twin sample news text; and generating a loss function corresponding to the preset initial semantic prediction model based on the similarity between the first prediction semantic vector and the second prediction semantic vector, and constructing the preset semantic prediction model based on the loss function.
The twin sample news text is a news sample obtained after the sample news text is copied, the first preset elimination probability value is a numerical value set according to actual requirements, and the second preset elimination probability value is a numerical value set according to the actual requirements.
Specifically, the preset initial semantic prediction model is composed of a plurality of neurons, in the process of training the preset initial semantic prediction model, a dropout mechanism can be adopted to train the preset initial semantic prediction model, and the specific training method is that certain neurons can be randomly forbidden in the neurons according to a first preset elimination probability value, for example, if the first preset elimination probability value is 0.5, 20 neurons are included in the preset initial semantic prediction model, 10 neurons are randomly forbidden in the 20 neurons, the rest 10 neurons continue to work, and at the moment, a sample news text is input into the preset initial semantic prediction model including the 10 neurons for semantic prediction, so that a first prediction semantic vector corresponding to the sample news text is obtained. Similarly, if the second preset elimination probability value is 0.4, if 20 neurons are included in the preset initial semantic prediction model, 8 neurons are disabled randomly in the 20 neurons, and the rest 12 neurons continue to work, at the moment, the twin sample news text is input into the preset initial semantic prediction model including 12 neurons for semantic prediction, a second prediction semantic vector corresponding to the twin sample news text is obtained, then the KL divergence loss function is used for measuring the similarity between the first prediction semantic vector and the second prediction semantic vector, and parameters in the preset initial semantic prediction model are continuously optimized according to the similarity, so that the preset semantic prediction model with optimal parameters is finally obtained.
Further, after the preset semantic prediction model is built, the semantic information of the news text needs to be predicted by using the preset semantic prediction model, based on which, step 206 specifically includes: respectively inputting the spliced feature vectors to each attention layer for feature extraction to obtain output vectors of each attention layer corresponding to the news text; multiplying the output vector of each attention layer with the weight coefficient corresponding to each attention layer and summing to obtain a weight weighting feature vector corresponding to the news text; adding the weight weighted feature vector and the spliced feature vector to obtain an intermediate feature vector corresponding to the news text; and inputting the intermediate feature vector into the feedforward neural network layer to perform feature extraction, and obtaining a semantic information vector corresponding to the news text.
The preset semantic prediction model is a preset natural language processing model (bert model), and the preset natural language processing model comprises a multi-head attention layer and a feedforward neural network layer.
Specifically, weights under different attention layers can be obtained by randomly initializing a preset word eye language processing model, specifically, spliced feature vectors are input into the different attention layers to obtain attention layer output vectors of the spliced feature vectors under the different attention layers, the attention layer output vectors under the different attention layers and the weights under the different attention layers are multiplied and summed to obtain weight weighted feature vectors, then the weight weighted feature vectors and the spliced feature vector residual are summed to obtain intermediate feature vectors, and the intermediate feature vectors are input into a feedforward neural network layer to obtain semantic information vectors output by the feedforward neural network layer.
207. And carrying out data fusion processing on the characteristic data and the behavior data, and fusing the characteristic vectors.
For the embodiment of the invention, the characteristic data and the behavior data of the user belong to data with different dimensions, and in order to acquire more information hidden in the characteristic data and the behavior data, fusion processing is required to be carried out on the characteristic data and the behavior data, and based on the fusion processing, the steps specifically comprise: determining a first embedded vector corresponding to the characteristic data and determining a second embedded vector corresponding to the behavior data; and carrying out fusion processing on the first embedded vector and the second embedded vector to obtain a data fusion characteristic vector. The process of fusing the first embedded vector and the second embedded vector specifically comprises the following steps: carrying out weighted fusion on the first embedded vector and the second embedded vector to obtain a first fusion vector; performing mutual information feature selection fusion on the first embedded vector and the second embedded vector to obtain a second fusion vector; performing correlation coefficient feature selection fusion on the first embedded vector and the second embedded vector to obtain a third fusion vector; and transforming the first fusion vector, the second fusion vector and the third fusion vector by using a preset transformation function to obtain a data fusion feature vector.
Specifically, each first character contained in the feature data is firstly determined, each character in the feature data is then converted into a first embedded vector by using Word2Vec and other Word embedding methods, each second character contained in the behavior data is similarly determined, each character in the behavior data is then converted into a second embedded vector by using Word2Vec and other Word embedding methods, the first embedded vector and the second embedded vector are weighted and averaged according to a certain weight to obtain a first fusion vector, wherein the weight is set according to importance according to different dimensions, for example, in personal health information text, the feature data of a user is more important than the behavior data of the user, therefore, the first embedded vector corresponding to the feature data of the user can be assigned with higher weight, and at the same time, the feature vectors of different dimensions are selected according to the importance of the feature, the importance of the features can be specifically selected according to a mutual information feature selection fusion algorithm, wherein the mutual information feature selection fusion algorithm is a filtering type selection algorithm, the mutual information is a measure of mutual dependence between the features, namely, the degree of correlation between a first embedded vector and a second embedded vector and a news text respectively, the degree of correlation is used for screening the first embedded vector and the second embedded vector, the feature vector with the strongest correlation is selected as a second fusion vector, meanwhile, the first embedded vector and the second embedded vector are subjected to correlation coefficient feature selection fusion processing to obtain a third fusion vector, the process of the correlation coefficient feature selection fusion processing is that first correlation coefficient between the first embedded vector and the news recommendation result is determined, second correlation coefficient between the second embedded vector and the news recommendation result is determined, and finally, selecting a feature vector corresponding to the maximum correlation coefficient as a third fusion vector, and finally, carrying out transformation processing on the first fusion vector, the second fusion vector and the third fusion vector by using a preset transformation function to obtain a data fusion feature vector, wherein the preset function can be set according to actual conditions, and the embodiment is not limited to the above. The embodiment can fully utilize the relation between the data, extract more hidden features, and simultaneously give consideration to the processing of high order and low order, so that the data is more fully utilized, the prediction result obtained later is more accurate, and the requirements of actual application scenes are met.
208. And 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.
For the embodiment of the invention, after determining the semantic information vector corresponding to the news text and the data fusion feature vector corresponding to the feature data and the behavior data of the user, the news of interest is recommended to the user according to the semantic information vector and the data fusion feature vector, and based on the semantic information vector and the data fusion feature vector, the steps specifically comprise: calculating the vector inner product between the data fusion feature vector and each semantic information vector to obtain a recommendation score corresponding to each news text; and determining a target recommendation score greater than a preset threshold value in the recommendation scores, and determining a news text corresponding to the target recommendation score as a target news text recommended to the user to be recommended.
The preset threshold is a value set according to actual requirements. Specifically, if 3 news texts exist, the inner products of vectors between semantic information vectors corresponding to the 3 news texts and data fusion feature vectors are calculated respectively to obtain 30 parts of recommendation scores corresponding to the 1 st news text, 45 parts of recommendation scores corresponding to the 2 nd news text, 56 parts of recommendation scores corresponding to the 3 rd news text and 40 parts of preset threshold value, and finally the 2 nd and 3 rd news texts are recommended to the user, so that comprehensive analysis is performed through semantic information of the news and feature data and behavior data of the user, interested news is recommended to the user according to analysis results, the recommendation accuracy of the news can be improved, and experience of the user can be improved.
According to the news recommending method, the news recommending device, the storage medium and the computer equipment, compared with the mode of randomly recommending hot news to users at present, the news recommending method, the storage medium and the computer equipment have the advantages that news texts, feature data and behavior data corresponding to users to be recommended are obtained; inputting the news text into a preset semantic prediction model for semantic prediction to obtain a semantic information vector corresponding to the news text; meanwhile, carrying out data fusion processing on the characteristic data and the behavior data to generate a data fusion characteristic vector; and finally, determining a target news text in the news text based on the semantic information vector and the data fusion feature vector, recommending the target news text to the user to be recommended, and simultaneously determining the data fusion feature vector corresponding to the user according to the feature data and the behavior data of the user by determining the semantic information vector corresponding to the news text, and finally recommending the news of interest to the user according to the semantic information vector and the data fusion feature vector, namely comprehensively analyzing the semantic information of the news and the feature data and the behavior data of the user, recommending the news of interest to the user according to the analysis result, so that the recommending accuracy of the news can be improved, and the experience of the user can be improved.
Further, as a specific implementation of fig. 1, an embodiment of the present invention provides a news recommendation device, as shown in fig. 3, where the device includes: an acquisition unit 31, a prediction unit 32, a fusion processing unit 33, and a determination unit 34.
The obtaining unit 31 may be configured to obtain news text, and feature data and behavior data corresponding to a user to be recommended.
The prediction unit 32 may be configured to input the news text into a preset semantic prediction model to perform semantic prediction, so as to obtain a semantic information vector corresponding to the news text.
The fusion processing unit 33 may be configured to perform data fusion processing on the feature data and the behavior data, and generate a data fusion feature vector.
The determining unit 34 may be configured to determine a target news text from the news texts based on the semantic information vector and the data fusion feature vector, and recommend the target news text to the user to be recommended.
In a specific application scenario, in order to construct a preset semantic prediction model, as shown in fig. 4, the apparatus further includes: a construction unit 35.
The construction unit 35 may be configured to construct a preset initial semantic prediction model, and obtain a sample news text.
The determining unit 34 may be further configured to determine a twinning sample news text corresponding to the sample news text.
The determining unit 34 may be further configured to determine each neuron included in the preset initial semantic prediction model, determine a first culled neuron in each neuron according to a first preset culling probability value, and determine a second culled neuron in each neuron according to a second preset culling probability value.
The prediction unit 32 may be further configured to remove the first eliminated neuron from the neurons to obtain a preset initial semantic prediction model including a first remaining neuron, and input the sample news text into the preset initial semantic prediction model including the first remaining neuron to perform semantic prediction, so as to obtain a first predicted semantic vector corresponding to the sample news text.
The prediction unit 32 may be further configured to remove the second eliminated neuron from the neurons to obtain a preset initial semantic prediction model including a second remaining neuron, and input the twinning sample news text into the preset initial semantic prediction model including the second remaining neuron to perform semantic prediction, so as to obtain a second predicted semantic vector corresponding to the twinning sample news text.
The construction unit 35 may specifically be configured 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 construct the preset semantic prediction model based on the loss function.
In a specific application scenario, in order to determine a semantic information vector corresponding to a news text, the prediction unit 32 includes a first determining module 321, a splicing module 322, and a prediction module 323.
The first determining module 321 may be configured to determine each word segment included in the news text, and determine a word vector corresponding to the each word segment.
The first determining module 321 may be further configured to determine each sentence included in the news text, and determine a sentence vector corresponding to each sentence.
The first determining module 321 may be further configured to determine each character included in the news text, and determine a position vector corresponding to the each character.
The stitching module 322 may be configured to stitch the word vector, the sentence vector, and the position vector to obtain a stitched feature vector corresponding to the news text.
The prediction module 323 may be configured to input the spliced feature vector into the preset semantic prediction model to perform semantic prediction, so as to obtain a semantic information vector corresponding to the news text.
In a specific application scenario, in order to predict the semantic information vector of the news text, the prediction module 323 may be specifically configured to input the spliced feature vector to each attention layer for feature extraction, so as to obtain an output vector of each attention layer corresponding to the news text; multiplying the output vector of each attention layer with the weight coefficient corresponding to each attention layer and summing to obtain a weight weighting feature vector corresponding to the news text; adding the weight weighted feature vector and the spliced feature vector to obtain an intermediate feature vector corresponding to the news text; and inputting the intermediate feature vector into the feedforward neural network layer to perform feature extraction, and obtaining a semantic information vector corresponding to the news text.
In a specific application scenario, in order to generate the data fusion feature vector, the fusion processing unit 33 includes a second determining module 331 and a fusion processing module 332.
The second determining module 331 may be configured to determine a first embedded vector corresponding to the feature data, and determine a second embedded vector corresponding to the behavior data.
The fusion processing module 332 may be configured to perform fusion processing on the first embedded vector and the second embedded vector to obtain a data fusion feature vector.
In a specific application scenario, in order to obtain a data fusion feature vector, the fusion processing module 332 may be specifically configured to perform weighted fusion on the first embedded vector and the second embedded vector to obtain a first fusion vector; performing mutual information feature selection fusion on the first embedded vector and the second embedded vector to obtain a second fusion vector; performing correlation coefficient feature selection fusion on the first embedded vector and the second embedded vector to obtain a third fusion vector; and transforming the first fusion vector, the second fusion vector and the third fusion vector by using a preset transformation function to obtain a data fusion feature vector.
In a specific application scenario, in order to determine the target news text recommended to the user, the determining unit 34 includes a calculating module 341 and a recommending module 342.
The calculating module 341 may be configured to calculate a vector inner product between the data fusion feature vector and each semantic information vector, to obtain a recommendation score corresponding to each news text.
The recommending module 342 may be configured to determine a target recommendation score greater than a preset threshold value from the recommendation scores, and determine a news text corresponding to the target recommendation score as a target news text recommended to the user to be recommended.
It should be noted that, for other corresponding descriptions of each functional module related to the news recommending device provided by the embodiment of the present invention, reference may be made to corresponding descriptions of the method shown in fig. 1, which are not repeated herein.
Based on the above method as shown in fig. 1, correspondingly, the embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the following steps: acquiring news texts, and feature data and behavior data corresponding to users to be recommended; inputting the news text into a preset semantic prediction model to perform semantic prediction to obtain a semantic information vector corresponding to the news text; performing data fusion processing on the characteristic data and the behavior data to generate a data fusion characteristic vector; and 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.
Based on the embodiment of the method shown in fig. 1 and the device shown in fig. 3, the embodiment of the invention further provides a physical structure diagram of a computer device, as shown in fig. 5, where the computer device includes: a processor 41, a memory 42, and a computer program stored on the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43, the processor 41 performing the following steps when said program is executed: acquiring news texts, and feature data and behavior data corresponding to users to be recommended; inputting the news text into a preset semantic prediction model to perform semantic prediction to obtain a semantic information vector corresponding to the news text; performing data fusion processing on the characteristic data and the behavior data to generate a data fusion characteristic vector; and 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.
According to the technical scheme, the news text, the feature data and the behavior data corresponding to the user to be recommended are obtained; inputting the news text into a preset semantic prediction model for semantic prediction to obtain a semantic information vector corresponding to the news text; meanwhile, carrying out data fusion processing on the characteristic data and the behavior data to generate a data fusion characteristic vector; and finally, determining a target news text in the news text based on the semantic information vector and the data fusion feature vector, recommending the target news text to the user to be recommended, and simultaneously determining the data fusion feature vector corresponding to the user according to the feature data and the behavior data of the user by determining the semantic information vector corresponding to the news text, and finally recommending the news of interest to the user according to the semantic information vector and the data fusion feature vector, namely comprehensively analyzing the semantic information of the news and the feature data and the behavior data of the user, recommending the news of interest to the user according to the analysis result, so that the recommending accuracy of the news can be improved, and the experience of the user can be improved.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A news recommendation method, comprising:
Acquiring news texts, and feature data and behavior data corresponding to users to be recommended;
inputting the news text into a preset semantic prediction model to perform semantic prediction to obtain a semantic information vector corresponding to the news text;
performing data fusion processing on the characteristic data and the behavior data to generate a data fusion characteristic vector;
and 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.
2. The method according to claim 1, wherein before the inputting the news text into a preset semantic prediction model for semantic prediction, obtaining a semantic information vector corresponding to the news text, the method further comprises:
constructing a preset initial semantic prediction model, and acquiring a sample news text;
determining a twin sample news text corresponding to the sample news text;
determining each neuron contained in the preset initial semantic prediction model, determining a first eliminated neuron in each neuron according to a first preset elimination probability value, and determining a second eliminated neuron in each neuron according to a second preset elimination probability value;
Removing the first elimination neurons from the neurons to obtain a preset initial semantic prediction model containing first residual neurons, and inputting the sample news text into the preset initial semantic prediction model containing the first residual neurons to perform semantic prediction to obtain a first prediction semantic vector corresponding to the sample news text;
removing the second elimination neurons from the neurons to obtain a preset initial semantic prediction model containing second residual neurons, and inputting the twin sample news text into the preset initial semantic prediction model containing the second residual neurons to perform semantic prediction to obtain a second prediction semantic vector corresponding to the twin sample news text;
and generating a loss function corresponding to the preset initial semantic prediction model based on the similarity between the first prediction semantic vector and the second prediction semantic vector, and constructing the preset semantic prediction model based on the loss function.
3. The method of claim 1, wherein the inputting the news text into a preset semantic prediction model for semantic prediction to obtain the semantic information vector corresponding to the news text comprises:
Determining each word segmentation contained in the news text, and determining word vectors corresponding to each word segmentation;
determining each sentence contained in the news text, and determining a sentence vector corresponding to each sentence;
determining each character contained in the news text, and determining a position vector corresponding to each character;
splicing the word vector, the sentence vector and the position vector to obtain a spliced feature vector corresponding to the news text;
inputting the spliced feature vector into the preset semantic prediction model to perform semantic prediction, and obtaining a semantic information vector corresponding to the news text.
4. The method according to claim 3, wherein the preset semantic prediction model is a preset natural language processing model, the preset natural language processing model includes a multi-head attention layer and a feedforward neural network layer, the inputting the spliced feature vector into the preset semantic prediction model to perform semantic prediction, and obtaining a semantic information vector corresponding to the news text includes:
respectively inputting the spliced feature vectors to each attention layer for feature extraction to obtain output vectors of each attention layer corresponding to the news text;
Multiplying the output vector of each attention layer with the weight coefficient corresponding to each attention layer and summing to obtain a weight weighting feature vector corresponding to the news text;
adding the weight weighted feature vector and the spliced feature vector to obtain an intermediate feature vector corresponding to the news text;
and inputting the intermediate feature vector into the feedforward neural network layer to perform feature extraction, and obtaining a semantic information vector corresponding to the news text.
5. The method of claim 1, wherein the performing a data fusion process on the feature data and the behavior data to generate a data fusion feature vector comprises:
determining a first embedded vector corresponding to the characteristic data and determining a second embedded vector corresponding to the behavior data;
and carrying out fusion processing on the first embedded vector and the second embedded vector to obtain a data fusion characteristic vector.
6. The method of claim 5, wherein the fusing the first embedded vector and the second embedded vector to obtain a data fusion feature vector comprises:
carrying out weighted fusion on the first embedded vector and the second embedded vector to obtain a first fusion vector;
Performing mutual information feature selection fusion on the first embedded vector and the second embedded vector to obtain a second fusion vector;
performing correlation coefficient feature selection fusion on the first embedded vector and the second embedded vector to obtain a third fusion vector;
and transforming the first fusion vector, the second fusion vector and the third fusion vector by using a preset transformation function to obtain a data fusion feature vector.
7. The method of claim 1, wherein the determining a target news text among the news texts based on the semantic information vector and the data fusion feature vector comprises:
calculating the vector inner product between the data fusion feature vector and each semantic information vector to obtain a recommendation score corresponding to each news text;
and determining a target recommendation score greater than a preset threshold value in the recommendation scores, and determining a news text corresponding to the target recommendation score as a target news text recommended to the user to be recommended.
8. A news recommender comprising:
the acquisition unit is used for acquiring the news text, and the feature data and the behavior data corresponding to the user to be recommended;
The prediction unit is used for inputting the news text into a preset semantic prediction model to carry out semantic prediction, so as to obtain a semantic information vector corresponding to the news text;
the fusion processing unit is used for carrying out data fusion processing on the characteristic data and the behavior data to generate a data fusion characteristic vector;
and the determining unit is used for determining a target news text in the news texts based on the semantic information vector and the data fusion feature vector, and recommending the target news text to the user to be recommended.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program when executed by the processor implements the steps of the method according to any one of claims 1 to 7.
CN202310872582.1A 2023-07-17 2023-07-17 News recommendation method and device, storage medium and computer equipment Pending CN116932898A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310872582.1A CN116932898A (en) 2023-07-17 2023-07-17 News recommendation method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310872582.1A CN116932898A (en) 2023-07-17 2023-07-17 News recommendation method and device, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN116932898A true CN116932898A (en) 2023-10-24

Family

ID=88393537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310872582.1A Pending CN116932898A (en) 2023-07-17 2023-07-17 News recommendation method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN116932898A (en)

Similar Documents

Publication Publication Date Title
CN111046152B (en) Automatic FAQ question-answer pair construction method and device, computer equipment and storage medium
CN111460130B (en) Information recommendation method, device, equipment and readable storage medium
CN108829822B (en) Media content recommendation method and device, storage medium and electronic device
CN111538912B (en) Content recommendation method, device, equipment and readable storage medium
CN111444320B (en) Text retrieval method and device, computer equipment and storage medium
CN109376222B (en) Question-answer matching degree calculation method, question-answer automatic matching method and device
CN110110233B (en) Information processing method, device, medium and computing equipment
CN112464100B (en) Information recommendation model training method, information recommendation method, device and equipment
CN111105013B (en) Optimization method of countermeasure network architecture, image description generation method and system
US20220172260A1 (en) Method, apparatus, storage medium, and device for generating user profile
US20220067309A1 (en) Learned evaluation model for grading quality of natural language generation outputs
CN109189922B (en) Comment evaluation model training method and device
CN114648032B (en) Training method and device of semantic understanding model and computer equipment
CN114077661A (en) Information processing apparatus, information processing method, and computer readable medium
CN110852071A (en) Knowledge point detection method, device, equipment and readable storage medium
CN113705792A (en) Personalized recommendation method, device, equipment and medium based on deep learning model
US11416892B2 (en) Non-transitory computer-readable recording medium, determination method, and information processing apparatus
CN112749737A (en) Image classification method and device, electronic equipment and storage medium
CN116610872A (en) Training method and device for news recommendation model
CN116956183A (en) Multimedia resource recommendation method, model training method, device and storage medium
CN116089616A (en) Theme text acquisition method, device, equipment and storage medium
CN116932898A (en) News recommendation method and device, storage medium and computer equipment
CN112016281B (en) Method and device for generating wrong medical text and storage medium
CN113688633A (en) Outline determination method and device
CN112131363A (en) Automatic question answering method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination