Recommendation method, device and equipment and computer readable storage medium

By using joint loss function to train the multi-task sorting model, the problem that the sorting learning loss function in the prior art cannot express the complete sequence information, and the robustness and accuracy of the recommended results are improved.

CN118939868APending Publication Date: 2024-11-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310539854.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-12
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

Existing sorting learning loss functions, such as dot product loss function and order pair loss function, cannot effectively express the complete sequence information, resulting in low robustness and accuracy of the recommended results.

Method used

The joint loss function is used to train based on the loss function of each task and the scaling factor corresponding to the task, and obtain a trained multi-task sorting model, which is used to sort the recommended objects and generate the recommended results.

Benefits of technology

By fully considering the complete sequence information, the stability of the sorting results and the robustness and accuracy of the recommended results are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939868A_ABST
    Figure CN118939868A_ABST
Patent Text Reader

Abstract

The invention provides a recommendation method, device and equipment and a computer readable storage medium. The method comprises the steps that a plurality of to-be-recommended objects and a trained multi-task sorting model are obtained, the trained multi-task sorting model is obtained through training of a joint loss function, and the joint loss function is determined based on a loss function of each task and a scaling factor corresponding to each task; sorting the plurality of to-be-recommended objects by utilizing the trained multi-task sorting model to obtain a sorting result; and determining a recommendation result based on the sorting result, and outputting the recommendation result. Through the method and the device, the robustness and the accuracy of the recommendation result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to search recommendation technology, and in particular to a recommendation method, device, equipment and computer-readable storage medium. Background Art

[0002] With the development of big data, more and more business scenarios require sorting, such as recommendation and classification scenarios. In related technologies, the commonly used loss functions for sorting learning include dot product loss function, sequence pair loss function, etc. These loss functions are the sorting of learning samples. The model can be trained through these loss functions to obtain a trained model. Since the above loss functions cannot express complete sequence information or have poor stability, the final recommendation results have poor robustness and low accuracy. Summary of the invention

[0003] The embodiments of the present application provide a recommendation method, apparatus, computer device, computer program product, and computer-readable storage medium, which can improve the robustness and accuracy of recommendation results.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] This application embodiment provides a recommendation method, which includes:

[0006] Acquire multiple objects to be recommended and a trained multi-task ranking model, wherein the trained multi-task ranking model is trained using a joint loss function, and the joint loss function is determined based on the loss function of each task and the scaling factor corresponding to each task;

[0007] Using the trained multi-task ranking model to sort the multiple objects to be recommended, to obtain a ranking result;

[0008] Determine a recommendation result based on the ranking result, and output the recommendation result.

[0009] The present application provides a recommendation device, which includes:

[0010] A first acquisition module is used to acquire multiple objects to be recommended and a trained multi-task ranking model, wherein the trained multi-task ranking model is trained using a joint loss function, and the joint loss function is determined based on the loss function of each task and the scaling factor corresponding to each task;

[0011] A sorting module, used to sort the multiple objects to be recommended using the trained multi-task sorting model to obtain a sorting result;

[0012] An output module is used to determine a recommendation result based on the sorting result and output the recommendation result.

[0013] An embodiment of the present application provides a computer device, including:

[0014] A memory for storing computer executable instructions;

[0015] The processor is used to implement the recommended method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.

[0016] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for causing a processor to execute the recommendation method provided in the embodiment of the present application.

[0017] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the recommendation method provided in the embodiment of the present application is implemented.

[0018] The embodiments of the present application have the following beneficial effects:

[0019] In an embodiment of the present application, a plurality of objects to be recommended are sorted using a trained multi-task sorting model to obtain a sorting result; then the recommendation result is determined and output based on the sorting result. Among them, the trained multi-task sorting model is trained using a joint loss function, and the joint loss function is determined based on the loss function of each task and the scaling factor corresponding to each task. In this way, the joint loss function can overcome the shortcomings of the loss function corresponding to each task, integrate the advantages of each loss function, and avoid the problem of missing sequence information or poor stability. The joint loss function can fully consider the complete sequence information, ensure the stability of the sorting result obtained using the trained multi-task sorting model, and ultimately improve the robustness and accuracy of the recommendation result. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 1 is a schematic diagram of a network architecture of a recommendation system 100 provided in an embodiment of the present application;

[0021] Figure 2 is a schematic diagram of the structure of the server 400 provided in an embodiment of the present application;

[0022] Figure 3 This is a schematic diagram of an implementation flow of a recommended method provided in an embodiment of the present application;

[0023] Figure 4 This is another implementation flow diagram of the recommended method provided in the embodiment of the present application;

[0024] Figure 5 This is a schematic diagram of an implementation process of constructing a first sample set and a second sample set provided in an embodiment of the present application;

[0025] Figure 6 A schematic diagram of an implementation process of constructing a joint loss function provided in an embodiment of the present application;

[0026] Figure 7 A schematic diagram of an implementation flow of determining a scaled first loss function provided in an embodiment of the present application;

[0027] Figure 8 A schematic diagram of an implementation flow of obtaining a trained multi-task sorting model provided in an embodiment of the present application;

[0028] Fig. 9 A schematic diagram of an implementation framework for a training deep model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0030] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0031] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0032] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0033] In order to better understand the recommended method provided in the embodiments of the present application, the methods of the related art and the existing shortcomings are first described.

