Method for determining a prediction model and related apparatus
By constructing offline and online prediction models and combining features before and after an object click, the problem that existing recommendation models cannot effectively utilize post-click features is solved, thus improving the accuracy of click-through rate prediction.
Patent Information
- Application Number
- CN202210583176.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2042-05-26
AI Technical Summary
Existing recommendation models cannot effectively utilize the features of an object after clicking on an item when predicting click-through rates, resulting in low accuracy.
By acquiring features of an object before and after clicking on an item, two prediction models are constructed: one for offline prediction and one for online prediction. During training, the probabilities of the offline model are introduced to learn the parameters of the online model, thereby improving the accuracy of online prediction.
It improves the accuracy of the recommendation model in predicting click-through rates online, utilizes more object feature information, and enhances the fusion capability and accuracy of the prediction model.
Smart Images

Figure CN117195957B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a method and apparatus for determining a prediction model. Background Technology
[0002] In recent years, recommendation technology has developed rapidly in e-commerce, advertising and other fields, creating immeasurable value for them.
[0003] In related technologies, recommendation technology is typically based on recommendation models. Specifically, after an object opens a display page containing an item, the model uses object features (representing the object's characteristics), item features (representing the item's characteristics), and the recommendation model to predict metrics such as the object's click-through rate (CTR) for the item. Taking the advertising field, which applies artificial intelligence, as an example, after an object opens a display page containing ads, the recommendation model can predict the object's CTR for the ads, and thus determine the effectiveness of the advertising campaign through the CTR.
[0004] However, this type of recommendation model has low accuracy. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides a method and related apparatus for determining a prediction model, which can improve the accuracy of click-through rate prediction.
[0006] The embodiments of this application disclose the following technical solutions:
[0007] On one hand, embodiments of this application provide a method for determining a prediction model, the method comprising:
[0008] The system acquires the item features corresponding to the item, the first object features corresponding to the object, and the second object features corresponding to the object; wherein the first object features are the object features acquired before the object clicks on the item, and the second object features are the object features acquired after the object clicks on the item.
[0009] The item features, the first object features, and the second object features are input into a first prediction model for offline prediction of the probability of an object clicking on an item, to obtain a first probability that the object clicks on the item; the item features and the first object features are input into an initial second prediction model, to obtain a second probability that the object clicks on the item.
[0010] The initial second prediction model is trained based on the first probability and the second probability to obtain a second prediction model for predicting the probability of an object being clicked online.
[0011] On the other hand, embodiments of this application provide a method for determining a prediction model, the method comprising:
[0012] Acquire behavioral data of an object in relation to an item; wherein, the behavioral data includes observation samples, the observation samples are data that are within the maximum feedback window of the sample and not within the minimum feedback window of the sample, the starting point of the maximum feedback window of the sample and the minimum feedback window of the sample are both the time when the object clicks on the item, and the length of the maximum feedback window of the sample is greater than the length of the minimum feedback window of the sample.
[0013] Based on the observed samples, a third probability is obtained through a third prediction model that the transformation result of the observed samples is a non-transformed sample; wherein, the third prediction model is trained based on historical observed samples and the transformation results of the historical observed samples;
[0014] Based on the behavioral data and the initial fourth prediction model, a fourth probability is obtained that the object will generate a conversion behavior in response to the item;
[0015] The initial fourth prediction model is trained based on the third probability and the fourth probability to obtain a fourth prediction model for predicting online the probability that the object will perform a conversion behavior in response to the item.
[0016] On the other hand, embodiments of this application provide a device for determining a prediction model, the device comprising: a feature acquisition unit, a probability acquisition unit, and a training unit;
[0017] The feature acquisition unit is used to acquire item features corresponding to an item, a first object feature corresponding to an object, and a second object feature corresponding to the object; wherein, the first object feature is the object feature acquired before the object clicks on the item, and the second object feature is the object feature acquired after the object clicks on the item;
[0018] The probability acquisition unit is used to input the item features, the first object features, and the second object features into a first prediction model for offline prediction of the probability of an object clicking on an item, to obtain a first probability that the object clicks on the item; and to input the item features and the first object features into an initial second prediction model to obtain a second probability that the object clicks on the item.
[0019] The training unit is used to train the initial second prediction model based on the first probability and the second probability to obtain a second prediction model for predicting the probability of an object being clicked online.
[0020] On the other hand, embodiments of this application provide a device for determining a prediction model, the device comprising: a data acquisition unit, a third probability acquisition unit, a fourth probability acquisition unit, and a training unit;
[0021] The data acquisition unit is used to acquire behavioral data generated by an object in relation to an item; wherein, the behavioral data includes observation samples, the observation samples are data that are within the maximum sample return window and not within the minimum sample return window, the starting point of the maximum sample return window and the minimum sample return window are both the time when the object clicks on the item, and the length of the maximum sample return window is greater than the length of the minimum sample return window.
[0022] The third probability acquisition unit is used to obtain, based on the observed sample, the third probability that the transformation result of the observed sample is an untransformed sample through a third prediction model; wherein, the third prediction model is trained based on historical observed samples and the transformation results of the historical observed samples;
[0023] The fourth probability acquisition unit is used to obtain the fourth probability that the object will generate a conversion behavior in response to the item based on the behavioral data and the initial fourth prediction model.
[0024] The training unit is used to train the initial fourth prediction model based on the third probability and the fourth probability to obtain a fourth prediction model for online prediction of the probability that the object will perform a conversion behavior in response to the item.
[0025] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory:
[0026] The memory is used to store computer programs and to transfer the computer programs to the processor;
[0027] The processor is configured to execute the methods described above according to instructions in the computer program.
[0028] On the other hand, embodiments of this application provide a computer-readable storage medium for storing a computer program for performing the methods described above.
[0029] On the other hand, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods described above.
[0030] As can be seen from the above technical solution, the system acquires the item features corresponding to the item, and the first and second object features corresponding to the object. The first object feature is the object feature acquired before the object clicks on the item, and can be used for both offline and online prediction. The second object feature is the object feature acquired after the object clicks on the item, and can only be used for offline prediction. To learn the second object feature, the item features, the first object feature, and the second object feature are used as inputs. A first prediction model used for offline prediction of the object's click probability is used to obtain the first probability of the object clicking on the item. To achieve online prediction, the item features and the first object feature are inputs to an initial second prediction model to obtain the second probability of the object clicking on the item. To learn the second object feature while making online predictions, the initial second prediction model is trained based on the first and second probabilities to obtain a second prediction model used for online prediction of the object's click probability. Therefore, not only are the item features and the first object feature used as inputs to the initial second prediction model, but the first probability obtained from the first prediction model is also introduced during the training of the initial second prediction model. This allows the initial second prediction model to learn the model parameters of the first prediction model through the first probability, thereby indirectly utilizing the second object feature to improve the prediction accuracy of the second prediction model. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 A schematic diagram of a prediction model determination system provided in an embodiment of this application;
[0033] Figure 2 A flowchart illustrating a method for determining a prediction model provided in an embodiment of this application;
[0034] Figure 3 A flowchart illustrating a method for determining a prediction model provided in an embodiment of this application;
[0035] Figure 4 A schematic diagram illustrating an application scenario of a method for determining a prediction model provided in an embodiment of this application;
[0036] Figure 5 A schematic diagram of the structure of a predictive model determination device provided in an embodiment of this application;
[0037] Figure 6 A schematic diagram of the structure of a predictive model determination device provided in an embodiment of this application;
[0038] Figure 7 This is a schematic diagram of the server structure provided in an embodiment of this application;
[0039] Figure 8 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0040] The embodiments of this application will now be described with reference to the accompanying drawings.
[0041] Because the recommendation models in related technologies are real-time predictions, that is, predicting the user's click-through rate before the user clicks on an item on the page, the recommendation models cannot utilize the features after the user clicks on the item, such as the user's various behaviors after clicking on the page, the duration of the visit, etc. As a result, the recommendation models cannot obtain more features, and the accuracy of the click-through rate predicted by the recommendation models is low.
[0042] Based on this, embodiments of this application provide a method for determining a prediction model, which combines object features obtained after an object clicks on an item to train a second prediction model for online prediction of the probability of an object clicking on an item.
[0043] This method is applied to Figure 1 The system for determining the prediction model, as shown in the figure, includes a server and terminal devices. Specifically, terminal devices can be mobile phones, tablets, laptops, desktop computers, smart voice interaction devices, smart home appliances, smartwatches, in-vehicle terminals, aircraft, etc., but are not limited to these. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal devices and servers can be connected directly or indirectly via wired or wireless communication, which is not limited herein.
[0044] For example, an object opens a page containing an item via a terminal device. The terminal device collects the object's behavioral data and sends it to a server. The server uses the behavioral data to obtain the item's features, the object's first object features, and the object's second object features. The first object features are those obtained before the object clicks on the item, and the second object features are those obtained after the object clicks on the item. The server inputs the item features, the first object features, and the second object features into a first prediction model for offline prediction of the object's click probability, obtaining a first probability of the object clicking the item. It then inputs the item features and the first object features into an initial second prediction model, obtaining a second probability of the object clicking the item. Based on the first and second probabilities, the initial second prediction model is trained to obtain a second prediction model for online prediction of the object's click probability.
[0045] The method for determining the prediction model provided in this application embodiment can be executed by a server. However, in other embodiments of this application, the terminal device may also have similar functions to the server to execute the method for determining the prediction model provided in this application embodiment, or the terminal device and the server may jointly execute the method for determining the prediction model provided in this application embodiment. This embodiment does not limit this.
[0046] The method for determining the prediction model provided in this application embodiment can also be implemented based on cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to realize data computation, storage, processing, and sharing.
[0047] Cloud technology is a collective term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies applied to the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will all require robust system support, which can only be achieved through cloud computing.
[0048] The method for determining the predictive model provided in this application mainly involves artificial intelligence cloud services in cloud technology. Artificial intelligence cloud services are generally also called AIaaS (AI as a Service). This is a mainstream service model for artificial intelligence platforms. Specifically, AIaaS platforms break down several common artificial intelligence (AI) services and provide them as independent or packaged services in the cloud. This service model is similar to opening an AI-themed marketplace: all developers can access and use one or more AI services provided by the platform through application programming interfaces (APIs). Some experienced developers can also use the AI framework and AI infrastructure provided by the platform to deploy and maintain their own dedicated cloud artificial intelligence services.
[0049] Artificial intelligence (AI) encompasses the theories, methods, technologies, and application systems that utilize digital computers or computers-controlled machines to simulate, extend, and expand human intelligence, enabling them 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 attempts to understand the essence of intelligence and produce new intelligent machines capable of reacting in a manner similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities.
[0050] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and intelligent transportation.
[0051] In the embodiments of this application, the main artificial intelligence technologies involved include the aforementioned machine learning / deep learning directions. Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, and many other disciplines. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include technologies such as artificial neural networks.
[0052] In the method for determining the prediction model provided in the embodiments of this application, the artificial intelligence model used mainly involves the application of machine learning, and the prediction model is obtained by training through artificial neural networks and other technologies.
[0053] The following description, with reference to the accompanying drawings and using a server as the device for determining the prediction model, introduces a method for determining a prediction model provided in an embodiment of this application.
[0054] See Figure 2 The figure is a flowchart of a method for determining a prediction model provided in an embodiment of this application. Figure 2 As shown, the method for determining this prediction model includes the following steps:
[0055] S201: Obtain the item characteristics corresponding to the item, the first object characteristics corresponding to the object, and the second object characteristics corresponding to the object.
[0056] Taking the field of advertising recommendation as an example, when a user (i.e., an object) opens a display page with an advertisement (i.e., an item), the recommendation model in related technologies predicts the click-through rate of the object for the advertisement based on the object's characteristics and the advertisement's characteristics. Since the recommendation model makes predictions in real time, it cannot utilize the characteristics of the object after clicking on the item, resulting in low accuracy of the recommendation model.
[0057] Based on this, the recommended model in this application not only obtains the object features before the object clicks on the item (i.e., the first object features), but also obtains the object features after the object clicks on the item (i.e., the second object features), as well as the item features corresponding to the item.
[0058] Among these, item characteristics are used to describe the features of an item, and can be one or more combinations of item identifiers, item categories, item brands, etc. Taking an item as an advertisement as an example, item characteristics can be advertisement type, advertisement duration, etc.
[0059] The first object feature is the object characteristic obtained before the object clicks on an item. It can be one or more combinations of basic object attribute features, interest features, etc. Taking a user as an example, the first object feature can be the user's age, gender, education level, etc.
[0060] The second object feature is the object characteristic obtained after the object clicks on an item, which can be a sequence of behaviors. Taking a user as an example, the second object feature can be the behavioral sequence characteristic formed by the user first clicking on ad A and then clicking on ad B.
[0061] As one possible approach, contextual information such as the access context, time, and device model can also be obtained. Continuing with the advertising example, contextual information could include the viewing time and location. This allows the contextual information, along with item features, to be input into the prediction model, enriching the information the model learns during training.
[0062] S202: Input the item features, the first object features, and the second object features into the first prediction model for offline prediction of the probability of an object clicking on an item to obtain the first probability of an object clicking on an item; input the item features and the first object features into the initial second prediction model to obtain the second probability of an object clicking on an item.
[0063] In related technologies, to effectively utilize the features of an object after clicking on an item, two methods are generally used. Method 1: A separate prediction model is built based on the features after the object clicks. However, because this method involves two prediction models, the click-through rate predictions obtained from the two models are difficult to integrate. Method 2: Multi-task modeling is used to process the features before and after the object clicks. However, due to shared underlying parameters, different tasks may interfere with each other, thus affecting the prediction results.
[0064] Based on this, this application constructs two prediction models: a first prediction model and a second prediction model. The first prediction model is used to predict the probability of an object clicking on an item offline, while the second prediction model is used to predict the probability of an object clicking on an item online. During training, the learning objectives of the first and second prediction models are related, and the obtained prediction results can be well integrated. Furthermore, the underlying parameters of the first and second prediction models are not shared, avoiding the problem of inaccurate prediction results due to mutual interference.
[0065] The training processes of the first and second prediction models will be explained below.
[0066] The first prediction model can predict the probability of an object clicking an item in offline mode. Therefore, it can utilize the features obtained after an object clicks, i.e., the second object features. During the training of the first prediction model, training samples corresponding to the clicked items are obtained. These training samples have labels indicating whether the object clicked an item or not. The item features, the first object features, and the second object features of the training samples are then used as input. Through the initial first prediction model, the first probability of the object clicking an item is obtained. The initial first prediction model is then adjusted based on the first probability and the label results to obtain the trained first prediction model. It should be noted that if the label result is "object clicked an item," the probability of the object clicking an item can be considered 100%; if the label result is "object not clicked an item," the probability of the object clicking an item can be considered 0%. It should also be noted that, compared to the initial first prediction model, the model parameters are not yet fully trained and require further training.
[0067] The second prediction model can predict the probability of an object clicking an item in an online state. Therefore, it cannot utilize the features obtained after the object clicks an item, i.e., the second object features. It can only use the item features and the first object as inputs to the second prediction model to obtain the second probability of the object clicking an item. Therefore, during the training of the second prediction model, the item features and the first object features are used as inputs to the initial second prediction model to obtain the second probability of the object clicking an item. It should be noted that, compared to the initial second prediction model, the initial second prediction model is a prediction model whose parameters are not yet properly trained and requires further training.
[0068] S203: Train an initial second prediction model based on the first and second probabilities to obtain a second prediction model for predicting the probability of an object being clicked online.
[0069] This application requires a prediction model capable of predicting the probability of an object being clicked online. Since online prediction cannot obtain the features of the second object, a first prediction model learns the features of the second object, and a second prediction model learns the model parameters of the first prediction model. To ensure that the initial second prediction model can learn the features of the second object and that the prediction results obtained by the first and second prediction models can be well integrated, the initial second prediction model is trained based on a first probability and a second probability. Therefore, by introducing the first probability to train the initial second prediction model, the initial second prediction model learns the model parameters of the first prediction model, thereby indirectly utilizing the features of the second object to improve the prediction accuracy of the second prediction model.
[0070] As one possible implementation, the first and second prediction models have the same model structure, but their inputs and model parameters differ. The first prediction model incorporates second object features into its input, and the second prediction model learns from the first prediction model using a first probability, thereby leveraging the second object features to improve its prediction accuracy.
[0071] As described in the above technical solution, the system acquires the item features corresponding to the item, and the first and second object features corresponding to the object. The first object feature, obtained before the object clicks on the item, can be used for both offline and online prediction. The second object feature, obtained after the object clicks on the item, can only be used for offline prediction. To learn the second object feature, the item features, the first object feature, and the second object feature are used as inputs. A first prediction model, used for offline prediction of the object's click probability, is used to obtain the first probability of the object clicking on the item. To enable online prediction, the item features and the first object feature are inputs to an initial second prediction model to obtain the second probability of the object clicking on the item. To learn the second object feature while making online predictions, the initial second prediction model is trained based on the first and second probabilities to obtain a second prediction model used for online prediction of the object's click probability. Therefore, not only are the item features and the first object feature used as inputs to the initial second prediction model, but the first probability obtained from the first prediction model is also introduced during the training of the initial second prediction model. This allows the initial second prediction model to learn the model parameters of the first prediction model through the first probability, thereby indirectly utilizing the second object feature to improve the prediction accuracy of the second prediction model.
[0072] For ease of explanation, the following example uses the cross-entropy function as the loss function of the prediction model and a multi-layer neural network structure to illustrate the prediction model.
[0073] (1) First prediction model.
[0074] The output of the first prediction model can be expressed as f t (X u ,X c ,X i The calculation process is as follows:
[0075]
[0076] Among them, f t Let X represent the first prediction model. u X represents the first object characteristic. c X represents the second object characteristic. i W represents the characteristics of an item. u W represents the object-side model parameters. i Indicates the parameters of the item-side model. This represents the output vector of the object-side model. This represents the output vector of the item-side model, and <> represents the inner product.
[0077] The loss function of the first prediction model is shown below:
[0078] L t =F t (yf t (X u ,X c ,X i ))
[0079] Among them, L t Let F represent the first loss function. t Let f represent the cross-entropy loss function. t (X u ,X c ,X i ) represents the output of the first prediction model, and y is the label result. If the label result is that the object clicked an item, it can be considered that the probability of the object clicking an item is 100%. If the label result is that the object did not click an item, it can be considered that the probability of the object clicking an item is 0%.
[0080] (2) Second prediction model.
[0081] The first and second prediction models have the same model structure. The first prediction model is used offline, and its inputs are item features, a first object feature, and a second object feature. The second prediction model is used online, and its inputs are item features and a second object feature.
[0082] The output of the second prediction model can be expressed as f s (X u ,X i ), where f s Let X represent the second prediction model. u This represents the characteristics of the first object.
[0083] The loss function of the second prediction model is shown below:
[0084] L s =F s (yf s (X u ,X i ))
[0085] Among them, L s Let F represent the second loss function. s Let f represent the cross-entropy loss function. s (X u ,X i) represents the output of the second prediction model, and y is the label result.
[0086] As one possible implementation, this application embodiment provides an S203, which is a specific implementation of training an initial second prediction model based on a first probability and a second probability to obtain a second prediction model for predicting the probability of an object being clicked online, specifically including S2031-S2033.
[0087] S2031: Determine the first loss function based on the first probability and the true probability, and determine the second loss function based on the second probability and the true probability.
[0088] The true probability is the probability of the actual result of an object clicking an item. Taking the training sample as an example, the true probability is the label result (y) of the object clicking an item. If the label result is that the object clicked an item, it can be considered that the probability of the object clicking an item is 100%. If the label result is that the object did not click an item, it can be considered that the probability of the object clicking an item is 0%.
[0089] S2032: Determine the third loss function based on the first and second loss functions.
[0090] The following describes three methods for determining the third loss function.
[0091] The first method involves determining the third loss function based on the first loss function, the second loss function, and the adjustment parameters. The adjustment parameters are used to adjust the influence of the first and second loss functions on the third loss function, thereby adjusting the degree to which the initial second prediction model learns from the first prediction model.
[0092] If the first loss function is as L t As shown, the second loss function is as follows: s As shown, the third loss function can be expressed as follows:
[0093] L s *=(1-λ)*L t +λ*L s
[0094] Among them, L s * represents the third loss function, λ represents the adjustment parameter, and L t Let L represent the first loss function. s This represents the second loss function.
[0095] Therefore, by learning the loss function of the first prediction model, the second prediction model can achieve a learning objective that is related to the first prediction model and the second prediction model, thereby achieving better integration.
[0096] The second method involves determining the distance between the first prediction model and the initial second prediction model based on the first and second loss functions; and determining the third loss function based on the first loss function, the second loss function, the adjustment parameter, and the distance.
[0097] If the first loss function is as L t As shown, the second loss function is as follows: s As shown, the distance between the first prediction model and the initial second prediction model can be represented as follows:
[0098] L d =F d (f t (X u ,X c ,X i )-f t (X u ,X i ))
[0099] Among them, L d F represents the distance between the first prediction model and the initial second prediction model. d This represents a distance function, such as the Manhattan distance function, the cosine distance function, etc., f t (X u ,X c ,X i ) represents the output of the first prediction model, f t (X u ,X i ) represents the output of the initial second prediction model.
[0100] The third loss function can be expressed as follows:
[0101] L s *=(1-λ)*L t +λ*L s +L d
[0102] Among them, L s * represents the third loss function, λ represents the adjustment parameter, and L t Let L represent the first loss function. s Let L represent the second loss function. d This represents the distance between the first prediction model and the initial second prediction model.
[0103] Therefore, the closer the first prediction model is to the second prediction model, the more similar the second prediction model is to the first prediction model, that is, the better the second prediction model learns the model parameters of the first prediction model.
[0104] The third method involves determining the distance between the first prediction model and the initial second prediction model based on the first and second loss functions, and then determining the third loss function based on the first loss function and the distance.
[0105] If the first loss function is as L t As shown, the second loss function is as follows: s As shown, the distance between the first prediction model and the initial second prediction model can be represented as follows:
[0106] L d =F d (f t (X u ,X c ,X i )-f t (X u ,X i ))
[0107] Among them, L d F represents the distance between the first prediction model and the initial second prediction model. d This represents a distance function, such as the Manhattan distance function, the cosine distance function, etc., f t (X u ,X c ,X i ) represents the output of the first prediction model, f t (X u ,X i ) represents the output of the initial second prediction model.
[0108] The third loss function can be expressed as follows:
[0109] L s * = L t +L d
[0110] Among them, L s * indicates the third loss function, L t Let L represent the first loss function. d This represents the distance between the first prediction model and the initial second prediction model.
[0111] S2033: Train the initial second prediction model based on minimizing the third loss function to obtain the second prediction model for predicting the probability of clicked items in online objects.
[0112] By minimizing the third loss function, it is possible to ensure that the initial second prediction model can learn the model parameters of the first prediction model as much as possible, thereby indirectly utilizing the features of the second object. While ensuring that the features of the second object can be learned, the probability of the object being clicked can be predicted online, thus improving the accuracy of click-through rate prediction.
[0113] As one possible implementation, the aforementioned adjustment parameter can be set to 0 in the first few rounds of initial training (e.g., fewer than K iterations) and set to a fixed value in subsequent training rounds (e.g., more than or equal to K iterations), such as λ ranging from [0.5, 1], thereby accelerating the learning speed.
[0114] As one possible implementation, the parameter update of the initial first prediction model during training can be represented as follows:
[0115]
[0116] Among them, W t This represents the model parameters of the initial first prediction model. L represents the gradient of the initial prediction model parameters, η represents the parameter update step size, also known as the learning rate. t This represents the first loss function.
[0117] As one possible approach, during the training of the initial second prediction model, the model parameters can be updated based on the number of iterations, thereby accelerating convergence and improving the training speed of the model.
[0118] If the number of iterations is less than a preset iteration threshold, the parameters of the initial second prediction model are updated based on the learning rate, the gradient of the parameters of the initial second prediction model, and the second loss function. The parameter update of the initial second prediction model can be expressed as follows:
[0119]
[0120] Among them, W s This represents the model parameters of the initial second prediction model. L represents the gradient of the parameters of the initial second prediction model, η represents the parameter update step size, also known as the learning rate. s This represents the second loss function.
[0121] If the number of iterations is greater than or equal to a preset iteration threshold, the parameters of the initial second prediction model are updated based on the learning rate, the parameter gradient of the initial second prediction model, and the third loss function, until the initial second prediction model iterates N times, or the initial second prediction model converges. The parameter update of the initial second prediction model can be represented as follows:
[0122]
[0123] Among them, W s This represents the model parameters of the initial second prediction model. L represents the gradient of the parameters of the initial second prediction model, η represents the parameter update step size, also known as the learning rate. s* indicates the third loss function.
[0124] For item recommendations, in addition to predicting click-through rate (CTR), conversion rate can also be predicted. It's important to note that CTR is the ratio of the number of times an item is clicked to the number of times it is displayed, while conversion rate is the ratio of the number of people who convert to other items to the number of people who view the item. Conversion behaviors include downloads, payments, and inquiries.
[0125] In related technologies, recommendation models are typically trained using behavioral data of users targeting items. However, the conversion rate accuracy of these models is relatively low. Research has revealed that there is often a waiting period between a user clicking on an item and a conversion, which could take several hours or even days. Furthermore, even after a conversion, advertisers and other product promoters need time to send back the behavioral data before they can train the recommendation model. Before this data is sent back, it is used as negative samples (labeled as "no conversion") to train the model. However, this data may contain samples that were labeled negative before the data was sent back but are now labeled positive (labeled as "converted") afterward. In other words, due to the delay in sending back the behavioral data, the labeling accuracy of the training samples for the recommendation model is low, leading to low accuracy in conversion rate prediction.
[0126] Based on this, embodiments of this application provide a model training method that improves the accuracy of the fourth prediction model in predicting conversion rates by correcting the conversion results of the observed samples, i.e., the input of the fourth prediction model used to predict conversion rates.
[0127] For ease of explanation, some terms used in the embodiments of this application will be explained below.
[0128] (1) Sample feedback window: The starting point is the time when the object clicks on the item, and the ending point is the time when the object performs a conversion behavior on the item. The length of the sample feedback window is the time between the object's conversion behavior on the item and the object's click on the item.
[0129] (2) Model Selection Sample Window: This can be represented as w, the sample feedback window selected by the fourth prediction model. The starting point is the time when the object clicks on the item, and the length is set according to actual needs. It should be noted that in order to ensure the real-time performance of the model, a window that is too long should not be selected as the model selection window; it is usually 1-3 days.
[0130] (3) Minimum sample return window: can be represented as w1, the starting point is the time when the object clicks on the item, and the length is set according to actual needs. It can be set to 10 minutes. All sample return windows must be greater than w1 to be added to the fourth prediction model as training samples.
[0131] (4) Maximum sample return window: can be represented as w2. The starting point is the time when the object clicks on the item, which is the same as the minimum sample return window. The length is set according to actual needs, but the length of the maximum sample return window is greater than the length of the minimum sample return window. It can be set to 30 days. After w2, almost all samples have been returned.
[0132] (5) Conversion result: Whether the object will continue to generate conversion behavior after clicking on the item can be represented by y. For example, y=1 represents a positive sample (a sample that has been converted), and y=0 represents a negative sample (a sample that has not been converted).
[0133] (6) Unconverted samples: Data that has not yet been converted after the maximum sample return window can be represented as y = 0 | w > w2.
[0134] (7) Non-transformed samples: Data that, after passing through the minimum return window and within the maximum return window, did not detect any transformation behavior, but was eventually detected outside the maximum return window, can be represented as y = 0|w1 <w<w2、y=1|w> w2.
[0135] The following description, with reference to the accompanying drawings and using a server as the device for determining the prediction model, introduces a method for determining a prediction model provided in an embodiment of this application.
[0136] See Figure 3 The figure is a flowchart of a method for determining a prediction model provided in an embodiment of this application. Figure 3 As shown, the method for determining this prediction model includes the following steps:
[0137] S301: Obtain the behavior data of the object in relation to the item.
[0138] As mentioned above, due to issues such as data transmission delays in behavioral data, the label accuracy of training samples for the recommendation model is low, which in turn leads to low accuracy in conversion rate prediction. Therefore, this application's embodiments correct samples that were not converted before transmission but were converted after transmission (i.e., samples that were not converted before transmission) so that they are no longer used as negative samples in the prediction model training.
[0139] Behavioral data is data generated by an object's actions towards an item, such as clicking on an item or purchasing an item. Behavioral data includes two types of data: observed samples and real samples.
[0140] Among them, the real samples are the data that are not within the maximum sample feedback window, which can be expressed as samples where w > w2. The observed samples are the data that are within the maximum sample feedback window and not within the minimum sample feedback window, which can be expressed as samples where w1 < w < w2. Since in actual business, in order to ensure the real-time performance of the prediction model, the length of the sample window selected by the model is not too long, so the observed samples include un-feedback conversion samples.
[0141] Therefore, in order to prevent the un-feedback conversion samples in the observed samples from being used as negative samples to train the model, the embodiments of this application will predict the conversion results of the observed samples through a third prediction model, which will be specifically described below.
[0142] S302: According to the observed samples, obtain the third probability that the conversion result of the observed samples is an un-feedback conversion sample through the third prediction model.
[0143] Among them, the third prediction model is trained based on historical observed samples and the conversion results of historical observed samples. Compared with the observed samples, historical observed samples are observed samples with labels, and the label is the conversion result of the observed samples. There are two types of conversion results: the historical observed sample is an un-feedback conversion sample (the third probability is 100%) or the historical observed sample is an un-feedback and un-converted sample (the third probability is 0%). Historical observed samples are used to train the initial third prediction model to obtain the third prediction model, so that the third prediction model can obtain the third probability that the conversion result of the observed samples is an un-feedback conversion sample according to the observed samples. It should be noted that compared with the third prediction model, the initial third prediction model is a prediction model whose model parameters have not been trained well and still need to be trained.
[0144] The embodiments of this application do not specifically limit the training process of the third prediction model. The following takes the supervised training method as an example for illustration. Refer to S3021 - S3023.
[0145] S3021: Determine the conversion results of historical observed samples.
[0146] As can be seen from the foregoing, there are un-feedback conversion samples in the observed samples, and it is necessary to identify the un-feedback conversion samples in the observed samples. Therefore, the conversion results of historical observed samples include un-feedback conversion samples and un-feedback and un-converted samples.
[0147] Among them, the un-feedback conversion sample is a sample that does not convert within the maximum sample feedback window and converts outside the maximum sample feedback window, which can be expressed as y = 0|w1 < w < w2, y = 1|w > w2.
[0148] Untransformed samples that are not returned are those that are outside the maximum return window and have not been transformed. They can be represented as y = 0 | w1 <w<w2、y=0|w> w2 can also be simplified to y = 0 | w > w2. Untransformed samples that are not returned as negative samples do not affect the model's accuracy; only untransformed samples that are not returned will affect the model's accuracy.
[0149] S3022: Determine the prediction transformation results of the historical observation samples based on the historical observation samples and the initial third prediction model.
[0150] Historical observation samples can be input into the initial third prediction model to determine the prediction transformation results of the historical observation samples. Alternatively, one or more combinations of item features, first object features, second object features, and context features can be obtained from historical observation samples and input into the initial third prediction model so that it can learn the characteristics of the untransformed samples, thereby determining the prediction transformation results of the historical observation samples.
[0151] The embodiments of this application do not specifically limit the initial third prediction model, which can be a neural network model or a model obtained by function fitting or other methods.
[0152] S3023: Train an initial third prediction model based on the difference between the predicted transformation results and the transformation results of historical observation samples, and obtain a third prediction model for predicting the probability that the transformation result is a non-transformed sample.
[0153] Using the transformation results of historical observation samples as a benchmark, the initial third prediction model is adjusted so that its output prediction transformation results increasingly approximate the transformation results of historical observation samples. This results in a third prediction model used to predict the probability that the transformation result is a sample that has not been returned.
[0154] S303: Based on behavioral data and the initial fourth prediction model, obtain the fourth probability that the object will generate a conversion behavior in response to the item.
[0155] As one possible approach, behavioral data can be directly input into the initial fourth prediction model to obtain the fourth probability of an object generating a conversion behavior in response to an item.
[0156] As one possible implementation, the item features corresponding to the item, the first object features corresponding to the object, and the second object features corresponding to the object are obtained based on the behavioral data. The first object features are the object features obtained before the object clicks on the item, and the second object features are the object features obtained after the object clicks on the item. The item features, the first object features, and the second object features are input into the initial fourth prediction model to obtain the fourth probability that the object will generate a conversion behavior in response to the item.
[0157] As one possible implementation, one could obtain one or more combinations of features from behavioral data, such as item features, first object features, second object features, and contextual features. These features would then be input into an initial fourth prediction model to learn the characteristics of the conversion samples, thereby determining the fourth probability that an object will generate a conversion behavior in response to an item. It should be noted that, compared to the initial fourth prediction model, this initial fourth prediction model is one whose parameters have not yet been properly trained and requires further training.
[0158] S304: Train an initial fourth prediction model based on the third and fourth probabilities to obtain a fourth prediction model used for online prediction of the probability that an object will perform a conversion behavior in response to an item.
[0159] Since related technologies have not found any instances where untransformed samples exist within the observed samples of behavioral data, all observed samples are used as negative samples for training. Therefore, this application uses a third prediction model to predict the existence of untransformed samples within the observed samples. Based on the conversion results of the observed samples and the third and fourth probabilities of the untransformed samples, an initial fourth prediction model is trained to obtain a fourth prediction model used for online prediction of the probability of an object performing a conversion behavior against an item.
[0160] As can be seen from the above technical solutions, the embodiments of this application have discovered the reason for the inaccuracy of the prediction model for conversion rate in related technologies. Specifically, the model is trained using unreturned conversion samples as negative samples. However, in actual business, the proportion of samples that convert within one day is relatively small; more than 80% of conversion samples require waiting more than one day before conversion and feedback. Therefore, to address the issues of unreturned conversion samples and feedback delays, the embodiments of this application use a third prediction model to predict the conversion result of the observed sample as a third probability of an unreturned conversion sample. An initial fourth prediction model is then trained using both the third and fourth probabilities, thereby reducing the sample distribution difference between the behavioral data and the actual samples. This allows the trained fourth prediction model to reduce the prediction bias of the conversion rate and improve the accuracy of the fourth prediction model in predicting the conversion rate.
[0161] As one possible implementation, this application provides a loss function for training the initial fourth prediction model, as follows:
[0162]
[0163] Where x represents the input of the initial fourth prediction model, which is generally the input features such as item features, first object features, second object features, and context features.
[0164] y represents the transformation result, such as y=1 representing a positive sample (a sample that has been transformed) and y=0 representing a negative sample (a sample that has not been transformed).
[0165] fθ (x) represents the output of the initial fourth prediction model, i.e., the fourth probability.
[0166] p dp (x) represents the conditional probability of the untransmitted positive samples in the true samples, i.e., the third probability obtained by the third prediction model of the conversion result of the observed samples being untransmitted conversion samples.
[0167] The derivation process of the foregoing loss function will be described below. For the convenience of description, some mathematical notations will be described first below.
[0168] l(x,y;f θ (x)) represents the loss function of the initial fourth prediction model. The embodiments of the present application do not make specific limitations thereto. For example, it may be a cross-entropy loss function.
[0169] p(x) represents the probability distribution of the input features on the true samples (w>w2).
[0170] p(y|x) represents the fourth probability that the object generates a conversion behavior for the item in the true samples, or the probability value of whether the output samples on the true samples are converted. For example, p(y = 1|x) represents the probability of sample conversion, and p(y = 0|x) represents the probability of sample non-conversion.
[0171] q(y|x) represents the third probability that the conversion result of the observed samples is an untransmitted conversion sample, or the probability value of whether the observed samples (w1<w<w2) are converted.
[0172] L represents the total loss of the loss function of the model on the entire training samples, which is another form of l(x,y;f θ (x)).
[0173] Since the bias existing in the observed samples does not affect the distribution of the features, let p(x)≈q(x).
[0174]
[0175] When the loss function l is a cross-entropy loss function, by introducing the observed samples, the overall loss function L can be converted into the following form:
[0176]
[0177] Let p(x,y = 1,z>w1) represent the joint probability distribution of the input feature x and the untransmitted conversion samples (i.e., the positive samples transmitted when z>w1) in the true samples.
[0178] Let p(x,y = 0) represent the joint probability distribution of the input feature x and the negative sample y = 0 in the true samples.
[0179] Let q(x,y=0) denote the joint probability distribution of the input feature x and the negative sample y=0 in the observed sample.
[0180] Then q(x,y=0) is calculated as follows:
[0181] q(x,y=0)=p(x,y=0)+p dp (x)
[0182] Since the final model's training data uses observed samples, the difference between the actual samples and the observed samples is unknown. Therefore, the training samples used during training are equivalent to the observed samples, and the distribution p(x) of the input feature x on the training samples is the same as the distribution q(x) on the observed samples, i.e., p(x) = q(x).
[0183] The conditional probability formula for negative samples in the observed sample is:
[0184]
[0185]
[0186] make
[0187] Therefore, the conditional probability of a negative sample in the observed sample is calculated as follows:
[0188] q(y=0|x)=p(y=0|x)+p dp (x)
[0189] Similarly, the conditional probability of a positive sample in the observed sample is calculated as follows:
[0190] q(y=1|x)=p(y=1|x)-p dp (x)
[0191] Therefore, the loss function is calculated as follows:
[0192]
[0193] Among them, the fourth probability f of an object transforming an item. θ (x) = p(y = 1|x)
[0194] Therefore, p(y=0|x)=1-f θ (x)
[0195] Therefore, the overall loss function is as follows:
[0196]
[0197] As one possible implementation, the parameters of the initial fourth prediction model can be updated as follows during training:
[0198]
[0199] Among them, W l This represents the model parameters of the initial fourth prediction model. Let η represent the parameter gradient of the initial fourth prediction model, η represent the parameter update step size, also known as the learning rate, and L represent the loss function of the initial fourth prediction model.
[0200] It is understood that in the specific embodiments of this application, data related to user information, first object characteristics, and second object characteristics are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. As a possible implementation, in the specific embodiments of this application, anonymized user information, first object characteristics, second object characteristics, and other related data are used. For example, although object characteristics are used, it is unknown which user the object characteristic belongs to; it is only clear that the object characteristic exists among a batch of users.
[0201] The following describes the method for determining the prediction model provided in the embodiments of this application, using the field of advertising recommendation as an application scenario.
[0202] See Figure 4 The figure is a schematic diagram of an application scenario for a method for determining a prediction model provided in an embodiment of this application.
[0203] S401: Obtain user behavior data and extract input features based on the behavior data.
[0204] Input features can be one or more combinations of item features, first object features, second object features, and context features.
[0205] S402: Determine the second prediction model.
[0206] A second prediction model for predicting the probability of an object being clicked is obtained by training the model in steps S201-S203 above.
[0207] S403: Determine the third prediction model.
[0208] A third prediction model is trained using the methods described in S3021-S3023 to predict the probability that the conversion result is a sample that has not been returned. The corrected sample is obtained through the third prediction model, thereby improving the accuracy of the fourth prediction model in predicting the conversion rate.
[0209] S404: Determine the fourth prediction model.
[0210] The fourth prediction model, which is used to predict the probability of an object performing a conversion behavior in response to an item, is obtained by training the model in the aforementioned S301-S303 methods.
[0211] S405: Obtain user behavior data related to advertisements online.
[0212] S406: Online, the click-through rate of users clicking on ads is determined based on behavioral data and the first prediction model; online, the conversion rate generated by users for ads is determined based on behavioral data, the third prediction model, and the fourth prediction model.
[0213] This allows for optimization of ad recall based on click-through rate and conversion rate, thereby improving ad recommendation effectiveness. For example, the ad ranking is obtained by multiplying the click-through rate by the conversion rate and the ad bid.
[0214] In addition to the prediction model determination method provided in the above embodiments, this application also provides a prediction model determination device.
[0215] See Figure 5 The figure is a schematic diagram of the structure of a predictive model determination device provided in an embodiment of this application. Figure 5 As shown, the device 500 for determining the prediction model includes a feature acquisition unit 501, a probability acquisition unit 502, and a training unit 503.
[0216] The feature acquisition unit 501 is used to acquire item features corresponding to an item, a first object feature corresponding to an object, and a second object feature corresponding to the object; wherein, the first object feature is the object feature acquired before the object clicks on the item, and the second object feature is the object feature acquired after the object clicks on the item;
[0217] The probability acquisition unit 502 is used to input the item features, the first object features, and the second object features into a first prediction model for offline prediction of the probability of an object clicking on an item, to obtain a first probability that the object clicks on the item; and to input the item features and the first object features into an initial second prediction model, to obtain a second probability that the object clicks on the item.
[0218] The training unit 503 is used to train the initial second prediction model based on the first probability and the second probability to obtain a second prediction model for predicting the probability of an object being clicked online.
[0219] As one possible implementation, the training unit 503 is specifically used for:
[0220] A first loss function is determined based on the first probability and the true probability, and a second loss function is determined based on the second probability and the true probability.
[0221] The third loss function is determined based on the first loss function and the second loss function;
[0222] The initial second prediction model is trained by minimizing the third loss function to obtain a second prediction model for predicting the probability of an object being clicked online.
[0223] As one possible implementation, the training unit 503 is specifically used for:
[0224] The third loss function is determined based on the first loss function, the second loss function, and the adjustment parameters.
[0225] As one possible implementation, the training unit 503 is specifically used for:
[0226] The distance between the first prediction model and the initial second prediction model is determined based on the first loss function and the second loss function.
[0227] The third loss function is determined based on the first loss function, the second loss function, the adjustment parameter, and the distance.
[0228] As one possible implementation, the training unit 503 is specifically used for:
[0229] The distance between the first prediction model and the initial second prediction model is determined based on the first loss function and the second loss function.
[0230] The third loss function is determined based on the first loss function and the distance.
[0231] As one possible implementation, the prediction model determination device 500 further includes an update unit for:
[0232] During the process of training the initial second prediction model based on minimizing the third loss function, if the number of iterations is less than a preset iteration threshold, the parameters of the initial second prediction model are updated according to the learning rate, the parameter gradient of the initial second prediction model, and the second loss function.
[0233] During the process of training the initial second prediction model based on minimizing the third loss function, if the number of iterations is greater than or equal to the preset iteration threshold, the parameters of the initial second prediction model are updated according to the learning rate, the parameter gradient of the initial second prediction model, and the third loss function.
[0234] As one possible implementation, the prediction model determination device 500 further includes an update unit for:
[0235] During the process of training the initial second prediction model based on minimizing the third loss function, the parameters of the initial second prediction model are updated according to the learning rate, the parameter gradient of the initial second prediction model, and the third loss function, wherein the learning rate is greater than a preset learning rate threshold.
[0236] As described in the above technical solution, the system acquires the item features corresponding to the item, and the first and second object features corresponding to the object. The first object feature, obtained before the object clicks on the item, can be used for both offline and online prediction. The second object feature, obtained after the object clicks on the item, can only be used for offline prediction. To learn the second object feature, the item features, the first object feature, and the second object feature are used as inputs. A first prediction model, used for offline prediction of the object's click probability, is used to obtain the first probability of the object clicking on the item. To enable online prediction, the item features and the first object feature are inputs to an initial second prediction model to obtain the second probability of the object clicking on the item. To learn the second object feature while making online predictions, the initial second prediction model is trained based on the first and second probabilities to obtain a second prediction model used for online prediction of the object's click probability. Therefore, not only are the item features and the first object feature used as inputs to the initial second prediction model, but the first probability obtained from the first prediction model is also introduced during the training of the initial second prediction model. This allows the initial second prediction model to learn the model parameters of the first prediction model through the first probability, thereby indirectly utilizing the second object feature to improve the prediction accuracy of the second prediction model.
[0237] See Figure 6 The figure is a schematic diagram of the structure of a predictive model determination device provided in an embodiment of this application. Figure 6 As shown, the device 600 for determining the prediction model includes a data acquisition unit 601, a third probability acquisition unit 602, a fourth probability acquisition unit 603, and a training unit 604.
[0238] The data acquisition unit 601 is used to acquire behavioral data generated by an object in relation to an item; wherein, the behavioral data includes observation samples, the observation samples are data that are within the maximum sample return window and not within the minimum sample return window, the starting point of the maximum sample return window and the minimum sample return window are both the time when the object clicks on the item, and the length of the maximum sample return window is greater than the length of the minimum sample return window.
[0239] The third probability acquisition unit 602 is used to obtain, based on the observed sample, the third probability that the transformation result of the observed sample is an untransformed sample through a third prediction model; wherein, the third prediction model is trained based on historical observed samples and the transformation results of the historical observed samples;
[0240] The fourth probability acquisition unit 603 is used to obtain the fourth probability that the object will generate a conversion behavior in response to the item based on the behavioral data and the initial fourth prediction model.
[0241] The training unit 604 is used to train the initial fourth prediction model based on the third probability and the fourth probability to obtain a fourth prediction model for predicting online the probability that the object will perform a conversion behavior in response to the item.
[0242] As one possible implementation, the prediction model determination device 600 further includes a third prediction model training unit, used for:
[0243] Determine the transformation results of historical observation samples; wherein, the transformation results include non-transformed samples and non-transformed samples, the non-transformed samples are those that were not transformed within the maximum return window of the sample and were transformed outside the maximum return window of the sample, and the non-transformed samples are those that were not transformed outside the maximum return window of the sample.
[0244] Based on the historical observation samples and the initial third prediction model, determine the prediction transformation results of the historical observation samples;
[0245] The initial third prediction model is trained based on the difference between the predicted transformation result and the transformation result of the historical observation sample, to obtain a third prediction model for predicting the probability that the transformation result is a non-transformed sample.
[0246] As one possible implementation, the fourth probability acquisition unit 603 is specifically used for:
[0247] Based on the behavioral data, the item features corresponding to the item, the first object features corresponding to the object, and the second object features corresponding to the object are obtained; wherein, the first object features are the object features obtained before the object clicks on the item, and the second object features are the object features obtained after the object clicks on the item;
[0248] The item features, the first object features, and the second object features are input into the initial fourth prediction model to obtain the fourth probability that the object will generate a conversion behavior in response to the item.
[0249] As can be seen from the above technical solutions, the embodiments of this application have discovered the reason for the inaccuracy of the prediction model for conversion rate in related technologies. Specifically, the model is trained using unreturned conversion samples as negative samples. However, in actual business, the proportion of samples that convert within one day is relatively small; more than 80% of conversion samples require waiting more than one day before conversion and feedback. Therefore, to address the issues of unreturned conversion samples and feedback delays, the embodiments of this application use a third prediction model to predict the conversion result of the observed sample as a third probability of an unreturned conversion sample. An initial fourth prediction model is then trained using both the third and fourth probabilities, thereby reducing the sample distribution difference between the behavioral data and the actual samples. This allows the trained fourth prediction model to reduce the prediction bias of the conversion rate and improve the accuracy of the fourth prediction model in predicting the conversion rate.
[0250] This application also provides a computer device, which is the computer device described above. This computer device can be a server or a terminal device, and the aforementioned predictive model determination device can be built into the server or terminal device. The computer device provided in this application will be described below from the perspective of hardware implementation. Among them, Figure 7 The diagram shown is a structural schematic of the server. Figure 8 The diagram shown is a structural schematic of the terminal device.
[0251] See Figure 7 This figure is a schematic diagram of a server structure provided in an embodiment of this application. The server 1400 can vary considerably due to different configurations or performance, and may include one or more Central Processing Units (CPUs) 1422 and memory 1432, and one or more application programs 1442 or data storage media 1430 (e.g., one or more mass storage devices). The memory 1432 and storage media 1430 can be temporary or persistent storage. The program stored in the storage media 1430 may include one or more modules (not shown in the figure), each module may include a series of instruction operations on the server. Furthermore, the CPU 1422 may be configured to communicate with the storage media 1430 and execute the series of instruction operations in the storage media 1430 on the server 1400.
[0252] Server 1400 may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input / output interfaces 1458, and / or one or more operating systems 1441, such as Windows Server. TM Mac OS X TM Unix TM LinuxTM FreeBSD TM etc.
[0253] The steps performed by the server in the above embodiments can be based on this Figure 7 The server structure shown.
[0254] CPU 1422 is used to perform the following steps:
[0255] The system acquires the item features corresponding to the item, the first object features corresponding to the object, and the second object features corresponding to the object; wherein the first object features are the object features acquired before the object clicks on the item, and the second object features are the object features acquired after the object clicks on the item.
[0256] The item features, the first object features, and the second object features are input into a first prediction model for offline prediction of the probability of an object clicking on an item, to obtain a first probability that the object clicks on the item; the item features and the first object features are input into an initial second prediction model, to obtain a second probability that the object clicks on the item.
[0257] The initial second prediction model is trained based on the first probability and the second probability to obtain a second prediction model for predicting the probability of an object being clicked online.
[0258] Alternatively, perform the following steps:
[0259] Acquire behavioral data of an object in relation to an item; wherein, the behavioral data includes observation samples, the observation samples are data that are within the maximum feedback window of the sample and not within the minimum feedback window of the sample, the starting point of the maximum feedback window of the sample and the minimum feedback window of the sample are both the time when the object clicks on the item, and the length of the maximum feedback window of the sample is greater than the length of the minimum feedback window of the sample.
[0260] Based on the observed samples, a third probability is obtained through a third prediction model that the transformation result of the observed samples is a non-transformed sample; wherein, the third prediction model is trained based on historical observed samples and the transformation results of the historical observed samples;
[0261] Based on the behavioral data and the initial fourth prediction model, a fourth probability is obtained that the object will generate a conversion behavior in response to the item;
[0262] The initial fourth prediction model is trained based on the third probability and the fourth probability to obtain a fourth prediction model for predicting online the probability that the object will perform a conversion behavior in response to the item.
[0263] Optionally, the CPU 1422 may also execute method steps of any specific implementation of the prediction model determination method in the embodiments of this application.
[0264] See Figure 8 The figure is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Figure 8 This diagram illustrates a partial structure of a smartphone related to the terminal device provided in this embodiment. The smartphone includes components such as a radio frequency (RF) circuit 1510, a memory 1520, an input unit 1530, a display unit 1540, a sensor 1550, an audio circuit 1560, a Wi-Fi module 1570, a processor 1580, and a power supply 1590. Those skilled in the art will understand that... Figure 8 The smartphone structure shown does not constitute a limitation on smartphones and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0265] The following is combined Figure 8 A detailed introduction to the various components of a smartphone:
[0266] The RF circuit 1510 can be used to receive and transmit signals during information transmission or calls. In particular, it receives downlink information from the base station and processes it with the processor 1580; in addition, it transmits uplink data to the base station.
[0267] The memory 1520 can be used to store software programs and modules, and the processor 1580 runs the software programs and modules stored in the memory 1520 to realize various functions and data processing of the smartphone.
[0268] Input unit 1530 can be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the smartphone. Specifically, input unit 1530 may include touch panel 1531 and other input devices 1532. Touch panel 1531, also known as a touch screen, can collect touch operations on or near the user and drive corresponding connected devices according to a pre-set program. In addition to touch panel 1531, input unit 1530 may also include other input devices 1532. Specifically, other input devices 1532 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0269] The display unit 1540 can be used to display information input by the user or information provided to the user, as well as various menus of the smartphone. The display unit 1540 may include a display panel 1541, which may optionally be configured as a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0270] Smartphones may also include at least one sensor 1550, such as a light sensor, a motion sensor, and other sensors. Other sensors that smartphones may also be equipped with, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be detailed here.
[0271] Audio circuit 1560, speaker 1561, and microphone 1562 provide an audio interface between the user and the smartphone. Audio circuit 1560 converts received audio data into electrical signals and transmits them to speaker 1561, where speaker 1561 converts them into sound signals for output. On the other hand, microphone 1562 converts collected sound signals into electrical signals, which are received by audio circuit 1560, converted into audio data, and then processed by processor 1580 before being transmitted via RF circuit 1510 to, for example, another smartphone, or the audio data can be output to memory 1520 for further processing.
[0272] The processor 1580 is the control center of the smartphone, connecting various parts of the smartphone through various interfaces and lines. It performs various functions and processes data by running or executing software programs and / or modules stored in the memory 1520, and by calling data stored in the memory 1520. Optionally, the processor 1580 may include one or more processing units.
[0273] The smartphone also includes a power supply 1590 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 1580 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0274] Although not shown, smartphones may also include a camera, Bluetooth module, etc., which will not be described in detail here.
[0275] In this embodiment of the application, the memory 1520 included in the smartphone can store program code and transmit the program code to the processor.
[0276] The processor 1580 included in the smartphone can execute the method for determining the prediction model provided in the above embodiments according to the instructions in the program code.
[0277] This application also provides a computer-readable storage medium for storing a computer program for executing the prediction model determination method provided in the above embodiments.
[0278] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the prediction model determination method provided in the various optional implementations of the above aspects.
[0279] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “corresponding to,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0280] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium can be at least one of the following media: read-only memory (ROM), RAM, magnetic disk, or optical disk, etc., and other media capable of storing program code.
[0281] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0282] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for determining a prediction model, characterized in that, The method comprises: acquiring an item feature corresponding to an item, a first object feature corresponding to an object, and a second object feature corresponding to the object; wherein the first object feature is an object feature acquired before the object clicks the item, and the second object feature is an object feature acquired after the object clicks the item; inputting the item feature, the first object feature, and the second object feature into a first prediction model for offline prediction of an object-click-item probability to obtain a first probability that the object clicks the item; and inputting the item feature and the first object feature into an initial second prediction model to obtain a second probability that the object clicks the item; training the initial second prediction model according to the first probability and the second probability to obtain a second prediction model for online prediction of an object-click-item probability.
2. The method of claim 1, wherein, The method for training the initial second prediction model according to the first probability and the second probability to obtain a second prediction model for online prediction of an object-click-item probability comprises: determining a first loss function according to the first probability and a true probability, and determining a second loss function according to the second probability and the true probability; determining a third loss function according to the first loss function and the second loss function; training the initial second prediction model based on minimizing the third loss function to obtain a second prediction model for online prediction of an object-click-item probability.
3. The method of claim 2, wherein, The method for determining a third loss function according to the first loss function and the second loss function comprises: determining a third loss function according to the first loss function, the second loss function, and an adjustment parameter.
4. The method of claim 2, wherein, The method for determining a third loss function according to the first loss function and the second loss function comprises: determining a distance between the first prediction model and the initial second prediction model according to the first loss function and the second loss function; determining a third loss function according to the first loss function, the second loss function, an adjustment parameter, and the distance.
5. The method of claim 2, wherein, The method for determining a third loss function according to the first loss function and the second loss function comprises: determining a distance between the first prediction model and the initial second prediction model according to the first loss function and the second loss function; determining a third loss function according to the first loss function and the distance.
6. The method according to any one of claims 2-5, characterized in that, In the process of training the initial second prediction model based on minimizing the third loss function, the method further comprises: if the number of iterations is less than a preset iteration threshold, updating parameters of the initial second prediction model according to a learning rate, a parameter gradient of the initial second prediction model, and the second loss function; if the number of iterations is greater than or equal to the preset iteration threshold, updating parameters of the initial second prediction model according to a learning rate, a parameter gradient of the initial second prediction model, and the third loss function.
7. The method according to any one of claims 2-5, characterized in that, In the process of training the initial second prediction model based on minimizing the third loss function, the method further comprises: According to a learning rate, a parameter gradient of the initial second prediction model, and the third loss function, parameters of the initial second prediction model are updated, the learning rate being greater than a preset learning rate threshold.
8. A device for determining a prediction model, characterized in that The device comprises a feature acquisition unit, a probability acquisition unit, and a training unit. The feature acquisition unit is configured to acquire an item feature corresponding to an item, a first object feature corresponding to an object, and a second object feature corresponding to the object, wherein the first object feature is an object feature acquired before the object clicks the item, and the second object feature is an object feature acquired after the object clicks the item. The probability acquisition unit is configured to input the item feature, the first object feature, and the second object feature into a first prediction model for offline prediction of an object click item probability, to obtain a first probability of the object clicking the item, and to input the item feature and the first object feature into an initial second prediction model, to obtain a second probability of the object clicking the item. The training unit is configured to train the initial second prediction model according to the first probability and the second probability, to obtain a second prediction model for online prediction of an object click item probability.
9. A computer device, comprising: The computer device comprises a processor and a memory. The memory is configured to store a computer program and transmit the computer program to the processor. The processor is configured to execute the method according to the instructions in the computer program.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium is configured to store a computer program, and the computer program is used for the method according to any one of claims 1-7.
11. A computer program product comprising a computer program, characterised in that, When it runs on a computer device, it makes the computer device execute the method according to any one of claims 1-7.
Citation Information
Patent Citations
Advertisement picture evaluation method and device, storage medium and computer equipment
CN111242690A
Video recommendation method and system
CN111339355A