Data processing method and related device

By using the conversion function based on cost variables in the video recommendation system, the user's interaction time of video is predicted and recommended as a user's preference feature, the deviation problem during training of the recommendation model in short video scenarios is solved, and a more accurate video recommendation effect is achieved.

WO2025067209A1PCT designated stage expired Publication Date: 2025-04-03HUAWEI TECH CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/120992
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-28
Filing Date
2024-09-25
Publication Date
2025-04-03

AI Technical Summary

Technical Problem

The existing video recommendation methods have deviations in short video scenarios, and the finished video is misunderstood as a positive example, resulting in serious deviations during training of the recommendation model, and it is difficult for users to accurately capture the real interest in short videos.

Method used

By obtaining the attribute information of the user and the item, using the conversion function based on the cost variable's interaction time and preference information, the user's interaction time of the item is predicted and recommended as the user's preference feature, thereby achieving more accurate video recommendations.

Benefits of technology

This method can more accurately estimate the user's interaction time with the video, reduce the deviation caused by the short video playback rate, and improve the accuracy and user experience of the recommendation model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024120992_03042025_PF_FP_ABST
    Figure CN2024120992_03042025_PF_FP_ABST
Patent Text Reader

Abstract

A data processing method, applicable to the field of artificial intelligence. The method comprises: acquiring attribute information of a user and of an item; obtaining preference information of the user for the item on the basis of the attribute information; on the basis of the preference information and a cost variable, determining a predicted interaction duration of the user for the item by means of a preset first mapping relationship, wherein the cost variable is information affecting the interaction duration of the user for the item; and when the predicted interaction duration satisfies a preset condition, recommending the item to the user. The present application predicts the interaction duration of the user for the item by means of a conversion function of the cost variable-based interaction duration and the preference information, and uses the predicted interaction duration as a preference feature of the user for recommendation, so that a more accurate interaction duration can be obtained, thereby obtaining a more accurate recommendation result.
Need to check novelty before this filing date? Find Prior Art

Description

A data processing method and related equipment

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on September 28, 2023, with application number 202311294666.8 and invention name “A data processing method and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of artificial intelligence, and in particular to a data processing method and related equipment. Background Art

[0003] Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a branch of computer science that seeks to understand the essence of intelligence and develop new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

[0004] The rise of video content platforms has attracted billions of users and is becoming increasingly common in people's daily lives. Accurate and personalized video recommendations play a crucial role in better meeting people's information needs and increasing their engagement. Unlike traditional recommendation scenarios, video recommendations utilize a streaming playback model, i.e., autoplay. This feature renders widely used implicit feedback (e.g., user clicks) inappropriate as a measure of user interest. Compared to click count, user viewing time indicates how much attention a user devotes to a video and is considered a better indicator of user interest. However, simply watching a video to the end doesn't necessarily mean they enjoy it. Even after finishing a video, they may still dislike it. Furthermore, in the short video landscape, the proportion of completed videos is significant. Using these completed videos as positive examples to supervise the training of recommendation ranking models would result in significant bias. Furthermore, the trend in the positive-negative feedback signal ratio for completed videos shows that shorter videos are associated with higher negative feedback and lower positive feedback. This is because it takes time for users to determine whether they enjoy a video, and videos that are too short are more likely to obscure their true interest.

[0005] Therefore, a more accurate recommendation method is needed.

[0006] Summary of the Invention

[0007] In a first aspect, the present application provides a data processing method, comprising: obtaining attribute information of a user and an item; obtaining the user's preference information for the item based on the attribute information; determining the predicted interaction time of the user with the item through a preset first mapping relationship based on the preference information and a cost variable; the cost variable is information that affects the interaction time of the user with the item; and recommending the item to the user when the predicted interaction time meets a preset condition.

[0008] In an embodiment of the present application, a conversion function based on the interaction time of the cost variable and the preference information is used to predict the user's interaction time with the item, and the predicted interaction time is used as the user's preference feature for recommendation. This can obtain a more accurate interaction time and thus a more accurate recommendation result.

[0009] In a possible implementation, the method also includes: when the predicted interaction duration determined by a preset first mapping relationship is greater than the maximum interaction duration corresponding to the item, using the maximum interaction duration as the predicted interaction duration after truncation; when the predicted interaction duration meets the preset conditions, including: when the predicted interaction duration after truncation meets the preset conditions.

[0010] In a possible implementation, the preference information is a score; and the preset first mapping relationship satisfies the following constraint: the output score is positively correlated with the predicted interaction duration.

[0011] In a possible implementation, the preference information is a score; the preset first mapping relationship satisfies: when the preference information tends to 0, the predicted interaction duration tends to 0; when the preference information tends to 1, the predicted interaction duration tends to infinity.

[0012] In a possible implementation, the preset first mapping relationship is specifically the following formula:

[0013] in, is the predicted interaction time, c is the cost variable, r u,v For preference information.

[0014] In one possible implementation, the method further includes:

[0015] According to the attribute information and / or context information, the cost variable is obtained through a first neural network model.

[0016] In a possible implementation, the item is a video, and the interaction duration is a viewing duration.

[0017] In a second aspect, the present application provides a data processing method, the method comprising:

[0018] Get attribute information of users and items;

[0019] Obtaining, based on the attribute information, first preference information of the user for the item through a second neural network model;

[0020] Predicting the user's second preference information for the item based on the user's actual interaction time with the item and a cost variable through a preset second mapping relationship; the cost variable is information that affects the user's interaction time with the item;

[0021] The second neural network model and the cost variable are updated according to the first preference information and the second preference information.

[0022] The goal of the embodiment of the present application is to accurately estimate the interaction duration of users. Due to the influence of duration bias, the estimates of previous models are often not accurate enough. The embodiment of the present application proposes the concept of counterfactual interaction duration to better explain the existence of item duration bias. The embodiment of the present application designs a cost-based conversion function to convert counterfactual interaction duration into user interest in items; then, corresponding loss functions are designed for complete interactions and incomplete interactions to supervise the training process of the recommendation model.

[0023] In one possible implementation, the method further includes:

[0024] According to the attribute information and / or context information, the cost variable is obtained by using a first neural network model;

[0025] The updating of the second neural network model and the cost variable according to the first preference information and the second preference information includes:

[0026] The second neural network model, the cost variable and the first neural network model are updated according to the first preference information and the second preference information.

[0027] Through the above method, two models are designed: the relevance model (that is, the second neural network model) is used to estimate the user's viewing interest in the current video, and the cost model (that is, the first neural network model) is used to estimate the user cost, and the two are jointly learned.

[0028] In a possible implementation, predicting the user's second preference information for the item based on the user's actual interaction duration and cost variable with the item through a preset second mapping relationship includes:

[0029] When the actual interaction duration is greater than the maximum interaction duration corresponding to the item, the user's second preference information for the item is predicted based on the maximum interaction duration and the cost variable through a preset second mapping relationship.

[0030] In a possible implementation, updating the neural network model according to the first preference information and the second preference information includes:

[0031] When the actual interaction duration is less than the maximum interaction duration corresponding to the item, constructing a first loss according to the first preference information and the second preference information, and updating the neural network model according to the first loss;

[0032] When the actual interaction duration is greater than the maximum interaction duration corresponding to the item, a second loss different from the first loss is constructed according to the first preference information and the second preference information, and the neural network model is updated according to the second loss.

[0033] In a possible implementation, the first loss is: MSE loss; the second loss is:

[0034] in,

[0035] The σ is the standard deviation of user interests.

[0036] In a possible implementation, the second mapping relationship is an inverse function of the first mapping relationship.

[0037] In a possible implementation, the preset second mapping relationship is specifically the following formula:

[0038] in, is the actual interaction time, c is the cost variable, r u,v For preference information.

[0039] In a possible implementation, the item is a video, and the interaction duration is a viewing duration.

[0040] In a third aspect, the present application provides a data processing device, comprising:

[0041] The acquisition module is used to obtain the attribute information of users and items;

[0042] a processing module, configured to obtain the user's preference information for the item based on the attribute information;

[0043] Determining a predicted interaction duration of the user with the item based on the preference information and a cost variable through a preset first mapping relationship; the cost variable is information that affects the interaction duration of the user with the item;

[0044] When the predicted interaction duration meets a preset condition, the item is recommended to the user.

[0045] In a possible implementation, the processing module is further configured to:

[0046] When the predicted interaction duration determined by the preset first mapping relationship is greater than the maximum interaction duration corresponding to the item, the maximum interaction duration is used as the truncated predicted interaction duration;

[0047] When the predicted interaction duration meets a preset condition, the method includes:

[0048] When the predicted interaction duration after the truncation meets a preset condition.

[0049] In a possible implementation, the preference information is a score; and the preset first mapping relationship satisfies the following constraint: the output score is positively correlated with the predicted interaction duration.

[0050] In a possible implementation, the preference information is a score; and the preset first mapping relationship satisfies:

[0051] When the preference information tends to 0, the predicted interaction duration tends to 0; when the preference information tends to 1, the predicted interaction duration tends to infinity.

[0052] In a possible implementation, the preset first mapping relationship is specifically the following formula:

[0053] in, is the predicted interaction time, c is the cost variable, r u,v For preference information.

[0054] In a possible implementation, the processing module is further configured to:

[0055] According to the attribute information and / or context information, the cost variable is obtained through a first neural network model.

[0056] In a possible implementation, the item is a video, and the interaction duration is a viewing duration.

[0057] In a fourth aspect, the present application provides a data processing device, comprising:

[0058] The acquisition module is used to obtain the attribute information of users and items;

[0059] a processing module, configured to obtain, based on the attribute information, first preference information of the user for the item through a second neural network model;

[0060] Predicting the user's second preference information for the item based on the user's actual interaction time with the item and a cost variable through a preset second mapping relationship; the cost variable is information that affects the user's interaction time with the item;

[0061] The second neural network model and the cost variable are updated according to the first preference information and the second preference information.

[0062] In a possible implementation, the processing module is further configured to:

[0063] According to the attribute information and / or context information, the cost variable is obtained by using a first neural network model;

[0064] The processing module is specifically used to:

[0065] The second neural network model, the cost variable and the first neural network model are updated according to the first preference information and the second preference information.

[0066] In a possible implementation, the processing module is specifically configured to:

[0067] When the actual interaction duration is greater than the maximum interaction duration corresponding to the item, the user's second preference information for the item is predicted based on the maximum interaction duration and the cost variable through a preset second mapping relationship.

[0068] In a possible implementation, the processing module is specifically configured to:

[0069] When the actual interaction duration is less than the maximum interaction duration corresponding to the item, constructing a first loss according to the first preference information and the second preference information, and updating the neural network model according to the first loss;

[0070] When the actual interaction duration is greater than the maximum interaction duration corresponding to the item, a second loss different from the first loss is constructed according to the first preference information and the second preference information, and the neural network model is updated according to the second loss.

[0071] In a possible implementation, the first loss is: MSE loss; the second loss is:

[0072] in,

[0073] The σ is the standard deviation of user interests.

[0074] In a possible implementation, the second mapping relationship is an inverse function of the first mapping relationship.

[0075] In a possible implementation, the preset second mapping relationship is specifically the following formula:

[0076] in, is the actual interaction time, c is the cost variable, r u,v For preference information.

[0077] In a possible implementation, the item is a video, and the interaction duration is a viewing duration.

[0078] In the fifth aspect, an embodiment of the present application provides a data processing device, which may include a memory, a processor, and a bus system, wherein the memory is used to store programs, and the processor is used to execute the programs in the memory to perform steps related to model reasoning in any optional method of the first aspect mentioned above.

[0079] In the sixth aspect, an embodiment of the present application provides a data processing device, which may include a memory, a processor, and a bus system, wherein the memory is used to store programs, and the processor is used to execute the programs in the memory to perform steps related to model training in any optional method in the second aspect above.

[0080] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, it enables the computer to execute the above-mentioned first aspect and any optional method thereof, or the above-mentioned second aspect and any optional method thereof.

[0081] In an eighth aspect, an embodiment of the present application provides a computer program which, when executed on a computer, enables the computer to execute the above-mentioned first aspect and any optional method thereof, or the above-mentioned second aspect and any optional method thereof.

[0082] In a ninth aspect, the present application provides a chip system comprising a processor configured to support a data processing device in implementing the functions described in the aforementioned aspects, such as transmitting or processing data or information described in the aforementioned methods. In one possible design, the chip system further comprises a memory configured to store program instructions and data necessary for executing or training the device. The chip system may consist solely of a chip or may include a chip and other discrete components. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] Figure 1 is a schematic diagram of the structure of the artificial intelligence main framework;

[0084] FIG2 is a schematic diagram of a system architecture provided in an embodiment of the present application;

[0085] FIG3 is a schematic diagram of a system architecture provided in an embodiment of the present application;

[0086] FIG4 is a schematic diagram of a recommendation scenario provided in an embodiment of the present application;

[0087] FIG5 is a flow chart of a data processing method provided in an embodiment of the present application;

[0088] FIG6A is a schematic diagram of a flow chart of a data processing method provided in an embodiment of the present application;

[0089] FIG6B is a flow chart of a data processing method provided in an embodiment of the present application;

[0090] FIG7 is a flow chart of a data processing method provided in an embodiment of the present application;

[0091] FIG8 is a schematic structural diagram of a data processing device provided in an embodiment of the present application;

[0092] FIG9 is a schematic diagram of a terminal device provided in an embodiment of the present application;

[0093] FIG10 is a schematic diagram of a server provided in an embodiment of the present application;

[0094] FIG11 is a schematic diagram of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0095] The following describes the embodiments of the present invention in conjunction with the accompanying drawings. The terms used in the embodiments of the present invention are only used to explain the specific embodiments of the present invention, and are not intended to limit the present invention.

[0096] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0097] The terms "first", "second", etc. 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 sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0098] First, let's describe the overall workflow of an AI system. See Figure 1, which shows a schematic diagram of the AI ​​framework. This framework will be explained from two perspectives: the "intelligent information chain" (horizontal axis) and the "IT value chain" (vertical axis). The "intelligent information chain" reflects the entire process from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. Throughout this process, data undergoes a condensed journey from "data-information-knowledge-wisdom." The "IT value chain," spanning the underlying infrastructure of human intelligence, information (provided and processed by technology), and the system's industrial ecosystem, reflects the value that AI brings to the information technology industry.

[0099] (1) Infrastructure

[0100] Infrastructure provides computing power for AI systems, enabling communication with the outside world and supporting this through a foundational platform. External communication occurs through sensors; computing power is provided by intelligent chips (CPUs, NPUs, GPUs, ASICs, FPGAs, and other hardware accelerators). The foundational platform includes a distributed computing framework and network-related platform guarantees and support, including cloud storage and computing, and interconnected networks. For example, sensors communicate with the outside world to acquire data, which is then fed into the intelligent chips within the distributed computing system provided by the foundational platform for computation.

[0101] (2) Data

[0102] Data above the infrastructure layer represents data sources for AI. This data includes graphics, images, voice, and text, as well as IoT data from traditional devices. This includes business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.

[0103] (3) Data processing

[0104] Data processing generally includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.

[0105] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.

[0106] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.

[0107] Decision-making refers to the process of making decisions after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.

[0108] (4) General ability

[0109] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.

[0110] (5) Smart products and industry applications

[0111] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart terminals, smart transportation, smart medical care, autonomous driving, smart cities, etc.

[0112] The embodiments of the present application can be applied to the field of information recommendation, which includes but is not limited to scenarios involving e-commerce product recommendations, search engine result recommendations, application market recommendations, music recommendations, video recommendations, etc. The recommended items in various application scenarios can also be called "objects" to facilitate subsequent descriptions, that is, in different recommendation scenarios, the recommended object can be an APP, or a video, or music, or a certain product (such as the presentation interface of an online shopping platform, which will display different products for presentation according to different users, which can actually be presented through the recommendation results of a recommendation model). These recommendation scenarios usually involve user behavior log collection, log data preprocessing (for example, quantization, sampling, etc.), sample set training to obtain a recommendation model, and analysis and processing of the objects involved in the scenario corresponding to the training sample items (such as APP, music, etc.) according to the recommendation model. For example, the samples selected in the recommendation model training link come from the user's operation behavior on the recommended APP in the mobile application market. The recommendation model trained thereby is applicable to the above-mentioned mobile APP application market, or can be used for the APP application market of other types of terminals to recommend terminal APPs. The recommendation model will ultimately calculate the recommendation probability or score of each object to be recommended. The recommendation system selects the recommendation results based on certain selection rules, such as sorting them by recommendation probability or score, and presents them to users through corresponding applications or terminal devices. Users operate on the objects in the recommendation results to generate user behavior logs, etc.