[0034] The loss function for point-wise learn to rank (Point-wise LTR) is to use the first K items in the ranking as positive samples and the items after the Kth as negative samples to perform binary classification. The advantage is that the model prediction results are more stable, but because only the first K items are used as positive samples, it cannot express the complete sequence information between objects.

[0035] The pair-wise learn to rank (Pair-wise LTR) loss function pairs samples in pairs. Assuming that the two samples are A and B, if A is ranked before B, it is a positive sample pair, and if A is ranked after B, it is a negative sample pair, thereby realizing ranking modeling. The advantage is that the model directly learns the order relationship, and the order information is more sufficient than a single sample. However, the disadvantage is that its prediction result itself is unstable. For example, assuming that A is ranked before B, the prediction result of the model can be (A=0.6, B=0.4), and the prediction result can also be (A=0.4, B=0.2), which leads to inaccurate and unstable prediction results. For many real-time systems that require stability, the fluctuation of the predicted value will cause the effect of the real-time system to change, thereby affecting the evaluation of the current effect.

[0036] Research shows that there are two types of uncertainty in modeling, one is epistemic uncertainty and the other is accidental uncertainty. Epistemic uncertainty is the uncertainty caused by the lack of training data, while accidental uncertainty is the uncertainty caused by the inability of training data to explain information.

[0037] For accidental uncertainty, there are data-dependent or heteroscedastic uncertainty, and task-dependent or homoscedastic uncertainty. Among them, task-dependent uncertainty refers to the inherent uncertainty difference between tasks, which can be used as the weight of the weighted polynomial loss.

[0038] Based on this, the weight ratio between tasks has always been a research and discussion direction for multi-task learning deep learning models. Previously, it was often determined as a hyperparameter through manual testing, but the weight ratio obtained in this way was often not optimal.

[0039] The embodiments of the present application provide a recommendation method, apparatus, computer device, computer-readable storage medium, and computer program product, which can solve the problem of poor robustness and low accuracy of recommendation results. The following describes an exemplary application of the computer device provided by the embodiments of the present application. The computer device provided by the embodiments of the present application can be implemented as various types of user terminals such as laptop computers, tablet computers, desktop computers, set-top boxes, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), smart phones, smart speakers, smart watches, smart TVs, and vehicle-mounted terminals. The following describes an exemplary application when the computer device is implemented as a server.

[0040] See also Figure 1 , Figure 1 It is a schematic diagram of the network architecture of the recommendation system 100 provided in an embodiment of the present application. To support a recommendation application, the terminal 200 is connected to the server 400 via the network 300. The network 300 may be a wide area network or a local area network, or a combination of the two.

[0041] Taking content retrieval as an example, terminal 200 is used to receive retrieval keywords and send the retrieval keywords to server 400; server 400 is used to obtain multiple content to be recommended based on the retrieval keywords, and server 400 obtains a trained multi-task sorting model, wherein the trained multi-task sorting model is trained using a joint loss function, and the joint loss function is determined based on the loss function of each task and the scaling factor corresponding to each task; the trained multi-task sorting model is then used to sort the multiple content to be recommended to obtain a sorting result; finally, the recommendation result corresponding to the retrieval keyword is determined based on the sorting result, and the recommendation result is sent to terminal 200 to present the recommendation result through terminal 200.

[0042] In some embodiments, the terminal 200 is used to receive a search keyword and send a model acquisition request to the server 400 based on the search keyword. The server 400 returns the trained multi-task sorting model to the terminal 200 based on the model acquisition request, wherein the trained multi-task sorting model is trained using a joint loss function, and the joint loss function is determined based on the loss function of each task and the scaling factor corresponding to each task; the terminal 200 obtains multiple contents to be recommended, and uses the trained multi-task sorting model to sort the multiple contents to be recommended to obtain a sorting result; the terminal 200 determines a recommendation result based on the sorting result, and outputs the recommendation result.

[0043] In an embodiment of the present application, taking the example of the ranking results and recommendation results determined by the server 400, the server 400 can overcome the shortcomings of the loss functions corresponding to each task based on the joint loss function, integrate the advantages of each loss function, and avoid the problem of missing sequence information or poor stability. The joint loss function can fully consider the complete sequence information and has strong stability, ensuring that the ranking results obtained using the trained multi-task ranking model are stable and have good ranking effects, ultimately improving the robustness and accuracy of the recommendation results.

[0044] In some embodiments, the server 400 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal 200 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car-mounted smart terminal, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0045] See also Figure 2 , Figure 2 A schematic diagram of the structure of the server 400 provided in the embodiment of the present application, Figure 2 The server 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the server 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .

[0046] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0047] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0048] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0049] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0050] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0051] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0052] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;

[0053] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);

[0054] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.

[0055] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The recommendation device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., and includes the following software modules: a first acquisition module 4551, a sorting module 4552 and an output module 4553. These modules are logical, and therefore can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.

[0056] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the recommended method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), DSP, programmable logic device (Programmable Logic Device, PLD), complex programmable logic device (Complex Programmable Logic Device, CPLD), field programmable gate array (Field-Programmable Gate Array, FPGA) or other electronic components.

[0057] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0058] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning. The recommended method provided in the embodiments of this application mainly involves machine learning technology, which is described below.

[0059] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.

[0060] The recommended method provided in the embodiment of the present application will be described in conjunction with the exemplary application and implementation of the terminal server provided in the embodiment of the present application.

