Method, device, equipment and storage medium for generating ranking model

By generating a ranking model and training it using item attributes and behavioral data, the problem of insufficient novel item selection in existing technologies is solved, thereby improving user engagement and click-through conversion rates.

CN114445194BActive Publication Date: 2025-12-19BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210121728.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-09
Publication Date
2025-12-19
Estimated Expiration
2042-02-09

AI Technical Summary

Technical Problem

In existing item recommendation systems, coarse-grained models cannot effectively filter out novel items, resulting in a recommendation list consisting of similar items, which reduces user engagement and click-through rates.

Method used

By acquiring sample data of item attributes and behavior from the sample set, a ranking model is generated using machine learning models, including an operational behavior network and an item attribute network. The model parameters are iteratively adjusted to improve the screening performance of novel items.

Benefits of technology

It improved the filtering performance for novel items, enhanced the user experience, and increased user stickiness and click-through conversion rate of the item recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114445194B_ABST
    Figure CN114445194B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for generating a ranking model, an equipment and a storage medium, and relates to the technical field of artificial intelligence. A specific embodiment of the method comprises: obtaining a sample set, wherein the samples in the sample set comprise attribute sample data of an item and behavior sample data of the item, the item comprises a clicked item and a non-clicked item, the clicked item is an item that is exposed and clicked within a preset time period, and the non-clicked item is an item that is exposed and not clicked within the preset time period; and training a machine learning model by using the sample set to obtain a ranking model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, in particular to the technical field of artificial intelligence, and especially to a method and device for generating a ranking model, a device and a storage medium. BACKGROUND

[0002] In the scenario of item recommendation, the coarse ranking model used in the recommendation link focuses on providing items with high similarity to user behaviors to the user, that is, providing more items related to the user's historical behaviors to the user, and cannot effectively filter out novel items (that is, items that have not been operated by the user), which will result in that all the items in the recommendation list are similar items, so that the user cannot perform in-depth browsing, thereby reducing user stickiness and affecting the user's click and conversion of the items. SUMMARY

[0003] Embodiments of the present application provide a method and device for generating a ranking model, a device and a storage medium.

[0004] In a first aspect, embodiments of the present application provide a method for generating a ranking model, the method comprising: obtaining a sample set, wherein a sample in the sample set comprises attribute sample data of an item and behavior sample data of the item, the item comprising a clicked item and a non-clicked item, the clicked item being an item exposed and clicked within a preset time period, and the non-clicked item being an item exposed and not clicked within the preset time period; and training a machine learning model using the sample set to obtain the ranking model.

[0005] In some embodiments, the training of the machine learning model using the sample set to obtain the ranking model comprises: inputting the sample set into a preset target model to obtain a first prediction result corresponding to the preset target model; inputting the sample set into the ranking model to obtain a second prediction result corresponding to the ranking model; and iteratively adjusting parameters of the ranking model using the first prediction result, a label of the sample, and the second prediction result to obtain a trained ranking model.

[0006] In some embodiments, the ranking model comprises an operation behavior network and an item attribute network; the inputting of the sample set into the ranking model to obtain the second prediction result corresponding to the ranking model comprises: inputting the behavior sample data into the operation behavior network to obtain a prediction result corresponding to the operation behavior network; and inputting the attribute sample data into the item attribute network to obtain a prediction result corresponding to the item attribute network; and determining the second prediction result according to the prediction result corresponding to the operation behavior network and the prediction result corresponding to the item attribute network.

[0007] In some embodiments, the operation behavior network comprises a first sub-network and a second sub-network, the clicked items comprise: first category items and second category items different in category, the first category items being items clicked before a preset time period, and the second category items being items first clicked within the preset time period; inputting the behavior sample data into the operation behavior network to obtain a prediction result corresponding to the operation behavior network, comprising: inputting first positive samples and first negative samples into the first sub-network to obtain a prediction result corresponding to the first sub-network, wherein the first positive samples comprise behavior sample data of the first category items and behavior sample data of the second category items, and the first negative samples comprise behavior sample data of non-clicked items; and inputting second positive samples and second negative samples into the second sub-network to obtain a prediction result corresponding to the second sub-network, wherein the second positive samples comprise behavior sample data of the second category items, and the second negative samples comprise behavior sample data of non-clicked items and behavior sample data of the first category items; and taking the prediction result corresponding to the first sub-network and the prediction result corresponding to the second sub-network as the prediction result corresponding to the operation behavior network.

[0008] In some embodiments, the first sub-network and the second sub-network share a first input layer, the first sub-network further comprises a first multi-layer perceptron layer connected to an output end of the first input layer, and the second sub-network further comprises a second multi-layer perceptron layer connected to the output end of the first input layer.

[0009] In some embodiments, the first input layer comprises: a first embedding layer, a first feature fusion layer, a plurality of first expert network layers, and a first gate network layer, the first gate network layer being configured to control input ends of at least one of the plurality of first expert network layers to be connected to an output end of the first feature fusion layer, and an input end of the first feature fusion layer being connected to an output end of the first embedding layer.

[0010] In some embodiments, the item attribute network comprises a third sub-network and a fourth sub-network; inputting the attribute sample data into the item attribute network to obtain a prediction result corresponding to the item attribute network, comprising: inputting third positive samples and third negative samples into the third sub-network to obtain a prediction result corresponding to the third sub-network, wherein the third positive samples comprise attribute sample data of the first category items and attribute sample data of the second category items, and the third negative samples comprise attribute sample data of non-clicked items; and inputting fourth positive samples and fourth negative samples into the fourth sub-network to obtain a prediction result corresponding to the fourth sub-network, wherein the fourth positive samples comprise attribute sample data of the second category items, and the fourth negative samples comprise attribute sample data of non-clicked items and attribute sample data of the first category items; and taking the prediction result corresponding to the third sub-network and the prediction result corresponding to the fourth sub-network as the prediction result corresponding to the item attribute network.

[0011] In some embodiments, the third sub-network and the fourth sub-network share the second input layer, the third sub-network further comprises a third multi-layer perceptron layer connected to an output end of the second output layer, and the fourth sub-network further comprises a fourth multi-layer perceptron layer connected to the output end of the second output layer.

[0012] In some embodiments, the second input layer comprises a second embedding layer and a second feature fusion layer, an input end of the second feature fusion layer is connected to an output end of the second embedding layer.

[0013] In some embodiments, the preset target model comprises a fifth sub-network and a sixth sub-network.

[0014] Inputting the sample set into the preset target model to obtain a first prediction result corresponding to the preset target model comprises: inputting the sample set into the fifth sub-network and the sixth sub-network respectively to obtain a prediction result corresponding to the fifth sub-network and a prediction result corresponding to the sixth sub-network; and taking the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network as the first prediction result corresponding to the preset target model.

[0015] In some embodiments, the fifth sub-network comprises a third embedding layer, a feature extraction network layer and a fifth multi-layer perceptron layer connected in sequence, and the sixth sub-network comprises a fourth embedding layer, a feature extraction network layer and a sixth multi-layer perceptron layer connected in sequence.

[0016] In some embodiments, the feature extraction network layer comprises a plurality of second expert network layers and a second gate network layer, the second gate network layer is configured to control an input end of at least one second expert network layer in the plurality of second expert network layers to be connected to an output end of the third embedding layer and an output end of the fourth embedding layer.

[0017] In some embodiments, the first prediction result, the label of the sample and the second prediction result are used to iteratively adjust parameters of the ranking model to obtain a trained ranking model, comprising: determining a loss function according to the first prediction result, the label of the sample and the second prediction result; and iteratively adjusting the parameters of the ranking model using the loss function to obtain the trained ranking model.

[0018] In some embodiments, the parameters of the ranking model comprise a first weight and a second weight; and the method further comprises: updating the weights of the trained ranking model using the demand quantity of the second type of item and a preset demand quantity threshold.

[0019] In some embodiments, the demand quantity of the second type of item is determined based on the following steps: determining the demand quantity of the first type of item according to the dot product of the prediction result of the first sub-network and the prediction result of the third sub-network; and determining the demand quantity of the second type of item according to the dot product of the prediction result of the second sub-network and the prediction result of the fourth sub-network; determining the demand quantity of the second type of item according to the ratio between the demand quantity of the first type of item and the corresponding first weight and the demand quantity of the second type of item and the corresponding second weight; and updating the weight of the trained ranking model using the demand quantity of the second type of item and a preset demand quantity threshold, including: in response to the demand quantity of the second type of item not meeting the preset demand quantity threshold, updating the first weight and / or the second weight of the trained ranking model until the updated demand quantity of the second type of item meets the preset demand quantity threshold.

[0020] In a second aspect, embodiments of the present application provide a device for generating a ranking model, the device comprising: a sample obtaining module configured to obtain a sample set, wherein a sample in the sample set comprises attribute sample data of an item and behavior sample data of the item, the item comprising a clicked item and a non-clicked item, the clicked item being an item exposed and clicked within a preset time period, and the non-clicked item being an item exposed and not clicked within the preset time period; and a model training module configured to train a machine learning model using the sample set to obtain the ranking model.

[0021] In some embodiments, the model training module comprises: a first obtaining unit configured to input the sample set into a preset target model to obtain a first prediction result corresponding to the preset target model; a second obtaining unit configured to input the sample set into the ranking model to obtain a second prediction result corresponding to the ranking model; and a model training unit configured to iteratively adjust parameters of the ranking model using the first prediction result, a label of the sample, and the second prediction result to obtain a trained ranking model.

[0022] In some embodiments, the ranking model comprises an operation behavior network and an item attribute network; the second obtaining unit comprises: a first obtaining sub-unit configured to input the behavior sample data into the operation behavior network to obtain a prediction result corresponding to the operation behavior network; and a second obtaining sub-unit configured to input the attribute sample data into the item attribute network to obtain a prediction result corresponding to the item attribute network; and a first determining sub-unit configured to determine the second prediction result according to the prediction result corresponding to the operation behavior network and the prediction result corresponding to the item attribute network.

[0023] In some embodiments, the operation behavior network comprises a first sub-network and a second sub-network, the clicked items comprise: first category items and second category items different in category, the first category items being items clicked before a preset time period, and the second category items being items first clicked within the preset time period; the first obtaining sub-unit is further configured to: input first positive samples and first negative samples into the first sub-network to obtain a prediction result corresponding to the first sub-network, wherein the first positive samples comprise behavior sample data of the first category items and behavior sample data of the second category items, and the first negative samples comprise behavior sample data of non-clicked items; and input second positive samples and second negative samples into the second sub-network to obtain a prediction result corresponding to the second sub-network, wherein the second positive samples comprise behavior sample data of the second category items, and the second negative samples comprise behavior sample data of non-clicked items and behavior sample data of the first category items; and take the prediction result corresponding to the first sub-network and the prediction result corresponding to the second sub-network as the prediction result corresponding to the operation behavior network.

[0024] In some embodiments, the first sub-network and the second sub-network share a first input layer, the first sub-network further comprises a first multi-layer perceptron layer connected to an output end of the first input layer, and the second sub-network further comprises a second multi-layer perceptron layer connected to the output end of the first input layer.

[0025] In some embodiments, the first input layer comprises: a first embedding layer, a first feature fusion layer, a plurality of first expert network layers, and a first gate network layer, the first gate network layer being configured to control at least one of the plurality of first expert network layers to be connected to an output end of the first feature fusion layer, and an input end of the first feature fusion layer being connected to an output end of the first embedding layer.

[0026] In some embodiments, the item attribute network comprises a third sub-network and a fourth sub-network; the second obtaining sub-unit is further configured to: input third positive samples and third negative samples into the third sub-network to obtain a prediction result corresponding to the third sub-network, wherein the third positive samples comprise attribute sample data of the first category items and attribute sample data of the second category items, and the third negative samples comprise attribute sample data of non-clicked items; and input fourth positive samples and fourth negative samples into the fourth sub-network to obtain a prediction result corresponding to the fourth sub-network, wherein the fourth positive samples comprise attribute sample data of the second category items, and the fourth negative samples comprise attribute sample data of non-clicked items and attribute sample data of the first category items; and take the prediction result corresponding to the third sub-network and the prediction result corresponding to the fourth sub-network as the prediction result corresponding to the item attribute network.

[0027] In some embodiments, the third sub-network and the fourth sub-network share the second input layer, the third sub-network further comprises a third multi-layer perceptron layer connected to an output end of the second output layer, and the fourth sub-network further comprises a fourth multi-layer perceptron layer connected to the output end of the second output layer.

[0028] In some embodiments, the second input layer comprises a second embedding layer and a second feature fusion layer, an input end of the second feature fusion layer being connected to an output end of the second embedding layer.

[0029] In some embodiments, the preset target model comprises a fifth sub-network and a sixth sub-network; the first obtaining unit is further configured to: input the sample set into the fifth sub-network and the sixth sub-network respectively, to obtain a prediction result corresponding to the fifth sub-network and a prediction result corresponding to the sixth sub-network; and take the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network as the first prediction result corresponding to the preset target model.

[0030] In some embodiments, the fifth sub-network comprises a third embedding layer, a feature extraction network layer and a fifth multi-layer perceptron layer connected in sequence, and the sixth sub-network comprises a fourth embedding layer, a feature extraction network layer and a sixth multi-layer perceptron layer connected in sequence.

