A method and apparatus for information recommendation, an electronic device, and a storage medium

CN115795170BActive Publication Date: 2026-10-30BEIJING IQIYI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211640924.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-20
Publication Date
2026-10-30
Estimated Expiration
2042-12-20

AI Technical Summary

Technical Problem

[0004]然而,上述视频推荐方法仅参考用户当前输入关键词,无法为用户提供个性化推荐,导致推荐的视频资源不容易符合用户预期,难以实现精准推荐

Benefits of technology

[0047]本发明实施例通过响应于用户的搜索操作,获取用户的多个历史行为信息和预设的搜索资源库中的候选推荐信息,进而可以针对每个历史行为信息进行向量化,生成每个历史行为信息的行为向量信息,并基于多个行为向量信息之间的向量相关性,确定多个历史行为信息的行为特征信息,进而可以根据行为特征信息和候选推荐信息,确定每个行为向量信息对应的权重信息,并基于行为向量信息和权重信息生成目标向量信息,从而以目标向量信息对应的查询词在搜索资源库中确定目标推荐信息,并输出目标推荐信息。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115795170B_ABST
    Figure CN115795170B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a method and device for information recommendation, electronic equipment and storage medium. The method comprises: in response to a search operation of a user, obtaining a plurality of historical behavior information of the user and candidate recommendation information in a preset search resource library, then vectorizing each historical behavior information to generate behavior vector information of each historical behavior information, determining behavior feature information of the plurality of historical behavior information based on the vector correlation between the plurality of behavior vector information, then determining the weight information corresponding to each behavior vector information according to the behavior feature information and the candidate recommendation information, and generating target vector information based on the behavior vector information and the weight information, so as to determine target recommendation information in the search resource library by using the query word corresponding to the target vector information, and output the target recommendation information. Through the embodiments of the present application, personalized recommendation is realized, and information expected by the user is accurately recommended.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information recommendation technology, and in particular to an information recommendation method, apparatus, electronic device, and storage medium. Background Technology

[0002] Currently, with the continuous development of Internet technology, various information flow products are emerging one after another, satisfying most users' entertainment and learning needs.

[0003] For video websites, accurately recommending content that matches their users is a crucial task. Current video recommendation processes can search for video resources in the video resource library based on user-input keywords to make recommendations.

[0004] However, the video recommendation methods mentioned above only refer to the keywords currently entered by the user and cannot provide personalized recommendations. As a result, the recommended video resources are not easy to meet the user's expectations and it is difficult to achieve accurate recommendations. Summary of the Invention

[0005] In view of the above problems, a method, apparatus, electronic device, and storage medium for providing information recommendation to overcome or at least partially solve the above problems are proposed, including:

[0006] A method for information recommendation, the method comprising:

[0007] In response to a user's search operation, acquire multiple historical behavior information of the user and candidate recommendation information from a preset search resource library;

[0008] Vectorize each historical behavior information to generate behavior vector information for each historical behavior information;

[0009] Based on the vector correlation between multiple behavioral vector information, the behavioral feature information of the multiple historical behavioral information is determined;

[0010] Based on the behavioral feature information and the candidate recommendation information, determine the weight information corresponding to each behavioral vector information;

[0011] Target vector information is generated based on the behavior vector information and the weight information;

[0012] Target recommendation information is determined in the search resource library based on the query terms corresponding to the target vector information;

[0013] Output the target recommendation information.

[0014] Optionally, the step of vectorizing each historical behavior information to generate behavior vector information for each historical behavior information includes:

[0015] Obtain an embedding matrix for vector transformation of the historical behavior information; the embedding matrix includes the correspondence between vectors and behavior information;

[0016] From the embedding matrix, determine the behavior vector information of each historical user behavior.

[0017] Optionally, determining the behavioral feature information of the multiple historical behavior information based on the vector correlation between the behavioral vector information of each historical behavior includes:

[0018] Obtain an attention model for extracting user behavior features;

[0019] Multiple behavioral vectors are concatenated to obtain a vector matrix;

[0020] The vector matrix is ​​input into the attention model, and an attention matrix is ​​generated based on the pre-trained model parameters in the attention model.

[0021] Obtain preset dimensionality reduction parameters, and normalize the product of the dimensionality reduction parameters and the attention matrix to obtain behavioral feature information.

[0022] Optionally, determining the weight information corresponding to each behavior vector based on the behavior feature information and the candidate recommendation information includes:

[0023] The candidate recommendation information is vectorized using the embedding matrix to generate candidate recommendation vector information;

[0024] The candidate recommendation vector information is transposed to obtain the transpose matrix of the candidate recommendation vector information;

[0025] Multiply the transpose matrix by the behavioral feature information to obtain the first matrix;

[0026] Obtain preset weight parameters and multiply the weight parameters by the first matrix to obtain the second matrix;

[0027] The second matrix is ​​normalized to generate a target weight matrix, which is composed of the weight information corresponding to each behavior vector.

[0028] Optionally, generating target vector information based on the behavior vector information and the weight information includes:

[0029] Each behavior vector is multiplied by its corresponding weight to obtain multiple sub-target vectors; the sum of the weights of all behavior vectors is 1.

[0030] The multiple sub-target vectors are summed to generate target vector information.

[0031] Optionally, the historical behavior information includes the query terms used by the user and / or the target resource information selected by the user.

[0032] Optionally, obtaining multiple historical behavior information of the user includes:

[0033] Obtain information on the historical search terms used by the user during their search history, as well as information on the selected resources.

[0034] Determine the time sequence information of the historical query terms and the resource information;

[0035] Based on the time sequence information, multiple historical behavior information is determined from the historical query term information and the resource information in reverse chronological order.

[0036] An information recommendation device, the device comprising:

[0037] The information acquisition module is used to respond to the user's search operation by acquiring multiple historical behavior information of the user and candidate recommendation information from a preset search resource library;

[0038] The historical behavior vectorization module is used to vectorize each piece of historical behavior information and generate behavior vector information for each piece of historical behavior information;

[0039] The behavior feature extraction module is used to determine the behavior feature information of the multiple historical behavior information based on the vector correlation between multiple behavior vector information.

[0040] The weight information determination module is used to determine the weight information corresponding to each behavior vector based on the behavior feature information and the candidate recommendation information.

[0041] A target vector information generation module is used to generate target vector information based on the behavior vector information and the weight information;

[0042] The recommendation information determination module is used to determine target recommendation information in the search database based on the query terms corresponding to the target vector information;

[0043] The recommendation information output module is used to output the target recommendation information.

[0044] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the method recommended by the information described above.

[0045] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method recommended by the information described above.

[0046] The embodiments of the present invention have the following advantages:

[0047] This invention, in response to a user's search operation, acquires multiple historical behavior information of the user and candidate recommendation information from a preset search resource library. Then, it can vectorize each historical behavior information to generate behavior vector information for each historical behavior information. Based on the vector correlation between multiple behavior vector information, it determines the behavior feature information of multiple historical behavior information. Furthermore, based on the behavior feature information and candidate recommendation information, it determines the weight information corresponding to each behavior vector information, and generates target vector information based on the behavior vector information and weight information. Finally, it determines target recommendation information in the search resource library using the query terms corresponding to the target vector information and outputs the target recommendation information.

