Duration prediction model training method and apparatus, computer device, and storage medium
By introducing an auxiliary model to obtain pseudo-duration labels, the problems of small training data volume and sample selection bias are solved, and the accuracy of the duration prediction model and the reliability of the ranking results are improved.
Patent Information
- Application Number
- PCT/CN2024/074237
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-27
- Filing Date
- 2024-01-26
- Publication Date
- 2024-10-03
AI Technical Summary
When training the duration prediction model, the existing technology has problems such as small amount of training data, sample selection bias, and gradient update conflicts, resulting in low duration prediction accuracy, especially when multiple network contents have the same click-through rate and it is difficult to sort effectively. .
By introducing an auxiliary model, the pseudo-duration labels of negative samples are obtained for training the duration prediction model, increasing the amount of training data, making full use of positive and negative samples, solving the problem of sample selection bias, and improving the accuracy of the duration prediction model.
It improves the accuracy of the duration prediction model in predicting the browsing duration of online content, enhances the learning ability of negative samples, and improves the reliability of the sorting results.
Smart Images

Figure CN2024074237_03102024_PF_FP_ABST
Abstract
Description
Duration prediction model training method, device, computer equipment and storage medium
[0001] Related applications
[0002] This application claims priority to Chinese patent application number 2023103134685, filed on March 27, 2023, entitled “Training method, device, computer equipment and storage medium for duration prediction model,” the entire text of which is hereby incorporated by reference. Technical Field
[0003] The present application relates to the field of computer technology, and in particular to a training method, apparatus, computer equipment, and storage medium for a duration prediction model. Background Art
[0004] With the advancement of computer technology, applications can now predict the click-through rates (CTRs) of multiple web content items based on click prediction models. These applications can then recommend web content, such as videos, audio, news, and items, to users based on the CTR ranking results to meet their diverse interests. However, this approach is not suitable for situations where multiple web content items have the same predicted CTR. Therefore, how to rank web content with the same predicted CTRs remains a technical challenge that needs to be addressed.
[0005] In related technologies, a duration prediction model is usually introduced based on the click prediction model. While predicting the click rate of network content, the duration prediction model is used to predict the browsing time after the network content is clicked, and then the network content is sorted according to the predicted results of the browsing time.
[0006] However, the amount of online content exposed includes both clickable and unclickable content, with the unclickable content far outnumbering the clickable content. Consequently, related technologies suffer from issues such as small training data volumes, sample selection bias, and gradient update conflicts, resulting in low duration prediction accuracy.
[0007] Summary of the Invention
[0008] The embodiments of the present application provide a training method, apparatus, computer equipment, and storage medium for a duration prediction model.
[0009] In one aspect, a method for training a duration prediction model is provided, the method being performed by a computer device, the method comprising:
[0010] Obtaining a training sample subset obtained by dividing the training sample set, wherein the training sample subset includes a plurality of sample network contents, and the plurality of sample network contents include positive samples with clicks and negative samples with no clicks;
[0011] Determine the number of positive samples included in the training sample subset to obtain a target number, use the auxiliary model to be trained to predict the duration labels of the target number of negative samples in the training sample set, and obtain pseudo duration labels for each of the target number of negative samples, where the pseudo duration labels are used to indicate whether the browsing duration after the negative sample is predicted to be clicked is greater than a duration threshold; and
[0012] Obtain a true duration label for each of the multiple sample network contents, and train a duration prediction model and the auxiliary model based on the target number of negative samples, the pseudo duration labels for each of the target number of negative samples, the multiple sample network contents, and the true duration labels for each of the multiple sample network contents. The true duration label is used to indicate whether the browsing duration of the sample network content after an actual click is greater than the duration threshold, and the duration prediction model is used to predict the probability that the browsing duration of the sample network content after a click is greater than the duration threshold.
[0013] In another aspect, a training device for a duration prediction model is provided, the device comprising:
[0014] A partitioning module is used to obtain a training sample subset obtained by partitioning the training sample set, wherein the training sample subset includes a plurality of sample network contents, and the plurality of sample network contents include positive samples of clicks that occur and negative samples of no clicks that occur;
[0015] A prediction module is configured to determine the number of positive samples included in the training sample subset to obtain a target number, and use the auxiliary model to be trained to perform duration label prediction on the target number of negative samples in the training sample set to obtain pseudo duration labels for each of the target number of negative samples, wherein the pseudo duration labels are used to indicate whether the predicted browsing duration after the negative sample is clicked is greater than a duration threshold;
[0016] A training module is used to obtain the real duration labels of each of the multiple sample network contents, and train the duration prediction model and the auxiliary model based on the target number of negative samples, the pseudo duration labels of each of the target number of negative samples, the multiple sample network contents, and the real duration labels of each of the multiple sample network contents. The real duration label is used to indicate whether the browsing duration of the sample network content after it is actually clicked is greater than the duration threshold, and the duration prediction model is used to predict the probability that the browsing duration of the sample network content after it is clicked is greater than the duration threshold.
[0017] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the training method of the duration prediction model in the embodiment of the present application.
[0018] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement a training method for a duration prediction model as in an embodiment of the present application.
[0019] On the other hand, a computer program product is provided, including a computer program, which is executed by a processor to implement the training method of the duration prediction model provided in the embodiments of the present application.
[0020] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.
[0022] FIG1 is a schematic diagram of an implementation environment of a training method for a duration prediction model provided according to an embodiment of the present application;
[0023] FIG2 is a flow chart of a method for training a duration prediction model according to an embodiment of the present application;
[0024] FIG3 is a flowchart of another method for training a duration prediction model according to an embodiment of the present application;
[0025] FIG4 is a schematic structural diagram of an auxiliary model provided according to an embodiment of the present application;
[0026] FIG5 is a schematic diagram of the structure of a click prediction model and a duration prediction model provided according to an embodiment of the present application;
[0027] FIG6 is a block diagram of a training device for a duration prediction model according to an embodiment of the present application;
[0028] FIG7 is a block diagram of another training device for a duration prediction model according to an embodiment of the present application;
[0029] FIG8 is a structural block diagram of a terminal provided according to an embodiment of the present application;
[0030] FIG9 is a schematic structural diagram of a server provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0032] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on the quantity and execution order.
[0033] In the present application, the term "at least one" means one or more, and the term "plurality" means two or more.
[0034] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the training sample sets and real time labels involved in this application were obtained with full authorization.
[0035] The following explains the terms used in this application.
[0036] Artificial Intelligence (AI) is the theory, methods, techniques, 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 comprehensive technology within computer science that seeks to understand the essence of intelligence and produce 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.
[0037] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and smart transportation.
[0038] Machine Learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning through demonstration.
[0039] Label: Labeled data that is relied upon when training deep neural networks, such as "0 / 1" indicating "belongs / does not belong" to a certain category.
[0040] Batch: Model training is an iterative process, where a batch of data is used as the input of the model each time. Such a batch of data is called a Batch.
[0041] Embedding: A numerical vector composed of multiple floating-point numbers that describes the various attributes and properties of an item or user in a high-dimensional space.
[0042] Backpropagation algorithm: The basic training algorithm for deep neural networks, which refers to the process of calculating the direction and magnitude of changes in model parameters based on the difference between the model's predicted results and the true values.
[0043] The training method of the duration prediction model provided in the embodiment of the present application can be executed by a computer device. In some embodiments, the computer device is a terminal or a server. The following takes the computer device as an example of a server to introduce the implementation environment of the training method of the duration prediction model provided in the embodiment of the present application. Figure 1 is a schematic diagram of the implementation environment of a training method of a duration prediction model provided according to an embodiment of the present application. Referring to Figure 1, the implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 are directly or indirectly connected via wired or wireless communication, and this application does not limit this.
[0044] In some embodiments, the terminal 101 is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, a car terminal, etc., but is not limited thereto. An application capable of displaying network content is installed on the terminal 101. The application may be a social application, an information application, a shopping application, etc., which is not limited in the embodiments of the present application. Illustratively, the terminal 101 can obtain multiple network contents browsed by the user through the above-mentioned social application, and the network content may be a multimedia resource, such as a video, an article, a picture, etc. The terminal 101 can upload multiple network contents to the server 102, and the server 102 trains the duration prediction model based on the multiple network contents.
[0045] Those skilled in the art will appreciate that the number of the terminals may be greater or lesser, for example, there may be only one terminal, or there may be dozens or hundreds of terminals, or a greater number. The embodiments of the present application do not limit the number of terminals and device types.
[0046] In some embodiments, the server 102 is an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server 102 is used to provide background services for applications that support the above-mentioned network content collection. Schematically, the server 102 receives multiple network contents uploaded by the terminal 101. Then, the server 102 trains the duration prediction model through the multiple network contents and the browsing time of the multiple network contents.
[0047] In some embodiments, the server 102 undertakes the main computing work and the terminal 101 undertakes the secondary computing work; or, the server 102 undertakes the secondary computing work and the terminal 101 undertakes the main computing work; or, the server 102 and the terminal 101 adopt a distributed computing architecture to perform collaborative computing.
[0048] FIG2 is a flow chart of a method for training a duration prediction model according to an embodiment of the present application. As shown in FIG2 , the method is described using a server as an example. The method for training a duration prediction model includes the following steps:
[0049] 201. Obtain a training sample subset obtained by dividing the training sample set, where the training sample subset includes a plurality of sample network contents, and the plurality of sample network contents include positive samples with clicks and negative samples with no clicks.
[0050] In some embodiments, the server may obtain a training sample set and divide the training sample set into multiple training sample subsets, each of which includes multiple sample network content, including positive samples that generated clicks and negative samples that did not generate clicks. When dividing the training sample set, the training sample set may be divided into multiple training sample subsets based on a predetermined number of sample network content in each training sample subset. Alternatively, the training sample set may be divided into a predetermined number of training sample subsets.
[0051] In an embodiment of the present application, a training sample set includes multiple training sample subsets, each of which includes multiple sample web content. Each training sample subset is used for a batch of training. The sample web content is content exposed to sample users via an application installed on the terminal. The application can be a social application, an information application, a shopping application, or the like. Taking a social application as an example, the sample web content can be multimedia resources such as images, articles, videos, etc., but this embodiment of the present application is not limited to this. The server can use web content uploaded by the terminal via the application as sample web content, or can obtain sample web content from a local database or other servers, and construct the training sample set based on the obtained sample web content. The server can classify the multiple sample web content into positive samples and negative samples based on the click operations of the sample users on the sample web content. Positive samples are sample web content that is exposed to and clicked by the sample users; negative samples are sample web content that is exposed to but not clicked by the sample users.
[0052] 202. Determine the number of positive samples included in the training sample subset to obtain the target number, use the auxiliary model to be trained to predict the duration labels of the target number of negative samples in the training sample set, and obtain the pseudo duration labels of the target number of negative samples. The pseudo duration labels are used to indicate whether the browsing time after the predicted negative sample is clicked is greater than the duration threshold.
[0053] In some embodiments, the server may count the number of positive samples included in the training sample subset to obtain a target number, and use the auxiliary model to be trained to predict the duration labels of the target number of negative samples in the training sample set to obtain pseudo duration labels for the target number of negative samples. The pseudo duration labels are used to indicate whether the browsing time after the predicted negative sample is clicked is greater than the duration threshold.
[0054] In some embodiments, for any training sample subset, the server predicts a target number of negative samples in the training sample set based on an auxiliary model to obtain pseudo-duration labels for the target number of negative samples. The auxiliary model is used to generate pseudo-duration labels for the negative samples. The target number is the same as the number of positive samples in the training sample subset. The pseudo-duration labels are used to indicate whether the browsing time after the negative sample is clicked is greater than the duration threshold.
[0055] In an embodiment of the present application, the auxiliary model is a model obtained by pre-training based on multiple sample network contents that have been clicked and the real duration labels of each of the multiple sample network contents. The real duration label is used to indicate whether the browsing duration after the sample network content is actually clicked is greater than the duration threshold. The server can predict the probability that the browsing duration of the sample network content in the training sample set after being clicked is greater than the duration threshold through the auxiliary model. The training sample set includes a large number of negative samples that have not been clicked. Since the negative samples have not been clicked, the browsing duration of the negative samples is recorded as 0, which in turn causes the duration labels of the negative samples to be recorded as 0. However, the real browsing duration of the negative samples should be unknown, and the duration labels of the negative samples cannot be recorded as 0 just because no clicks have occurred. Therefore, for any subset of training samples, the server can use the auxiliary model to predict the probability that the browsing duration of the target number of negative samples in the training sample set after being clicked is greater than the duration threshold, and determine the pseudo duration labels of the target number of negative samples based on the obtained probability. Among them, the pseudo duration label is used to indicate whether the browsing time after the negative sample is clicked is greater than the duration threshold, and the target number is the number of positive samples in the training sample subset.
[0056] 203. Obtain the true duration labels of multiple sample network contents, and train a duration prediction model and an auxiliary model based on a target number of negative samples, the pseudo duration labels of the target number of negative samples, multiple sample network contents, and the true duration labels of the multiple sample network contents. The true duration label is used to indicate whether the browsing duration of the sample network content after it is actually clicked is greater than a duration threshold, and the duration prediction model is used to predict the probability that the browsing duration of the sample network content after it is clicked is greater than the duration threshold.
[0057] In some embodiments, the server may obtain the real duration labels of multiple sample network contents, and train a duration prediction model and an auxiliary model based on a target number of negative samples, the pseudo duration labels of the target number of negative samples, multiple sample network contents, and the real duration labels of the multiple sample network contents. The real duration label is used to indicate whether the browsing duration of the sample network content after it is actually clicked is greater than the duration threshold, and the duration prediction model is used to predict the probability that the browsing duration of the sample network content after it is clicked is greater than the duration threshold.
[0058] In some embodiments, the duration prediction model and the auxiliary model have the same structure. In this embodiment, the duration prediction model and the auxiliary model have the same layers and layer connections. The duration prediction model and the auxiliary model can be trained using the same untrained initial model.
[0059] In some embodiments, the auxiliary model is trained using positive samples in the training sample subset, and the duration prediction model is trained using multiple sample network contents in the training sample subset and a target number of negative samples in the training sample subset.
[0060] The training data of the auxiliary model are the positive samples of clicks in the training sample subset, and the training data of the duration prediction model are the multiple sample network contents in the training sample subset and the target number of negative samples, which is the same as the number of positive samples in the training sample subset. The server can synchronously train the duration prediction model and the auxiliary model through the target number of negative samples, the pseudo-duration labels of the target number of negative samples, the multiple sample network contents in the training sample subset, and the real duration labels of the multiple sample network contents. During the training process, the server can update the model parameters of the duration prediction model and the auxiliary model respectively based on the training loss obtained from the training. Among them, the training loss is used to reflect the training accuracy of the auxiliary model and the duration prediction model. The smaller the training loss, the more accurate the pseudo-duration labels generated by the auxiliary model for the negative samples, and the more accurate the duration prediction model's prediction of the probability that the browsing time after clicking on the sample network content is greater than the duration threshold.
[0061] An embodiment of the present application provides a training method for a duration prediction model. By introducing an auxiliary model, pseudo duration labels can be generated for a target number of negative samples in a training sample set, so that the duration prediction model and the auxiliary model can be trained based on the target number of negative samples, the pseudo duration labels of the target number of negative samples, multiple sample network contents in the training sample subset, and the real duration labels of the multiple sample network contents. In this way, the trained duration prediction model can not only learn the sample network content, but also further learn the negative samples based on the pseudo duration labels, thereby increasing the training data of the duration prediction model. By making full use of positive and negative samples for training, the problem of sample selection bias is solved, thereby improving the accuracy of duration prediction by the duration prediction model.
[0062] FIG3 is a flow chart of another method for training a duration prediction model according to an embodiment of the present application. As shown in FIG3 , the method is described in the embodiment of the present application using execution by a server as an example. The method for training a duration prediction model includes the following steps:
[0063] 301. Obtain a training sample set, where the training sample set includes a plurality of sample network contents, and the plurality of sample network contents include positive samples where clicks occur and negative samples where no clicks occur.
[0064] In an embodiment of the present application, the training sample set includes multiple sample network contents. The sample network contents are contents exposed to the sample users through an application installed on the terminal. The application can be a social application, an information application, a shopping application, etc. Taking a social application as an example, the sample network contents can be multimedia resources, such as pictures, articles, videos, etc., which is not limited in this embodiment of the present application. The server can use the network content uploaded by the terminal through the application as sample network content, or obtain the sample network content from a local database, or obtain the sample network content from other servers, and construct the training sample set based on the obtained sample network content. The server can divide the multiple sample network contents into positive samples and negative samples based on the click operations of the sample users on the sample network contents. Among them, the positive samples are sample network contents exposed to the sample users and clicked by the sample users; the negative samples are sample network contents exposed to the sample users but not clicked by the sample users.
[0065] In some embodiments, the training sample set includes multiple feature fields for describing various attributes of the sample user and the sample web content, wherein the multiple feature fields include sparse-category fields and continuous-value fields. For example, the object identifier of the sample user of the sample web content, the sample user's interest category, the network content identifier of the sample web content, and the identifier of the target of the sample web content are all sparse-category fields; the click-through rate of the exposure of the sample user over a period of time and the click-through rate of the exposure of the target of the sample web content over a period of time are continuous-value fields.
[0066] 302. Obtain an auxiliary model, a duration prediction model, and a click prediction model. The auxiliary model is used to generate a pseudo duration label for a negative sample. The duration prediction model is used to predict the probability that the browsing duration of the sample network content after being clicked is greater than a duration threshold. The click prediction model is used to predict the probability of a click on the sample network content.
[0067] In the embodiment of the present application, the auxiliary model, duration prediction model, and click prediction model have the same model structure. The training data for the auxiliary model is multiple positive samples of clicks in the training sample set, while the training data for the duration prediction model and click prediction model is all sample network content in the training sample set, including positive and negative samples. Based on the multiple sample network content in the training sample set, the server can synchronously train the auxiliary model, duration prediction model, and click prediction model.
[0068] It should be noted that, for the sake of distinction, the auxiliary model, duration prediction model, and click prediction model may be referred to as the first model, the second model, and the third model, respectively.
[0069] 303. Obtain a training sample subset obtained by dividing the training sample set, where the training sample subset includes a plurality of sample network contents.
[0070] In an embodiment of the present application, the server can perform multiple rounds of training on the auxiliary model, duration prediction model, and click prediction model. The server can divide the training sample set into multiple batches, that is, multiple training sample subsets. The multiple sample network content in each training sample subset can be used as a batch to train the auxiliary model, duration prediction model, and click prediction model once.
[0071] 304. Determine the number of positive samples included in the training sample subset to obtain a target number, use the auxiliary model to be trained to predict the duration labels of the target number of negative samples in the training sample set, and obtain pseudo duration labels for the target number of negative samples. The pseudo duration labels are used to indicate whether the browsing duration after the predicted negative sample is clicked is greater than the duration threshold.
[0072] In some embodiments, for any training sample subset, the server predicts a target number of negative samples in the training sample set based on an auxiliary model, and obtains pseudo-duration labels for the target number of negative samples. The target number is the same as the number of positive samples in the training sample subset. The pseudo-duration label is used to indicate whether the browsing time after the negative sample is clicked is greater than the duration threshold.
[0073] In an embodiment of the present application, the training sample set includes a large number of negative samples that have not been clicked. Since the negative samples have not been clicked, the browsing time of the negative samples is recorded as 0, which in turn causes the duration label of the negative samples to be recorded as 0. However, the actual browsing time of the negative samples should be unknown, and the duration label of the negative samples cannot be recorded as 0 just because no click has occurred. Therefore, for any training sample subset, the server can randomly obtain a target number of negative samples from the training sample set that is the same as the number of positive samples in the training sample subset. Based on the auxiliary model, the server predicts the probability that the browsing time of the target number of negative samples after being clicked is greater than the duration threshold. Based on the predicted probability, the server determines the pseudo-duration label of each of the target number of negative samples. Among them, the pseudo-duration label is used to indicate whether the browsing time of the negative sample after being clicked is greater than the duration threshold. The target number is the number of positive samples in the training sample subset. The duration threshold can be 65 seconds, 75 seconds, 85 seconds, etc., which is not limited in the embodiment of the present application.
[0074] In some embodiments, the click prediction model is an untrained model. For any subset of training samples, the server can synchronously train the auxiliary model, the duration prediction model, and the click prediction model based on the target number of negative samples, the pseudo duration labels of the target number of negative samples, multiple sample network contents, and the real duration labels of the multiple sample network contents. The training processes of the auxiliary model, the duration prediction model, and the click prediction model are introduced below. For the training process of the auxiliary model, please refer to step 305 below; for the training steps of the duration prediction model, please refer to step 306 below; for the training process of the click prediction model, please refer to step 307 below.
[0075] 305. For positive samples in multiple sample network contents, an auxiliary model is trained based on the positive samples and the true duration labels of the positive samples.
[0076] In some embodiments, for any sample network content in the training sample subset, if the sample network content is a positive sample, the server trains an auxiliary model based on the positive sample and the real duration label of the positive sample, and the real duration label is used to indicate whether the browsing time after the positive sample is actually clicked is greater than the duration threshold.
[0077] In an embodiment of the present application, the auxiliary model is used to generate pseudo-duration labels for negative samples, that is, to predict the probability that the browsing time after the negative sample is clicked is greater than the duration threshold. After the server generates pseudo-duration labels for the target number of negative samples based on the auxiliary model, it can train the auxiliary model based on multiple positive samples in the training sample subset and the real duration labels of multiple positive samples. The server updates the model parameters of the auxiliary model based on the training loss obtained from the training, which can improve the accuracy of the pseudo-duration labels generated by the auxiliary model for negative samples, so that when the auxiliary model predicts the negative samples in the next batch of data, the pseudo-duration labels generated are more accurate.
[0078] In some embodiments, the server determines the difference between the pseudo-duration label and the true-duration label for positive samples from a plurality of sample web content, and trains an auxiliary model based on the difference between the pseudo-duration label and the true-duration label. Accordingly, for any sample web content in the training sample subset, if the sample web content is a positive sample, the server predicts the positive sample based on the auxiliary model to obtain a pseudo-duration label for the positive sample; the server trains the auxiliary model based on the difference between the pseudo-duration label and the true-duration label. The pseudo-duration label indicates whether the predicted browsing duration after a click on the positive sample is greater than a duration threshold, and the true-duration label indicates whether the true browsing duration of the positive sample is greater than a duration threshold. Based on the difference between the pseudo-duration label and the true-duration label, the server can obtain a training loss for the auxiliary model. Based on the training loss, the server can update the model parameters of the auxiliary model. The training loss reflects the training accuracy of the auxiliary model. The smaller the training loss, the higher the training accuracy, and the more accurate the pseudo-duration label predicted by the auxiliary model for the sample web content.
[0079] For example, Figure 4 is a structural diagram of an auxiliary model provided according to an embodiment of the present application. Referring to Figure 4, the auxiliary model includes a feature extraction layer (Embedding layer), a feature splicing layer, a fully connected neural network, and an output layer. Among them, the feature extraction layer is used to extract features of the input sample network content and sample users to obtain multiple feature vectors for describing the various attributes of the sample network content and sample users in a high-dimensional space. The feature splicing layer is used to splice the multiple feature vectors of the sample users and the multiple feature vectors of the sample network content respectively to obtain the feature vectors of the spliced sample users and the feature vectors of the sample network content. By performing feature fusion on the feature vectors of the spliced sample users and the feature vectors of the sample network content, a fused feature vector is obtained. The fully connected neural network is used to map the fused feature vector from the high-dimensional space to the low-dimensional space. The output layer is used to output the probability predicted by the auxiliary model that the browsing time of the sample user after clicking on the sample network content is greater than the time threshold.
[0080] 306. Based on a target number of negative samples, the pseudo duration labels of the target number of negative samples, multiple sample network contents, and the real duration labels of the multiple sample network contents, a duration prediction model is trained. The real duration label is used to indicate whether the browsing duration of the sample network content after it is actually clicked is greater than a duration threshold.
[0081] In some embodiments, a duration prediction model and an auxiliary model are trained based on a target number of negative samples, pseudo duration labels of each target number of negative samples, multiple sample network contents, and real duration labels of each multiple sample network contents, including: for positive samples in multiple sample network contents, based on the positive samples and the real duration labels of the positive samples, training the auxiliary model and the duration prediction model; for negative samples in multiple sample network contents, based on the negative samples and the real duration labels of the negative samples, training the duration prediction model; and for negative samples in the target number of negative samples, training the duration prediction model based on the negative samples and the pseudo duration labels of the negative samples.
[0082] In some embodiments, for positive samples in multiple sample network contents, an auxiliary model and a duration prediction model are trained based on the positive samples and the real duration labels of the positive samples, including: for positive samples in multiple sample network contents, using the auxiliary model to predict the duration label to obtain the pseudo duration label of the positive sample; for positive samples in multiple sample network contents, using the duration prediction model to predict the duration label to obtain the predicted duration label of the positive sample, the predicted duration label is used to indicate whether the browsing time after the predicted positive sample is clicked is greater than the duration threshold; for positive samples in multiple sample network contents, determining the difference between the pseudo duration label and the real duration label, and training the auxiliary model based on the difference between the pseudo duration label and the real duration label; for positive samples in multiple sample network contents, determining the difference between the predicted duration label and the real duration label, and training the duration prediction model based on the difference between the predicted duration label and the real duration label.
[0083] In some embodiments, for positive samples from multiple sample network contents, a duration prediction model is used to predict a duration label to obtain a predicted duration label of the positive sample, including: for positive samples from multiple sample network contents, a duration prediction model is used to perform probability prediction to obtain a duration prediction probability of the positive sample, and the duration prediction probability is used to indicate the probability that the browsing duration of the positive sample is greater than a duration threshold; for positive samples from multiple sample network contents, a trained click prediction model is used to predict the click rate of the positive sample to obtain a click rate of the positive sample, and the click rate is used to indicate the probability that the positive sample will be clicked, and the click prediction model is used to predict the probability that the sample network content will be clicked; for positive samples from multiple sample network contents, a joint probability of the positive sample is determined based on the click rate of the positive sample and the duration prediction probability of the positive sample, and the joint probability is used to indicate the probability that the positive sample will be clicked and the browsing duration is greater than the duration threshold; based on the joint probability of the positive sample, a predicted duration label of the positive sample is determined.
[0084] In some embodiments, for negative samples in multiple sample network contents, a duration prediction model is trained based on the negative samples and the real duration labels of the negative samples, including: for negative samples in multiple sample network contents, using the duration prediction model to predict the duration label to obtain the predicted duration label of the negative sample, the predicted duration label indicates whether the browsing time after the negative sample is clicked is greater than the duration threshold; for negative samples in multiple sample network contents, determining the difference between the predicted duration label of the negative sample and the pseudo duration label of the negative sample, and training the duration prediction model according to the difference between the predicted duration label of the negative sample and the pseudo duration label of the negative sample.
[0085] In some embodiments, for negative samples in multiple sample network contents, a duration prediction model is used to predict duration labels to obtain predicted duration labels of the negative samples, including: for negative samples in multiple sample network contents, a duration prediction model is used to perform probability prediction to obtain a duration prediction probability of the negative samples, where the duration prediction probability is used to indicate the probability that the browsing duration of the negative samples is greater than a duration threshold; for negative samples in multiple sample network contents, a trained click prediction model is used to predict the click-through rate of the negative samples, where the click-through rate is used to indicate the probability that the negative samples will be clicked, and the click prediction model is used to predict the probability that the sample network content will be clicked; for negative samples in multiple sample network contents, a joint probability of the negative samples is determined based on the click-through rate of the negative samples and the duration prediction probability of the negative samples, where the joint probability is used to indicate the probability that the negative samples will be clicked and the browsing duration is greater than the duration threshold; based on the joint probability of the negative samples, the predicted duration labels of the negative samples are determined.
[0086] In some embodiments, the multiple sample network contents in the training sample subset include positive samples that have been clicked and positive samples that have not been clicked. For the positive samples that have been clicked, the true duration label of the positive sample may be 0 or 1. Among them, 0 means that the true browsing duration of the positive sample is not greater than the duration threshold, indicating that the browsing duration of the positive sample is shorter; 1 means that the true browsing duration of the positive sample is greater than the duration threshold, indicating that the browsing duration of the positive sample is longer. For the negative samples that have not been clicked, since the negative samples have not been clicked, the true duration label of the negative samples is 0. In order to reduce the impact of a large number of negative samples with a true duration label of 0 in the training sample subset on the prediction performance of the duration prediction model, the server can perform a round of training on the duration prediction model based on the target number of negative samples and the target number of negative samples obtained from the training sample set, together with the multiple sample network contents in the training sample subset and the true duration labels of the multiple sample network contents. The duration prediction model is trained by sampling negative samples with pseudo-duration labels added, so that the duration prediction model can further learn the negative samples based on the relationship between the browsing time of the negative samples indicated by the pseudo-duration labels and the duration threshold, thereby improving the accuracy of the duration prediction model in duration prediction.
[0087] In some embodiments, the server predicts the duration prediction model based on the difference between the predicted duration labels and the actual duration labels of multiple sample network contents in the training sample subset and the difference between the predicted duration labels and the pseudo duration labels of the target number of negative samples. Accordingly, the following describes the process of the server training the duration prediction model based on multiple sample network contents and the target number of negative samples. Specifically, the process of the server training the duration prediction model based on multiple sample network contents in the training sample subset is described in step (1); the process of the server training the duration prediction model based on the target number of negative samples is described in step (2).
[0088] (1) For any sample network content in the training sample subset, the server predicts the sample network content based on the duration prediction model and obtains the predicted duration label of the sample network content. The predicted duration label is used to indicate whether the browsing time after the predicted sample network content is clicked is greater than the duration threshold; the server trains the duration prediction model based on the difference between the predicted duration label and the actual duration label.
[0089] In an embodiment of the present application, the predicted duration label is used to indicate whether the predicted browsing duration after the sample network content is clicked is greater than the duration threshold, and the real duration label is used to indicate whether the real browsing duration after the sample network content is actually clicked is greater than the duration threshold. Based on the difference between the predicted duration label and the real duration label, the server can obtain the training loss of the duration prediction model. Based on the training loss, the server can update the model parameters of the duration prediction model. The training loss is used to reflect the training accuracy of the duration prediction model. The smaller the training loss, the higher the training accuracy, the more accurate the duration prediction label obtained by the duration prediction model for predicting the sample network content, and the accuracy of the duration prediction model for duration prediction is improved.
[0090] In some embodiments, the server determines a predicted duration label for the sample web content based on the joint probability of the sample web content. Accordingly, the server predicts the sample web content based on a duration prediction model to obtain a predicted duration probability for the sample web content, which indicates the probability that the browsing duration of the sample web content is greater than a duration threshold. The server predicts the sample web content based on a click prediction model to obtain a click-through rate for the sample web content, which indicates the probability that the sample web content is clicked. The server determines a joint probability for the sample web content based on the click-through rate and the duration prediction probability of the sample web content, which indicates the probability that the sample web content is clicked and the browsing duration is greater than the duration threshold. The server determines a predicted duration label for the sample web content based on the joint probability of the sample web content. The server trains the duration prediction model using all sample web content in the training sample subset. For any sample web content in the training sample subset, the duration prediction model can output a predicted duration probability for the sample web content. This duration conditional probability is a conditional probability, and its occurrence is premised on the sample web content being clicked. However, since the training sample subset includes both positive samples where clicks occurred and negative samples where clicks did not occur, the server can determine the predicted duration label of the sample network content based on the product of the click rate of the sample network content output by the click prediction model and the duration prediction probability of the sample network content output by the duration prediction model, that is, the joint probability of the sample network content. Then, based on the difference between the predicted duration label and the true duration label, the duration prediction model is trained. By determining the duration prediction label based on the joint probability, the duration prediction probability of the sample network content can be indirectly learned based on the relationship between the click rate, the duration prediction probability and the joint probability. Since the prediction tasks of the click rate and the joint probability of the sample network content are both implemented based on the full sample space, the sample selection bias problem is avoided and the accuracy of the duration prediction model is improved.
[0091] In some embodiments, the server may calculate the joint probability of the sample network content using the following formula 1.
[0092] Formula 1: P(time>85,click=1|D1)=P(time>85|click=1,D1)×P(click=1|D1)
[0093] Among them, D1 is used to represent the training sample subset; P(click=1|D1) is used to represent the probability of a click on the sample network content in the training sample subset; P(time>85|click=1,D1) is used to represent the probability that the browsing time of the sample network content in the training sample subset after being clicked is greater than 85 seconds; P(time>85,click=1|D1) is used to represent the probability that the sample network content in the training sample subset is clicked and the browsing time is greater than 85 seconds.
[0094] For example, Figure 5 is a schematic diagram of the structure of a duration prediction model and a click prediction model provided according to an embodiment of the present application. As shown in Figure 5, the left side is the click prediction model, and the right side is the duration prediction model. The model structure of the click prediction model and the duration prediction model is consistent. Taking the click prediction model as an example, the click prediction model includes a feature extraction layer (embedding layer), a feature splicing layer, a fully connected neural network, and an output layer. Among them, the feature extraction layer is used to extract features from the input sample network content and sample users to obtain multiple feature vectors for describing the various attributes of the sample network content and sample users in a high-dimensional space. The feature splicing layer is used to splice the multiple feature vectors of the sample users and the multiple feature vectors of the sample network content, respectively, to obtain a spliced feature vector of the sample users and a spliced feature vector of the sample network content. By performing feature fusion on the spliced feature vectors of the sample users and the feature vectors of the sample network content, a fused feature vector is obtained. The fully connected neural network is used to map the fused feature vector from the high-dimensional space to the low-dimensional space. The output layer is used to output the probability of the sample user clicking on the sample network content predicted by the click prediction model. The output of the click prediction model is the click rate of the sample network content, and the output of the duration prediction model is the duration prediction probability of the sample network content. By calculating the product of the click rate and the duration prediction probability, the joint probability of the sample network content can be obtained.
[0095] (2) For any negative sample among the target number of negative samples, the server predicts the negative sample based on the duration prediction model and obtains the predicted duration label of the negative sample. The predicted duration label indicates whether the browsing time after the negative sample is clicked is greater than the duration threshold; the server trains the duration prediction model based on the difference between the predicted duration label and the pseudo duration label.
[0096] In an embodiment of the present application, the server predicts the negative sample based on the auxiliary model, and can obtain the pseudo-duration label of the negative sample, and use the pseudo-duration label as the real duration label of the negative sample. The predicted duration label is used to indicate whether the predicted browsing duration after the negative sample is clicked is greater than the duration threshold, and the pseudo-duration label is used to indicate whether the real browsing duration after the negative sample is clicked is greater than the duration threshold. Based on the difference between the predicted duration label and the pseudo-duration label, the server can obtain the training loss of the duration prediction model. Based on the training loss, the server can update the model parameters of the duration prediction model. The training loss is used to reflect the training accuracy of the duration prediction model. The smaller the training loss, the higher the training accuracy, and the more accurate the duration prediction label obtained by the duration prediction model for predicting the negative sample, thereby improving the accuracy of the duration prediction model in duration prediction.
[0097] In some embodiments, the server determines a predicted duration label for a negative sample with a pseudo duration label based on the joint probability of the sample network content. Accordingly, for any negative sample, the server predicts the negative sample based on the duration prediction model to obtain a predicted duration probability for the negative sample, which indicates the probability that the browsing duration of the negative sample is greater than a duration threshold. The server predicts the negative sample based on the click prediction model to obtain a click-through rate for the negative sample, which indicates the probability that the negative sample is clicked. The server determines a joint probability for the negative sample based on the click-through rate and the duration prediction probability of the negative sample, which indicates the probability that the negative sample is clicked and the browsing duration is greater than the duration threshold. The server determines the predicted duration label for the negative sample based on the joint probability of the negative sample. For any negative sample among the target number of negative samples, the duration prediction model can output a predicted duration probability for the negative sample. This duration conditional probability is a conditional probability, and its occurrence is premised on the negative sample being clicked. However, since the negative sample is sample network content that has not been clicked. Therefore, the server can determine the predicted duration label of the negative sample based on the product of the click rate of the negative sample output by the click prediction model and the duration prediction probability of the negative sample output by the duration prediction model, that is, the joint probability of the negative sample. Then, based on the difference between the predicted duration label and the pseudo duration label, the duration prediction model is trained. By determining the duration prediction label based on the joint probability, the duration prediction probability of the negative sample can be indirectly learned based on the relationship between the click rate, the duration prediction probability and the joint probability. Since the prediction tasks of the click rate and the joint probability of the negative sample are both implemented based on the full sample space, the sample selection bias problem is avoided and the accuracy of the duration prediction model is improved. Based on the joint probability of the negative samples, the predicted duration label of the negative samples is determined. Specifically, when the joint probability of the negative samples is greater than a preset probability threshold, the negative sample is assigned a predicted duration label that characterizes that the browsing time after the predicted negative sample is clicked is greater than the duration threshold, such as a predicted duration label with a value of 1. Alternatively, when the joint probability of the negative samples is not greater than the preset probability threshold, the negative sample is assigned a predicted duration label that characterizes that the browsing time after the predicted negative sample is clicked is not greater than the duration threshold, such as a predicted duration label with a value of 0.
[0098] 307. Based on the multiple sample network contents in the training sample subset and the real duration labels of the multiple sample network contents, a click prediction model is trained.
[0099] In an embodiment of the present application, a click prediction model is used to predict the click-through rate of sample web content, that is, to predict the probability of a click on the sample web content. The server can train the click prediction model based on multiple sample web content in a training sample subset and the real duration labels of each of the multiple sample web content. The server updates the model parameters of the click prediction model based on the training loss obtained during training, thereby improving the accuracy of the click prediction model's predicted click-through rate for the sample web content.
[0100] In some embodiments, the training method of the duration prediction model also includes: for any sample network content, using a click prediction model to predict the click rate of the sample network content; when the click rate of the sample network content is less than the click threshold and the sample network content is a negative sample, assigning a value to the true duration label of the sample network content that represents the browsing duration being less than the duration threshold; randomly obtaining a target number of negative samples from multiple assigned sample network contents in the training sample subset; and adding the randomly obtained target number of negative samples to the training sample set.
[0101] In some embodiments, the server can select some negative samples from the training sample subset as negative samples with a true duration label of 0 and place them in the training sample set. Accordingly, for any sample web content, the server predicts the sample web content based on a click prediction model to obtain the click-through rate of the sample web content. If the click-through rate of the sample web content is less than a click threshold and the sample web content is a negative sample, the server determines the sample web content as a simple negative sample, and the true duration label of the simple negative sample is 0. The server randomly obtains a target number of simple negative samples from multiple simple negative samples in the training sample subset and places the target number of simple negative samples into the training sample set. If the click-through rate of the sample web content is less than the click threshold and the sample web content is a negative sample, this indicates that the probability of a click on the negative sample that did not generate a click is low. The click prediction model can infer, based on the click-through rate, that the sample user has low interest in the negative sample. Therefore, the server can determine the negative sample as a simple negative sample. The true duration label of the simple negative sample is 0, meaning that the probability that the actual browsing duration of the negative sample after a click is greater than the duration threshold is close to zero. For multiple simple negative samples in the training sample subset, the server can obtain a target number of simple negative samples equal to the number of positive samples in the training sample subset and place them in the training sample set as training data for the duration prediction model. By expanding the training sample set with negative samples with low click-through rates, the training data for the duration prediction model is continuously increased, reducing the difficulty of jointly training the duration prediction model and the click prediction model, and increasing the correlation between the click prediction model and the duration prediction model.
[0102] In some embodiments, the click prediction model is a trained model. During the training of the duration prediction model, the server can directly obtain the click prediction model and predict the click rate of the sample web content based on the click prediction model.
[0103] An embodiment of the present application provides a training method for a duration prediction model. By introducing an auxiliary model, pseudo duration labels can be generated for a target number of negative samples in a training sample set, so that the duration prediction model and the auxiliary model can be trained based on the target number of negative samples, the pseudo duration labels of the target number of negative samples, multiple sample network contents in the training sample subset, and the real duration labels of the multiple sample network contents. In this way, the trained duration prediction model can not only learn the sample network content, but also further learn the negative samples based on the pseudo duration labels, thereby increasing the training data of the duration prediction model. By making full use of positive and negative samples for training, the problem of sample selection bias is solved, thereby improving the accuracy of duration prediction by the duration prediction model.
[0104] FIG6 is a block diagram of a training device for a duration prediction model according to an embodiment of the present application. The device is used to perform the above-mentioned training method for the duration prediction model. Referring to FIG6 , the device includes: a partitioning module 601 , a prediction module 602 , and a training module 603 .
[0105] The division module 601 is used to obtain a training sample subset obtained by dividing the training sample set, where the training sample subset includes a plurality of sample network contents, and the plurality of sample network contents include positive samples with clicks and negative samples with no clicks.
[0106] Prediction module 602 is used to determine the number of positive samples included in the training sample subset, obtain the target number, use the auxiliary model to be trained to predict the duration labels of the target number of negative samples in the training sample set, and obtain the pseudo duration labels of the target number of negative samples. The pseudo duration labels are used to indicate whether the browsing time after the predicted negative sample is clicked is greater than the duration threshold.
[0107] Training module 603 is used to obtain the real duration labels of multiple sample network contents, and train a duration prediction model and an auxiliary model based on a target number of negative samples, the pseudo duration labels of the target number of negative samples, multiple sample network contents, and the real duration labels of the multiple sample network contents. The real duration label is used to indicate whether the browsing duration of the sample network content after it is actually clicked is greater than the duration threshold, and the duration prediction model is used to predict the probability that the browsing duration of the sample network content after it is clicked is greater than the duration threshold.
[0108] In some embodiments, FIG7 is a block diagram of another training device for a duration prediction model according to an embodiment of the present application. Referring to FIG7 , the training module 603 includes:
[0109] The first training unit 701 is configured to train an auxiliary model and a duration prediction model for positive samples in a plurality of sample network contents based on the positive samples and their true duration labels.
[0110] The first training unit 701 is further configured to train a duration prediction model for negative samples in a plurality of sample network contents based on the negative samples and their true duration labels.
[0111] The second training unit 702 is configured to train a duration prediction model for negative samples in a target number of negative samples based on the negative samples and the pseudo duration labels of the negative samples.
[0112] In some embodiments, referring to FIG. 7 , the first training unit 701 includes:
[0113] The first prediction subunit 7011 is configured to use an auxiliary model to predict duration labels for positive samples in a plurality of sample network contents, and obtain pseudo duration labels for the positive samples.
[0114] The second prediction subunit 7012 is used to predict the duration label of the positive sample in the multiple sample network contents using the duration prediction model to obtain the predicted duration label of the positive sample. The predicted duration label is used to indicate whether the browsing time after the positive sample is predicted to be clicked is greater than the duration threshold.
[0115] The first training subunit 7013 is used to determine the difference between the pseudo duration label and the real duration label for positive samples in multiple sample network contents, and train the auxiliary model based on the difference between the pseudo duration label and the real duration label.
[0116] The second training subunit 7014 is used to determine the difference between the predicted duration label and the actual duration label for positive samples in multiple sample network contents, and train the duration prediction model based on the difference between the predicted duration label and the actual duration label.
[0117] In some embodiments, the second prediction sub-unit 7012 is used to perform probability prediction on positive samples from multiple sample network contents using a duration prediction model to obtain a duration prediction probability of the positive samples, and the duration prediction probability is used to indicate the probability that the browsing duration of the positive samples is greater than the duration threshold; for positive samples from multiple sample network contents, use a trained click prediction model to predict the click rate of the positive samples to obtain the click rate of the positive samples, and the click rate is used to indicate the probability that the positive samples will be clicked, and the click prediction model is used to predict the probability that the sample network content will be clicked; for positive samples from multiple sample network contents, determine the joint probability of the positive samples based on the click rate of the positive samples and the duration prediction probability of the positive samples, and the joint probability is used to indicate the probability that the positive samples will be clicked and the browsing duration is greater than the duration threshold; determine the predicted duration label of the positive samples based on the joint probability of the positive samples.
[0118] In some embodiments, referring to FIG. 7 , the second training unit 702 includes:
[0119] The third prediction subunit 7021 is configured to predict a duration label for a negative sample in the plurality of sample web contents using a duration prediction model to obtain a predicted duration label for the negative sample, where the predicted duration label indicates whether the browsing duration after a click on the negative sample is predicted to be greater than a duration threshold;
[0120] The third training subunit 7022 is used to determine the difference between the predicted duration label of the negative sample and the pseudo duration label of the negative sample for the negative samples in the multiple sample network contents, and train the duration prediction model based on the difference between the predicted duration label of the negative sample and the pseudo duration label of the negative sample.
[0121] In some embodiments, the third prediction subunit 7021 is used to perform probability prediction on negative samples in multiple sample network contents using a duration prediction model to obtain a duration prediction probability of the negative samples, where the duration prediction probability is used to indicate the probability that the browsing duration of the negative samples is greater than a duration threshold; for negative samples in multiple sample network contents, the trained click prediction model is used to predict the click rate of the negative samples, where the click rate is used to indicate the probability that the negative samples will be clicked, and the click prediction model is used to predict the probability that the sample network content will be clicked; for negative samples in multiple sample network contents, the joint probability of the negative samples is determined based on the click rate of the negative samples and the duration prediction probability of the negative samples, where the joint probability is used to indicate the probability that the negative samples will be clicked and the browsing duration is greater than the duration threshold; based on the joint probability of the negative samples, the predicted duration label of the negative samples is determined.
[0122] In some embodiments, referring to FIG7 , the apparatus further includes:
[0123] The click rate prediction module 604 is used to predict the click rate of any sample network content using a click prediction model.
[0124] The sample determination module 605 is configured to assign a value indicating that the browsing time is less than the time threshold to the real time label of the sample network content when the click rate of the sample network content is less than the click threshold and the sample network content is a negative sample.
[0125] An acquisition module 606 is configured to randomly acquire a target number of negative samples from a plurality of assigned sample network contents of a training sample subset;
[0126] The storage module 607 is configured to add a target number of randomly acquired negative samples to the training sample set.
[0127] In some embodiments, the training module 603 is further configured to train the click prediction model based on a plurality of sample web contents and respective real duration labels of the plurality of sample web contents.
[0128] An embodiment of the present application provides a training device for a duration prediction model. By introducing an auxiliary model, it is possible to generate pseudo duration labels for a target number of negative samples in a training sample set, thereby being able to train the duration prediction model and the auxiliary model based on the target number of negative samples, the pseudo duration labels of the target number of negative samples, multiple sample network contents in a training sample subset, and the true duration labels of the multiple sample network contents. This allows the trained duration prediction model to learn the sample network content while further learning the negative samples based on the pseudo duration labels, thereby increasing the training data for the duration prediction model. By making full use of positive and negative samples for training, the problem of sample selection bias is solved, thereby improving the accuracy of duration prediction by the duration prediction model.
[0129] It should be noted that the training device for the duration prediction model provided in the above embodiment is merely exemplified by the division of the above-mentioned functional modules. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the terminal can be divided into different functional modules to complete all or part of the functions described above. In addition, the training device for the duration prediction model provided in the above embodiment and the embodiment of the training method for the duration prediction model are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0130] In the embodiments of the present application, the computer device can be configured as a terminal or a server. When the computer device is configured as a server, the server can be used as the execution subject to implement the technical solution provided in the embodiments of the present application. When the computer device is configured as a terminal, the terminal can be used as the execution subject to implement the technical solution provided in the embodiments of the present application. The embodiments of the present application do not limit this.
[0131] FIG8 is a block diagram of a terminal 800 according to an embodiment of the present application. Terminal 800 may be a portable mobile terminal, such as a smartphone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, or a desktop computer. Terminal 800 may also be referred to as user equipment, a portable terminal, a laptop terminal, a desktop terminal, or other similar names.
[0132] Typically, the terminal 800 includes a processor 801 and a memory 802 .
[0133] The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0134] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one computer program, which is used to be executed by the processor 801 to implement the training method of the duration prediction model provided in the method embodiment of the present application.
[0135] In some embodiments, terminal 800 may optionally include a peripheral device interface 803 and at least one peripheral device. The processor 801, memory 802, and peripheral device interface 803 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 803 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, and a power supply 808.
[0136] The peripheral device interface 803 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802, and the peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral device interface 803 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0137] The RF circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 804 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. In some embodiments, the RF circuit 804 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The RF circuit 804 can communicate with other terminals via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 804 may also include circuitry related to Near Field Communication (NFC), although this application does not limit this.
[0138] Display screen 805 is used to display a user interface (UI). This UI may include graphics, text, icons, videos, or any combination thereof. When display screen 805 is a touchscreen display, it is also capable of collecting touch signals on or above the surface of display screen 805. These touch signals can be input as control signals to processor 801 for processing. Display screen 805 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there can be one display screen 805, located on the front panel of terminal 800. In other embodiments, there can be at least two display screens 805, located on different surfaces of terminal 800 or in a foldable design. In still other embodiments, display screen 805 can be a flexible display, located on a curved or foldable surface of terminal 800. Display screen 805 can also be configured as a non-rectangular, irregular shape, also known as a special-shaped screen. Display screen 805 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0139] The camera assembly 806 is used to capture images or videos. In some embodiments, the camera assembly 806 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 806 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0140] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input into the processor 801 for processing, or input into the radio frequency circuit 804 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, each located in different parts of the terminal 800. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 807 may also include a headphone jack.
[0141] Power supply 808 is used to power various components in terminal 800. Power supply 808 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 808 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is charged via a wired line, while a wireless rechargeable battery is charged via a wireless coil. The rechargeable battery can also support fast charging technology.
[0142] In some embodiments, the terminal 800 further includes one or more sensors 809 , including but not limited to: an acceleration sensor 810 , a gyroscope sensor 811 , a pressure sensor 812 , an optical sensor 813 , and a proximity sensor 814 .
[0143] The accelerometer 810 can detect the magnitude of acceleration along the three coordinate axes of the coordinate system established by the terminal 800. For example, the accelerometer 810 can be used to detect the components of gravity acceleration along the three coordinate axes. The processor 801 can control the display screen 805 to display the user interface in a landscape or portrait view based on the gravity acceleration signal collected by the accelerometer 810. The accelerometer 810 can also be used to collect game or user motion data.
[0144] The gyroscope sensor 811 can detect the orientation and rotation angle of the terminal 800. It can also work with the accelerometer 810 to collect the user's 3D movements of the terminal 800. Based on the data collected by the gyroscope sensor 811, the processor 811 can implement the following functions: motion sensing (for example, changing the UI based on the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0145] The pressure sensor 812 can be provided on the side frame of the terminal 800 and / or below the display screen 805. When the pressure sensor 812 is provided on the side frame of the terminal 800, it can detect the user's gripping signal of the terminal 800. The processor 801 performs left and right hand recognition or shortcut operations based on the gripping signal collected by the pressure sensor 812. When the pressure sensor 812 is provided below the display screen 805, the processor 801 controls the operable controls on the UI interface based on the user's pressure operation on the display screen 805. Operable controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0146] The optical sensor 813 is used to detect ambient light intensity. In one embodiment, the processor 801 can control the display brightness of the display screen 805 based on the ambient light intensity detected by the optical sensor 813. Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display screen 805 is decreased. In another embodiment, the processor 801 can also dynamically adjust the shooting parameters of the camera assembly 806 based on the ambient light intensity detected by the optical sensor 813.
[0147] Proximity sensor 814, also known as a distance sensor, is typically located on the front panel of terminal 800. Proximity sensor 814 is used to detect the distance between the user and the front of terminal 800. In one embodiment, when proximity sensor 814 detects that the distance between the user and the front of terminal 800 is gradually decreasing, processor 801 controls display screen 805 to switch from the screen-on state to the screen-off state. When proximity sensor 804 detects that the distance between the user and the front of terminal 800 is gradually increasing, processor 801 controls display screen 805 to switch from the screen-off state to the screen-on state.
[0148] Those skilled in the art will appreciate that the structure shown in FIG8 does not limit the terminal 800 and may include more or fewer components than shown, or combine certain components, or adopt a different component arrangement.
[0149] FIG9 is a schematic diagram of the structure of a server provided according to an embodiment of the present application. The server 900 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 901 and one or more memories 902, wherein the memory 902 stores at least one computer program, and the at least one computer program is loaded and executed by the processor 901 to implement the training method of the duration prediction model provided by the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server may also include other components for implementing device functions, which will not be described in detail here.
[0150] The present application also provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to implement the duration prediction model training method described in the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, or the like.
[0151] An embodiment of the present application also provides a computer program product, including a computer program product, which is executed by a processor to implement the training method of the duration prediction model in the above embodiment.
[0152] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0153] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A method for training a duration prediction model, performed by a computer device, the method comprising: Obtaining a training sample subset obtained by dividing the training sample set, wherein the training sample subset includes a plurality of sample network contents, and the plurality of sample network contents include positive samples with clicks and negative samples with no clicks; Determine the number of positive samples included in the training sample subset to obtain a target number, use the auxiliary model to be trained to predict the duration labels of the target number of negative samples in the training sample set, and obtain pseudo duration labels of the target number of negative samples, where the pseudo duration labels are used to indicate whether the browsing duration of the negative sample after being clicked is predicted to be greater than a duration threshold; and The real duration labels of the multiple sample network contents are obtained, and the duration prediction model and the auxiliary model are trained based on the target number of negative samples, the pseudo duration labels of the target number of negative samples, the multiple sample network contents, and the real duration labels of the multiple sample network contents. The real duration label is used to indicate whether the browsing duration of the sample network content after being actually clicked is greater than the duration threshold, and the duration prediction model is used to predict the probability that the browsing duration of the sample network content after being clicked is greater than the duration threshold.
2. The method according to claim 1, wherein the training of the duration prediction model and the auxiliary model based on the target number of negative samples, the pseudo duration labels of the target number of negative samples, the multiple sample network contents, and the real duration labels of the multiple sample network contents comprises: For positive samples in the plurality of sample network contents, based on the positive samples and the true duration labels of the positive samples, training the auxiliary model and the duration prediction model; For negative samples in the plurality of sample network contents, training the duration prediction model based on the negative samples and the true duration labels of the negative samples; and For negative samples among the target number of negative samples, the duration prediction model is trained based on the negative samples and the pseudo duration labels of the negative samples.
3. The method according to claim 2, wherein for positive samples in the plurality of sample network contents, based on the positive samples and the true duration labels of the positive samples, training the auxiliary model and the duration prediction model comprises: For positive samples in the plurality of sample network contents, using the auxiliary model to perform duration label prediction to obtain pseudo duration labels of the positive samples; For positive samples among the multiple sample network contents, using the duration prediction model to predict duration labels to obtain predicted duration labels of the positive samples, wherein the predicted duration labels are used to indicate whether the predicted browsing duration after the positive samples are clicked is greater than the duration threshold; For positive samples in the plurality of sample network contents, determining a difference between the pseudo duration label and the real duration label, and training the auxiliary model based on the difference between the pseudo duration label and the real duration label; For positive samples in the multiple sample network contents, a difference between the predicted duration label and the true duration label is determined, and based on the difference between the predicted duration label and the true duration label, the duration prediction model is trained.
4. The method according to claim 3, wherein for a positive sample in the plurality of sample network contents, using the duration prediction model to perform duration label prediction to obtain a predicted duration label of the positive sample comprises: For a positive sample among the plurality of sample network contents, using the duration prediction model to perform probability prediction to obtain a duration prediction probability of the positive sample, wherein the duration prediction probability is used to indicate a probability that the browsing duration of the positive sample is greater than the duration threshold; For positive samples in the plurality of sample network contents, using the trained click prediction model, predicting the click rate of the positive samples to obtain the click rate of the positive samples, wherein the click rate is used to indicate the probability of the positive samples being clicked, and the click prediction model is used to predict the probability of the sample network contents being clicked; For positive samples among the multiple sample network contents, determining a joint probability of the positive samples according to the click rate of the positive samples and the predicted probability of the duration of the positive samples, wherein the joint probability is used to indicate the probability that the positive samples are clicked and the browsing duration is greater than the duration threshold; According to the joint probability of the positive samples, the predicted duration label of the positive samples is determined.
5. The method according to any one of claims 2 to 4, wherein for negative samples in the plurality of sample network contents, training the duration prediction model based on the negative samples and the true duration labels of the negative samples comprises: For negative samples in the multiple sample network contents, using the duration prediction model to perform duration label prediction to obtain a predicted duration label of the negative sample, wherein the predicted duration label indicates whether the browsing duration of the negative sample after being clicked is predicted to be greater than the duration threshold; For negative samples in the multiple sample network contents, determine the difference between the predicted duration label of the negative sample and the pseudo duration label of the negative sample, and train the duration prediction model according to the difference between the predicted duration label of the negative sample and the pseudo duration label of the negative sample.
6. The method according to claim 5, wherein for negative samples in the plurality of sample network contents, using the duration prediction model to perform duration label prediction to obtain the predicted duration label of the negative samples comprises: For negative samples in the multiple sample network contents, using the duration prediction model to perform probability prediction to obtain a duration prediction probability of the negative sample, wherein the duration prediction probability is used to indicate a probability that the browsing duration of the negative sample is greater than the duration threshold; For negative samples in the plurality of sample network contents, using a trained click prediction model to predict the click rate of the negative samples, the click rate being used to indicate the probability of the negative samples being clicked, and the click prediction model being used to predict the probability of the sample network contents being clicked; For negative samples in the multiple sample network contents, determining a joint probability of the negative samples according to the click rate of the negative samples and the predicted probability of the duration of the negative samples, wherein the joint probability is used to indicate the probability that the negative samples are clicked and the browsing duration is greater than the duration threshold; Based on the joint probability of the negative sample, a predicted duration label of the negative sample is determined.
7. The method according to any one of claims 1 to 6, further comprising: For any sample network content, using a click prediction model to predict the click rate of the sample network content; When the click rate of the sample network content is less than the click threshold and the sample network content is a negative sample, assigning a value to the real duration label of the sample network content, which is a value indicating that the browsing duration is less than the duration threshold; Randomly acquiring the target number of negative samples from a plurality of assigned sample network contents of the training sample subset; The target number of negative samples randomly obtained are added to the training sample set.
8. The method according to claim 4 or 7, further comprising: The click prediction model is trained based on the multiple sample network contents and the real duration labels of the multiple sample network contents.
9. According to the method according to any one of claims 1 to 8, the duration prediction model has the same structure as the auxiliary model.
10. According to the method described in any one of claims 1 to 9, the auxiliary model is trained using positive samples in the training sample subset, and the duration prediction model is trained using multiple sample network contents in the training sample subset and the target number of negative samples in the training sample subset.
11. A training device for a duration prediction model, the device comprising: A partitioning module, used to obtain a training sample subset obtained by partitioning the training sample set, wherein the training sample subset includes a plurality of sample network contents, and the plurality of sample network contents include positive samples of clicks that have occurred and negative samples of clicks that have not occurred; A prediction module is used to determine the number of positive samples included in the training sample subset to obtain a target number, and use the auxiliary model to be trained to perform duration label prediction on the target number of negative samples in the training sample set to obtain pseudo duration labels of the target number of negative samples, where the pseudo duration labels are used to indicate whether the browsing duration of the negative sample after being clicked is predicted to be greater than a duration threshold; A training module is used to obtain the real duration labels of the plurality of sample network contents, and train the duration prediction model and the auxiliary model based on the target number of negative samples, the pseudo duration labels of the target number of negative samples, the plurality of sample network contents, and the real duration labels of the plurality of sample network contents, wherein the real duration label is used to indicate whether the browsing duration of the sample network content after being actually clicked is greater than the duration threshold, and the The duration prediction model is used to predict the probability that the browsing duration of the sample network content after being clicked is greater than the duration threshold.
12. A computer device, comprising a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded by the processor and executes the training method of the duration prediction model described in any one of claims 1 to 10.
13. A computer-readable storage medium, wherein the computer-readable storage medium is used to store at least one computer program, wherein the at least one computer program is used to execute the training method of the duration prediction model described in any one of claims 1 to 10.
14. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the training method of the duration prediction model according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Method and device for training user behavior prediction model
CN111401963A
Method for training recommendation probability prediction model and recommendation probability prediction method and device
CN113254792A
Page recommendation method and device, equipment and storage medium
CN114297478A
Media resource sorting method and electronic equipment
CN114547416A
Method and device for predicting user transformation behavior and training model, equipment and medium
CN114817716A
