Sorting model training method and device, item sorting method and device
Generate a two-dimensional probability distribution table through feature extraction and machine learning models, and calculate the cross-entropy loss function, which solves the problem in the existing technology of being unable to select the optimal item arrangement within the limited system response time, and realizes the improvement of online user experience. Effect.
Patent Information
- Application Number
- CN202110684099.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-21
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-06-21
Smart Images

Figure CN113379500B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information processing, and in particular to a sorting model training method and device, and an item sorting method and device. Background Art
[0002] In order to ensure the online user experience, the network platform will recommend multiple candidate items to the user after receiving the user's request. Since the different arrangement orders of multiple candidate items will affect the user's click rate, the arrangement order of multiple candidate items needs to be optimized. Summary of the invention
[0003] The inventors have discovered through research that, due to the ever-changing arrangements of multiple candidate items, it is impossible to traverse all sequence arrangements and select an optimal sequence within a limited system response time, which affects the online user experience.
[0004] Accordingly, the present disclosure provides an item sorting solution that can easily and quickly select an optimal arrangement order, thereby improving the experience of online users.
[0005] According to a first aspect of an embodiment of the present disclosure, a ranking model training method is provided, comprising: inputting relevant information of all sample items in a sample set into a feature extraction model to obtain a first feature vector of each sample item respectively; fusing the first feature vectors of all sample items to obtain a fused feature vector; fusing the fused feature vector with the first feature vector of each sample item respectively to obtain a second feature vector of each sample item; inputting the second feature vectors of all sample items into a machine learning model to obtain a two-dimensional probability distribution table, wherein the i-th column of the two-dimensional probability distribution table includes the probability of the i-th sample item at each position in the recommendation sequence respectively, and the j-th row includes the probability of each sample item at the j-th position in the recommendation sequence respectively, 1≤i, j≤N, and N is the total number of sample items in the sample set; obtaining an output matrix according to the two-dimensional probability distribution table; using the label matrix of the sample set, calculating the cross entropy loss function of each row and each column of the output matrix; and using the cross entropy loss function of each row and each column of the output matrix to train the machine learning model to obtain a ranking model.
[0006] In some embodiments, obtaining an output matrix according to the two-dimensional probability distribution table includes: in each column of the two-dimensional probability distribution table, setting the maximum probability value to 1 and setting other probability values except the maximum probability value to 0 to obtain the output matrix.
[0007] In some embodiments, fusing the first feature vectors of all sample items includes: performing pooling processing on the first feature vectors of all sample items to obtain a fused feature vector.
[0008] In some embodiments, the pooling process includes a maximum pooling process or an average pooling process.
[0009] According to a second aspect of an embodiment of the present disclosure, a sorting model training device is provided, comprising: a first processing module, configured to input relevant information of all sample items in a sample set into a feature extraction model to obtain a first feature vector of each sample item respectively; a second processing module, configured to fuse the first feature vectors of all sample items to obtain a fused feature vector; a third processing module, configured to fuse the fused feature vector with the first feature vector of each sample item respectively to obtain a second feature vector of each sample item; a fourth processing module, configured to input the second feature vectors of all sample items into a machine learning A learning model is used to obtain a two-dimensional probability distribution table, wherein the i-th column of the two-dimensional probability distribution table includes the probability of the i-th sample item at each position in the recommendation sequence, the j-th row includes the probability of each sample item at the j-th position in the recommendation sequence, 1≤i, j≤N, N is the total number of sample items in the sample set; an output matrix is obtained according to the two-dimensional probability distribution table; a cross entropy loss function of each row and column of the output matrix is calculated using the label matrix of the sample set; and the machine learning model is trained using the cross entropy loss function of each row and column of the output matrix to obtain a sorting model.
[0010] According to a third aspect of an embodiment of the present disclosure, a sorting model training device is provided, comprising: a memory configured to store instructions; a processor coupled to the memory, the processor being configured to execute a sorting model training method as described in any of the above embodiments based on the instructions stored in the memory.
[0011] According to a fourth aspect of an embodiment of the present disclosure, a method for sorting items is provided, comprising: inputting relevant information of all candidate items in a candidate set into a feature extraction model to obtain a first feature vector of each candidate item respectively; fusing the first feature vectors of all candidate items to obtain a fused feature vector; fusing the fused feature vector with the first feature vector of each candidate item respectively to obtain a second feature vector of each candidate item; inputting the second feature vectors of all candidate items into a sorting model to obtain a two-dimensional probability distribution table, wherein the sorting model is trained using the training method described in any of the above embodiments, the i-th column of the two-dimensional probability distribution table includes the probability of the i-th candidate item at each position in the recommendation sequence respectively, the j-th row includes the probability of each candidate item at the j-th position in the recommendation sequence respectively, 1≤i, j≤M, M is the total number of candidate items in the candidate set; obtaining an output matrix according to the two-dimensional probability distribution table; determining the position of each candidate item in the candidate set in the recommendation sequence according to the output matrix, so as to sort all candidate items in the candidate set.
[0012] In some embodiments, obtaining an output matrix according to the two-dimensional probability distribution table includes: in each column of the two-dimensional probability distribution table, setting the maximum probability value to 1 and setting other probability values except the maximum probability value to 0 to obtain the output matrix.
[0013] In some embodiments, determining the position of each candidate item in the candidate set in the recommendation sequence according to the output matrix includes: if the value of the i-th candidate item in the candidate set in the j-th row of the output matrix is 1, then determining that the i-th candidate item is located at the j-th position in the recommendation sequence.
[0014] In some embodiments, fusing the first feature vectors of all candidate items includes: performing pooling processing on the first feature vectors of all candidate items to obtain a fused feature vector.
[0015] In some embodiments, the pooling process includes a maximum pooling process or an average pooling process.
[0016] According to a fifth aspect of an embodiment of the present disclosure, there is provided an item sorting device, comprising: a fifth processing module, configured to input relevant information of all candidate items in a candidate set into a feature extraction model to obtain a first feature vector of each candidate item respectively; a sixth processing module, configured to fuse the first feature vectors of all candidate items to obtain a fused feature vector; a seventh processing module, configured to fuse the fused feature vector with the first feature vector of each candidate item respectively to obtain a second feature vector of each candidate item; an eighth processing module, configured to input the second feature vectors of all candidate items into a sorting model to obtain a two-dimensional probability distribution table, wherein the sorting model is trained using the training method described in any of the above embodiments, the i-th column of the two-dimensional probability distribution table includes the probability of the i-th candidate item at each position in the recommendation sequence respectively, the j-th row includes the probability of each candidate item at the j-th position in the recommendation sequence respectively, 1≤i, j≤M, M is the total number of candidate items in the candidate set; an output matrix is obtained according to the two-dimensional probability distribution table; and the position of each candidate item in the candidate set in the recommendation sequence is determined according to the output matrix, so as to sort all candidate items in the candidate set.
[0017] According to a sixth aspect of an embodiment of the present disclosure, there is provided an item sorting device, comprising: a memory configured to store instructions; a processor coupled to the memory, the processor being configured to execute an item sorting method as described in any of the above embodiments based on the instructions stored in the memory.
[0018] According to a seventh aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method involved in any of the above embodiments is implemented.
[0019] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0021] Figure 1 A flowchart of a sorting model training method according to an embodiment of the present disclosure;
[0022] Figure 2A schematic diagram of the structure of a sorting model training device according to an embodiment of the present disclosure;
[0023] Figure 3 A schematic diagram of the structure of a sorting model training device according to another embodiment of the present disclosure;
[0024] Figure 4 A schematic diagram of a flow chart of an item sorting method according to an embodiment of the present disclosure;
[0025] Figure 5 This is a schematic diagram of the structure of an item sorting device according to an embodiment of the present disclosure;
[0026] Figure 6 It is a schematic structural diagram of an item sorting device according to another embodiment of the present disclosure.
[0027] Figure 7 The present invention is a flowchart of a method for sorting items according to another embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0029] Unless specifically stated otherwise, the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure.
[0030] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0031] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.
[0032] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0033] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0034] Figure 1 The flowchart of the sorting model training method of one embodiment of the present disclosure is shown in FIG. In some embodiments, the following sorting model training method is performed by a sorting model training device.
[0035] In step 101, relevant information of all sample items in a sample set is input into a feature extraction model to obtain a first feature vector of each sample item.
[0036] In some embodiments, the feature extraction model is a neural network model, which is used to extract the first feature vector of each sample item respectively.
[0037] In step 102, the first feature vectors of all sample items are fused to obtain a fused feature vector.
[0038] In some embodiments, the first feature vectors of all sample items are pooled to obtain a fused feature vector. For example, the pooling process includes a maximum pooling process or an average pooling process.
[0039] In step 103, the fused feature vector is fused with the first feature vector of each sample item to obtain a second feature vector of each sample item.
[0040] It should be noted here that, since the fused feature vector is associated with the sample items in the entire sample set, fusing the fused feature vector with the first feature of each sample item respectively helps to determine the position of each sample item in the entire sample set.
[0041] In step 104, the second feature vectors of all sample items are input into the machine learning model to obtain a two-dimensional probability distribution table. The i-th column of the two-dimensional probability distribution table includes the probability of the i-th sample item at each position in the recommendation sequence, and the j-th row includes the probability of each sample item at the j-th position in the recommendation sequence, 1≤i, j≤N, and N is the total number of sample items in the sample set.
[0042] For example, the sample set includes 4 sample items, and the obtained two-dimensional probability distribution table is shown in Table 1.
[0043] 1 2 3 4 1 0.9 0.1 0 0 2 0.05 0.8 0.15 0 3 0.05 0.1 0.7 0.15 4 0 0 0.15 0.85
[0044] Table 1
[0045] In step 105, an output matrix is obtained according to the two-dimensional probability distribution table.
[0046] In some embodiments, in each column of the two-dimensional probability distribution table, the maximum probability value is set to 1, and the other probability values except the maximum probability value are set to 0 to obtain an output matrix.
[0047] For example, according to the above Table 1, the obtained output matrix is shown in Table 2.
[0048]
[0049]
[0050] Table 2
[0051] In step 106, the label matrix of the sample set is used to calculate the cross entropy loss function of each row and each column of the output matrix.
[0052] For example, the cross entropy loss function is a softmax cross entropy loss function.
[0053] In step 107, the machine learning model is trained using the cross entropy loss function of each row and each column of the output matrix to obtain a ranking model.
[0054] Figure 2 FIG. 1 is a schematic diagram of the structure of a sorting model training device according to an embodiment of the present disclosure. Figure 2 As shown, the sorting model training device includes a first processing module 21, a second processing module 22, a third processing module 23 and a fourth processing module.
[0055] The first processing module 21 is configured to input relevant information of all sample items in the sample set into the feature extraction model to obtain a first feature vector for each sample item respectively.
[0056] In some embodiments, the feature extraction model is a neural network model, which is used to extract the first feature vector of each sample item respectively.
[0057] The second processing module 22 is configured to fuse the first feature vectors of all sample items to obtain a fused feature vector.
[0058] In some embodiments, the second processing module 22 performs pooling processing on the first feature vectors of all sample items to obtain a fused feature vector. For example, the pooling processing includes a maximum pooling processing or an average pooling processing.
[0059] The third processing module 23 is configured to fuse the fused feature vector with the first feature vector of each sample item respectively to obtain a second feature vector of each sample item.
[0060] The fourth processing module 24 is configured to input the second feature vectors of all sample items into the machine learning model to obtain a two-dimensional probability distribution table. The i-th column of the two-dimensional probability distribution table includes the probability of the i-th sample item at each position in the recommendation sequence, the j-th row includes the probability of each sample item at the j-th position in the recommendation sequence, 1≤i, j≤N, N is the total number of sample items in the sample set, and an output matrix is obtained according to the two-dimensional probability distribution table.
[0061] For example, in each column of the two-dimensional probability distribution table, the maximum probability value is set to 1, and the other probability values except the maximum probability value are set to 0 to obtain an output matrix.
[0062] The fourth processing module 24 uses the label matrix of the sample set to calculate the cross entropy loss function of each row and each column of the output matrix, and uses the cross entropy loss function of each row and each column of the output matrix to train the machine learning model to obtain a sorting model.
[0063] Figure 3 FIG. 1 is a schematic diagram of the structure of a sorting model training device according to another embodiment of the present disclosure. Figure 3 As shown, the sorting model training device includes a memory 31 and a processor 32.
[0064] The memory 31 is used to store instructions. The processor 32 is coupled to the memory 31. The processor 32 is configured to execute the instructions stored in the memory to implement the following. Figure 1 The method of any one of the embodiments.
[0065] like Figure 3 As shown, the sorting model training device also includes a communication interface 33 for information exchange with other devices. At the same time, the sorting model training device also includes a bus 34, through which the processor 32, the communication interface 33, and the memory 31 communicate with each other.
[0066] The memory 31 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory. The memory 31 may also be a memory array. The memory 31 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules.
[0067] In addition, the processor 32 may be a central processing unit (CPU), or may be an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.
[0068] The present disclosure also relates to a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, which are executed by a processor to implement the following Figure 1The method of any one of the embodiments.
[0069] Figure 4 The flowchart of the method for sorting items according to one embodiment of the present disclosure is shown in FIG.
[0070] In step 401, relevant information of all candidate items in the candidate set is input into a feature extraction model to obtain a first feature vector for each candidate item.
[0071] In some embodiments, the feature extraction model is a neural network model, which is used to extract the first feature vector of each candidate item respectively.
[0072] In step 402, the first feature vectors of all candidate items are fused to obtain a fused feature vector.
[0073] In some embodiments, the first feature vectors of all candidate items are pooled to obtain a fused feature vector. For example, the pooling process includes a maximum pooling process or an average pooling process.
[0074] In step 403, the fused feature vector is fused with the first feature vector of each candidate item to obtain a second feature vector of each candidate item.
[0075] It should be noted here that, since the fused feature vector is associated with the candidate items in the entire candidate set, fusing the fused feature vector with the first feature of each candidate item respectively helps to determine the position of each candidate item in the entire candidate set.
[0076] In step 404, the second feature vectors of all candidate items are input into the ranking model to obtain a two-dimensional probability distribution table. Figure 1 The training method of any one of the embodiments is used to train,
[0077] The i-th column of the two-dimensional probability distribution table includes the probability of the i-th candidate item at each position in the recommendation sequence, and the j-th row includes the probability of each candidate item at the j-th position in the recommendation sequence, 1≤i, j≤M, M is the total number of candidate items in the candidate set. For example, the two-dimensional probability distribution table is shown in Table 1 above.
[0078] In step 405, an output matrix is obtained according to the two-dimensional probability distribution table.
[0079] In some embodiments, in each column of the two-dimensional probability distribution table, the maximum probability value is set to 1, and the probability values other than the maximum probability value are set to 0, so as to obtain an output matrix, as shown in Table 2 above.
[0080] In step 406, the position of each candidate item in the candidate set in the recommendation sequence is determined according to the output matrix, so as to rank all candidate items in the candidate set.
[0081] In some embodiments, if the value of the i-th candidate item in the candidate set in the j-th row in the output matrix is 1, it is determined that the i-th candidate item is located at the j-th position in the recommendation sequence.
[0082] For example, as shown in Table 2 above, the value of candidate item 1 in the first row is 1, which means that candidate item 1 is at the first position in the recommendation sequence. The value of candidate item 2 in the second row is 1, which means that candidate item 2 is at the second position in the recommendation sequence. The value of candidate item 3 in the third row is 1, which means that candidate item 3 is at the third position in the recommendation sequence. The value of candidate item 4 in the fourth row is 1, which means that candidate item 4 is at the fourth position in the recommendation sequence. Therefore, it can be determined that the arrangement order of these four candidate items is candidate item 1, candidate item 2, candidate item 3 and candidate item 4.
[0083] Figure 5 FIG. 1 is a schematic diagram of the structure of an item sorting device according to an embodiment of the present disclosure. Figure 5 As shown, the article sorting device includes a fifth processing module 51 , a sixth processing module 52 , a seventh processing module 53 and an eighth processing module 54 .
[0084] The fifth processing module 51 is configured to input relevant information of all candidate items in the candidate set into the feature extraction model to obtain a first feature vector for each candidate item.
[0085] In some embodiments, the feature extraction model is a neural network model, which is used to extract the first feature vector of each candidate item respectively.
[0086] The sixth processing module 52 is configured to fuse the first feature vectors of all candidate items to obtain a fused feature vector.
[0087] In some embodiments, the sixth processing module 52 performs pooling processing on the first feature vectors of all candidate items to obtain a fused feature vector. For example, the pooling processing includes a maximum pooling processing or an average pooling processing.
[0088] The seventh processing module 53 is configured to fuse the fused feature vector with the first feature vector of each candidate item respectively to obtain the second feature vector of each candidate item.
[0089] The eighth processing module 54 is configured to input the second feature vectors of all candidate items into the sorting model to obtain a two-dimensional probability distribution table. Figure 1 The training is obtained by training using the training method of any one of the embodiments.
[0090] The i-th column of the two-dimensional probability distribution table includes the probability of the i-th candidate item at each position in the recommendation sequence, and the j-th row includes the probability of each candidate item at the j-th position in the recommendation sequence, 1≤i, j≤M, M is the total number of candidate items in the candidate set.
[0091] The eighth processing module 54 obtains an output matrix according to the two-dimensional probability distribution table.
[0092] In some embodiments, in each column of the two-dimensional probability distribution table, the maximum probability value is set to 1, and the probability values other than the maximum probability value are set to 0, so as to obtain an output matrix, as shown in Table 2 above.
[0093] The eighth processing module 54 determines the position of each candidate item in the candidate set in the recommendation sequence according to the output matrix, so as to rank all candidate items in the candidate set.
[0094] In some embodiments, if the value of the i-th candidate item in the candidate set in the j-th row in the output matrix is 1, it is determined that the i-th candidate item is located at the j-th position in the recommendation sequence.
[0095] Figure 6 FIG. 1 is a schematic diagram of the structure of an article sorting device according to another embodiment of the present disclosure. Figure 6 As shown, the item sorting device includes a memory 61 , a processor 62 , a communication interface 63 and a bus 64 . Figure 6 and Figure 3 The difference is that in Figure 6 In the illustrated embodiment, the processor 62 is configured to execute instructions stored in the memory to implement the following Figure 4 The method of any one of the embodiments.
[0096] The present disclosure also relates to a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, which are executed by a processor to implement the following Figure 4 The method of any one of the embodiments.
[0097] The following is a specific description of the item sorting scheme involved in the present disclosure.
[0098] like Figure 7 As shown, the candidate set includes 4 candidate items. The relevant information of the 4 candidate items is input into the feature extraction model to obtain the feature 11 of the candidate item 1, the feature 21 of the candidate item 2, the feature 31 of the candidate item 3 and the feature 41 of the candidate item 4 respectively.
[0099] Next, the feature vectors 11, 21, 31 and 41 of the four candidate items are fused to obtain a fused feature vector. The fused feature vector is fused with the feature 11 of candidate item 1 to obtain feature 12, the fused feature vector is fused with the feature 21 of candidate item 2 to obtain feature 22, the fused feature vector is fused with the feature 31 of candidate item 3 to obtain feature 32, and the fused feature vector is fused with the feature 41 of candidate item 4 to obtain feature 42.
[0100] Then, the feature vectors 12, 22, 32 and 42 of the four candidate items are input into the sorting model to obtain a two-dimensional probability distribution table. The output matrix is obtained based on the two-dimensional probability distribution table, and the position of each candidate item in the candidate set in the recommendation sequence is determined based on the output matrix, so as to sort all the candidate items in the candidate set. Finally, the sorting result is presented to the user.
[0101] In some embodiments, the functional unit module described above can be implemented as a general-purpose processor, a programmable logic controller (PLC), 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, discrete hardware components or any appropriate combination thereof for performing the functions described in the present disclosure.
[0102] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0103] The description of the present disclosure is given for the purpose of illustration and description, and is not intended to be exhaustive or to limit the present disclosure to the disclosed form. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present disclosure, and to enable those of ordinary skill in the art to understand the present disclosure and thereby design various embodiments with various modifications suitable for specific uses.
Claims
1. A sorting model training method, comprising: Inputting relevant information of all sample items in the sample set into the feature extraction model to obtain a first feature vector for each sample item; Fusing the first feature vectors of all the sample items to obtain a fused feature vector; Fusing the fused feature vector with the first feature vector of each sample item respectively to obtain a second feature vector of each sample item; Input the second feature vectors of all the sample items into the machine learning model to obtain a two-dimensional probability distribution table, wherein the i-th column of the two-dimensional probability distribution table includes the probability of the i-th sample item at each position in the recommendation sequence, and the j-th row includes the probability of each sample item at the j-th position in the recommendation sequence, 1≤i, j≤N, and N is the total number of sample items in the sample set; Obtaining an output matrix according to the two-dimensional probability distribution table, wherein in each column of the two-dimensional probability distribution table, the maximum probability value is set to 1, and the other probability values except the maximum probability value are set to 0, so as to obtain the output matrix; Using the label matrix of the sample set, calculating the cross entropy loss function of each row and each column of the output matrix; The machine learning model is trained using the cross entropy loss function of each row and each column of the output matrix to obtain a sorting model.
2. The method according to claim 1, wherein: The fusion of the first feature vectors of all sample items includes: The first feature vectors of all sample items are pooled to obtain a fused feature vector.
3. The method according to claim 2, wherein: The pooling process includes a maximum pooling process or an average pooling process.
4. A sorting model training device, comprising: A first processing module is configured to input relevant information of all sample items in the sample set into a feature extraction model to obtain a first feature vector for each sample item; A second processing module is configured to fuse the first feature vectors of all the sample items to obtain a fused feature vector; A third processing module is configured to fuse the fused feature vector with the first feature vector of each sample item to obtain a second feature vector of each sample item; The fourth processing module is configured to input the second feature vectors of all the sample items into the machine learning model to obtain a two-dimensional probability distribution table, wherein the i-th column of the two-dimensional probability distribution table includes the probability of the i-th sample item at each position in the recommendation sequence, and the j-th row includes the probability of each sample item at the j-th position in the recommendation sequence, 1≤i, j≤N, N is the total number of sample items in the sample set; an output matrix is obtained according to the two-dimensional probability distribution table, wherein in each column of the two-dimensional probability distribution table, the maximum probability value is set to 1, and the other probability values except the maximum probability value are set to 0 to obtain the output matrix; using the label matrix of the sample set, the cross entropy loss function of each row and each column of the output matrix is calculated; using the cross entropy loss function of each row and each column of the output matrix, the machine learning model is trained to obtain a sorting model.
5. A sorting model training device, comprising: a memory configured to store instructions; A processor is coupled to the memory, and the processor is configured to execute the method according to any one of claims 1 to 3 based on instructions stored in the memory.
6. A method for sorting items, comprising: Inputting relevant information of all candidate items in the candidate set into the feature extraction model to obtain a first feature vector for each candidate item; Fusing the first feature vectors of all the candidate items to obtain a fused feature vector; Fusing the fused feature vector with the first feature vector of each candidate item respectively to obtain a second feature vector of each candidate item; Inputting the second feature vectors of all the candidate items into a ranking model to obtain a two-dimensional probability distribution table, wherein the ranking model is trained using the training method described in any one of claims 1 to 4, the i-th column of the two-dimensional probability distribution table includes the probability of the i-th candidate item at each position in the recommendation sequence, the j-th row includes the probability of each candidate item at the j-th position in the recommendation sequence, 1≤i, j≤M, and M is the total number of candidate items in the candidate set; Obtaining an output matrix according to the two-dimensional probability distribution table, wherein in each column of the two-dimensional probability distribution table, the maximum probability value is set to 1, and the other probability values except the maximum probability value are set to 0, so as to obtain the output matrix; The position of each candidate item in the candidate set in the recommendation sequence is determined according to the output matrix, so as to rank all candidate items in the candidate set.
7. The method according to claim 6, wherein: Determining the position of each candidate item in the candidate set in the recommendation sequence according to the output matrix includes: If the value of the i-th candidate item in the candidate set in the j-th row of the output matrix is 1, it is determined that the i-th candidate item is located at the j-th position in the recommendation sequence.
8. The method according to any one of claims 6 to 7, wherein: The fusion of the first feature vectors of all candidate items includes: The first feature vectors of all candidate items are pooled to obtain a fused feature vector.
9. The method according to claim 8, wherein: The pooling process includes a maximum pooling process or an average pooling process.
10. An article sorting device, comprising: a fifth processing module, configured to input relevant information of all candidate items in the candidate set into the feature extraction model to obtain a first feature vector for each candidate item; A sixth processing module, configured to fuse the first feature vectors of all the candidate items to obtain a fused feature vector; a seventh processing module, configured to fuse the fused feature vector with the first feature vector of each candidate item respectively to obtain a second feature vector of each candidate item; an eighth processing module, configured to input the second feature vectors of all the candidate items into a sorting model to obtain a two-dimensional probability distribution table, wherein the sorting model is trained using the training method described in any one of claims 1 to 4, wherein the i-th column of the two-dimensional probability distribution table includes the probability of the i-th candidate item at each position in the recommendation sequence, and the j-th row includes the probability of each candidate item at the j-th position in the recommendation sequence, 1≤i, j≤M, and M is the total number of candidate items in the candidate set; an output matrix is obtained according to the two-dimensional probability distribution table, wherein in each column of the two-dimensional probability distribution table, the maximum probability value is set to 1, and the other probability values except the maximum probability value are set to 0 to obtain the output matrix; and the position of each candidate item in the candidate set in the recommendation sequence is determined according to the output matrix, so as to sort all the candidate items in the candidate set.
11. An article sorting device, comprising: a memory configured to store instructions; A processor is coupled to the memory, and the processor is configured to execute the method according to any one of claims 6 to 9 based on instructions stored in the memory.
12. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method according to any one of claims 1-3 and 6-9 is implemented.
