Resource recommendation method and device, equipment and storage medium
By using the sample weight predicted by the confidence model in the recommendation model to affect the gradient propagation of non-confidence samples, the problem of degradation of recommendation accuracy in immersive video playback scenarios is solved, and a higher resource recommendation accuracy is achieved.
Patent Information
- Application Number
- CN202311177551.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-03-11
AI Technical Summary
In immersive video playback scenarios, the system automatically carousels lead to a large number of samples of active behavior without users, and the recommendation model is difficult to accurately judge the user's interest in the content, resulting in a decrease in recommendation accuracy.
By calling the confidence model to predict the sample weight of the non-confidence samples and affecting gradient propagation in the recommended model, increasing the usage of the non-confidence samples in the recommended model, thereby improving the accuracy of recommendation.
Improve the accuracy of resource recommendations, and enhance the performance of the recommendation model by effectively utilizing inconfidence samples, ensuring that the recommendation results are more in line with user interests.
Smart Images

Figure CN119598003A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a resource recommendation method, apparatus, device and storage medium. Background Art
[0002] In the current immersive video playback scenario, the video starts playing automatically as soon as it is exposed, and users do not need to actively click to select their favorite items. If the user is interested in the video content, they will watch it for a while, otherwise they will quickly swipe away. It can be seen that in the immersive scene, the playback time of the video is one of the indicators that best reflects the recommendation effect. In the current immersive video playback scenario, there are usually two modes, one is "system automatic carousel + user active swipe up"; the other is "system automatic swipe up".
[0003] In the scenario of "system automatic carousel + user active swiping up", the user may not be interested in the current video content and swipe up in advance; or be interested in the current content and play it in a loop, and eventually swipe up to play the next video content. In this interactive mode, almost every content has active user operations (unless the user directly exits the scene), and these active behaviors provide accurate supervisory signals for the training process of the recommendation model. In the scenario of "system automatic swiping up", the system replaces the user's operation and generates a large number of samples without user active behavior. If a sample does not have active user behavior feedback, even if the playback completion rate (play_time / video_time) = 100%, we cannot confirm whether the user is interested in the content (there may be 1. The satisfactory video is watched; 2. The system automatically cuts away the unsatisfactory video after waiting for it to finish playing), that is, the supervisory signal from the user is fuzzy (such samples are also called untrusted samples). In this scenario, it is unreasonable for the recommendation model to still treat samples with a playback completion rate of 100% as positive samples.
[0004] In summary, there is an urgent need for a solution that can increase the utilization rate of untrusted samples and thus improve the accuracy of recommendations. Summary of the invention
[0005] The embodiments of the present application provide a resource recommendation method, apparatus, device and storage medium for improving the accuracy of resource recommendation.
[0006] In view of this, on the one hand, the present application provides a resource recommendation method, including: obtaining a resource object to be processed; calling a recommendation model to perform predictive processing on the resource object to be processed to obtain a recommendation result of the resource to be processed, the recommendation model is trained based on confident samples, unconfident samples and sample weights of the unconfident samples, the sample weights of the unconfident samples are predicted by calling a confident model, the confident model is trained based on the confident samples, the confident samples are samples of interactive behavior between the object and the resource object, and the unconfident samples are samples of no interactive behavior between the object and the resource object; recommending the resource object to be processed according to the recommendation result.
[0007] On the other hand, the present application provides a resource recommendation device, including: an acquisition module, used to acquire a resource object to be processed;
[0008] A processing module, used for calling a recommendation model to perform prediction processing on the resource object to be processed to obtain a recommendation result of the resource to be processed, wherein the recommendation model is trained based on a confident sample, an unconfident sample and a sample weight of the unconfident sample, wherein the sample weight of the unconfident sample is predicted by calling a confident model, wherein the confident model is trained based on the confident sample, wherein the confident sample is a sample in which an interactive behavior exists between the object and the resource object, and the unconfident sample is a sample in which no interactive behavior exists between the object and the resource object;
[0009] The recommendation module is used to recommend the resource object to be processed according to the recommendation result.
[0010] In a possible design, in another implementation of another aspect of the embodiment of the present application, the acquisition module is used to acquire an initial recommendation model, an initial confidence model, the confidence sample, and the unconfident sample;
[0011] The device also includes a training module, the training module is used to train the initial confidence model based on the confidence sample to obtain the confidence model, and train the initial recommendation model based on the confidence sample to obtain an intermediate recommendation model;
[0012] Calling the target confidence model to determine the sample weight of the unconfident sample, and calling the intermediate recommendation model to determine the first loss value of the unconfident sample;
[0013] The intermediate recommendation model is trained based on the sample weight and the first loss value to obtain the recommendation model.
[0014] In one possible design, in another implementation of another aspect of the embodiment of the present application, the training module is used to call the confidence model to predict and obtain a predicted label of the unconfident sample;
[0015] The sample weight is determined according to the true label of the unconfident sample and the predicted label.
[0016] In one possible design, in another implementation of another aspect of the embodiment of the present application, the training module is used to take an absolute value of a difference between the actual annotation and the predicted annotation to obtain a first value;
[0017] The sample weight is obtained by subtracting the first value from 1.
[0018] In one possible design, in another implementation of another aspect of the embodiment of the present application, the acquisition module is used to acquire training targets of the initial confidence model, and the number of the training targets is greater than or equal to 1;
[0019] The processing module is used to set the true label according to the training target, wherein one training target corresponds to one true label, and one true label corresponds to one predicted label.
[0020] In one possible design, in another implementation of another aspect of the embodiment of the present application, the training objectives of the initial confidence model include at least one of the video playback completion rate, the video scrolling rate within a preset time length, the like rate within a preset time length, and the comment rate within a preset time length.
[0021] In one possible design, in another implementation of another aspect of the embodiment of the present application, the processing module is used to set the true label of the untrusted sample to 1 when the video playback completion rate is a training target;
[0022] and / or,
[0023] When the video pass rate within the preset time is the training target, the true label of the untrusted sample is set to 0;
[0024] and / or,
[0025] When the like rate within the preset time is the training target, the true label of the untrusted sample is set to 0;
[0026] and / or,
[0027] When the comment rate within the preset time period is the training target, the true label of the untrusted sample is set to 0.
[0028] In one possible design, in another implementation of another aspect of the embodiment of the present application, the training module is used to multiply the sample weight and the first loss value to obtain a second loss value;
[0029] The intermediate recommendation model is trained according to the second loss value to obtain the recommendation model.
[0030] In one possible design, in another implementation of another aspect of an embodiment of the present application, when the training objective of the initial confidence model is the same as the training objective of the initial recommendation model, the training module is used to multiply the sample weight and the first loss value according to a one-to-one correspondence rule to obtain the second loss value.
[0031] In one possible design, in another implementation of another aspect of the embodiment of the present application, the input structure of the initial confidence model is the same as the input structure of the initial recommendation model.
[0032] In one possible design, in another implementation of another aspect of the embodiment of the present application, the acquisition module is used to acquire the interactive behavior and the playback completion rate of the sample;
[0033] The processing module is used to determine that the sample is a trusted sample when there is interactive behavior in the sample; and to determine that the sample is an untrusted sample when the playback completion rate of the sample is equal to 100% and there is no interactive behavior in the sample.
[0034] In one possible design, in another implementation of another aspect of the embodiment of the present application, the network structure of the initial recommendation model includes but is not limited to a coarse sorting model, a fine sorting model, a double tower sorting model or a rerank sorting model.
[0035] Another aspect of the present application provides a computer device, including: a memory, a processor, and a bus system;
[0036] Wherein, the memory is used to store programs;
[0037] The processor is used to execute the program in the memory, and the processor is used to execute the above-mentioned methods according to the instructions in the program code;
[0038] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
[0039] Another aspect of the present application provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the above-mentioned methods.
[0040] Another aspect of the present application provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided by the above aspects.
[0041] It can be seen from the above technical scheme that the embodiments of the present application have the following advantages: for untrusted samples in the recommendation scenario, the sample weights are predicted through the confidence model, and the gradient propagation of the untrusted samples in the recommendation model is affected according to the sample weights, thereby increasing the utilization rate of the untrusted samples in the recommendation model, and then increasing the recommendation accuracy of the recommendation model, that is, improving the accuracy of resource recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of an application scenario architecture for information recommendation in an embodiment of the present application;
[0043] Figure 2a A schematic diagram of a training architecture for jointly training a recommendation model and a confidence model in an embodiment of the present application;
[0044] Figure 2b A schematic diagram of dividing samples in a sample space in an embodiment of the present application;
[0045] Figure 2c A schematic diagram of the effect of the sample weight of an untrusted sample output by a confidence model on the loss value of the untrusted sample in the recommendation model in an embodiment of the present application;
[0046] Figure 2d Another schematic diagram of the effect of the sample weight of an untrusted sample output by a confidence model on the loss value of the untrusted sample in the recommendation model in an embodiment of the present application;
[0047] Figure 2e Another schematic diagram of the effect of the sample weight of an untrusted sample output by a confidence model on the loss value of the untrusted sample in the recommendation model in an embodiment of the present application;
[0048] Figure 3 A schematic diagram of an embodiment of the information recommendation method in the embodiment of the present application;
[0049] Figure 4 This is another schematic diagram of an embodiment of the information recommendation device in the embodiment of the present application;
[0050] Figure 5 This is another schematic diagram of an embodiment of the information recommendation device in the embodiment of the present application;
[0051] Figure 6 This is another schematic diagram of an embodiment of the information recommendation device in the embodiment of the present application;
[0052] Figure 7 This is a schematic diagram of another embodiment of the information recommendation device in the embodiment of the present application. DETAILED DESCRIPTION
[0053] The embodiments of the present application provide a resource recommendation method, apparatus, device and storage medium for improving the accuracy of resource recommendation.
[0054] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0055] In the current immersive video playback scenario, the video starts playing automatically as soon as it is exposed, and users do not need to actively click to select their favorite items. If the user is interested in the video content, he will watch it for a while, otherwise he will quickly swipe away. It can be seen that in the immersive scenario, the playback time of the video is one of the indicators that best reflects the recommendation effect. In the current immersive video playback scenario, there are usually two modes, one is "system automatic carousel + user active swipe up"; the other is "system automatic swipe up". In the scenario of "system automatic carousel + user active swipe up", the user may not be interested in the current video content and swipe up in advance; or be interested in the current content, play it in a loop, and eventually swipe up to play the next video content. In this interactive mode, almost every content has the user's active operation (unless the user directly exits the scene), and these active behaviors provide accurate supervised signals for the training process of the recommendation model. In the scenario of "system automatic swipe up", the system replaces the user's operation, generating a large number of samples without user active behavior. If a sample does not have active user behavior feedback, even if the playback completion rate (play_time / video_time) = 100%, we cannot confirm whether the user is interested in the content (it may be that 1. the satisfactory video is watched to the end; 2. the unsatisfactory video is automatically cut off by the system after waiting to be played), that is, the supervision signal from the user is fuzzy (such samples are also called untrusted samples). In this scenario, it is unreasonable for the recommendation model to still treat samples with a playback completion rate of 100% as positive samples. In summary, there is an urgent need for a solution that can increase the usage rate of untrusted samples and thus improve the accuracy of recommendations.
[0056] In order to solve this technical problem, the present application provides the following technical solutions: obtaining a resource object to be processed; calling a recommendation model to perform predictive processing on the resource object to be processed to obtain a recommendation result of the resource to be processed, the recommendation model is trained based on a confident sample, an untrusted sample, and the sample weight of the untrusted sample, the sample weight of the untrusted sample is predicted by calling a confident model, the confident model is trained based on the confident sample, the confident sample is a video sample with interactive behavior between the object and the resource object, the untrusted sample is a video sample with a playback completion rate equal to 100%, and there is no interactive behavior between the object and the resource object; recommend the resource object to be processed according to the recommendation result. In this way, for the untrusted sample in the recommendation scenario, the sample weight is predicted by the confident model, and the gradient propagation of the untrusted sample in the recommendation model is affected according to the sample weight, thereby increasing the usage rate of the untrusted sample in the recommendation model, and then increasing the recommendation accuracy of the recommendation model, that is, improving the resource recommendation accuracy.
[0057] The resource recommendation method of each optional embodiment of the present application is implemented based on artificial intelligence technology. Artificial intelligence 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 the 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 sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics and other technologies. Artificial intelligence software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.
[0059] Computer Vision (CV) is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further processing graphics so that the computer processing becomes an image that is more suitable for human eye observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, three-dimensional (3D) technology, virtual reality, augmented reality, simultaneous positioning and mapping, autonomous driving, smart transportation and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.
[0060] The present application also involves cloud technology, which refers to a hosting technology that unifies system resources such as hardware, software, and network in a wide area network or a local area network to achieve data computing, storage, processing, and sharing.
[0061] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of Internet behavior, each item may have its own identification mark in the future, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately, and all kinds of industry data require strong system backing support, which can only be achieved through cloud computing. The cloud technology involved in this application mainly refers to the resource recommendation between terminal devices or servers through the "cloud", etc.
[0062] The present application also involves technical scenarios such as in-vehicle multimedia applications. The in-vehicle multimedia applications involved in the present application mainly refer to the terminal device or server that may obtain surrounding information through resource recommendations.
[0063] For ease of understanding, some nouns in this application are explained below.
[0064] Machine Learning (ML) is a multi-disciplinary interdisciplinary subject involving 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 teaching learning. With the research and progress of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0065] Neural Network: Artificial Neural Networks (ANN) are composed of a large number of neurons connected by adjustable connection weights. They have the characteristics of large-scale parallel processing, distributed information storage, and good self-organization and self-learning capabilities.
[0066] A convolutional layer (Conv) refers to a layered structure composed of several convolutional units in a convolutional neural network layer. A convolutional neural network (CNN) is a feedforward neural network. A convolutional neural network includes at least two neural network layers, each of which contains several neurons. Each neuron is arranged in layers. Neurons in the same layer are not connected to each other, and information between layers is transmitted in only one direction.
[0067] Back propagation: Forward propagation refers to the feedforward processing of the model, while back propagation is the opposite of forward propagation, which refers to updating the weight parameters of each layer of the model according to the output of the model. For example, if the model includes input layer, hidden layer and output layer, then forward propagation refers to processing in the order of input layer-hidden layer-output layer, and back propagation refers to updating the weight parameters of each layer in the order of output layer-hidden layer-input layer.
[0068] Recommendation model: In business scenarios such as advertising, e-commerce, and information flow distribution, recommendation algorithms play a vital role. A good recommendation algorithm can firmly grasp users and make them spend their time on recommended content. Of course, the value of the recommended content is generally not what the application is concerned about. The purpose of application recommendation is only to retain users. The classic recommendation algorithm mainly refers to collaborative filtering, while in the field of deep learning, recommendation models based on neural networks are emerging in an endless stream. The types of recommendation models include but are not limited to coarse ranking models, fine ranking models, dual tower models, and rerank models.
[0069] The resource recommendation method, apparatus, device and storage medium provided in the embodiments of the present application can improve the accuracy of resource recommendation. The following describes an exemplary application of the electronic device provided in the embodiments of the present application. The electronic device provided in the embodiments of the present application can be implemented as various types of user terminals or as a server.
[0070] By running the resource recommendation scheme provided by the embodiment of the present application, the electronic device can ensure the improvement of the accuracy of resource recommendation, that is, improve the accuracy of resource recommendation and the efficiency of resource recommendation by the electronic device itself, and is applicable to multiple application scenarios of resource recommendation. For example, the recommendation system can recommend media resources to users, such as recommended news, recommended advertisements, recommended videos, etc., and can also be used to recommend goods, services, etc. to users. For example, the terminal device is a vehicle-mounted terminal, and the server pushes video content such as nearby gas stations and parking lots to multiple vehicle-mounted terminals based on the multi-objective recommendation model. For another example, the terminal device is a smart phone, and the server recommends nearby food, attractions, and other content to multiple smart phones.
[0071] In one possible implementation, the resource recommendation method provided in the embodiment of the present application can be implemented as an application or a part of an application and installed in a terminal, so that the terminal has the ability to recommend corresponding resource information to the user based on the user's object information; the resource recommendation method provided in the embodiment of the present application can be applied to the background server of the application, so that the server has the ability to recommend corresponding resource information to the user based on the user's object information.
[0072] See also Figure 1 , Figure 1It is an optional architecture diagram under an application scenario of the resource recommendation method provided in the embodiment of the present application. In order to support a model training scheme, the terminal device 100 is connected to the server 300 through the network 200, and the server 300 is connected to the database 400. The network 200 can be a wide area network or a local area network, or a combination of the two. The client for implementing the resource recommendation scheme is deployed on the terminal device 100, wherein the client can be run on the terminal device 100 in the form of a browser, or can be run on the terminal device 100 in the form of an independent application (application, APP), etc. The specific presentation form of the client is not limited here. The server 300 involved in this application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal device 100 can be a smart phone, a tablet computer, a laptop, a PDA, a personal computer, a smart TV, a smart watch, a vehicle-mounted device, a wearable device, an intelligent voice interaction device, a smart home appliance, an aircraft, etc., but is not limited thereto. The terminal device 100 and the server 300 can be directly or indirectly connected through the network 200 by wired or wireless communication, and this application does not limit this. The number of servers 300 and terminal devices 100 is also not limited. The solution provided in this application can be completed independently by the terminal device 100, or by the server 300, or by the terminal device 100 and the server 300 in cooperation, and this application does not make specific limitations on this. Among them, the database 400, in short, can be regarded as an electronic file cabinet-a place for storing electronic files, and users can add, query, update, delete, and other operations on the data in the file. The so-called "database" is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of the application. Database Management System (DBMS) is a computer software system designed for managing databases. It generally has basic functions such as storage, interception, security, and backup.Database management systems can be classified according to the database models they support, such as relational, Extensible Markup Language (XML); or according to the types of computers they support, such as server clusters, mobile phones; or according to the query language used, such as Structured Query Language (SQL), XQuery; or according to performance impulse focus, such as maximum scale, maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMSs can cross categories, for example, supporting multiple query languages at the same time. In the present application, database 400 can be used to store trusted samples, untrusted copies, and resource objects to be processed. Of course, the storage location of trusted samples, untrusted copies, and resource objects to be processed is not limited to the database, for example, it can also be stored in the terminal device 100, the blockchain, or the distributed file system of the server 300.
[0073] In some embodiments, both the server 300 and the terminal device 100 can execute the training scheme of the recommendation model and the resource recommendation method provided in the embodiments of the present application.
[0074] Based on this Figure 1 The architecture shown here illustrates the training method and information recommendation of the recommendation model in this application:
[0075] In an exemplary solution, the terminal device 100 and the server 300 jointly perform the training method of the recommendation model and the information recommendation method. The specific process may be as follows: the terminal device 100 obtains the initial recommendation model, the initial confidence model, the confidence sample and the unconfident sample; then the terminal device 100 may store the confidence sample and the unconfident sample in the database 400 or in the memory of the terminal device 100; the server 300 obtains the confidence sample and the unconfident sample from the database 400 or the terminal device 100; then the initial confidence model is trained according to the confidence sample to obtain the confidence model, and the initial recommendation model is also trained according to the confidence sample to obtain an intermediate recommendation model; when the input sample is an unconfident sample, the confidence model is called to output the sample weight of the unconfident sample, and the intermediate recommendation model is also called to output the first loss value of the unconfident sample; then the intermediate recommendation model is trained by back propagation according to the sample weight and the first loss value to obtain the recommendation model. Finally, the server 300 can deploy the recommendation model to the terminal device 100 so that the terminal device 100 can call the recommendation model to realize the recommendation of the resource objects to be processed; or, the server 300 deploys the recommendation model on the information recommendation server so that the information recommendation server calls the recommendation model to realize the recommended sorting of the resource objects to be processed.
[0076] In another embodiment, the terminal device 100 independently executes the model training method provided in the embodiment of the present application. In this embodiment, the specific process may be as follows: the terminal device 100 obtains an initial recommendation model, an initial confidence model, the confidence sample and the unconfident sample; then the terminal device 100 stores the confidence sample and the unconfident sample in the database 400 or in the memory of the terminal device 100; the terminal device 100 obtains the confidence sample and the unconfident sample from the database 400 or the memory of the terminal device 100; then the initial confidence model is trained according to the confidence sample to obtain the confidence model, and the initial recommendation model is also trained according to the confidence sample to obtain an intermediate recommendation model; when the input sample is an unconfident sample, the confidence model is called to output the sample weight of the unconfident sample, and the intermediate recommendation model is also called to output the first loss value of the unconfident sample; and then the intermediate recommendation model is trained by back propagation according to the sample weight and the first loss value to obtain the recommendation model. Finally, the terminal device 100 can deploy the recommendation model to the terminal device 100, so that the terminal device 100 can call the recommendation model to realize the recommendation of the resource objects to be processed; or, the terminal device 100 deploys the recommendation model on the information recommendation server, so that the information recommendation server calls the recommendation model to realize the recommended sorting of the resource objects to be processed.
[0077] It is understandable that in the specific implementation of the present application, related data such as trusted samples and untrusted samples are involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0078] Combining the above introduction and Figure 2a The training architecture shown in the figure is as follows, and the training method of the recommended model in this application is described with the terminal device as the execution subject. Figure 2a As shown in , the network architecture on the left is the recommended model in this application, and the network architecture on the right is the confidence model in this application.
[0079] In an exemplary solution, the terminal device trains the recommendation model in an offline state. At this time, the confident sample and the unconfident sample can be distinguished, and then training is performed at different stages. The specific process can be as follows:
[0080] 1. The terminal device randomly initializes the network parameters of the recommendation model and the network parameters of the confidence model to obtain an initialized recommendation model and an initialized confidence model; and simultaneously obtains sample data for training the initialized recommendation model. In this embodiment, the sample data can be classified into a confidence sample and an unconfident sample.
[0081] In the present application, the network structure of the initial recommendation model includes but is not limited to a coarse sorting model, a fine sorting model, a double tower sorting model or a rerank sorting model. In order to reduce the complexity of data processing in model training, the initialization recommendation model and the initialization confidence model can be set to have the same input structure. In this way, for the same sample, only one standardization process is required, that is, the input layers of the initialization recommendation model and the initialization confidence model can be input at the same time.
[0082] In this application, the classification definition of the sample data can be as follows:
[0083] When the sample data is a video sample in an immersive video playback scenario, the terminal device obtains the interactive behavior corresponding to the sample data and the playback completion rate of the sample data. The terminal device can classify the sample into a trusted sample and an untrusted sample according to whether there is an interactive behavior between the operation object and the resource object. In an exemplary solution, the specific expression of the sample can be shown in Table 1:
[0084] Table 1
[0085]
[0086] The above-mentioned confident samples are samples of interactive behaviors between the operation object and the resource object, and the unconfident samples are samples of no interactive behaviors between the operation object and the resource object. In an exemplary solution, the sample space is divided as follows: Figure 2b As shown, the samples are divided once according to whether the playback rate is equal to 100%; and then the samples are divided into confidence and non-confidence according to whether there is interactive behavior.
[0087] It should be understood that the confidence and distrust of samples and the positive and negative of sample annotations are two different ways of dividing. It cannot be assumed that distrusted samples are negative samples, nor can it be assumed that confident samples are positive samples. If the samples are all highly confident, then regardless of whether they are positive or negative, the model can learn gains and can more accurately express user interests.
[0088] 2. The terminal device uses the confidence sample to train the initial confidence model to obtain the confidence model, and also uses the confidence sample to train the initial recommendation model to obtain the intermediate recommendation model.
[0089] When the confidence sample and the unconfident sample are trained in stages, in the first stage, the terminal device inputs the confidence sample into the initial confidence model for prediction processing to obtain the prediction label corresponding to the confidence sample, and then calculates the loss value according to the true label of the confidence sample to obtain the corresponding loss value; finally, the network parameters of the initial confidence model are updated by back propagation according to the loss value to obtain the confidence model. At this time, the confidence model can have a better prediction effect, so that the unconfident sample has a more accurate usage rate when training the recommendation model.
[0090] Similarly, when the terminal device uses the confidence sample to train the initial recommendation model, the above process can also be adopted, and the details will not be repeated here.
[0091] It should be understood that the above training method is only an exemplary solution. In actual applications, the terminal device can adopt different training methods according to the specific type of the confidence sample, which is not limited here.
[0092] 3. The terminal device calls the confidence model to output the sample weight of the unconfident sample, and at the same time calls the intermediate recommendation model to output the first loss value of the unconfident sample.
[0093] In the second stage, the terminal device uses the untrusted sample to train the intermediate recommendation model. At this time, the terminal device calls the trained confidence model to output the sample weight of the untrusted sample, and also calls the intermediate recommendation model to output the first loss value of the untrusted sample.
[0094] It should be understood that the specific process of the terminal device using the confidence model to input the sample weight of the untrusted sample can be as follows: the terminal device calls the confidence model to perform predictive processing on the untrusted sample to obtain a predicted labeling of the untrusted sample; and then calculates the sample weight based on the predicted labeling and the actual labeling of the untrusted sample.
[0095] In this embodiment, the true label of the untrusted sample can be set accordingly according to the training target of the confidence model, that is, one training target corresponds to one true label. In an exemplary scheme, the untrusted sample is a video sample, and the training target of the confidence model can include but is not limited to at least one of the video playback completion rate, the video flick rate within a preset time, the like rate within a preset time, and the comment rate within a preset time. Based on the above training target, the true label can be set as follows:
[0096] When the video playback completion rate is the training target, the true label of the untrusted sample is set to 1;
[0097] and / or,
[0098] When the video pass rate within the preset time is the training target, the true label of the untrusted sample is set to 0;
[0099] and / or,
[0100] When the like rate within the preset time is the training target, the true label of the untrusted sample is set to 0;
[0101] and / or,
[0102] When the comment rate within the preset time period is the training target, the true label of the untrusted sample is set to 0.
[0103] In combination with the above description, in an exemplary solution, the specific process of the terminal device calculating the sample weight according to the predicted annotation and the real annotation can be as follows:
[0104] The relationship between the sample weight, the predicted label and the true label is defined as Formula 1:
[0105] W∝1-diff(L x , F denoise (x)) Formula 1
[0106] Among them, the W is used to indicate the sample weight, the L x Used to indicate the true label, the F denoise (x) is used to indicate the predicted label.
[0107] In an exemplary embodiment, the diff(L x , F denoise (x)) can be defined as in Formula 2:
[0108] diff(L x , F denoise (x)) = abs(L x -F denoise (x)) Formula 2
[0109] Based on the above formula 2, when the value of the true label is 1 (at this time, the playback completion rate of the sample is used as the label, where when the playback completion rate is greater than or equal to 100%, the label value is 1, and when the playback completion rate is less than 100%, the label value is 0), the expression formula of the sample weight can be derived as follows:
[0110] W∝1-diff(L x , F denoise (x))
[0111] =1-abs(1-F denoise (x))
[0112] =F denoise(x)
[0113] In this derivation process, the F denoise The output range of (x) is (0,1).
[0114] It should be understood that the above derivation process is only an exemplary scheme. In actual applications, according to different settings of the real annotation and different selection forms of the diff(.) function, the final expression formula of the sample weight is also different.
[0115] For example, in another exemplary solution, when the value of the true label is 0 (at this time, the label is the stroke rate of the sample within the preset time length, wherein when the sample is stroked within the preset time length, the label value is 0, and when the sample is not stroked within the preset time length, the label value is 1), the expression formula of the sample weight can be derived as follows:
[0116] W∝1-diff(L x , F denoise (x))
[0117] =1-abs(0-F denoise (x))
[0118] =1-F denoise (x)
[0119] In this derivation process, the F denoise The output range of (x) is (0,1).
[0120] Combining the above different training targets corresponding to different true annotations, it can be known that when there are multiple training targets, the true annotations can have multiple ones, and similarly, the sample weights can also output multiple ones. For example, if the training target is 3, then the true annotations are also 3, and 3 sample weights can also be calculated according to the above formula. That is, the confidence model can output multiple sample weights for the same unconfident sample, where each sample weight corresponds to a training target.
[0121] In this embodiment, the manner in which the terminal device calls the intermediate recommendation model to perform prediction processing on the untrusted model can refer to the description in 2 above, and the details will not be repeated here.
[0122] 4. The terminal device trains the intermediate recommendation model based on the sample weight and the first loss value to obtain the recommendation model.
[0123] The terminal device multiplies the sample weight by the first loss value to obtain a second loss value of the untrusted model during the training process of the intermediate recommendation model; finally, the network parameters of the intermediate recommendation model are back-propagated based on the second loss value to obtain the recommendation model.
[0124] It should be understood that the confidence model can be applied to single-objective or multi-objective optimization application scenarios.
[0125] In an exemplary solution, in a multi-objective optimization scenario, the training objective of the confidence model can be set to be consistent with the training objective of the recommendation model. In this case, the confidence model can output the sample weights of the unconfident samples on different training objectives. Then, when training the intermediate recommendation model, the sample weights of different training objectives will be multiplied by the loss values of the different training objectives to obtain the second loss value. Figure 2c As shown, three training objectives are set in the confidence model, and the three training objectives are the same as the three training objectives of the recommendation model. At this time, the confidence model can output three different sample weights W0, W1 and W2 of the unconfident samples. At the same time, the recommendation model can output three different loss values L0, L1 and L2 of the unconfident samples. At this time, the second loss value of the unconfident sample in the recommendation model will be W0*L0, W1*L1 and W2*L2.
[0126] In another embodiment, in a multi-objective application scenario, the terminal device may also set the training target of the confidence model to be less than the training target of the recommendation model. In this case, the sample weights of the unconfident samples output by the confidence model can be multiplied according to the same training target, and there is no loss value corresponding to the sample weight in the recommendation model, and the sample weights can be arbitrarily selected for product calculation. Figure 2d As shown, two training objectives are set in the confidence model, and the two training objectives are the same as two of the three training objectives of the recommendation model. At this time, the confidence model can output three different sample weights W0 and W1 of the unconfident samples. At the same time, the recommendation model can output three different loss values L0, L1 and L2 of the unconfident samples. At this time, the second loss value of the unconfident sample in the recommendation model will be W0*L0, W1*L1 and W0*L2 or W0*L0, W1*L1 and W1*L2.
[0127] In another embodiment, in a single-target application scenario, the terminal device sets the training target of the confidence model to one, and does not limit the training target of the recommendation model. At this time, the sample weight of the unconfident sample output by the confidence model is only one, so the loss value output by the recommendation model will be multiplied by the sample weight to obtain the second loss value. Figure 2e As shown, a training target is set in the confidence model. At this time, the confidence model can output a sample weight W0 for the unconfident sample. Assuming that the recommendation model outputs three different loss values L0, L1 and L2 for the unconfident sample, the second loss value of the unconfident sample in the recommendation model will be W0*L0, W0*L1 and W0*L2.
[0128] In another embodiment, the terminal device trains the recommendation model online in real time. At this time, the confident samples and the unconfident samples are not distinguished. Therefore, during the training process, the confident samples and the unconfident samples can be used alternately to train the recommendation model. The specific process can be as follows:
[0129] 1. The terminal device randomly initializes the network parameters of the recommendation model and the network parameters of the confidence model to obtain an initialized recommendation model and an initialized confidence model; and simultaneously obtains sample data for training the initialized recommendation model. In this embodiment, the sample data can be classified into a confidence sample and an unconfident sample.
[0130] In this application, in order to reduce the complexity of data processing in model training, the initialization recommendation model and the initialization confidence model can be set to have the same input structure. In this way, for the same sample, only one standardization process is required, that is, the input layers of the initialization recommendation model and the initialization confidence model can be input at the same time.
[0131] In this application, the classification definition of the sample data can be as follows:
[0132] When the sample data is a video sample in an immersive video playback scenario, the terminal device obtains the interactive behavior corresponding to the sample data and the playback completion rate of the sample data. The terminal device can classify the sample into a trusted sample and an untrusted sample according to whether there is an interactive behavior between the operation object and the resource object. In an exemplary solution, the specific expression of the sample can be shown in Table 2:
[0133] Table 2
[0134]
[0135] The above-mentioned confident samples are samples of interactive behaviors between the operation object and the resource object, and the unconfident samples are samples of no interactive behaviors between the operation object and the resource object. In an exemplary solution, the sample space is divided as follows: Figure 2b As shown, the samples are divided once according to whether the playback rate is equal to 100%; and then the samples are divided into confidence and non-confidence according to whether there is interactive behavior.
[0136] It should be understood that the confidence and distrust of samples and the positive and negative of sample annotations are two different ways of dividing. It cannot be assumed that distrusted samples are negative samples, nor can it be assumed that confident samples are positive samples. If the samples are all highly confident, then regardless of whether they are positive or negative, the model can learn gains and can more accurately express user interests.
[0137] 2. At the first moment, if the samples received by the initial confidence model and the initial recommendation model are confidence samples, the terminal device uses the confidence samples to train the initial confidence model to obtain a first confidence model, and also uses the confidence samples to train the initial recommendation model to obtain a first recommendation model.
[0138] If the sample received by the initial confidence model and the initial recommendation model is a confidence sample, the terminal device calls the initial confidence model to perform prediction processing on the confidence sample to obtain the prediction label corresponding to the confidence sample, and then calculates the loss value according to the true label of the confidence sample to obtain the corresponding loss value; finally, the network parameters of the initial confidence model are updated by back propagation according to the loss value to obtain the confidence model. At this time, the confidence model can have a better prediction effect, so that the unconfident sample has a more accurate usage rate when training the recommendation model.
[0139] Similarly, when the terminal device uses the confidence sample to train the initial recommendation model, the above process can also be adopted, and the details will not be repeated here.
[0140] It should be understood that the above training method is only an exemplary solution. In actual applications, the terminal device can adopt different training methods according to the specific type of the confidence sample, which is not limited here.
[0141] 3. At the second moment, if the sample received by the first confidence model and the first recommendation model is an untrusted sample, the terminal device calls the first confidence model to output the sample weight of the untrusted sample, and at the same time calls the first recommendation model to output the first loss value of the untrusted sample.
[0142] At the second moment, the sample received by the first confidence model and the first recommendation model is an untrusted sample, and the terminal device uses the untrusted sample to train the first recommendation model. At this time, the terminal device calls the first confidence model to output the sample weight of the untrusted model, and also calls the first recommendation model to output the first loss value of the untrusted sample.
[0143] It should be understood that the specific process of the terminal device using the first confidence model to input the sample weight of the untrusted sample can be as follows: the terminal device calls the first confidence model to perform predictive processing on the untrusted sample to obtain a predicted labeling of the untrusted sample; and then calculates the sample weight based on the predicted labeling and the actual labeling of the untrusted sample.
[0144] In this embodiment, the true label of the untrusted sample can be set accordingly according to the training target of the first confidence model, that is, one training target corresponds to one true label. In an exemplary scheme, the untrusted sample is a video sample, and the training target of the confidence model can include but is not limited to at least one of the video playback completion rate, the video flick rate within a preset time, the like rate within a preset time, and the comment rate within a preset time. Based on the above training target, the true label can be set as follows:
[0145] When the video playback completion rate is the training target, the true label of the untrusted sample is set to 1;
[0146] and / or,
[0147] When the video pass rate within the preset time is the training target, the true label of the untrusted sample is set to 0;
[0148] and / or,
[0149] When the like rate within the preset time is the training target, the true label of the untrusted sample is set to 0;
[0150] and / or,
[0151] When the comment rate within the preset time period is the training target, the true label of the untrusted sample is set to 0.
[0152] In combination with the above description, in an exemplary solution, the specific process of the terminal device calculating the sample weight according to the predicted annotation and the real annotation can be as follows:
[0153] The relationship between the sample weight, the predicted label and the true label is defined as Formula 1:
[0154] W∝1-diff(L x , F denoise (x)) Formula 1
[0155] Among them, the W is used to indicate the sample weight, the L x Used to indicate the true label, the F denoise (x) is used to indicate the predicted label.
[0156] In an exemplary embodiment, the diff(L x , F denoise (x)) can be defined as in Formula 2:
[0157] diff(L x , F denoise (x)) = abs(L x -F denoise (x)) Formula 2
[0158] Based on the above formula 2, when the value of the true label is 1 (at this time, the playback completion rate of the sample is used as the label, where when the playback completion rate is greater than or equal to 100%, the label value is 1, and when the playback completion rate is less than 100%, the label value is 0), the expression formula of the sample weight can be derived as follows:
[0159] W∝1-diff(L x , F denoise (x))
[0160] =1-abs(1-F denoise (x))
[0161] =F denoise (x)
[0162] In this derivation process, the F denoise The output range of (x) is (0,1).
[0163] It should be understood that the above derivation process is only an exemplary scheme. In actual applications, according to different settings of the real annotation and different selection forms of the diff(.) function, the final expression formula of the sample weight is also different.
[0164] For example, in another exemplary solution, when the value of the true label is 0 (at this time, the label is the stroke rate of the sample within the preset time length, wherein when the sample is stroked within the preset time length, the label value is 0, and when the sample is not stroked within the preset time length, the label value is 1), the expression formula of the sample weight can be derived as follows:
[0165] W∝1-diff(L x , F denoise (x))
[0166] =1-abs(0-F denoise (x))
[0167] =1-F denoise (x)
[0168] In this derivation process, the F denoise The output range of (x) is (0,1).
[0169] Combining the above different training targets corresponding to different true annotations, it can be known that when there are multiple training targets, the true annotations can have multiple ones, and similarly, the sample weights can also output multiple ones. For example, if the training target is 3, then the true annotations are also 3, and 3 sample weights can also be calculated according to the above formula. That is, the confidence model can output multiple sample weights for the same unconfident sample, where each sample weight corresponds to a training target.
[0170] In this embodiment, the manner in which the terminal device calls the intermediate recommendation model to perform prediction processing on the untrusted model can refer to the description in 2 above, and the details will not be repeated here.
[0171] 4. The terminal device trains the first recommendation model based on the sample weight and the first loss value to obtain the second recommendation model.
[0172] The terminal device multiplies the sample weight by the first loss value to obtain a second loss value of the untrusted model during the training process of the first recommendation model; finally, the network parameters of the first recommendation model are updated by backpropagation according to the second loss value to obtain the second recommendation model.
[0173] It should be understood that the confidence model can be applied to single-objective or multi-objective optimization application scenarios.
[0174] In an exemplary solution, in a multi-objective optimization scenario, the training objective of the confidence model can be set to be consistent with the training objective of the recommendation model. In this case, the confidence model can output the sample weights of the unconfident samples on different training objectives. Then, when training the intermediate recommendation model, the sample weights of different training objectives will be multiplied by the loss values of the different training objectives to obtain the second loss value. Figure 2c As shown, three training objectives are set in the confidence model, and the three training objectives are the same as the three training objectives of the recommendation model. At this time, the confidence model can output three different sample weights W0, W1 and W2 of the unconfident samples. At the same time, the recommendation model can output three different loss values L0, L1 and L2 of the unconfident samples. At this time, the second loss value of the unconfident sample in the recommendation model will be W0*L0, W1*L1 and W2*L2.
[0175] In another embodiment, in a multi-objective application scenario, the terminal device may also set the training target of the confidence model to be less than the training target of the recommendation model. In this case, the sample weights of the unconfident samples output by the confidence model can be multiplied according to the same training target, and there is no loss value corresponding to the sample weight in the recommendation model, and the sample weights can be arbitrarily selected for product calculation. Figure 2d As shown, two training objectives are set in the confidence model, and the two training objectives are the same as two of the three training objectives of the recommendation model. At this time, the confidence model can output three different sample weights W0 and W1 of the unconfident samples. At the same time, the recommendation model can output three different loss values L0, L1 and L2 of the unconfident samples. At this time, the second loss value of the unconfident sample in the recommendation model will be W0*L0, W1*L1 and W0*L2 or W0*L0, W1*L1 and W1*L2.
[0176] In another embodiment, in a single-target application scenario, the terminal device sets the training target of the confidence model to one, and does not limit the training target of the recommendation model. At this time, the sample weight of the unconfident sample output by the confidence model is only one, so the loss value output by the recommendation model will be multiplied by the sample weight to obtain the second loss value. Figure 2e As shown, a training target is set in the confidence model. At this time, the confidence model can output a sample weight W0 for the unconfident sample. Assuming that the recommendation model outputs three different loss values L0, L1 and L2 for the unconfident sample, the second loss value of the unconfident sample in the recommendation model will be W0*L0, W0*L1 and W0*L2.
[0177] It should be understood that the above 2 to 4 describes the training process in the time sequence of inputting the confident samples first and then the unconfident samples. However, in actual applications, the unconfident samples can also be input first. In this case, 3 and 4 will be executed first to obtain the confidence model and recommendation model after training; and then the confident samples are input. In this case, 2 will be executed to update the confidence model and recommendation model obtained after executing 3 and 4. That is, in the online real-time training process, as long as the sample is obtained and it is determined that the sample is an unconfident sample, the previous recommendation model can be updated according to the schemes described in 3 and 4 above; and after determining that the sample is a confident sample, the previous confidence model and recommendation model can be updated according to the scheme described in 2 above.
[0178] The following is an explanation of the beneficial effects of the recommended model of this application with specific experimental results:
[0179] In an experimental scenario, taking the recommendation model as a refined ranking model as an example, the specific experimental results are shown in Table 3:
[0180] Table 3
[0181] Skip_auc Finish_auc Baseline 0.715 0.760 experiment 0.725 0.799 Relative improvement 1.40% 5.13%
[0182] It can be seen from Table 3 that under the two indicators of Skip_auc and Finish_auc, the recommended model obtained by using the training scheme of this application is improved compared with the baseline model.
[0183] In another experimental scenario, taking the recommendation model as a rough sorting model as an example, the specific experimental results are shown in Table 4:
[0184] Table 4
[0185] Skip_auc Finish_auc Baseline 0.651 0.725 experiment 0.703 0.765 Relative improvement 7.99% 5.52%
[0186] It can be seen from Table 3 that under the two indicators of Skip_auc and Finish_auc, the recommended model obtained by using the training scheme of this application is improved compared with the baseline model.
[0187] Combined with the above introduction, the following introduces the information recommendation method in this application with the terminal device as the execution subject, please refer to Figure 3 , an embodiment of the information recommendation method in the embodiment of the present application includes:
[0188] 301. Get the resource object to be processed.
[0189] In this embodiment, the resource object to be processed may be a resource object recalled by the terminal device from a large amount of resources according to the object information of the current operation object. For example, in an immersive video playback scenario, if the object information of the current operation object is "30 years old, likes food, movies, gossip", the resource object to be processed recalled by the terminal device may be a video resource with at least one of the tags "food", "movies" and "gossip".
[0190] 302. Call the recommendation model to perform predictive processing on the resource object to be processed to obtain a recommendation result for the resource to be processed. The recommendation model is trained based on the confident samples, the unconfident samples and the sample weights of the unconfident samples. The sample weights of the unconfident samples are predicted by calling the confident model. The confident model is trained based on the confident samples. The confident samples are samples in which there is an interactive behavior between the object and the resource object. The unconfident samples are samples in which there is no interactive behavior between the object and the resource object.
[0191] The terminal device calls the recommendation model to perform predictive processing on the resource to be processed, and obtains the recommendation result of the resource to be processed. In this embodiment, the recommendation result can be understood as a ranking score. For example, the ranking score of video 1 with the predicted label "food, movie" is 98, the ranking score of video 2 with the predicted label "movie" is 89, and the ranking score of video 1 with the predicted label "gossip" is 80.
[0192] In this embodiment, the recommendation model adopts the above Figure 2a to Figure 2e The training method in is obtained, and the details will not be repeated here.
[0193] 303. Recommend the resource object to be processed according to the recommendation result.
[0194] The terminal device displays the resource object to be processed on the display interface of the terminal device according to the recommendation result. For example, if the ranking score of video 1 with the predicted label "food, movie" is 98, the ranking score of video 2 with the predicted label "movie" is 89, and the ranking score of video 1 with the predicted label "gossip" is 80, then in the immersive video playback scenario, video 1 will be played first, then video 2, and finally video 3.
[0195] The resource recommendation device in this application is described in detail below. Figure 4 , Figure 4 This is a schematic diagram of an embodiment of a resource recommendation device in an embodiment of the present application. The resource recommendation device 20 includes:
[0196] The acquisition module 201 is used to acquire the resource object to be processed;
[0197] The processing module 202 is used to call the recommendation model to perform prediction processing on the resource object to be processed to obtain the recommendation result of the resource to be processed, the recommendation model is trained based on the confident sample, the unconfident sample and the sample weight of the unconfident sample, the sample weight of the unconfident sample is predicted by calling the confident model, the confident model is trained based on the confident sample, the confident sample is a sample with interactive behavior between the object and the resource object, and the unconfident sample is a sample with no interactive behavior between the object and the resource object;
[0198] The recommendation module 203 is used to recommend the resource object to be processed according to the recommendation result.
[0199] In an embodiment of the present application, a resource recommendation device is provided. Using the above device, for untrusted samples in the recommendation scenario, the sample weight is predicted by the confidence model, and the gradient propagation of the untrusted sample in the recommendation model is affected according to the sample weight, thereby increasing the training effect of the untrusted sample in the recommendation model, and further increasing the accuracy of the recommendation model.
[0200] Optionally, in the above Figure 4 Based on the corresponding embodiments, Figure 5 As shown, in another embodiment of the resource recommendation device 20 provided in the embodiment of the present application,
[0201] The acquisition module 201 is used to acquire the initial recommendation model, the initial confidence model, the confidence sample and the unconfident sample;
[0202] The apparatus further includes a training module 204, the training module 204 being configured to train the initial confidence model based on the confidence sample to obtain the confidence model, and to train the initial recommendation model based on the confidence sample to obtain an intermediate recommendation model;
[0203] Calling the target confidence model to determine the sample weight of the unconfident sample, and calling the intermediate recommendation model to determine the first loss value of the unconfident sample;
[0204] The intermediate recommendation model is trained based on the sample weight and the first loss value to obtain the recommendation model.
[0205] In an embodiment of the present application, a resource recommendation device is provided. Using the above device, for untrusted samples in the recommendation scenario, the sample weight is predicted through the confidence model, and the gradient propagation effect of the untrusted sample in the recommendation model is affected according to the sample weight, thereby increasing the training effect of the untrusted sample in the recommendation model, and further increasing the accuracy of the recommendation model.
[0206] Optionally, in the above Figure 5 On the basis of the corresponding embodiment, in another embodiment of the resource recommendation device 20 provided in the embodiment of the present application, the training module 204 is used to call the confidence model to predict and obtain the prediction label of the unconfident sample;
[0207] The sample weight is determined according to the true label of the unconfident sample and the predicted label.
[0208] In an embodiment of the present application, a resource recommendation device is provided. Using the above device, the predicted label of the untrusted sample is predicted by the confidence model, and the sample weight of the untrusted sample is calculated according to the predicted label and the true label of the untrusted sample, so that the sample weight of the untrusted sample can be dynamically adjusted, thereby affecting the gain effect of the untrusted sample in the training process of the recommendation model.
[0209] Optionally, in the above Figure 5 Based on the corresponding embodiment, in another embodiment of the resource recommendation device 20 provided in the embodiment of the present application,
[0210] The training module 204 is used to obtain a first value by taking an absolute value of a difference between the actual label and the predicted label;
[0211] The sample weight is obtained by subtracting the first value from 1.
[0212] In the embodiment of the present application, a resource recommendation device is provided. The above device is used to set a specific calculation formula to refine the feasibility of the solution.
[0213] Optionally, in the above Figure 5 Based on the corresponding embodiment, in another embodiment of the resource recommendation device 20 provided in the embodiment of the present application,
[0214] The acquisition module 201 is used to acquire the training targets of the initial confidence model, and the number of the training targets is greater than or equal to 1;
[0215] The processing module 202 is used to set the true label according to the training target, wherein one training target corresponds to one true label, and one true label corresponds to one predicted label.
[0216] In an embodiment of the present application, a resource recommendation device is provided. With the above device, the real annotation can be one or more, so that the confidence model can achieve multi-objective targeted optimization and further improve the accuracy of the recommendation model.
[0217] Optionally, in the above Figure 5 On the basis of the corresponding embodiment, in another embodiment of the resource recommendation device 20 provided in the embodiment of the present application, the training target of the initial confidence model includes at least one of the video playback completion rate, the video scrolling rate within the preset time length, the like rate within the preset time length and the comment rate within the preset time length.
[0218] In an embodiment of the present application, a resource recommendation device is provided. By using the above device, by setting different training targets, the sample weights of the untrusted samples can be set in a targeted manner, so that the recommendation model can be trained in a targeted manner to meet different recommendation requirements.
[0219] Optionally, in the above Figure 5 On the basis of the corresponding embodiment, in another embodiment of the resource recommendation device 20 provided in the embodiment of the present application, the processing module 202 is used to set the true label of the untrusted sample to 1 when the video playback completion rate is a training target;
[0220] and / or,
[0221] When the video pass rate within the preset time is the training target, the true label of the untrusted sample is set to 0;
[0222] and / or,
[0223] When the like rate within the preset time is the training target, the true label of the untrusted sample is set to 0;
[0224] and / or,
[0225] When the comment rate within the preset time period is the training target, the true label of the untrusted sample is set to 0.
[0226] In an embodiment of the present application, a resource recommendation device is provided. With the above device, the real annotations are annotated with 0 and 1, which can facilitate training, thereby reducing data processing during the training process and speeding up the training process.
[0227] Optionally, in the above Figure 5Based on the corresponding embodiment, in another embodiment of the resource recommendation device 20 provided in the embodiment of the present application,
[0228] The training module 204 is used to multiply the sample weight and the first loss value to obtain a second loss value;
[0229] The intermediate recommendation model is trained according to the second loss value to obtain the recommendation model.
[0230] In an embodiment of the present application, a resource recommendation device is provided. The above device is used to adjust the loss value corresponding to the untrusted sample using the sample weight, thereby increasing the gain of the untrusted sample in the recommendation model, thereby improving the accuracy of the recommendation model.
[0231] Optionally, in the above Figure 5 Based on the corresponding embodiment, in another embodiment of the resource recommendation device 20 provided in the embodiment of the present application,
[0232] When the training objective of the initial confidence model is the same as the training objective of the initial recommendation model, the training module 204 is used to multiply the sample weight and the first loss value according to a one-to-one correspondence rule to obtain the second loss value.
[0233] In an embodiment of the present application, a resource recommendation device is provided. With the above device, in a multi-target situation, the same untrusted sample provides different sample weights for different targets, so that the loss values in the training process are calculated separately, and then optimized for different targets to improve the accuracy of the recommendation model.
[0234] Optionally, in the above Figure 5 Based on the corresponding embodiment, in another embodiment of the resource recommendation device 20 provided in the embodiment of the present application,
[0235] The input structure of the initial confidence model is the same as the input structure of the initial recommendation model.
[0236] In an embodiment of the present application, a resource recommendation device is provided. By adopting the above device, when the confidence model and the recommendation model have the same input structure, the preprocessing process of the sample can be reduced, thereby reducing the complexity of model training.
[0237] Optionally, in the above Figure 5 Based on the corresponding embodiment, in another embodiment of the resource recommendation device 20 provided in the embodiment of the present application,
[0238] An acquisition module 201 is used to acquire the interactive behavior and playback completion rate of the sample;
[0239] The processing module 202 is used to determine that the sample is a trusted sample when there is an interactive behavior in the sample; and to determine that the sample is an untrusted sample when the playback completion rate of the sample is 100% and there is no interactive behavior in the sample.
[0240] In an embodiment of the present application, a resource recommendation device is provided. Using the above device, samples are classified according to whether they have interactive behaviors to determine untrusted samples, so as to estimate the sample weights of untrusted samples in a targeted manner, thereby increasing the gain effect of untrusted samples in the training process and thus improving the accuracy of the recommendation model.
[0241] Optionally, in the above Figure 5 Based on the corresponding embodiment, in another embodiment of the resource recommendation device 20 provided in the embodiment of the present application,
[0242] The network structure of the initial recommendation model includes but is not limited to a coarse sorting model, a fine sorting model, a double tower sorting model or a rerank sorting model.
[0243] In an embodiment of the present application, a resource recommendation device is provided. The device is used to provide multiple model types, thereby making the application scenarios of the recommendation model more extensive and increasing the feasibility and generalization of the recommendation model.
[0244] The resource recommendation device provided by this application can be used for the server, please refer to Figure 6 , Figure 6 : is a schematic diagram of a server structure provided in an embodiment of the present application. The server 300 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 322 (for example, one or more processors) and memory 332, and one or more storage media 330 (for example, one or more mass storage devices) storing application programs 342 or data 344. Among them, the memory 332 and the storage medium 330 can be short-term storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 322 can be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the server 300.
[0245] The server 300 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input and output interfaces 358, and / or one or more operating systems 341, such as Windows Server 2000. TM , Mac OS XTM , Unix TM ,Linux TM , FreeBSD TM etc.
[0246] The steps performed by the server in the above embodiment can be based on the Figure 6 The server structure shown.
[0247] The resource recommendation device provided in this application can be used in terminal devices. Figure 7 For the sake of convenience, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiments of the present application. In the embodiments of the present application, the terminal device is a smart phone as an example for explanation:
[0248] Figure 7 The block diagram shows a partial structure of a smart phone related to the terminal device provided in the embodiment of the present application. Figure 7 The smart phone includes: a radio frequency (RF) circuit 410, a memory 420, an input unit 430, a display unit 440, a sensor 450, an audio circuit 460, a wireless fidelity (WiFi) module 470, a processor 480, and a power supply 490. Those skilled in the art will appreciate that Figure 7 The structure of the smartphone shown in the figure does not constitute a limitation of the smartphone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0249] Combine the following Figure 7 A detailed introduction to the various components of a smartphone:
[0250] The RF circuit 410 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 480 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 410 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 410 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), email, short messaging service (SMS), etc.
[0251] The memory 420 can be used to store software programs and modules. The processor 480 executes various functional applications and data processing of the smartphone by running the software programs and modules stored in the memory 420. The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the smartphone (such as audio data, a phone book, etc.), etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0252] The input unit 430 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the smart phone. Specifically, the input unit 430 may include a touch panel 431 and other input devices 432. The touch panel 431, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 431 or near the touch panel 431 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 431 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 480, and can receive and execute commands sent by the processor 480. In addition, the touch panel 431 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 431, the input unit 430 may also include other input devices 432. Specifically, other input devices 432 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
[0253] The display unit 440 can be used to display information input by the user or information provided to the user and various menus of the smartphone. The display unit 440 may include a display panel 441. Optionally, the display panel 441 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 431 may cover the display panel 441. When the touch panel 431 detects a touch operation on or near it, it is transmitted to the processor 480 to determine the type of touch event. Subsequently, the processor 480 provides a corresponding visual output on the display panel 441 according to the type of touch event. Although in Figure 7 In the embodiment, the touch panel 431 and the display panel 441 are used as two independent components to implement the input and output functions of the smartphone, but in some embodiments, the touch panel 431 and the display panel 441 can be integrated to implement the input and output functions of the smartphone.
[0254] The smartphone may also include at least one sensor 450, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 441 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 441 and / or the backlight when the smartphone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the smartphone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in smartphones, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0255] The audio circuit 460, the speaker 461, and the microphone 462 can provide an audio interface between the user and the smartphone. The audio circuit 460 can transmit the received audio data to the speaker 461 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 462 converts the collected sound signal into an electrical signal, which is received by the audio circuit 460 and converted into audio data, and then the audio data is output to the processor 480 for processing, and then sent to another smartphone through the RF circuit 410, or the audio data is output to the memory 420 for further processing.
[0256] WiFi is a short-range wireless transmission technology. Smartphones can help users send and receive emails, browse web pages, and access streaming media through WiFi module 470, which provides users with wireless broadband Internet access. Figure 7 A WiFi module 470 is shown, but it is understandable that it is not an essential component of the smartphone and can be omitted as needed without changing the essence of the invention.
[0257] Processor 480 is the control center of the smartphone, which uses various interfaces and lines to connect various parts of the entire smartphone, and executes various functions of the smartphone and processes data by running or executing software programs and / or modules stored in memory 420, and calling data stored in memory 420, thereby monitoring the smartphone as a whole. Optionally, processor 480 may include one or more processing units; optionally, processor 480 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into processor 480.
[0258] The smart phone also includes a power source 490 (such as a battery) for supplying power to various components. Optionally, the power source can be logically connected to the processor 480 through a power management system, thereby managing functions such as charging, discharging, and power consumption management through the power management system.
[0259] Although not shown, the smartphone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0260] The steps performed by the terminal device in the above embodiment can be based on the Figure 7 The terminal device structure shown.
[0261] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the methods described in the aforementioned embodiments.
[0262] The present application also provides a computer program product including a program, which, when executed on a computer, enables the computer to execute the methods described in the aforementioned embodiments.
[0263] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0264] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0265] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0266] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0267] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0268] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A resource recommendation method, characterized in that: include: Get the resource object to be processed; Calling a recommendation model to perform prediction processing on the resource object to be processed to obtain a recommendation result of the resource to be processed, wherein the recommendation model is trained based on a confident sample, an unconfident sample, and a sample weight of the unconfident sample, the sample weight of the unconfident sample is predicted by calling a confident model, the confident model is trained based on the confident sample, the confident sample is a sample in which an interactive behavior exists between an object and a resource object, and the unconfident sample is a sample in which no interactive behavior exists between an object and a resource object; The resource object to be processed is recommended according to the recommendation result.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining an initial recommendation model, an initial confidence model, the confidence samples, and the unconfident samples; Training the initial confidence model based on the confidence sample to obtain the confidence model, and training the initial recommendation model based on the confidence sample to obtain an intermediate recommendation model; Calling the target confidence model to determine the sample weight of the unconfident sample, and calling the intermediate recommendation model to determine the first loss value of the unconfident sample; The recommendation model is obtained by training the intermediate recommendation model based on the sample weight and the first loss value.
3. The method according to claim 2, characterized in that The calling of the confidence model to determine the sample weight of the unconfident sample includes: Calling the confidence model to predict and obtain the prediction label of the unconfident sample; The sample weight is determined according to the true label of the unconfident sample and the predicted label.
4. The method according to claim 3, characterized in that The determining the sample weight according to the true label and the predicted label of the unconfident sample comprises: Taking an absolute value of a difference between the true annotation and the predicted annotation to obtain a first value; The sample weight is obtained by subtracting the first value from 1.
5. The method according to claim 3, characterized in that: The method further comprises: Obtaining training targets for the initial confidence model, where the number of the training targets is greater than or equal to 1; The true annotation is set according to the training target, wherein one training target corresponds to one true annotation, and one true annotation corresponds to one predicted annotation.
6. The method according to claim 5, characterized in that The training objectives of the initial confidence model include but are not limited to at least one of a video playback completion rate, a video scrolling rate within a preset time length, a like rate within a preset time length, and a comment rate within a preset time length.
7. The method according to claim 6, characterized in that The setting of the real annotation according to the training objective comprises: When the video playback completion rate is the training target, the true label of the untrusted sample is set to 1; and / or, When the video passing rate within the preset time length is the training target, setting the true label of the untrusted sample to 0; and / or, When the like rate within the preset time period is the training target, the true label of the untrusted sample is set to 0; and / or, When the comment rate within the preset time period is the training target, the true label of the untrusted sample is set to 0.
8. The method according to any one of claims 2 to 7, characterized in that The step of training the intermediate recommendation model based on the sample weight and the first loss value to obtain the recommendation model comprises: Multiplying the sample weight and the first loss value to obtain a second loss value; The intermediate recommendation model is trained according to the second loss value to obtain the recommendation model.
9. The method according to claim 8, characterized in that When the training objective of the initial confidence model is the same as the training objective of the initial recommendation model, multiplying the sample weight and the first loss value to obtain a second loss value includes: The sample weight and the first loss value are multiplied according to a one-to-one correspondence rule to obtain the second loss value.
10. The method according to any one of claims 2 to 7 and 9, characterized in that: The input structure of the initial confidence model is the same as the input structure of the initial recommendation model.
11. The method according to any one of claims 2 to 7 and 9, characterized in that: The method further comprises: Obtain the interactive behavior and playback completion rate of the sample; When the sample has an interactive behavior, determining the sample as a confident sample; When the playback completion rate of the sample is equal to 100% and there is no interactive behavior in the sample, the video sample is determined to be an untrusted sample.
12. The method according to any one of claims 1 to 7 and 9, characterized in that: The network structure of the initial recommendation model includes but is not limited to a coarse sorting model, a fine sorting model, a double tower sorting model or a rerank sorting model.
13. A resource recommendation device, characterized in that: include: The acquisition module is used to obtain the resource object to be processed; A processing module, used for calling a recommendation model to perform prediction processing on the resource object to be processed to obtain a recommendation result of the resource to be processed, wherein the recommendation model is trained based on a confident sample, an unconfident sample and the sample weight of the unconfident sample, the sample weight of the unconfident sample is predicted by calling a confident model, the confident model is trained based on the confident sample, the confident sample is a sample in which there is an interactive behavior between the object and the resource object, and the unconfident sample is a sample in which there is no interactive behavior between the object and the resource object; A recommendation module is used to recommend the resource object to be processed according to the recommendation result.
14. A computer device, characterized in that: include: Memory, processor, and bus system; Wherein, the memory is used to store programs; The processor is used to execute the program in the memory, and the processor is used to execute the method according to any one of claims 1 to 12 according to the instructions in the program code; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
15. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 12.