[0061] The following describes the recommendation method provided by the embodiment of the present application. As mentioned above, the computer device implementing the recommendation method of the embodiment of the present application may be a terminal, a server, or a combination of the two. Therefore, the execution subject of each step will not be repeatedly described below.

[0062] It should be noted that the examples of the recommendation method below are based on content recommendation. Those skilled in the art may apply the recommendation method provided in the embodiments of the present application to recommendations in other fields based on their understanding of the following.

[0063] See also Figure 3 , Figure 3 This is a schematic diagram of an implementation flow of a recommended method provided in an embodiment of the present application. The method is applied to a computer device. Figure 3 The steps shown are used to illustrate the recommended method provided in the embodiment of the present application. Figure 3 The execution subject is the server.

[0064] In step S101, a plurality of objects to be recommended and a trained multi-task ranking model are obtained.

[0065] In an embodiment of the present application, the trained multi-task sorting model is trained using a joint loss function, and the joint loss function is determined based on the loss function of each task and the scaling factor corresponding to each task. Among them, the trained multi-task sorting model can be a neural network model, for example, a feedforward neural network, a convolutional neural network, a recurrent neural network, a long short-term memory network, etc.

[0066] In some embodiments, a training sample set and an initial multi-task sorting model may be first obtained, and then a joint loss function may be constructed based on the loss functions of different tasks and the scaling factors of different loss functions, and finally the initial multi-task sorting model may be trained based on the training sample set and the joint loss function to obtain a trained multi-task sorting model. The trained multi-task sorting model is trained in advance, and based on this, the trained multi-task sorting model may be directly obtained.

[0067] In some embodiments, the object to be recommended may be a published paper, journal, image, short video, song, film and television drama, etc. The object to be recommended may be a set of objects related to the search.

[0068] Through the above step S101, multiple objects to be recommended and a trained multi-task sorting model are obtained. The trained multi-task sorting model is obtained by training with a joint loss function, and the joint loss function is determined based on the loss function of each task and the scaling factor corresponding to each task. In this way, multiple objects to be recommended and the trained multi-task sorting model provide a data basis for subsequent sorting processing.

[0069] In step S102, a plurality of objects to be recommended are sorted using the trained multi-task sorting model to obtain a sorting result.

[0070] In some embodiments, multiple objects to be recommended may be simultaneously input into a trained multi-task ranking model. Combined with the ranking function of the trained multi-task ranking model, the trained multi-task ranking model may be able to rank the multiple objects to be recommended and obtain a ranking result.

[0071] In some embodiments, taking the trained multi-task sorting model as a neural network model as an example, the sorting process may include data preprocessing, input data, forward propagation, output results, decoding and post-processing, and output sorting results. Among them, data preprocessing includes preprocessing operations on multiple objects to be recommended, such as normalization, size adjustment, word segmentation, word vectorization, etc., to ensure that the input data meets the input requirements of the trained multi-task sorting model. The input data includes inputting the preprocessed data into the trained multi-task sorting model, and the trained multi-task sorting model will calculate the output layer by layer according to the definition during the previous training. Forward propagation, through a series of weighted and nonlinear transformations, the input data is converted into output results layer by layer until the last layer output is reached. The output result, the output result of the last layer is used as the final output of the entire neural network, and it is recorded. Decoding and post-processing, according to the needs of the sorting task, the output of the trained multi-task sorting model is decoded and post-processed. For example, the softmax function can be used to convert the output into a probability distribution and sort according to the probability size. Output sorting results, present the decoding and post-processing sorting results to the application, and complete the sorting process of multiple objects to be recommended.

[0072] In some embodiments, in the forward propagation, each neuron multiplies the output of the previous layer by its own weight, adds a bias term, and then obtains its output value through an activation function. This output value becomes the input of the next layer of neurons, thus advancing layer by layer until the output result of the last layer is generated.

[0073] Exemplarily, assuming that multiple objects to be recommended include object to be recommended 1, object to be recommended 2, object to be recommended 3, object to be recommended 4, object to be recommended 5, object to be recommended 6, object to be recommended 7, object to be recommended 8, object to be recommended 9 and object to be recommended 10, these objects to be recommended are sorted by the trained multi-task sorting model, and the sorting results obtained can be object to be recommended 5, object to be recommended 3, object to be recommended 1, object to be recommended 10, object to be recommended 8, object to be recommended 6, object to be recommended 4, object to be recommended 2, object to be recommended 9 and object to be recommended 7.

[0074] Through the above step S102, the trained multi-task ranking model is used to sort multiple objects to be recommended to obtain a sorting result, that is, to obtain multiple sorted objects to be recommended. In some embodiments, when recommendations are made based on search terms, the recommended objects can be sorted in order from strong to weak in terms of the degree of association with the search terms. Since the trained multi-task ranking model is trained using a joint loss function, and the joint loss function is determined based on the loss function of each task and the scaling factor corresponding to each task, the joint loss function can overcome the problems existing in the loss function of each task, integrate the advantages of each loss function, and avoid the problem of missing sequence information or poor stability. The joint loss function can fully consider the complete sequence information and has strong stability. Based on this, the sorting result obtained by the trained multi-task ranking model has strong stability and good sorting effect, which ultimately improves the robustness and accuracy of the recommendation results.

[0075] In step S103, a recommendation result is determined based on the ranking result, and the recommendation result is output.

[0076] In some embodiments, the recommendation result is the content that is ultimately displayed, output, or presented.

