Information recommendation method, device, electronic device and storage medium

By splicing all feature embedding vectors into target vectors in the ranking model and performing multi-head attention mechanism calculations, the problem of consistent size limitations of feature embedding vectors in the AutoInt algorithm is solved, the accuracy of information recommendation is improved, and more accurate recommendations are achieved result.

CN113111273BActive Publication Date: 2024-09-03TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110430370.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-21
Publication Date
2024-09-03
Estimated Expiration
2041-04-21

AI Technical Summary

Technical Problem

Due to the limitation of consistent size of feature embedding vectors in information recommendation, the existing AutoInt algorithm results in insufficient expression of feature embedding vectors and reduces the accuracy of information recommendation.

Method used

Using the ranking model, the feature embedding vector is generated through the input layer, and all feature embedding vectors are spliced ​​into the target vector in the interaction layer. The multi-head attention mechanism calculation is performed, combined with the output of the fully connected layer, the ranking score is generated through the splicing module, and the information recommendation is output. As a result, the limitation of feature embedding vector size is avoided.

Benefits of technology

The accuracy of information recommendation is improved, the information contained in the feature embedding vector is fully expressed, and the accuracy of the recommendation results is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113111273B
    Figure CN113111273B
Patent Text Reader

Abstract

The present application discloses an information recommendation method, which is applied to a ranking model. The ranking model includes an input layer, a fully connected layer, an interaction layer and a splicing module. The information recommendation method includes: using the input layer to generate a feature embedding vector of the input information; inputting the feature embedding vector into the interaction layer, splicing all feature embedding vectors using the interaction layer to obtain a target vector, and performing a multi-head attention mechanism calculation between elements on the target vector to obtain the output of the interaction layer; inputting the feature embedding vector into the fully connected layer, and performing matrix multiplication on the feature embedding vector using the fully connected layer to obtain the output of the fully connected layer; splicing the interaction layer output and the fully connected layer output using the splicing module to obtain the ranking score of the input information, and outputting the information recommendation result according to the ranking score. The present application can improve the accuracy of information recommendation. The present application also discloses an information recommendation device, an electronic device and a storage medium, which have the above beneficial effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine learning, and in particular to an information recommendation method, device, electronic device and storage medium. Background Art

[0002] Personalized recommendation algorithms can help users find content they like, thereby increasing their online time and retention rate. Personalized recommendation algorithms are implemented based on a ranking model, which uses the ranking model to score and sort candidate information, and push the top N candidate information as recommended content to the client.

[0003] In the related technology, the sorting calculation is mainly performed using a sorting model based on the AutoInt algorithm. However, since the smallest unit of the AutoInt algorithm operation is a feature embedding vector, all feature embedding vectors need to be of the same size. This method of limiting the size of feature embedding vectors will affect the expression of feature embedding vectors and reduce the accuracy of information recommendation.

[0004] Therefore, how to improve the accuracy of information recommendation is a technical problem that technicians in this field currently need to solve. Summary of the invention

[0005] The purpose of this application is to provide an information recommendation method, device, electronic device and storage medium, which can improve the accuracy of information recommendation.

[0006] In order to solve the above technical problems, the present application provides an information recommendation method, which is applied to a ranking model. The ranking model includes an input layer, a fully connected layer, an interaction layer and a splicing module. The information recommendation method includes:

[0007] Generating a feature embedding vector of input information using the input layer;

[0008] Input the feature embedding vector into the interaction layer, use the interaction layer to concatenate all the feature embedding vectors to obtain a target vector, and perform a multi-head attention mechanism calculation between elements on the target vector to obtain an interaction layer output;

[0009] Inputting the feature embedding vector into the fully connected layer, and performing matrix multiplication on the feature embedding vector using the fully connected layer to obtain a fully connected layer output;

[0010] The interaction layer output and the fully connected layer output are concatenated using the concatenation module to obtain a ranking score of the input information, and an information recommendation result is output according to the ranking score.

[0011] Optionally, generating a feature embedding vector of input information using the input layer includes:

[0012] In the embedding layer of the input layer, the input information is represented as a one-hot encoding, and the one-hot encoding is converted into a feature embedding vector to obtain an initial feature embedding vector;

[0013] In the weighted concatenation module of the input layer, a corresponding weighting operation is performed on the initial feature embedding vector according to the data type of the input information to obtain the feature embedding vector.

[0014] Optionally, performing a corresponding weighting operation on the initial feature embedding vector according to a data type of the input information to obtain the feature embedding vector includes:

[0015] Determining whether the input information is unsegmented numerical data;

[0016] If yes, multiplying the initial feature embedding vector by the original value of the input information to obtain the feature embedding vector;

[0017] If not, the initial feature embedding vector is multiplied by 1 to obtain the feature embedding vector.

[0018] Optionally, performing a multi-head attention mechanism calculation between elements on the target vector to obtain an interaction layer output includes:

[0019] Performing matrix inner product calculations on the target vector, the query matrix and the key matrix of the ranking model respectively to obtain a first result and a second result, and performing Hadamard product calculations on the i-th element of the first result and the k-th element of the second result to obtain a mapping function;

[0020] Performing softmax calculation on the mapping function to obtain attention weight;

[0021] Perform matrix inner product calculation on the target vector and the score weight obtained by the value matrix of the sorting model to obtain a third result;

[0022] The attention weight and the third result are weightedly calculated to obtain the element self-attention expression under each head in the multi-head attention mechanism, and all the element self-attention expressions are multiplied to obtain the interaction layer output.

[0023] Optionally, before using the input layer to generate a feature embedding vector of the input information, the method further includes:

[0024] receiving a recommendation request, and determining a requester profile corresponding to the recommendation request;

[0025] Combining the requester portrait with resource portraits of multiple candidate resources to obtain the request pair;

[0026] Feature extraction is performed on the request pair to obtain the input information.

[0027] Optionally, outputting information recommendation results according to the ranking score includes:

[0028] The candidate resources are sorted in descending order according to the ranking scores to obtain a resource recommendation order, and the information recommendation result is output according to the resource recommendation order.

[0029] Optionally, using the concatenation module to concatenate the interactive layer output and the fully connected layer output to obtain a ranking score of the input information includes:

[0030] The splicing module is used to splice the interactive layer output and the fully connected layer output to obtain a splicing result, and a weighted calculation is performed on the splicing result to obtain a ranking score of the input information.

[0031] The present application also provides an information recommendation device, wherein the information recommendation device includes a ranking model, and the ranking model includes an input layer, a fully connected layer, an interaction layer, and a splicing module;

[0032] Among them, the input layer is used to generate a feature embedding vector of the input information; the interaction layer is used to splice all the feature embedding vectors to obtain a target vector, and perform calculations of the multi-head attention mechanism between elements of the target vector to obtain the interaction layer output; the fully connected layer is used to perform matrix multiplication on the feature embedding vector to obtain the fully connected layer output; the splicing module is used to splice the interaction layer output and the fully connected layer output to obtain a ranking score for the input information, and output information recommendation results based on the ranking score.

[0033] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps of the above-mentioned information recommendation method are implemented.

[0034] The present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned information recommendation method when calling the computer program in the memory.

[0035] The present application provides an information recommendation method, which is applied to a ranking model. The ranking model includes an input layer, a fully connected layer, an interaction layer and a splicing module. The information recommendation method includes: using the input layer to generate a feature embedding vector of input information; inputting the feature embedding vector into the interaction layer, using the interaction layer to splice all the feature embedding vectors to obtain a target vector, and performing a multi-head attention mechanism calculation between elements on the target vector to obtain an interaction layer output; inputting the feature embedding vector into the fully connected layer, using the fully connected layer to perform matrix multiplication on the feature embedding vector to obtain a fully connected layer output; using the splicing module to splice the interaction layer output and the fully connected layer output to obtain a ranking score of the input information, and outputting an information recommendation result according to the ranking score.