[0113] Referring to Figure 4, during the recommendation process, when a user interacts with the recommendation system, a recommendation request is triggered. The recommendation system inputs this request and its associated feature information into the deployed recommendation model, which then predicts the user's click-through rate for all candidate items. The candidate items are then sorted in descending order based on the predicted click-through rates and displayed in sequential order at different locations as the recommended results for the user. Users browse the displayed items and perform user actions, such as browsing, clicking, and downloading. These user actions are logged as training data, and the offline training module periodically updates the recommendation model parameters to improve the model's recommendation effectiveness.

[0114] For example, when a user opens a mobile app market, the app market's recommendation module is triggered. This module predicts the user's likelihood of downloading each candidate app based on historical download and click history, app features, and contextual information such as time and location. Based on these predictions, the app market displays apps in descending order of likelihood, increasing the probability of download. Specifically, apps more likely to be downloaded are ranked higher, while apps less likely to be downloaded are ranked lower. User behavior is also logged, and the prediction model parameters are trained and updated through an offline training module.

[0115] For example, in applications related to lifelong companions, based on the user's historical data in video, music, news and other domains, various models and algorithms can be used to imitate the human brain mechanism to build a cognitive brain and establish a user lifelong learning system framework. Lifelong companions can record past events of users based on system data and application data, understand users' current intentions, predict users' future actions or behaviors, and ultimately realize intelligent services. In the current first phase, based on music apps, video apps, browser apps, etc., user behavior data (including end-side text messages, photos, email events, etc.) is obtained. On the one hand, a user portrait system is built, and on the other hand, learning and memory modules based on user information filtering, association analysis, cross-domain recommendations, causal reasoning, etc. are implemented to build a user's personal knowledge graph.

[0116] Next, the application architecture of the embodiment of the present application is introduced.

[0117] Referring to FIG2 , an embodiment of the present invention provides a recommendation system architecture 200. The data acquisition device 260 is used to collect samples. A training sample can be composed of multiple feature information (or described as attribute information, such as user attributes and item attributes). Feature information can be of multiple types, specifically including user feature information, object feature information, and label features. User feature information is used to characterize user characteristics, such as gender, age, occupation, hobbies, etc. Object feature information is used to characterize the characteristics of the object pushed to the user. Different recommendation systems correspond to different objects, and the types of features that need to be extracted from different objects are also different. For example, the object features extracted from the training samples of the APP market can be the name (identification), type, size, etc. of the APP. ; The object features mentioned in the training samples of e-commerce apps can be the name of the product, the category it belongs to, the price range, etc.; the label feature is used to indicate whether the sample is a positive example or a negative example. Usually, the label feature of the sample can be obtained through the user's operation information on the recommended object. The sample in which the user operates the recommended object is a positive example, and the sample in which the user does not operate the recommended object or only browses the recommended object is a negative example. For example, when the user clicks, downloads, or purchases the recommended object, the label feature is 1, indicating that the sample is a positive example. If the user does not perform any operation on the recommended object, the label feature is 0, indicating that the sample is a negative example. After collection, the sample can be stored in the database 230. Some or all of the feature information in the sample in the database 230 can also be directly obtained from the client device 240, such as user feature information, user operation information on the object (used to determine the type identification), object feature information (such as object identification), etc. The training device 220 obtains a model parameter matrix based on the sample training in the database 230 for generating a recommendation model 201 (such as the feature extraction network and neural network in the embodiment of the present application). The following will describe in more detail how the training device 220 trains to obtain the model parameter matrix used to generate the recommendation model 201. The recommendation model 201 can be used to evaluate a large number of objects to obtain the scores of each object to be recommended. Furthermore, a specified or preset number of objects can be recommended from the evaluation results of a large number of objects. The calculation module 211 obtains the recommendation results based on the evaluation results of the recommendation model 201 and recommends them to the client device through the I / O interface 212.

[0118] In an embodiment of the present application, the training device 220 can select positive and negative samples from the sample set in the database 230 and add them to the training set, and then use the recommendation model to train the samples in the training set to obtain a trained recommendation model; the implementation details of the calculation module 211 can refer to the detailed description of the method embodiment shown in Figure 5.

[0119] After the training device 220 obtains the model parameter matrix based on sample training and uses it to construct the recommendation model 201, the recommendation model 201 is sent to the execution device 210, or the model parameter matrix is ​​directly sent to the execution device 210, and a recommendation model is constructed in the execution device 210 for making recommendations for the corresponding system. For example, the recommendation model obtained based on video-related sample training can be used to recommend videos to users on video websites or APPs, and the recommendation model obtained based on APP-related sample training can be used to recommend APPs to users in the application market.

[0120] Execution device 210 is equipped with an I / O interface 212 for data exchange with external devices. Execution device 210 can obtain user characteristic information, such as user ID, user identity, gender, occupation, and hobbies, from client device 240 via I / O interface 212. This information can also be obtained from a system database. Recommendation model 201 recommends target objects to the user based on the user characteristic information and the characteristic information of the recommended objects. Execution device 210 can be located in a cloud server or in a user client.

[0121] The execution device 210 can call data, code, etc. in the data storage system 250, and can also store output data in the data storage system 250. The data storage system 250 can be set in the execution device 210, can be set independently, or can be set in other network entities, and can be one or more.

[0122] The calculation module 211 uses the recommendation model 201 to process the user characteristic information and the characteristic information of the object to be recommended. For example, the calculation module 211 uses the recommendation model 201 to analyze and process the user characteristic information and the characteristic information of the object to be recommended, so as to obtain the score of the object to be recommended, and sort the objects to be recommended according to the score, among which the objects with higher rankings will be recommended to the client device 240.

[0123] Finally, the I / O interface 212 returns the recommendation result to the client device 240 and presents it to the user.

[0124] More deeply, the training device 220 can generate corresponding recommendation models 201 based on different sample feature information for different goals to provide users with better results.

[0125] It is worth noting that Figure 2 is only a schematic diagram of a system architecture provided by an embodiment of the present invention. The positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. For example, in Figure 2, the data storage system 250 is an external memory relative to the execution device 210. In other cases, the data storage system 250 can also be placed in the execution device 210.

[0126] In an embodiment of the present application, the training device 220, the execution device 210, and the client device 240 can be three different physical devices respectively. It is also possible that the training device 220 and the execution device 210 are on the same physical device or a cluster. It is also possible that the execution device 210 and the client device 240 are on the same physical device or a cluster.

[0127] Refer to Figure 3, which is a system architecture 300 proposed in an embodiment of the present invention. In this architecture, the execution device 210 is implemented by one or more servers, and optionally cooperates with other computing devices, such as data storage, routers, load balancers and other devices; the execution device 210 can be arranged at one physical site, or distributed at multiple physical sites. The execution device 210 can use the data in the data storage system 250, or call the program code in the data storage system 250 to implement the object recommendation function. Specifically, the information of the object to be recommended is input into the recommendation model, and the recommendation model generates an estimated score for each object to be recommended, and then sorts them in order from high to low according to the estimated score, and recommends the object to be recommended to the user according to the sorting result. For example, the first 10 objects in the sorting result are recommended to the user.

[0128] Among them, the data storage system 250 is used to receive and store the parameters of the recommendation model sent by the training device, as well as the data for storing the recommendation results obtained by the recommendation model. Of course, it may also include the program code (or instructions) required for the normal operation of the storage system 250. The data storage system 250 can be a distributed storage cluster composed of one device or multiple devices deployed outside the execution device 210. In this case, when the execution device 210 needs to use the data on the storage system 250, the storage system 250 can send the data required by the execution device to the execution device 210. Accordingly, the execution device 210 receives and stores (or caches) the data. Of course, the data storage system 250 can also be deployed in the execution device 210. When deployed in the execution device 210, the distributed storage system can include one or more memories. Optionally, when there are multiple memories, different memories are used to store different types of data. For example, the model parameters of the recommendation model generated by the training device and the data of the recommendation results obtained by the recommendation model can be stored in two different memories respectively.