[0077] In some embodiments, the first N objects to be recommended in the sorting results may be determined as target objects to be recommended, where N is a positive integer less than or equal to the total number of objects to be recommended; and then the target object to be recommended is determined as the recommendation result.

[0078] Exemplarily, assuming that the total number of objects to be recommended is 100, N may be 20, and the first 20 objects to be recommended in the sorting results are determined as target recommended objects, and the target recommended objects are determined as the recommendation results.

[0079] Through the above step S103, in order to shorten the display processing time and improve the display efficiency, the first N recommended objects in the sorting results can be determined as the target recommended objects, and the target recommended objects can be determined as the recommendation results, and finally the recommendation results are output to improve the diversity and flexibility of the output.

[0080] Through the above steps S101 to S103, the trained multi-task ranking model is used to rank multiple objects to be recommended to obtain a ranking result; then the recommendation result is determined and output based on the ranking result. Among them, the trained multi-task ranking model is trained using a joint loss function, and the joint loss function is determined based on the loss function of each task and the scaling factor corresponding to each task. In this way, the joint loss function can overcome the shortcomings of the loss function corresponding to each task, integrate the advantages of each loss function, and avoid the problem of missing sequence information or poor stability. The joint loss function can fully consider the complete sequence information and ensure that the ranking result obtained using the trained multi-task ranking model is stable, and finally improve the robustness and accuracy of the recommendation result.

[0081] In some embodiments, each task includes at least a first task and a second task. Before executing the above step S101, a trained multi-task sorting model needs to be obtained through training. Figure 4 , the trained multi-task sorting model can be obtained by following the steps S001 to S005, which are described in detail below.

[0082] In step S001, a training sample set and an initial multi-task sorting model are obtained.

[0083] In the embodiment of the present application, the training sample includes sample data and sample labels, and the training sample can be a text training sample, an image training sample, a video training sample, etc. For example, if the training sample is a text training sample, the sample data can be text data, and the sample label can be at least one of a category, a subject, a release date, etc. corresponding to the text.

[0084] In some embodiments, the initial multi-task sorting model is a model that combines multiple sorting tasks for sorting, and the model parameters of the initial multi-task sorting model are initial model parameters, which are model parameters that have not been trained. Among them, the multiple sorting tasks can be sorting tasks of different types, and the multiple sorting tasks can include 2 different sorting tasks, 3 different sorting tasks, 5 different sorting tasks, etc.

[0085] In step S002, a first sample set and a second sample set are respectively constructed based on the training sample set.

[0086] In an embodiment of the present application, the first sample set and the second sample set are sample sets of different tasks. Exemplarily, the first sample set may be a sample set of a binary classification task, and the second sample set may be a sample set of a sorting task. The first sample set may be a single sample set, and the second sample set may be a sample pair set. Similarly, the first sample set includes a first sample data set and a first sample label, and the second sample set includes a second sample data set and a second sample label.

[0087] In some embodiments, see Figure 5 Step S002 can be implemented by following steps S021 to S023, which are described in detail below.

[0088] In step S021, the training sample set is determined as the first sample set.

[0089] In the embodiment of the present application, each training sample data of the training sample set is determined as the first sample data of the first sample set, and each training sample label of the training sample set is determined as the first sample label of the first sample set.

[0090] In step S022, each training sample in the training sample set is paired with each other to obtain a plurality of sample pairs.

[0091] In some embodiments, the training samples may be paired in pairs to obtain a plurality of sample pairs. For example, 10 training samples may be paired in pairs to obtain 45 sample pairs.

[0092] In some embodiments, the training sample data of the training samples are paired in pairs to obtain sample data of multiple sample pairs; then, based on the sample label of the first sample and the sample label of the second sample in each sample pair, the sample label of the sample pair is determined. Exemplarily, when the sample label is a numerical value representing the association between the sample data and a certain feature, if the sample label of the first sample is greater than the sample label of the second sample, the sample label of the sample pair can be recorded as 1; if the sample label of the first sample is less than or equal to the sample label of the second sample, the sample label of the sample pair can be recorded as 0.

[0093] In step S023 , a plurality of sample pairs are determined as a second sample set.

[0094] Through the above steps S021 to S023, the first sample set and the second sample set are generated using the same training sample set, ensuring the consistency of the sources of the first sample set and the second sample set, so as to realize the processing of sample sets with the same source using different multiple tasks, and finally obtain the processing results for the training sample set.

[0095] Continue to see Figure 4 , and the description continues with step S002 above.

[0096] In step S003, a first loss function of the first task and a first scaling factor of the first loss function are obtained, and a second loss function of the second task and a second scaling factor of the second loss function are obtained.

[0097] In some embodiments, based on different error algorithms, the loss function of the first task may correspond to different loss functions, and the first loss function may be the corresponding loss function of the first task under any error algorithm. Similarly, based on different error algorithms, the loss function of the second task may correspond to different loss functions, and the second loss function may be the corresponding loss function of the second task under any error algorithm.

[0098] In some embodiments, the first scaling factor and the second scaling factor can be two different parameters, wherein the first scaling factor is the scaling factor corresponding to the first loss function under the first task condition, and the second scaling factor is the scaling factor corresponding to the second loss function under the second task condition, wherein the final values ​​of the first scaling factor and the second scaling factor are obtained by training the initial multi-task sorting model, that is, the final values ​​of the first scaling factor and the second scaling factor are obtained by self-learning.

[0099] In step S004, a joint loss function is constructed based on the first loss function, the first scaling factor, the second loss function and the second scaling factor.

