Information recommendation method and device, electronic equipment and storage medium
By acquiring candidate and user information, and using a target recommendation model for in-depth analysis, combined with language and prediction models, the problem of difficulty in discovering user interests in existing recommendation methods is solved, thus achieving more accurate information recommendation.
Patent Information
- Application Number
- CN202210998899.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-08-19
AI Technical Summary
Existing recommendation methods mainly rely on information similarity judgment, which makes it difficult to discover users' potential interests and habits, resulting in recommended information that fails to meet user needs and is not accurate enough.
By acquiring candidate information, users' historical reading information, behavioral characteristics, and target reading information, the target recommendation model is used for analysis and prediction. By combining the language model, user encoder, and prediction model, the first probability, second probability, and third probability are calculated and integrated to obtain the final recommendation probability.
It enables more accurate discovery of users' potential behavioral interests, improving the accuracy and personalization of information recommendations.
Smart Images

Figure CN115269998B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information processing, in particular to an information recommendation method and device, an electronic device and a storage medium. BACKGROUND
[0002] With the rapid development of recommendation algorithms, recommendation systems have been widely applied in various application scenarios, for example, applied in commodity recommendation to recommend commodities of interest to users, and for example, applied in news recommendation to recommend news of interest to users.
[0003] However, the current recommendation method generally finds some information similar to the user's historical browsing information for recommendation, such as judging the relevance between them only according to the similarity of the information, so it is difficult to discover the user's potential interest habits, resulting in that the recommended information is difficult to meet the user's needs, and the accuracy of information recommendation cannot be guaranteed. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide an information recommendation method, device, electronic device and storage medium to improve the problem of inaccurate information recommended by the current recommendation method.
[0005] In a first aspect, the embodiments of the present application provide an information recommendation method, which comprises:
[0006] obtaining candidate information and user information of a user, the user information comprising historical reading information, behavior characteristics and target reading information of the user, the target reading information being information of the same type as the candidate information in the historical reading information of the user;
[0007] using a target recommendation model to obtain a probability of recommending the candidate information to the user according to the candidate information and the user information.
[0008] In the above implementation process, by obtaining candidate information and some information of a user, including historical reading information, behavior characteristics and target reading information, using a target recommendation model to analyze and predict according to these information, the probability of recommending the candidate information to the user can be obtained. In this scheme, the behavior characteristics of the user and the related information of the historical reading are considered when making recommendation prediction, so that deeper semantic information can be extracted by the target recommendation model, and the user's potential behavior interest can be deeply mined to achieve more accurate recommendation.
[0009] Optionally, the using a target recommendation model to obtain a probability of recommending the candidate information to the user according to the candidate information and the user information comprises:
[0010] acquire, by a target recommendation model, a first probability of recommending the candidate information to the user according to the candidate information and the historical reading information;
[0011] acquire, by a target recommendation model, a second probability of recommending the candidate information to the user according to the candidate information and the target reading information;
[0012] acquire, by a target recommendation model, a third probability of recommending the candidate information to the user according to the behavior feature;
[0013] determine, by a target recommendation model, a final probability of recommending the candidate information to the user based on the first probability, the second probability and the third probability.
[0014] In the above implementation process, different information is used to obtain corresponding recommendation probabilities, and finally each recommendation probability is integrated into a final recommendation probability, so that the user's potential behavior interest can be mined from different angles, and more accurate recommendation can be realized.
[0015] Optionally, the target recommendation model includes a language model and a user encoder, and the acquiring, by a target recommendation model, a first probability of recommending the candidate information to the user according to the candidate information and the historical reading information includes:
[0016] encoding the candidate information and the historical reading information by the language model to obtain a corresponding candidate information encoding vector and a historical reading information encoding vector;
[0017] calculating the historical reading information encoding vector and a position vector corresponding to the historical reading information by the user encoder to obtain a first user vector;
[0018] acquiring the first probability of recommending the candidate information to the user according to the first user vector and the candidate information encoding vector.
[0019] In the above implementation process, the language model and the user encoder can effectively extract deep semantic information in the input information, and thus more accurate recommendation probabilities can be predicted.
[0020] Optionally, the target recommendation model includes a language model and a user encoder, and the acquiring, by a target recommendation model, a second probability of recommending the candidate information to the user according to the candidate information and the target reading information includes:
[0021] encoding the candidate information and the target reading information by the language model to obtain a corresponding candidate information encoding vector and a target reading information encoding vector;
[0022] The target reading information encoding vector and the position vector corresponding to the target reading information are calculated by using the user encoder to obtain a second user vector.
[0023] A second probability of recommending the candidate information to the user is obtained according to the second user vector and the candidate information encoding vector.
[0024] In the above implementation process, the language model and the user encoder can effectively extract deep semantic information in the input information, and then a more accurate recommendation probability can be predicted.
[0025] Optionally, the language model is an Electra model. Since the parameters of the model are smaller, the calculation efficiency can be effectively improved, and better information extraction effect can be achieved.
[0026] Optionally, the target recommendation model further includes a prediction model, and the determining, by the target recommendation model, of a final probability of recommending the candidate information to the user based on the first probability, the second probability and the third probability includes:
[0027] The final probability of recommending the candidate information to the user is determined based on the first probability, the second probability and the third probability by using the prediction model.
[0028] In the above implementation process, the prediction model can effectively integrate the three probabilities into the final recommendation probability, so that more accurate probability prediction can be realized.
[0029] Optionally, the prediction model is an XGBoost model. The model is a machine learning model, which can effectively learn the association between the three probabilities and the final probability, and realize more accurate probability prediction.
[0030] Optionally, the behavior features include at least one of the number of categories of reading information of the user, a historical information category reading probability, an information hotspot feature, an entity hotspot feature, and a user reading entity hotspot feature. By obtaining these behavior features, the behavior interest of the user can be better extracted, and more accurate recommendation can be realized.
[0031] Optionally, the third probability of recommending the candidate information to the user is obtained according to the behavior features by using the target recommendation model, and the third probability includes:
[0032] Each feature included in the behavior features is converted into a corresponding feature vector by using the target recommendation model.
[0033] The feature vectors corresponding to each feature are spliced to obtain a behavior feature vector by using the target recommendation model.
[0034] The behavior feature vector is input into a full connection layer and calculated by a sigmoid function to obtain a third probability of recommending the candidate information to the user by using the target recommendation model.
[0035] In the implementation process, the third probability is obtained by splicing the feature vectors corresponding to various features in the behavior features, inputting into a full connection layer, and calculating by a sigmoid function, so that the behavior interest of the user can be better extracted, and more accurate recommendation can be realized.
[0036] Optionally, the candidate information is candidate news information, the historical reading information is historical reading news information, and the target reading information is target reading news information. This scheme is applied in the field of news recommendation, and accurate news recommendation can be realized.
[0037] In a second aspect, an information recommendation device is provided, and the device comprises:
[0038] An information acquisition module is configured to acquire candidate information and user information of a user, wherein the user information comprises historical reading information, behavior features, and target reading information of the user, and the target reading information refers to information of the same type as the candidate information in the historical reading information of the user.
[0039] An information recommendation module is configured to acquire a probability of recommending the candidate information to the user according to the candidate information and the user information by using a target recommendation model.
[0040] In a third aspect, an electronic device is provided, comprising a processor and a memory, wherein the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the steps in the method provided in the first aspect are executed.
[0041] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method provided in the first aspect are executed.
[0042] Other features and advantages of the present application will be described in the following description, and become apparent from the description, or be learned through implementation of the embodiments of the present application. The purposes and other advantages of the present application can be achieved and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as a limitation to the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0044] Figure 1 The flow chart of the information recommendation method provided by the embodiments of the present application;
[0045] Figure 2 The general structure diagram of the target recommendation model provided by the embodiments of the present application;
[0046] Figure 3 The detailed structure diagram of the target recommendation model provided by the embodiments of the present application;
[0047] Figure 4 The structure block diagram of the information recommendation device provided by the embodiments of the present application;
[0048] Figure 5 The structure diagram of the electronic device for executing the information recommendation method provided by the embodiments of the present application. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.
[0050] It should be noted that the terms "system" and "network" in the embodiments of the present application can be used interchangeably. "Multiple" means two or more than two, and therefore, "multiple" in the embodiments of the present application can also be understood as "at least two". "And / or", which describes the association relationship of the associated objects, means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / ", if not specially stated, generally represents an "or" relationship between the associated objects before and after it.
[0051] The embodiments of the present application provide an information recommendation method, which obtains candidate information and some information of a user, including historical reading information, behavior characteristics and target reading information, and uses a target recommendation model to analyze and predict according to the information, so as to obtain the probability of recommending the candidate information to the user. In the present scheme, the behavior characteristics of the user and the related information of the historical reading are considered when the recommendation prediction is performed, so that the target recommendation model can extract deeper semantic information, deeply mine the potential behavior interest of the user, and realize more accurate recommendation.
[0052] Please refer to Figure 1 ,Figure 1 A flowchart of an information recommendation method provided in an embodiment of the present application, the method comprising the following steps:
[0053] Step S110: Obtain candidate information and user information of the user, the user information comprising historical reading information, behavior characteristics and target reading information of the user.
[0054] The execution subject of the information recommendation method in the present application can be a background server or a front-end device. If it is a background server, the background server can send the obtained probability to the front-end device after obtaining the probability of recommending the candidate information to the user, and the front-end device can determine whether to recommend the candidate information to the user according to the probability. Alternatively, the background server can determine whether to recommend the candidate information to the user according to the probability after obtaining the probability, and then send the determination result to the front-end device. The front-end device can directly determine whether to recommend the candidate information to the user after obtaining the determination result, and if so, display the candidate information to the user. If the execution subject of the information recommendation method in the present application is the front-end device, these steps can be performed by the front-end device, and the front-end device can determine whether to recommend the candidate information to the user according to the probability after obtaining the probability, and if so, display the candidate information to the user.
[0055] It can be understood that the user in the present application can be any user who needs information recommendation. For different users, if the same candidate information is obtained, the user information obtained is different, and the final recommendation probability obtained is also different. Therefore, the method of the present application can realize accurate recommendation for different users.
[0056] The candidate information can be information to be recommended, such as candidate news information in some application scenarios, and the historical reading information of the user can be historical reading news information, and the target reading information can be target reading news information. It can be understood that in other application scenarios, the candidate information can also be other information, such as candidate commodity information, candidate articles, candidate novels, candidate videos, etc. In actual application, the information recommendation method of the present application can be used to realize the recommendation of corresponding information when information recommendation is involved. For the convenience of description, the following embodiments are exemplarily described in the application scenario of news recommendation.
[0057] The candidate information can be a group of information, such as multiple news for news information. For each news, the probability of whether to recommend the news to the user can be obtained according to the scheme provided in the present application.
[0058] The historical reading information of the user can be obtained from the historical browsing record of the user, such as crawling the historical browsing record of the user on a news website. The historical reading news information and the behavior characteristics of the user can be extracted from the historical browsing record. The behavior characteristics of the user refer to some characteristics representing the interests of the user. Then, some candidate news information is obtained. By matching the historical reading news information of the user with the candidate news information, the reading news information belonging to the same type as the candidate news information is extracted as the target reading news information. In this application, the target reading information refers to the information in the historical reading information belonging to the same type as the candidate information. The same type matching of the historical reading news information and the candidate news information can be performed by category matching, such as both being entertainment news or both being current affairs news, or other ways can be used to determine whether they belong to the same type.
[0059] Step S120: obtaining the probability of recommending the candidate information to the user according to the candidate information and the user information by using the target recommendation model.
[0060] In order to obtain better recommendation effect, the target recommendation model used in the embodiment of the application can predict the probability of recommending the candidate information according to the candidate information, the historical reading information, the behavior characteristics and the target reading information obtained above. Since a large amount of information is extracted, the target recommendation model can deeply mine the interest and hobby characteristics of the user, and then more accurate recommendation can be realized.
[0061] In the application scenario of real-time recommendation, after obtaining the probability, when the probability is greater than or equal to the set probability (the set probability can be flexibly set according to actual needs), it is determined to recommend the candidate information to the user. At this time, the candidate information can be output to the user. On the contrary, if the probability is less than the set probability, it is determined not to recommend the candidate information to the user. For example, for news information, if it is not recommended, the news information can be hidden or sorted in the rear position. If it is recommended, the news information can be preferentially displayed to the user. When there are multiple news information, for some news information to be recommended, the news information can be sorted according to the probability of recommending each piece of news information, such as the largest probability is ranked first and the smallest probability is ranked last. Then, the news information can be displayed to the user in the order of sorting, so as to facilitate the user to read. Of course, in actual application, how to display or output the recommended candidate information to the user can be flexibly set according to actual needs, and the embodiment of the application does not make specific limitation.
[0062] In the implementation process, the candidate information and some information of the user, including historical reading information, behavior characteristics and target reading information, are acquired, the target recommendation model is used to analyze and predict according to the information, the probability of recommending the candidate information to the user can be obtained, and in the recommendation prediction, the behavior characteristics of the user and the related information of the historical reading are considered, so that deeper semantic information can be extracted by the target recommendation model, the potential behavior interest of the user can be deeply mined, and more accurate recommendation can be realized.
[0063] On the basis of the above embodiment, in the manner of acquiring the probability of recommending the candidate information to the user, the target recommendation model can respectively use various information to respectively obtain the probability, and then the probabilities are integrated, for example, the first probability of recommending the candidate information to the user is acquired by the target recommendation model according to the candidate information and the historical reading information, the second probability of recommending the candidate information to the user is acquired by the target recommendation model according to the candidate information and the target reading information, the third probability of recommending the candidate information to the user is acquired by the target recommendation model according to the behavior characteristics, and finally the final probability of recommending the candidate information to the user is determined by the target recommendation model based on the first probability, the second probability and the third probability.
[0064] The historical reading information can represent the historical reading habits of the user, so the first probability of recommending the candidate information is predicted according to the historical reading information and the candidate information, the target reading information can represent the user's preference for reading similar information, so the second probability of recommending the candidate information is predicted according to the target reading information and the candidate information, the behavior characteristics of the user can represent some reading behaviors of the user, so the third probability of recommending the candidate information is predicted by combining the behavior characteristics, and finally the final probability is obtained by integrating the three probabilities, for example, the final probability is obtained by weighted average of the three probabilities, the weight here can be obtained by training the target recommendation model, or can be set by human experience in advance.
[0065] It can be understood that the way of determining the final probability according to the first probability, the second probability and the third probability here can not only be the weighted average way, but also can be other ways, such as direct average, or taking the maximum probability as the final probability, etc. In actual application, the specific way can be verified by continuous experiment in advance, and finally the best one can be adopted.
[0066] In the implementation process, different information is used to obtain corresponding recommendation probability, and finally each recommendation probability is integrated into the final recommendation probability, so that the potential behavior interest of the user can be mined from different angles, and more accurate recommendation can be realized.
[0067] On the basis of the above embodiment, as Figure 2As shown, the embodiment of the present application provides a structural diagram of a target recommendation model, which includes a language model and a user encoder. In the above manner of obtaining the first probability, the language model can be used to encode the candidate information and the historical reading information respectively to obtain corresponding candidate information encoding vectors and historical reading information encoding vectors, and the user encoder can be used to calculate the historical reading information encoding vectors and the position vectors corresponding to the historical reading information to obtain a first user vector, and then the first user vector and the candidate information encoding vector are used to obtain the first probability of recommending the candidate information to the user.
[0068] The language model can be used to translate and encode the candidate information and the historical reading information, and then the obtained encoding vectors are input into the user encoder. If there are multiple historical reading information, each piece of historical reading information can be converted into a corresponding encoding vector by the language model (of course, each piece of historical reading information can be input into a language model, that is, the language model can be multiple, so as to improve the calculation efficiency), and then the encoding vectors are input into the user encoder. The user encoder is used to calculate the historical reading information encoding vectors and the position vectors corresponding thereto. The position vector refers to a vector composed of the positions of each word in the historical reading information, so as to identify the semantic information therein. The calculation of the vector can be understood as that the user encoder converts multiple input vectors into an intermediate representation vector through certain calculation, that is, the historical reading information encoding vector and the position vector are converted into an intermediate first user vector through calculation.
[0069] The manner of obtaining the first probability according to the first user vector and the candidate information encoding vector can be to perform cosine similarity calculation on the first user vector and the candidate information encoding vector, and the obtained similarity can be used as the first probability. Of course, the first user vector and the candidate information encoding vector can also be subjected to Euclidean distance calculation, and the obtained distance can be used as the first probability. Understandably, the manner of obtaining the first probability can also be to perform other similarity calculation on the first user vector and the candidate information encoding vector, and in actual application, the similarity calculation manner can be flexibly selected to obtain the first probability.
[0070] Similarly, in the above manner of obtaining the second probability, the language model can also be used to encode the candidate information and the target reading information respectively to obtain corresponding candidate information encoding vectors and target reading information encoding vectors, and the user encoder can be used to calculate the target reading information encoding vectors and the position vectors corresponding to the target reading information to obtain a second user vector, and then the second user vector and the candidate information encoding vector are used to obtain the second probability of recommending the candidate information to the user.
[0071] Wherein, the way of encoding the candidate information and the target reading information by using the language model is similar to the use of the language model in the above embodiment, and the way of calculating the target reading information encoding vector by the user encoder is similar to the use of the user encoder in the above embodiment, and no more description is made here. The way of obtaining the second probability according to the second user vector and the candidate information encoding vector can also be the cosine similarity calculation, the Euclidean distance calculation and the like, and the obtained cosine similarity or Euclidean distance can be used as the second probability. Of course, in actual application, other similarity calculation methods can also be selected to obtain the second probability.
[0072] In the above implementation process, the language model and the user encoder can effectively extract deep semantic information in the input information, and then a more accurate recommendation probability can be predicted.
[0073] On the basis of the above embodiment, the language model can be a BERT (Bidirectional Encoder Representation from Transformers) model, which can extract rich semantic information representation in the input text.
[0074] In order to improve the recommendation efficiency in the embodiment, the language model can use an Electra (Efficiently Learning an Encoder that Classifies Token Replacements Accurately) model. Compared with the BERT model, the Electra model has the advantages of smaller parameters, higher calculation efficiency and better effect, so the use of the Electra model can realize the encoding conversion of the input information more quickly.
[0075] It can be understood that the language model of the embodiment can also use other language models, and in actual application, the corresponding language model can be selected flexibly according to actual needs.
[0076] The user encoder in the embodiment can use a conventional encoder, such as a user encoder including a stack of multiple layers, each layer including two sub-layers, one of which is a multi-head attention mechanism network layer (a plurality of attention modules are used in parallel in the multi-head attention mechanism, which can enrich the diversity of attention, thereby increasing the expression ability of the model), and the other is a fully connected feedforward neural network layer, and the two sub-layers are connected through a residual network and a normalization layer.
[0077] The input of the multi-head attention mechanism network layer is connected with the output of the language model, and the output of the feedforward neural network layer is connected with other network structures of the target recommendation model, such as the output of the feedforward neural network layer being connected with a probability calculation layer (such as the first probability calculation or the second probability calculation in Figure 2 ).
[0078] The number of the stack of multiple layers can be flexibly set according to actual needs, for example, a stack of 6 layers, which is not particularly limited in the embodiments of the application.
[0079] On the basis of the above-mentioned embodiments, the behavior characteristics of the user include at least one of the number of categories of information read by the user, a historical information category reading probability, an information hotspot characteristic, an entity hotspot characteristic, and a user reading entity hotspot characteristic.
[0080] The process of obtaining the third probability of recommending candidate information to the user according to the behavior characteristics will be introduced below.
[0081] Taking a news recommendation scenario as an example, first, the total N categories of news read by the user in the user log can be counted, denoted as C=(c1, c2,..., cN). N ).
[0082] The historical news category reading probability (historical information category reading probability): the probability p i represents the probability of a news in the category c i , c i ∈C being read by the user, and the probability is denoted as P.
[0083] The news hotspot characteristic (information hotspot characteristic): for a given c i , c i ∈C, the reading amount R a of the news is counted, and the historical reading total amount of the news in the category is counted. The news hotspot characteristic is calculated by .
[0084] The entity hotspot characteristic: for a given c i , c i ∈C, the reading amount R e of the entity of the given candidate news is counted, and the historical reading total amount of the entity in the category is counted. The entity hotspot characteristic of the news in the category is calculated by .
[0085] The user reading entity hotspot characteristic: the occurrence number R t of the news entity in the historical news of the user and the total number R h of news read by each user are counted, and the user reading entity news hotspot characteristic is calculated by Ft =R t / R h The calculation yielded the result.
[0086] The analysis revealed that users' reading interests change over time, but follow the overall trend of news events. To make the recommendation system more timely, two features were added: based on the total number of user behavior features and the in-class reading probability (i.e., the reading probability of historical information categories), for example, the most recent 20 user behavior features were statistically analyzed, denoted as C' and P' respectively.
[0087] Total number of recent 20 user behavior characteristics: Based on the user logs, the total number of N' types of news articles read by the user in the last 20 articles is denoted as C'=(c′1,c′2,...,c′). N ).
[0088] Probability of reading the most recent 20 historical news items by category: probability p′ i This means that for a given c i c i For a news article in class C, calculate the probability of this type of news article appearing in the user's most recent 20 read news articles, and denote the probability as P'.
[0089] These features can then be converted into corresponding feature vectors using a behavior encoder. The feature vectors corresponding to each feature are then concatenated to obtain a behavior feature vector, i.e., Concat(C,P,C',P',F). a ,F e ,F t (Understandably, if a user's behavioral features are only one or more of these, the concatenated vector needs to be adjusted accordingly.) Finally, the concatenated behavioral feature vector is input into a fully connected layer and calculated using the sigmoid function to obtain the third probability of recommending candidate news to the user. The concatenated behavioral feature vector may be multi-dimensional; the fully connected layer can be used to convert this multi-dimensional vector into a one-dimensional vector before calculating using the sigmoid function. By acquiring these behavioral features, user behavioral interests can be better extracted, leading to more accurate recommendations.
[0090] Based on the above embodiments, such as Figure 2 As shown, the target recommendation model may also include a prediction model, which can be used to predict the final probability of recommending candidate information to the user. That is, the prediction model can be used to determine the final probability of recommending candidate information to the user based on the first probability, the second probability, and the third probability.
[0091] The prediction model here can refer to the weighted average model mentioned in the above embodiments, or other probability calculation models. In the embodiments of the present application, in order to achieve better prediction effect, the prediction model can also be a machine learning model, such as an XGBoost (eXtreme Gradient Boosting) model. Through the XGBoost model, the first probability, the second probability and the third probability can be better fused to obtain a more accurate recommendation probability.
[0092] The target recommendation model in the present application can be composed of an Electra model, a user encoder and other network layers such as an XGBoost model. The detailed structure diagram can be as shown in Figure 3 .
[0093] In addition, before the information recommendation, the target recommendation model can also be trained through a large number of training samples. In the training process, the target recommendation model can be trained as a whole. In order to improve the training efficiency, the three models in the target recommendation model can be trained respectively, that is, the Electra model, the user encoder and the XGBoost model are trained respectively. For example, the Electra model is trained first, the network parameters of the Electra model are fixed after the training is completed, then the user encoder is trained, the network parameters of the Electra model and the user encoder are fixed after the training is completed, and then the XGBoost model is trained. After the model training is completed, the trained target recommendation model is obtained. In this way, through step-by-step training, the adjustment of the parameters of one model in the training process can be avoided, and the results of the other models can be avoided. Therefore, the training efficiency can be greatly improved.
[0094] Please refer to Figure 4 , Figure 4 The structure block diagram of an information recommendation device 200 provided by the embodiments of the present application is shown in the figure. The device 200 can be a module, a program segment or a code on an electronic device (such as a background server or a front-end device). It should be understood that the device 200 corresponds to the above-mentioned Figure 1 method embodiments, and can perform each step involved in the Figure 1 method embodiments. The specific functions of the device 200 can be referred to the description in the above text. To avoid repetition, the detailed description is appropriately omitted here.
[0095] Optionally, the device 200 includes:
[0096] The information acquisition module 210 is configured to acquire candidate information and user information of a user, wherein the user information includes historical reading information, behavior characteristics and target reading information of the user, and the target reading information refers to information of the same type as the candidate information in the historical reading information of the user.
[0097] The information recommendation module 220 is configured to acquire a probability of recommending the candidate information to the user according to the candidate information and the user information by using a target recommendation model.
[0098] Optionally, the information recommendation module 220 is configured to acquire a first probability of recommending the candidate information to the user according to the candidate information and the historical reading information by using a target recommendation model; acquire a second probability of recommending the candidate information to the user according to the candidate information and the target reading information by using the target recommendation model; acquire a third probability of recommending the candidate information to the user according to the behavior feature by using the target recommendation model; and determine a final probability of recommending the candidate information to the user based on the first probability, the second probability and the third probability by using the target recommendation model.
[0099] Optionally, the target recommendation model comprises a language model and a user encoder, and the information recommendation module 220 is configured to encode the candidate information and the historical reading information respectively by using the language model to obtain a corresponding candidate information encoding vector and a historical reading information encoding vector; calculate the historical reading information encoding vector and a position vector corresponding to the historical reading information by using the user encoder to obtain a first user vector; and acquire the first probability of recommending the candidate information to the user according to the first user vector and the candidate information encoding vector.
[0100] Optionally, the target recommendation model comprises a language model and a user encoder, and the information recommendation module 220 is configured to encode the candidate information and the target reading information respectively by using the language model to obtain a corresponding candidate information encoding vector and a target reading information encoding vector; calculate the target reading information encoding vector and a position vector corresponding to the target reading information by using the user encoder to obtain a second user vector; and acquire the second probability of recommending the candidate information to the user according to the second user vector and the candidate information encoding vector.
[0101] Optionally, the language model is an Electra model.
[0102] Optionally, the target recommendation model further comprises a prediction model, and the information recommendation module 220 is configured to determine the final probability of recommending the candidate information to the user based on the first probability, the second probability and the third probability by using the prediction model.
[0103] Optionally, the prediction model is an XGBoost model.
[0104] Optionally, the behavior feature comprises at least one of a category number of information read by the user, a historical information category reading probability, an information hotspot feature, an entity hotspot feature, and a user reading entity hotspot feature.
[0105] Optionally, the information recommendation module 220 is configured to convert each feature contained in the behavior feature into a corresponding feature vector by using a target recommendation model; splice the feature vectors corresponding to each feature by using the target recommendation model to obtain a behavior feature vector; and input the behavior feature vector into a full connection layer and calculate by using a sigmoid function to obtain a third probability of recommending the candidate information to the user by using the target recommendation model.
[0106] Optionally, the candidate information is candidate news information, the historical reading information is historical reading news information, and the target reading information is target reading news information.
[0107] It should be noted that, for the convenience and brevity of description, the specific working process of the apparatus described above can refer to the corresponding process in the foregoing method embodiments, which will not be described herein.
[0108] Please refer to Figure 5 , Figure 5 A structural schematic diagram of an electronic device for performing an information recommendation method according to an embodiment of the present application is shown in FIG. 10. The electronic device can include at least one processor 310, such as a CPU, at least one communication interface 320, at least one memory 330, and at least one communication bus 340. The communication bus 340 is used to realize the direct connection communication of these components. The communication interface 320 of the device in the embodiment of the present application is used to communicate signaling or data with other node devices. The memory 330 can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 330 can also be at least one storage device located away from the aforementioned processor. The memory 330 stores computer readable instructions. When the computer readable instructions are executed by the processor 310, the electronic device performs the method process described above. Figure 1
[0109] It can be understood that Figure 5 The structure shown is only schematic, and the electronic device can include more or fewer components than those shown in FIG. 10, or have a different configuration from that shown in FIG. 10. Figure 5 Figure 5 The components shown in FIG. 10 can be realized by hardware, software, or a combination thereof. Figure 5
[0110] The embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to perform the method as shown in the above method embodiments. Figure 1 The method performed by the electronic device in the method embodiment is shown.
[0111] The embodiment discloses a computer program product, which comprises a computer program stored on a non-transitory computer readable storage medium, and the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer can execute the method provided by the above method embodiments, for example, comprising the following steps.
[0112] obtaining candidate information and user information of a user, the user information comprising historical reading information, behavior characteristics and target reading information of the user, the target reading information being information of the same type as the candidate information in the historical reading information of the user;
[0113] obtaining a probability of recommending the candidate information to the user according to the candidate information and the user information by using a target recommendation model.
[0114] In summary, the embodiment of the present application provides an information recommendation method and device, an electronic device and a storage medium, the method obtains candidate information and some information of a user, including historical reading information, behavior characteristics and target reading information, analyzes and predicts by using a target recommendation model according to the information, and can obtain a probability of recommending the candidate information to the user, in the scheme, the behavior characteristics of the user and the related information of historical reading are considered when performing recommendation prediction, so that deeper semantic information can be extracted by using the target recommendation model, and potential behavior interests of the user can be deeply mined, and more accurate recommendation can be realized.
[0115] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division, and other division manners can be used in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some communication interfaces, and can be electrical, mechanical or other forms.
[0116] In addition, the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0117] Furthermore, each functional module in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0118] In this paper, relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations.
[0119] The above is only an embodiment of the present application and is not used to limit the protection scope of the present application. For those skilled in the art, the present application can have various changes and variations. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An information recommendation method characterized by comprising: The method comprises: obtaining candidate information and user information of a user, the user information comprising historical reading information, behavior characteristics and target reading information of the user, the target reading information being information of the same type as the candidate information in the historical reading information of the user, the behavior characteristics comprising at least one of a category number of reading information of the user, a historical information category reading probability, an information hotspot feature, an entity hotspot feature and a user reading entity hotspot feature; obtaining a probability of recommending the candidate information to the user according to the candidate information and the user information by using a target recommendation model; wherein the step of obtaining the probability of recommending the candidate information to the user according to the candidate information and the user information by using the target recommendation model comprises: obtaining a first probability of recommending the candidate information to the user according to the candidate information and the historical reading information by using the target recommendation model; obtaining a second probability of recommending the candidate information to the user according to the candidate information and the target reading information by using the target recommendation model; obtaining a third probability of recommending the candidate information to the user according to the behavior characteristics by using the target recommendation model; determining a final probability of recommending the candidate information to the user based on the first probability, the second probability and the third probability by using the target recommendation model; wherein the target recommendation model comprises a language model, a user encoder and a prediction model, the language model being an Electra model, the prediction model being an XGBoost model, the Electra model being used for encoding the candidate information, the historical reading information and the target reading information, the user encoder being used for processing position vectors of the historical reading information and the target reading information, and the XGBoost model being used for determining the final probability.
2. The method of claim 1, wherein, The step of obtaining the first probability of recommending the candidate information to the user according to the candidate information and the historical reading information by using the target recommendation model comprises: encoding the candidate information and the historical reading information respectively by using the language model to obtain corresponding candidate information encoding vectors and historical reading information encoding vectors; calculating the historical reading information encoding vectors and position vectors corresponding to the historical reading information by using the user encoder to obtain a first user vector; obtaining the first probability of recommending the candidate information to the user according to the first user vector and the candidate information encoding vectors.
3. The method of claim 1, wherein, The step of obtaining the second probability of recommending the candidate information to the user according to the candidate information and the target reading information by using the target recommendation model comprises: encoding the candidate information and the target reading information respectively by using the language model to obtain corresponding candidate information encoding vectors and target reading information encoding vectors; calculating the target reading information encoding vectors and position vectors corresponding to the target reading information by using the user encoder to obtain a second user vector; and The second probability of recommending the candidate information to the user is obtained according to the second user vector and the candidate information coding vector.
4. The method of claim 1, wherein, The final probability of recommending the candidate information to the user is determined by the target recommendation model based on the first probability, the second probability and the third probability, including: The final probability of recommending the candidate information to the user is determined by the target recommendation model based on the first probability, the second probability and the third probability.
5. The method of claim 1, wherein, The third probability of recommending the candidate information to the user is obtained by the target recommendation model according to the behavior characteristics, further including: The target recommendation model is used to convert each feature contained in the behavior characteristics into a corresponding feature vector. The target recommendation model is used to splice the feature vectors corresponding to each feature to obtain a behavior characteristic vector. The target recommendation model is used to input the behavior characteristic vector into a full connection layer and calculate it through a sigmoid function to obtain the third probability of recommending the candidate information to the user.
6. The method of claim 1, wherein, The candidate information is candidate news information, the historical reading information is historical reading news information, and the target reading information is target reading news information.
7. An information recommendation device characterized by comprising: The device includes: An information acquisition module is configured to acquire candidate information and user information of a user, the user information including historical reading information, behavior characteristics and target reading information of the user, the target reading information being information of the same type as the candidate information in the historical reading information of the user, and the behavior characteristics including at least one of a category number of reading information of the user, a historical information category reading probability, an information hotspot feature, an entity hotspot feature and a user reading entity hotspot feature. An information recommendation module is configured to acquire a probability of recommending the candidate information to the user by a target recommendation model according to the candidate information and the user information. The information recommendation module is specifically configured to acquire a first probability of recommending the candidate information to the user by a target recommendation model according to the candidate information and the historical reading information, acquire a second probability of recommending the candidate information to the user by the target recommendation model according to the candidate information and the target reading information, acquire a third probability of recommending the candidate information to the user by the target recommendation model according to the behavior characteristics, and determine a final probability of recommending the candidate information to the user by the target recommendation model based on the first probability, the second probability and the third probability. The target recommendation model includes a language model, a user encoder and a prediction model, the language model is an Electra model, the prediction model is an XGBoost model, the Electra model is used to code the candidate information, the historical reading information and the target reading information, the user encoder is used to process position vectors of the historical reading information and the target reading information, and the XGBoost model is used to determine the final probability.
8. An electronic device, comprising: A computer program product comprising a processor and a memory storing computer readable instructions which, when executed by the processor, operate the method of any of claims 1-6.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, operates the method of any of claims 1-6.
Citation Information
Patent Citations
Method and device for determining interest degree of user in article, equipment and storage medium
CN110162690A
Information recommendation processing method and device
CN114301973A