[0129] Users can operate their respective user devices (e.g., local device 301 and local device 302) to interact with execution device 210. Each local device can represent any computing device, such as a personal computer, a computer workstation, a smartphone, a tablet computer, a smart camera, a smart car or other type of cellular phone, a media consumption device, a wearable device, a set-top box, a game console, etc.

[0130] Each user's local device can interact with the execution device 210 through a communication network of any communication mechanism / communication standard. The communication network can be a wide area network, a local area network, a point-to-point connection, etc., or any combination thereof.

[0131] In another implementation, the execution device 210 can be implemented by a local device. For example, the local device 301 can implement the recommendation function of the execution device 210 based on the recommendation model to obtain user feature information and feedback the recommendation results to the user, or provide services to the user of the local device 302.

[0132] Since the embodiments of the present application involve the application of a large number of neural networks, in order to facilitate understanding, the relevant terms and related concepts such as neural networks involved in the embodiments of the present application are first introduced below.

[0133] 1. Click-throughrate (CTR)

[0134] Click probability, also known as click-through rate, refers to the ratio of the number of clicks and exposures of recommended information (for example, recommended items) on a website or application. Click-through rate is usually an important indicator for measuring recommendation systems in recommendation systems.

[0135] 2. Personalized recommendation system

[0136] A personalized recommendation system refers to a system that uses machine learning algorithms to analyze users' historical data (such as the operation information in the embodiments of the present application), predicts new requests based on this data, and provides personalized recommendation results.

[0137] 3. Offline training

[0138] Offline training refers to a module in a personalized recommendation system that iteratively updates the recommendation model parameters according to the machine learning algorithm based on the user's historical data (such as the operation information in the embodiment of the present application) until the set requirements are met.

[0139] 4. Online Inference

[0140] Online prediction refers to predicting the user's preference for recommended items in the current context based on the characteristics of the user, item, and context based on the offline trained model, and predicting the probability of the user selecting the recommended item.

[0141] 5. Click-through rate: refers to the probability that a user clicks on a displayed item in a specific environment.

[0142] 6. Conversion rate: refers to the probability that a user will convert a clicked displayed item in a specific environment. Conversion generally refers to behaviors such as downloading, installation, and registration.

[0143] 7. Video duration: the length of the video itself.

[0144] 8. Watch time: The time a user spends on a video.

[0145] 9. Duration bias: The longer the video, the longer the average viewing time of the video that the user is interested in.

[0146] 10. User interaction data: This refers to the clicks, browsing, and other behavioral data generated when users interact with the recommendation system. Generally speaking, user interaction data is a combination of users' actual preferences and other external factors, which means it may not fully reflect users' true preferences.

[0147] For example, Figure 4 is a schematic diagram of a recommendation scenario provided by an embodiment of the present application. As shown in Figure 4, when a user enters the system, a recommendation request will be triggered. The recommendation system will input the request and related information (such as the operation information in the embodiment of the present application) into the recommendation model, and then predict the user's selection rate of items in the system. Furthermore, the items are sorted in descending order according to the predicted selection rate or a function based on the selection rate, that is, the recommendation system can display the items in different positions in sequence as recommendation results for the user. The user browses items in different positions and performs user behaviors, such as browsing, selecting, and downloading. At the same time, the user's actual behavior will be stored in the log as training data, and the parameters of the recommendation model will be continuously updated through the offline training module to improve the prediction effect of the model.

[0148] For example, a user opening an app store on a smart device (e.g., a mobile phone) triggers the app store's recommendation system. The app store's recommendation system predicts the probability of the user downloading each recommended app based on the user's historical behavior logs, such as their download history and selection history, as well as the app store's own characteristics, such as time, location, and other environmental characteristics. Based on the calculated results, the app store's recommendation system can display the candidate apps in descending order of predicted probability, thereby increasing the download probability of the candidate apps.

[0149] For example, an APP with a higher predicted user selection rate may be displayed in a front recommendation position, and an APP with a lower predicted user selection rate may be displayed in a back recommendation position.

[0150] The above-mentioned recommendation model can be a neural network model. The following introduces the relevant terms and concepts of neural networks that may be involved in the embodiments of the present application.

[0151] (1) Neural Network

[0152] A neural network can be composed of neural units. A neural unit can refer to an operation unit that takes xs (i.e., input data) and intercept 1 as input. The output of the operation unit can be:

[0153] Where s = 1, 2, ... n, n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal of the neural unit into the output signal. The output signal of the activation function can be used as the input of the next convolutional layer, and the activation function can be a sigmoid function. A neural network is a network formed by connecting multiple single neural units mentioned above, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field. The local receptive field can be an area composed of several neural units.

[0154] (2) Deep Neural Networks

[0155] Deep Neural Network (DNN), also known as multi-layer neural network, can be understood as a neural network with many hidden layers. There is no special metric for "many" here. Based on the position of different layers in DNN, the neural network inside DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the layers in between are all hidden layers. The layers are fully connected, that is, any neuron in the i-th layer must be connected to any neuron in the i+1-th layer. Although DNN looks complicated, the work of each layer is actually not complicated. Simply put, it is the following linear relationship expression: in, is the input vector, is the output vector, is the offset vector, W is the weight matrix (also called coefficient), and α() is the activation function. Each layer is just an input vector After such a simple operation, the output vector Since there are many DNN layers, the coefficient W and the offset vector The definition of these parameters in DNN is as follows: Take the coefficient W as an example: Assume that in a three-layer DNN, the linear coefficient from the 4th neuron in the second layer to the 2nd neuron in the third layer is defined as The superscript 3 represents the layer number of the coefficient W, while the subscript corresponds to the output of the third layer index 2 and the input of the second layer index 4. In summary, the coefficient from the kth neuron in the L-1th layer to the jth neuron in the Lth layer is defined as It's important to note that the input layer has no W parameter. In deep neural networks, more hidden layers allow the network to better capture complex real-world situations. Theoretically, a model with more parameters has higher complexity and greater "capacity," meaning it can handle more complex learning tasks. Training a deep neural network is essentially the process of learning the weight matrix, with the ultimate goal of obtaining the weight matrices for all layers of a trained deep neural network (a weight matrix formed by the vectors W across many layers).

[0156] (3) Loss function

[0157] During the training of a deep neural network, because we want the output of the deep neural network to be as close as possible to the desired predicted value, we can compare the current network's predicted value with the desired target value and then update the weight vector of each layer of the neural network based on the difference between the two. (Of course, before the first update, there is usually an initialization process, which pre-configures the parameters for each layer in the deep neural network.) For example, if the network's predicted value is too high, the weight vector is adjusted to make it predict a lower value. This adjustment is continued until the deep neural network can predict the desired target value or a value very close to the desired target value. Therefore, it is necessary to predefine "how to compare the difference between the predicted value and the target value." This is the loss function (or objective function), which is an important equation used to measure the difference between the predicted value and the target value. For example, the loss function output value (loss) indicates a greater difference, so training a deep neural network becomes a process of minimizing this loss.

[0158] (4) Backpropagation algorithm

[0159] The back propagation (BP) algorithm can be used to correct the size of the initial model parameters during training, reducing the model's error loss. Specifically, forward propagation of the input signal to the output generates error loss. This error loss information is then backpropagated to update the parameters in the initial model, thereby converging the error loss. The BP algorithm is a backward propagation movement driven by error loss, aiming to obtain optimal model parameters, such as the weight matrix.

[0160] (5) Machine Learning Systems

[0161] Based on the input data and labels, the parameters of the machine learning model are trained through optimization methods such as gradient descent, and finally the trained model is used to complete the prediction of unknown data.

[0162] (6) Personalized recommendation system

[0163] A system that uses machine learning algorithms to analyze and model users' historical data, predict new user requests, and provide personalized recommendation results.

[0164] The rise of video content platforms has attracted billions of users and is becoming increasingly common in people's daily lives. Accurate and personalized video recommendations play a crucial role in better meeting people's information needs and increasing their engagement. Unlike traditional recommendation scenarios, video recommendations utilize a streaming playback model, i.e., autoplay. This feature renders widely used implicit feedback (e.g., user clicks) inappropriate as a measure of user interest. Compared to click count, user viewing time indicates how much attention a user devotes to a video and is considered a better indicator of user interest. However, simply watching a video to the end doesn't necessarily mean they enjoy it. Even after finishing a video, they may still dislike it. Furthermore, in the short video landscape, the proportion of completed videos is significant. Using these completed videos as positive examples to supervise the training of recommendation ranking models would result in significant bias. Furthermore, the trend in the positive-negative feedback signal ratio for completed videos shows that shorter videos are associated with higher negative feedback and lower positive feedback. This is because it takes time for users to determine whether they enjoy a video, and videos that are too short are more likely to obscure their true interest.