[0031] In some embodiments, the feature extraction network layer comprises a plurality of second expert network layers and a second gate network layer, the second gate network layer being configured to control an input end of at least one second expert network layer in the plurality of second expert network layers to be connected to an output end of the third embedding layer and an output end of the fourth embedding layer.

[0032] In some embodiments, the second training unit is further configured to: determine a loss function according to the first prediction result, the label of the sample and the second prediction result; and iteratively adjust parameters of the ranking model by using the loss function to obtain a trained ranking model.

[0033] In some embodiments, the parameters of the ranking model comprise a first weight and a second weight; and the apparatus further comprises a weight updating module configured to update the weights of the trained ranking model by using the demand quantity of the second type of item and a preset demand quantity threshold.

[0034] In some embodiments, the apparatus further comprises: a first demand amount determining module configured to determine a demand amount of the first type of item according to a dot product of the prediction result of the first sub-network and the prediction result of the third sub-network; and a second demand amount determining module configured to determine a demand amount of the second type of item according to a dot product of the prediction result of the second sub-network and the prediction result of the fourth sub-network; a third demand amount determining module configured to determine the demand amount of the second type of item according to a ratio between the demand amount of the first type of item and the corresponding first weight and the demand amount of the second type of item and the corresponding second weight; and a weight updating module further configured to: in response to the demand amount of the second type of item not satisfying a preset demand amount threshold, update the first weight and / or the second weight of the trained ranking model until the updated demand amount of the second type of item satisfies the preset demand amount threshold.

[0035] In a third aspect, embodiments of the present application provide an item ranking method, comprising: obtaining attribute data of a plurality of items and behavior data of the plurality of items; inputting the attribute data of each item and the behavior data of each item into a ranking model as in any one of the first aspect or the second aspect to obtain a corresponding prediction result of each item, wherein the corresponding prediction result of each item comprises a target demand amount of each item; ranking the plurality of items according to the target demand amount of each item to obtain a ranking result.

[0036] In some embodiments, the corresponding prediction result of each item further comprises a click label of each item, wherein the click label is used to represent whether each item is an item that has been exposed and not clicked before a preset time point; and inputting the attribute data of each item and the behavior data of each item into the ranking model generated as in the first aspect or the second aspect to obtain the corresponding prediction result of each item comprises: inputting the behavior data of each item into a first sub-network and a second sub-network included in an operation behavior network of the ranking model to obtain a corresponding prediction result of the first sub-network and a corresponding prediction result of the second sub-network; and inputting the attribute data of each item into a third sub-network and a fourth sub-network included in an item attribute network of the ranking model to obtain a corresponding prediction result of the third sub-network and a corresponding prediction result of the fourth sub-network; and determining the target demand amount of each item according to the corresponding prediction result of the first sub-network and the corresponding prediction result of the third sub-network, and according to the corresponding prediction result of the second sub-network and the corresponding prediction result of the third sub-network.

[0037] In some embodiments, the target demand quantity of each item is determined according to a ratio of the first demand quantity of each item and the second demand quantity of each item, including: determining a first demand quantity of each item according to a dot product of the prediction result corresponding to the first sub-network and the prediction result corresponding to the third sub-network; and determining a second demand quantity of each item according to a dot product of the prediction result corresponding to the second sub-network and the prediction result corresponding to the third sub-network; and determining the target demand quantity of each item according to a ratio of the first demand quantity of each item and the second demand quantity of each item.

[0038] In some embodiments, the target demand quantity of each item is determined according to a ratio of the first demand quantity of each item and the second demand quantity of each item, including: determining a first demand quantity of each item according to a dot product of the prediction result corresponding to the first sub-network and the prediction result corresponding to the third sub-network; and determining a second demand quantity of each item according to a dot product of the prediction result corresponding to the second sub-network and the prediction result corresponding to the third sub-network; and determining the target demand quantity of each item according to a ratio of the first demand quantity of each item and the second demand quantity of each item.

[0039] In the fourth aspect, the embodiments of the present application provide an item ranking device, including: a data acquisition module configured to acquire attribute data of a plurality of items and behavior data of the plurality of items; a result obtaining module configured to input the attribute data of each item and the behavior data of each item into the ranking model generated in the first aspect or the second aspect respectively, to obtain a prediction result corresponding to each item, wherein the prediction result corresponding to each item includes a target demand quantity of each item; and an item ranking module configured to rank the plurality of items according to the target demand quantity of each item to obtain a ranking result.

[0040] In some embodiments, the prediction result corresponding to each item further includes a click label of each item, wherein the click label is used to represent whether each item is an item exposed before a preset time point and not clicked; and the result obtaining module includes: a first obtaining module configured to input the behavior data of each item into the first sub-network and the second sub-network included in the operation behavior network of the ranking model, to obtain the prediction result corresponding to the first sub-network and the prediction result corresponding to the second sub-network; and a second obtaining module configured to input the attribute data of each item into the third sub-network and the fourth sub-network included in the item attribute network of the ranking model, to obtain the prediction result corresponding to the third sub-network and the prediction result corresponding to the fourth sub-network; and a demand quantity determining module configured to determine the target demand quantity of each item according to the prediction result corresponding to the first sub-network and the prediction result corresponding to the third sub-network, and according to the prediction result corresponding to the second sub-network and the prediction result corresponding to the third sub-network.

[0041] In some embodiments, the demand determining module comprises: a first determining unit configured to determine a first demand quantity of each item according to a dot product of the prediction result corresponding to the first sub-network and the prediction result corresponding to the third sub-network; a second determining unit configured to determine a second demand quantity of each item according to a dot product of the prediction result corresponding to the second sub-network and the prediction result corresponding to the third sub-network; and a third determining unit configured to determine a target demand quantity of each item according to a ratio of the first demand quantity of each item and the second demand quantity of each item.

[0042] In some embodiments, the third determining unit is further configured to determine the target demand quantity of each item according to a ratio between the first demand quantity of each item and a corresponding first weight and the second demand quantity of each item and a corresponding second weight.

[0043] In a fifth aspect, an embodiment of the present application provides an electronic device, including at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect or the third aspect.

[0044] In a sixth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, and the computer instructions are used to enable a computer to perform the method described in the first aspect or the third aspect.

[0045] The method, device, equipment and storage medium for generating a ranking model provided by the embodiments of the present application first acquire a sample set, wherein the samples in the sample set include attribute sample data of items and behavior sample data of items, the items include clicked items and non-clicked items, the clicked items are items exposed and clicked in a preset time period, and the non-clicked items are items exposed and not clicked in the preset time period; then the machine learning model is trained by using the sample set to obtain the ranking model. The ranking model can be trained by using the behavior sample data and the attribute sample data corresponding to the clicked items which are items exposed and clicked in the preset time period and the non-clicked items which are items exposed and not clicked in the preset time period, so that the performance of the ranking model in screening novel items (i.e., items exposed and not clicked) can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0046] Other characteristics, objects and advantages of the present application will become more apparent from the following detailed description of the non-restrictive embodiments, made with reference to the accompanying drawings:

[0047] Figure 1 is an exemplary system architecture diagram to which the present application can be applied;

[0048] Figure 2 is a flowchart of one embodiment of a method for generating a ranking model according to the present application;

[0049] Figure 3 is a flowchart of one embodiment of a method for generating a ranking model according to the present application;

[0050] Figure 4 is a flowchart of one embodiment of a method for generating a ranking model according to the present application;

[0051] Figure 5 is a flowchart of one embodiment of a method for generating a ranking model according to the present application;

[0052] Figure 6 is a flowchart of one embodiment of a method for generating a ranking model according to the present application;

[0053] Figure 7 is a flowchart of one embodiment of a method for ranking items according to the present application;

[0054] Figure 8 is a schematic diagram of one application scenario of a method for generating a ranking model according to the present application;

[0055] Figure 9 is a schematic diagram of a distillation model;

[0056] Figure 10 is a structural schematic diagram of one embodiment of an apparatus for generating a ranking model according to the present application;

[0057] Figure 11 is a structural schematic diagram of one embodiment of an apparatus for ranking items according to the present application;

[0058] Figure 12 is a structural schematic diagram of an electronic device suitable for implementing embodiments of the present application. DETAILED DESCRIPTION

[0059] The present application will be further described below in conjunction with the drawings and embodiments. It should be understood that the specific embodiments described herein are intended to be merely illustrative of the present application and not in limitation thereof. It should also be noted that only parts pertinent to the present application are shown in the drawings for the sake of brevity.

[0060] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The present application will be described in detail below with reference to the drawings and embodiments.

[0061] Figure 1An exemplary system architecture 100 is shown, which can apply to an embodiment of the method and device for generating a ranking model of the application or the method for ranking items.

[0062] As shown in Figure 1 The system architecture 100 can include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is a medium for providing a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0063] A user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104, such as a sample set, etc.

[0064] The terminal devices 101, 102, 103 can be hardware or software. When the terminal devices 101, 102, 103 are hardware, the terminal devices can be electronic products for human-computer interaction with the user through one or more ways, such as a keyboard, a touchpad, a touch screen, a remote control, voice interaction or a handwriting device, etc., for example, a PC (Personal Computer), a mobile phone, a smart phone, a PDA (Personal Digital Assistant), a wearable device, a PPC (Pocket PC), a tablet computer, a smart car machine, a smart TV, a smart speaker, a tablet computer, a laptop computer and a desktop computer, etc. When the terminal devices 101, 102, 103 are software, they can be installed in the above electronic devices. They can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made herein.

[0065] The server 105 can provide various services. For example, the server 105 can obtain a sample set, wherein the samples in the sample set include attribute sample data of items and behavior sample data of items, the items include clicked items and unclicked items, the clicked items are items that are exposed and clicked within a preset time period, and the unclicked items are items that are exposed and not clicked within a preset time period; and train a machine learning model using the sample set to obtain a ranking model.

[0066] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, to provide distributed services), or as a single software or software module. No specific limitation is made herein.

[0067] It should be noted that the method for generating a ranking model or the item ranking method provided in the embodiments of the present application is generally executed by the server 105, and accordingly, the device for generating a ranking model or the item ranking device is generally arranged in the server 105.

[0068] It should be understood that Figure 1 The number of terminal devices, networks and servers in the above-mentioned system is only illustrative. Any number of terminal devices, networks and servers can be provided according to the implementation needs.

[0069] With reference to the above-mentioned system, Figure 2 FIG. 2 shows a flowchart 200 of one embodiment of the method for generating a ranking model according to the present application, which can include the following steps:

[0070] At step 201, a sample set is obtained, wherein the samples in the sample set include attribute sample data of items and behavior sample data of items, and the items include clicked items and non-clicked items, the clicked items being items exposed and clicked within a preset time period, and the non-clicked items being items exposed and not clicked within the preset time period.

[0071] In the present embodiment, the execution subject of the method for generating a ranking model (for example, the server 105 shown in FIG. 1) can obtain the sample set from terminal devices (for example, the terminal devices 101, 102 and 103 shown in FIG. 1) through a network (for example, the network 104 shown in FIG. 1); or, the execution subject of the method for generating a ranking model (for example, the terminal devices 101, 102 and 103 shown in FIG. 1) can obtain the sample set locally. Figure 1 Figure 1 Figure 1 Figure 1

[0072] Here, the samples in the sample set include attribute sample data of items and behavior sample data of items, and the attribute sample data of items can be data related to attributes of items, for example, specifications, places of origin, suppliers, brands, net weights, shelf lives, varieties, etc. The above-mentioned behavior sample data of items can include at least one of the following: a category of operation behavior of a user on an item, and time information of the operation behavior. The category of operation behavior can be set by specific implementation scenarios and domain experience.

[0073] In one example, the behavior sample data can be an operation related to clicking an item, for example, clicking the item, ordering the item, browsing the item, etc.

[0074] Correspondingly, in this example, the above-mentioned items can include clicked items and non-clicked items, the clicked items being items exposed and clicked within a preset time period, and the non-clicked items being items exposed and not clicked within the preset time period. ​​​​

[0075] Here, the clicked item can be an item that is exposed on a display screen of a terminal device (e.g., the terminal device 101, 102, 103) within a preset time period and is clicked by a user. The unclicked item can be an item that is exposed on the display screen of the terminal device within the preset time period and is not clicked by the user. Figure 1 The clicked item can be an item that is exposed on a display screen of a terminal device (e.g., the terminal device 101, 102, 103) within a preset time period and is clicked by a user. The unclicked item can be an item that is exposed on the display screen of the terminal device within the preset time period and is not clicked by the user.

[0076] It should be noted that the preset time period can be a period of time in the past, for example, ten days before today, twenty days before yesterday, etc.

[0077] At step 202, the machine learning model is trained using the sample set to obtain a ranking model.

[0078] In this embodiment, the execution subject described above can train a machine learning model using the sample set to obtain a ranking model. The machine learning model can be a probability model, a classification model, or other classifiers in existing technologies or future technologies, for example, the machine learning model can include any one of the following: GNN (Graph Neural Networks), graph convolutional neural network (GCN), and graph attention network (Graph Attention Networks).