[0048] By analyzing multiple user historical behaviors during resource searches, abstract historical behavior information is transformed into concrete, computable vector information to extract behavioral feature information. The weight of each historical behavior is then determined, and by combining multiple historical behaviors and their weights, a new target vector is generated to identify target recommendation information within the search resource database. User historical behavior information reflects the personalized characteristics of users when selecting resource information. Combining historical behavior information with target recommendation information achieves personalized recommendations, accurately recommending the resource information that users expect. Attached Figure Description

[0049] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1a This is a flowchart illustrating the steps of an information recommendation method according to an embodiment of the present invention;

[0051] Figure 1b This is a schematic diagram illustrating the steps of a query term reordering method provided in an embodiment of the present invention;

[0052] Figures 1c to 1d This is a schematic diagram of the sub-steps of a query term reordering method provided in an embodiment of the present invention;

[0053] Figure 2 This is a flowchart of another information recommendation method provided in an embodiment of the present invention;

[0054] Figure 3a This is a flowchart of another information recommendation method provided in an embodiment of the present invention;

[0055] Figure 3b This is a flowchart illustrating the steps of a video resource recommendation method according to an embodiment of the present invention;

[0056] Figure 4a This is a structural block diagram of an information recommendation device provided in an embodiment of the present invention;

[0057] Figures 4b to 4f This is a structural sub-block diagram of an information recommendation device provided in an embodiment of the present invention. Detailed Implementation

[0058] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0059] Reference Figure 1a The diagram illustrates a flowchart of an information recommendation method according to an embodiment of the present invention, which may specifically include the following steps:

[0060] Step 101: In response to the user's search operation, obtain multiple historical behavior information of the user and candidate recommendation information from the preset search resource library;

[0061] Historical behavior information may include query terms used by the user in previous searches and / or target resource information selected by the user in previous searches.

[0062] The candidate recommendation information may include candidate query terms and / or candidate target resource information from a preset search resource library for users to choose from.

[0063] The target resource information may include any one or more of the following:

[0064] Video resource information, audio resource information, file resource information, and image resource information.

[0065] A user's historical behavior information is a highly personalized set of features containing a large number of user characteristics. By analyzing historical behavior information, we can determine the personalized characteristics of users when selecting resource information, and thus realize personalized recommendation information.

[0066] In practical applications, the search resource library of a recommendation system can contain candidate query terms and corresponding resource information, which may include, but is not limited to, film and television resources. The recommendation system provides users with search functionality, allowing them to perform searches. During a search, the system can retrieve multiple historical behavioral data points and candidate recommendations to analyze user preferences and provide more accurate recommendations.

[0067] In one embodiment of the present invention, obtaining multiple historical behavior information of a user may include: obtaining historical query term information and selected resource information used by the user in the historical search process; determining the time sequence information of the historical query term and resource information; and determining multiple historical behavior information from the historical query term information and resource information in reverse chronological order based on the time sequence information.

[0068] In practical applications, since historical behavior information that is more recent in time can better reflect a user's recent preferences, we can analyze a preset amount of recent historical behavior information to accurately determine user preferences.

[0069] Specifically, it can obtain information on the historical query terms used by the user during the historical search process, as well as the selected resource information. Each historical query term and selected resource information has corresponding timestamp information. The timestamp information of the historical query term information can indicate the time when the user used the query term to search, and the timestamp information of the resource information can indicate the time when the user selected the resource information for playback and display.

[0070] Step 102: Vectorize each historical behavior information to generate behavior vector information for each historical behavior information;

[0071] In practical applications, historical behavior information, query term information, and resource information are all information that is difficult to directly use for computer calculation. As a result, it is difficult to directly determine the correlation between multiple pieces of historical behavior information, and thus it is impossible to extract the features of multiple pieces of historical behavior information. In the embodiments of the present invention, the abstract and uncalculable historical behavior information can be transformed into vector information that can be recognized and calculated by a computer. Vector calculation can be performed between multiple vector information to determine the relationship between the vectors, and then the correlation between multiple pieces of historical behavior information can be determined based on the relationship between the vectors.

[0072] After obtaining multiple historical behavior information of a user, each historical behavior information can be vectorized to obtain the behavior vector information corresponding to each historical behavior information. The behavior vector information is used to vectorize the historical behavior information, so that the abstract historical behavior information is converted into a specific computable vector.

[0073] In one example, keyword text can be extracted based on historical behavior information, and then the keyword text can be converted into vectors. The method of converting keyword text into vectors can be through vector transformation using a trained embedding matrix (i.e., embedding matrix). The trained embedding matrix can contain the mapping relationship between historical behavior information and vectors.

[0074] It should be noted that other vector transformation methods can also be used in the embodiments of the present invention to transform historical behavior information into computable vector information. In the embodiments of the present invention, no restrictions are placed on the vector transformation methods.

[0075] Step 103: Based on the vector correlation between multiple behavioral vector information, determine the behavioral feature information of multiple historical behavioral information;

[0076] After obtaining the behavior vector information corresponding to each of the multiple historical behavior information, the relationship between the multiple historical behavior information can be determined through the behavior vector information. Specifically, for each historical behavior information, the vector correlation between the behavior vector information corresponding to that historical behavior information and other behavior vector information can be calculated, thereby determining the degree of association between that historical behavior information and other historical behavior information. Thus, through vector correlation calculation, the behavior feature information of multiple historical behavior information can be determined.

[0077] In one example, the self-attention mechanism can calculate vector correlations for multiple input vectors, and then output behavioral feature information calculated based on vector correlations.

[0078] For example, if a user searches for and watches videos of "Demi-Gods and Semi-Devils" and "The Heaven Sword and Dragon Saber" within the past 30 days, based on the user's historical behavior information for "Demi-Gods and Semi-Devils" and "The Heaven Sword and Dragon Saber," both of which belong to the martial arts drama genre, it can be determined that the user's behavioral characteristics are "martial arts dramas," meaning that the user may expect to watch martial arts dramas in the near future.

[0079] Step 104: Determine the weight information corresponding to each behavior vector based on the behavioral feature information and the candidate recommendation information.

[0080] After determining the behavioral feature information, the importance information of each behavioral vector information can be included in the behavioral feature information. Then, through linear transformation calculation, the behavioral feature information can be transformed into the corresponding spatial dimension of the candidate recommendation information to obtain the weight information corresponding to each behavioral vector information.

[0081] The sum of the weights corresponding to all behavioral vector information is 1.

[0082] In one example, the candidate recommendations can be one or more candidate recommendations randomly selected from the search resource library, or they can be candidate recommendations from the entire search resource library.

[0083] For one or more identified candidate recommendation information, each candidate recommendation information is linearly transformed with behavioral feature information to obtain the weight information corresponding to each behavioral vector information.

[0084] For example, when selecting two candidate recommendation information (such as candidate recommendation information A and candidate recommendation information B), for candidate recommendation information A, the weight a [0.2, 0.1, 0.3, 0.1, 0.3] can be calculated; for candidate recommendation information B, the weight b [0.1, 0.1, 0.4, 0.1, 0.3] can be calculated.

[0085] Step 105: Generate target vector information based on behavior vector information and weight information;

[0086] After obtaining the weight information of the behavior vector information, new target vector information can be generated by combining the behavior vector information and the weight information. In the target vector information, corresponding weights are assigned to each historical behavior of the user. The target vector information can be used to predict the user's current behavior to achieve personalized recommendations.

