Recommended information sorting method, device, electronic device and medium
By using multiple residual blocks and attention modules to process feature vectors in the MMOE model, the model degradation problem caused by excessive expert module layers is solved, and a more accurate sort of recommended entries is achieved.
Patent Information
- Application Number
- CN202111240625.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-25
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2041-10-25
AI Technical Summary
The model degradation caused by too many expert module layers in the existing MMOE model leads to poor sorting of recommended entries.
The multi-task learning MMOE model is adopted. By inputting each feature vector in the feature group set of entries to be recommended into the trained expert module, using multiple residual blocks to process the feature vector, and obtaining the weight vector through the attention module, combining the output layer MLP to determine the entry score and recommendation order.
It avoids feature loss caused by the increase in the number of expert module layers, and improves the accuracy and effectiveness of recommended entries sorting.
Smart Images

Figure CN113946763B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a method, device, electronic device and medium for sorting recommended information. Background Art
[0002] With the development of internet technology, various websites often have search and discovery features. When users click the search box, a webpage will display a number of recommended search terms for them to choose from. Currently, the Multi-gate Mixture-of-Experts (MMOE) model can be used to sort these recommended terms and display appropriate recommendations to users.
[0003] Currently, the MMOE model's expert module (Expert) has more layers to obtain deeper semantic information. However, this increased number of expert modules leads to model degradation, resulting in poor recommendation results for users based on the MMOE model's ranking results. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device, and medium for sorting recommended information to more accurately determine the display order of recommended terms. The specific technical solution is as follows:
[0005] In a first aspect of the present application, a method for ranking recommended information is provided, comprising:
[0006] For each to-be-recommended term, each feature vector in the feature group set of the to-be-recommended term is input into different expert modules of the recommendation model, and a feature vector is obtained after each expert module processes the feature vector using multiple residual blocks included therein; wherein the recommendation model is a model obtained by training a multi-task learning (MMOE) model, and each expert module of the MMOE model includes multiple residual blocks;
[0007] Determining the score of the to-be-recommended term by the recommendation model based on the feature vectors output by each expert module;
[0008] Based on the score of each to-be-recommended term, the recommendation order of the to-be-recommended terms is determined.
[0009] Optionally, determining the score of the to-be-recommended term based on the feature vectors output by each expert module through the recommendation model includes:
[0010] The feature vectors output by each expert module are input into an attention module through the recommendation model to obtain the weight vectors output by each attention module for the corresponding expert module;
[0011] For each expert module, multiply the feature vector included in the feature group set by the weight vector of the expert module, and then concatenate the result with the feature vector output by the expert module to obtain a concatenated feature vector corresponding to the expert module;
[0012] The splicing feature vectors corresponding to the expert modules are spliced, and the splicing result is input into the output layer MLP of the recommendation model to obtain the score of the to-be-recommended term output by the output layer MLP.
[0013] Optionally, the step of inputting each feature vector in the feature group set of the to-be-recommended term into different expert modules of the recommendation model, and obtaining a feature vector output by each expert module after processing the feature vector through the included multiple residual blocks, comprises:
[0014] For each feature vector in the feature group set, the feature vector is input into the corresponding expert module, and is processed in turn by each residual block of the expert module to obtain the feature vector output by the expert module; wherein the feature vectors in the feature group set have a one-to-one correspondence with the expert modules in the recommendation model.
[0015] Optionally, the step of inputting the feature vector into the corresponding expert module and sequentially processing the feature vector through the residual blocks of the expert module includes:
[0016] Input the feature vector as an initial feature vector into the first residual block of the corresponding expert module, and process the initial feature vector through each MLP included in the first residual block in turn to obtain a processing result of the initial feature vector;
[0017] Adding the processing result of the initial eigenvector to the initial eigenvector to obtain a first eigenvector;
[0018] Inputting the first feature vector into the second residual block of the expert module, and sequentially processing the first feature vector through each MLP included in the second residual block to obtain a processing result of the first feature vector;
[0019] Adding the processing result of the first eigenvector to the first eigenvector to obtain a second eigenvector;
[0020] The second feature vector is input into the subsequent residual block of the expert module for processing until a feature vector output by the last residual block of the expert module is obtained.
[0021] Optionally, the weight vector of the expert module is:
[0022]
[0023] Among them, Softmax represents the logistic regression function, Feat0 represents the feature group set, Represents the eigenvector in Feat0 The feature vector obtained after passing through the n residual blocks of the corresponding expert module, i = 1, 2, ..., m, m is the number of feature vectors included in Feat0, n is The number of residual blocks included in the corresponding expert module, for Included feature dimensions, R V Indicates the total dimension of the features included in Feat0, W indicates The function of the corresponding attention module.
[0024] In a second aspect of the present application, a device for sorting recommended information is provided, comprising:
[0025] an acquisition module for inputting, for each to-be-recommended term, each feature vector in the feature group set of the to-be-recommended term into different expert modules of the recommendation model, and obtaining feature vectors output by each expert module after processing the feature vectors using the multiple residual blocks included therein; wherein the recommendation model is a model obtained by training a multi-task learning (MMOE) model, and each expert module of the MMOE model includes multiple residual blocks;
[0026] A determination module, configured to determine the score of the to-be-recommended term based on the feature vectors output by each expert module through the recommendation model;
[0027] The determination module is further configured to determine a recommendation order of the terms to be recommended based on the score of each term to be recommended.
[0028] Optionally, the determining module is specifically configured to:
[0029] The feature vectors output by each expert module are input into an attention module through the recommendation model to obtain the weight vectors output by each attention module for the corresponding expert module;
[0030] For each expert module, multiply the feature vector included in the feature group set by the weight vector of the expert module, and then concatenate the result with the feature vector output by the expert module to obtain a concatenated feature vector corresponding to the expert module;
[0031] The splicing feature vectors corresponding to the expert modules are spliced, and the splicing result is input into the output layer MLP of the recommendation model to obtain the score of the to-be-recommended term output by the output layer MLP.
[0032] Optionally, the acquisition module is specifically configured to:
[0033] For each feature vector in the feature group set, the feature vector is input into the corresponding expert module, and is processed in turn by each residual block of the expert module to obtain the feature vector output by the expert module; wherein the feature vectors in the feature group set have a one-to-one correspondence with the expert modules in the recommendation model.
[0034] Optionally, the acquisition module is specifically configured to:
[0035] Input the feature vector as an initial feature vector into the first residual block of the corresponding expert module, and process the initial feature vector through each MLP included in the first residual block in turn to obtain a processing result of the initial feature vector;
[0036] Adding the processing result of the initial eigenvector to the initial eigenvector to obtain a first eigenvector;
[0037] Inputting the first feature vector into the second residual block of the expert module, and sequentially processing the first feature vector through each MLP included in the second residual block to obtain a processing result of the first feature vector;
[0038] Adding the processing result of the first eigenvector to the first eigenvector to obtain a second eigenvector;
[0039] The second feature vector is input into the subsequent residual block of the expert module for processing until a feature vector output by the last residual block of the expert module is obtained.
[0040] Optionally, the weight vector of the expert module is:
[0041]
[0042] Among them, Softmax represents the logistic regression function, Feat0 represents the feature group set, Represents the eigenvector in Feat0 The feature vector obtained after passing through the n residual blocks of the corresponding expert module, i = 1, 2, ..., m, m is the number of feature vectors included in Feat0, n is The number of residual blocks included in the corresponding expert module, for The feature dimensions included, Ry represents the total feature dimensions included in Feat0, and W represents The function of the corresponding attention module.
[0043] In a third aspect of the present application, an electronic device is provided, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0044] Memory for storing computer programs;
[0045] The processor is configured to implement any of the steps of the recommendation information sorting method described above when executing the program stored in the memory.
[0046] In a fourth aspect of the implementation of the present application, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for sorting recommended information described in any one of the above items is implemented.
[0047] In a fifth aspect of the implementation of the present application, a computer program product comprising instructions is further provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned recommendation information ranking methods.
[0048] The recommendation information sorting method, device, electronic device and medium provided in the embodiment of the present application input each feature vector in the feature group set of each to-be-recommended term into different expert modules of the trained recommendation model, and obtain the feature vector output by each expert module after processing the feature vector through the multiple residual blocks included. Then, the score of the to-be-recommended term is determined based on the feature vector output by each expert module, and then the recommendation order of the to-be-recommended term is determined based on the score of each to-be-recommended term. The recommendation model in the embodiment of the present application is a model obtained by training the MMOE model. Since each expert module of the MMOE model includes multiple residual blocks, the residual blocks can reduce the feature loss caused by too many layers of expert modules. Therefore, the embodiment of the present application avoids the model degradation caused by the increase in the number of layers of expert modules. Therefore, the recommendation order of the to-be-recommended terms determined by the recommendation model in the embodiment of the present application is more accurate, which can improve the recommendation effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for describing the embodiments or the prior art.
[0050] Figure 1 A flowchart of a method for sorting recommended information provided by an embodiment of the present invention;
[0051] Figure 2 A schematic diagram of the structure of a residual block provided by an embodiment of the present invention;
[0052] Figure 3A flowchart of another method for sorting recommendation information provided by an embodiment of the present invention;
[0053] Figure 4 A schematic diagram of the structure of an expert module provided by an embodiment of the present invention;
[0054] Figure 5 A schematic diagram of the structure of a recommendation model provided by an embodiment of the present invention;
[0055] Figure 6 A flow chart of a recommendation model training method provided by an embodiment of the present invention;
[0056] Figure 7 A schematic diagram of the structure of a device for sorting recommended information provided by an embodiment of the present invention;
[0057] Figure 8 A schematic diagram of the structure of a recommendation model training device provided by an embodiment of the present invention;
[0058] Figure 9 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
[0060] This embodiment of the present application provides a method for sorting recommended information, the method comprising:
[0061] For each to-be-recommended term, each feature vector in the feature set of the to-be-recommended term is input into different expert modules of the trained recommendation model, and a feature vector is obtained after each expert module processes the feature vector using multiple residual blocks. The recommendation model is a model trained using a multi-gate mixture-of-experts (MMOE) model, and each expert module of the MMOE model includes multiple residual blocks.
[0062] Determine the score of the to-be-recommended term based on the feature vectors output by each expert module through the recommendation model;
[0063] Based on the score of each to-be-recommended term, the recommendation order of the to-be-recommended terms is determined.
[0064] Using the above method, since each expert module of the MMOE model includes multiple residual blocks, the residual blocks can reduce the feature loss caused by too many layers of expert modules. Therefore, the embodiment of the present application avoids the model degradation caused by the increase in the number of layers of expert modules. Therefore, the recommendation order of the recommended terms determined by the recommendation model in the embodiment of the present application is more accurate.
[0065] The following is a detailed introduction to the recommendation information sorting method provided in the embodiments of the present application.
[0066] like Figure 1 As shown, an embodiment of the present application provides a method for sorting recommended information, the method comprising:
[0067] S101. For each term to be recommended, input each feature vector in the feature group set of the term to be recommended into different expert modules of the trained recommendation model, and obtain the feature vector output by each expert module after processing the feature vector through the included multiple residual blocks.
[0068] The feature vectors of each feature group in the feature group set represent different dimensions of the recommended term. For example, feature vector 1 in the feature group set represents the click-through rate of the recommended term, including the number of clicks and the number of clicks; feature vector 2 represents the content category corresponding to the recommended term, which could be movies, TV series, variety shows, etc.
[0069] The feature set of each entry to be recommended is: in, Represents the feature vector constructed for the initial features of feature group 1, and so on. Represents the feature vector constructed from the initial features of feature group m, x1 represents feature 1 in Feat0, and so on, x V Represents the feature V in Feat0, and RV represents the total dimension of the features included in Feat0. That is, each feature vector includes multiple features, and the total number of features of each feature vector included in the feature group set is V. For example, express The feature dimensions included are The CCP includes N1 features, After a residual block processing, we get express The feature vector obtained after passing through a residual block.
[0070] The recommendation model is a model obtained by training the MMOE model, and each expert module of the MMOE model includes multiple residual blocks.
[0071] Each expert module includes multiple multi-layer perceptrons (MLPs) connected in series, and each residual block includes at least two MLPs, each with a sigmoid activation layer. The output of the residual block is the sum of the features of the input residual block and the features extracted by the residual block from the input. That is, the output of the residual block is f(X) = H(X, W) + X, where x represents the feature vector of the input residual block, H(x, W) represents the feature vector extracted from X by the entire series of MLPs in the residual block, and W represents the function of the entire MLP.
[0072] For example, the structure of the residual block is as follows Figure 2 As shown, Figure 2 The residual block in consists of MLP1 and MLP2 connected in series. MLP1 receives the input feature vector 1 and extracts features from it to obtain feature vector 2. The extracted feature vector 2 is then input into MLP2, which extracts features from it to obtain feature vector 3. Feature vector 1 and feature vector 3 are then added together, and the result of the addition is used as the output of the residual block.
[0073] S102: Determine the score of the to-be-recommended term based on the feature vectors output by each expert module through a recommendation model.
[0074] The feature vector output by each expert module is: express The feature vector obtained after n residual blocks, Representation The feature vector obtained after n residual blocks, and so on, express The feature vector obtained after passing through n residual blocks.
[0075] Among them, the number of residual blocks included in each expert module can be the same or different. For the convenience of description, the embodiment of the present application is explained by taking the example that the number of residual blocks included in each expert module is n.
[0076] In one implementation, the sum of the feature vectors output by each expert module may be used as the score of the term to be recommended.
[0077] S103: Determine the recommendation order of the terms to be recommended based on the score of each term to be recommended.
[0078] In one implementation, the order of the scores of the terms to be recommended can be ranked from high to low, that is, the higher the score of the term to be recommended, the higher the recommendation order; the lower the score of the term to be recommended, the lower the recommendation order.
[0079] The recommendation information sorting method provided in the embodiment of the present application inputs each feature vector in the feature group set of each to-be-recommended term into different expert modules of the trained recommendation model, and obtains the feature vector output by each expert module after processing the feature vector through the multiple residual blocks included. Then, the score of the to-be-recommended term is determined based on the feature vector output by each expert module, and then the recommendation order of the to-be-recommended term is determined based on the score of each to-be-recommended term. The recommendation model in the embodiment of the present application is a model obtained by training the MMOE model, so the embodiment of the present application avoids model degradation caused by an increase in the number of layers of the expert module. Therefore, the recommendation order of the to-be-recommended terms determined by the recommendation model in the embodiment of the present application is more accurate, which can improve the recommendation effect.
[0080] In another embodiment of the present application, Figure 3 As shown, the above S102, determining the score of the to-be-recommended term based on the feature vectors output by each expert module through the recommendation model, includes:
[0081] S1021. Input the feature vectors output by each expert module into an attention module through the recommendation model, and obtain the weight vectors output by each attention module for the corresponding expert module.
[0082] In the recommendation model, each expert module is connected to an attention module, and the attention module is used to determine a set of weight vectors for the expert module connected to itself, and the set of weight vectors includes the weight of each feature included in the feature group set.
[0083] In one implementation, the weight vector Att of the expert module i for:
[0084]
[0085] Among them, Softmax represents the logistic regression function, Feat0 represents the feature group set, Represents the eigenvector in Feat0 The feature vector obtained after passing through the n residual blocks of the corresponding expert module, i = 1, 2, ..., m, m is the number of feature vectors included in Feat0, n is The number of residual blocks included in the corresponding expert module, for Included feature dimensions, R V Indicates the total dimension of the features included in Feat0, W indicates The function of the corresponding attention module.
[0086] Since the feature vectors in the feature group set have a one-to-one correspondence with the expert modules in the recommendation model, The corresponding attention module is: The attention module connected to the corresponding expert module.
[0087] Taking Att1 as an example, since Att1 includes the weights of each feature in the feature group set, the sum of the features included in Att1 is 1. in, It represents the feature obtained after feature 1 passes through the attention module. Represents feature x V The feature value obtained after the attention module; express That is, the sum of the feature values of each feature included in the feature group set after passing through the attention module.
[0088] S1022: For each expert module, multiply the feature vector included in the feature group set by the weight vector of the expert module, and then concatenate the result with the feature vector output by the expert module to obtain a concatenated feature vector corresponding to the expert module.
[0089] Taking Expert Module 1 as an example, That is, the weight vector of expert module 1 includes V weights. Among them, the feature vector Including N1 features, correspondingly, is the eigenvector The weight vector of . Eigenvector Including N2 features, correspondingly, is the eigenvector The weight vector of . Similarly, the eigenvector Including N m Features, accordingly, is the eigenvector The weight vector of the feature set Feat0 is multiplied by each feature vector and its corresponding weight vector, and the product is Splicing to obtain the splicing feature vector corresponding to expert module 1.
[0090] S1023: Concatenate the concatenated feature vectors corresponding to the expert modules, input the concatenated result into the output layer MLP of the recommendation model, and obtain the score of the to-be-recommended term output by the output layer MLP.
[0091] Taking S1021-S1023 as an example, assume that the feature group set of the recommended term includes m feature vectors, that is, And assume that each expert module contains n residual blocks. The output of each expert module consists of in, Represents the feature vector The feature vector obtained after passing through n residual blocks of expert module 1, express The feature vector obtained after n residual blocks of expert module 2, and so on, Represents the feature vector The feature vector obtained after passing through n residual blocks of expert module m.
[0092] Taking expert module 1 as an example, assume that the weight vector of attention module 1 to the output of expert module 1 is Among them, A1 is the abbreviation of Att1, and the concatenated feature vector corresponding to expert module 1 is Among them, x1~x V These are the features included in Feat0.
[0093] Similarly, the weight vector of the output of attention module 2 to expert module 2 is The concatenated feature vector corresponding to expert module 2 is Among them, x1~x V are the features included in Feat0, and so on.
[0094] The concatenated feature vectors corresponding to each expert module are concatenated to obtain F = [F1, ..., F m ], F=[F1,...,F m ] After the output layer MLP of the recommendation model, the score of the recommended term is out = tanh(F×W), W∈R V×h Among them, tanh represents the hyperbolic tangent function, W represents the function of the output layer MLP, and R V Indicates the total dimension of features included in the feature group set, R h Represents the output dimension, that is, the total number of terms to be recommended.
[0095] In related technologies, the output feature vectors of each expert module are combined through a gate structure to obtain the score of the recommended term. However, the gate structure can only perform simple processing on the output feature vectors and cannot reflect the weights of different expert modules. It cannot determine the score of the recommended term based on the importance of each feature vector of the recommended term, making the score determined by this method inaccurate.
[0096] In the embodiment of the present application, since the feature vectors output by each expert module pass through the attention module, a weight vector for the expert module can be obtained. This weight vector can represent the weight vector of each feature vector in the feature group set. Since each feature vector of the recommended term has different importance to the score of the recommended term, setting a weight vector for each feature vector can improve the accuracy of the determined score of the recommended term.
[0097] Moreover, the weight vector of the feature vector can represent the weight of each feature in the feature vector. Since each feature of the recommended term has different importance to the score of the recommended term, setting a weight vector for each feature can further improve the accuracy of the determined score of the recommended term.
[0098] In another embodiment of the present application, in S101, each feature vector in the feature group set of the term to be recommended is input into different expert modules of the recommendation model respectively, and the feature vector output by each expert module after processing the feature vector through the multiple residual blocks included is obtained. This can be implemented as follows: for each feature vector in the feature group set, the feature vector is input into the corresponding expert module, and is processed by each residual block of the expert module in turn to obtain the feature vector output by the expert module.
[0099] The feature vectors in the feature group set have a one-to-one correspondence with the expert modules in the recommendation model. Each feature group set for each recommended term has the same total number of feature vectors. If a feature vector for a recommended term cannot be obtained, that feature vector can be replaced with a zero vector.
[0100] For details, see Figure 4 , the feature vector is input into the corresponding expert module, and processed by each residual block of the expert module in turn, including the following steps:
[0101] Combine Figure 4 First, the feature vector is input as the initial feature vector into the first residual block of the corresponding expert module. The initial feature vector is processed by each MLP included in the first residual block in turn to obtain the processing result of the initial feature vector. The first residual block is the first residual block of the expert module.
[0102] Then, the processing result of the initial eigenvector is added to the initial eigenvector to obtain a first eigenvector, wherein the first eigenvector is the processing result of the first residual block.
[0103] Afterwards, the first eigenvector is input into the second residual block of the expert module, and the first eigenvector is processed in turn by each MLP included in the second residual block to obtain a processing result of the first eigenvector.
[0104] Then, the processing result of the first eigenvector is added to the first eigenvector to obtain a second eigenvector, wherein the second eigenvector is the processing result of the second residual block.
[0105] Finally, the second eigenvector is input into the subsequent residual block of the expert module for processing until the eigenvector output by the last residual block of the expert module is obtained.
[0106] For example, Figure 4 The expert module in includes n residual blocks in total. The initial feature vector passes through the first residual block to the nth residual block in sequence to obtain the feature vector output by the nth residual block.
[0107] It should be noted that Figure 4 Each residual block in the expert module includes two MLPs. In practice, the number of MLPs included in each residual block in the expert module is not limited to this number. The number of MLPs included in each residual block in the expert module can be the same or different. Furthermore, an expert module may contain MLPs that do not belong to the residual module, or may not contain MLPs that do not belong to the residual module.
[0108] by Figure 4 For example, the structure of the expert module in the related technology is Figure 4 All MLPs in the algorithm are connected in series, and when MLP processes the feature vector, it is easy to lose the input features, resulting in the output result of the expert module containing only the recognized deep features and losing the shallow features, making the output result of the expert module inaccurate.
[0109] In the embodiment of the present application, a residual block is constructed based on at least two MLPs in the expert module, the MLPs in each residual block are connected in series in sequence, and the feature vector input to the first MLP in the residual block needs to be added to the feature vector output by the last MLP as the output result of the residual block. That is, in the embodiment of the present application, since the output result of each residual block contains its input result, the feature loss of the initial feature vector input and the feature vector obtained in the intermediate processing process is reduced during the processing of the feature vector by the expert module, thereby improving the accuracy of the output result of the expert module. In addition, it can be seen that in the embodiment of the present application, the deepening of the number of layers of the expert module will not lead to model degradation, so in the embodiment of the present application, a deeper number of layers of the expert module can be set to extract deeper semantic features.
[0110] The following combination Figure 5 , the overall process of the recommendation information ranking method provided in the embodiment of the present application is described:
[0111] The recommendation module includes m expert modules, namely Expert1, ....., Expert m For a term to be recommended, the feature set Feat0 of the term to be recommended includes m feature vectors, which are Input each feature vector into its corresponding expert module to obtain the feature vector output by each expert module For each expert module, the feature vector output by the expert module is input into the attention module connected to the expert module, and the weight vector A of the expert module is determined by the attention module. i , the feature vectors included in the feature set Feat0 and the weight vector A of the expert module i After multiplication, the feature vector output by the expert module Perform splicing to obtain the splicing feature vector F corresponding to the expert module i . Wherein, i = 1, 2, ..., m.
[0112] Afterwards, the concatenated feature vectors corresponding to each expert module are concatenated (Concat), and the concatenated result F = [F1, ..., F m ] Input the output layer MLP of the recommendation model and obtain the score Out of the recommended term output by the output layer MLP.
[0113] In one embodiment of the present application, Figure 6 As shown, the recommendation model in the embodiment of the present application can be trained by the following steps:
[0114] S601: Obtain a term sample set, wherein the term sample set includes a plurality of term samples and a corresponding annotation score for each term sample.
[0115] S602: For each term sample, input each feature vector in the feature group set of the term sample into different expert modules of the MMOE model respectively, and obtain a feature vector output by each expert module after processing the feature vector through the included multiple residual blocks.
[0116] The implementation of S602 may refer to the description of S101 above, which will not be repeated here.
[0117] S603: Determine the score of the input term sample based on the feature vectors output by each expert module through the MMOE model.
[0118] The implementation of S603 may refer to the description of S102 above, which will not be repeated here.
[0119] S604: Determine whether the MMOE model has converged based on the determined score and the annotation scores of the term samples input into the MMOE model. If not, execute S605; if so, execute S606.
[0120] In one implementation, a loss function can be calculated using the determined score and the corresponding annotation scores of the term samples input into the MMOE model. Convergence of the MMOE model is determined based on the loss function. For example, if the loss function is greater than a preset threshold, the MMOE model is determined to be non-convergent; if the loss function is less than or equal to the preset threshold, the MMOE model is determined to be converged.
[0121] S605: Adjust the model parameters of the MMOE model and return to S602.
[0122] The model parameters of the MMOE model are parameters of each network layer included in the MMOE model.
[0123] In one implementation, the model parameters of the MMOE model may be adjusted based on the loss function, and the process returns to S602 based on the adjusted MMOE model.
[0124] S606: Use the current MMOE model as a recommended model.
[0125] Using the above method, the embodiment of the present application can train the MMOE model using a sample set of terms to obtain a recommendation model. Because each expert module of the MMOE model includes multiple residual blocks, each expert module in the recommendation model obtained by training the MMOE model also includes multiple residual blocks. The residual blocks can reduce feature loss caused by an excessive number of expert module layers. Therefore, the embodiment of the present application avoids model degradation caused by an increase in the number of expert module layers. Therefore, using the recommendation model in the embodiment of the present application can improve the accuracy of determining the recommendation order of the terms to be recommended, which can improve the recommendation effect.
[0126] Based on the same inventive concept, corresponding to the above-mentioned recommended information sorting method embodiment, the embodiment of the present invention further provides a recommended information sorting device, such as Figure 7 As shown, the device includes: an acquisition module 701 and a determination module 702;
[0127] Acquisition module 701 is configured to input, for each to-be-recommended term, each feature vector in the feature set of the to-be-recommended term into different expert modules of the recommendation model, and obtain feature vectors output by each expert module after processing the feature vectors using the multiple residual blocks included therein. The recommendation model is a model trained using a multi-task learning (MMOE) model, and each expert module of the MMOE model includes multiple residual blocks.
[0128] A determination module 702 is configured to determine the score of the to-be-recommended term based on the feature vectors output by each expert module using a recommendation model;
[0129] The determination module 702 is further configured to determine the recommendation order of the to-be-recommended terms based on the score of each to-be-recommended term.
[0130] Optionally, the determination module 702 is specifically configured to:
[0131] The feature vectors output by each expert module are input into an attention module through the recommendation model to obtain the weight vectors output by each attention module for the corresponding expert module;
[0132] For each expert module, multiply the feature vector included in the feature group set by the weight vector of the expert module, and then concatenate the result with the feature vector output by the expert module to obtain a concatenated feature vector corresponding to the expert module;
[0133] The concatenated feature vectors corresponding to each expert module are concatenated, and the concatenated result is input into the output layer MLP of the recommendation model to obtain the score of the to-be-recommended term outputted by the output layer MLP.
[0134] Optionally, the acquisition module 701 is specifically configured to:
[0135] For each feature vector in the feature group set, the feature vector is input into the corresponding expert module, and processed in turn by each residual block of the expert module to obtain the feature vector output by the expert module; wherein the feature vectors in the feature group set have a one-to-one correspondence with the expert modules in the recommendation model.
[0136] Optionally, the acquisition module 701 is specifically configured to:
[0137] Input the feature vector as the initial feature vector into the first residual block of the corresponding expert module, and process the initial feature vector through each MLP included in the first residual block in turn to obtain a processing result of the initial feature vector;
[0138] Adding the processed result of the initial eigenvector to the initial eigenvector to obtain a first eigenvector;
[0139] Inputting the first eigenvector into the second residual block of the expert module, processing the first eigenvector in turn through each MLP included in the second residual block to obtain a processing result of the first eigenvector;
[0140] Adding the processed result of the first eigenvector to the first eigenvector to obtain a second eigenvector;
[0141] The second eigenvector is input into the subsequent residual block of the expert module for processing until a eigenvector output by the last residual block of the expert module is obtained.
[0142] Optionally, the weight vector of the expert module is:
[0143]
[0144] Among them, Softmax represents the logistic regression function, Feat0 represents the feature group set, Represents the eigenvector in Feat0 The feature vector obtained after passing through the n residual blocks of the corresponding expert module, i = 1, 2, ..., m, m is the number of feature vectors included in Feat0, n is The number of residual blocks included in the corresponding expert module, for Included feature dimensions, R V Indicates the total dimension of the features included in Feat0, W indicates The function of the corresponding attention module.
[0145] Based on the same inventive concept, corresponding to the above Figure 6 The recommendation model training method embodiment shown in the present application also provides a recommendation model training device, such as Figure 8 As shown, the device includes: an acquisition module 801, an input module 802, a determination module 803 and an adjustment module 804;
[0146] An acquisition module 801 is configured to acquire a term sample set, where the term sample set includes a plurality of term samples and a tagging score corresponding to each term sample;
[0147] An input module 802 is configured to input, for each term sample, each feature vector in the feature set of the term sample into different expert modules of the multi-task learning MMOE model, thereby obtaining a feature vector output by each expert module after processing the feature vector through the multiple residual blocks included therein;
[0148] A determination module 803 is configured to determine the score of the input entry sample based on the feature vectors output by each expert module through the MMOE model;
[0149] The determination module 803 is further configured to determine whether the MMOE model has converged based on the determined score and the annotation scores corresponding to the term samples input into the MMOE model;
[0150] An adjustment module 804 is configured to adjust the model parameters of the MMOE model when the MMOE model has not converged, and to call the input module to execute the step of inputting each feature vector in the feature group set of each term sample into different expert modules of the multi-task learning MMOE model.
[0151] The determination module 803 is further configured to use the current MMOE model as a recommended model when the MMOE model converges.
[0152] The embodiment of the present invention further provides an electronic device, such as Figure 9 As shown, it includes a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.
[0153] Memory 903, used for storing computer programs;
[0154] The processor 901 is configured to implement the method steps in the above method embodiment when executing the program stored in the memory 903 .
[0155] The communication bus mentioned in the terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industrial Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0156] The communication interface is used for communication between the above terminal and other devices.
[0157] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0158] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0159] In another embodiment provided by the present invention, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, it implements the recommendation information sorting method or recommendation model training method described in any of the above embodiments.
[0160] In another embodiment provided by the present invention, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the recommendation information ranking method or recommendation model training method described in any one of the above embodiments.
[0161] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0162] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0163] Each embodiment in this specification is described in a related manner. Similar parts between the embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For related parts, refer to the description of the method embodiments.
[0164] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.
Claims
1. A method for ranking recommended information, characterized in that: include: For each to-be-recommended term, each feature vector in the feature group set of the to-be-recommended term is input into different expert modules of the recommendation model, and a feature vector is obtained after each expert module processes the feature vector using multiple residual blocks included therein; wherein the recommendation model is a model obtained by training a multi-task learning (MMOE) model, and each expert module of the MMOE model includes multiple residual blocks; Determining the score of the to-be-recommended term by the recommendation model based on the feature vectors output by each expert module; Determine the order of recommendation of the terms to be recommended based on the score of each term to be recommended; The step of inputting each feature vector in the feature group set of the to-be-recommended term into different expert modules of the recommendation model, and obtaining a feature vector output by each expert module after processing the feature vector through the multiple residual blocks included therein, comprises: For each feature vector in the feature group set, the feature vector is input into the corresponding expert module, and is processed in sequence by each residual block of the expert module to obtain a feature vector output by the expert module; wherein the feature vectors in the feature group set have a one-to-one correspondence with the expert modules in the recommendation model, each residual block includes at least two MLPs connected in series, and the output result of each residual block is: the sum of the feature vector of the first MLP input into the residual block and the feature vector output by the last MLP.
2. The method according to claim 1, characterized in that Determining the score of the to-be-recommended term based on the feature vectors output by each expert module through the recommendation model includes: The feature vectors output by each expert module are input into an attention module through the recommendation model to obtain the weight vectors output by each attention module for the corresponding expert module; For each expert module, multiply the feature vector included in the feature group set by the weight vector of the expert module, and then concatenate the result with the feature vector output by the expert module to obtain a concatenated feature vector corresponding to the expert module; The splicing feature vectors corresponding to the expert modules are spliced, and the splicing result is input into the output layer MLP of the recommendation model to obtain the score of the to-be-recommended term output by the output layer MLP.
3. The method according to claim 1, characterized in that The feature vector is input into the corresponding expert module and processed by the residual blocks of the expert module in sequence, including: Input the feature vector as an initial feature vector into the first residual block of the corresponding expert module, and process the initial feature vector through each MLP included in the first residual block in turn to obtain a processing result of the initial feature vector; Adding the processing result of the initial eigenvector to the initial eigenvector to obtain a first eigenvector; Inputting the first feature vector into the second residual block of the expert module, and sequentially processing the first feature vector through each MLP included in the second residual block to obtain a processing result of the first feature vector; Adding the processing result of the first eigenvector to the first eigenvector to obtain a second eigenvector; The second feature vector is input into the subsequent residual block of the expert module for processing until a feature vector output by the last residual block of the expert module is obtained.
4. The method according to claim 2, characterized in that The weight vector of the expert module is: Among them, Softmax represents the logistic regression function, Feat0 represents the feature group set, Represents the eigenvector in Feat0 The feature vector obtained after passing through the n residual blocks of the corresponding expert module, i = 1, 2, ..., m, m is the number of feature vectors included in Feat0, n is The number of residual blocks included in the corresponding expert module, for Included feature dimensions, R V Indicates the total dimension of the features included in Feat0, W indicates The function of the corresponding attention module.
5. A device for sorting recommended information, characterized in that: include: an acquisition module for inputting, for each to-be-recommended term, each feature vector in the feature group set of the to-be-recommended term into different expert modules of the recommendation model, and obtaining feature vectors output by each expert module after processing the feature vectors using the multiple residual blocks included therein; wherein the recommendation model is a model obtained by training a multi-task learning (MMOE) model, and each expert module of the MMOE model includes multiple residual blocks; A determination module, configured to determine the score of the to-be-recommended term based on the feature vectors output by each expert module through the recommendation model; The determination module is further configured to determine a recommendation order of the terms to be recommended based on the score of each term to be recommended; The acquisition module is specifically used to: For each feature vector in the feature group set, the feature vector is input into the corresponding expert module, and is processed in sequence by each residual block of the expert module to obtain a feature vector output by the expert module; wherein the feature vectors in the feature group set have a one-to-one correspondence with the expert modules in the recommendation model, each residual block includes at least two MLPs connected in series, and the output result of each residual block is: the sum of the feature vector of the first MLP input into the residual block and the feature vector output by the last MLP.
6. The device according to claim 5, characterized in that The determining module is specifically configured to: The feature vectors output by each expert module are input into an attention module through the recommendation model to obtain the weight vectors output by each attention module for the corresponding expert module; For each expert module, multiply the feature vector included in the feature group set by the weight vector of the expert module, and then concatenate the result with the feature vector output by the expert module to obtain a concatenated feature vector corresponding to the expert module; The splicing feature vectors corresponding to the expert modules are spliced, and the splicing result is input into the output layer MLP of the recommendation model to obtain the score of the to-be-recommended term output by the output layer MLP.
7. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method steps described in any one of claims 1 to 4 when executing a program stored in a memory.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Product information pushing method and device, equipment and storage medium
CN111553759A
Recommendation probability prediction method and device, electronic equipment and storage medium
CN112183818A
Information recommendation method and device, electronic equipment and readable storage medium
CN112232879A