[0079] The method for generating a graph neural network model provided in this embodiment first acquires a sample set, wherein the samples in the sample set include attribute sample data of items and behavior sample data of items, and the items include clicked items and unclicked items. The clicked items are items that are exposed and clicked within a preset time period, and the unclicked items are items that are exposed and not clicked within a preset time period. Then, a machine learning model is trained using the sample set to obtain a ranking model. The behavior sample data and attribute sample data corresponding to the clicked items that are exposed and clicked within a preset time period and the unclicked items that are exposed and not clicked within a preset time period are used to train the ranking model, so that the performance of the ranking model in screening novel items can be improved.

[0080] Continuing to refer to Figure 3 which shows a schematic diagram 300 of one embodiment of a method for generating a ranking model according to the present application. The method for generating a ranking model can include the following steps:

[0081] At step 301, a sample set is acquired, wherein the samples in the sample set include attribute sample data of items and behavior sample data of items, and the items include clicked items and unclicked items. The clicked items are items that are exposed and clicked within a preset time period, and the unclicked items are items that are exposed and not clicked within a preset time period.

[0082] In this embodiment, the execution subject of the method for generating the ranking model (for example, the server 105 shown in FIG. 1) can obtain the sample set from a terminal device (for example, the terminal device 101, 102, or 103 shown in FIG. 1) through a network (for example, the network 104 shown in FIG. 1); or the execution subject of the method for generating the ranking model (for example, the terminal device 101, 102, or 103 shown in FIG. 1) can obtain the sample set locally. Figure 1 Figure 1 Figure 1 Figure 1

[0083] In step 302, the sample set is input into a preset target model to obtain a first prediction result corresponding to the preset target model.

[0084] In this embodiment, the execution subject can input the sample set in step 301 into the preset target model to obtain the first prediction result output by the preset target model. The first prediction result can be a prediction result corresponding to the preset target model. The preset target model can be used to obtain the first prediction result corresponding to the sample set.

[0085] Here, the target model can be different types of models according to actual requirements, such as a convolutional neural network, a deep neural network, a long short-term memory network, a generative adversarial network (GAN), and the like. The target model can be obtained by the execution subject from a local storage device, or obtained from a non-local storage device, or pre-trained by the execution subject, or trained by the execution subject at the same time as training the ranking model. The local storage device can be a data storage module, such as a hard disk, provided in the execution subject. The non-local storage device can be any electronic device provided for storing data, such as some terminal devices.

[0086] Correspondingly, in this example, the target model and the ranking model can constitute a distillation model, which uses the target model (i.e., a teacher model) to supervise the training of the ranking model by using transfer learning.

[0087] The target model can be trained based on the following steps: inputting the sample set into the preset target model to obtain a first prediction result corresponding to the preset target model; and adjusting the parameters of the target model based on the first prediction result and the label of the sample to obtain the trained target model.

[0088] ​​​​In the embodiment, the first prediction result and the label of the sample are used to obtain a loss function corresponding to the target model. Then, the parameters of the target model are iteratively adjusted until the preset stopping condition is met, and the target model with the adjusted parameters is taken as the trained target model.

[0089] Here, the label of the sample can be obtained by manual labeling or by a related labeling model. The label of the sample can include at least one of the following: clicking a corresponding label, not clicking a corresponding label, and a label corresponding to an attribute of an item.

[0090] It should be noted that the stopping condition can be set manually according to the accuracy of the target model. The sample used to train the target model can be the same as or different from the sample used to train the ranking model. The target model can be trained before the ranking model is trained, or the target model can be trained at the same time as the ranking model.

[0091] In step 303, the sample set is input into the ranking model to obtain a second prediction result corresponding to the ranking model.

[0092] In the embodiment, the sample set in step 301 is input into the ranking model to obtain the second prediction result output by the ranking model. The second prediction result can be a prediction result corresponding to a sample in the sample set.

[0093] Here, the ranking model can be used to obtain a prediction result corresponding to the sample set.

[0094] In step 304, the first prediction result, the label of the sample, and the second prediction result are used to iteratively adjust the parameters of the ranking model to obtain a trained ranking model.

[0095] In the embodiment, the parameters of the ranking model are iteratively adjusted according to the first prediction result, the label of the sample, and the second prediction result until a preset iteration stopping condition is met to obtain the trained ranking model. The stopping condition can be set manually according to the accuracy of the ranking model.

[0096] In the embodiment, the ranking model is supervised to be trained according to the first prediction result output by the preset target model.

[0097] It should be noted that step 302 and step 303 can be executed simultaneously, or step 303 can be executed first and then step 302 can be executed, or step 302 can be executed first and then step 303 can be executed.

[0098] In the embodiment, the specific operation of step 301 is basically the same as the operation of step 201 in the embodiment shown in Figure 2 will not be repeated here.

[0099] As can be seen from Figure 3 , compared with the corresponding embodiment, the method 300 for generating the ranking model in the present embodiment first acquires a sample set; then inputs the sample set into a preset target model to obtain a first prediction result corresponding to the preset target model; then inputs the sample set into a ranking model to obtain a second prediction result corresponding to the ranking model; and then iteratively adjusts parameters of the ranking model by using the first prediction result, a label of the sample, and the second prediction result to obtain a trained ranking model. Thus, the ranking model can be supervised and trained according to the prediction result output by the preset target model to obtain the trained ranking model. Figure 2 With reference to

[0100] , a schematic diagram 400 of one embodiment of the method for generating a ranking model according to the present application is shown. The method for generating a ranking model can include the following steps: Figure 4

[0101] Step 401, a sample set is acquired, wherein the samples in the sample set include attribute sample data of an item and behavior sample data of the item, the item includes a clicked item and a non-clicked item, the clicked item is an item that is exposed and clicked within a preset time period, and the non-clicked item is an item that is exposed and not clicked within a preset time period.

[0102] In the present embodiment, an execution subject (for example, the server 105 shown in Figure 1 ) of the method for generating a ranking model can acquire the sample set from a terminal device (for example, the terminal devices 101, 102, and 103 shown in Figure 1 ) through a network (for example, the network 104 shown in Figure 1 ); or the execution subject (for example, the terminal devices 101, 102, and 103 shown in Figure 1 ) of the method for generating a ranking model can acquire the sample set locally.

[0103] Step 402, the sample set is input into a preset target model to obtain a first prediction result corresponding to the preset target model.

[0104] Step 403, the behavior sample data is input into an operation behavior network to obtain a prediction result corresponding to the operation behavior network.

[0105] In the present embodiment, the execution subject described above can input the behavior sample data into an operation behavior network included in the ranking model to obtain a prediction result corresponding to the operation behavior network. The prediction result corresponding to the operation behavior network can be a prediction result corresponding to the behavior sample data.

[0106] Here, the operation behavior network can be used to obtain a prediction result corresponding to the behavior sample data.​

[0107] Step 404, input the attribute sample data into the item attribute network to obtain a prediction result corresponding to the item attribute network.

[0108] In the embodiment, the execution subject can input the attribute sample data into the item attribute network included in the ranking model to obtain a prediction result corresponding to the item attribute network. The prediction result corresponding to the item attribute network can be a prediction result corresponding to the attribute sample data.

[0109] Here, the item attribute network can be used to obtain a prediction result corresponding to the attribute sample data.

[0110] Step 405, determine a second prediction result according to the prediction result corresponding to the operation behavior network and the prediction result corresponding to the item attribute network.

[0111] In the embodiment, the execution subject can combine the prediction result corresponding to the operation behavior network and the prediction result corresponding to the item attribute network together to obtain the second prediction result.

[0112] It should be noted that step 403 and step 404 can be executed simultaneously, or step 404 can be executed first and then step 403 can be executed, or step 403 can be executed first and then step 404 can be executed.

[0113] Step 406, iteratively adjust parameters of the ranking model by using the first prediction result, the label of the sample, and the second prediction result to obtain a trained ranking model.

[0114] It should be noted that step 402 and step 405 can be executed simultaneously, or step 405 can be executed first and then step 402 can be executed, or step 402 can be executed first and then step 405 can be executed.

[0115] In the embodiment, the specific operations of steps 401, 402, and 406 are basically the same as the operations of steps 301, 302, and 304 in the embodiment shown in Figure 3 Therefore, details are not described herein.

[0116] As can be seen from Figure 4 , compared with Figure 3Compared with the corresponding embodiment, the method 400 for generating the ranking model in this embodiment first inputs the behavior sample data into the operation behavior network to obtain the corresponding prediction result of the operation behavior network; then, the attribute sample data is input into the item attribute network to obtain the corresponding prediction result of the item attribute network; and then, the second prediction result is determined according to the prediction result of the operation behavior network and the prediction result of the item attribute network. In order to improve the efficiency of the model, the coarse ranking module (i.e., the ranking model) in the item recommendation system separates the user side (i.e., the operation behavior network) from the item side (i.e., the item attribute network), uploads the behavior sample data corresponding to the user side network (i.e., the operation behavior network) to the server for real-time inference to obtain the corresponding prediction result, and precomputes the output vector corresponding to the attribute sample data of the item side network (i.e., the item attribute network) and stores the output vector in the hbase table. When the attribute sample data of the item side network needs to be inferred, the prediction result corresponding to the attribute sample data can be obtained from the hbase table. Separating the user side from the item side can greatly reduce the overall delay of the ranking model.

[0117] In some optional implementations of the embodiment, the operation behavior network includes a first sub-network and a second sub-network, the clicked items include first category items and second category items that are different in category, the first category items are items clicked before a preset time period, and the second category items are items first clicked in the preset time period; inputting the behavior sample data into the operation behavior network to obtain the prediction result corresponding to the operation behavior network can include: inputting first positive samples and first negative samples into the first sub-network to obtain the prediction result corresponding to the first sub-network, wherein the first positive samples include the behavior sample data of the first category items and the behavior sample data of the second category items, and the first negative samples include the behavior sample data of the non-clicked items; and inputting second positive samples and second negative samples into the second sub-network to obtain the prediction result corresponding to the second sub-network, wherein the second positive samples include the behavior sample data of the second category items, and the second negative samples include the behavior sample data of the non-clicked items and the behavior sample data of the first category items; and the prediction result corresponding to the first sub-network and the prediction result corresponding to the second sub-network are taken as the prediction result corresponding to the operation behavior network.

[0118] In an example, inputting the first positive sample and the first negative sample in the sample set into the first sub-network to obtain the prediction result corresponding to the first sub-network can include: inputting the first positive sample and the first negative sample into the first sub-network at the same time to obtain the prediction result corresponding to the first sub-network. The first type of item and the second type of item can be items of different categories in the clicked items, the first type of item being an item clicked before a preset time period, and the second type of item being an item first clicked in the preset time period. The first positive sample can include behavior sample data of the first type of item and behavior sample data of the second type of item, and the first negative sample includes behavior sample data of an unclicked item. The first negative sample, the first positive sample, and the corresponding label can be used to train the first sub-network. The corresponding label can be a click label, which can be used to represent whether an item is clicked.

[0119] It should be noted that the first type of item is an item clicked before a preset time period and a preset time period. The second type of item is an item first clicked in the preset time period.

[0120] In an example, inputting the second positive sample and the second negative sample into the second sub-network to obtain the prediction result corresponding to the second sub-network can include: inputting the second positive sample and the second negative sample into the second sub-network at the same time to obtain the prediction result corresponding to the second sub-network. The second positive sample can include behavior sample data of the user operating the second type of item, and the second negative sample can include behavior sample data of an unclicked item and behavior sample data of the user operating the first type of item. The second positive sample and the second negative sample, and the corresponding label can be used to train the second sub-network. The corresponding label can be a click label, which can be used to represent whether an item is clicked.

[0121] In an example, the prediction result corresponding to the operation behavior network can include the prediction result corresponding to the first sub-network and the prediction result corresponding to the second sub-network.

[0122] Correspondingly, in the example, the execution subject can take the prediction result corresponding to the first sub-network and the prediction result corresponding to the second sub-network as the prediction result corresponding to the operation behavior network.

[0123] It should be noted that the execution subject can simultaneously execute the prediction result corresponding to the first sub-network and the prediction result corresponding to the second sub-network; or first execute the prediction result corresponding to the second sub-network, and then execute the prediction result corresponding to the first sub-network.

[0124] In the implementation, the execution subject can obtain a prediction result corresponding to the first sub-network according to the input first positive sample and the first negative sample of the first sub-network, and obtain a prediction result corresponding to the second sub-network according to the input second positive sample and the second negative sample of the second sub-network, so as to obtain a prediction result corresponding to the operation behavior network according to the prediction result corresponding to the first sub-network and the prediction result corresponding to the second sub-network.

[0125] In some optional implementations of the embodiment, the first sub-network and the second sub-network share the first input layer, the first sub-network further includes a first multi-layer perceptron layer connected to the output end of the first input layer, and the second sub-network further includes a second multi-layer perceptron layer connected to the output end of the first input layer.

[0126] In the implementation, the first sub-network and the second sub-network share a first input layer, the first sub-network further includes a first multi-layer perceptron layer connected to the output end of the first input layer, and the second sub-network further includes a second multi-layer perceptron layer connected to the output end of the first input layer, and the multi-layer perceptron can include Relu.

[0127] It should be noted that the neural network with the same function as the first multi-layer perceptron layer and the second multi-layer perceptron layer can be included in the scope of the present application.