[0100] In some embodiments, see Figure 6 Step S004 can be implemented by following the steps S041 to S043, which are described in detail below.

[0101] In step S041 , a scaled first loss function is determined based on the first loss function and the first scaling factor.

[0102] In some embodiments, see Figure 7 Step S041 can be implemented by following the steps S411 to S413, which are described in detail below.

[0103] In step S411, the first loss function is weighted based on the first scaling factor to obtain a weighted result.

[0104] In some embodiments, the square of the first scaling factor may be determined first, and then the reciprocal of the square may be determined, and finally the reciprocal may be multiplied by the first loss function to obtain a weighted result. For example, the weighted result may be determined by the following formula (1).

[0105]

[0106] Among them, w represents the weighted result, σ1 represents the first scaling factor, and L1 represents the first loss function.

[0107] In step S412, logarithm processing is performed on the first scaling factor to obtain a logarithmic value of the first scaling factor.

[0108] In some embodiments, the first scaling factor may be logarithmically processed with the natural constant e as the base to obtain a logarithmic value.

[0109] In step S413, the sum of the weighted result and the logarithmic value is determined as the scaled first loss function.

[0110] In the embodiment of the present application, the weighted result of the above step S411 and the logarithmic value of step S412 are summed to obtain a summed result, and the summed result is determined as the scaled first loss function.

[0111] Exemplarily, the scaled first loss function may be determined by the following formula (2).

[0112]

[0113] Among them, L 1new represents the first loss function after scaling, σ1 represents the first scaling factor, and L1 represents the first loss function.

[0114] Continue to see Figure 6 , and the description continues with step S041 above.

[0115] In step S042, a scaled second loss function is determined based on the second loss function and the second scaling factor.

[0116] In some embodiments, the process of determining the scaled second loss function is similar to the process of determining the scaled first loss function described above. Based on this, the implementation process of step S042 may refer to the implementation process of step S041 described above.

[0117] In step S043, a weighted sum is performed on the scaled first loss function and the scaled second loss function to obtain a joint loss function.

[0118] In an embodiment of the present application, the first loss function can be multiplied by a preset first weight to obtain a first multiplication result; then the second loss function can be multiplied by a preset second weight to obtain a second multiplication result; finally, the sum of the first multiplication result and the second multiplication result is determined as a joint loss function.

[0119] In some embodiments, when the preset first weight and the preset second weight are both 1, the scaled first loss function and the scaled second loss function are directly added, that is, the results of the above step S401 and the above step S042 are added to obtain a joint loss function. Exemplarily, the joint loss function can be expressed as the following formula (3):

[0120] L=L 1new +L 2new Formula (3);

[0121] Among them, L represents the joint loss function, L 1new represents the first loss function after scaling, L 2new represents the scaled second loss function.

[0122] Continue to see Figure 4 , and the description continues with step S004 above.

[0123] In step S005, based on the first sample set, the second sample set and the joint loss function, the initial multi-task sorting model is trained until the training end condition is met, thereby obtaining a trained multi-task sorting model.

[0124] In some embodiments, the first sample set is a sample set of a first task, and the second sample set is a sample set of a second task, see Figure 8 Step S005 can be implemented by following the steps S051 to S055, which are described in detail below.

[0125] In step S051, the initial multi-task ranking model is used to perform prediction processing on the first sample data set of the first sample set and the second sample data set of the second sample set, respectively, to obtain a first prediction result and a second prediction result respectively.

[0126] In an embodiment of the present application, the first sample data set and the second sample data set may be respectively input into an initial multi-task ranking model to obtain a first prediction result for the first sample data set and a second prediction result for the second sample data set.

[0127] Taking the initial multi-task sorting model as a neural network model as an example, the initial multi-task sorting model has completed the initialization of weights and biases. In some embodiments, uniform distribution or Gaussian distribution can be used to randomly initialize weights and biases. Based on this, for the first sample data set, the first sample data is first preprocessed, such as normalization, standardization, scaling, noise reduction, word segmentation, etc. Then the first sample data is input into the initial multi-task sorting model, and the first prediction value is determined by forward propagation.

[0128] In some embodiments, the prediction for the second sample data set may refer to the above prediction for the first sample data set, thereby obtaining a second prediction result.

[0129] In step S052, a first loss value is determined based on the first sample label, the first prediction result and the first loss function of the first sample set, and a second loss value is determined based on the second sample label, the second prediction result and the second loss function of the second sample set.

[0130] In some embodiments, the first sample label and the first prediction result may be input into a first loss function to obtain a first loss value, wherein the first loss function may be used to determine the error between each first sample label and the corresponding first prediction result, and then the sum of each error may be determined as the first loss value.

[0131] In some embodiments, the process of determining the second loss value is similar to the process of determining the first loss value described above. Based on this, the process of determining the second loss value based on the second sample label of the second sample set, the second prediction result and the second loss function can refer to the process of determining the first loss value described above.

[0132] In step S053, a first initial value of the first scaling factor and a second initial value of the second scaling factor are acquired.

[0133] In some embodiments, the first initial value and the second initial value may be default values ​​or set values, and the two may be the same or different. For example, the first initial value may be 2, 5, 8, etc., and the second initial value may be 3, 6, 8, etc. Since the first scaling factor and the second scaling factor are self-learned during the model training process to obtain the final values ​​of the first scaling factor and the second scaling factor, the value ranges of the first initial value and the second initial value are not limited.