[0036] The present application utilizes the input layer to generate a feature embedding vector of the input information, and in the interaction layer, all the feature embedding vectors are spliced ​​into a target vector, so as to perform multi-head attention calculation operations on the target vector. Since the present application is calculated based on the target vector after all the feature embedding vectors are spliced, it no longer relies on the calculation between the two feature embedding vectors, so the present application does not need to limit the size of the feature embedding vector. The present application utilizes the output of the interaction layer and the output of the fully connected layer to determine the ranking score of the input information, and then obtains the information recommendation result. The present application does not limit the size of the feature embedding vector, so that the information contained in the feature embedding vector can be fully expressed, thereby improving the accuracy of the information recommendation. The present application also provides an information recommendation device, an electronic device and a storage medium, which have the above-mentioned beneficial effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0038] Figure 1 An architecture diagram of an information recommendation system provided in an embodiment of the present application;

[0039] Figure 2 A flowchart of an information recommendation method provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of the structure of a sorting model provided in an embodiment of the present application;

[0041] Figure 4 A flowchart of a method for obtaining a feature embedding vector provided in an embodiment of the present application;

[0042] Figure 5 A flowchart of an interactive layer calculation process provided by an embodiment of the present application;

[0043] Figure 6 A schematic diagram of an interactive layer calculation principle provided in an embodiment of the present application;

[0044] Figure 7 A flowchart of a live broadcast room recommendation method for a live broadcast platform provided in an embodiment of the present application;

[0045] Figure 8 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] In order to facilitate understanding of the information recommendation method provided by this application, the system used is introduced below. Figure 1 , Figure 1 An architecture diagram of an information recommendation system provided in an embodiment of the present application, such as Figure 1 As shown, the information recommendation system includes a terminal device 101, a server 102 and an information recommendation device 103. The terminal device 101 can be a mobile phone, a tablet computer or a personal computer. The terminal device 101 sends the user information of the logged-in user to the server 102. The server 102 is used to provide resource use services for the terminal device 101, and there can be multiple resources in the server 102. The server 102 can send the relevant information and user information of the resource to the information recommendation device 103, and a ranking model is running in the information recommendation device 103. The information recommendation device 103 can use the ranking model to score the matching degree of each resource and user information to obtain a matching ranking result. The information recommendation device 103 can send the matching ranking result to the server 102, and the server 102 can send resource recommendation information to the terminal 101 according to the matching ranking result so as to recommend the top N ranked resources to the user.

[0048] See below Figure 2 , Figure 2 A flowchart of an information recommendation method provided in an embodiment of the present application.

[0049] Specific steps may include:

[0050] S201: Generate a feature embedding vector of input information using the input layer;

[0051] This embodiment can be applied to the sorting model, see Figure 3 , Figure 3 A schematic diagram of the structure of a sorting model provided in an embodiment of the present application, the sorting model mentioned above may include an input layer, a fully connected layer, an interaction layer and a splicing module. The input layer includes an embedding layer and a weighted splicing module. The above input information may be data features of the data to be sorted, and this embodiment may use the input layer to generate a feature embedding vector embedding of the input information.

[0052] After obtaining the feature embedding vector, the input layer can transmit the feature embedding vector to the fully connected layer and the interactive layer for processing respectively. Therefore, this embodiment does not limit the execution order of S102 and S103. After obtaining the interactive layer output and the fully connected layer output, S104 can be entered for sorting and information recommendation.

[0053] S202: Input the feature embedding vector into the interaction layer, use the interaction layer to concatenate all feature embedding vectors to obtain a target vector, and perform a multi-head attention mechanism calculation between elements of the target vector to obtain the output of the interaction layer;

[0054] Among them, after the feature embedding vector is input into the interaction layer, this embodiment can concatenate all the feature embedding vectors in the interaction layer to obtain a vector, namely the target vector. The target vector includes the elements in all the feature embedding vectors, and then performs the calculation operation of the multi-head self-attention mechanism between the elements on the target vector to obtain the output of the interaction layer. In the above process, the elements in the target vector can be processed, and the calculation process is not limited by the size of the feature embedding vector.