[0087] In one embodiment of the present invention, step 105 may specifically include: multiplying each behavior vector information with the weight information corresponding to the behavior vector information to obtain multiple sub-target vectors; the sum of the weight information of all behavior vector information is 1; and accumulating the multiple sub-target vectors to generate target vector information.

[0088] In practical applications, each behavior vector can be multiplied by its corresponding weight to obtain a sub-target vector. The weighted sub-target vectors obtained by summing all behavior vectors are then summed to obtain the target vector information.

[0089] The formula for calculating the target vector information is as follows:

[0090] D = Sum(A*F) bhv )∈R d

[0091] Where A represents weight information, F bhv The behavior vector information represents multiple historical behavior information, D is the target vector information, and d represents the matrix dimension of the target vector information D. This dimension is the same as the dimension of the candidate recommendation information and the corresponding vector of historical behavior information, and is a preset dimension.

[0092] For example: Suppose a user's historical behavior consists of three query terms with features [0.1, 0.3], [0.9, 0.2], and [0.2, 0.2], respectively. After feature extraction and weight transformation, we get A = [0.1, 0.5, 0.4]. Multiplying each feature by its corresponding weight yields three target sub-vectors [0.01, 0.03], [0.45, 0.1], and [0.08, 0.08]. Finally, we sum these three target sub-vectors to obtain the target vector [0.01 + 0.45 + 0.08, 0.03 + 0.1 + 0.08] = [0.54, 0.12] (i.e., vector D).

[0093] Step 106: Determine target recommendation information from the search resource library based on the query terms corresponding to the target vector information, and output the target recommendation information.

[0094] The target recommendation information may include target recommendation query terms and / or target recommendation resource information.

[0095] After determining the target vector information, features from multiple historical behavioral information are integrated into the target vector information, which has personalized characteristics of the user. By querying the search resource library with the query terms corresponding to the target vector information, a preset number of target recommendation information can be determined and output to the user for viewing.

[0096] In one example, when there are multiple candidate recommendation information in step 105, a weight information can be generated based on each candidate recommendation information, and a corresponding target vector information can be generated based on the weight information. When there are N (N is a positive integer greater than or equal to 1) candidate recommendation information, N target vector information can be calculated. Then, step 106 is performed for each target vector information to obtain M (M is a positive integer greater than or equal to 1) recommendation information. Then, all recommendation information obtained from the N target vector information can be merged, the occurrence frequency of each recommendation information is calculated, and the recommendation information is sorted from high to low according to the occurrence frequency. The top L (L is a positive integer greater than or equal to 1) recommendation information is taken as the target recommendation information.

[0097] In this embodiment of the invention, user behavior information with personalized user characteristics is introduced during the user search process, and vectorized calculation is performed. A new vector is generated according to the weight of each historical behavior feature. The generated new vector carries the user's historical behavior features. Querying and retrieving according to this new vector can achieve personalized recommendations and accurately recommend the information expected by the user.

[0098] In one example, after determining the target recommendation information, when the target recommendation information consists of multiple query terms, after the recommendation system initially sorts the multiple query terms, it can be re-sorted using a knowledge graph. After re-sorting, the re-sorted query terms are output, such as... Figure 1b This illustrates a method for query term reordering:

[0099] Step S11: Obtain the sorting information of multiple query terms and the preset knowledge graph; the multiple query terms are query terms to be pushed to the user based on the user's search operation;

[0100] The ranking information of multiple query terms is the ranking information obtained by performing a preliminary ranking of multiple query terms. Multiple query terms can refer to the query terms to be recommended determined from the resource library based on the user's search operation. Each query term corresponds to a resource information to be recommended.

[0101] The preset knowledge graph can be a pre-trained knowledge graph. The knowledge graph consists of entities and entity relationships. Entities are connected by entity relationships. Based on any entity in the knowledge graph, one or more associated entities that have entity relationships with that entity can be identified.

[0102] In practical applications, a knowledge graph can be trained based on users' historical behavior information. Query entities can be extracted from the historical behavior information, and the entity relationships between query entities can be determined. Thus, a knowledge graph can be generated based on query entities and entity relationships.

[0103] For example, if a user has previously searched for "Demi-Gods and Semi-Devils," the author of the TV series "Demi-Gods and Semi-Devils" is "Jin Yong," and the characters include "Duan Yu" and "Qiao Feng." Thus, we can identify four query entities: "Demi-Gods and Semi-Devils," "Jin Yong," "Duan Yu," and "Qiao Feng." Among them, the entity relationship between the query entities "Jin Yong" and "Demi-Gods and Semi-Devils" is that of author and work; the relationships between the query entities "Demi-Gods and Semi-Devils" and "Duan Yu," and between the query entities "Demi-Gods and Semi-Devils" and "Qiao Feng," are that of work and character names. Based on the query entities and the relationships between them, a knowledge graph can be generated.

[0104] In a recommendation system, the search resource library can contain candidate query terms and their corresponding resources. These resources can include, but are not limited to, film and television resources. The recommendation system provides users with search functionality, allowing them to perform searches within the library to identify one or more query terms to be pushed to them. When multiple query terms exist, they can be ranked using a pre-defined ranking model to obtain an initial ranking of the query terms.

[0105] In the ranking model, multiple query terms can be ranked based on preset ranking rules. The ranking rules can consist of factors that influence the ranking of multiple query terms, which may include one or more of the following: the number of clicks on the query term, the number of searches for the query term, and the number of users searching for the query term.

[0106] It should be noted that, in the embodiments of the present invention, the sorting rules in the sorting model can be set according to actual needs, and the factors affecting the sorting of multiple query terms are not limited to the above examples. In the embodiments of the present invention, no restrictions are imposed on this.

[0107] In this embodiment of the invention, a knowledge graph associated with multiple query terms can also be obtained. The knowledge graph may include query term entities corresponding to multiple query term information and query term entities that are associated with multiple query term information. Then, the multiple query terms can be reordered by combining the association of query term entities in the knowledge graph. The knowledge graph is integrated in the sorting process to improve the reordering efficiency.

[0108] Step S12: Based on the sorting information, determine the first feature information of each query term; the first feature information is the feature information used to sort multiple query term information to generate sorting information.

[0109] In one embodiment of the present invention, the first feature information may include any one or more of the following:

[0110] Information on the number of clicks for the query term, the number of searches for the query term, and the number of users who searched for the query term.

[0111] After obtaining the sorting information of multiple query terms, the sorting rule corresponding to the sorting information can be determined. Then, the factors that affect the sorting of query terms in the sorting rule can be used as the feature information of the query terms. That is, the first feature information of the query term information is the sorting feature.

[0112] Step S13: Based on the knowledge graph, determine the second feature information of each query term; the second feature information is the feature information in the knowledge graph that is associated with the query term information.

[0113] After acquiring the knowledge graph, for each query term, we search for related information in the knowledge graph as the second feature information of the query term.

[0114] In one example, entities extracted from the acquired knowledge graph can be trained to generate a Graph Neural Network (GNN) composed of multiple query entity entities. In the GNN, each query entity has one or more associated query entities. After generating the GNN, for multiple query information that needs to be reordered, the GNN can determine the associated query entities for each query entity, constituting the second feature information of that query entity. Training a GNN based on the knowledge graph to extract query entity entities facilitates the extraction of the second feature information of the query entity.

[0115] Step S14: Reorder multiple query term information based on the first feature information and the second feature information.