[0134] In step S054, the first loss value, the second loss value, the first initial value and the second initial value are substituted into the joint loss function to obtain the joint loss value of the initial multi-task sorting model.

[0135] In an embodiment of the present application, the first loss value, the second loss value, the first initial value, and the second initial value are used to replace the parameters in the joint function accordingly, that is, the first loss function is replaced by the first loss value, the second loss function is replaced by the second loss value, the first initial value is used to replace the first scaling factor, and the second initial value is used to replace the second scaling factor; based on this, the output value of the joint loss function is the joint loss value of the initial multi-task sorting model.

[0136] In step S055, the initial multi-task sorting model, the first scaling factor and the second scaling factor are back-propagated and trained based on the joint loss value until the training end condition is reached to obtain a trained multi-task sorting model.

[0137] In some embodiments, the training end condition may be that the number of training times reaches a threshold number, or that the joint loss value is less than an error threshold.

[0138] In some embodiments, when the training end condition is that the number of training times reaches the number threshold, the number threshold is a value set in advance, and illustratively, the number threshold can be 500 times, 1000 times, 2000 times, etc. Based on this, when the number of training times reaches the number threshold, the training is ended, the model parameters are obtained, and thus a trained multi-task sorting model is obtained. At the same time, the first value corresponding to the first scaling factor and the second value corresponding to the second scaling factor are also obtained.

[0139] In other embodiments, when the training end condition is that the joint loss value is less than the error threshold, the error threshold may be a value set in advance, and for example, the error threshold may be 0.2, 0.5, 0.8, etc. Based on this, when the joint loss value is less than the error threshold, the training is ended, the model parameters are obtained, and thus a trained multi-task sorting model is obtained. At the same time, a first scaling value corresponding to the first scaling factor and a second scaling value corresponding to the second scaling factor are also obtained.

[0140] Through the above steps S001 to S005, the first sample data set and the second sample data set are respectively predicted and processed by the initial multi-task sorting model to obtain the first prediction result corresponding to the first sample data set and the second prediction result corresponding to the second sample data set; then the first sample label and the first prediction result are input into the first loss function to obtain the first loss value; the second sample label and the second prediction result are also input into the second loss function to obtain the second loss value; then, the first loss value, the second loss value, the first initial value of the first scaling factor and the second initial value of the second scaling factor are substituted into the joint loss function to obtain the joint loss value; finally, the initial multi-task sorting model, the first scaling factor and the second scaling factor are back-propagated and trained based on the joint loss value, and when the preset number of times is reached or the joint loss value is less than the error threshold, the trained multi-task sorting model is obtained, and the first scaling value corresponding to the first scaling factor and the second scaling value corresponding to the second scaling factor are also obtained. Based on this, since the joint loss function can fully consider the complete sequence information and achieve the purpose of strong stability, the trained multi-task sorting model obtained by training has the advantages of strong sorting stability and high sorting accuracy.

[0141] In some embodiments, for a recommendation scenario, only one training based on training samples is required to obtain a trained multi-task ranking model without repeated training. The trained multi-task ranking model can be applied to any recommendation task of the object to be recommended in the recommendation scenario.

[0142] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.

[0143] The embodiment of the present application proposes a method for fusion of single sample (point-wise) and sample pair (pair-wise) sorting losses based on uncertainty weights. This method is suitable for business scenarios that require sorting, such as recommendation, advertising prediction and other business scenarios. This method is a deep learning learning to rank (LTR) loss function fusion method. It can be compatible with the advantages of single sample and sample pair losses and improve the sorting effect. Among them, the single sample corresponds to the first sample set in other embodiments, and the sample pair corresponds to the second sample set in other embodiments.

[0144] In some embodiments, the method provided by the embodiment of the present application can be used in scenarios related to ranking learning, such as recommendation systems, advertising ranking, etc. In terms of the algorithm dimension, the method provided by the embodiment of the present application can be combined with any deep model related to ranking.

[0145] In the embodiment of the present application, the loss function of a single sample and the loss function distance of a sample pair are used as an example.

[0146] In some embodiments, for the loss function of a single sample, the loss function corresponds to the first loss function in other embodiments, and the loss function determines the first K samples in the sorting as positive samples and the remaining samples as negative samples. The loss function can be expressed by the following formula (4):

[0147] Loss(x,y)=ylog e (sigmoid(f(x)))+(1-y)log e (1-sigmoid(f(x))) Formula (4);

[0148] Where x is the sample feature, y is the sample label, and f(x) is the prediction of the deep model for the sample. When the sample is ranked in the top K, y is 1, otherwise y is 0. The sample feature corresponds to the sample data in other embodiments.

[0149] In some embodiments, the loss function for sample pairs corresponds to the second loss function in other embodiments, and the loss function pairs samples in pairs. Taking Bayesian Personalized Ranking Loss (BPR-Loss) as an example, the loss function can be expressed by the following formula (5):

[0150] Loss(x a ,x b ,y)=ylog e (sigmoid(f(x a )-f(x b )))+(1-y)log e(1-sigmoid(f(x a )-f(x b )))Formula (5);

[0151] Among them, x a is the feature of sample a in the sample pair, x b is the feature of sample b in the sample pair, y is the sample label, f(x a ) is the deep model for sample features x a The prediction of f(x b ) is the deep model for sample features x b When sample a is ranked before sample b, y is 1, otherwise y is 0.