[0128] In the embodiment, the first sub-network and the second sub-network share an input layer, the first sub-network further includes a first multi-layer perceptron layer connected to the output end of the input layer, and the second sub-network further includes a second multi-layer perceptron layer connected to the output end of the input layer. The prediction result corresponding to the operation behavior network can be obtained through the prediction result corresponding to the first sub-network and the prediction result corresponding to the second sub-network.

[0129] In some optional implementations of the embodiment, the first input layer includes a first embedding layer, a first feature fusion layer, a plurality of first expert network layers, and a first gate network layer, the first gate network layer is used to control the input end of at least one first expert network layer in the plurality of first expert network layers to be connected to the output end of the first feature fusion layer, the input end of the first feature fusion layer is connected to the output end of the first embedding layer, and the first gate network layer can include gateA and gateB.

[0130] In the implementation, the first input layer includes a first embedding layer, a first feature fusion layer, a plurality of first expert network layers, and a first gate network layer; the first embedding layer is configured to convert the behavior sample data into a corresponding vector; the first feature fusion layer can be configured to fuse the vector output by the first embedding layer; then, the fused vector is input into the plurality of first expert network layers, which can be configured to cross and learn relevant features of the fused vector; and the first gate network layer is configured to connect an input layer of at least one of the plurality of first expert network layers to an output end of the first feature fusion layer according to different weights.

[0131] In some optional implementations of the embodiment, the item attribute network includes a third sub-network and a fourth sub-network; the attribute sample data is input into the item attribute network to obtain a corresponding prediction result of the item attribute network, including: inputting third positive samples and third negative samples into the third sub-network to obtain a corresponding prediction result of the third sub-network, wherein the third positive samples include attribute sample data of the first type of items and attribute sample data of the second type of items, and the third negative samples include attribute sample data of the non-clicked items; and inputting fourth positive samples and fourth negative samples into the fourth sub-network to obtain a corresponding prediction result of the fourth sub-network, wherein the fourth positive samples include attribute sample data of the second type of items, and the fourth negative samples include attribute sample data of the non-clicked items and attribute sample data of the first type of items; and taking the corresponding prediction result of the third sub-network and the corresponding prediction result of the fourth sub-network as the corresponding prediction result of the item attribute network.

[0132] In the implementation, the execution subject can input the third positive samples and the third negative samples into the third sub-network to obtain a corresponding prediction result of the third sub-network, and input the fourth positive samples and the fourth negative samples into the fourth sub-network to obtain a corresponding prediction result of the fourth sub-network; then, the corresponding prediction result of the third sub-network and the corresponding prediction result of the fourth sub-network are taken as the corresponding prediction result of the item attribute network. The third positive samples include attribute sample data of the first type of items and attribute sample data of the second type of items, and the third negative samples include attribute sample data of the non-clicked items. The execution subject can train the third sub-network according to the third positive samples and the third negative samples and corresponding attribute labels, which can be used to label different items. The fourth positive samples include attribute sample data of the second type of items, and the fourth negative samples include attribute sample data of the non-clicked items and attribute sample data of the first type of items. The execution subject can train the fourth sub-network according to the fourth positive samples and the fourth negative samples and corresponding attribute labels.

[0133] It should be noted that the item attribute network can include a third sub-network and a fourth sub-network, which can be double-tasked to obtain a prediction result corresponding to the item attribute network from multiple dimensions.

[0134] In some optional implementations of the embodiment, the third sub-network and the fourth sub-network share the second input layer, the third sub-network further includes a third multi-layer perceptron layer connected to the output end of the second output layer, and the fourth sub-network further includes a fourth multi-layer perceptron layer connected to the output end of the second output layer.

[0135] In the implementation, the third sub-network and the fourth sub-network share a second input layer, the third sub-network further includes a third multi-layer perceptron layer connected to the output end of the second input layer, and the fourth sub-network further includes a fourth multi-layer perceptron layer connected to the output end of the second input layer.

[0136] It should be noted that neural networks with the same functions as the third multi-layer perceptron layer and the fourth multi-layer perceptron layer can be included in the scope of the present application.

[0137] In the embodiment, the third sub-network and the fourth sub-network share an input layer, the third sub-network further includes a third multi-layer perceptron layer connected to the output end of the input layer, and the fourth sub-network further includes a fourth multi-layer perceptron layer connected to the output end of the input layer. The prediction result corresponding to the third sub-network and the prediction result corresponding to the fourth sub-network can be used to obtain a prediction result corresponding to the item attribute network.

[0138] In some optional implementations of the embodiment, the second input layer includes a second embedding layer and a second feature fusion layer, and the input end of the second feature fusion layer is connected to the output end of the second embedding layer.

[0139] In the implementation, the second input layer includes a second embedding layer and a second feature fusion layer. The second embedding layer is configured to convert the behavior attribute sample data into a corresponding vector. The second feature fusion layer can be configured to fuse the vector output by the second embedding layer to obtain a fused vector.

[0140] Continuing to refer to Figure 5 FIG. 5 shows a schematic diagram 500 of one embodiment of a method for generating a ranking model according to the present application. The method for generating a ranking model can include the following steps:

[0141] At step 501, a sample set is obtained, wherein the samples in the sample set include attribute sample data of an item and behavior sample data of the item, the item includes a clicked item and a non-clicked item, the clicked item is an item that is exposed and clicked within a preset time period, and the non-clicked item is an item that is exposed and not clicked within a preset time period.

[0142] In this embodiment, the execution subject of the method of generating the ranking model (for example, the server 105 shown in FIG. 1) can obtain the sample set from the terminal device (for example, the terminal device 101, 102, or 103 shown in FIG. 1) through the network (for example, the network 104 shown in FIG. 1); or the execution subject of the method of generating the ranking model (for example, the terminal device 101, 102, or 103 shown in FIG. 1) can obtain the sample set locally. Figure 1 Figure 1 Figure 1 Figure 1

[0143] In this embodiment, the execution subject can input the sample set in step 501 into the fifth sub-network and the sixth sub-network respectively to obtain the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network.

[0144] In this embodiment, the execution subject can input the sample set in step 501 into the fifth sub-network and the sixth sub-network respectively to obtain the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network.

[0145] In this embodiment, the execution subject can input the sample set in step 501 into the fifth sub-network and the sixth sub-network respectively to obtain the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network.

[0146] In this embodiment, the execution subject can input the sample set in step 501 into the fifth sub-network and the sixth sub-network respectively to obtain the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network.

[0147] In this embodiment, the first prediction result can include the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network.

[0148] In this embodiment, the execution subject can input the sample set in step 501 into the fifth sub-network and the sixth sub-network respectively to obtain the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network.

[0149] In this embodiment, the execution subject can input the sample set in step 501 into the fifth sub-network and the sixth sub-network respectively to obtain the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network.

[0150] In this embodiment, the execution subject can input the sample set in step 501 into the fifth sub-network and the sixth sub-network respectively to obtain the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network.

[0151] In this embodiment, the execution subject can input the sample set in step 501 into the fifth sub-network and the sixth sub-network respectively to obtain the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network.

[0152] It should be noted that step 504 and step 505 can be executed simultaneously, or step 505 can be executed first and then step 504 can be executed, or step 504 can be executed first and then step 505 can be executed.

[0153] ​​​​In step 507, the parameters of the ranking model are iteratively adjusted using the first prediction result, the label of the sample, and the second prediction result, to obtain a trained ranking model.

[0154] In this embodiment, the specific operations of steps 501, 504-507 are substantially the same as the operations of steps 401, 403-406 in the embodiment shown in Figure 4 The operations of steps 401, 403-406 in the embodiment shown are substantially the same as the operations of steps 501, 504-507 in the embodiment shown, and are not described again here.

[0155] As can be seen from Figure 5 Compared with the embodiment corresponding to Figure 4 The method 500 for generating a ranking model in this embodiment first inputs the sample set into the fifth sub-network and the sixth sub-network respectively to obtain the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network; then, the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network are taken as the first prediction result corresponding to the preset target model (i.e., the teacher model). The teacher model adopts a double-task model. When the teacher model and the ranking model both adopt the double-task model, the input on the user side of the ranking model is only the dense feature (i.e., dense) and the sparse feature. The input of the teacher model is the dense feature and the sparse feature on the user side and the item side, as well as the cross feature (i.e., the feature that the ranking model cannot utilize but the teacher model can effectively utilize) that the ranking model cannot utilize, which can enable the ranking model to learn all the features and improve the precision of the ranking model in identifying novel items.

[0156] In some optional implementations of this embodiment, the fifth sub-network includes a third embedding layer, a third feature fusion layer, a feature extraction network layer, and a fifth multi-layer perceptron layer connected in sequence, and the sixth sub-network includes a fourth embedding layer, a third feature fusion layer, a feature extraction network layer, and a sixth multi-layer perceptron layer connected in sequence.

[0157] In this implementation, the fifth sub-network in the preset target model can include a third embedding layer, a third feature fusion layer, a feature extraction network layer, and a fifth multi-layer perceptron layer connected in sequence. The sixth sub-network in the preset target model can include a fourth embedding layer, a third feature fusion layer, a feature extraction network layer, and a sixth multi-layer perceptron layer connected in sequence. The third embedding layer can be used to convert the behavior sample data into a corresponding vector, and the fourth embedding layer can be used to convert the attribute sample data into a corresponding vector. The third feature fusion layer can be used to fuse the vector corresponding to the attribute sample data and the vector corresponding to the behavior sample data to obtain a fused vector.

[0158] In some optional implementations of the embodiment, the feature extraction network layer comprises a plurality of second expert network layers and a second gate network layer, and the second gate network layer is configured to control the input end of at least one of the plurality of second expert network layers to be connected to the output end of the third embedding layer and the output end of the fourth embedding layer.

[0159] In the implementation, the feature extraction network layer can comprise a plurality of second expert network layers and a second gate network layer, and the second gate network layer can be configured to control the input end of at least one of the plurality of second expert network layers to be connected to the output end of the third embedding layer and the output end of the fourth embedding layer. The connection can be used for participating in model training, so that the at least one expert network layer can receive the output of the third embedding layer and the fourth embedding layer.

[0160] In the embodiment, the feature extraction network layer comprising the plurality of second expert network layers and the second gate network layer can be used to extract the features of the sample.

[0161] With reference to Figure 6 , a schematic diagram 600 of one embodiment of a method for generating a ranking model according to the present application is shown. The method for generating a ranking model can comprise the following steps:

[0162] In step 601, a sample set is obtained, wherein the sample in the sample set comprises attribute sample data of an item and behavior sample data of the item, the item comprises a clicked item and a non-clicked item, the clicked item is an item that is exposed and clicked within a preset time period, and the non-clicked item is an item that is exposed and not clicked within a preset time period.

[0163] In the embodiment, the subject (for example Figure 1 the server 105 shown) of the method for generating a ranking model can obtain the sample set from a terminal device (for example Figure 1 the terminal devices 101, 102, and 103 shown) through a network (for example Figure 1 the network 104 shown); or, the subject (for example Figure 1 the terminal devices 101, 102, and 103 shown) of the method for generating a ranking model can obtain the sample set locally.

[0164] In step 602, the sample set is input into a preset target model to obtain a first prediction result corresponding to the preset target model.

[0165] In step 603, the sample set is input into a ranking model to obtain a second prediction result corresponding to the ranking model.

[0166] In step 604, a loss function is determined according to the first prediction result, the label of the sample, and the second prediction result.

[0167] In the embodiment, the execution subject can determine the loss function according to the first prediction result, the label of the sample, and the second prediction result. The loss function is used to iteratively adjust the parameters of the learning network.

[0168] In step 605, the parameters of the ranking model are iteratively adjusted by using the loss function, and a trained ranking model is obtained.

[0169] In the embodiment, the execution subject can iteratively adjust the parameters of the ranking model by using the loss function in step 605 until a preset iteration stop condition is met, so as to obtain the trained ranking model. The stop condition can be determined according to the accuracy of the ranking model or manually set.

[0170] It should be noted that step 602 and step 603 can be executed simultaneously, or step 603 can be executed first and then step 602 can be executed, or step 602 can be executed first and then step 603 can be executed.

[0171] In the embodiment, the specific operations of steps 601, 602, and 603 are basically the same as the operations of steps 301, 302, and 303 in the embodiment shown in Figure 3 Therefore, details are not repeated here.

[0172] As can be seen from Figure 6 , compared with the embodiment corresponding to Figure 3 , the method 600 for generating the ranking model in the embodiment uses the first prediction result output by the preset target model to supervise the training of the ranking model, so as to improve the accuracy of the ranking model in identifying novel items.

[0173] In some optional implementation manners of the embodiment, iteratively adjusting the parameters of the ranking model by using the first prediction result, the label of the sample, and the second prediction result to obtain the trained ranking model includes: determining the loss function according to the first prediction result, the label of the sample, and the second prediction result; and iteratively adjusting the parameters of the ranking model by using the loss function to obtain the trained ranking model.

[0174] In the implementation manner, the execution subject obtains the loss function by using the first prediction result, the label of the sample, and the second prediction result; and then iteratively adjusts the parameters of the ranking model according to the loss function to obtain the trained ranking model.

[0175] In the implementation manner, the execution subject can supervise the training of the ranking model according to the first prediction result, so as to improve the performance of the ranking model in identifying novel items.