[0116] After determining the first feature information and the second feature information, the first feature information is the feature information obtained based on the ranking feature, and the second feature information is the feature information obtained through the knowledge graph. By combining the first feature information and the second feature information, multiple query term information is re-ranked. The knowledge graph information is reasonably and quickly integrated into the re-ranking method to improve the re-ranking efficiency and enhance the user experience.

[0117] In one example, a knowledge graph can be constructed based on a recommendation strategy for resource information. When extracting second feature information based on the knowledge graph, the final generated query word sequence can reflect the recommendation intent because the product recommendation strategy is incorporated.

[0118] For example, if TV series A and TV series B are produced by the same company or require the same stars to collaborate, the entity relationship between TV series A and TV series B can be added to the knowledge graph in advance. Based on this knowledge graph, when TV series A exists in the query information, the second feature information can be extracted based on the knowledge graph to obtain TV series B associated with TV series A.

[0119] In one example, such as Figure 1c As shown, step S14 may specifically include the following sub-steps:

[0120] Sub-step S21: Perform vectorization transformation on the first feature information to generate first vector information used to represent the first feature information;

[0121] After determining the first feature information, it can be vectorized to generate first vector information. Each query term corresponds to a first vector, which can be used to represent the first feature information. Specifically, for each query term, the feature value corresponding to each first feature information can be determined, and one or more feature values ​​can be converted into vector information of a preset dimension. When multiple first feature information exists, multiple feature values ​​can be combined according to a preset order, with each query term having the same feature data order when generating the vector. The dimension of the first vector information can be determined based on the number of first feature information.

[0122] For example, when the query term is "Tian Long Ba Bu", the first feature information is the number of clicks, the number of searches, and the number of users who searched for the query term. Thus, it is determined that the number of clicks for the query term is 2889, the number of searches is 4000, and the number of users who searched for the query term is 1000. Among them, 2880, 4000, and 1000 are the feature data corresponding to the three first feature information. Combining the three feature data, the first vector information of the query term is obtained as (2889, 4000, 1000).

[0123] In one example, to facilitate subsequent vector calculations, the feature data can be normalized and then converted into vectors. During the normalization process, a preset normalized data range (such as between 0 and 1) is determined. Then, according to the preset normalized data range, the feature data is mapped to the mapped data within the normalized data range, and the mapped data is then converted into the first vector information.

[0124] Sub-step S22: Perform vectorization transformation on the second feature information to generate second vector information used to represent the second feature information;

[0125] After determining the second feature information, the second feature information can be the first or more associated query term entities determined from the knowledge graph that are associated with the query term. Then, the second feature information can be vectorized to generate second vector information. Each query term information corresponds to a second vector information, and the second vector information can be used to represent the second feature information.

[0126] In one example, an embedding matrix can be pre-trained to convert abstract words into concrete, computable vectors. The trained embedding matrix contains multiple query terms and their corresponding vectors. Thus, after determining the second feature information, the vector information corresponding to the second feature information can be determined in the embedding matrix.

[0127] Sub-step S23: For each query term, the first vector information and the second vector information are concatenated to generate the target vector information corresponding to each query term.

[0128] After obtaining the first vector information and the second vector information, the first vector information and the second vector information for the same query term can be concatenated to obtain the target vector information, which can be used to represent the query term.

[0129] For example, the first vector information is (0.1, 0.2), the second vector information is (0.3, 0.4), and the target vector information is (0.1, 0.2, 0.3, 0.4) after concatenating the first vector information and the second vector.

[0130] By converting the first and second feature information into vectors and concatenating them, the abstract query term features are made concrete. Query terms can be represented by vectors, and calculations can be performed between multiple vectors to determine the relationship between each query term.

[0131] Sub-step S24: Determine the score information for each query term based on the vector correlation between multiple target vector information;

[0132] After generating the target vector information for each query term, the relationship between multiple query terms can be determined through the target vector information. Specifically, for each query term, the vector correlation between the target vector information of that query term and the target vector information of other query terms (excluding itself) can be determined. The vector correlation can be determined by the positional distance between two vectors in spatial coordinates. The closer the distance, the higher the correlation between the two vectors.

[0133] By calculating the vector relevance of multiple target vectors, the score for each query term can be determined. The higher the relevance of a query term's target vector information to other target vector information, the more important the query term is, and the higher its score is assigned. Conversely, the lower the relevance of a query term's target vector information to other target vector information, the less important the query term is, and the lower its score is assigned.

[0134] Sub-step S25: Reorder multiple query term information according to score information.

[0135] In one example, such as Figure 1d As shown, sub-step S24 includes the following sub-steps:

[0136] Sub-step S31: Obtain the second attention model used to determine the query term score;

[0137] The second attention model and the attention model used in the query term determination process are trained separately according to their respective application scenarios.

[0138] In one example, the second attention model is a self-attention model.

[0139] The second attention model can be used to capture the correlation between multiple vectors. The greater the correlation, the higher the importance given. Therefore, after generating the target vector information for each query term, the second attention model can analyze the vector correlation between multiple target vectors to determine the importance of multiple query terms and thus their scores. A higher query term score indicates a greater correlation between that query term and other query terms, and thus, greater importance.

[0140] The second attention model may include pre-trained parameters. These parameters are used to calculate the target vector parameters according to a preset model algorithm, so as to determine the vector correlation between multiple target vector information. It should be noted that the preset model algorithm and parameters of the second attention model can be set according to actual needs, and no restrictions are imposed on this in the embodiments of the present invention.

[0141] In one example, the training process of the second attention model can be as follows: Obtain the query term training set and the expected score information of multiple query terms in the query term training set for re-ranking; set the initialization parameters in the second attention model; input the target vector information corresponding to the query term training set into the second attention model; calculate the predicted score information of each query term information in the training set through the initialization parameters; compare the predicted score information with the expected score information; adjust the initialization parameters of the second attention model; after adjusting the parameters, continue to input the target vector information for training; after multiple iterations, when the error between the predicted score information output by the second attention model and the expected score information is within the preset error threshold range, determine the trained second attention model based on the parameters at this time.

[0142] Sub-step S32: Input multiple target vector information into the second attention model, and generate the second attention matrix based on the pre-trained second model parameters in the attention model;

[0143] After determining the target vector information for each query term, multiple target vectors can be input into the second attention model for vector correlation analysis. Based on the correlation between multiple target vector information, the score information for each query term can be output.

[0144] The second attention model can not only fully interact with the positional information between the query word information and the target vector information, but also meet the online performance requirements.

[0145] The second model parameters are transformation parameters pre-trained in the second attention model to perform linear transformations of target vector information in different dimensions to determine the vector correlation between multiple target vector information.

[0146] Specifically, the second model parameter can be a three-dimensional transformation matrix. The vector matrix composed of multiple target vector information is linearly transformed through the second model parameter to map each vector to the same dimension for interactive calculation and determine the correlation between vectors.

[0147] Based on the preset model algorithm, the trained second model parameters and the input target vector information are used to calculate and generate the second attention matrix;

[0148] For example, in the second attention model of the self-attention mechanism, the preset model algorithm is as follows:

