Training method, device and computer program product for sorting model
By training different types of data resource feature data and their sequential labels in the sample set and using machine learning algorithms to train the sorting model, the problem of the recommendation value not being taken into consideration in data resource recommendation is solved, and the accuracy of the recommendation results is improved.
Patent Information
- Application Number
- CN202411441557.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-10-15
AI Technical Summary
Existing technologies fail to effectively consider the recommendation value between different types of data resources in data resource recommendation, resulting in inaccurate recommendation results.
By obtaining a training sample set containing feature data of different types of data resources and their sequential labels of recommended order, a ranking model is trained using a machine learning algorithm to comprehensively consider the recommendation value among multiple types of data resources.
The accuracy of the recommendation order information output by the ranking model is improved, and the accuracy of data recommendation is enhanced.
Smart Images

Figure CN119415950B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, specifically to the field of deep learning and data recommendation technology, and in particular to a training method for a ranking model, a data recommendation method and device, an electronic device, a storage medium, and a computer program product, which can be applied in data recommendation scenarios. Background Art
[0002] In the data resource recommendation scenario, existing technologies determine different types of data resources through different recommendation models, without considering the recommendation value between different types of data resources, resulting in inaccurate recommendation results. Summary of the Invention
[0003] The present disclosure provides a ranking model training method and device, a data recommendation method and device, an electronic device, a storage medium, and a computer program product.
[0004] According to a first aspect, a method for training a ranking model is provided, comprising: obtaining a training sample set, wherein the training samples in the training sample set include two resource feature data and sequence labels representing a recommended order between data resources to which the two resource feature data respectively belong, and the two data resources corresponding to at least some of the training samples in the training sample set are data resources of different types; employing a machine learning algorithm, with the two resource feature data as input and the sequence labels corresponding to the two resource feature data as expected output, to train a ranking model.
[0005] According to the second aspect, a data recommendation method is provided, comprising: sorting multiple recalled data resources corresponding to a target user through a pre-trained sorting model to obtain recommended order information of the multiple recalled data resources, wherein the sorting model is trained through any implementation method of the first aspect; generating a recommended list page based on the recommended order information; and outputting the recommended list page to the target user.
[0006] According to a third aspect, a training device for a ranking model is provided, comprising: an acquisition unit configured to acquire a training sample set, wherein the training samples in the training sample set include two resource feature data and a sequence label representing a recommended order between data resources to which the two resource feature data respectively belong, and the two data resources corresponding to at least some of the training samples in the training sample set are data resources of different types; and a training unit configured to adopt a machine learning algorithm, with the two resource feature data as input and the sequence label corresponding to the two resource feature data as the expected output, to train a ranking model.
[0007] According to the fourth aspect, a data recommendation device is provided, including: a sorting unit, configured to sort multiple recalled data resources corresponding to a target user through a pre-trained sorting model to obtain recommended order information of the multiple recalled data resources, wherein the sorting model is trained through any implementation method of the third aspect; a generation unit, configured to generate a recommendation list page based on the recommended order information; and an output unit, configured to output the recommended list page to the target user.
[0008] According to the fifth aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so as to enable the at least one processor to execute the method described in any implementation of the first aspect or the second aspect.
[0009] According to a sixth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause a computer to execute the method described in any one of the implementations of the first and second aspects.
[0010] According to a seventh aspect, a computer program product is provided, comprising: a computer program, which implements the method described in any implementation manner of the first aspect or the second aspect when executed by a processor.
[0011] According to the technology disclosed in the present invention, a training method and device for a ranking model are provided, in which the two data resources corresponding to at least some of the training samples in the training sample set are different types of data resources. The ranking model is trained with the two resource feature data in the training samples as input and the sequence labels corresponding to the two resource feature data as the expected output, so that the ranking model uses multiple types of data resources for modeling, considers the recommendation value between multiple types of data resources as a whole, and improves the accuracy of the recommendation sequence information output by the ranking model.
[0012] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings are used to better understand the present invention and do not constitute a limitation of the present invention.
[0014] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0015] Figure 2 is a flowchart of an embodiment of a method for training a ranking model according to the present disclosure;
[0016] Figure 3 is a schematic diagram of an application scenario of the training method of the sorting model according to this embodiment;
[0017] Figure 4 is a schematic diagram of a sequential label determination process according to this embodiment;
[0018] Figure 5 is a flow chart of an embodiment of a data recommendation method according to the present disclosure;
[0019] Figure 6 is a structural diagram of an embodiment of a training device for a ranking model according to the present disclosure;
[0020] Figure 7 is a structural diagram of an embodiment of a data recommendation device according to the present disclosure;
[0021] Figure 8 It is a schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION
[0022] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0023] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0024] Figure 1 An exemplary architecture 100 is shown to which the ranking model training method and apparatus, and the data recommendation method and apparatus of the present disclosure can be applied.
[0025] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. The communication connections between terminal devices 101, 102, and 103 constitute a topological network, and network 104 is used to provide a medium for communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0026] Terminal devices 101, 102, and 103 can be hardware devices or software that support network connection for data interaction and data processing. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices that support network connection, information acquisition, interaction, display, processing, and other functions, including but not limited to smartphones, tablet computers, e-book readers, laptop computers, and desktop computers. When terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software or software modules, for example, to provide distributed services, or they can be implemented as a single software or software module. No specific limitations are given here.
[0027] Server 105 can be a server that provides various services. For example, for the training sample sets provided by terminal devices 101, 102, and 103, a machine learning algorithm is used, with two resource feature data in the training samples as input and the sequence labels corresponding to the two resource feature data as the expected output, to train a background processing server to obtain a sorting model. For another example, for recommendation requests sent by terminal devices 101, 102, and 103, a pre-trained sorting model is used to sort multiple recalled data resources corresponding to the target user, and a background processing server is used to obtain and display a recommendation list page. As an example, server 105 can be a cloud server.
[0028] It should be noted that the server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software or software modules (e.g., software or software modules for providing distributed services), or as a single software or software module. No specific limitations are given here.
[0029] It should also be noted that the ranking model training method and data recommendation method provided in the embodiments of the present disclosure are generally executed by a server, but the possibility of execution by a terminal device, or execution by a server and a terminal device in cooperation with each other, is not excluded. Accordingly, the various parts (e.g., various units) included in the ranking model training device and data recommendation device can be entirely set in the server, entirely set in the terminal device, or separately set in the server and the terminal device.
[0030] It should be understood that Figure 1The number of terminal devices, networks, and servers in the system is merely illustrative. Any number of terminal devices, networks, and servers may be provided as needed. When the electronic device on which the training method for the sorting model and the data recommendation method are run does not need to transmit data with other electronic devices, the system architecture may only include the electronic device (e.g., terminal device or server) on which the training method for the sorting model and the data recommendation method are run.
[0031] Please refer to Figure 2 , Figure 2 This is a flow chart of a method for training a ranking model provided in an embodiment of the present disclosure. In process 200, the following steps are included:
[0032] Step 201: Obtain a training sample set.
[0033] In this embodiment, the execution subject of the training method of the sorting model (for example, Figure 1 The server in the training sample set can obtain the training sample set remotely or locally via a wired network connection or a wireless network connection. The training samples in the training sample set include two resource feature data and sequence labels representing a recommended order between the data resources to which the two resource feature data belong. At least some of the training samples in the training sample set correspond to two data resources of different types.
[0034] Data resource types include, but are not limited to, videos, images, and text. Each training sample in the training sample set includes a resource feature data pair consisting of two resource feature data and a sequence label representing the recommendation order between the data resources to which the two resource feature data belong (the two data resources can be considered a data resource pair). The recommendation order represents the user's level of interest in the two data resources, with users being more interested in the data resource ranked higher in the data resource pair.
[0035] The two data resources corresponding to at least some of the training samples in the training sample set are different types of data resources. The two data resources corresponding to the training samples refer to the data resources to which the two resource feature data in the training samples belong. For example, the two data resources corresponding to a preset proportion of the training samples in the training sample set are different types of data resources. The preset proportion can be set based on actual circumstances and is not limited here.
[0036] It can be understood that the training sample set includes training samples where the corresponding two data resources are data resources of different types and training samples where the corresponding two data resources are data resources of the same type. Taking the data resource types of video and graphics as an example, the training sample set includes training samples where the corresponding two data resources are both video-type data resources, training samples where the corresponding two data resources are both dynamic-type data resources, and training samples where the corresponding two data resources are respectively video-type and dynamic-type data resources.
[0037] Resource feature data can be obtained by extracting features from data resources. For example, the execution entity can extract features from data resources using preset feature keywords to obtain resource feature data. For another example, the execution entity can extract features from data resources using a convolutional neural network or a recurrent neural network to obtain resource feature data.
[0038] In step 202 , a machine learning algorithm is used, with two resource feature data as input and sequence labels corresponding to the two resource feature data as expected output, to train a ranking model.
[0039] In this embodiment, the execution subject may adopt a machine learning algorithm, and use two resource feature data as input and the sequence labels corresponding to the two resource feature data as the expected output to train a sorting model.
[0040] As an example, the execution entity may iteratively perform the following training operations until a preset end condition is reached to obtain a ranking model:
[0041] First, one or more untrained target training samples are determined from the training sample set; then, two resource feature data in the target training samples are input into the current initial sorting model to obtain the actual output; then, the loss between the actual output and the sequential labels in the target training samples is calculated; finally, the parameters of the current initial sorting model are updated according to the loss using a gradient descent algorithm or a gradient descent algorithm to obtain the model corresponding to the next training operation.
[0042] The preset termination conditions include, for example, that the training time exceeds a preset time threshold, the number of training times exceeds a preset number threshold, and the training loss tends to converge.
[0043] Among them, the initial sorting model can adopt neural network models such as convolutional neural networks, recurrent neural networks, deep neural networks, specially designed sorting networks such as RankNet and LambdaRank, ensemble learning models such as the RankBoost model based on AdaBoost and the XGBoost (eXtremeGradientBoosting, extreme gradient boosting) model.
[0044] Continue to see Figure 3 , Figure 3 300 is a schematic diagram of an application scenario of the training method for the ranking model according to the present embodiment. The server first obtains a training sample set 301 from a database. The training samples in the training sample set include two resource feature data and a sequence label representing a recommended order between the data resources to which the two resource feature data belong. The two data resources corresponding to at least some of the training samples in the training sample set are of different types. The types of data resources include video types and dynamic types in the form of graphics and text. Then, a machine learning algorithm is used to train a ranking model 302 with the two resource feature data as input and the sequence labels corresponding to the two resource feature data as the expected output.
[0045] In this embodiment, a training method for a ranking model is provided, in which the two data resources corresponding to at least some of the training samples in the training sample set are different types of data resources. The ranking model is trained with the two resource feature data in the training sample as input and the sequence labels corresponding to the two resource feature data as the expected output, so that the ranking model uses multiple types of data resources for modeling, considers the recommendation value between multiple types of data resources as a whole, and improves the accuracy of the recommendation sequence information output by the ranking model.
[0046] In some optional implementations of this embodiment, the resource feature data includes: portrait feature data of users interacting with data resources, resource attribute feature data of data resources, and interaction feature data between users and data resources.
[0047] Examples of user profile feature data include gender, age, occupation, geographic location, and interests. Examples of data resource attribute feature data include the playback duration and content type of the data resource. Examples of interaction feature data between users and data resources include actions such as clicks and swipes performed by users on the data resource, as well as viewing duration. Users are aware of and have authorized the acquisition and use of user-related information, including user profile feature data and interaction feature data between users and data resources.
[0048] In this implementation, the resource feature data includes feature data of multiple aspects involved in the data resources, which improves the comprehensiveness and richness of the resource feature data, helps the sorting model to quickly learn the correspondence between resource feature data and sequential labels during the training process, and can improve the training speed of the model and the accuracy of the recommended sequence information output by the trained sorting model.
[0049] In some optional implementations of this embodiment, the interaction feature data includes interaction feature data between the user and the data resource in the list display page, and interaction feature data between the user and the data resource sequence in the detail display page. The detail display page is the page displayed after the data resource in the list display page is triggered, and the data resource sequence includes the data resource.
[0050] In a data recommendation app, there are a list display page (a primary page) and a detail display page (a secondary page). When a user opens the data recommendation app, they enter the list display page, which includes multiple data resources. When a user triggers (for example, clicks) a data resource, they enter the detail display page for that data resource. On the detail display page, the user can view the data resource and display other data resources in the data resource sequence through operations such as sliding.
[0051] On the list display page, the interaction feature data between the user and the data resource, such as trigger features such as whether the data resource is clicked; on the detail display page, the interaction feature data between the user and the data resource sequence, such as the viewing time and sliding step length of the data resources in the data resource sequence. The sliding step length is used to represent the number of data resources played by the user based on the sliding operation.
[0052] In this implementation, the interaction feature data includes the interaction feature data between the user and the data resources in the list display page, and the interaction feature data between the user and the data resource sequence in the details display page, which further improves the comprehensiveness and richness of the resource feature data, and helps to further improve the training speed of the model and the accuracy of the recommendation order information output by the trained sorting model.
[0053] In some optional implementations of this embodiment, the execution entity may obtain the sequence label in the following manner:
[0054] In the first step, the user's operation data is combined with the interaction feature data between the two data resources to obtain interaction feature data pairs corresponding to at least two operation dimensions.
[0055] The at least two operation dimensions can be set according to actual conditions. For example, the at least two operation dimensions are key dimensions that affect the recommendation order. Specifically, the at least two operation dimensions include whether to click, whether to slide, sliding step size, and viewing time.
[0056] The two interaction feature data in an interaction feature data pair belong to the same operation dimension. For the click dimension, the two interaction feature data (whether the user clicked on the two data resources) can be combined to obtain the interaction feature data pair for the click dimension. Similarly, the interaction feature data pairs for the slide dimension, slide step dimension, and viewing duration dimension can be obtained using the same method.
[0057] The second step is to obtain the comparison result between the two interactive feature data of a single data pair in the interactive feature data pair.
[0058] The third step is to determine the sequence label according to the comparison result.
[0059] As an example, for each interaction feature data pair in a plurality of interaction feature data, the execution entity may compare the two interaction feature data in the interaction feature data pair to determine a comparison result for the interaction feature data pair. For each comparison result, if the interaction feature data corresponding to data resource A in the two data resources is greater than the interaction feature data corresponding to data resource B, the comparison result is 1; if the interaction feature data corresponding to data resource B in the two data resources is greater than the interaction feature data corresponding to data resource A, the comparison result is -1; and if the interaction feature data corresponding to data resource A in the two data resources is equal to the interaction feature data corresponding to data resource B, the comparison result is 0. Furthermore, the comparison results of the plurality of interaction feature data pairs are summed or weighted summed to determine a sequence label.
[0060] As another example, the execution entity may determine a target interaction feature data pair from multiple interaction feature data pairs according to their importance, and then determine a sequence label according to a comparison result between the interaction feature data in the target interaction feature data pair.
[0061] In this implementation, the sequential labels are determined based on the comparison results between the interactive feature data in the interactive feature data pairs of the preset dimensions, thereby improving the accuracy of determining the sequential labels.
[0062] In some optional implementations of this embodiment, the execution entity may perform the second step in the following manner:
[0063] First, the comparison order of interaction feature data pairs is determined according to the priority of each operation dimension.
[0064] The priorities among multiple operation dimensions can be set according to actual conditions. For example, the priorities among multiple operation dimensions can be determined based on the temporal relationship among the interaction characteristics between users and data resources.
[0065] Continuing with the above-mentioned dimensions of whether to click, whether to slide, sliding step length and viewing time as examples, based on the temporal relationship between click, slide and watch, their priorities from high to low are respectively whether to click, whether to slide, sliding step length and viewing time.
[0066] Then, the two interactive feature data of a single data pair in the interactive feature data pair are compared in sequence according to the comparison order to obtain a comparison result.
[0067] In this implementation, the execution subject may perform the third step as follows: in response to detecting that the comparison result indicates that two interaction feature data of a single data pair are different, determining a sequence label according to the comparison result.
[0068] Continuing with the example of whether to click dimension, whether to slide dimension, sliding step dimension and viewing time dimension, the above-mentioned execution entity can compare the two interactive feature data in the interactive feature data pair corresponding to the whether to click dimension. If the two interactive feature data are not equal, the sequence label can be determined; if they are equal, continue to compare the two interactive feature data in the interactive feature data pair corresponding to the whether to slide dimension until the sequence label is determined.
[0069] In this implementation, two interaction feature data in an interaction feature data pair are compared in sequence according to a comparison order determined based on the priorities between multiple operation dimensions, until a sequential label is determined based on the comparison result of one interaction feature data pair among the multiple interaction feature data pairs, thereby improving the efficiency and accuracy of the sequential label determination process.
[0070] Continue to refer Figure 4 , shows a schematic process 400 of an embodiment of a sequential tag determination process according to the present disclosure. In the process 400, the following steps are included:
[0071] Step 401 : Combining the user's operation data with the interaction feature data between two data resources to obtain interaction feature data pairs corresponding to at least two operation dimensions.
[0072] Step 402: Determine the comparison order of the interaction feature data pairs according to the priority of each operation dimension.
[0073] Step 403 : Compare the two interactive feature data of a single data pair in the interactive feature data pair in sequence according to the comparison order to obtain a comparison result.
[0074] Step 404 : In response to detecting that the comparison result indicates that the two interaction feature data of the single data pair are different, determining a sequence label according to the comparison result.
[0075] The process 400 of the method for determining sequential labels in this embodiment specifically illustrates the process of determining sequential labels based on the priorities of multiple operation dimensions, thereby improving the efficiency and accuracy of the process of determining sequential labels.
[0076] Continue to refer Figure 5 , shows a schematic process 500 of an embodiment of the data recommendation method according to the present disclosure. In the process 500, the following steps are included:
[0077] Step 501 : sorting multiple recalled data resources corresponding to target users through a pre-trained sorting model to obtain recommended sequence information of the multiple recalled data resources.
[0078] In this embodiment, the execution subject of the data recommendation method (for example, Figure 1 The server in the query process sorts the multiple recalled data resources corresponding to the target user through a pre-trained sorting model to obtain recommended sequence information of the multiple recalled data resources.
[0079] The sorting model is obtained by training according to the above embodiment 200.
[0080] As an example, the above-mentioned execution entity can recall multiple recall data resources that the target user is interested in from the data set through a pre-trained recall model; then, sort the multiple recall data resources through a pre-trained sorting model to obtain recommended order information of the multiple recall data resources.
[0081] Step 502: Generate a recommendation list page based on the recommendation order information.
[0082] In this embodiment, the execution entity may generate a recommendation list page based on the recommendation order information.
[0083] As an example, a preset number of recalled data resources ranked first are determined as target data resources, and a recommendation list page is generated according to the recommendation order information of the multiple target data resources. The preset number can be set according to actual conditions and is not limited here.
[0084] Step 503: Output the recommendation list page to the target user.
[0085] In this embodiment, the execution entity may output a recommendation list page to the target user.
[0086] As an example, the execution entity may push the recommendation list page to the terminal device of the target user, and display the recommendation list page to the target user through an application deployed in the terminal device.
[0087] In this embodiment, based on modeling using multiple types of data resources, a ranking model that can comprehensively consider the recommendation values among multiple types of data resources recommends data to users, thereby improving the accuracy of data recommendations.
[0088] Continue to refer Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a training device for a ranking model. Figure 2 Corresponding to the method embodiment shown, the system can be specifically applied to various electronic devices.
[0089] like Figure 6 As shown, the training device 600 for the sorting model includes: an acquisition unit 601 is configured to acquire a training sample set, wherein the training samples in the training sample set include two resource feature data and a sequence label representing a recommended order between the data resources to which the two resource feature data respectively belong, and the two data resources corresponding to at least some of the training samples in the training sample set are different types of data resources; the training unit 602 is configured to adopt a machine learning algorithm, with the two resource feature data as input, and the sequence label corresponding to the two resource feature data as the expected output, to train and obtain the sorting model.
[0090] In some optional implementations of this embodiment, the above-mentioned device also includes: a label determination unit (not shown in the figure), which is configured to: combine the user's operation data with the interaction feature data between the two data resources to obtain interaction feature data pairs corresponding one-to-one to at least two operation dimensions; obtain the comparison result between the two interaction feature data of a single data pair in the interaction feature data pair; and determine the sequential label based on the comparison result.
[0091] In some optional implementations of this embodiment, the label determination unit is further configured to: determine the comparison order of the interaction feature data pairs according to the priority of each operation dimension; compare the two interaction feature data of a single data pair in the interaction feature data pairs in sequence according to the comparison order to obtain a comparison result; in response to detecting that the comparison result indicates that the two interaction feature data of the single data pair are different, determine the sequence label according to the comparison result.
[0092] In some optional implementations of this embodiment, the resource feature data includes: portrait feature data of users interacting with data resources, resource attribute feature data of data resources, and interaction feature data between users and data resources.
[0093] In some optional implementations of this embodiment, the interaction feature data includes: interaction feature data between the user and the data resources in the list display page; and interaction feature data between the user and the data resource sequence in the details display page; wherein the details display page is the page displayed after the data resources in the list display page are triggered, and the data resource sequence includes data resources.
[0094] In this embodiment, a training device for a ranking model is provided, in which the two data resources corresponding to at least some of the training samples in the training sample set are different types of data resources. The ranking model is trained with the two resource feature data in the training sample as input and the sequence labels corresponding to the two resource feature data as the expected output, so that the ranking model uses multiple types of data resources for modeling, considers the recommendation value between multiple types of data resources as a whole, and improves the accuracy of the recommendation sequence information output by the ranking model.
[0095] Continue to refer Figure 7 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a data recommendation device. Figure 5 Corresponding to the method embodiment shown, the system can be specifically applied to various electronic devices.
[0096] like Figure 7 As shown, the data recommendation device 700 includes: a sorting unit 701 is configured to sort multiple recalled data resources corresponding to the target user through a pre-trained sorting model to obtain recommended order information of the multiple recalled data resources, wherein the sorting model is trained through any implementation method in the above-mentioned embodiment 600; a generation unit 702 is configured to generate a recommendation list page based on the recommended order information; and an output unit 703 is configured to output the recommended list page to the target user.
[0097] In this embodiment, based on modeling using multiple types of data resources, a ranking model that can comprehensively consider the recommendation values among multiple types of data resources recommends data to users, thereby improving the accuracy of data recommendations.
[0098] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can implement the training method of the sorting model and the data recommendation method described in any of the above embodiments when executing.
[0099] According to an embodiment of the present disclosure, the present disclosure also provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the training method and data recommendation method of the sorting model described in any of the above embodiments when executed.
[0100] The embodiments of the present disclosure provide a computer program product, which, when executed by a processor, can implement the training method and data recommendation method of the ranking model described in any of the above embodiments.
[0101] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0102] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the device 800 can also be stored in the RAM 803. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0103] Various components in device 800 are connected to I / O interface 805, including an input unit 806, such as a keyboard, mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0104] The computing unit 801 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the training method of the sorting model. For example, in some embodiments, the training method of the sorting model can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the training method of the sorting model described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the training method of the sorting model by any other appropriate means (e.g., by means of firmware).
[0105] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0106] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable sequencing model training device, such that when the program code is executed by the processor or controller, the functions / operations specified in the flow charts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0107] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0108] To provide interaction with a user, the systems and techniques described herein 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 pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the 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 input, voice input, or tactile input).
[0109] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, 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.
[0110] A computer system may include a client and a server. The client and server are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within a cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and virtual private servers (VPS). It may also be a server in a distributed system or a server integrated with blockchain.
[0111] According to the technical solution of the embodiment of the present disclosure, a training method for a ranking model is provided, in which the two data resources corresponding to at least some of the training samples in the training sample set are different types of data resources. The ranking model is trained with the two resource feature data in the training sample as input and the sequence labels corresponding to the two resource feature data as the expected output, so that the ranking model adopts multiple types of data resources for modeling, considers the recommendation value between multiple types of data resources as a whole, and improves the accuracy of the recommendation sequence information output by the ranking model.
[0112] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions provided by this disclosure can be achieved. This is not a limitation herein.
[0113] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A training method for a ranking model, comprising: Obtaining a training sample set, wherein the training samples in the training sample set include two resource feature data and a sequence label representing a recommended order between data resources to which the two resource feature data respectively belong, the two data resources corresponding to at least some of the training samples in the training sample set are different types of data resources, the resource feature data include portrait feature data of a user interacting with the data resource, resource attribute feature data of the data resource, and interaction feature data between the user and the data resource, and the types include video, image, and graphic text; A machine learning algorithm is used to train the ranking model using the two resource feature data as input and the sequence labels corresponding to the two resource feature data as the expected output; The sequence labels are obtained as follows: Combining the user's operation data with the interaction feature data between the two data resources to obtain interaction feature data pairs corresponding to at least two operation dimensions; Determining a comparison order of the interaction feature data pairs according to the priority of each of the operation dimensions; Comparing two interactive feature data of a single data pair in the interactive feature data pair in sequence according to the comparison order to obtain the comparison result; In response to detecting that the comparison result indicates that two interaction feature data of a single data pair are different, the sequence label is determined according to the comparison result.
2. The method according to claim 1, wherein The interaction feature data includes: In the list display page, the interaction feature data between the user and the data resource; and In the details display page, the interaction feature data between the user and the data resource sequence; The detail display page is a page displayed after the data resource in the list display page is triggered, and the data resource sequence includes the data resource.
3. A data recommendation method, comprising: Sorting multiple recall data resources corresponding to target users through a pre-trained sorting model to obtain recommended sequence information of the multiple recall data resources, wherein the sorting model is trained by any one of claims 1-2; Generate a recommendation list page based on the recommendation order information; The recommendation list page is output to the target user.
4. A training device for a sorting model, comprising: an acquisition unit configured to acquire a training sample set, wherein the training samples in the training sample set include two resource feature data and a sequence label representing a recommended order between data resources to which the two resource feature data respectively belong, the two data resources corresponding to at least some of the training samples in the training sample set are different types of data resources, the resource feature data include portrait feature data of a user interacting with the data resource, resource attribute feature data of the data resource, and interaction feature data between the user and the data resource, and the types include video, image, and graphic text; A training unit is configured to adopt a machine learning algorithm, with the two resource feature data as input and the sequence labels corresponding to the two resource feature data as expected output, to train and obtain the ranking model; The label determination unit is configured to: Combine the user's operation data with the interaction feature data between the two data resources to obtain interaction feature data pairs corresponding to at least two operation dimensions; determine a comparison order of the interaction feature data pairs according to the priority of each operation dimension; compare the two interaction feature data of a single data pair in the interaction feature data pairs in sequence according to the comparison order to obtain the comparison result; in response to detecting that the comparison result indicates that the two interaction feature data of the single data pair are different, determine the sequence label according to the comparison result.
5. The device according to claim 4, wherein The interaction feature data includes: In the list display page, the interaction feature data between the user and the data resource; and In the details display page, the interaction feature data between the user and the data resource sequence; The detail display page is a page displayed after the data resource in the list display page is triggered, and the data resource sequence includes the data resource.
6. A data recommendation device, comprising: a sorting unit configured to sort the multiple recalled data resources corresponding to the target user by using a pre-trained sorting model to obtain recommended order information of the multiple recalled data resources, wherein the sorting model is trained by any one of claims 4-5; a generating unit configured to generate a recommendation list page based on the recommendation order information; An output unit is configured to output the recommendation list page to the target user.
7. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed 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 according to any one of claims 1 to 3.
8. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 3.
9. A computer program product comprising: A computer program which, when executed by a processor, implements the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Training method and device, recommendation method and device, electronic equipment and storage medium
CN113312512A
Recommendation degree sorting method and device, sorting model training method and device and electronic equipment
CN116049559A