[0152] In some embodiments, a scaling factor is introduced into the sigmoid function for the binary classification task, as shown in formula (6).

[0153]

[0154] Among them, σ1 refers to the scaling factor corresponding to the binary classification task.

[0155] Based on the above formula (4) and formula (6), the loss function of the scaled single sample can be expressed as the following formula (7):

[0156]

[0157] Among them, σ1 is the scaling factor corresponding to the single sample loss function in the binary classification task, Loss(x,y) is the loss function of the single sample corresponding to the above formula (4), and the scaling factor corresponds to the loss function one by one.

[0158] In some embodiments, similar to the binary classification of the above formula (6), a scaling factor is introduced to obtain the following formula (8):

[0159]

[0160] Among them, σ2 is the scaling factor corresponding to the sorting task.

[0161] In some embodiments, combining the above formula (5), formula (7) and formula (8), for the sorting task, similar to the above binary classification task, the loss function of the scaled sample pair can be expressed as the following formula (9):

[0162]

[0163] Among them, σ2 is the scaling factor corresponding to the loss function of the sample pair in the sorting task, Loss(x a ,x b,y,σ2) is the loss function of the sample pair corresponding to the above formula (5).

[0164] Combining the above formula (7) and formula (9), the final loss function can be expressed as the following formula (10):

[0165]

[0166] Among them, Loss pointwise is the loss function of a single sample corresponding to the above formula (4), Loss pairwise is the loss function of the sample pair corresponding to the above formula (5). The final loss function corresponds to the joint loss function in other embodiments.

[0167] The embodiments of the present application are illustrated by taking formula (4) and formula (5) as examples. In some embodiments, the loss function may be a loss function in other forms. For example, the loss function of a single sample may be in the form of multiple segmented binary classifications, and the loss function of a sample pair may be a hinge loss function.

[0168] In some embodiments, the final loss function in the above formula (10) can be applied to any deep model, see Fig. 9 , Fig. 9 Taking the deep model training process as an example, the sample feature 901 is input into the deep model 90, and finally the loss value is determined based on the prediction result 902 of the deep model, the sample label 903 and the final loss function 904 to realize the training of the deep model 90. Among them, the deep model 90 can perform multiple tasks, and when performing multiple tasks, the sample feature 901 and sample label 903 used by each task are consistent.

[0169] In recommendation and ordered classification scenarios, such as content sorting, advertising sorting, etc., the ordering results obtained using the method provided in the embodiments of the present application are more robust, thereby achieving the purpose of improving business revenue, enhancing user experience, and reducing complaints.

[0170] It is understandable that in the embodiments of the present application, data related to objects to be recommended, training sample sets, etc. are involved, and the collection, use and processing of such data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0171] The following is a description of an exemplary structure of the recommendation device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the recommendation device 455 of the memory 450 may include:

[0172] A first acquisition module 4551 is used to acquire multiple objects to be recommended and a trained multi-task ranking model, wherein the trained multi-task ranking model is trained using a joint loss function, and the joint loss function is determined based on the loss function of each task and the scaling factor corresponding to each task;

[0173] A sorting module 4552 is used to sort the multiple objects to be recommended using the trained multi-task sorting model to obtain a sorting result;

[0174] The output module 4553 is used to determine the recommendation result based on the sorting result and output the recommendation result.

[0175] In some embodiments, the recommendation device 455 further includes:

[0176] The second acquisition module is used to acquire a training sample set and an initial multi-task sorting model;

[0177] A first construction module, configured to construct a first sample set and a second sample set based on the training sample set, wherein the first sample set and the second sample set are sample sets of different tasks;

[0178] A third acquisition module is used to acquire a first loss function of the first task and a first scaling factor of the first loss function, and to acquire a second loss function of the second task and a second scaling factor of the second loss function;

[0179] A second construction module, configured to construct the joint loss function based on the first loss function, the first scaling factor, the second loss function, and the second scaling factor;

[0180] A training module is used to train the initial multi-task sorting model based on the first sample set, the second sample set and the joint loss function until a training end condition is met to obtain a trained multi-task sorting model.

[0181] In some embodiments, the second building block is further configured to:

[0182] Determining a scaled first loss function based on the first loss function and the first scaling factor;

[0183] Determining a scaled second loss function based on the second loss function and the second scaling factor;

[0184] A weighted sum is performed on the scaled first loss function and the scaled second loss function to obtain the joint loss function.

[0185] In some embodiments, the second building block is further configured to:

[0186] Performing weighted processing on the first loss function based on the first scaling factor to obtain a weighted result;

[0187] Performing logarithm processing on the first scaling factor to obtain a logarithmic value of the first scaling factor;

[0188] The sum of the weighted result and the logarithmic value is determined as the scaled first loss function.

[0189] In some embodiments, the training module is further configured to:

[0190] Using the initial multi-task sorting model, respectively, predicting a first sample data set of the first sample set and a second sample data set of the second sample set, and obtaining a first prediction result and a second prediction result respectively;

[0191] Determine a first loss value based on a first sample label of the first sample set, the first prediction result, and the first loss function, and determine a second loss value based on a second sample label of the second sample set, the second prediction result, and the second loss function;

[0192] Obtaining a first initial value of the first scaling factor and a second initial value of the second scaling factor;

[0193] Substituting the first loss value, the second loss value, the first initial value, and the second initial value into the joint loss function to obtain a joint loss value of the initial multi-task sorting model;