[0149] Att(Q,K,V)=(QK T V,

[0150]

[0151]

[0152]

[0153] Among them, W q W k W v Let m represent a linear transformation matrix with three different dimensions, where d1 represents the number of first feature information, d2 represents the length of second feature information, d1+d2 represents the row length of the transformation matrix, and m is the column length of the transformation matrix.

[0154] Q represents the query matrix in the self-attention mechanism, K represents the key matrix in the self-attention mechanism, V represents the value matrix in the self-attention mechanism, and F represents the value matrix in the self-attention mechanism. concat This indicates that multiple target vector information constitutes the second vector matrix.

[0155] The second vector matrix F concat With the three transformation matrices W respectively q W k W v Multiplying these matrices yields the Q, K, and V matrices. Multiplying the Q matrix by the transpose of the K matrix yields the product matrix. Multiplying the product matrix by the V matrix outputs the second attention matrix.

[0156] Sub-step S33: Obtain the preset second normalization parameter, and normalize the product of the second normalization parameter and the second attention matrix to obtain the target feature matrix;

[0157] The second normalization parameter is a preset weight parameter in the normalization process, used to perform linear layer transformation on the second attention matrix.

[0158] The second attention matrix output by the second attention model can be multiplied by the second normalization parameter to perform a linear transformation, and the resulting product can be normalized. The normalization process involves converting the values ​​in the obtained matrix into values ​​within a preset range (such as between 0 and 1) to limit the range of values ​​for subsequent calculations.

[0159] For example, after obtaining the attention matrix, the following normalization operation is performed:

[0160] F att =sigmoid(W f Att(Q,K,V))∈R N*v .

[0161] Among them, F att For the target feature matrix, the sigmoid function is a normalization function that compresses the values ​​to between 0 and 1. W f The second normalization parameter is N, which represents the number of query term information, and v represents the preset column length of the target feature matrix.

[0162] Sub-step S34: Obtain the preset dimensionality reduction parameters, and use the dimensionality reduction parameters to convert the target feature matrix into score information corresponding to multiple query term information.

[0163] The dimension of the dimensionality reduction parameter can be set according to the dimension of the target feature matrix.

[0164] After obtaining the target feature matrix, the target feature matrix can be transformed from a high-dimensional matrix to a low-dimensional matrix using preset dimensionality reduction parameters. The low-dimensional matrix is ​​an N*1 matrix, where N represents the number of query terms. The N values ​​in the low-dimensional matrix correspond to the scores of the N query terms in turn.

[0165] The dimensionality reduction calculation process in the self-attention mechanism is as follows:

[0166] O = W o F att ∈R N W o ∈R v .

[0167] Among them, W oLet be a v*1 dimension-reduced matrix, and O denote an N*1 matrix.

[0168] For example, suppose we reorder five query terms (initially sorted as: query term 1, query term 2, query term 3, query term 4, query term 5), resulting in a low-dimensional matrix of [0.2, 0.1, 0.4, 0.8, 0.3]. This indicates that query term 1 has a score of 0.2, query term 2 has a score of 0.1, query term 3 has a score of 0.4, query term 4 has a score of 0.8, and query term 5 has a score of 0.3. Therefore, reordering the five query terms according to their scores results in the following query term sequence: query term 4, query term 3, query term 5, query term 1, query term 2.

[0169] In one example, step S14 may be followed by:

[0170] Display the reordered query term sequence and show the resource information corresponding to multiple query terms to the user according to the query term sequence.

[0171] In practical applications, after reordering multiple query terms, the resulting query term sequence can be displayed to the user. Furthermore, the resource information corresponding to each query term can be displayed to the user according to the query term sequence, thereby achieving accurate resource information recommendation.

[0172] Reference Figure 2 The diagram illustrates a flowchart of another information retrieval method provided by an embodiment of the present invention, which may specifically include the following steps:

[0173] Step 201: In response to the user's search operation, obtain multiple historical behavior information of the user and candidate recommendation information from the preset search resource library;

[0174] Step 202: Obtain the embedding matrix used for vector transformation of historical behavior information; the embedding matrix includes the correspondence between vectors and behavior information;

[0175] In practical applications, historical behavior information, query term information, and resource information are all information that is difficult to use directly for computer calculations, making it difficult to accurately determine the relationship between multiple pieces of historical behavior information, and thus difficult to extract the features of multiple pieces of historical behavior information.

[0176] The embedding matrix can be used to vectorize historical behavior information into a computable vector.

[0177] In an example, an embedding matrix may be pre-trained. The embedding matrix is configured to convert abstract words into computable vectors, and the trained embedding matrix contains correspondence relationships between a plurality of pieces of historical behavior information and vectors corresponding to the pieces of historical behavior information. A value interval of the embedding matrix may be between 0 and 1, and the dimension of the embedding matrix is determined by the quantity of the pieces of historical behavior information and a preset dimension of the pieces of historical behavior information.

[0178] In practical applications, after the historical behavior information and candidate recommendation information are acquired, the pre-trained embedding matrix may be acquired, and the embedding matrix is configured to perform vectorization conversion on each piece of historical behavior information and the candidate recommendation information.

[0179] For example, the embedding matrix is a two-dimensional matrix, vectors corresponding to a query term (Tian Long Ba Bu) and two video resources doc (Tian Long Ba Bu TV series, She Diao Ying Xiong Zhuan TV series) are stored in the embedding matrix, and each vector has 2 dimensions. In this case, the embedding matrix may be [[0.1, 0.1], [0.2, 0.2], [0.3, 0.1]]. In the embedding matrix, the first vector [0.1, 0.1] represents the query (Tian Long Ba Bu), the second vector [0.2, 0.2] represents the doc (Tian Long Ba Bu), and the third vector [0.3, 0.1] represents the doc (Yi Tian Tu Long Ji).

[0180] Step 203: Determine behavior vector information of each piece of historical behavior information from the embedding matrix;

[0181] After the embedding matrix is acquired, the behavior vector information corresponding to each piece of historical behavior information is determined from the embedding matrix according to the piece of historical behavior information. After a plurality of pieces of behavior vector information are acquired, the plurality of pieces of behavior vector information may be combined into a vector matrix to perform vector calculation.

[0182] For example, historical user behaviors of a user are: having searched for Tian Long Ba Bu, having watched Tian Long Ba Bu, and having watched Yi Tian Tu Long Ji. Finally, a matrix formed by a plurality of pieces of historical behavior information is [[0.1, 0.1], [0.2, 0.2], [0, 0]]. Since the doc (Yi Tian Tu Long Ji) does not exist in the initially trained embedding matrix, a vector corresponding to this resource information is [0, 0].

[0183] Step 204: Determine behavior feature information of the plurality of pieces of historical behavior information based on vector correlation between the plurality of pieces of behavior vector information;

[0184] Step 205: Determine weight information corresponding to each piece of behavior vector information according to the behavior feature information and the candidate recommendation information;

[0185] Step 206: Generate target vector information based on the behavior vector information and the weight information;

[0186] Step 207: Determine target recommendation information from the search resource library based on the query terms corresponding to the target vector information, and output the target recommendation information.

[0187] In this embodiment of the invention, multiple user historical behaviors are analyzed when a user searches for resources. A pre-trained embedding matrix is ​​used to convert the abstract information of multiple historical behaviors into specific computable vector information to extract behavioral feature information. Then, the weight of each historical behavior information is determined. By combining multiple historical behavior information and weights, a new target vector is generated to determine the target recommendation information in the search resource library. The user's historical behavior information can reflect the user's personalized characteristics when selecting resource information. By combining historical behavior information to determine the target recommendation information, personalized recommendation is achieved, and the information expected by the user is accurately recommended. By converting historical behavior information into a computer-computable vector through an embedding matrix, it is convenient to accurately analyze historical behavior information.

[0188] Reference Figure 3a The diagram illustrates a flowchart of another information retrieval method provided by an embodiment of the present invention, which may specifically include the following steps:

[0189] Step 301: In response to the user's search operation, obtain multiple historical behavior information of the user and candidate recommendation information from the preset search resource library;

[0190] Step 302: Vectorize each historical behavior information to generate behavior vector information for each historical behavior information;

[0191] Step 303: Obtain the attention model used to extract user behavior features;

[0192] In one example, the attention model is a self-attention model. Attention models using the self-attention mechanism can not only obtain the interaction positions between historical behavioral information, but also have fewer parameters in their computation process, allowing for parallel computation and thus enabling application in high-concurrency online scenarios.

[0193] Attention models can be used to capture the correlation between multiple vectors. The greater the correlation, the higher the attention given, which can then be used to extract user behavior features from multiple behavioral vector information.

[0194] After obtaining the behavior vector information, multiple behavior vector information can be input into the attention model for vector correlation analysis. Based on the correlation between multiple behavior vector information, the behavior feature information of multiple historical behavior information can be output.

[0195] The attention model may include pre-trained parameters. These parameters are used to calculate the target vector parameters according to a preset model algorithm, so as to determine the vector correlation between multiple behavioral vector information. It should be noted that the preset model algorithm and parameters of the attention model can be set according to actual needs, and no restrictions are imposed on them in this embodiment of the invention.

[0196] In one example, the training process of the attention model can be as follows: Obtain a training set of historical behavior information, as well as the expected behavior feature information of multiple historical behavior information in the training set. Set initialization parameters in the attention model. Input multiple behavior vector information corresponding to the training set of historical behavior information into the attention model. Calculate the predicted behavior feature information of multiple behavior vector information through the initialization parameters. Compare the predicted behavior feature information with the expected behavior feature information and adjust the initialization parameters of the attention model. After adjusting the parameters, continue to input behavior vector information for training. After multiple iterations, when the error between the predicted behavior feature information output by the attention model and the expected behavior feature information is within the preset error threshold range, determine the trained attention model based on the parameters at this time.

[0197] Step 304: Concatenate multiple behavioral vector information to obtain a vector matrix;

[0198] Multiple behavioral vectors can be combined and concatenated to obtain a vector matrix.

[0199] Step 305: Input the vector matrix into the attention model and generate the attention matrix based on the pre-trained model parameters in the attention model;

[0200] The model parameters are pre-trained in the attention model to perform linear transformations on the vector matrix in different dimensions to determine the vector correlations between multiple behavioral vector information in the vector matrix.

[0201] Specifically, the model parameters can be a three-dimensional transformation matrix. The vector matrix composed of multiple behavioral vector information is linearly transformed through the model parameters to map each vector to the same dimension for interactive calculation and determine the correlation between multiple vectors.

[0202] Based on the preset model algorithm, the attention matrix is ​​generated by using the trained model parameters and the input vector matrix.

[0203] For example, in the attention model of the self-attention mechanism, the preset model algorithm is as follows:

[0204] Att(Q,K,V)=(QK T V,

[0205] Q = Wq F bhv W q ∈R d*m ,

[0206] K = W k F bhv W k ∈R d*m ,

[0207] V = W v F bhv W v ∈R d*m .

[0208] Among them, W q W k W v Let d represent a linear transformation matrix with three different dimensions, where d represents the row length of the transformation matrix and m represents the column length of the transformation matrix.

[0209] Q represents the query matrix in the self-attention mechanism, K represents the key matrix in the self-attention mechanism, V represents the value matrix in the self-attention mechanism, and F represents the value matrix in the self-attention mechanism. bhv It represents a vector matrix composed of multiple behavioral vector information.

[0210] The vector matrix F bhv With the three transformation matrices W respectively q W k W v Multiplying these matrices yields the Q, K, and V matrices. Multiplying the Q matrix by the transpose of the K matrix yields the product matrix. Multiplying the product matrix by the V matrix outputs the attention matrix.

[0211] Step 306: Obtain the preset normalization parameters, and normalize the product of the normalization parameters and the attention matrix to obtain behavioral feature information;

[0212] The normalization parameter is a preset weight parameter in the normalization process, used to perform linear layer transformation on the attention matrix.

[0213] The attention matrix output by the attention model can be multiplied by a normalization parameter to perform a linear transformation, and the resulting product can be normalized. The normalization process converts the values ​​in the resulting matrix into values ​​within a preset range (such as between 0 and 1) to limit the range of values ​​for subsequent calculations.

[0214] For example, after obtaining the attention matrix, the following normalization operation is performed:

[0215] F = sigmoid(W)f Att(Q,K,V))∈R N*v .

[0216] Where F represents behavioral feature information, the sigmoid function is a normalization function that compresses the values ​​to between 0 and 1, and W... f For normalization parameters, N represents the number of user behavior information items, and v represents the column length of the behavior feature information.

[0217] Step 307: Determine the weight information corresponding to each behavior vector based on the behavioral feature information and the candidate recommendation information;

[0218] After determining the behavioral feature information, which can include the importance information of each behavioral vector, a linear transformation can be used to convert the behavioral feature information into the corresponding spatial dimension of the candidate recommendation information to obtain the weight information corresponding to each behavioral vector. The sum of the weights of all behavioral vectors is 1.

[0219] In one embodiment of the present invention, step 307 may specifically include the following process: vectorizing the candidate recommendation information through an embedding matrix to generate candidate recommendation vector information; transposing the candidate recommendation vector information to obtain a transposed matrix of the candidate recommendation vector information; multiplying the transposed matrix with the candidate recommendation vector information to obtain a first matrix; obtaining preset weight parameters and multiplying the weight parameters with the first matrix to obtain a second matrix; normalizing the second matrix to generate a target weight matrix, wherein the target weight matrix is ​​composed of weight information corresponding to each behavior vector information.

[0220] In practical applications, the behavioral feature information determined by the attention model needs to be activated by the activation block before it can be applied. The activation block is used to linearly transform the behavioral feature information according to the candidate recommendation information to obtain the weight information corresponding to each behavioral vector information.

[0221] To obtain candidate recommendation information, a pre-trained embedding matrix is ​​used to vectorize the candidate recommendation information, transforming it into computable candidate recommendation vector information. The candidate recommendation vector information and historical behavior information vector transformation share the same embedding matrix, thus obtaining vectors of the same dimension after vectorization.

[0222] After generating candidate recommendation vectors, these vectors can be transposed to obtain a transpose matrix. The transpose process involves transforming the rows and columns of the candidate recommendation vectors. For example, a d*1 candidate recommendation vector can be converted into a 1*d transpose matrix.

[0223] The product of the transpose matrix and the behavioral feature information is calculated to obtain the first matrix. The first matrix is ​​then multiplied by the weight parameters to output the weight data.

[0224] For example, after obtaining behavioral feature information and candidate recommendation vector information, the following weight transformation operation is performed:

[0225]

[0226] Among them, F q ∈R d Fq represents candidate recommendation vector information, F represents behavioral feature information, and W represents... A Here, is the weight parameter, and matrix A is a matrix of weight information. From matrix A, we can obtain the weight information corresponding to each historical behavior, where the weight information value is between 0 and 1.

[0227] Step 308: Generate target vector information based on behavior vector information and weight information;

[0228] Step 309: Determine target recommendation information from the search resource library based on the query terms corresponding to the target vector information, and output the target recommendation information.

[0229] In this embodiment of the invention, multiple user historical behaviors are analyzed when a user searches for resources. An attention model is used to extract behavioral feature information, and then the weight of each historical behavior is determined. By combining multiple historical behavior information and weights, a new target vector is generated to determine target recommendation information in the search resource library. The user's historical behavior information can reflect the user's personalized characteristics when selecting resource information. By combining historical behavior information to determine target recommendation information, personalized recommendations are achieved, accurately recommending information that the user expects. In addition, the attention model has few computational parameters and can be computed in parallel, thus enabling its application in online high-concurrency scenarios.

[0230] The following uses video resource recommendations as an example. Figure 3b The above embodiments of the present invention are described by way of example:

[0231] Step S41: Obtain multiple historical behavior information.

[0232] Retrieve the user's n most recent historical actions in reverse chronological order. The user's historical actions are represented as Bhv = [b1, b2, ..., b n ], each historical action b in Bhv n It can be a query term (i.e., query information) or a video doc (i.e., target resource information).

[0233] Step S42, obtain the embedding matrix;

[0234] Wherein, the embedding matrix Wbhv =pW doc W query ]∈R A*d .