[0055] In actual use, since different features contain different amounts of information, a unified size will inevitably lead to redundancy or insufficiency. This embodiment is based on the processing of the splicing results of all feature embedding vectors, and does not rely on the calculation of pairwise feature embedding vectors, so there is no need to limit the size of the feature embedding vector, so that the information contained in the feature embedding vector can be fully expressed.

[0056] S203: inputting the feature embedding vector into a fully connected layer, and performing matrix multiplication on the feature embedding vector using the fully connected layer to obtain a fully connected layer output;

[0057] Among them, after the feature embedding vector is input into the fully connected layer, the fully connected layer can perform matrix multiplication on the feature embedding vector to obtain the fully connected layer output.

[0058] S204: Using the concatenation module to concatenate the interactive layer output and the fully connected layer output to obtain a ranking score of the input information, and outputting an information recommendation result according to the ranking score.

[0059] Among them, based on the output of the interaction layer and the output of the fully connected layer, this embodiment can use the splicing module to splice the output of the interaction layer and the output of the fully connected layer to obtain a splicing result, and determine the ranking score of the input information according to the splicing result, so as to determine the information that can be recommended according to the ranking score from high to low, that is, to obtain the information recommendation result. Specifically, this embodiment can use the splicing module to splice the output of the interaction layer and the output of the fully connected layer to obtain a splicing result, and perform weighted calculation on the splicing result to obtain the ranking score of the input information.

[0060] Furthermore, this embodiment may sort the candidate resources in descending order of ranking scores to obtain a resource recommendation order, and output the information recommendation result according to the resource recommendation order.

[0061] This application uses the input layer to generate a feature embedding vector of the input information, and splices all the feature embedding vectors into a target vector in the interaction layer so as to perform multi-head attention calculation operations on the target vector. Since this application is calculated based on the target vector after all the feature embedding vectors are spliced, it no longer relies on the calculation between the two feature embedding vectors, so this application does not need to limit the size of the feature embedding vector. This application uses the output of the interaction layer and the output of the fully connected layer to determine the ranking score of the input information, and then obtain the information recommendation result. This application does not limit the size of the feature embedding vector, so that the information contained in the feature embedding vector can be fully expressed, thereby improving the accuracy of information recommendation.

[0062] See also Figure 4 , Figure 4 A flowchart of a method for obtaining a feature embedding vector provided in an embodiment of the present application. Figure 2 The description of the process of generating the feature embedding vector of the input information in the corresponding embodiment can be combined with Figure 2 The corresponding embodiments are combined to obtain a further implementation method. This embodiment may include the following steps:

[0063] S401: Representing the input information as a one-hot encoding in an embedding layer of the input layer;

[0064] Among them, the input layer of the sorting model includes an embedding layer and a weighted concatenation module. In this embodiment, the embedding layer can be used to represent the input information as a one-hot encoding.

[0065] S402: performing feature embedding vector conversion on the one-hot encoding to obtain an initial feature embedding vector;

[0066] Take an example to illustrate the operation process of S401 and S402:

[0067] For example, if we divide age into the following intervals [<18, 19-30, 30-40, 40-50, 50-60, >60], then 24 years old can be represented as [0, 1, 0, 0, 0, 0] through one-hot encoding, and construct an embedding matrix. Suppose the size of embedding is 8, then the matrix is ​​6*8. After 24 years old is converted into embedding, it is the 8 elements in the second column of the matrix.

[0068] S403: In the weighted concatenation module of the input layer, a corresponding weighting operation is performed on the initial feature embedding vector according to the data type of the input information to obtain the feature embedding vector.

[0069] Since the initial feature embedding vector obtained by using one-hot encoding does not include the meaning of the numerical value itself, this embodiment can perform a corresponding weighting operation on the initial feature embedding vector according to the data type of the input information to obtain a feature embedding vector for ranking score calculation.