[0165] Therefore, a more accurate recommendation method is needed.

[0166] The video recommendation problem can be described as follows: given a user u and a video of duration d, each user-video pair (u, v) is described by an n-dimensional feature vector x = φ(u, v) ∈ Rn. User u's interest in video v can be represented by an unobserved variable R. R ∈ {0, 1} is generally assumed to be a binary variable sampled from a latent Bernoulli distribution Pr(R = 1|x). The user's viewing behavior of the video can be recorded as log data where xi, wi, and di represent the feature vector of the i-th user-video pair, the user's viewing time on this video, and the duration of this video, respectively. Ideally, we would like to minimize the loss function to obtain the scoring formula f(x), which can also be used to obtain the relevance R of each user-video pair.

[0167] Where r is the unobserved user's true interest in the video, and σ is the sigmoid function. Since r is an unobservable variable, the above formula cannot be directly optimized. A naive approach is to replace the true correlation with the ratio of recorded viewing time to actual viewing time, also known as the video completion rate (PCR):

[0168] However, viewing time is affected by duration deviation and noise viewing. The technical problem to be solved by this patent is to discover the user's true interest in the video based on the potential counterfactual viewing time, which corresponds to the scoring function f(x) in the above formula.

[0169] In order to solve the above problems, the present application provides a data processing method.

[0170] 5 , which is a schematic diagram of an embodiment of a data processing method provided in an embodiment of the present application, as shown in FIG5 , a data processing method provided in an embodiment of the present application includes:

[0171] 501. Obtain attribute information of users and items;

[0172] In a possible implementation, the embodiment corresponding to FIG5 is the model inference process in the process of recommending to users, so that the attribute information of users and items can be obtained.

[0173] Among them, the user's attribute information can be attributes related to the user's preference characteristics, at least one of gender, age, occupation, income, hobbies and education level, among which gender can be male or female, age can be a number between 0-100, occupation can be teacher, programmer, chef, etc., hobbies can be basketball, tennis, running, etc., and education level can be elementary school, junior high school, high school, university, etc.; this application does not limit the specific type of user attribute information.

[0174] Among them, the items can be physical items or virtual items, such as applications (APP), audio and video, web pages, and news information. The attribute information of the items can be at least one of the item name, developer, installation package size, category, and praise. Among them, taking the item as an application as an example, the category of the item can be chat, parkour games, office, etc., and the praise degree can be a score, comment, etc. for the item; this application does not limit the specific type of attribute information of the item.

[0175] The items may be objects such as videos, audios, or texts that users can interact with for a long time.

[0176] 502. Obtain the user's preference information for the item based on the attribute information.

[0177] In one possible implementation, attribute information can be processed by a recommendation model (e.g., a refined ranking model) to represent preference information that can indicate the user's preference for the item. For example, the preference information can be a score (e.g., represented by a score from 0 to 1).

[0178] In addition, when determining the user's preference information for the item, the user's context information (such as location information, time information) may also be referenced, that is, the user's preference information for the item may be obtained based on attribute information and context information.

[0179] For example, taking video recommendation as an example, user features, video features and other environmental features can be used to form a sample x u,v , the sample is scored by the refined ranking model, and r is obtained u,v Its value range is (0,1), which represents the degree of preference of user u for video v.

[0180] 503. Determine the predicted interaction time of the user with the item based on the preference information and the cost variable through a preset first mapping relationship; the cost variable is information that affects the interaction time of the user with the item.

[0181] In a possible implementation, the item is a video, and the interaction duration is a viewing duration.

[0182] Taking videos as an example, when users watch videos, there may be situations where they don’t like the videos but still finish watching them. The reasons are, but not limited to, that the video is too short and does not give the user enough time to make a decision. In an embodiment of the present application, the concept of counterfactual viewing time is introduced to represent the user’s potential viewing time for a certain video. For example, two users watch and finish the same 30-second video. The first user feels average after watching the video, while the second user is still not satisfied and wants to continue watching. If the video is long enough, how long will the user watch it? Users have a potential viewing time for each video, which we call counterfactual viewing time. Therefore, the counterfactual viewing time of an unfinished video is its logged viewing time. The counterfactual viewing time of a completed video must be greater than or equal to its logged viewing time, and it is unobservable. The counterfactual viewing time corresponds to the user’s degree of preference for the video.

[0183] In an embodiment of the present application, the counterfactual interaction duration of a user with an item may be used as a feature of the user's preference for the item, and recommendations may be made based on this feature.

[0184] In order to predict the counterfactual interaction duration, in an embodiment of the present application, a preset mapping relationship can be constructed, which can map the preference information obtained according to step 501 and the user's cost variable to the user's predicted interaction duration for the item (that is, the counterfactual interaction duration).

[0185] The cost variable may be information that affects the user's interaction time with the item. For example, the cost variable may be related to the user's age group, region, etc. In one possible implementation, different cost variables may be set for different users.

[0186] For example, the cost variable may be obtained based on the user's attribute information or context information through a trained first neural network model.

[0187] Taking videos as an example, the counterfactual viewing time depends on the user's interests. This can be understood from an economic perspective, viewing user viewing as a process of maximizing their own interests. While users gain benefits from watching videos, they also pay a time cost. This is based on three basic assumptions:

[0188] 1. Marginal benefits: As the video relevance increases, it decreases as the viewing time increases;

[0189] 2. Marginal cost: does not change over time;

[0190] 3. Users watch to maximize profits and stop watching the video when the marginal benefit is less than the marginal cost.

[0191] The cumulative distribution of viewing revenue and viewing costs are as follows:

[0192] where w(r u,v ) is the initialized marginal benefit function. The two distribution functions are derived with respect to the counterfactual viewing time respectively. When the two are equal, they are the potential counterfactual viewing time values.

[0193] In a possible implementation, the preference information is a score; and the preset first mapping relationship satisfies the following constraint: the output score is positively correlated with the predicted interaction duration.

[0194] The change function g should satisfy the following properties: when r tends to 0, its marginal cost w should also tend to 0; when r tends to 1, its marginal cost tends to infinity. Because, optionally, the change function can be designed as ω(r u,v )=1 / (-log r u,v ),Right now:

[0195] Then its inverse function (that is, the first mapping relationship in the embodiment of the present application) can be:

[0196] In a possible implementation, the preference information is a score; the preset first mapping relationship satisfies: when the preference information tends to 0, the predicted interaction duration tends to 0; when the preference information tends to 1, the predicted interaction duration tends to infinity.

[0197] The embodiment of the present application proposes a conversion function of viewing time and relevance based on cost variables: a reasonable nonlinear conversion function of viewing time and relevance is designed, and cost variables are added to adapt to data with different distributions.

[0198] In one possible implementation, when the predicted interaction duration determined by a preset first mapping relationship is greater than the maximum interaction duration corresponding to the item (the maximum interaction duration can be understood as the longest interaction time when a user interacts with non-repetitive content of an item. Taking the item as a video as an example, the maximum interaction duration can be the length of the video itself), the predicted interaction duration can be truncated to the maximum interaction duration (that is, the maximum interaction duration is used as the predicted interaction duration after truncation).

[0199] Taking the object as a video as an example, the reasoning process can be shown in Figure 6B. User features, video features and other environmental features constitute the sample x u,v , the sample is scored by the refined ranking model, and r is obtained u,vIts value range is (0,1), representing the user u's preference for video v. The score and the user cost variable are then input into the variation function g to obtain the estimated value w of the user's counterfactual viewing time. u,v Finally, the counterfactual viewing time is truncated with the real video duration dv. If the counterfactual viewing time is greater than the real duration, the counterfactual viewing time is truncated to the real duration dv; otherwise, no processing is done.

[0200] 504. When the predicted interaction duration meets a preset condition, recommend the item to the user.

[0201] In one possible implementation, during the model's inference process, the predicted interaction duration can be used as a feature of the user's preference for an item to determine whether to recommend the item to the user.

[0202] When recommending information, items can be recommended to users in the form of a list page in the hope that users will take action.