[0176] In some optional implementations of the present embodiment, the parameters of the ranking model include a first weight and a second weight; and the method of generating the ranking model further includes: updating the weights of the trained ranking model by using the demand quantity of the second type of items and a preset demand quantity threshold.

[0177] In the present implementation, the execution subject can also update the weights of the trained ranking model when the demand quantity of the second type of items does not satisfy the preset demand quantity threshold. The above-mentioned not satisfying can be that the demand quantity of the second type of items is less than the preset demand quantity threshold. The demand quantity can be used to represent the demand degree of the second type of items by the user.

[0178] It should be noted that the preset demand quantity threshold can be set according to the demand of the user or the rough ranking accuracy of the ranking model.

[0179] In the present implementation, the execution subject can adjust the weights of the trained ranking model according to the demand quantity of the second type of items and the preset demand quantity threshold.

[0180] In some optional implementations of the present embodiment, the demand quantity of the second type of items is determined based on the following steps: determining the demand quantity of the first type of items according to the dot product of the prediction result of the first sub-network and the prediction result of the third sub-network; and determining the demand quantity of the second type of items according to the dot product of the prediction result of the second sub-network and the prediction result of the fourth sub-network; determining the demand quantity of the second type of items according to the ratio between the demand quantity of the first type of items and the corresponding first weight and the demand quantity of the second type of items and the corresponding second weight; and updating the weights of the trained ranking model by using the demand quantity of the second type of items and a preset demand quantity threshold, including: in response to the demand quantity of the second type of items not satisfying the preset demand quantity threshold, updating the first weight and / or the second weight of the trained ranking model until the updated demand quantity of the second type of items satisfies the preset demand quantity threshold.

[0181] In the present implementation, the execution subject can determine the demand quantity of the first type of items according to the dot product of the prediction result of the first sub-network and the prediction result of the third sub-network; and determine the demand quantity of the second type of items according to the dot product of the prediction result of the second sub-network and the prediction result of the fourth sub-network; and then determine the demand quantity of the second type of items according to the ratio between the demand quantity of the first type of items and the corresponding first weight and the demand quantity of the second type of items and the corresponding second weight; and update the weights of the trained ranking model by using the demand quantity of the second type of items and a preset demand quantity threshold, including: in response to the demand quantity of the second type of items not satisfying the preset demand quantity threshold, updating the first weight and / or the second weight of the trained ranking model until the updated demand quantity of the second type of items satisfies the preset demand quantity threshold.

[0182] In the present implementation, the two task towers on the user side are a user side common click task tower (i.e., the first sub-network) and a user side novel click task tower (i.e., the second sub-network), and the two task towers on the item side are an item side common click task tower (i.e., the third sub-network) and an item side novel click task tower (i.e., the fourth sub-network). The first demand amount can be obtained by point multiplication of the prediction result output by the user side common click task tower and the prediction result output by the item side common click task tower. Then, the second demand amount can be obtained by point multiplication of the prediction result output by the user side novel click task tower and the prediction result output by the item side novel click task tower. Then, the demand amount of the second type of item is determined by the ratio between the first demand amount and the corresponding first weight and the second demand amount and the corresponding second weight. The ranking model can be updated by adjusting the first weight and / or the second weight to obtain an optimal model, so as to improve the recognition accuracy of the ranking model for novel items.

[0183] With reference to the foregoing Figure 7 , a schematic diagram 700 of one embodiment of an item ranking method according to the present application is shown. The item ranking method can include the following steps:

[0184] Step 701, attribute data of a plurality of items and behavior data of the plurality of items are obtained.

[0185] In the present embodiment, the execution subject of the item ranking method (for example Figure 1 , the terminal device 101, 102, 103 shown) can obtain attribute data of a plurality of items and behavior data of the plurality of items.

[0186] Here, the attribute data of the item can be data related to the attributes of the item, such as specifications, place of origin, supplier, brand, net weight, shelf life, variety, etc. The behavior data of the item can include at least one of the following: a user's operation behavior category for the item, time information sent by the operation behavior, and the operation behavior category can be set by specific implementation scenarios and domain experience.

[0187] In one example, the behavior data can be an operation related to clicking on an item, such as clicking on the item, ordering the item, browsing the item, etc.

[0188] In the present embodiment, before obtaining the attribute data of a plurality of items and the behavior data of the plurality of items, the item ranking method further includes:

[0189] Obtaining attribute data of a plurality of items and behavior data of the plurality of items recalled according to item search information.

[0190] In the embodiment, the execution subject can first obtain the item search information, and then recall attribute data of multiple items and behavior data of the multiple items according to the item search information. The item search information can be a keyword input by a user on an interface of a search application of the execution subject or a keyword input by voice, for example, "winter gloves".

[0191] In step 702, the attribute data of each item and the behavior data of each item are respectively input into a pre-trained ranking model to obtain a prediction result corresponding to each item, wherein the prediction result corresponding to each item includes a target demand quantity of each item.

[0192] In the embodiment, the execution subject can input the attribute data of each item and the behavior data of each item into a ranking model generated by a corresponding method, respectively, to obtain a prediction result corresponding to each item, which can include a target demand quantity corresponding to each item. Figure 2~Figure 6

[0193] In step 703, the multiple items are ranked according to the target demand quantity of each item to obtain a ranking result.

[0194] In the embodiment, the ranking model is used to predict the demand quantity of the items, so that the items can be ranked according to the predicted demand quantity.

[0195] In the embodiment, the execution subject can rank the multiple items according to the target demand quantity of each item to obtain a ranking result.

[0196] In one example, the execution subject can also present the ranking result on a display screen of the execution subject to recommend the items presented on the display screen to a user.

[0197] In some optional implementations of the embodiment, the prediction result corresponding to each item further includes a click label of each item, wherein the click label is used to represent whether each item is an item exposed before a preset time point and not clicked.

[0198] The attribute data of each item and the behavior data of each item are respectively input into a pre-trained ranking model to obtain a prediction result corresponding to each item, which can include:

[0199] The behavior data of each item is input into a first sub-network and a second sub-network included in the operation behavior network of the ranking model to obtain a prediction result corresponding to the first sub-network and a prediction result corresponding to the second sub-network; and

[0200] ​The attribute data of each item is input into a third subnetwork and a fourth subnetwork included in the item attribute network of the ranking model to obtain a prediction result corresponding to the third subnetwork and a prediction result corresponding to the fourth subnetwork.

[0201] The target demand quantity of each item is determined according to the prediction result corresponding to the first subnetwork and the prediction result corresponding to the third subnetwork, and according to the prediction result corresponding to the second subnetwork and the prediction result corresponding to the third subnetwork.

[0202] In the implementation, the execution subject can input the behavior data of each item into a first subnetwork and a second subnetwork included in the operation behavior network of the ranking model to obtain a prediction result corresponding to the first subnetwork and a prediction result corresponding to the second subnetwork; then input the attribute data of each item into a third subnetwork and a fourth subnetwork included in the item attribute network of the ranking model to obtain a prediction result corresponding to the third subnetwork and a prediction result corresponding to the fourth subnetwork; and then determine the target demand quantity of each item according to the prediction result corresponding to the first subnetwork and the prediction result corresponding to the third subnetwork, and according to the prediction result corresponding to the second subnetwork and the prediction result corresponding to the third subnetwork.

[0203] In the embodiment, the target demand quantity of each item can be determined according to the prediction result corresponding to the first subnetwork and the prediction result corresponding to the third subnetwork, and according to the prediction result corresponding to the second subnetwork and the prediction result corresponding to the third subnetwork.

[0204] In some optional implementations of the embodiment, the target demand quantity of each item is determined according to the dot product of the prediction result corresponding to the first subnetwork and the prediction result corresponding to the third subnetwork, and according to the dot product of the prediction result corresponding to the second subnetwork and the prediction result corresponding to the third subnetwork; the first demand quantity of each item is determined according to the dot product of the prediction result corresponding to the first subnetwork and the prediction result corresponding to the third subnetwork; the second demand quantity of each item is determined according to the dot product of the prediction result corresponding to the second subnetwork and the prediction result corresponding to the third subnetwork; and the target demand quantity of each item is determined according to the ratio of the first demand quantity of each item to the second demand quantity of each item.

[0205] In the implementation, the first demand quantity of each item is determined according to the dot product of the prediction result corresponding to the first subnetwork and the prediction result corresponding to the third subnetwork, and the second demand quantity of each item is determined according to the dot product of the prediction result corresponding to the second subnetwork and the prediction result corresponding to the third subnetwork; and then the target demand quantity of each item is determined according to the ratio of the first demand quantity of each item to the second demand quantity of each item.

[0206] In some optional implementations of the embodiment, the target demand quantity of each item is determined according to a ratio of the first demand quantity of each item and the second demand quantity of each item, including: determining the target demand quantity of each item according to a ratio between the first demand quantity of each item and the corresponding first weight and the second demand quantity of each item and the corresponding second weight.

[0207] In the implementation, the corresponding first demand quantity can be obtained according to the first demand quantity of each item and the corresponding first weight, then the corresponding second demand quantity can be obtained according to the second demand quantity of each item and the corresponding second weight, and finally the target demand quantity of each item can be determined according to a ratio between the corresponding first demand quantity and the corresponding second demand quantity.

[0208] With reference to the foregoing description of the method for generating a ranking model, the method for generating a ranking model can be applied to the following application scenario. Figure 8 FIG. 8 shows a schematic diagram 800 of one application scenario of the method for generating a ranking model according to the present application.

[0209] With reference to the foregoing description of the method for generating a ranking model, the method for generating a ranking model can be applied to the following application scenario. Figure 9 The application scenario is described as follows.

[0210] In step 801, an original sample set is obtained, and then the original sample set is filtered to obtain a sample set.

[0211] In the embodiment, for a certain user, a novel item is an item of the same category (i.e., a second category) that has not been clicked by the user before a certain period of time (i.e., a preset time period).

[0212] It should be noted that the second category (i.e., the novel item) can be an item that is clicked for the first time within the preset time period.

[0213] In one example, the above execution subject can filter the original sample set according to the category dimension and / or the multi-time dimension to obtain the sample set in step 801.

[0214] From the category dimension, the multi-level category dimension of the item can be the two-level or three-level category dimension of the item on the shopping platform. The features of different category dimensions enable the model to learn the relationship between the current category clicked by the user and the category clicked by the user in the recent period of time.

[0215] From the time dimension, the above execution subject can train the model according to the long-term click feature, the short-term click feature, and the real-time click feature of the user. The long-term click feature of the user can reflect the long-term behavior habit of the user.

[0216] It should be noted that the user browsing depth is related to the number of categories of exposed items within the preset time period.

[0217] In one example, the long-term click feature of the user can be clicks in 60 days, and the short-term click feature can be clicks in 30 days.

[0218] In the embodiment, the above features can effectively improve the estimation ability of the ranking model for novel items of interest to the user.

[0219] At step 802, a sample set is obtained, the samples in the sample set including attribute sample data of items and behavior sample data of items, the items including clicked items and non-clicked items, the clicked items being items exposed and clicked in a preset time period, the non-clicked items being items exposed and not clicked in the preset time period, the clicked items further including first-type items and second-type items different in category, the first-type items being items clicked before the preset time period, and the second-type items being items first clicked in the preset time period.

[0220] In the embodiment, the items can be divided into clicked items and non-clicked items, the clicked items being items exposed and clicked in a preset time period, and the non-clicked items being items exposed and not clicked in the preset time period; the clicked items further including first-type items and second-type items different in category, the first-type items being items clicked before the preset time period (i.e., non-novel items), and the second-type items being items first clicked in the preset time period (i.e., novel items).

[0221] In the embodiment, the above execution subject can be configured to train the ranking model according to the following steps. Figure 9 The ranking model is trained according to the sample set in step 802.

[0222] At step 803, the ranking model is trained using the sample set in step 802.

[0223] In the embodiment, the model structure adopted is a knowledge distillation structure, i.e., the precision of a teacher model (i.e., a preset target model) is effectively brought to the ranking model through knowledge distillation to effectively bring information gain to the ranking model.

[0224] It should be noted that the ranking model is a coarse ranking module in an item recommendation system, and the subject model can be a variant application of a double tower model (DSSM).

[0225] In the embodiment, the coarse ranking module in the item recommendation system needs to balance the performance and efficiency of the ranking model. In order to improve the efficiency of the ranking model, the coarse ranking module separates the user side from the item side, uploads the behavior sample data corresponding to the user side network (i.e., the operation behavior network) to the server for real-time inference to obtain the corresponding prediction result; pre-calculates the output vector corresponding to the attribute sample data of the item side network (i.e., the item attribute network), and stores it in the hbase table. When the attribute sample data corresponding to the item side network needs to be inferred, the prediction result corresponding to the attribute sample data can be obtained from the hbase table. Separating the user side and the item side can greatly reduce the overall delay of the ranking model.

[0226] In one example, the user side network is modified into a multi-task model structure (i.e., a first sub-network and a second sub-network). The user side features (i.e., the behavior sample data corresponding to the first sub-network) are input into the first embedding layer to obtain the vector of the behavior sample data corresponding to the first sub-network; then, the vector of the behavior sample data corresponding to the first sub-network is input into the first feature fusion layer (i.e., “concat” in Figure 9 ), to obtain a fusion vector; then, the fusion vector is input into the Experts network (i.e., a plurality of first Experts network layers) for cross and learning of related features. The Experts network can be used to extract different dimensions of interest from the fusion vector. Then, through the control of the gate network (i.e., the first gate network layer, such as gateA and gateB), the features extracted by the Experts network are output to the first multi-layer perceptron layer (which can include two Relu (128)) through different weights.