[0070] Specifically, this embodiment can determine whether the input information is non-segmented numerical data; if so, multiply the initial feature embedding vector by the original numerical value of the input information to obtain the feature embedding vector; if not, multiply the initial feature embedding vector by 1 to obtain the feature embedding vector. The non-segmented numerical data may include click-through rate, number of followers, etc.

[0071] See also Figure 5 , Figure 5 A flowchart of an interactive layer calculation process provided in an embodiment of the present application. This embodiment is Figure 2 The description of the process of inputting the feature embedding vector into the interactive layer for calculation in the corresponding embodiment can be compared with Figure 2 The corresponding embodiments are combined to obtain a further implementation method. This embodiment may include the following steps:

[0072] S501: Use the interaction layer to concatenate all feature embedding vectors to obtain a target vector;

[0073] S502: performing matrix inner product calculations on the target vector, the query matrix and the key matrix of the ranking model, respectively, to obtain a first result and a second result, and performing Hadamard product calculations on the i-th element of the first result and the k-th element of the second result to obtain a mapping function;

[0074] S503: Performing softmax calculation on the mapping function to obtain attention weight;

[0075] S504: performing matrix inner product calculation on the target vector and the score weight obtained by the value matrix of the sorting model to obtain a third result;

[0076] S505: Perform weighted calculation on the attention weight and the third result to obtain the element self-attention expression under each head in the multi-head attention mechanism, and multiply all the element self-attention expressions to obtain the interaction layer output.

[0077] The query matrix, key matrix and value matrix in the above embodiment are pre-set matrices in the sorting model using the multi-head attention mechanism. Since the present embodiment is based on the elements in the feature embedding vector for calculation, if the matrix inner product is used to calculate the mapping function, an oversized matrix will appear, and it is difficult for a single GPU to load the above matrix, which limits the application scenario of the present embodiment. To solve the above problem, the present application uses the Hadamard product to calculate the mapping function to avoid the appearance of a larger matrix, and the use of the Hadamard product can make the feature cross granularity more detailed to obtain rich feature cross results.

[0078] The following is an actual example to illustrate the specific process of calculation in the interaction layer. Figure 6 , Figure 6 A schematic diagram of an interactive layer calculation principle provided in an embodiment of the present application, Figure 6 In the above equation, e1~eM represent feature embedding vectors. All feature embedding vectors are concatenated to get the target vector. vm is the mth value after all feature embedding vectors are concatenated. The target vector is transformed by the query matrix, key matrix and value matrix to get the value Vm. Vm means the product of the value on the left and the attention weight, and its size is equal to the length of all feature embedding vectors concatenated together.

[0079] The following uses formulas 1 to 4 to illustrate the calculation process in the interaction layer:

[0080] Formula 1:

[0081] Formula 2:

[0082] Formula 3:

[0083] Formula 4:

[0084] In the above formula, T is the concatenated form of the feature embedding vector, h represents the head (i.e., granularity) of the multi-head attention mechanism, is the query matrix, is the key matrix, is the value matrix, <> represents the matrix inner product calculation, ⊙ represents the Hadamard product calculation. α is the attention weight, i represents the i-th element in T, k represents the k-th element in T, φ represents the mapping function, N represents the length of T after the feature embedding vector is concatenated, represents the self-attention expression of the i-th element obtained under the h-th head, Represents the self-attention expression of the i-th element after processing by multiple heads. A head can be understood as a set of parameters. Each head corresponds to a set of Wquery, Wkey and Wvalue parameters. There are several sets of the above parameters for several heads.

[0085] In this embodiment, the inner product of T and the query matrix can be calculated to obtain query, the inner product of T and the key matrix can be calculated to obtain key, and the inner product of T and the value matrix can be calculated to obtain value. The query and key are calculated by Hada code using formula 2 to obtain the mapping function φ of the i-th element and the k-th element in T under the h-th head. (h) (T i ,T k ), use formula 1 to perform softmax calculation to get the attention weight attention score, use formula 3 to multiply the attention weight and value and sum them to get the self-attention expression of the i-th element under the h-th head, and use formula 4 to calculate the self-attention expression of the i-th element after processing multiple heads, that is, to get the output result of the interaction layer.