[0203] In an embodiment of the present application, a conversion function based on the interaction time of the cost variable and the preference information is used to predict the user's interaction time with the item, and the predicted interaction time is used as the user's preference feature for recommendation. This can obtain a more accurate interaction time and thus a more accurate recommendation result.

[0204] 6A , which is a schematic diagram of an embodiment of a data processing method provided in an embodiment of the present application. As shown in FIG6A , a data processing method provided in an embodiment of the present application includes:

[0205] 601. Obtain attribute information of users and items;

[0206] Among them, the embodiment corresponding to Figure 6A can be the training process of the model. The introduction of step 601 can refer to the introduction of step 601 in the above embodiment, and the similarities are not repeated here.

[0207] 602. Obtaining first preference information of the user for the item through a second neural network model based on the attribute information;

[0208] In one possible implementation, the attribute information can be processed by a second neural network model (e.g., a refined ranking model) to represent preference information that can indicate the user's preference for the item. For example, the preference information can be a score (e.g., represented by a score from 0 to 1).

[0209] In addition, when determining the user's preference information for the item, the user's context information (such as location information, time information) may also be referenced, that is, the user's preference information for the item may be obtained based on attribute information and context information.

[0210] 603. Predicting the user's second preference information for the item based on the user's actual interaction duration with the item and a cost variable using a preset second mapping relationship; the cost variable is information that affects the user's interaction duration with the item;

[0211] In a possible implementation, the item is a video, and the interaction duration is a viewing duration.

[0212] The cost variable may be information that affects the user's interaction time with the item. For example, the cost variable may be related to the user's age group, region, etc. In one possible implementation, different cost variables may be set for different users.

[0213] For example, the cost variable can be obtained through a first neural network model based on the user's attribute information or context information.

[0214] The second mapping relationship may be an inverse function of the first mapping relationship introduced in the above embodiment.

[0215] For example, in a possible implementation, the preset second mapping relationship may be specifically the following formula:

[0216] in, is the actual interaction time, c is the cost variable, r u,v For preference information.

[0217] In one possible implementation, the actual interaction duration may be greater than the maximum interaction duration corresponding to an item. In this case, the actual interaction duration may be truncated to the maximum interaction duration. That is, when the actual interaction duration is greater than the maximum interaction duration corresponding to an item, the user's second preference information for the item may be predicted based on the maximum interaction duration and a cost variable using a preset second mapping relationship.

[0218] 604. Update the second neural network model and the cost variable according to the first preference information and the second preference information.

[0219] In one possible implementation, a loss may be constructed based on the first preference information and the second preference information, and the second neural network model and the cost variable may be updated using the loss.

[0220] In a possible implementation, if the first neural network model is used when calculating the cost variable, the second neural network model, the cost variable, and the first neural network model may be updated according to the first preference information and the second preference information.

[0221] Through the above method, two models are designed: the relevance model (that is, the second neural network model) is used to estimate the user's viewing interest in the current video, and the cost model (that is, the first neural network model) is used to estimate the user cost, and the two are jointly learned.

[0222] In a possible implementation, samples whose actual interaction duration is less than the maximum interaction duration corresponding to the item and samples whose actual interaction duration is greater than the maximum interaction duration may be modeled separately.

[0223] For example, when the actual interaction duration is less than the maximum interaction duration corresponding to the item, a first loss can be constructed based on the first preference information and the second preference information, and the neural network model can be updated based on the first loss; when the actual interaction duration is greater than the maximum interaction duration corresponding to the item, a second loss different from the first loss can be constructed based on the first preference information and the second preference information, and the neural network model can be updated based on the second loss.

[0224] In a possible implementation, the first loss is: MSE loss; the second loss is:

[0225] in,

[0226] The σ is the standard deviation of user interests.

[0227] For example, the loss can be formulated as follows:

[0228] Among them, \phi is the standard Gaussian distribution, \delta is the standard deviation of user interest, and is a hyperparameter.

[0229] An embodiment of the present application proposes a loss function for alleviating the problem of truncation of counterfactual interaction duration: the correlation signal among the counterfactual interaction duration truncated by the maximum interaction duration is learned through a distribution truncation loss function.

[0230] For example, a model training process for videos is shown in Figure 7. User characteristics, video characteristics, and other environmental features form samples xu,v, which are then scored by the refined ranking model. Furthermore, user viewing time is combined with the user cost variable and applied to the inverse of the change function g to obtain a user interest score. Using the user interest score as a supervisory signal and taking into account the varying video lengths, the recommendation refined ranking model's predicted scores are supervised and trained using the loss function Lc. The refined ranking model's parameters are trained using deep learning methods.

[0231] The goal of the embodiment of the present application is to accurately estimate the interaction duration of users. Due to the influence of duration bias, the estimates of previous models are often not accurate enough. The embodiment of the present application proposes the concept of counterfactual interaction duration to better explain the existence of item duration bias. The embodiment of the present application designs a cost-based conversion function to convert counterfactual interaction duration into user interest in items; then, corresponding loss functions are designed for complete interactions and incomplete interactions to supervise the training process of the recommendation model.

[0232] In order to verify the counterfactual interaction time correction algorithm proposed in the embodiment of this application, taking videos as an example, experimental verification was carried out on two public standard data sets and Huawei product data sets. The GAUC and nDCG indicators were used to verify the effectiveness of the method. It was compared with many baseline methods, including: video viewing time regression, video completion rate label (the ratio of watch time to duration), WeChat WTG algorithm, NDT algorithm, and Kuaishou D2Q algorithm. For the recommendation ranking model, the FM model and AutoInt model were also used.

[0233] Table 1 summarizes the recommendation performance of the CWM algorithm proposed in the embodiment of the present application and other baseline schemes in the short video scenario. It can be seen from the results that it is important for the CWM algorithm of the embodiment of the present application to obtain the best performance on all data sets and all refined ranking models. The results also verify that the assumption that previous methods regard all complete samples as having the same degree of user interest is not valid. Therefore, when the data set contains many completed samples (i.e., samples with truncated counterfactual viewing time), the performance of these methods becomes worse. On the contrary, CWM can model the user's truncated counterfactual viewing time to better estimate the user's interest and predict the user's viewing time.

[0234] Table 1

[0235] Next, a data processing device provided by an embodiment of the present application will be described from the perspective of a device. Referring to FIG. 8 , FIG. 8 is a schematic diagram of the structure of a data processing device provided by an embodiment of the present application. As shown in FIG. 8 , a data processing device 800 provided by an embodiment of the present application includes:

[0236] Acquisition module 801, used to obtain attribute information of users and items;

[0237] The detailed introduction of the acquisition module 801 can refer to the description of step 501 in the above embodiment, which will not be repeated here.

[0238] Processing module 802, configured to obtain the user's preference information for the item based on the attribute information;

[0239] Determining a predicted interaction duration of the user with the item based on the preference information and a cost variable through a preset first mapping relationship; the cost variable is information that affects the interaction duration of the user with the item;

[0240] When the predicted interaction duration meets a preset condition, the item is recommended to the user.

[0241] The detailed introduction of the processing module 802 can refer to the description of steps 502 to 504 in the above embodiment, which will not be repeated here.

[0242] In a possible implementation, the processing module 802 is further configured to:

[0243] When the predicted interaction duration determined by the preset first mapping relationship is greater than the maximum interaction duration corresponding to the item, the maximum interaction duration is used as the truncated predicted interaction duration;

[0244] When the predicted interaction duration meets a preset condition, the method includes:

[0245] When the predicted interaction duration after the truncation meets a preset condition.

[0246] In a possible implementation, the preference information is a score; and the preset first mapping relationship satisfies the following constraint: the output score is positively correlated with the predicted interaction duration.

[0247] In a possible implementation, the preference information is a score; and the preset first mapping relationship satisfies:

[0248] When the preference information tends to 0, the predicted interaction duration tends to 0; when the preference information tends to 1, the predicted interaction duration tends to infinity.

[0249] In a possible implementation, the preset first mapping relationship is specifically the following formula:

[0250] in, is the predicted interaction time, c is the cost variable, r u,v For preference information.

[0251] In a possible implementation, the processing module 802 is further configured to:

[0252] According to the attribute information and / or context information, the cost variable is obtained through a first neural network model.

[0253] In a possible implementation, the item is a video, and the interaction duration is a viewing duration.