[0235] Among them, W doc W represents a vector of resource information. query d represents the vector of the query term, d represents the preset vector dimension of each query term or each resource information, and A represents the sum of the number of query term information and resource information.

[0236] Step S43: Generate behavior vector information corresponding to multiple historical behaviors.

[0237] Through the embedding matrix W bhv Each historical behavior is transformed into a feature vector of equal dimension. Multiple behavior vectors are combined and concatenated to obtain a vector matrix corresponding to multiple behavior vectors. in, This represents the behavior vector information corresponding to each historical behavior information, where N is the number of historical behavior information and d is the preset dimension of the historical behavior information.

[0238] Step S44: Input multiple behavior vectors into the attention model of the self-attention mechanism to determine the behavior feature information.

[0239] The formula for the self-attention mechanism is as follows:

[0240] Att(Q,K,V)=(QK T V,

[0241] Q = W q F bhv W q ∈R d*m ,

[0242] K = W k F bhv W k ∈R d*m ,

[0243] V = W v F bhv W v ∈R d*m .

[0244] Among them, W q W k W v Let d represent a linear transformation matrix with three different dimensions, where d represents the row length of the transformation matrix and m represents the column length of the transformation matrix.

[0245] Q represents the query matrix in the self-attention mechanism, K represents the key matrix in the self-attention mechanism, V represents the value matrix in the self-attention mechanism, and F represents the value matrix in the self-attention mechanism. bhv It represents a vector matrix composed of multiple behavioral vector information.

[0246] The vector matrix F bhv With the three transformation matrices W respectively q W k W v Multiplying these matrices yields the Q, K, and V matrices. Multiplying the Q matrix by the transpose of the K matrix yields the product matrix. Multiplying the product matrix by the V matrix outputs the attention matrix.

[0247] After processing by the self-attention mechanism, the output attention matrix is ​​then normalized through a linear layer to obtain the behavioral feature information F = sigmoid(W). f Att(Q,K,V))∈R N*v Where F represents behavioral feature information, the function is a normalization function that compresses the values ​​to between 0 and 1, and W... f For normalization parameters, N represents the number of user behavior information items, and v represents the column length of the behavior feature information.