[0227]

[0228] wherein, is a different Experts network, is a different gate network, and .

[0229] In the embodiment, when constructing the upper task tower, two multi-layer perceptrons (i.e., a first multi-layer perceptron layer and a second multi-layer perceptron layer) are used. The first multi-layer perceptron layer includes Relu (128) and Relu (256) in Figure 9 , and the second multi-layer perceptron layer includes Relu (128) and Relu (256) in Figure 9 . Finally, the user side vector of each task is output, which can represent the user's preference for new items.

[0230] In one example, the attribute sample data corresponding to the item side network (i.e., the item attribute network) is input into a second embedding layer to obtain a vector corresponding to the attribute sample data, and the vector is input into two different task towers (i.e., a third multi-layer perceptron layer including Relu (128) and Relu (256) in the third multi-layer perceptron layer, and a fourth multi-layer perceptron layer including Relu (128) and Relu (256) in the fourth multi-layer perceptron layer) respectively, and finally an item side vector of each task is output, which can be used to represent the attributes of the item. Figure 9 Figure 9

[0231] It should be noted that the above two task towers on the user side can be a user side non-novel click task tower (i.e., the first sub-network) and a user side novel click task tower (i.e., the first sub-network), and the two task towers on the item side are an item side non-novel click task tower (i.e., the third sub-network) and an item side novel click task tower (i.e., the fourth sub-network). The vector output by the user side non-novel click task tower is dot multiplied with the vector output by the item side non-novel click task tower to obtain the demand of the first type of item, which can be the demand degree of the ranking model for non-novel items. Similarly, the vector output by the user side novel click task tower is dot multiplied with the vector output by the item side novel click task tower to obtain the demand of the second type of item. Then, through the ratio between the first weight corresponding to the first demand and the second weight corresponding to the first demand, a target demand is finally output by the ranking model, which can be used to represent the demand degree of the second type of item.

[0232] In one example, the ratio of the first weight to the second weight can also be adjusted to further adjust the number of novel items in the top 2000 of the rough ranking module. It should be noted that the above 20000 is an example.

[0233] In this embodiment, in order to depict the preferences of users for non-novel items (i.e., the first type of item) and novel items (i.e., the second type of item) through different task towers, for the same training sample, in the non-novel click task tower, the exposure non-click sample is a negative sample, and the non-novel click sample and the novel click sample are positive samples. In the novel click task tower, the exposure non-click sample and the non-novel click sample are negative samples, and the novel click sample is a positive sample. Through the above setting, the novel click task tower can efficiently identify novel click items that users are more interested in.

[0234] In one example, for the non-novel click task tower on the user side (i.e., the first sub-network), the first positive sample includes behavior sample data of the first type of item and behavior sample data of the second type of item, and the first negative sample includes behavior sample data of non-click items.

[0235] ​​For the non-novelty click task tower on the item side (i.e., the third sub-network), the third positive sample includes the attribute sample data of the first type of item and the attribute sample data of the second type of item, and the third negative sample includes the attribute sample data of the non-clicked item.

[0236] For the novelty click task tower on the user side (i.e., the second sub-network), the second positive sample includes the behavior sample data of the second type of item, and the second negative sample includes the behavior sample data of the non-clicked item and the behavior sample data of the first type of item.

[0237] For the novelty click task tower on the item layer (i.e., the fourth sub-network), the fourth positive sample includes the attribute sample data of the second type of item, and the fourth negative sample includes the attribute sample data of the non-clicked item and the attribute sample data of the first type of item.

[0238] In this embodiment, the ranking model has a high precision judgment ability for the novelty clicked item that is more interesting to the user.

[0239] In this embodiment, the coarse ranking module in the item recommendation system adopts a double tower structure, which can greatly improve the model efficiency and reduce the delay of the overall recommendation system. However, due to the separation of the user side and the item side, the ranking model cannot effectively utilize the user-item cross features, and the user side features and the item side features are not interacted in the model, which leads to a performance upper limit of the double tower structure model. In order to improve the performance and effectively utilize the user-item cross features, the teacher model in this embodiment adopts a double task model. The structure is generally consistent with the user side of the ranking model. The difference lies in that the input of the user side of the ranking model is only the user side dense features and sparse features. The input of the teacher model is the user side, item side dense features and sparse features, and cross features that the ranking model cannot utilize (i.e., features that the teacher model can effectively utilize while the ranking model cannot).

[0240] In this embodiment, the Logits distillation method is used to optimize the ranking model, that is, the teacher model supervises the ranking model to learn the generalization ability of the teacher model through the prediction results of the same sample.

[0241] In one example, the non-novelty click task tower of the teacher model (i.e., normal_ctr) optimizes the non-novelty click task tower of the ranking model through Logits distillation, and the novelty click task tower of the teacher model (i.e., noval_ctr) optimizes the novelty click task tower of the ranking model through Logits distillation. Wherein, the Loss of each task tower is:

[0242]

[0243] Wherein, is the output of the ranking model, Output the teacher model, Output the label of the sample (positive sample: 1, negative sample: 0), Output the distillation temperature hyperparameter, Output the distillation coefficient, X * Output the dominant feature, so the original loss function of the ranking model is:

[0244]

[0245] The loss function of the teacher model is:

[0246]

[0247] The distillation loss function and the actual loss function of the ranking model are:

[0248]

[0249]

[0250] In this embodiment, the teacher model and the ranking model are trained cooperatively, so that the ranking model can not only learn the generalization ability of the teacher model, but also further learn the overall changes during the training of the teacher model. At the same time, by setting reasonable distillation coefficients and distillation temperatures, the performance of the ranking model will be further improved.

[0251] It should be noted that the temperature and the distillation coefficient can be set according to the accuracy of the ranking model. Wherein, too low temperature can learn more knowledge from negative samples, too high temperature can ignore the noise influence brought by negative samples, higher coefficient can make the ranking model learn more generalization ability from the teacher model, but also can ignore the influence of real samples, therefore, appropriate temperature and distillation coefficient can be selected according to the accuracy.

[0252] Step 804, evaluate the ranking model.

[0253] In this embodiment, the student model in the ranking model trained in step 804 is evaluated, and the offline performance of each storage point model is evaluated.

[0254] Specifically, the non-novel click weight (i.e., the first weight) and the novel click weight (i.e., the second weight) are set according to experience or randomly to obtain a plurality of storage point models; then, for the plurality of storage point models, all non-novel click weights and novel click weights are traversed, and the plurality of storage point models are evaluated offline to select the optimal model from the plurality of storage point models. Wherein, the sum of the non-novel click weight and the novel click weight is 1.

[0255] It should be noted that in the process of evaluating the ranking model, the first weight and the second weight can be set according to experience, and all the first weights and the second weights can be traversed until the optimal model is determined.

[0256] In one example, the demand quantity of the second type of item and the preset demand quantity threshold are used to update the first weight and / or the second weight of the trained ranking model.

[0257] In this embodiment, the optimal ranking model can be selected through two evaluations.

[0258] In step 805, the first weight and the second weight of the optimal model are used as the first weight and the second weight of the trained ranking model.

[0259] In this embodiment, the trained ranking model in step 805 provides personalized novel items for users, which can improve the diversity of the item recommendation system. Specifically:

[0260] (1) A double-task model (i.e., the first sub-network and the second sub-network) of novel items is constructed to depict different preference degrees of users for novel items and non-novel items. The double-task model can distinguish whether an item is novel and whether a user likes to click, etc.

[0261] (2) The coarse ranking module (i.e., the trained ranking model) in the item recommendation system can filter out novel items of interest to users from candidate items and provide them to the fine ranking, which expands the candidate pool for subsequent novel item recommendation of the recommendation system and improves the upper limit.

[0262] (3) The sample composed of the attribute sample data of the item and the behavior sample data of the item is used to train the ranking model, where the item includes clicked items and non-clicked items. The clicked item is an item that is exposed and clicked within a preset time period, and the non-clicked item is an item that is exposed and not clicked within a preset time period. This can improve the accuracy of the ranking model in identifying novel items.

[0263] Further reference Figure 10 , as an implementation of the method shown in the above figures, the application discloses one embodiment of a device for generating a ranking model. The device embodiment corresponds to the method embodiment shown in Figure 2 , and the device can be applied to various electronic devices.

[0264] As Figure 10As shown, the embodiment of the present application provides a device 1000 for generating a ranking model, the device 1000 comprising: a sample obtaining module 1001 and a model training module 1002. The sample obtaining module 1001 is configured to obtain a sample set, wherein the samples in the sample set comprise attribute sample data of an item and behavior sample data of the item, the item comprising a clicked item and a non-clicked item, the clicked item being an item exposed and clicked within a preset time period, and the non-clicked item being an item exposed and not clicked within the preset time period; and the model training module 1002 is configured to train a machine learning model using the sample set to obtain the ranking model.

[0265] In the device 1000 for generating a ranking model, the specific processing of the sample obtaining module 1001 and the model training module 1002 and the technical effects brought by the same can be respectively referred to Figure 2 corresponding to steps 201-202 in the embodiment.

[0266] In some embodiments, the model training module 1002 comprises: a first obtaining unit configured to input the sample set into a preset target model to obtain a first prediction result corresponding to the preset target model; a second obtaining unit configured to input the sample set into the ranking model to obtain a second prediction result corresponding to the ranking model; and a model training unit configured to iteratively adjust parameters of the ranking model using the first prediction result, labels of the samples, and the second prediction result to obtain a trained ranking model.

[0267] In some embodiments, the ranking model comprises an operation behavior network and an item attribute network; the second obtaining unit comprises: a first obtaining subunit configured to input the behavior sample data into the operation behavior network to obtain a prediction result corresponding to the operation behavior network; and a second obtaining subunit configured to input the attribute sample data into the item attribute network to obtain a prediction result corresponding to the item attribute network; and a first determining subunit configured to determine the second prediction result according to the prediction result corresponding to the operation behavior network and the prediction result corresponding to the item attribute network.

[0268] In some embodiments, the operation behavior network comprises a first sub-network and a second sub-network, the clicked items comprise: first category items and second category items different in category, the first category items being items clicked before a preset time period, and the second category items being items first clicked within the preset time period; the first obtaining sub-unit is further configured to: input first positive samples and first negative samples into the first sub-network to obtain a prediction result corresponding to the first sub-network, wherein the first positive samples comprise behavior sample data of the first category items and behavior sample data of the second category items, and the first negative samples comprise behavior sample data of non-clicked items; and input second positive samples and second negative samples into the second sub-network to obtain a prediction result corresponding to the second sub-network, wherein the second positive samples comprise behavior sample data of the second category items, and the second negative samples comprise behavior sample data of non-clicked items and behavior sample data of the first category items; and take the prediction result corresponding to the first sub-network and the prediction result corresponding to the second sub-network as the prediction result corresponding to the operation behavior network.

[0269] In some embodiments, the first sub-network and the second sub-network share a first input layer, the first sub-network further comprises a first multi-layer perceptron layer connected to an output end of the first input layer, and the second sub-network further comprises a second multi-layer perceptron layer connected to the output end of the first input layer.

[0270] In some embodiments, the first input layer comprises: a first embedding layer, a first feature fusion layer, a plurality of first expert network layers, and a first gate network layer, the first gate network layer being configured to control at least one of the plurality of first expert network layers to be connected to an output end of the first feature fusion layer, and an input end of the first feature fusion layer being connected to an output end of the first embedding layer.

[0271] In some embodiments, the item attribute network comprises a third sub-network and a fourth sub-network; the second obtaining sub-unit is further configured to: input third positive samples and third negative samples into the third sub-network to obtain a prediction result corresponding to the third sub-network, wherein the third positive samples comprise attribute sample data of the first category items and attribute sample data of the second category items, and the third negative samples comprise attribute sample data of non-clicked items; and input fourth positive samples and fourth negative samples into the fourth sub-network to obtain a prediction result corresponding to the fourth sub-network, wherein the fourth positive samples comprise attribute sample data of the second category items, and the fourth negative samples comprise attribute sample data of non-clicked items and attribute sample data of the first category items; and take the prediction result corresponding to the third sub-network and the prediction result corresponding to the fourth sub-network as the prediction result corresponding to the item attribute network.

[0272] In some embodiments, the third sub-network and the fourth sub-network share the second input layer, the third sub-network further comprises a third multi-layer perceptron layer connected to an output end of the second output layer, and the fourth sub-network further comprises a fourth multi-layer perceptron layer connected to the output end of the second output layer.

[0273] In some embodiments, the second input layer comprises a second embedding layer and a second feature fusion layer, an input end of the second feature fusion layer being connected to an output end of the second embedding layer.

[0274] In some embodiments, the preset target model comprises a fifth sub-network and a sixth sub-network; the first obtaining unit is further configured to: input the sample set into the fifth sub-network and the sixth sub-network respectively, to obtain a prediction result corresponding to the fifth sub-network and a prediction result corresponding to the sixth sub-network; and take the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network as the first prediction result corresponding to the preset target model.