[0254] In addition, an embodiment of the present application further provides a data processing device, the device comprising:

[0255] The acquisition module is used to obtain the attribute information of users and items;

[0256] a processing module, configured to obtain, based on the attribute information, first preference information of the user for the item through a second neural network model;

[0257] Predicting the user's second preference information for the item based on the user's actual interaction time with the item and a cost variable through a preset second mapping relationship; the cost variable is information that affects the user's interaction time with the item;

[0258] The second neural network model and the cost variable are updated according to the first preference information and the second preference information.

[0259] In a possible implementation, the processing module is further configured to:

[0260] According to the attribute information and / or context information, the cost variable is obtained by using a first neural network model;

[0261] The processing module is specifically used to:

[0262] The second neural network model, the cost variable and the first neural network model are updated according to the first preference information and the second preference information.

[0263] In a possible implementation, the processing module is specifically configured to:

[0264] When the actual interaction duration is greater than the maximum interaction duration corresponding to the item, the user's second preference information for the item is predicted based on the maximum interaction duration and the cost variable through a preset second mapping relationship.

[0265] In a possible implementation, the processing module is specifically configured to:

[0266] When the actual interaction duration is less than the maximum interaction duration corresponding to the item, constructing a first loss according to the first preference information and the second preference information, and updating the neural network model according to the first loss;

[0267] When the actual interaction duration is greater than the maximum interaction duration corresponding to the item, a second loss different from the first loss is constructed according to the first preference information and the second preference information, and the neural network model is updated according to the second loss.

[0268] In a possible implementation, the first loss is: MSE loss; the second loss is:

[0269] in,

[0270] The σ is the standard deviation of user interests.

[0271] In a possible implementation, the second mapping relationship is an inverse function of the first mapping relationship.

[0272] In a possible implementation, the preset second mapping relationship is specifically the following formula:

[0273] in, is the actual interaction time, c is the cost variable, r u,v For preference information.

[0274] In a possible implementation, the item is a video, and the interaction duration is a viewing duration.

[0275] Next, a terminal device provided in an embodiment of the present application is introduced. Please refer to Figure 9. Figure 9 is a structural schematic diagram of a terminal device provided in an embodiment of the present application. The terminal device 900 can be specifically manifested as a mobile phone, a tablet, a laptop computer, a smart wearable device, etc., which is not limited here. Among them, the terminal device 900 implements the function of the data processing method in the embodiment corresponding to Figure 5. Specifically, the terminal device 900 includes: a receiver 901, a transmitter 902, a processor 903 and a memory 904 (wherein the number of processors 903 in the terminal device 900 can be one or more), wherein the processor 903 may include an application processor 9031 and a communication processor 9032. In some embodiments of the present application, the receiver 901, the transmitter 902, the processor 903 and the memory 904 may be connected via a bus or other means.

[0276] The memory 904 may include a read-only memory and a random access memory, and provides instructions and data to the processor 903. A portion of the memory 904 may also include non-volatile random access memory (NVRAM). The memory 904 stores processor and operation instructions, executable modules, or data structures, or subsets or extended sets thereof. The operation instructions may include various operation instructions for implementing various operations.

[0277] Processor 903 controls the operation of the terminal device. In specific applications, the various components of the terminal device are coupled together via a bus system. In addition to a data bus, the bus system may also include a power bus, a control bus, and a status signal bus. However, for clarity, all bus systems are referred to as a bus system in the figure.

[0278] The method disclosed in the above embodiment of the present application can be applied to the processor 903 or implemented by the processor 903. The processor 903 can be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 903. The above processor 903 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, and a vision processor (VPU), a tensor processing unit (TPU) and other processors suitable for AI computing. It can also further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The processor 903 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory 904. The processor 903 reads the information in the memory 904 and, in conjunction with its hardware, completes steps 501 to 504 in the above embodiment.

[0279] Receiver 901 can be used to receive input digital or character information and generate signal input related to the relevant settings and function control of the terminal device. Transmitter 902 can be used to output digital or character information through the first interface. Transmitter 902 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group. Transmitter 902 can also include a display device such as a display screen.

[0280] The embodiment of the present application also provides a server. Please refer to Figure 10, which is a schematic diagram of the structure of a server provided by the embodiment of the present application. Specifically, the server 1000 is implemented by one or more servers. The server 1000 may have relatively large differences due to different configurations or performance. It may include one or more central processing units (CPUs) 1010 (for example, one or more processors) and memory 1032, and one or more storage media 1030 (for example, one or more mass storage devices) storing application programs 1042 or data 1044. Among them, the memory 1032 and the storage medium 1030 can be temporary storage or permanent storage. The program stored in the storage medium 1030 may include one or more modules (not shown in the figure), each module may include a series of instruction operations in the server. Furthermore, the central processing unit 1010 can be configured to communicate with the storage medium 1030 to execute a series of instruction operations in the storage medium 1030 on the server 1000.

[0281] The server 1000 may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input and output interfaces 1058; or one or more operating systems 1041, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0282] Specifically, the server may perform steps 601 to 604 in the above embodiment.

[0283] An embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the steps executed by the aforementioned execution device, or enables the computer to execute the steps executed by the aforementioned training device.

[0284] A computer-readable storage medium is also provided in an embodiment of the present application, which stores a program for signal processing. When the computer-readable storage medium is run on a computer, it enables the computer to execute the steps executed by the aforementioned execution device, or enables the computer to execute the steps executed by the aforementioned training device.

[0285] The execution device, training device or terminal device provided in the embodiments of the present application can specifically be a chip, and the chip includes: a processing unit and a communication unit, the processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, a pin or a circuit, etc. The processing unit can execute the computer execution instructions stored in the storage unit, so that the chip in the execution device executes the data processing method described in the above embodiment, or so that the chip in the training device executes the data processing method described in the above embodiment. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit can also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0286] Specifically, see Figure 11, which is a schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip can be represented as a neural network processor NPU 1100. NPU 1100 is mounted on the host CPU (host CPU) as a coprocessor and is assigned tasks by the host CPU. The core of the NPU is arithmetic circuit 1103, which is controlled by controller 1104 to extract matrix data from memory and perform multiplication operations.

[0287] The NPU 1100 can implement the data processing method provided in the embodiments described in FIG. 5 and FIG. 6A through the mutual cooperation between various internal components.

[0288] More specifically, in some implementations, the arithmetic circuit 1103 in the NPU 1100 includes multiple processing units (PEs). In some implementations, the arithmetic circuit 1103 is a two-dimensional systolic array. The arithmetic circuit 1103 can also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1103 is a general-purpose matrix processor.

[0289] For example, assume there are input matrix A, weight matrix B, and output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from weight memory 1102 and caches it on each PE in the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from input memory 1101 and performs a matrix operation on matrix B. The partial or final matrix result is stored in accumulator 1108.

[0290] Unified memory 1106 is used to store input and output data. Weight data is directly transferred to weight memory 1102 through the Direct Memory Access Controller (DMAC) 1105. Input data is also transferred to unified memory 1106 through the DMAC.

[0291] BIU stands for Bus Interface Unit, i.e., bus interface unit 1110 , which is used for interaction between the AXI bus, DMAC, and instruction fetch buffer (IFB) 1109 .

[0292] The bus interface unit 1110 (BIU) is used for the instruction fetch memory 1109 to obtain instructions from the external memory, and is also used for the storage unit access controller 1105 to obtain the original data of the input matrix A or the weight matrix B from the external memory.

[0293] DMAC is mainly used to move input data in the external memory DDR to the unified memory 1106 or to move weight data to the weight memory 1102 or to move input data to the input memory 1101.

[0294] The vector calculation unit 1107 includes multiple operation processing units. When necessary, it further processes the output of the operation circuit 1103, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.

[0295] In some implementations, the vector calculation unit 1107 can store the processed output vector in the unified memory 1106. For example, the vector calculation unit 1107 can apply a linear function or a nonlinear function to the output of the operation circuit 1103, such as linear interpolation of the feature plane extracted by the convolution layer, or accumulate a vector of values ​​to generate an activation value. In some implementations, the vector calculation unit 1107 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 1103, for example, for use in subsequent layers in a neural network.

[0296] An instruction fetch buffer 1109 connected to the controller 1104 is used to store instructions used by the controller 1104;

