Method, device, equipment and computer storage medium for improving the accuracy of recommendation pre-sorting
By using user features and recommended item sequence samples in the recommended pre-sorting model and iteratively updating the model with the loss function, the problem of low pre-sorting accuracy in the existing technology is solved, and the effective migration of higher prediction accuracy and sorting rules is achieved.
Patent Information
- Application Number
- CN202111405575.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2041-11-24
AI Technical Summary
In the prior art, the recommended pre-sorting accuracy is not high, and the sorting rules of the fine-sorting stage cannot be effectively extracted and migrated.
By obtaining user feature samples and recommended item sequence samples, inputting them into the pre-sorting model, iteratively update the pre-sorting model with the loss function, and extracting and migrating the sorting rules of the fine-sorting stage.
Improve the prediction accuracy of the pre-sorting model, so that it can more accurately reflect the user's preference for items.
Smart Images

Figure CN114266615B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of multimedia technology, and specifically to a method, device, equipment and computer storage medium for improving the accuracy of recommendation pre-sorting. Background Art
[0002] When recommending information, it generally includes the stages of recall, rough sorting, fine sorting, and re-sorting. Among them, fine sorting requires extremely high prediction accuracy, so it requires high computing power. Rough sorting, which can also be called a pre-sorting algorithm, takes into account both "computing power" and "accuracy". Generally, the rough sorting stage is regarded as the precursor of the fine sorting stage.
[0003] The inventors of the present application discovered during the process of implementing the embodiments of the present invention that the current recommendation pre-sorting has the problem of low accuracy. Summary of the invention
[0004] In view of the above problems, an embodiment of the present invention provides a method for improving the accuracy of recommendation pre-sorting, which is used to solve the problem of low accuracy of recommendation pre-sorting in the prior art.
[0005] According to one aspect of an embodiment of the present invention, a method for improving pre-sorting accuracy is provided, the method comprising:
[0006] Obtaining a user feature sample and a recommended item sequence sample corresponding to the user feature sample; the recommended item sequence sample includes item features corresponding to a plurality of optional items; the item features include item attribute features and recommended sequence position features;
[0007] Inputting the user feature sample and the item attribute features of the plurality of optional items into a pre-ordering model to obtain a pre-ordered item feature sequence;
[0008] According to the user feature samples, the recommended item sequence samples, the pre-sorted item feature sequence and the loss function, the pre-sorted model is iteratively updated until the loss function meets a preset condition, thereby obtaining a target pre-sorted model; wherein the loss function is determined according to the recommended sequence position features and the pre-sorted position of each of the optional items; the pre-sorted position is the position of the optional item in the pre-sorted item feature sequence.
[0009] In an optional manner, the method further includes:
[0010] Determining historical request data; the historical request data includes user attribute information;
[0011] Determine the user feature sample according to the user attribute information;
[0012] Determine a recommended item sequence returned by a preset refined ranking model for the historical request data; the recommended item sequence includes a plurality of the optional items;
[0013] The item feature samples are determined according to the recommended item sequence.
[0014] In an optional manner, the method further includes:
[0015] Determining historical request data; the historical request data includes user attribute information;
[0016] Determine the user feature sample according to the user attribute information;
[0017] Determine a recommended item sequence returned by a preset refined ranking model for the historical request data; the recommended item sequence includes a plurality of the optional items;
[0018] The item feature samples are determined according to the recommended item sequence.
[0019] In an optional manner, the recommended sequence position feature includes a recommended sequence position and a recommended ranking score; the method further includes:
[0020] Determine the recommended sequence position according to the position of each optional item in the recommended item sequence;
[0021] determining the quantity of the optional items;
[0022] The recommendation ranking score corresponding to each of the optional items is determined according to the recommendation sequence position and the quantity.
[0023] In an optional manner, the method further includes:
[0024] Determine a pre-sort score corresponding to each of the optional items according to the pre-sort position and the number of the optional items;
[0025] Determine the sample prediction loss corresponding to the optional item pair according to the recommendation ranking score and the pre-ranking score corresponding to the optional item pair; the optional item pair includes any two of the optional items;
[0026] Determine the sample loss weight corresponding to the optional item pair according to the recommendation sequence position and the recommendation ranking score corresponding to the optional item pair;
[0027] The loss function of the pre-sorting model is determined according to the sample prediction loss and the sample loss weight.
[0028] In an optional manner, the method further includes:
[0029] The sample prediction loss is determined according to the following formula:
[0030]
[0031] Wherein, i and j are respectively one of the optional items in the pair;
[0032] L ij Predict the loss for the sample; S i is the pre-ranking score corresponding to the optional item i; R i >R j ; R i is the recommendation ranking score corresponding to the recommended item i.
[0033] In an optional manner, the method further includes:
[0034] The sample loss weight is determined according to the following formula:
[0035]
[0036] Wherein, i and j are respectively one of the optional items in the pair;
[0037] W ij is the sample loss weight; R i is the recommendation ranking score corresponding to the recommended item i, P i is the recommended sequence position corresponding to the recommended item i.
[0038] In an optional manner, the method further includes:
[0039] Determine the loss value of each of the optional item pairs according to the product of the sample prediction loss and the sample loss weight;
[0040] The loss function is determined according to the loss values of all optional items.
[0041] According to another aspect of an embodiment of the present invention, a device for improving the accuracy of recommendation pre-sorting is provided, comprising:
[0042] An acquisition module, used to acquire a user feature sample and a recommended item sequence sample corresponding to the user feature sample; the recommended item sequence sample includes item features corresponding to a plurality of optional items; the item features include item attribute features and recommended sequence position features;
[0043] An input module, used for inputting the user feature sample and the item attribute features of the plurality of optional items into a pre-ordering model to obtain a pre-ordered item feature sequence;
[0044] An updating module is used to iteratively update the pre-sorting model according to the user feature samples, the recommended item sequence samples, the pre-sorting item feature sequence and the loss function, until the loss function meets the preset conditions, thereby obtaining a target pre-sorting model; wherein the loss function is determined according to the recommended sequence position features and the pre-sorting position of each of the optional items; the pre-sorting position is the position of the optional item in the pre-sorting item feature sequence.
[0045] According to another aspect of an embodiment of the present invention, there is provided a device for improving the accuracy of recommendation pre-sorting, comprising a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus;
[0046] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the recommended pre-sorting accuracy improvement method as described above.
[0047] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a recommendation pre-sorting accuracy improvement device to perform the operation of the recommendation pre-sorting accuracy improvement method.
[0048] The embodiment of the present invention obtains user feature samples and recommended item sequence samples corresponding to the user feature samples; the recommended item sequence samples include item features corresponding to multiple optional items respectively; the item features include item attribute features and recommended sequence position features; the user feature samples and the item attribute features of multiple optional items are input into a pre-sorting model to obtain a pre-sorted item feature sequence; according to the user feature samples, the recommended item sequence samples, the pre-sorted item feature sequence and the loss function, the pre-sorting model is iteratively updated until the loss function meets the preset conditions to obtain a target pre-sorting model; wherein the loss function is determined according to the recommended sequence position features and the pre-sorting position of each optional item.
[0049] This is different from the prior art in that the pre-sorting stage can only adopt the same model structure as that in the fine-sorting stage and can only predict a single indicator, resulting in a problem of low pre-sorting accuracy. The embodiment of the present invention inputs samples with recommended sequence position characteristics into the pre-sorting model, and constructs a loss function according to the pre-sorting position output by the pre-sorting model and the recommended sequence position characteristics, so that the sorting rules included in the recommended sequence with higher accuracy can be extracted and migrated to the pre-sorting model, thereby improving the prediction accuracy of the pre-sorting model.
[0050] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0052] Figure 1 A schematic diagram of a process for improving the accuracy of recommendation pre-sorting provided by an embodiment of the present invention is shown;
[0053] Figure 2 A schematic diagram of the structure of a pre-sorting model provided by an embodiment of the present invention is shown;
[0054] Figure 3 A schematic diagram showing the structure of a device for improving the accuracy of recommendation pre-sorting provided by an embodiment of the present invention is shown;
[0055] Figure 4 A schematic diagram of the structure of a device for improving the accuracy of recommendation pre-sorting provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0056] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0057] Figure 1 The flowchart of the method for improving the accuracy of recommendation pre-sorting provided by an embodiment of the present invention is shown, and the method is executed by a computer processing device. The computer processing device may include a mobile phone, a laptop computer, etc.
[0058] like Figure 1 As shown, the method comprises the following steps:
[0059] Step 10: Obtain user feature samples and recommended item sequence samples corresponding to the user feature samples. The recommended item sequence samples include item features corresponding to a plurality of optional items; the item features include item attribute features and recommended sequence position features.
[0060] In one embodiment of the present invention, the user feature sample includes user feature information corresponding to multiple users, and the user feature information may include information under dimensions such as age, gender, region, and preference information. The user feature sample can be obtained by extracting features from user attribute information of multiple users.
[0061] The recommended item sequence sample includes item features corresponding to multiple optional items arranged in order. Item attribute features may include features under preset dimensions of items, such as type, duration, region, price, etc. The recommended sequence position feature is used to characterize the sequence position of each optional item in the recommended item sequence sample, such as the absolute position number and the relative position in the recommended item sequence, etc., wherein the relative position may be the top 10% in the recommended item sequence, etc.
[0062] In one embodiment of the present invention, the recommended item sequence samples may be obtained by manual annotation, or may be output by a preset recommendation model for user feature samples, wherein the preset model may be a refined ranking model. Thus, while improving the model training efficiency, the result output of the pre-ranking model is made more consistent with the refined ranking model, thereby improving the accuracy of the final item recommendation.
[0063] Therefore, in one embodiment of the present invention, step 10 further includes:
[0064] Step 101: Determine historical request data; the historical request data includes user attribute information.
[0065] In one embodiment of the present invention, the historical request data may be sent by a user to request a recommendation of optional items for the user. The user attribute information may include user identification information, user age, gender, location, occupation, preferences, and other information.
[0066] Step 102: Determine the user feature sample according to the user attribute information.
[0067] In one embodiment of the present invention, feature extraction is performed on user attribute information to obtain user feature samples corresponding to each user. Feature extraction may adopt a convolution structure or the like.
[0068] Step 103: Determine a recommended item sequence returned by a preset refined ranking model for the historical request data. The recommended item sequence includes a plurality of the optional items.
[0069] In one embodiment of the present invention, the preset refined ranking model can be the one currently used in the recommendation system where the currently trained pre-ranking model is located. The model in the recommendation system can be iteratively updated. Therefore, when training the pre-ranking model, the granularity of the update cycle can be days, hours, minutes, etc. The results of the refined ranking model used by the current system are used to extract ranking knowledge. There is no need to train additional models or wait for the latest refined ranking model to be updated, thereby improving the efficiency of recommendation pre-ranking.
[0070] In one embodiment of the present invention, the optional items in the recommended item sequence are arranged in descending order of recommendation degree, that is, the more forward the optional item is in the recommended item sequence, the more likely the user is to be interested in it.
[0071] Step 104: Determine the item feature sample according to the recommended item sequence.
[0072] In order to ensure the computing performance of the pre-sorting stage in the prior art, the pre-sorting stage is usually implemented using a dual-tower model. The input of the dual-tower model is a user vector and an item vector, and the output of the dual-tower model is the inner product of the user vector and the item vector. This inner product can usually only represent the predicted value under one indicator. Therefore, when the existing pre-sorting model wants to optimize multiple objectives at the same time, it is necessary to adopt the knowledge distillation technology, use the pre-sorting model as a Student model, and use the multi-objective optimization model as a Teacher model, so as to migrate the results of the fine sorting stage to the pre-sorting model.
[0073] However, since the outputs of the Student model and the Teacher model are required to have the same physical meaning, and if the Student model is to optimize multiple indicators, since the dual-tower model can only have one predicted value, if the sample contains multiple different true label values, it is impossible to simultaneously calculate the loss between one predicted value and multiple true labels. Therefore, the prior art cannot complete the knowledge transfer while maintaining the dual-tower structure of the pre-sorting model.
[0074] Therefore, in one embodiment of the present invention, unlike the prior art in which user attribute features and item attribute features are directly input into the dual-tower model, the knowledge of the ordering rules for item recommendations is learned from the recommended item sequence output by the refined ordering model, and the knowledge of the rules is used as the input of the pre-ordering model, thereby completing the knowledge transfer. Among them, the ordering rule knowledge can characterize the user's preference for the optional items. Regardless of whether it is a multi-target or single-target ordering recommendation model, the final presentation to the user is in the form of a recommended item sequence. The specific index value of each item is not important, and its position in the recommended item sequence is the feature that reflects the user's preference. Therefore, the position features of each item in the recommended item sequence are learned, and the item feature samples are written. The position features in the item feature samples can reflect the basis for the ordering.
[0075] At the same time, for the input of the user tower in the dual-tower model, feature extraction is performed on the item attribute information of each item in the recommended item sequence to obtain item attribute features and write item feature samples.
[0076] Therefore, in another embodiment of the present invention, the recommended sequence position feature includes the recommended sequence position and the recommended ranking score, and step 104 further includes:
[0077] Step 1041: Determine the recommended sequence position according to the position of each optional item in the recommended item sequence.
[0078] In one embodiment of the present invention, an optional item corresponds to a position in the recommended item sequence, and the positions in the recommended item sequence are numbered to obtain the recommended sequence position of each optional item. For example, the recommended item sequence is as follows {I1, I2, I3, I4, I5, ..., I n}, where the position P1 of item I1 is 1, and item I n Position P n is n.
[0079] Step 1042: Determine the quantity of the optional items.
[0080] In one embodiment of the present invention, the total number of all selectable items is determined as the quantity.
[0081] Step 1043: Determine the recommendation ranking score corresponding to each of the optional items according to the recommendation sequence position and the quantity.
[0082] In one embodiment of the present invention, the recommendation ranking score is used to indicate the degree to which the optional items are ranked high in the recommended item sequence, and can be calculated based on R i =Rank(i)=NP i +1 OK. Among them, R i For item I i The recommended ranking score of item I i The recommended sequence position.
[0083] Step 20: Input the user feature samples and the item attribute features of the multiple optional items into a pre-ordering model to obtain a pre-ordered item feature sequence.
[0084] In one embodiment of the present invention, the structure of the pre-sorting model can adopt a double tower model. Figure 2 , respectively, the user tower and the item tower. Among them, reference Figure 2 , input the user's input feature vector into a neural network (i.e., user tower) and output a user vector, and input the item vector into another neural network (i.e., item tower) and output an item vector; then calculate the inner product of the user vector and the item vector, and use this inner product as the predicted value of the user's click rate, play time, or completion rate of the item under the preset indicators. By minimizing the loss between this predicted value and the true value under the indicator, the model parameters are updated using the gradient descent method to complete the training of the pre-sorting model.
[0085] The advantages of using the dual-tower model are: user features and item features are decoupled, and item vectors can be cached after offline calculations and provided to online services. There is no need to calculate user vectors in real time during online inference, which greatly improves computing efficiency; at the same time, vector inner product calculations are simple, and performing tens of thousands of inner product operations at a time will not cause performance bottlenecks for online services.
[0086] Step 30: Iteratively update the pre-order model according to the user feature samples, the recommended item sequence samples, the pre-order item feature sequence and the loss function until the loss function meets the preset conditions, thereby obtaining a target pre-order model. The loss function is determined according to the recommended sequence position features and the pre-order position of each optional item; the pre-order position is the position of the optional item in the pre-order item feature sequence.
[0087] As mentioned above, the twin-tower model has the advantage of high computational efficiency, but its computational accuracy is insufficient. Therefore, in one embodiment of the present invention, on the basis of maintaining the twin-tower structure of the pre-recommendation model, the accuracy of the twin-tower model is improved by using knowledge distillation technology. Among them, knowledge distillation can include two parts: knowledge extraction and knowledge transfer. Knowledge extraction is completed through steps 10-20. In the knowledge transfer part, by constructing the loss function of the pre-ranking model, the optimization goal of the pre-ranking model is set to learn the relative order information between each optional item in the recommended item sequence sample as much as possible.
[0088] Specifically, the optimization goal of the pre-sorting model can be to accurately predict the recommended item sequence, and the optimization is equivalent to accurately predicting the relative order of all sample pairs that may appear in the sequence, where the sample pairs include any two optional items.
[0089] Therefore, in another embodiment of the present invention, the construction process of the loss function in step 30 may further include:
[0090] Step 301: Determine the pre-sort score corresponding to each of the optional items according to the pre-sort position and the number of the optional items.
[0091] In knowledge distillation, a complex ranking model is usually trained as the Teacher model, and then some substructures of the Teacher model are transplanted into a simple Student model, or the prediction results of the Teacher model are used as the true label values of the Student model.
[0092] In one embodiment of the present invention, the pre-ranking score is used to characterize the user's preference for different items output by the Teacher model. Regardless of whether the Teacher model is a single-objective model or a multi-objective model, the ranking score output by the Student model is positively correlated with it. The determination of the pre-ranking score can refer to step 1043, as long as it is ensured that the higher the pre-ranking position, the higher the pre-ranking score.
[0093] The training goal of the pre-sorting model is no longer to predict the specific value under the correct preset index in the existing technology, but to reproduce the sorting rules in the fine sorting stage or manually marked as much as possible. For example, there is a user u and three songs i, j and k.
[0094] The predicted values of these three songs in the pre-sorting stage are: S i , S j , S k ;
[0095] The predicted values of these three songs in the fine sorting stage are: R i , R j , R k ;
[0096] The pre-sorting phase no longer attempts to predict S i , S j , S k The specific value of R i >R j >R k When , the expected prediction result of the model is: S i >S j >S k .
[0097] Among them, the predicted value is used to indicate the degree of liking, which can be a weighted sum of the predicted values of multiple dimensional indicators such as comprehensive click-through rate, listening time, and like rate.
[0098] Step 302: Determine the sample prediction loss corresponding to the optional item pair according to the recommendation ranking score and the pre-ranking score corresponding to the optional item pair; the optional item pair includes any two of the optional items.
[0099] In one embodiment of the present invention, regardless of the exact positions of the two optional items in the recommended sequence outputted in the end, for any two optional items<i,j> , assuming that the user ranks the i-th item before the j-th item, it means that in the fine ranking stage, the user is considered to like the i-th item more than the j-th item, that is, R i >R j .
[0100] If S i >Sj , it means that the pre-sorting model predicts that the user likes the i-th item more than the j-th item. In this case, the prediction of the pre-sorting model is the same as that of the refined sorting model. i With S j The larger the difference, the more likely the pre-ranking model predicts that the user likes i more than j. i -S j →+∞, the results predicted by the pre-sorting model are exactly the same as those returned by the refined sorting model.
[0101] If S i ≤S j , it means that the model predicts that the user likes the i-th item less than the j-th item. At this time, the prediction of the pre-sorting model is opposite to the prediction of the refined sorting model. S i With S j The larger the difference, the more likely the pre-ranking model predicts that the user likes j more than i. i -S j →-∞, the results predicted by the pre-sorting model are completely opposite to the results returned by the refined sorting model.
[0102] Therefore, in one embodiment of the present invention, the sample prediction loss can be determined according to the following formula:
[0103]
[0104] Wherein, i and j are respectively one of the optional items in the pair;
[0105] L ij Predict the loss for the sample; S i is the pre-ranking score corresponding to the optional item i; R i >R j ; R i is the recommendation ranking score corresponding to the recommended item i.
[0106] Step 303: Determine the sample loss weight corresponding to the optional item pair according to the recommendation sequence position and recommendation ranking score corresponding to the optional item pair.
[0107] In one embodiment of the present invention, the costs of predicting errors for two optional items at different positions are different. Ideally, the higher the ranking of the optional items, the higher the score. Assuming that the order of optional items returned by the precise sorting is the most ideal, the prediction error of the optional items at the top of the ranking has a greater impact on the recommendation accuracy.
[0108] Therefore, in one embodiment of the present invention, the sample loss weight is determined according to the following formula:
[0109]
[0110] Wherein, i and j are respectively one of the optional items in the pair;
[0111] W ij is the sample loss weight; R i is the recommendation ranking score corresponding to the recommended item i, P i is the recommended sequence position corresponding to the recommended item i.
[0112] Step 304: Determine the loss function of the pre-sorting model according to the sample prediction loss and the sample loss weight.
[0113] In one embodiment of the present invention, the sample prediction losses are weighted and summed according to the sample loss weights corresponding to the optional item pairs to obtain a loss function.
[0114] Therefore, in one embodiment of the present invention, step 304 further includes:
[0115] Step 3041: Determine the loss value of each of the optional item pairs based on the product of the sample predicted loss and the sample loss weight.
[0116] In one embodiment of the present invention, the sample prediction loss is weighted according to the sample loss weight, and the weighted product is determined as the loss value of the optional item pair.
[0117] Step 3042: Determine the loss function according to the loss values of all optional items.
[0118] In one embodiment of the present invention, the loss function can be expressed as:
[0119]
[0120] Where N is the number of optional items.
[0121] Using the above formula as an example, assume that the first N=3 items returned by the refined ranking model are selected to construct a sub-sample, and a sub-sample includes a user feature sample and item features corresponding to an optional item as well as a ranking position feature.
[0122] Subsample 1: User feature U, item feature I1, P1 = 1 R1 = 3, output of the pre-sorting model S1 = DSSM (U, I1) = 0.3
[0123] Optional item 2: user feature U, item feature I2, P2 = 2R2 = 2, output of pre-sorting model S2 = 0.7
[0124] Optional item 3: user feature U, item feature I3, P3=3R3=1, output of pre-sorting model S3=0.6
[0125] The model loss for this sample is:
[0126]
[0127]
[0128] In one embodiment of the present invention, the model parameters can be updated according to the gradient descent method based on the loss function, and when the loss function is minimized or converged, it is determined that the pre-sorting model training is completed.
[0129] By constructing a new loss function, the ranking knowledge of the teacher model is transferred to the student model, which is different from the prior art that directly transfers part of the structure and parameters of the teacher model to the student model. In addition to making the teacher and student models heterogeneous, the embodiment of the present invention can also transfer the ranking capabilities (for example, multi-target ranking capabilities) that the teacher model already has to the student model. Therefore, while improving the pre-ranking accuracy, the training efficiency of the pre-ranking model is also improved.
[0130] The method for improving the accuracy of recommendation pre-sorting provided by the embodiment of the present invention obtains user feature samples and recommended item sequence samples corresponding to the user feature samples; the recommended item sequence samples include item features corresponding to multiple optional items respectively; the item features include item attribute features and recommended sequence position features; the user feature samples and the item attribute features of multiple optional items are input into the pre-sorting model to obtain a pre-sorted item feature sequence; according to the user feature samples, the recommended item sequence samples, the pre-sorted item feature sequence and the loss function, the pre-sorting model is iteratively updated until the loss function meets the preset conditions to obtain the target pre-sorting model; wherein the loss function is determined according to the recommended sequence position features and the pre-sorting position of each optional item.
[0131] This is different from the prior art in that the pre-sorting stage can only adopt the same model structure as that in the fine-sorting stage, and can only predict a single indicator, resulting in a problem of low pre-sorting accuracy. The embodiment of the present invention recommends a method for improving pre-sorting accuracy by inputting samples with recommended sequence position characteristics into the pre-sorting model, and constructing a loss function according to the pre-sorting position output by the pre-sorting model and the recommended sequence position characteristics, so that the sorting rules included in the recommended sequence with higher accuracy can be extracted and migrated to the pre-sorting model, thereby improving the prediction accuracy of the pre-sorting model.
[0132] Figure 3FIG. 2 shows a schematic diagram of the structure of a device for improving the accuracy of recommendation pre-sorting provided by an embodiment of the present invention. Figure 3 As shown, the device 400 includes: an acquisition module 401, an input module 402 and an update module 403.
[0133] In an optional manner, the acquisition module 401 is used to obtain a user feature sample and a recommended item sequence sample corresponding to the user feature sample; the recommended item sequence sample includes item features corresponding to a plurality of optional items; the item features include item attribute features and recommended sequence position features.
[0134] The input module 402 is used to input the user feature sample and the item attribute features of the multiple optional items into the pre-order model to obtain a pre-order item feature sequence.
[0135] The updating module 403 is used to iteratively update the pre-sorting model according to the user feature samples, the recommended item sequence samples, the pre-sorting item feature sequence and the loss function, until the loss function meets the preset conditions, thereby obtaining a target pre-sorting model; wherein the loss function is determined according to the recommended sequence position features and the pre-sorting position of each of the optional items; the pre-sorting position is the position of the optional item in the pre-sorting item feature sequence.
[0136] The device for improving the accuracy of recommendation pre-sorting provided by the embodiment of the present invention obtains user feature samples and recommended item sequence samples corresponding to the user feature samples; the recommended item sequence samples include item features corresponding to multiple optional items respectively; the item features include item attribute features and recommended sequence position features; the user feature samples and the item attribute features of multiple optional items are input into the pre-sorting model to obtain a pre-sorted item feature sequence; according to the user feature samples, the recommended item sequence samples, the pre-sorted item feature sequence and the loss function, the pre-sorting model is iteratively updated until the loss function meets the preset conditions to obtain the target pre-sorting model; wherein the loss function is determined according to the recommended sequence position features and the pre-sorting position of each optional item.
[0137] In this way, the invention is different from the prior art in which only the same model structure as that in the fine sorting stage can be adopted in the pre-sorting stage and only a single indicator can be predicted, resulting in the problem of low pre-sorting accuracy. The device for improving the recommendation pre-sorting accuracy provided by the embodiment of the present invention inputs samples with recommended sequence position characteristics into the pre-sorting model, and constructs a loss function according to the pre-sorting position output by the pre-sorting model and the recommended sequence position characteristics, so as to extract the sorting rules included in the recommended sequence with higher accuracy and migrate them to the pre-sorting model, thereby improving the prediction accuracy of the pre-sorting model.
[0138] Figure 4The schematic diagram of the structure of the device for improving the accuracy of recommendation pre-sorting provided by the embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the device for improving the accuracy of recommendation pre-sorting.
[0139] like Figure 4 As shown, the recommendation pre-sorting accuracy improvement device may include: a processor (processor) 502, a communication interface (Communications Interface) 504, a memory (memory) 506, and a communication bus 508.
[0140] The processor 502, the communication interface 504, and the memory 506 communicate with each other via the communication bus 508. The communication interface 504 is used to communicate with other devices such as a client or other server network elements. The processor 502 is used to execute the program 510, which can specifically execute the relevant steps in the above-mentioned method for improving the accuracy of recommendation pre-sorting.
[0141] Specifically, the program 510 may include program code including computer-executable instructions.
[0142] The processor 502 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the recommended pre-sorting accuracy improvement device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0143] The memory 506 is used to store the program 510. The memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0144] The program 510 can be specifically called by the processor 502 to enable the recommendation pre-sorting accuracy improvement device to perform the following operations:
[0145] Obtaining a user feature sample and a recommended item sequence sample corresponding to the user feature sample; the recommended item sequence sample includes item features corresponding to a plurality of optional items; the item features include item attribute features and recommended sequence position features;
[0146] Inputting the user feature sample and the item attribute features of the plurality of optional items into a pre-ordering model to obtain a pre-ordered item feature sequence;
[0147] According to the user feature samples, the recommended item sequence samples, the pre-sorted item feature sequence and the loss function, the pre-sorted model is iteratively updated until the loss function meets a preset condition, thereby obtaining a target pre-sorted model; wherein the loss function is determined according to the recommended sequence position features and the pre-sorted position of each of the optional items; the pre-sorted position is the position of the optional item in the pre-sorted item feature sequence.
[0148] In an optional manner, the program 510 is called by the processor 502 to enable the recommendation pre-sorting accuracy improvement device to perform the following operations:
[0149] Determining historical request data; the historical request data includes user attribute information;
[0150] Determine the user feature sample according to the user attribute information;
[0151] Determine a recommended item sequence returned by a preset refined ranking model for the historical request data; the recommended item sequence includes a plurality of the optional items;
[0152] The item feature samples are determined according to the recommended item sequence.
[0153] In an optional manner, the recommended sequence position feature includes the recommended sequence position and the recommended sorting score; the program 510 is called by the processor 502 to enable the recommendation pre-sorting accuracy improvement device to perform the following operations:
[0154] Determine the recommended sequence position according to the position of each optional item in the recommended item sequence;
[0155] determining the quantity of the optional items;
[0156] The recommendation ranking score corresponding to each of the optional items is determined according to the recommendation sequence position and the quantity.
[0157] In an optional manner, the program 510 is called by the processor 502 to enable the recommendation pre-sorting accuracy improvement device to perform the following operations:
[0158] Determine a pre-sort score corresponding to each of the optional items according to the pre-sort position and the number of the optional items;
[0159] Determine the sample prediction loss corresponding to the optional item pair according to the recommendation ranking score and the pre-ranking score corresponding to the optional item pair; the optional item pair includes any two of the optional items;
[0160] Determine the sample loss weight corresponding to the optional item pair according to the recommendation sequence position and the recommendation ranking score corresponding to the optional item pair;
[0161] The loss function is determined according to the sample prediction loss and the sample loss weight.
[0162] In an optional manner, the program 510 is called by the processor 502 to enable the recommendation pre-sorting accuracy improvement device to perform the following operations:
[0163] The sample prediction loss is determined according to the following formula:
[0164]
[0165] Wherein, i and j are respectively one of the optional items in the pair;
[0166] L ij Predict the loss for the sample; S i is the pre-ranking score corresponding to the optional item i; R i >R j ; R i is the recommendation ranking score corresponding to the recommended item i.
[0167] In an optional manner, the program 510 is called by the processor 502 to enable the recommendation pre-sorting accuracy improvement device to perform the following operations:
[0168] The sample loss weight is determined according to the following formula:
[0169]
[0170] Wherein, i and j are respectively one of the optional items in the pair;
[0171] W ij is the sample loss weight; R i is the recommendation ranking score corresponding to the recommended item i, P i is the recommended sequence position corresponding to the recommended item i.
[0172] In an optional manner, the program 510 is called by the processor 502 to enable the recommendation pre-sorting accuracy improvement device to perform the following operations:
[0173] Determine the loss value of each of the optional item pairs according to the product of the sample prediction loss and the sample loss weight;
[0174] The loss function is determined according to the loss values of all optional items.
[0175] The device for improving the accuracy of recommendation pre-sorting provided by the embodiment of the present invention obtains user feature samples and recommended item sequence samples corresponding to the user feature samples; the recommended item sequence samples include item features corresponding to multiple optional items respectively; the item features include item attribute features and recommended sequence position features; the user feature samples and the item attribute features of multiple optional items are input into the pre-sorting model to obtain a pre-sorted item feature sequence; according to the user feature samples, the recommended item sequence samples, the pre-sorted item feature sequence and the loss function, the pre-sorting model is iteratively updated until the loss function meets the preset conditions to obtain the target pre-sorting model; wherein the loss function is determined according to the recommended sequence position features and the pre-sorting position of each optional item.
[0176] This is different from the prior art in that the pre-sorting stage can only adopt the same model structure as that in the fine-sorting stage, and can only predict a single indicator, resulting in a problem of low pre-sorting accuracy. The recommendation pre-sorting accuracy improvement device provided by the embodiment of the present invention inputs samples with recommended sequence position characteristics into the pre-sorting model, and constructs a loss function according to the pre-sorting position output by the pre-sorting model and the recommended sequence position characteristics, so that the sorting rules included in the recommended sequence with higher accuracy can be extracted and migrated to the pre-sorting model, thereby improving the prediction accuracy of the pre-sorting model.
[0177] An embodiment of the present invention provides a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction is executed on a recommendation pre-sorting accuracy improvement device, the recommendation pre-sorting accuracy improvement device executes the recommendation pre-sorting accuracy improvement method in any of the above method embodiments.
[0178] The executable instructions may be specifically used to enable the recommendation pre-sorting accuracy improvement device to perform the following operations:
[0179] Obtaining a user feature sample and a recommended item sequence sample corresponding to the user feature sample; the recommended item sequence sample includes item features corresponding to a plurality of optional items; the item features include item attribute features and recommended sequence position features;
[0180] Inputting the user feature sample and the item attribute features of the plurality of optional items into a pre-ordering model to obtain a pre-ordered item feature sequence;
[0181] According to the user feature samples, the recommended item sequence samples, the pre-sorted item feature sequence and the loss function, the pre-sorted model is iteratively updated until the loss function meets a preset condition, thereby obtaining a target pre-sorted model; wherein the loss function is determined according to the recommended sequence position features and the pre-sorted position of each of the optional items; the pre-sorted position is the position of the optional item in the pre-sorted item feature sequence.
[0182] In an optional manner, the executable instruction enables the recommendation pre-sorting accuracy improvement device to perform the following operations:
[0183] Determining historical request data; the historical request data includes user attribute information;
[0184] Determine the user feature sample according to the user attribute information;
[0185] Determine a recommended item sequence returned by a preset refined ranking model for the historical request data; the recommended item sequence includes a plurality of the optional items;
[0186] The item feature samples are determined according to the recommended item sequence.
[0187] In an optional manner, the recommended sequence position feature includes a recommended sequence position and a recommended sorting score; the executable instruction enables the recommendation pre-sorting accuracy improvement device to perform the following operations:
[0188] Determine the recommended sequence position according to the position of each optional item in the recommended item sequence;
[0189] determining the quantity of the optional items;
[0190] The recommendation ranking score corresponding to each of the optional items is determined according to the recommendation sequence position and the quantity.
[0191] In an optional manner, the executable instruction enables the recommendation pre-sorting accuracy improvement device to perform the following operations:
[0192] Determine a pre-sort score corresponding to each of the optional items according to the pre-sort position and the number of the optional items;
[0193] Determine the sample prediction loss corresponding to the optional item pair according to the recommendation ranking score and the pre-ranking score corresponding to the optional item pair; the optional item pair includes any two of the optional items;
[0194] Determine the sample loss weight corresponding to the optional item pair according to the recommendation sequence position and the recommendation ranking score corresponding to the optional item pair;
[0195] The loss function is determined according to the sample prediction loss and the sample loss weight.
[0196] In an optional manner, the executable instruction enables the recommendation pre-sorting accuracy improvement device to perform the following operations:
[0197] The sample prediction loss is determined according to the following formula:
[0198]
[0199] Wherein, i and j are respectively one of the optional items in the pair;
[0200] L ij Predict the loss for the sample; S i is the pre-ranking score corresponding to the optional item i; R i >R j ; R i is the recommendation ranking score corresponding to the recommended item i.
[0201] In an optional manner, the executable instruction enables the recommendation pre-sorting accuracy improvement device to perform the following operations:
[0202] The sample loss weight is determined according to the following formula:
[0203]
[0204] Wherein, i and j are respectively one of the optional items in the pair;
[0205] W ij is the sample loss weight; R i is the recommendation ranking score corresponding to the recommended item i, P i is the recommended sequence position corresponding to the recommended item i.
[0206] The computer storage medium provided by the embodiment of the present invention obtains user feature samples and recommended item sequence samples corresponding to the user feature samples; the recommended item sequence samples include item features corresponding to multiple optional items respectively; the item features include item attribute features and recommended sequence position features; the user feature samples and the item attribute features of multiple optional items are input into a pre-sorting model to obtain a pre-sorted item feature sequence; according to the user feature samples, the recommended item sequence samples, the pre-sorted item feature sequence and the loss function, the pre-sorting model is iteratively updated until the loss function meets the preset conditions to obtain a target pre-sorting model; wherein the loss function is determined according to the recommended sequence position features and the pre-sorting position of each optional item.
[0207] In this way, the computer storage medium provided in the embodiment of the present invention can extract the sorting rules included in the recommended sequence with higher accuracy and transfer them to the pre-sorting model, thereby improving the prediction accuracy of the pre-sorting model.
[0208] An embodiment of the present invention provides a device for improving the accuracy of recommendation pre-sorting, which is used to execute the above-mentioned method for improving the accuracy of recommendation pre-sorting.
[0209] An embodiment of the present invention provides a computer program, which can be called by a processor to enable a recommendation pre-sorting accuracy improvement device to execute the recommendation pre-sorting accuracy improvement method in any of the above method embodiments.
[0210] An embodiment of the present invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed on a computer, the computer executes the recommended pre-sorting accuracy improvement method in any of the above method embodiments.
[0211] The algorithm or display provided herein is not inherently related to any particular computer, virtual system or other equipment. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the embodiment of the present invention is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description made to specific languages above is for disclosing the best mode of the present invention.
[0212] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0213] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than those expressly recited in each claim.
[0214] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0215] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A method for improving the accuracy of recommendation pre-sorting, characterized in that: The method comprises: Obtaining a user feature sample and a recommended item sequence sample corresponding to the user feature sample; the recommended item sequence sample includes item features corresponding to a plurality of optional items; the item features include item attribute features and recommended sequence position features; the recommended sequence position features include recommended sequence positions and recommended ranking scores; Inputting the user feature sample and the item attribute features of the plurality of optional items into a pre-ordering model to obtain a pre-ordered item feature sequence; Determine the pre-sort score corresponding to each of the optional items according to the pre-sort position and the number of the optional items; determine the sample prediction loss corresponding to the optional item pair according to the recommended sort score and the pre-sort score corresponding to the optional item pair, wherein the optional item pair includes any two of the optional items; determine the sample loss weight corresponding to the optional item pair according to the recommended sequence position and the recommended sort score corresponding to the optional item pair; determine the loss value of each of the optional item pairs according to the sample prediction loss and the sample loss weight, determine the loss function according to the loss values of all the optional items, iteratively update the pre-sort model until the loss function meets the preset conditions, and obtain the target pre-sort model; wherein the pre-sort position is the position of the optional item in the feature sequence of the pre-sort items.
2. The method according to claim 1, characterized in that The obtaining of user feature samples and recommended item sequence samples corresponding to the user feature samples includes: Determining historical request data; the historical request data includes user attribute information; Determine the user feature sample according to the user attribute information; Determine a recommended item sequence returned by a preset refined ranking model for the historical request data; the recommended item sequence includes a plurality of the optional items; The item feature samples are determined according to the recommended item sequence.
3. The method according to claim 2, characterized in that The determining the item feature sample according to the recommended item sequence includes: Determine the recommended sequence position according to the position of each optional item in the recommended item sequence; determining the quantity of the optional items; The recommendation ranking score corresponding to each of the optional items is determined according to the recommendation sequence position and the quantity.
4. The method according to claim 3, characterized in that The sample loss weight is: Wherein, i and j are respectively one of the optional items in the pair; W ij is the sample loss weight; R i is the recommendation ranking score corresponding to the recommended item i, P i is the recommended sequence position corresponding to the recommended item i; R j is the recommendation ranking score corresponding to the recommended item j, P j is the recommended sequence position corresponding to the recommended item j.
5. The method according to claim 4, characterized in that The determining the sample prediction loss corresponding to the optional item pair according to the recommendation ranking score and the pre-ranking score corresponding to the optional item pair includes: The sample prediction loss is determined according to the following formula: Wherein, i and j are respectively one of the optional items in the pair; L ij Predict the loss for the sample; S i S is the pre-ranking score corresponding to the optional item i; j is the pre-ranking score corresponding to the optional item j; R i >R j ; R i is the recommendation ranking score corresponding to the recommended item i; R j is the recommendation ranking score corresponding to the recommended item j.
6. The method according to claim 4, characterized in that The determining the loss function of the pre-sorting model according to the sample prediction loss and the sample loss weight comprises: Determine the loss value of each of the optional item pairs according to the product of the sample prediction loss and the sample loss weight; The loss function is determined according to the loss values of all optional items.
7. A device for improving the accuracy of recommendation pre-sorting, characterized in that: The device comprises: An acquisition module is used to acquire a user feature sample and a recommended item sequence sample corresponding to the user feature sample; the recommended item sequence sample includes item features corresponding to a plurality of optional items; the item features include item attribute features and recommended sequence position features; the recommended sequence position features include recommended sequence positions and recommended ranking scores; An input module, used for inputting the user feature sample and the item attribute features of the plurality of optional items into a pre-ordering model to obtain a pre-ordered item feature sequence; An updating module is used to determine the pre-sorting score corresponding to each of the optional items according to the pre-sorting position and the number of the optional items; determine the sample prediction loss corresponding to the optional item pair according to the recommended sorting score and the pre-sorting score corresponding to the optional item pair, wherein the optional item pair includes any two of the optional items; determine the sample loss weight corresponding to the optional item pair according to the recommended sequence position and the recommended sorting score corresponding to the optional item pair; determine the loss value of each of the optional item pairs according to the sample prediction loss and the sample loss weight, determine the loss function according to the loss values of all optional items, iteratively update the pre-sorting model until the loss function meets the preset conditions, and obtain the target pre-sorting model; wherein the pre-sorting position is the position of the optional item in the feature sequence of the pre-sorting items.
8. A device for improving the accuracy of recommendation pre-sorting, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the recommendation pre-sorting accuracy improvement method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction. When the executable instruction is executed on the recommendation pre-sorting accuracy improvement device, the recommendation pre-sorting accuracy improvement device performs the operation of the recommendation pre-sorting accuracy improvement method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Information recommendation method and device and equipment and readable storage medium
CN111460130A
Information recommendation method, device and equipment and storage medium
CN111797318A