[0086] The above embodiment does not use the matrix inner product when calculating the attention weight, but uses the Hadamard product for calculation. If the original method uses the inner product, a large matrix of T*T will be generated when the attention weight is obtained. This is huge in actual industrial scenarios, because the dimensions of T are generally in the thousands / millions level, and it is difficult for a single GPU to load such a large matrix, which is not conducive to the use of this embodiment in more scenarios. This embodiment adjusts the formula to use the form of the Hadamard product, and the matrix size of the attention weight is still T, which expands the application scenario of this solution. Furthermore, this embodiment uses the Hadamard product to calculate the attention weight to make the feature cross granularity finer and obtain richer feature cross results.

[0087] This example conducts experiments on several public datasets (MovieLens, Criteo, and Avazu) in the field of CTR estimation, and compares them with some current mainstream methods. The compared models mainly include LR, FM, AFM, DeepCrossing, NFM, CrossNet, CIN, HOFM, and AutoInt. The ranking model proposed in this example is named BitInt. The specific effect comparison is shown in the following table:

[0088]

[0089] AUC in the table is the area under the ROC curve, which is an evaluation index for classification. The larger the value, the better the effect. LogLoss is the logarithmic loss. The smaller the value, the better the model learning. It can be seen from the table above that our model has achieved the best results on all data sets.

[0090] This embodiment proposes to perform multi-head self-attention at the sub-granularity bit-wise level of the feature embedding vector, and change the vector-wise interaction mode, so that the size of the feature embedding vector can be freely adjusted, thereby obtaining better results. If based on the original multi-head self-attention method, an extremely large matrix will appear in the intermediate step, making it impossible to apply it in industrial scenarios. This embodiment changes the original attention calculation method from matrix inner product to matrix Hadamard product, so that it can be widely used.

[0091] The following is an example of an actual application to illustrate the process described in the above embodiment. Figure 7 , Figure 7 This is a flow chart of a method for recommending a live broadcast room on a live broadcast platform provided in an embodiment of the present application. This embodiment introduces a solution for the platform to push a personalized live broadcast room to a user. The specific process is as follows:

[0092] The user logs in to the live broadcast platform through the client and sends a push request u to the live broadcast server. After receiving the push request, the live broadcast server queries the current online anchors i1, i2...iN from the online anchor pool, and combines the current user and each anchor into a request pair {u,i1}, {u,i2}...{u,iN}. The request pair is sent to the feature platform, and then the feature platform is used to extract features to obtain the feature pair of the user and the anchor. The above feature pair is input into the sorting model so that the sorting model scores based on the degree of feature matching between the user and the anchor to obtain a score, and sorts according to the score, so that information can be pushed based on the sorting result.

[0093] As a feasible implementation method, this embodiment can extract input information in the following ways: receiving a recommendation request and determining the requester portrait corresponding to the recommendation request; combining the requester portrait with the resource portraits of multiple candidate resources to obtain the request pair; performing feature extraction on the request pair to obtain the input information. The requester portrait is information used to describe user characteristics, and the resource portrait is information used to describe resource characteristics. In the application scenario of the live broadcast platform, the above features include: basic portraits of users and anchors, including age, gender, and education level; statistical features, including the length of time users watch, the number of flowers sent and the number of payments made by users, etc.; real-time features, including the number of users watching the live broadcast room, the type of live broadcast room, and the length of playback time, etc.

[0094] An information recommendation device provided in an embodiment of the present application may include:

[0095] The information recommendation device includes a ranking model, which includes an input layer, a fully connected layer, an interaction layer and a splicing module;

[0096] Among them, the input layer is used to generate a feature embedding vector of the input information; the interaction layer is used to splice all the feature embedding vectors to obtain a target vector, and perform calculations of the multi-head attention mechanism between elements of the target vector to obtain the interaction layer output; the fully connected layer is used to perform matrix multiplication on the feature embedding vector to obtain the fully connected layer output; the splicing module is used to splice the interaction layer output and the fully connected layer output to obtain a ranking score for the input information, and output information recommendation results based on the ranking score.