[0248] Step S45: Determine the weights of the behavior vector information using the behavior feature information and the candidate recommendation information.

[0249] Obtain candidate recommendation information, and determine the candidate recommendation vector information F using a pre-trained embedding matrix. q The behavioral features F and the candidate recommendation vector F q The calculation is performed on the input activation block to generate a matrix of weight parameters.

[0250] The weight calculation process in the activation block is as follows:

[0251]

[0252] Among them, F q ∈R d F q Let F represent candidate recommendation vector information, and W represent behavioral feature information. A Here, is the weight parameter, and matrix A is a matrix of weight information. From matrix A, we can obtain the weight information corresponding to each historical behavior. The weight information values ​​are between 0 and 1.

[0253] Step S46: Generate target vector information based on weight information.

[0254] Compare the weight information with the corresponding F bhvMultiply the results and sum them using the Sum function to obtain the target vector information D.

[0255] The formula for generating the target vector information D is as follows:

[0256] D = Sum(A*F) bhv )∈R d .

[0257] Where D represents the target vector information, A represents the weight information, and F... bhv d represents the behavior vector information, and d represents the dimension of the target vector information.

[0258] Step S47: Determine the target recommendation information based on the target vector information D.

[0259] Using the target vector information D, K (K is a positive integer greater than 0) relevant query terms or resource information (i.e. target recommendation information) are retrieved from the preset video resource database, and the query term information and resource information are pushed to the search user.

[0260] It should be noted that, for the sake of simplicity, the method embodiments are 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.

[0261] Reference Figure 4a The diagram shows a structural schematic of an information retrieval device according to an embodiment of the present invention, which may specifically include the following modules:

[0262] The information acquisition module 401 is used to respond to the user's search operation by acquiring multiple historical behavior information of the user and candidate recommendation information from a preset search resource library;

[0263] The historical behavior vectorization module 402 is used to vectorize each piece of historical behavior information and generate behavior vector information for each piece of historical behavior information;

[0264] The behavior feature extraction module 403 is used to determine the behavior feature information of multiple historical behavior information based on the vector correlation between multiple behavior vector information.

[0265] The weight information determination module 404 is used to determine the weight information corresponding to each behavior vector based on the behavior feature information and the candidate recommendation information.

[0266] The target vector information generation module 405 is used to generate target vector information based on behavior vector information and weight information;

[0267] Recommendation information determination module 406 is used to determine target recommendation information in the search database based on the query terms corresponding to the target vector information;

[0268] The recommendation information output module 407 is used to output target recommendation information.

[0269] In one embodiment of the present invention, such as Figure 4b As shown, the historical behavior vectorization module 402 includes:

[0270] Embedding matrix determination submodule 11 is used to obtain the embedding matrix for vector transformation of historical behavior information; the embedding matrix includes the correspondence between vectors and behavior information;

[0271] The behavior vector information determination submodule 12 is used to determine the behavior vector information of each historical user behavior from the embedding matrix.

[0272] In one embodiment of the present invention, such as Figure 4c As shown, the behavior feature extraction module 403 may include:

[0273] Attention model acquisition submodule 21 is used to acquire an attention model for extracting user behavior features;

[0274] The vector matrix determination submodule 22 is used to concatenate multiple behavioral vector information to obtain a vector matrix;

[0275] The attention matrix determination submodule 23 is used to input the vector matrix into the attention model and generate the attention matrix based on the pre-trained model parameters in the attention model;

[0276] The behavior feature information determination submodule 24 is used to obtain preset dimensionality reduction parameters and normalize the product of the dimensionality reduction parameters and the attention matrix to obtain behavior feature information.

[0277] In one embodiment of the present invention, such as Figure 4d As shown, the weight information determination module 404 includes:

[0278] The candidate recommendation vector information determination submodule 31 is used to vectorize the candidate recommendation information through an embedding matrix to generate candidate recommendation vector information;