[0275] In some embodiments, the fifth sub-network comprises a third embedding layer, a feature extraction network layer and a fifth multi-layer perceptron layer connected in sequence, and the sixth sub-network comprises a fourth embedding layer, a feature extraction network layer and a sixth multi-layer perceptron layer connected in sequence.

[0276] In some embodiments, the feature extraction network layer comprises a plurality of second expert network layers and a second gate network layer, the second gate network layer being configured to control an input end of at least one second expert network layer in the plurality of second expert network layers to be connected to an output end of the third embedding layer and an output end of the fourth embedding layer.

[0277] In some embodiments, the second training unit is further configured to: determine a loss function according to the first prediction result, the label of the sample and the second prediction result; and iteratively adjust parameters of the ranking model by using the loss function to obtain a trained ranking model.

[0278] In some embodiments, the parameters of the ranking model comprise a first weight and a second weight; and the apparatus further comprises a weight updating module configured to update the weights of the trained ranking model by using the demand quantity of the second type of item and a preset demand quantity threshold.

[0279] In some embodiments, the apparatus further comprises: a first demand amount determining module configured to determine the demand amount of the first type of item according to the dot product of the prediction result of the first sub-network and the prediction result of the third sub-network; a second demand amount determining module configured to determine the demand amount of the second type of item according to the dot product of the prediction result of the second sub-network and the prediction result of the fourth sub-network; a third demand amount determining module configured to determine the demand amount of the second type of item according to the ratio between the demand amount of the first type of item and the corresponding first weight and the demand amount of the second type of item and the corresponding second weight; and a weight updating module further configured to: in response to the demand amount of the second type of item not satisfying a preset demand amount threshold, update the first weight and / or the second weight of the trained ranking model until the updated demand amount of the second type of item satisfies the preset demand amount threshold.

[0280] Further referring to Figure 11 , as an implementation of the method shown in the above figures, the present application discloses an embodiment of an item ranking apparatus, which corresponds to the method embodiment shown in Figure 7 , and the apparatus can be applied in various electronic devices.

[0281] As shown in Figure 11 , the embodiments of the present application provide an item ranking apparatus 1100, which comprises a data obtaining module 1101, a result obtaining module 1102 and an item ranking module 1103. The data obtaining module 1101 is configured to obtain attribute data of a plurality of items and behavior data of the plurality of items. The result obtaining module 1102 is configured to input the attribute data of each item and the behavior data of each item into a pre-trained ranking model respectively to obtain a corresponding prediction result of each item, wherein the corresponding prediction result of each item comprises a target demand amount of each item. The item ranking module 1103 is configured to rank the plurality of items according to the target demand amount of each item to obtain a ranking result.

[0282] In the present embodiment, the data obtaining module 1101, the result obtaining module 1102 and the item ranking module 1103 in the item ranking apparatus 1100 and their specific processing and the technical effects brought by them can be respectively referred to steps 701-703 in the corresponding embodiments. Figure 7

[0283] ​In some embodiments, the prediction result for each item further includes a click tag for each item, wherein the click tag is used to characterize whether each item was exposed and not clicked before a preset time point; and the result obtaining module 1102 includes: a first obtaining module configured to input the behavior data of each item into the first sub-network and the second sub-network included in the operation behavior network of the ranking model to obtain the prediction result corresponding to the first sub-network and the prediction result corresponding to the second sub-network; and a second obtaining module configured to input the attribute data of each item into the third sub-network and the fourth sub-network included in the item attribute network of the ranking model to obtain the prediction result corresponding to the third sub-network and the prediction result corresponding to the fourth sub-network; and a demand determination module configured to determine the target demand for each item based on the prediction results corresponding to the first sub-network and the third sub-network, and based on the prediction results corresponding to the second sub-network and the third sub-network.

[0284] In some embodiments, the demand determination module includes: a first determination unit configured to determine a first demand for each item based on the dot product of the prediction results corresponding to a first sub-network and the prediction results corresponding to a third sub-network; a second determination unit configured to determine a second demand for each item based on the dot product of the prediction results corresponding to a second sub-network and the prediction results corresponding to a third sub-network; and a third determination unit configured to determine a target demand for each item based on the ratio of the first demand for each item to the second demand for each item.

[0285] In some embodiments, the third determining unit is further configured to: determine the target demand for each item based on the ratio between the first demand quantity and the corresponding first weight of each item and the second demand quantity and the corresponding second weight of each item.

[0286] like Figure 12 The diagram shown is a block diagram of an electronic device for a method of generating a sorting model or an item sorting method according to embodiments of this application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.

[0287] like Figure 12As shown, the electronic device includes one or more processors 1201, a memory 1202, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected utilizing different buses, and can be mounted on a common motherboard or otherwise installed as desired. The processor can process instructions for execution within the electronic device, including instructions stored in the memory or on the memory to display graphical information for a GUI on an external input / output device, such as a display device coupled to the interface. In other implementations, multiple processors and / or multiple buses can be employed as desired to implement these functions, and multiple memories and types of memory can be used. Also, various Figure 12 The processor 1201 is taken as an example in the embodiment.

[0288] The memory 1202 is a non-transitory computer readable storage medium provided by the present application. The memory stores instructions executable by at least one processor, so that the at least one processor executes the method for generating a ranking model or the method for ranking items provided by the present application. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to execute the method for generating a ranking model or the method for ranking items provided by the present application.

[0289] The memory 1202 is a non-transitory computer readable storage medium, which can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the method for generating a ranking model or the method for ranking items in the embodiment of the present application (for example, the program instructions / modules of the method for generating a ranking model or the method for ranking items are stored in the memory 1202). Figure 10 The sample acquisition module 1001 and the model training module 1002 shown; or Figure 11 The data acquisition module 1101, the result obtaining module 1102 and the item ranking module 1103 shown). The processor 1201 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions and modules stored in the memory 1202, that is, implements the method for generating a ranking model or the method for ranking items in the above method embodiment.

[0290] The memory 1202 can include a program region that stores an operating system, an application program required for at least one function, and a data region that stores data created according to use of the blockchain-based information processing electronic device, and the like. Further, the memory 1202 can include a high-speed random access memory, and can further include a non-transitory memory such as at least one of a magnetic disk storage device, a flash memory device, or other non-transitory solid state memory device. In some embodiments, the memory 1202 can optionally include a memory disposed remotely with respect to the processor 1201, and these remote memories can be connected to the blockchain-based information processing electronic device through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0291] The electronic device for generating a ranking model or the item ranking method can further include an input device 1203 and an output device 1204. The processor 1201, the memory 1202, the input device 1203, and the output device 1204 can be connected through a bus or other means, Figure 12 The connection through the bus is taken as an example.

[0292] The input device 1203 can receive input digital or character information, and generate key signal input related to user settings and function control of the blockchain-based information processing electronic device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, and the like. The output device 1204 can include a display device, an auxiliary lighting device (e.g., an LED), a tactile feedback device (e.g., a vibration motor), and the like. The display device can include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device can be a touch screen.

[0293] Various embodiments of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, specially designed ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0294] These computer programs (also known as programs, software, software applications or code) include machine instructions for a programmable processor, and can be implemented in a high-level procedural and / or object-oriented programming language, and / or in assembly / machine language. As used herein, the terms "machine-readable medium" "computer-readable medium" refers to any computer program product, apparatus and / or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.

[0295] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0296] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0297] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

[0298] It should be understood that the various forms of flow shown above can be used to reorder, add, or remove steps. For example, the steps recited in the present application can be performed in parallel, in series, or in a different order, as long as the desired results of the technology disclosed in the present application are achieved, which is not limited herein.

[0299] The foregoing detailed description has not been limited by a particular embodiment thereof. Rather, a variety of modifications, combinations, sub-combinations, and alternatives have been suggested, as examples of the many applications of the technology disclosed in the present application. Any modifications, equivalents, or alternatives falling within the spirit and scope of the present application are intended to be included.

Claims

1. A method for generating a ranking model, comprising: obtaining a sample set, wherein a sample in the sample set comprises attribute sample data of an item and behavior sample data of the item, the item comprises a clicked item and a non-clicked item, the clicked item is an item exposed and clicked within a preset time period, the non-clicked item is an item exposed and not clicked within the preset time period, the clicked item comprises a first type of item and a second type of item which are different in category, the first type of item is an item clicked before the preset time period, and the second type of item is an item first clicked within the preset time period; training a machine learning model using a first positive sample, a first negative sample, a second positive sample and a second negative sample in the sample set to obtain a ranking model, wherein the first positive sample comprises the behavior sample data of the first type of item and the behavior sample data of the second type of item, the first negative sample comprises the behavior sample data of the non-clicked item, the second positive sample comprises the behavior sample data of the second type of item, and the second negative sample comprises the behavior sample data of the non-clicked item and the behavior sample data of the first type of item.

2. The method of claim 1, wherein, The training of the machine learning model using the sample set to obtain the ranking model comprises: inputting the sample set into a preset target model to obtain a first prediction result corresponding to the preset target model; and inputting the sample set into the ranking model to obtain a second prediction result corresponding to the ranking model; and iteratively adjusting parameters of the machine learning model using the first prediction result, a label of the sample, and the second prediction result to obtain a trained ranking model.

3. The method of claim 2, wherein, The ranking model comprises an operation behavior network and an item attribute network. The inputting of the sample set into the ranking model to obtain the second prediction result corresponding to the ranking model comprises: inputting the behavior sample data into the operation behavior network to obtain a prediction result corresponding to the operation behavior network; and inputting the attribute sample data into the item attribute network to obtain a prediction result corresponding to the item attribute network; determining the second prediction result according to the prediction result corresponding to the operation behavior network and the prediction result corresponding to the item attribute network.

4. The method of claim 3, wherein, The operation behavior network comprises a first sub-network and a second sub-network. The inputting of the behavior sample data into the operation behavior network to obtain the prediction result corresponding to the operation behavior network comprises: inputting the first positive sample and the first negative sample into the first sub-network to obtain a prediction result corresponding to the first sub-network; and inputting the second positive sample and the second negative sample into the second sub-network to obtain a prediction result corresponding to the second sub-network; taking the prediction result corresponding to the first sub-network and the prediction result corresponding to the second sub-network as the prediction result corresponding to the operation behavior network.

5. The method of claim 4, wherein, The first sub-network and the second sub-network share a first input layer, the first sub-network further comprises a first multi-layer perceptron layer connected with an output end of the first input layer, and the second sub-network further comprises a second multi-layer perceptron layer connected with the output end of the first input layer.

6. The method of claim 5, wherein, The first input layer comprises a first embedding layer, a first feature fusion layer, a plurality of first expert network layers, and a first gate network layer for controlling input ends of at least one of the plurality of first expert network layers to be connected with an output end of the first feature fusion layer, and input ends of the first feature fusion layer are connected with an output end of the first embedding layer.

7. The method of claim 4, wherein, The item attribute network comprises a third sub-network and a fourth sub-network; The attribute sample data is input into the item attribute network to obtain a prediction result corresponding to the item attribute network, comprising: The third positive sample and the third negative sample are input into the third sub-network to obtain a prediction result corresponding to the third sub-network, wherein the third positive sample comprises attribute sample data of the first type of item and attribute sample data of the second type of item, and the third negative sample comprises attribute sample data of the non-clicked item; and The fourth positive sample and the fourth negative sample are input into the fourth sub-network to obtain a prediction result corresponding to the fourth sub-network, wherein the fourth positive sample comprises attribute sample data of the second type of item, and the fourth negative sample comprises attribute sample data of the non-clicked item and attribute sample data of the first type of item. The prediction result corresponding to the third sub-network and the prediction result corresponding to the fourth sub-network are taken as the prediction result corresponding to the item attribute network.

8. The method of claim 7, wherein, The third sub-network and the fourth sub-network share a second input layer, the third sub-network further comprises a third multi-layer perceptron layer connected with an output end of a second output layer, and the fourth sub-network further comprises a fourth multi-layer perceptron layer connected with the output end of the second output layer.

9. The method of claim 8, wherein, The second input layer comprises a second embedding layer and a second feature fusion layer, and input ends of the second feature fusion layer are connected with an output end of the second embedding layer.

10. The method of any one of claims 2-9, wherein, The preset target model comprises a fifth sub-network and a sixth sub-network; The sample set is input into the preset target model to obtain a first prediction result corresponding to the preset target model, comprising: The sample set is input into the fifth sub-network and the sixth sub-network respectively to obtain a prediction result corresponding to the fifth sub-network and a prediction result corresponding to the sixth sub-network; The prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network are taken as the first prediction result corresponding to the preset target model.

11. The method of claim 10, wherein, The fifth sub-network comprises a third embedding layer, a third feature fusion layer, a feature extraction network layer, and a fifth multi-layer perceptron layer connected in sequence, and the sixth sub-network comprises a fourth embedding layer, the third feature fusion layer, the feature extraction network layer, and a sixth multi-layer perceptron layer connected in sequence.

12. The method of claim 11, wherein, The feature extraction network layer comprises a plurality of second expert network layers and a second gate network layer, the second gate network layer being configured to control the input of at least one of the second expert network layers to be connected to the output of the third embedding layer and the output of the fourth embedding layer.