[0194] Based on the joint loss value, back-propagation training is performed on the initial multi-task sorting model, the first scaling factor, and the second scaling factor until a training end condition is reached to obtain the trained multi-task sorting model.

[0195] In some embodiments, the first building block is further used to:

[0196] Determine the training sample set as the first sample set;

[0197] Pairing each training sample in the training sample set in pairs to obtain a plurality of sample pairs;

[0198] The plurality of sample pairs are determined as the second sample set.

[0199] In some embodiments, the output module 4553 is further used to:

[0200] Determine the first N objects to be recommended in the ranking result as target objects to be recommended, where N is a positive integer less than or equal to the total number of objects to be recommended;

[0201] The target object to be recommended is determined as the recommendation result.

[0202] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the recommended method described above in the embodiment of the present application.

[0203] The present application embodiment provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the recommended method provided by the present application embodiment, for example, Figure 3 and Figure 4 The recommended method is shown.

[0204] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0205] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0206] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0207] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0208] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A recommendation method, characterized in that: The method comprises: Acquire multiple objects to be recommended and a trained multi-task ranking model, wherein the trained multi-task ranking model is trained using a joint loss function, and the joint loss function is determined based on a loss function of each task and a scaling factor corresponding to each task; Using the trained multi-task ranking model to sort the multiple objects to be recommended, to obtain a ranking result; Determine a recommendation result based on the ranking result, and output the recommendation result.

2. The method according to claim 1, characterized in that Each of the tasks includes at least a first task and a second task, and the method further includes: Obtain training sample sets and initial multi-task sorting models; Constructing a first sample set and a second sample set based on the training sample set, respectively, wherein the first sample set and the second sample set are sample sets of different tasks; Obtain a first loss function of the first task and a first scaling factor of the first loss function, and obtain a second loss function of the second task and a second scaling factor of the second loss function; constructing the joint loss function based on the first loss function, the first scaling factor, the second loss function and the second scaling factor; Based on the first sample set, the second sample set and the joint loss function, the initial multi-task sorting model is trained until a training end condition is met to obtain a trained multi-task sorting model.

3. The method according to claim 2, characterized in that The constructing the joint loss function based on the first loss function, the first scaling factor, the second loss function and the second scaling factor includes: Determining a scaled first loss function based on the first loss function and the first scaling factor; Determining a scaled second loss function based on the second loss function and the second scaling factor; A weighted sum is performed on the scaled first loss function and the scaled second loss function to obtain the joint loss function.

4. The method according to claim 3, characterized in that The step of determining a scaled first loss function based on the first loss function and the first scaling factor includes: Performing weighted processing on the first loss function based on the first scaling factor to obtain a weighted result; Performing logarithm processing on the first scaling factor to obtain a logarithmic value of the first scaling factor; The sum of the weighted result and the logarithmic value is determined as the scaled first loss function.

5. The method according to claim 2, characterized in that: The first sample set is a sample set of the first task, the second sample set is a sample set of the second task, and the initial multi-task sorting model is trained based on the first sample set, the second sample set and the joint loss function until a training end condition is reached to obtain a trained multi-task sorting model, including: Using the initial multi-task sorting model, respectively, predicting a first sample data set of the first sample set and a second sample data set of the second sample set, and obtaining a first prediction result and a second prediction result respectively; Determine a first loss value based on a first sample label of the first sample set, the first prediction result, and the first loss function, and determine a second loss value based on a second sample label of the second sample set, the second prediction result, and the second loss function; Obtaining a first initial value of the first scaling factor and a second initial value of the second scaling factor; Substituting the first loss value, the second loss value, the first initial value, and the second initial value into the joint loss function to obtain a joint loss value of the initial multi-task sorting model; Based on the joint loss value, back-propagation training is performed on the initial multi-task sorting model, the first scaling factor, and the second scaling factor until a training end condition is reached to obtain the trained multi-task sorting model.

6. The method according to any one of claims 2 to 5, characterized in that The step of constructing the first sample set and the second sample set based on the training sample set comprises: Determine the training sample set as the first sample set; Pairing each training sample in the training sample set in pairs to obtain a plurality of sample pairs; The plurality of sample pairs are determined as the second sample set.

7. The method according to any one of claims 1 to 5, characterized in that The determining of the recommendation result based on the sorting result includes: Determine the first N objects to be recommended in the ranking result as target objects to be recommended, where N is a positive integer less than or equal to the total number of objects to be recommended; The target object to be recommended is determined as the recommendation result.

8. A recommendation device, characterized in that: The device comprises: A first acquisition module is used to acquire multiple objects to be recommended and a trained multi-task ranking model, wherein the trained multi-task ranking model is trained using a joint loss function, and the joint loss function is determined based on the loss function of each task and the scaling factor corresponding to each task; A sorting module, used to sort the multiple objects to be recommended using the trained multi-task sorting model to obtain a sorting result; An output module is used to determine a recommendation result based on the sorting result and output the recommendation result.

9. A computer device, characterized in that: The computer device comprises: A memory for storing computer executable instructions; A processor, configured to implement the recommendation method according to any one of claims 1 to 7 when executing the computer executable instructions stored in the memory.

10. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a processor, the recommendation method according to any one of claims 1 to 7 is implemented.

11. A computer program product comprising a computer program or computer executable instructions, characterized in that: When the computer program or computer executable instructions are executed by a processor, the recommendation method according to any one of claims 1 to 7 is implemented.