[0297] Unified memory 1106, input memory 1101, weight memory 1102, and instruction fetch memory 1109 are all on-chip memories. External memories are private to the NPU hardware architecture.

[0298] The processor mentioned in any of the above places can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the above program.

[0299] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.

[0300] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.

[0301] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0302] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a training device or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

Claims

1. A data processing method, characterized in that: The method comprises: Get the attribute information of users and items; Obtaining the user's preference information for the item according to the attribute information; Determining the predicted interaction time of the user with the item through a preset first mapping relationship according to the preference information and the cost variable; the cost variable is information that affects the interaction time of the user with the item; When the predicted interaction duration meets a preset condition, the item is recommended to the user.

2. The method according to claim 1, characterized in that The method further comprises: When the predicted interaction duration determined by the preset first mapping relationship is greater than the maximum interaction duration corresponding to the item, the maximum interaction duration is used as the truncated predicted interaction duration; When the predicted interaction duration meets a preset condition, the method includes: When the predicted interaction duration after the truncation meets a preset condition.

3. The method according to claim 1 or 2, characterized in that: The preference information is a score; the preset first mapping relationship satisfies the following constraint: the output score is positively correlated with the predicted interaction duration.

4. The method according to any one of claims 1 to 3, characterized in that: The preference information is a score; the preset first mapping relationship satisfies: When the preference information tends to 0, the predicted interaction duration tends to 0; when the preference information tends to 1, the predicted interaction duration tends to infinity.

5. The method according to any one of claims 1 to 4, characterized in that: The preset first mapping relationship is specifically the following formula: in, is the predicted interaction time, c is the cost variable, r u,υ For preference information.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: According to the attribute information and / or context information, the cost variable is obtained through a first neural network model.

7. The method according to any one of claims 1 to 6, characterized in that: The item is a video, and the interaction duration is a viewing duration.

8. A data processing method, characterized in that: The method comprises: Get the attribute information of users and items; According to the attribute information, obtaining the first preference information of the user for the item through a second neural network model; Predicting the second preference information of the user for the item according to the actual interaction time of the user for the item and the cost variable through a preset second mapping relationship; the cost variable is information that affects the interaction time of the user for the item; The second neural network model and the cost variable are updated according to the first preference information and the second preference information.

9. The method according to claim 8, characterized in that The method further comprises: According to the attribute information and / or context information, the cost variable is obtained by using a first neural network model; The updating of the second neural network model and the cost variable according to the first preference information and the second preference information includes: The second neural network model, the cost variable and the first neural network model are updated according to the first preference information and the second preference information.

10. The method according to claim 8 or 9, characterized in that: The predicting, based on the actual interaction time and cost variable of the user with respect to the item, the second preference information of the user with respect to the item through a preset second mapping relationship includes: When the actual interaction time is greater than the maximum interaction time corresponding to the item, the second preference information of the user for the item is predicted according to the maximum interaction time and the cost variable through a preset second mapping relationship.

11. The method according to any one of claims 8 to 10, characterized in that: The updating of the neural network model according to the first preference information and the second preference information includes: When the actual interaction time is less than the maximum interaction time corresponding to the item, constructing a first loss according to the first preference information and the second preference information, and updating the neural network model according to the first loss; When the actual interaction duration is greater than the maximum interaction duration corresponding to the item, a second loss different from the first loss is constructed according to the first preference information and the second preference information, and the neural network model is updated according to the second loss.

12. The method according to claim 11, characterized in that The first loss is: MSE loss; the second loss is: in, The σ is the standard deviation of user interests.

13. The method according to any one of claims 8 to 12, characterized in that: The second mapping relationship is an inverse function of the first mapping relationship.

14. The method according to any one of claims 8 to 13, characterized in that: The preset second mapping relationship is specifically the following formula: in, is the actual interaction time, c is the cost variable, r u,υ For preference information.

15. The method according to any one of claims 8 to 13, characterized in that: The item is a video, and the interaction duration is a viewing duration.

16. A data processing device, characterized in that: The device comprises: The acquisition module is used to obtain the attribute information of users and items; A processing module, used for obtaining the user's preference information for the item according to the attribute information; Determining the predicted interaction time of the user with the item through a preset first mapping relationship according to the preference information and the cost variable; the cost variable is information that affects the interaction time of the user with the item; When the predicted interaction duration meets a preset condition, the item is recommended to the user.

17. The device according to claim 16, characterized in that The processing module is further used for: When the predicted interaction duration determined by the preset first mapping relationship is greater than the maximum interaction duration corresponding to the item, the maximum interaction duration is used as the truncated predicted interaction duration; When the predicted interaction duration meets a preset condition, the method includes: When the predicted interaction duration after the truncation meets a preset condition.

18. The device according to claim 16 or 17, characterized in that The preference information is a score; the preset first mapping relationship satisfies the following constraint: the output score is positively correlated with the predicted interaction duration.

19. The device according to any one of claims 16 to 18, characterized in that The preference information is a score; the preset first mapping relationship satisfies: When the preference information tends to 0, the predicted interaction duration tends to 0; when the preference information tends to 1, the predicted interaction duration tends to infinity.

20. The device according to any one of claims 16 to 19, characterized in that The preset first mapping relationship is specifically the following formula: in, is the predicted interaction time, c is the cost variable, r u,υ For preference information.

21. The device according to any one of claims 16 to 20, characterized in that The processing module is further used for: According to the attribute information and / or context information, the cost variable is obtained through a first neural network model.

22. The device according to any one of claims 16 to 21, characterized in that The item is a video, and the interaction duration is a viewing duration.

23. A data processing device, characterized in that: The device comprises: The acquisition module is used to obtain the attribute information of users and items; A processing module, configured to obtain, based on the attribute information, first preference information of the user for the item through a second neural network model; Predicting the second preference information of the user for the item according to the actual interaction time of the user for the item and the cost variable through a preset second mapping relationship; the cost variable is information that affects the interaction time of the user for the item; The second neural network model and the cost variable are updated according to the first preference information and the second preference information.

24. The device according to claim 23, characterized in that The processing module is further used for: According to the attribute information and / or context information, the cost variable is obtained by using a first neural network model; The processing module is specifically used for: The second neural network model, the cost variable and the first neural network model are updated according to the first preference information and the second preference information.

25. The device according to claim 23 or 24, characterized in that The processing module is specifically used for: When the actual interaction time is greater than the maximum interaction time corresponding to the item, the second preference information of the user for the item is predicted according to the maximum interaction time and the cost variable through a preset second mapping relationship.

26. The device according to any one of claims 23 to 25, characterized in that The processing module is specifically used for: When the actual interaction time is less than the maximum interaction time corresponding to the item, constructing a first loss according to the first preference information and the second preference information, and updating the neural network model according to the first loss; When the actual interaction duration is greater than the maximum interaction duration corresponding to the item, a second loss different from the first loss is constructed according to the first preference information and the second preference information, and the neural network model is updated according to the second loss.

27. The device according to claim 26, characterized in that The first loss is: MSE loss; the second loss is: in, The σ is the standard deviation of user interests.

28. The device according to any one of claims 23 to 27, characterized in that The second mapping relationship is an inverse function of the first mapping relationship.

29. The device according to any one of claims 23 to 28, characterized in that The preset second mapping relationship is specifically the following formula: in, is the actual interaction time, c is the cost variable, r u,υ For preference information.

30. The device according to any one of claims 23 to 29, characterized in that The item is a video, and the interaction duration is a viewing duration.

31. A data processing device, characterized in that: The device includes a memory and a processor; the memory stores codes, and the processor is configured to obtain the codes and execute the method according to any one of claims 1 to 15.

32. A computer storage medium, characterized in that The computer storage medium stores one or more instructions, which, when executed by one or more computers, enable the one or more computers to implement the method of any one of claims 1 to 15.

33. A computer program product, characterized in that The computer program product comprises codes for implementing the steps of the method according to any one of claims 1 to 15 when the codes are executed.

Citation Information

Patent Citations

  • Data processing method and related equipment

    CN119719474A

  • Object recommendation method and device based on artificial intelligence and electronic equipment

    CN111125420A

  • Project use duration prediction method and device, equipment and storage medium

    CN112035740A

  • Video recommendation method, model training method, electronic equipment and storage medium

    CN115408559A

  • Network model training method and device, video recommendation method and device and electronic equipment

    CN116320635A