[0279] Transpose matrix determination submodule 32 is used to transpose the candidate recommendation vector information to obtain the transpose matrix of the candidate recommendation vector information;

[0280] The first matrix determination submodule 33 is used to multiply the transpose matrix with the behavioral feature information to obtain the first matrix;

[0281] The second matrix determination submodule 34 is used to obtain preset weight parameters and multiply the weight parameters with the first matrix to obtain the second matrix;

[0282] The weight matrix determination submodule 35 is used to normalize the second matrix and generate the target weight matrix, which is composed of the weight information corresponding to each behavior vector information.

[0283] In one embodiment of the present invention, such as Figure 4e As shown, the target vector information generation module 405 may include:

[0284] The sub-target vector determination submodule 41 is used to multiply each behavior vector information with the weight information corresponding to the behavior vector information to obtain multiple sub-target vectors; the sum of the weight information of all behavior vector information is 1;

[0285] The target vector information determination submodule 42 is used to accumulate multiple sub-target vectors to generate target vector information.

[0286] In one embodiment of the present invention, historical behavior information includes query term information used by the user and / or target resource information selected by the user.

[0287] In one embodiment of the present invention, such as Figure 4f As shown, the information acquisition module 401 may include:

[0288] The information acquisition submodule 51 is used to acquire information on historical query terms used by the user during the historical search process and information on selected resources;

[0289] The time-series information determination submodule 52 is used to determine the time-series information of historical query term information and resource information;

[0290] The historical behavior filtering submodule 53 is used to determine multiple historical behavior information from historical query term information and resource information in reverse chronological order based on time sequence information.

[0291] An embodiment of the present invention also provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the method recommended above.

[0292] An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the method recommended above.

[0293] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0294] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0295] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0296] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0297] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0298] These computer program instructions may also be loaded onto a computer or other programmable data processing terminal equipment to cause a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable terminal equipment, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0299] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0300] Finally, 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 terminal device 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 terminal device. 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 terminal device that includes the element.

[0301] The above provides a detailed description of the information recommendation method, apparatus, electronic device, and storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for information recommendation, characterized in that, The method includes: In response to a user's search operation, acquire multiple historical behavior information of the user and candidate recommendation information from a preset search resource library; Vectorize each historical behavior information to generate behavior vector information for each historical behavior information; Based on the vector correlation between multiple behavioral vector information, the behavioral feature information of the multiple historical behavioral information is determined; Based on the behavioral feature information and the candidate recommendation information, determine the weight information corresponding to each behavioral vector information; Target vector information is generated based on the behavior vector information and the weight information; Target recommendation information is determined in the search resource library based on the query terms corresponding to the target vector information; Output the target recommendation information; The method further includes: when the target recommendation information consists of multiple query terms, after the multiple query terms are initially sorted by the recommendation system, they are re-sorted in combination with a preset knowledge graph, and the re-sorted query terms are output. The determination of behavioral feature information based on the vector correlation between multiple behavioral vector information includes: The vector correlation between the behavior vector information corresponding to the historical behavior information and other behavior vector information is calculated based on the self-attention mechanism. The degree of association between the behavior vector information corresponding to the historical behavior information and other behavior vector information is determined based on the vector correlation, and the behavior feature information of each historical behavior information is obtained. The behavior feature information includes the importance information of the behavior vector information. The step of determining the weight information corresponding to each behavior vector based on the behavior feature information and the candidate recommendation information includes: The behavioral feature information is transformed into the corresponding spatial dimension of the candidate recommendation information to obtain the weight information corresponding to each behavioral vector information.

2. The method according to claim 1, characterized in that, The process of vectorizing each historical behavior information to generate behavior vector information for each historical behavior information includes: Obtain an embedding matrix for vector transformation of the historical behavior information; the embedding matrix includes the correspondence between vectors and behavior information; From the embedding matrix, determine the behavior vector information for each historical behavior information.

3. The method according to claim 1 or 2, characterized in that, The determination of behavioral feature information based on the vector correlation between multiple behavioral vector information includes: Obtain an attention model for extracting user behavior features; Multiple behavioral vectors are concatenated to obtain a vector matrix; The vector matrix is ​​input into the attention model, and an attention matrix is ​​generated based on the pre-trained model parameters in the attention model. Obtain preset normalization parameters, and normalize the product of the normalization parameters and the attention matrix to obtain behavioral feature information.

4. The method according to claim 2, characterized in that, The step of determining the weight information corresponding to each behavior vector based on the behavior feature information and the candidate recommendation information includes: The candidate recommendation information is vectorized using the embedding matrix to generate candidate recommendation vector information; The candidate recommendation vector information is transposed to obtain the transpose matrix of the candidate recommendation vector information; Multiply the transpose matrix by the behavioral feature information to obtain the first matrix; Obtain preset weight parameters and multiply the weight parameters by the first matrix to obtain the second matrix; The second matrix is ​​normalized to generate a target weight matrix, which is composed of the weight information corresponding to each behavior vector.

5. The method according to claim 1, characterized in that, The generation of target vector information based on the behavior vector information and the weight information includes: Each behavior vector is multiplied by its corresponding weight to obtain multiple sub-target vectors; the sum of the weights of all behavior vectors is 1. The multiple sub-target vectors are summed to generate target vector information.

6. The method according to claim 3, characterized in that, The historical behavior information includes the query terms used by the user and / or the target resource information selected by the user.

7. The method according to claim 6, characterized in that, The acquisition of multiple historical behavior information of the user includes: Obtain information on the historical search terms used by the user during their search history, as well as information on the selected resources. Determine the time sequence information of the historical query terms and the resource information; Based on the time sequence information, multiple historical behavior information is determined from the historical query term information and the resource information in reverse chronological order.

8. An information recommendation device, characterized in that, The device includes: The information acquisition module is used to respond to the user's search operation by acquiring multiple historical behavior information of the user and candidate recommendation information from a preset search resource library; The historical behavior vectorization module is used to vectorize each piece of historical behavior information and generate behavior vector information for each piece of historical behavior information; The behavior feature extraction module is used to determine the behavior feature information of the multiple historical behavior information based on the vector correlation between multiple behavior vector information. The weight information determination module is used to determine the weight information corresponding to each behavior vector based on the behavior feature information and the candidate recommendation information. A target vector information generation module is used to generate target vector information based on the behavior vector information and the weight information; The recommendation information determination module is used to determine target recommendation information in the search resource library based on the query terms corresponding to the target vector information; The recommendation information output module is used to output the target recommendation information; The behavior feature extraction module is specifically used to calculate the vector correlation between the behavior vector information corresponding to the historical behavior information and other behavior vector information based on the self-attention mechanism, determine the degree of association between the behavior vector information corresponding to the historical behavior information and other behavior vector information based on the vector correlation, and obtain the behavior feature information of each historical behavior information, wherein the behavior feature information includes the importance information of the behavior vector information; The weight information determination module is specifically used to transform the behavioral feature information into the corresponding spatial dimension of the candidate recommendation information to obtain the weight information corresponding to each behavioral vector information. The device is also used to, when the target recommendation information consists of multiple query terms, re-sort the query terms after initial sorting by the recommendation system, and output the re-sorted query terms in conjunction with a preset knowledge graph.

9. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the method of information recommendation as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the information recommendation method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Query recommendation method and device based on history information

    CN109145213A

  • User recommendation method and device

    CN110046304A

  • Method and device for recommending messages

    CN112163149A