Information recommendation method, device, equipment and storage medium
By dividing sequence feature data by category and calculating attention information in sequence recommendation scenarios, the problems of information crossover requirements and intrusion risks are solved, thereby improving the accuracy of recommendation algorithms and the effect of user interest modeling.
Patent Information
- Application Number
- CN202610358854.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-23
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, the information crossover requirements and information intrusion risks of multiple sequence feature data in sequence recommendation scenarios cannot be effectively balanced, resulting in insufficient accuracy of recommendation algorithms.
By dividing sequence feature data into categories and calculating attention information within each category, sufficient cross-category interaction is achieved. The relevance between the recommended information and the user is determined through the attention information of different categories, thus avoiding the risk of information intrusion between different categories.
It improves the accuracy of recommendation algorithms, overcomes the problems of mutual interference between categories in early fusion and insufficient information crossover in late fusion, and reduces information loss, thus achieving more accurate user interest modeling.
Smart Images

Figure CN122285991A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to an information recommendation method and apparatus, an electronic device, and a storage medium. Background Technology
[0002] In recommender systems, especially in sequence recommendation scenarios, effectively utilizing sequence feature data is crucial, and the fusion of multiple sequence feature data has been a direction that the industry has been exploring. Attention-based fusion methods can be broadly categorized into three types: Early Fusion, Late Fusion, and Hybrid Fusion. However, these methods suffer from problems such as information intrusion, lack of effective cross-referencing, and information loss, failing to effectively balance the information cross-referencing requirements and information intrusion risks associated with multiple sequence feature data.
[0003] Therefore, how to effectively balance the information crossover requirements and information intrusion risks of multiple sequence feature data in sequence recommendation scenarios is an urgent problem to be solved in this field. Summary of the Invention
[0004] The purpose of this invention is to provide an information recommendation method to address the problem of effectively balancing the information cross-requirements and information intrusion risks of multiple sequence feature data in sequence recommendation scenarios. The specific technical solution is as follows: In a first aspect of this invention, an information recommendation method is provided, the method comprising: Obtain the sequence feature data corresponding to the information to be recommended, wherein the sequence feature data is the data collected when the user interacts with the information to be recommended; Determine the category corresponding to the sequence feature data; Determine the attention information corresponding to the sequence feature data of each category; Based on the sequence feature data and the attention information corresponding to the category of the sequence feature data, the relevance information between the information to be recommended and the user is determined; Based on the relevance between the information to be recommended and the user, the information to be recommended is recommended to the user.
[0005] Optionally, the attention information includes a query vector and an attention matrix, and the step of determining the attention information corresponding to the sequence feature data of the category includes: Determine the target category from the categories corresponding to the sequence feature data; Obtain the vector of the information to be recommended corresponding to the information to be recommended and the feature vector corresponding to the sequence feature data of the target category; Calculate the query vector based on the vector of information to be recommended; Calculate the attention matrix based on the query vector and the feature vector; The query vector and the attention matrix are used as attention information corresponding to the sequence feature data of the target category.
[0006] Optionally, determining the relevance information between the information to be recommended and the user based on the sequence feature data and the attention information corresponding to the category of the sequence feature data includes: The attention matrices corresponding to the sequence feature data of each category are fused to obtain the fused attention matrix; The value vector is determined based on the sequence feature data of the category and the query vector corresponding to the sequence feature data of the category; Multiplying the fused attention matrix with the value vector yields the relevance information between the information to be recommended and the user.
[0007] Optionally, the fusion of attention matrices corresponding to the sequence feature data of each category to obtain the fused attention matrix includes: Obtain the fused projection matrix; The attention matrices corresponding to the sequence feature data of each category are concatenated, or the attention matrices corresponding to the sequence feature data of each category are added together to obtain the target attention matrix; The target attention matrix is mapped to the fused attention matrix using the fused projection matrix.
[0008] Optionally, determining the value vector based on the target features of the category and the corresponding query vector includes: The sequence feature data of each category are concatenated, or the sequence feature data of each category are added together to obtain the fused sequence feature data; The query vectors corresponding to the sequence feature data of each category are concatenated, or the query vectors corresponding to the sequence feature data of each category are added together to obtain the fused query vector; The value vector is obtained by multiplying the fused sequence feature data with the fused query vector.
[0009] Optionally, recommending the information to be recommended to the user based on the relevance information between the information to be recommended and the user includes: Based on the correlation information between the information to be recommended and the user, predictive feedback data of the user on the information to be recommended is determined. The predictive feedback data represents the predicted interaction between the user and the information to be recommended. The predictive feedback data includes at least the predicted click-through rate. The information to be recommended is sorted according to the predicted feedback data to obtain the sorted information to be recommended. The sorted information to be recommended is recommended to the user.
[0010] Optionally, the sequence feature data of the category includes at least the feature data of the information to be recommended, the feature data of the user, and the contextual feature data when the user interacts with the information to be recommended.
[0011] In a second aspect of the invention, an information recommendation device is also provided, the device comprising: The feature acquisition module is used to acquire sequence feature data corresponding to the information to be recommended, wherein the sequence feature data is data collected when the user interacts with the information to be recommended; The feature classification module is used to determine the category corresponding to the sequence feature data; An attention determination module is used to determine the attention information corresponding to the sequence feature data of the respective categories; The relevant information determination module is used to determine the relevance information between the information to be recommended and the user based on the sequence feature data and the attention information corresponding to the category of the sequence feature data; The information recommendation module is used to recommend the information to be recommended to the user based on the relevance information between the information to be recommended and the user.
[0012] In another aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor, when executing the program stored in the memory, implements any of the above-described information recommendation methods.
[0013] In another aspect of the present invention, a computer-readable storage medium is also provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform any of the information recommendation methods described above.
[0014] In this embodiment of the invention, sequence feature data corresponding to the information to be recommended is obtained. This sequence feature data is collected when a user interacts with the information to be recommended. The category corresponding to the sequence feature data is determined. Attention information corresponding to the sequence feature data of each category is determined. Based on the sequence feature data and the attention information corresponding to the category, the relevance information between the information to be recommended and the user is determined. Based on the relevance information between the information to be recommended and the user, the information to be recommended is recommended to the user. The information recommendation method provided in this embodiment of the invention divides the sequence feature data by category and calculates attention information within each category, achieving sufficient cross-referencing of the sequence feature data within each category and ensuring effective learning of the sequence feature information of each category. Subsequently, based on the sequence feature data of different categories and their corresponding attention information, the relevance information between the information to be recommended and the user is determined. This embodiment of the invention avoids the risk of information intrusion between sequence feature data of different categories while ensuring sufficient cross-referencing within each category. Compared with existing sequence feature data fusion methods such as early fusion, late fusion, and hybrid fusion, the embodiments of the present invention overcome the problem of mutual interference between different categories of sequence feature data in early fusion, and solve the defect of insufficient cross-information within categories in late fusion. At the same time, compared with hybrid fusion, it reduces information loss, thereby enabling more accurate modeling of user interests and improving the accuracy of recommendation algorithms. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0016] Figure 1 This is a flowchart illustrating the steps of an embodiment of the information recommendation method of the present invention; Figure 2 This is a schematic diagram of the sequence feature data processing flow of an embodiment of the information recommendation method of the present invention; Figure 3 This is a structural block diagram of an embodiment of an information recommendation device of the present invention; Figure 4 This is a schematic diagram of the structure of a device provided in an embodiment of the present invention. Detailed Implementation
[0017] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.
[0018] Sequence feature data is data collected when a user interacts with information to be recommended. It includes the ID of the information to be recommended (i.e., the identifier of the information to be recommended) and side information. Side information can specifically include the attribute features of the information to be recommended, user characteristics, and contextual features of the user's interaction with the information to be recommended. In recommendation systems, especially in sequence recommendation scenarios, effectively utilizing sequence feature data is crucial. The fusion of multiple sequence feature data sets is a direction that the industry has been exploring. However, most current fusion methods suffer from information intrusion problems, negatively impacting the learning of the ID of the information to be recommended in the recommendation system. Specifically, attention-based fusion methods can be broadly classified into three categories.
[0019] 1. Early Fusion: The ID of the information to be recommended is fused with the side information before attention calculation. However, early fusion has the problem of information intrusion, that is, during the fusion process, the side information excessively interferes with the attention weights of the ID of the information to be recommended, thereby interfering with the learning of the ID vector of the information to be recommended.
[0020] 2. Late-stage fusion: This method calculates attention separately for the ID and side information of the information to be recommended, and then fuses the attention of the two in a later stage. However, late-stage fusion lacks the effective cross-fertilization of the ID and side information of the information to be recommended in the early stage, while the early cross-fertilization is very important for improving the feature performance.
[0021] 3. Hybrid Fusion: Side information is only involved in the calculation of attention weights. That is, side information is only added when calculating attention weights, and only the ID of the information to be recommended is used during the attention weighting calculation, without using side information. This achieves the introduction of the ID of the information to be recommended and the cross-referencing of side information while avoiding the risk of information intrusion. However, the hybrid fusion method only involves information cross-referencing in the attention weighting calculation, and information loss still occurs.
[0022] To recommend information based on sequence feature data, it is also necessary to model user interests in the fused sequence feature data. In existing technologies, most sequence recommendation scenarios are modeled using target attention. The main method of implementing target attention based on Transformer is as follows: the query vector is calculated using the vector of the information to be recommended, and the key vector and value vector are calculated using the feature vectors corresponding to the fused sequence feature data, followed by attention calculation. This can be expressed as the following formulas (1) and (2):
[0023] in, , (1) (2) Where TA() represents target attention calculation, Attention() represents attention calculation, and softmax() is a normalized exponential function.
[0024] It is the behavior sequence embedding (behavior sequence vector), which is the feature vector corresponding to the fused sequence feature data; d is the embedding of the target item, which is the information to be recommended. The embedding of the target item is the vector of the information to be recommended. d is the embedding dimension. R represents the set of real numbers, which is a commonly used set notation in machine learning and mathematics. express It is an L x d real matrix. express It is a 1xd real number matrix. Q is the query vector in the attention calculation, K is the key vector in the attention calculation, and V is the value vector in the attention calculation; It is The matrix of Q is obtained by linear projection, and its dimension is d*d; It is The linear projection yields a matrix of K with dimensions d*d; It is Performing a linear projection yields a matrix of V with dimensions d*d; It is the dimension of Q. =d; T denotes the transpose of the matrix.
[0025] In the aforementioned existing user interest modeling methods, when calculating attention, Q and K are actually the fusion of multiple sequence feature data. Although different sequence feature data can effectively cross-reference information, the gradient is shared during attention calculation. That is, in the target attention calculation, Q and K obtained from the fusion of multiple sequence feature data both use... Linear projection using the projection matrix still introduces the problem of information intrusion.
[0026] Based on the problems existing in the prior art, the present invention proposes an information recommendation method to solve or at least partially solve the problems existing in the prior art.
[0027] Reference Figure 1 This is a flowchart illustrating the steps of an embodiment of an information recommendation method of the present invention, including the following steps: Step 101: Obtain the sequence feature data corresponding to the information to be recommended. The sequence feature data is the data collected when the user interacts with the information to be recommended.
[0028] Step 102: Determine the category corresponding to the sequence feature data.
[0029] Step 103: Determine the attention information corresponding to the sequence feature data of the respective categories.
[0030] Step 104: Determine the relevance information between the information to be recommended and the user based on the sequence feature data and the attention information corresponding to the category of the sequence feature data.
[0031] Step 105: Recommend the information to be recommended to the user based on the correlation information between the information to be recommended and the user.
[0032] In this embodiment of the invention, the information to be recommended can be videos, advertisements, products, etc. When a user interacts with the information to be recommended, such as browsing advertisements, clicking videos, or purchasing products, preset feature data is collected as sequence feature data and stored.
[0033] Sequence feature data refers to data related to the information to be recommended, the user, and the interaction between the user and the information to be recommended. It is data collected when different users interact with different information to be recommended. For example, sequence feature data may include the ID sequence of the information to be recommended clicked by the user [ID1, ID2, ...], and the side information features of the corresponding ID of the information to be recommended, such as the time [T1, T2, ...] when the user clicked the information to be recommended with that ID.
[0034] In one embodiment, sequence feature data can be stored in a KV store (i.e., a key-value store).
[0035] In step 101, the sequence feature data corresponding to the information to be recommended can be obtained from the storage via an online request. In one embodiment, if the sequence feature data is stored in a key-value store, the sequence feature data corresponding to the information to be recommended is obtained from the key-value store.
[0036] In step 102, the category corresponding to the sequence feature data is determined by classifying the sequence feature data. In one example, the sequence feature data can be classified according to feature semantics, business rules, etc. In one embodiment, a model learning method is used to learn the classification method of the sequence feature data, and the trained model is used to classify the sequence feature data.
[0037] In step 103, attention information is determined for each category of sequence feature data. This ensures sufficient information cross-referencing within each category of sequence feature data. In one embodiment, the attention information includes the attention matrix, query vector, and key vector used in attention calculation.
[0038] In step 104, based on the sequence feature data and the attention information corresponding to the sequence feature data of each category determined in step 103, the relevance information between the information to be recommended and the user is determined. The relevance information is a representation of the degree of interest of each user in each piece of information to be recommended in the model. Since sufficient information cross-referencing has been achieved within the sequence feature data of each category in step 103, the relevance information obtained by fusing and learning the sequence feature data and the attention information corresponding to the sequence feature data of each category in step 104 can avoid the problem of information intrusion between different sequence feature data.
[0039] In step 105, since the degree of interest of different users in different recommended information can be determined based on the relevance information between the recommended information and the user, the recommended information can be recommended to the user based on the relevance information.
[0040] The information recommendation method provided in this invention divides sequence feature data into categories and calculates attention information within each category, achieving sufficient cross-referencing of sequence feature data within each category and ensuring effective learning of sequence feature information from each category. Subsequently, based on the sequence feature data of different categories and their corresponding attention information, the relevance information between the recommended information and the user is determined. This invention avoids the risk of information intrusion between sequence feature data from different categories while ensuring sufficient cross-referencing within each category. Compared with existing sequence feature data fusion methods such as early fusion, late fusion, and hybrid fusion, this invention overcomes the problem of mutual interference between sequence feature data of different categories in early fusion and solves the defect of insufficient cross-referencing within categories in late fusion. Furthermore, it reduces information loss compared to hybrid fusion, thereby enabling more accurate modeling of user interests and improving the accuracy of the recommendation algorithm.
[0041] Optionally, in step 102, the sequence feature data of the category includes at least the feature data of the information to be recommended, the feature data of the user, and the context feature data when the user interacts with the information to be recommended.
[0042] In this embodiment of the invention, when classifying sequence feature data, if the sequence feature data is classified according to the feature semantics, it can be divided into three types of sequence feature data: feature data of the information to be recommended, feature data of the user, and context feature data when the user interacts with the information to be recommended.
[0043] Among them, the feature data of the information to be recommended describes the characteristics of the recommended object itself, also known as item features. For example, the ID of the information to be recommended (ad ID, customer ID, etc.) and the attribute features of the information to be recommended can be classified as feature data of the information to be recommended.
[0044] User feature data describes a user's characteristics, including basic user attributes, behavioral history, and personalized preferences. For example, the number of times a user's ID is displayed or clicked on a piece of information to be recommended can be classified as user feature data.
[0045] Contextual feature data describing the environment in which a user interacts with the information to be recommended, such as the location and timestamp of the information to be recommended at the time of interaction, can all be classified as contextual feature data when a user interacts with the information to be recommended.
[0046] In this embodiment of the invention, sequence feature data is classified according to feature semantics to obtain sequence feature data of categories such as feature data of information to be recommended, feature data of users, and context feature data when users interact with information to be recommended. This is used to perform sufficient cross-referencing within each category of sequence feature data, thereby avoiding the problem of information intrusion caused by large differences in feature semantics between different categories of sequence feature data and the sharing of gradients between different categories of sequence feature data when calculating attention.
[0047] Optionally, the attention information includes a query vector and an attention matrix, and step 103 includes: Determine the target category from the categories corresponding to the sequence feature data; Obtain the vector of the information to be recommended corresponding to the information to be recommended and the feature vector corresponding to the sequence feature data of the target category; Calculate the query vector based on the vector of information to be recommended; Calculate the attention matrix based on the query vector and the feature vector; The query vector and the attention matrix are used as attention information corresponding to the sequence feature data of the target category.
[0048] In this embodiment of the invention, attention information corresponding to the sequence feature data of each category is determined for each category of sequence feature data.
[0049] The target category is determined from the categories corresponding to the sequence feature data, and the sequence feature data of the target category is the sequence feature data of the category currently being processed. In one embodiment, the sequence feature data of the target category can be fused first. The sequence feature data of the target category can be fused using element addition (i.e., element-wise addition), and subsequent processing uses the fused sequence feature data of the target category.
[0050] For the sequence features of the target category, determine the vector of the information to be recommended corresponding to the information to be recommended and the feature vector corresponding to the sequence feature data of the target category needed for attention calculation. Specifically, the vector of the information to be recommended is the vector obtained by initializing the information to be recommended into the attention processing model, and the feature vector corresponding to the sequence feature data of the target category is the vector obtained by initializing the sequence feature data of the target category into the attention processing model.
[0051] Calculate the query vector and key vector corresponding to the sequence feature data of the target category based on the information vector to be recommended. Then, calculate the attention matrix corresponding to the sequence feature data of the target category based on the query vector, key vector, and feature vector. Use the query vector and attention matrix as the attention information corresponding to the sequence feature data of the target category, thereby realizing independent attention calculation for the sequence feature data of each category.
[0052] In one embodiment, the attention calculation of the sequence feature data of the target category can be expressed as the following formula (3): (3) Where Attention() represents attention calculation, softmax() is the normalized exponential function, Q is the query vector, K is the key vector, and T represents the transpose of the matrix. It is the dimension of Q. , It is a projection matrix. It is the feature vector corresponding to the sequence feature data of the target category. It is the vector of information to be recommended, corresponding to the information to be recommended.
[0053] Using formula (3), based on the information vector to be recommended and projection matrix The query vector Q is obtained through projection calculation, based on the feature vector corresponding to the sequence feature data of the target category. and projection matrix The key vector K is obtained by projection calculation, and then the attention matrix corresponding to the sequence feature data of the target category is calculated based on the query vector Q and the key vector K.
[0054] In this embodiment of the invention, attention information is obtained by first performing attention calculation within the sequence feature data of each category, thereby achieving sufficient cross-fertilization within the sequence feature data of each category. This avoids the problem of information intrusion caused by large differences in feature semantics between sequence feature data of different categories and the sharing of gradients between sequence feature data of different categories when calculating attention.
[0055] Optionally, step 104 includes: The attention matrices corresponding to the sequence feature data of each category are fused to obtain the fused attention matrix; The value vector is determined based on the sequence feature data of the category and the query vector corresponding to the sequence feature data of the category; Multiplying the fused attention matrix with the value vector yields the relevance information between the information to be recommended and the user.
[0056] In this embodiment of the invention, after determining attention information for each category of sequence feature data, sequence feature data of different categories learn fully through the fusion learning of upper-level attention, thereby solving the problem of information intrusion in sequence feature data fusion.
[0057] Specifically, the attention matrix corresponding to the sequence feature data of each category is fused to obtain the fused attention matrix. The value vector in the attention calculation is determined based on the sequence feature data of each category and the query vector corresponding to the sequence feature data of that category. The fused attention matrix is multiplied by the value vector to obtain the relevance information between the information to be recommended and the user.
[0058] In one embodiment, element-wise multiplication of the matrix can be used to multiply the fused attention matrix with the value vector to obtain the relevance information between the information to be recommended and the user.
[0059] In this embodiment of the invention, after calculating attention information within each type of sequence feature data, the relevance information between the information to be recommended and the user is determined based on the sequence feature data of different categories and their corresponding attention information. This avoids the risk of information intrusion between sequence feature data of different categories while ensuring sufficient cross-referencing within each category.
[0060] Optionally, the fusion of attention matrices corresponding to the sequence feature data of each category to obtain the fused attention matrix includes: Obtain the fused projection matrix; The attention matrices corresponding to the sequence feature data of each category are concatenated, or the attention matrices corresponding to the sequence feature data of each category are added together to obtain the target attention matrix; The target attention matrix is mapped to the fused attention matrix using the fused projection matrix.
[0061] In this embodiment of the invention, the fusion of attention matrices corresponding to sequence feature data of various categories can be achieved through the following steps: First, the attention matrices corresponding to the sequence feature data of each category are concatenated or added to obtain the target attention matrix. Then, the fusion projection matrix is obtained; this is a learnable parameter in the attention processing model. Finally, the target attention matrix is multiplied by the fusion projection matrix to map the target attention matrix to the fused attention matrix.
[0062] This invention integrates attention matrices corresponding to sequence feature data from different categories to determine the relevance between the recommended information and the user. This ensures sufficient cross-referencing within each category while avoiding the risk of information intrusion between sequence feature data from different categories.
[0063] Optionally, determining the value vector based on the target features of the category and the corresponding query vector includes: The sequence feature data of each category are concatenated, or the sequence feature data of each category are added together to obtain the fused sequence feature data; The query vectors corresponding to the sequence feature data of each category are concatenated, or the query vectors corresponding to the sequence feature data of each category are added together to obtain the fused query vector; The value vector is obtained by multiplying the fused sequence feature data with the fused query vector.
[0064] In this embodiment of the invention, the value vector can be calculated through the following steps: Sequence feature data from different categories are fused using either concatenation or addition to obtain fused sequence feature data. Query vectors corresponding to the sequence feature data from different categories are then fused using the same method to obtain a fused query vector. Finally, the fused sequence feature data and the fused query vector are multiplied to obtain a value vector.
[0065] In one embodiment, element-wise multiplication can be used to multiply the fused sequence feature data with the fused query vector to obtain a value vector.
[0066] This invention integrates sequence feature data from different categories and calculates a value vector by integrating query vectors corresponding to sequence feature data from different categories. This value vector is then used to determine the relevance between the information to be recommended and the user. This approach ensures sufficient cross-referencing within each category while avoiding the risk of information intrusion between sequence feature data from different categories.
[0067] Optionally, step 105 includes: Based on the correlation information between the information to be recommended and the user, predictive feedback data of the user on the information to be recommended is determined. The predictive feedback data represents the predicted interaction between the user and the information to be recommended. The predictive feedback data includes at least the predicted click-through rate. The information to be recommended is sorted according to the predicted feedback data to obtain the sorted information to be recommended. The sorted information to be recommended is recommended to the user.
[0068] In this embodiment of the invention, after obtaining the correlation information between the information to be recommended and the user, further processing is performed to obtain the user's predicted feedback data regarding the information to be recommended. The predicted feedback data represents the predicted interaction between the user and the information to be recommended, i.e., the predicted user feedback regarding the information to be recommended. The predicted feedback data includes at least the predicted click-through rate (PCTR), and may also include other business metrics, such as predicted impressions, predicted viewing time, and predicted viewing completion rate, which can be specifically set according to actual needs.
[0069] In one embodiment, the correlation information between the information to be recommended and the user can be input into an MLP (Multilayer Perceptron) to obtain the prediction feedback data output by the MLP.
[0070] The recommended information is sorted according to the predicted feedback data, and then the sorted recommended information is recommended to the user.
[0071] In this embodiment of the invention, the relevance information between the information to be recommended and the user is further processed to obtain predictive feedback data for the user regarding the information to be recommended. This allows for the recommendation of information to the user, sorted according to the predictive feedback data. Because the relevance information is processed in the early stages to ensure sufficient cross-referencing within each category while avoiding the risk of information intrusion from sequence feature data between different categories, more accurate predictive feedback data can be obtained, enabling precise information recommendations to the user.
[0072] To enable those skilled in the art to more clearly understand the information recommendation method shown in the embodiments of the present invention, the following describes... Figure 2The process for processing sequence feature data in the embodiments of the present invention will be described.
[0073] Reference Figure 2 This is a schematic diagram of the sequence feature data processing flow of an embodiment of the information recommendation method of the present invention.
[0074] like Figure 2 As shown, according to the semantic features, the sequence feature data can be classified into three types: the feature data X of the information to be recommended, the feature data A of the user, and the contextual feature data P when the user interacts with the information to be recommended.
[0075] Using formula (3), the query vector corresponding to the feature data X of the information to be recommended is calculated respectively. and key vector The query vector corresponding to user feature data A and key vector And the query vector corresponding to the contextual feature data P when the user interacts with the information to be recommended. and key vector Based on the query vector corresponding to the feature data X of the information to be recommended. and key vector Calculate the attention matrix Attention 1 corresponding to the feature data X of the information to be recommended; and calculate the query vector corresponding to the user's feature data A. and key vector Calculate the attention matrix Attention2 corresponding to the user's feature data A; and calculate the query vector corresponding to the context feature data P when the user interacts with the information to be recommended. and key vector Calculate the attention matrix Attention 3 corresponding to the contextual feature data P when the user interacts with the information to be recommended.
[0076] Attention matrices Attention 1, Attention 2, and Attention 3 are fused to obtain the fused attention matrix Fused Attention. In one embodiment, the attention matrices are fused according to the following formula (4): f(A1,A2,A3) = (A1+A2+A3)*W(4) Where A1 is the attention matrix Attention 1, A2 is the attention matrix Attention 2, A3 is the attention matrix Attention 3, f(A1,A2,A3) is the fused attention matrix Fused Attention, and W is the fused projection matrix.
[0077] The sequence feature data X, A, and P of each category are fused to obtain the fused sequence feature data. ; Query vectors corresponding to sequence feature data of each category , , The query vector is obtained by merging the query vectors. The fused sequence feature data With the merged query vector Multiply them to obtain the value vector V.
[0078] The fused attention matrix Fused Attention is multiplied by the value vector V to obtain the feature representation (FR) information, which is the relevance between the information to be recommended and the user. The relevance information FR is then input into the MLP to obtain the PCTR output by the MLP, and the information to be recommended is then recommended to the user based on the PCTR.
[0079] The information recommendation method provided in this invention divides sequence feature data into categories and calculates attention information within each category, achieving sufficient cross-referencing of sequence feature data within each category and ensuring effective learning of sequence feature information from each category. Subsequently, based on the sequence feature data of different categories and their corresponding attention information, the relevance information between the recommended information and the user is determined. This invention avoids the risk of information intrusion between sequence feature data from different categories while ensuring sufficient cross-referencing within each category. Compared with existing sequence feature data fusion methods such as early fusion, late fusion, and hybrid fusion, this invention overcomes the problem of mutual interference between sequence feature data of different categories in early fusion and solves the defect of insufficient cross-referencing within categories in late fusion. Furthermore, it reduces information loss compared to hybrid fusion, thereby enabling more accurate modeling of user interests and improving the accuracy of the recommendation algorithm.
[0080] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0081] Based on the above embodiments, this embodiment also provides an information recommendation device, which is applied to electronic devices such as terminal devices and servers.
[0082] Reference Figure 3The diagram illustrates a structural block diagram of an embodiment of an information recommendation device according to the present invention, which may specifically include the following modules: Feature acquisition module 301 is used to acquire sequence feature data corresponding to the information to be recommended, wherein the sequence feature data is data collected when the user interacts with the information to be recommended; Feature classification module 302 is used to determine the category corresponding to the sequence feature data; Attention determination module 303 is used to determine the attention information corresponding to the sequence feature data of the categories respectively; The relevant information determination module 304 is used to determine the relevance information between the information to be recommended and the user based on the sequence feature data and the attention information corresponding to the category corresponding to the sequence feature data; The information recommendation module 305 is used to recommend the information to be recommended to the user based on the relevance information between the information to be recommended and the user.
[0083] Optionally, the attention information includes a query vector and an attention matrix, and the attention determination module 303 includes: The target category determination submodule is used to determine the target category from the categories corresponding to the sequence feature data; The vector acquisition submodule is used to acquire the vector of the information to be recommended corresponding to the information to be recommended and the feature vector corresponding to the sequence feature data of the target category; The query vector calculation submodule is used to calculate the query vector based on the information vector to be recommended. An attention matrix calculation submodule is used to calculate the attention matrix based on the query vector and the feature vector; The attention information determination submodule is used to treat the query vector and the attention matrix as attention information corresponding to the sequence feature data of the target category.
[0084] Optionally, the relevant information determination module 304 includes: The attention matrix fusion submodule is used to fuse the attention matrices corresponding to the sequence feature data of each category to obtain the fused attention matrix. The value vector determination submodule is used to determine the value vector based on the sequence feature data of the category and the query vector corresponding to the sequence feature data of the category; The relevance information calculation submodule is used to multiply the fused attention matrix with the value vector to obtain the relevance information between the information to be recommended and the user.
[0085] Optionally, the attention matrix fusion submodule is specifically used for: Obtain the fused projection matrix; The attention matrices corresponding to the sequence feature data of each category are concatenated, or the attention matrices corresponding to the sequence feature data of each category are added together to obtain the target attention matrix; The target attention matrix is mapped to the fused attention matrix using the fused projection matrix.
[0086] Optionally, the value vector determination submodule is specifically used for: The sequence feature data of each category are concatenated, or the sequence feature data of each category are added together to obtain the fused sequence feature data; The query vectors corresponding to the sequence feature data of each category are concatenated, or the query vectors corresponding to the sequence feature data of each category are added together to obtain the fused query vector; The value vector is obtained by multiplying the fused sequence feature data with the fused query vector.
[0087] Optionally, the information recommendation module 305 includes: The prediction data determination submodule is used to determine the user's predicted feedback data on the recommended information based on the correlation information between the user and the user. The predicted feedback data represents the predicted interaction between the user and the recommended information, and the predicted feedback data includes at least the predicted click-through rate. The information sorting submodule is used to sort the information to be recommended according to the prediction feedback data to obtain the sorted information to be recommended. The sorting information recommendation submodule is used to recommend the sorted information to be recommended to the user.
[0088] Optionally, the sequence feature data of the category includes at least the feature data of the information to be recommended, the feature data of the user, and the contextual feature data when the user interacts with the information to be recommended.
[0089] This invention also provides an electronic device, such as... Figure 4 As shown, it includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404. Memory 403 is used to store computer programs; When processor 401 executes the program stored in memory 403, it performs the following steps: Obtain the sequence feature data corresponding to the information to be recommended, wherein the sequence feature data is the data collected when the user interacts with the information to be recommended; Determine the category corresponding to the sequence feature data; Determine the attention information corresponding to the sequence feature data of each category; Based on the sequence feature data and the attention information corresponding to the category of the sequence feature data, the relevance information between the information to be recommended and the user is determined; Based on the relevance between the information to be recommended and the user, the information to be recommended is recommended to the user.
[0090] Optionally, the attention information includes a query vector and an attention matrix, and the step of determining the attention information corresponding to the sequence feature data of the category includes: Determine the target category from the categories corresponding to the sequence feature data; Obtain the vector of the information to be recommended corresponding to the information to be recommended and the feature vector corresponding to the sequence feature data of the target category; Calculate the query vector based on the vector of information to be recommended; Calculate the attention matrix based on the query vector and the feature vector; The query vector and the attention matrix are used as attention information corresponding to the sequence feature data of the target category.
[0091] Optionally, determining the relevance information between the information to be recommended and the user based on the sequence feature data and the attention information corresponding to the category of the sequence feature data includes: The attention matrices corresponding to the sequence feature data of each category are fused to obtain the fused attention matrix; The value vector is determined based on the sequence feature data of the category and the query vector corresponding to the sequence feature data of the category; Multiplying the fused attention matrix with the value vector yields the relevance information between the information to be recommended and the user.
[0092] Optionally, the fusion of attention matrices corresponding to the sequence feature data of each category to obtain the fused attention matrix includes: Obtain the fused projection matrix; The attention matrices corresponding to the sequence feature data of each category are concatenated, or the attention matrices corresponding to the sequence feature data of each category are added together to obtain the target attention matrix; The target attention matrix is mapped to the fused attention matrix using the fused projection matrix.
[0093] Optionally, determining the value vector based on the target features of the category and the corresponding query vector includes: The sequence feature data of each category are concatenated, or the sequence feature data of each category are added together to obtain the fused sequence feature data; The query vectors corresponding to the sequence feature data of each category are concatenated, or the query vectors corresponding to the sequence feature data of each category are added together to obtain the fused query vector; The value vector is obtained by multiplying the fused sequence feature data with the fused query vector.
[0094] Optionally, recommending the information to be recommended to the user based on the relevance information between the information to be recommended and the user includes: Based on the correlation information between the information to be recommended and the user, predictive feedback data of the user on the information to be recommended is determined. The predictive feedback data represents the predicted interaction between the user and the information to be recommended. The predictive feedback data includes at least the predicted click-through rate. The information to be recommended is sorted according to the predicted feedback data to obtain the sorted information to be recommended. The sorted information to be recommended is recommended to the user.
[0095] Optionally, the sequence feature data of the category includes at least the feature data of the information to be recommended, the feature data of the user, and the contextual feature data when the user interacts with the information to be recommended.
[0096] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0097] The communication interface is used for communication between the aforementioned terminal and other devices.
[0098] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0099] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0100] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform any of the information recommendation methods described in the above embodiments.
[0101] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0102] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0103] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0104] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. An information recommendation method characterized by comprising: The method comprises: obtaining sequence feature data corresponding to the to-be-recommended information, the sequence feature data being data collected when a user interacts with the to-be-recommended information; determining a category corresponding to the sequence feature data; respectively determining attention information corresponding to the sequence feature data of the category; determining relevance information between the to-be-recommended information and the user according to the sequence feature data and the attention information corresponding to the category corresponding to the sequence feature data; recommending the to-be-recommended information to the user according to the relevance information between the to-be-recommended information and the user.
2. The information recommendation method according to claim 1, characterized by, The attention information comprises a query vector and an attention matrix, and the respective determination of the attention information corresponding to the sequence feature data of the category comprises: determining a target category from the category corresponding to the sequence feature data; obtaining a to-be-recommended information vector corresponding to the to-be-recommended information and a feature vector corresponding to the sequence feature data of the target category; calculating the query vector according to the to-be-recommended information vector; calculating the attention matrix according to the query vector and the feature vector; taking the query vector and the attention matrix as the attention information corresponding to the sequence feature data of the target category.
3. The information recommendation method according to claim 2, characterized by, The determination of the relevance information between the to-be-recommended information and the user according to the sequence feature data and the attention information corresponding to the category corresponding to the sequence feature data comprises: fusing the attention matrices corresponding to the sequence feature data of each category to obtain a fused attention matrix; determining a value vector according to the sequence feature data of the category and the query vector corresponding to the sequence feature data of the category; multiplying the fused attention matrix and the value vector to obtain the relevance information between the to-be-recommended information and the user.
4. The information recommendation method according to claim 3, characterized by, The fusion of the attention matrices corresponding to the sequence feature data of each category to obtain a fused attention matrix comprises: obtaining a fusion projection matrix; splicing or adding the attention matrices corresponding to the sequence feature data of each category to obtain a target attention matrix; mapping the target attention matrix into the fused attention matrix by using the fusion projection matrix.
5. The information recommendation method according to claim 3, characterized by, The determination of the value vector according to the target feature of the category and the corresponding query vector comprises: splicing or adding the sequence feature data of each category to obtain fused sequence feature data; splicing or adding the query vectors corresponding to the sequence feature data of each category to obtain a fused query vector; multiplying the fused sequence feature data and the fused query vector to obtain the value vector.
6. The information recommendation method according to claim 1, characterized by, The recommendation of the to-be-recommended information to the user according to the relevance information between the to-be-recommended information and the user comprises: According to the relevance information between the to-be-recommended information and the user, determine predicted feedback data of the user on the to-be-recommended information, the predicted feedback data representing a predicted case of interaction between the user and the to-be-recommended information, the predicted feedback data at least including a predicted click rate; Sort the to-be-recommended information according to the predicted feedback data, to obtain sorted to-be-recommended information; Recommend the sorted to-be-recommended information to the user.
7. The information recommendation method according to Claim 1, characterized by, The sequence feature data of the category at least includes feature data of the to-be-recommended information, feature data of the user, and context feature data when the user interacts with the to-be-recommended information.
8. An information recommendation device characterized by comprising: The device comprises: A feature acquisition module for acquiring sequence feature data corresponding to to-be-recommended information, the sequence feature data being data collected when a user interacts with the to-be-recommended information; A feature classification module for determining a category corresponding to the sequence feature data; An attention determination module for determining attention information corresponding to sequence feature data of the category respectively; A relevance information determination module for determining relevance information between the to-be-recommended information and the user according to the sequence feature data and the attention information corresponding to the category corresponding to the sequence feature data; An information recommendation module for recommending the to-be-recommended information to the user according to the relevance information between the to-be-recommended information and the user.
9. An electronic device, comprising: It comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus; The memory is used for storing a computer program; The processor is used for executing the program stored on the memory, to realize the method steps of any one of claims 1-7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to realize the method of any one of claims 1-7.