[0097] This application uses the input layer to generate a feature embedding vector of the input information, and splices all the feature embedding vectors into a target vector in the interaction layer so as to perform multi-head attention calculation operations on the target vector. Since this application is calculated based on the target vector after all the feature embedding vectors are spliced, it no longer relies on the calculation between the two feature embedding vectors, so this application does not need to limit the size of the feature embedding vector. This application uses the output of the interaction layer and the output of the fully connected layer to determine the ranking score of the input information, and then obtain the information recommendation result. This application does not limit the size of the feature embedding vector, so that the information contained in the feature embedding vector can be fully expressed, thereby improving the accuracy of information recommendation.

[0098] Furthermore, the process of the input layer generating a feature embedding vector of input information includes: representing the input information as a one-hot encoding in the embedding layer, and converting the one-hot encoding into a feature embedding vector to obtain an initial feature embedding vector; and performing corresponding weighting operations on the initial feature embedding vector according to the data type of the input information in a weighted concatenation module to obtain the feature embedding vector.

[0099] Furthermore, the weighted splicing module is used to determine whether the input information is non-segmented numerical data; if so, multiplying the initial feature embedding vector by the original numerical value of the input information to obtain the feature embedding vector; if not, multiplying the initial feature embedding vector by 1 to obtain the feature embedding vector.

[0100] Furthermore, the splicing module is used to perform matrix inner product calculation on the target vector with the query matrix and key matrix of the sorting model respectively to obtain a first result and a second result, and perform Hadamard product calculation on the i-th element of the first result and the k-th element of the second result to obtain a mapping function; to perform softmax calculation on the mapping function to obtain attention weights; to perform matrix inner product calculation on the target vector and the value matrix of the sorting model to obtain score weights to obtain a third result; to perform weighted calculation on the attention weights and the third result to obtain the element self-attention expression under each head in the multi-head attention mechanism, and to multiply all the element self-attention expressions to obtain the interaction layer output.

[0101] Furthermore, it also includes:

[0102] A feature extraction module is used to receive a recommendation request and determine a requester portrait corresponding to the recommendation request before using the input layer to generate a feature embedding vector of the input information; it is also used to combine the requester portrait with resource portraits of multiple candidate resources to obtain the request pair; and it is also used to extract features from the request pair to obtain the input information.

[0103] Furthermore, the splicing module is used to sort the candidate resources in order of the ranking scores from high to low to obtain a resource recommendation order, and output the information recommendation result according to the resource recommendation order.

[0104] Furthermore, the splicing module is used to use the splicing module to splice the interactive layer output and the fully connected layer output to obtain a splicing result, and perform weighted calculation on the splicing result to obtain a ranking score of the input information.

[0105] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0106] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0107] The present application also provides an electronic device, see Figure 8 , a structural diagram of an electronic device provided in an embodiment of the present application, such as Figure 8 As shown, a processor 810 and a memory 820 may be included.

[0108] Among them, the processor 810 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 810 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 810 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 810 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 810 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0109] The memory 820 may include one or more computer-readable storage media, which may be non-transitory. The memory 820 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 820 is at least used to store the following computer program 821, wherein, after the computer program is loaded and executed by the processor 810, it can implement the relevant steps in the information recommendation method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 820 may also include an operating system 822 and data 823, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 822 may include Windows, Linux, Android, etc.

[0110] In some embodiments, the electronic device may further include a display screen 830 , an input / output interface 840 , a communication interface 850 , a sensor 860 , a power source 870 , and a communication bus 880 .

[0111] certainly, Figure 8 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual applications, the electronic device may include Figure 8 More or fewer components than shown, or combinations of certain components.

[0112] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.