13. The method of claim 7, wherein, The parameters of the ranking model are iteratively adjusted using the first prediction result, the label of the sample, and the second prediction result to obtain a trained ranking model, including: A loss function is determined according to the first prediction result, the label of the sample, and the second prediction result; The parameters of the ranking model are iteratively adjusted using the loss function to obtain a trained ranking model.

14. The method of claim 13, wherein, The parameters of the ranking model include first weights and second weights; the method further comprises: The weights of the trained ranking model are updated using the demand quantity of the second type of items and a preset demand quantity threshold.

15. The method of claim 14, wherein, The demand quantity of the second type of items is determined based on the following steps: The demand quantity of the first type of items is determined according to the dot product of the prediction result of the first sub-network and the prediction result of the third sub-network; and The demand quantity of the second type of items is determined according to the dot product of the prediction result of the second sub-network and the prediction result of the fourth sub-network; The demand quantity of the second type of items is determined according to the ratio between the demand quantity of the first type of items and the corresponding first weights and the demand quantity of the second type of items and the corresponding second weights; The weights of the trained ranking model are updated using the demand quantity of the second type of items and a preset demand quantity threshold, including: In response to the demand quantity of the second type of items not meeting the preset demand quantity threshold, the first weights and / or the second weights of the trained ranking model are updated until the updated demand quantity of the second type of items meets the preset demand quantity threshold.

16. An item ranking method, comprising: Obtaining attribute data of a plurality of items and behavior data of the plurality of items; Inputting the attribute data of each item and the behavior data of the each item into a ranking model generated by the method of any one of claims 1-15 to obtain a corresponding prediction result of the each item, wherein the corresponding prediction result of the each item includes a target demand quantity of the each item; Ranking the plurality of items according to the target demand quantity of the each item to obtain a ranking result.

17. The method of claim 16, wherein, The corresponding prediction result of the each item further includes a click label of the each item, wherein the click label is used to represent whether the each item is an item that has been exposed but not clicked before a preset time point; and The attribute data of each item and the behavior data of the each item are inputted into the ranking model to obtain the corresponding prediction result of the each item, including: The behavior data of the each item is inputted into the first sub-network and the second sub-network included in the operation behavior network of the ranking model to obtain the corresponding prediction result of the first sub-network and the corresponding prediction result of the second sub-network; and The behavior data of the each item is inputted into the first sub-network and the second sub-network included in the operation behavior network of the ranking model to obtain the corresponding prediction result of the first sub-network and the corresponding prediction result of the second sub-network; and inputting the attribute data of each item into a third subnetwork and a fourth subnetwork included in an item attribute network of the ranking model, obtaining a prediction result corresponding to the third subnetwork and a prediction result corresponding to the fourth subnetwork; determining a target demand quantity of each item according to the prediction result corresponding to the first subnetwork and the prediction result corresponding to the third subnetwork, and according to the prediction result corresponding to the second subnetwork and the prediction result corresponding to the third subnetwork.

18. The method of claim 17, wherein, The determining a target demand quantity of each item according to the prediction result corresponding to the first subnetwork and the prediction result corresponding to the third subnetwork, and according to the prediction result corresponding to the second subnetwork and the prediction result corresponding to the third subnetwork, includes: determining a first demand quantity of each item according to a dot product of the prediction result corresponding to the first subnetwork and the prediction result corresponding to the third subnetwork; and determining a second demand quantity of each item according to a dot product of the prediction result corresponding to the second subnetwork and the prediction result corresponding to the third subnetwork; determining a target demand quantity of each item according to a ratio of the first demand quantity of each item and the second demand quantity of each item.

19. The method of claim 18, wherein, The determining a target demand quantity of each item according to a ratio of the first demand quantity of each item and the second demand quantity of each item, includes: determining a target demand quantity of each item according to a ratio between the first demand quantity of each item and a corresponding first weight and the second demand quantity of each item and a corresponding second weight.

20. An apparatus for generating a ranking model, comprising: a sample obtaining module configured to obtain a sample set, wherein a sample in the sample set comprises attribute sample data of an item and behavior sample data of the item, the item comprises a clicked item and a non-clicked item, the clicked item is an item exposed and clicked within a preset time period, the non-clicked item is an item exposed and not clicked within the preset time period, the clicked item comprises a first type of item and a second type of item which are different in category, the first type of item is an item clicked before the preset time period, and the second type of item is an item first clicked within the preset time period; a model training module configured to train a machine learning model by using a first positive sample, a first negative sample, a second positive sample and a second negative sample in the sample set to obtain a ranking model, wherein the first positive sample comprises the behavior sample data of the first type of item and the behavior sample data of the second type of item, the first negative sample comprises the behavior sample data of the non-clicked item, the second positive sample comprises the behavior sample data of the second type of item, and the second negative sample comprises the behavior sample data of the non-clicked item and the behavior sample data of the first type of item.

21. The apparatus of claim 20, wherein, The model training module comprises: a first obtaining unit configured to input the sample set into a preset target model to obtain a first prediction result corresponding to the preset target model; and a second obtaining unit configured to input the first prediction result into the ranking model to obtain a second prediction result corresponding to the ranking model. The second obtaining unit is configured to input the sample set into the ranking model to obtain a second prediction result corresponding to the ranking model. The model training unit is configured to iteratively adjust parameters of the ranking model by using the first prediction result, the label of the sample, and the second prediction result, to obtain a trained ranking model.

22. The apparatus of claim 21, wherein, The ranking model comprises an operation behavior network and an item attribute network. The second obtaining unit comprises: The first obtaining subunit is configured to input the behavior sample data into the operation behavior network to obtain a prediction result corresponding to the operation behavior network. The second obtaining subunit is configured to input the attribute sample data into the item attribute network to obtain a prediction result corresponding to the item attribute network. The first determining subunit is configured to determine the second prediction result according to the prediction result corresponding to the operation behavior network and the prediction result corresponding to the item attribute network.

23. The apparatus of claim 22, wherein, The operation behavior network comprises a first subnetwork and a second subnetwork. The first obtaining subunit is further configured to: input first positive samples and first negative samples into the first subnetwork to obtain a prediction result corresponding to the first subnetwork; and input second positive samples and second negative samples into the second subnetwork to obtain a prediction result corresponding to the second subnetwork. The prediction result corresponding to the first subnetwork and the prediction result corresponding to the second subnetwork are taken as the prediction result corresponding to the operation behavior network. The first subnetwork and the second subnetwork share a first input layer, the first subnetwork further comprises a first multi-layer perceptron layer connected to an output end of the first input layer, and the second subnetwork further comprises a second multi-layer perceptron layer connected to the output end of the first input layer.

24. The apparatus of claim 23, wherein, The first input layer comprises a first embedding layer, a first feature fusion layer, a plurality of first expert network layers, and a first gate network layer, the first gate network layer is used to control an input end of at least one first expert network layer in the plurality of first expert network layers to be connected to an output end of the first feature fusion layer, and an input end of the first feature fusion layer is connected to an output end of the first embedding layer.

25. The apparatus of claim 24, wherein, The item attribute network comprises a third subnetwork and a fourth subnetwork.

26. The apparatus of claim 23, wherein, The second obtaining subunit is further configured to: input third positive samples and third negative samples into the third subnetwork to obtain a prediction result corresponding to the third subnetwork, wherein the third positive samples comprise attribute sample data of the first type of items and attribute sample data of the second type of items, and the third negative samples comprise attribute sample data of the non-clicked items; and input fourth positive samples and fourth negative samples into the fourth subnetwork to obtain a prediction result corresponding to the fourth subnetwork, wherein the fourth positive samples comprise attribute sample data of the second type of items, and the fourth negative samples comprise attribute sample data of the non-clicked items and attribute sample data of the first type of items. The prediction result corresponding to the third subnetwork and the prediction result corresponding to the fourth subnetwork are taken as the prediction result corresponding to the item attribute network. ​ 27. The apparatus of claim 26, wherein, The third sub-network and the fourth sub-network share a second input layer, the third sub-network further comprises a third multi-layer perceptron layer connected to an output end of a second output layer, and the fourth sub-network further comprises a fourth multi-layer perceptron layer connected to the output end of the second output layer.

28. The apparatus of claim 27, wherein, The second input layer comprises a second embedding layer and a second feature fusion layer, and an input end of the second feature fusion layer is connected to an output end of the second embedding layer.

29. The apparatus of any of claims 21-28, wherein, The preset target model comprises a fifth sub-network and a sixth sub-network; The first obtaining unit is further configured to: input the sample set into the fifth sub-network and the sixth sub-network respectively to obtain a prediction result corresponding to the fifth sub-network and a prediction result corresponding to the sixth sub-network; use the prediction result corresponding to the fifth sub-network and the prediction result corresponding to the sixth sub-network as a first prediction result corresponding to the preset target model.

30. The apparatus of claim 29, wherein, The fifth sub-network comprises a third embedding layer, a feature extraction network layer and a fifth multi-layer perceptron layer connected in sequence, and the sixth sub-network comprises a fourth embedding layer, the feature extraction network layer and a sixth multi-layer perceptron layer connected in sequence.

31. The apparatus of claim 30, wherein, The feature extraction network layer comprises a plurality of second expert network layers and a second gate network layer, and the second gate network layer is used to control an input end of at least one second expert network layer in the plurality of second expert network layers to be connected to an output end of the third embedding layer and an output end of the fourth embedding layer.

32. The apparatus of claim 26, wherein, The second training unit is further configured to: determine a loss function according to the first prediction result, a label of the sample and the second prediction result; use the loss function to iteratively adjust parameters of the ranking model to obtain a trained ranking model.

33. The apparatus of claim 32, wherein, The parameters of the ranking model comprise a first weight and a second weight; and the apparatus further comprises: a weight updating module configured to use a demand quantity of the second type of items and a preset demand quantity threshold to update the weights of the trained ranking model.

34. The apparatus of claim 33, further comprising: a first demand quantity determining module configured to determine the demand quantity of the first type of items according to a dot product of the prediction result of the first sub-network and the prediction result of the third sub-network; and a second demand quantity determining module configured to determine the demand quantity of the second type of items according to a dot product of the prediction result of the second sub-network and the prediction result of the fourth sub-network; a third demand quantity determining module configured to determine the demand quantity of the second type of items according to a ratio between the demand quantity of the first type of items and the corresponding first weight and the demand quantity of the second type of items and the corresponding second weight; the weight updating module is further configured to: in response to the demand quantity of the second type of items not satisfying the preset demand quantity threshold, update the first weight and / or the second weight of the trained ranking model until the demand quantity of the second type of items after the update satisfies the preset demand quantity threshold.

35. An item ranking apparatus, comprising: a data acquisition module configured to acquire attribute data of a plurality of items and behavior data of the plurality of items; The result obtaining module is configured to input the attribute data of each item and the behavior data of each item into the ranking model generated by the method in any one of claims 1-15 respectively, to obtain a corresponding prediction result of each item, wherein the corresponding prediction result of each item includes a target demand quantity of each item. The item ranking module is configured to rank the plurality of items according to the target demand quantity of each item, to obtain a ranking result.

36. The apparatus of claim 35, wherein, The corresponding prediction result of each item further includes a click label of each item, wherein the click label is used to represent whether each item is an item that has been exposed but not clicked before a preset time point; and The result obtaining module includes: The first obtaining module is configured to input the behavior data of each item into the first sub-network and the second sub-network included in the operation behavior network of the ranking model, to obtain a corresponding prediction result of the first sub-network and a corresponding prediction result of the second sub-network; and The second obtaining module is configured to input the attribute data of each item into the third sub-network and the fourth sub-network included in the item attribute network of the ranking model, to obtain a corresponding prediction result of the third sub-network and a corresponding prediction result of the fourth sub-network. The demand quantity determining module is configured to determine the target demand quantity of each item according to the corresponding prediction result of the first sub-network and the corresponding prediction result of the third sub-network, and according to the corresponding prediction result of the second sub-network and the corresponding prediction result of the third sub-network.

37. The apparatus of claim 36, wherein, The demand quantity determining module includes: The first determining unit is configured to determine a first demand quantity of each item according to the dot product of the corresponding prediction result of the first sub-network and the corresponding prediction result of the third sub-network; and The second determining unit is configured to determine a second demand quantity of each item according to the dot product of the corresponding prediction result of the second sub-network and the corresponding prediction result of the third sub-network. The third determining unit is configured to determine the target demand quantity of each item according to the ratio of the first demand quantity of each item and the second demand quantity of each item.

38. The apparatus of claim 37, wherein, The third determining unit is further configured to: determine the target demand quantity of each item according to the ratio between the first demand quantity of each item and the corresponding first weight, and the second demand quantity of each item and the corresponding second weight.

39. An electronic device, comprising: one or more processors; storage having one or more programs stored thereon; when the one or more programs are executed by the one or more processors, the one or more processors implement the method in any one of claims 1-19.

40. A non-transitory computer readable storage medium having computer instructions stored thereon, having a computer program stored thereon, wherein, The program is executed by the processor to implement the method in any one of claims 1-19. The program is executed by the processor to implement the method in any one of claims 1-19.

Citation Information

Patent Citations

  • Distributed recommendation method based on Spark platform

    CN107451267A

  • Article recommendation model training method, article screening method, device and equipment

    CN113850654A