[0113] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. An information recommendation method, characterized in that: Applied to a ranking model, the ranking model includes an input layer, a fully connected layer, an interaction layer and a splicing module, and the information recommendation method includes: Generating a feature embedding vector of input information using the input layer; Input the feature embedding vector into the interaction layer, use the interaction layer to concatenate all the feature embedding vectors to obtain a target vector, and perform a multi-head attention mechanism calculation between elements on the target vector to obtain an interaction layer output; Inputting the feature embedding vector into the fully connected layer, and performing matrix multiplication on the feature embedding vector using the fully connected layer to obtain a fully connected layer output; The interaction layer output and the fully connected layer output are concatenated using the concatenation module to obtain a ranking score of the input information, and an information recommendation result is output according to the ranking score.

2. The information recommendation method according to claim 1, characterized in that: Generating a feature embedding vector of input information using the input layer includes: In the embedding layer of the input layer, the input information is represented as a one-hot encoding, and the one-hot encoding is converted into a feature embedding vector to obtain an initial feature embedding vector; In the weighted concatenation module of the input layer, a corresponding weighting operation is performed on the initial feature embedding vector according to the data type of the input information to obtain the feature embedding vector.

3. The information recommendation method according to claim 2, characterized in that: Performing a corresponding weighting operation on the initial feature embedding vector according to the data type of the input information to obtain the feature embedding vector includes: Determining whether the input information is unsegmented numerical data; If yes, multiplying the initial feature embedding vector by the original value of the input information to obtain the feature embedding vector; If not, the initial feature embedding vector is multiplied by 1 to obtain the feature embedding vector.

4. The information recommendation method according to claim 1, characterized in that: The multi-head attention mechanism is performed on the target vector to calculate the interaction layer output, including: Performing matrix inner product calculations on the target vector, the query matrix and the key matrix of the ranking model respectively to obtain a first result and a second result, and performing Hadamard product calculations on the i-th element of the first result and the k-th element of the second result to obtain a mapping function; Performing softmax calculation on the mapping function to obtain attention weight; Perform matrix inner product calculation on the target vector and the score weight obtained by the value matrix of the sorting model to obtain a third result; The attention weight and the third result are weightedly calculated to obtain the element self-attention expression under each head in the multi-head attention mechanism, and all the element self-attention expressions are multiplied to obtain the interaction layer output.

5. The information recommendation method according to claim 1, characterized in that: Before using the input layer to generate a feature embedding vector of the input information, the method further includes: receiving a recommendation request, and determining a requester profile corresponding to the recommendation request; Combining the requester portrait with resource portraits of multiple candidate resources to obtain the request pair; Feature extraction is performed on the request pair to obtain the input information.

6. The information recommendation method according to claim 1, characterized in that: Outputting information recommendation results according to the ranking score includes: The candidate resources are sorted in descending order according to the ranking scores to obtain a resource recommendation order, and the information recommendation result is output according to the resource recommendation order.

7. The information recommendation method according to any one of claims 1 to 6, characterized in that: Using the concatenation module to concatenate the interactive layer output and the fully connected layer output to obtain a ranking score of the input information includes: The splicing module is used to splice the interactive layer output and the fully connected layer output to obtain a splicing result, and a weighted calculation is performed on the splicing result to obtain a ranking score of the input information.

8. An information recommendation device, characterized in that: The information recommendation device includes a ranking model, which includes an input layer, a fully connected layer, an interaction layer and a splicing module; Among them, the input layer is used to generate a feature embedding vector of the input information; the interaction layer is used to splice all the feature embedding vectors to obtain a target vector, and perform calculations of the multi-head attention mechanism between elements of the target vector to obtain the interaction layer output; the fully connected layer is used to perform matrix multiplication on the feature embedding vector to obtain the fully connected layer output; the splicing module is used to splice the interaction layer output and the fully connected layer output to obtain a ranking score for the input information, and output information recommendation results based on the ranking score.

9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps of the information recommendation method according to any one of claims 1 to 7 are implemented.

10. A storage medium, characterized in that: The storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by the processor, the steps of the information recommendation method according to any one of claims 1 to 7 are implemented.