A data processing method and related device
Through the method of screening and label setting, the problem of training sample collection dependence on time period T in the prior art is solved, the model training efficiency and accuracy are improved, and real-time training is realized.
Patent Information
- Application Number
- CN202210250693.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-15
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-03-15
AI Technical Summary
In the prior art, the training sample collection process of the prediction model is heavily dependent on the setting of the time period T, resulting in an increase in negative samples or a lag in input, affecting the accuracy and training efficiency of the model, especially in real-time model training.
By obtaining the candidate historical click data of the target application scenario, filtering out the target historical click data based on the data identification information, and setting corresponding tags as sample data, reducing the amount of data calculation and improving model training efficiency and accuracy.
Real-time training is realized, avoiding the unreasonable impact of model training efficiency due to the unreasonable setting of the waiting time, and improving the model training efficiency and accuracy.
Smart Images

Figure CN116796012B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology and provides a data processing method and related devices. Background Art
[0002] With the continuous development of computer technology, accurate push in recommendation scenarios can be achieved by predicting click-through rate and conversion rate. The click-through rate refers to the probability of triggering a click operation on a certain multimedia information, and the conversion rate refers to the probability of triggering a conversion operation after triggering a click operation on the multimedia information. The conversion operation includes but is not limited to commenting, forwarding, and collecting.
[0003] In the related art, the training samples of the prediction model are usually collected in the following way: after determining that a click operation is triggered for a multimedia information, wait for a limited time period T. If the conversion operation is not triggered within the time period T, a negative sample is generated based on the click operation. If the conversion operation is triggered within the time period T, a positive sample is generated based on the click operation.
[0004] However, the above training sample collection process is heavily dependent on the setting of the time period T. If the time period T is set too short, the number of negative samples will increase, resulting in the data distribution of the training samples being inconsistent with the real data distribution, affecting the accuracy of the model. If the time period T is set too long, it will cause a large input lag in the model training, especially in the real-time model training process, which will seriously affect the model training efficiency. Summary of the invention
[0005] The embodiments of the present application provide a data processing method and related devices to improve model training efficiency and model accuracy.
[0006] In a first aspect, an embodiment of the present application provides a data processing method, including:
[0007] Based on a trigger operation for target multimedia information in a target application scenario, obtaining operation data to be processed, wherein the operation data to be processed includes data identification information and an operation type;
[0008] When it is determined that the operation type is a specified operation, each candidate historical click data corresponding to the target application scenario is obtained, each candidate historical click data includes corresponding data identification information;
[0009] Based on the data identification information respectively included in the operation data to be processed and each candidate historical click data, the target historical click data corresponding to the operation data to be processed is screened out from each candidate historical click data;
[0010] A first type of tag is set for the target historical click data, and the target historical click data obtained after setting the tag is used as the first type of sample data. The first type of tag is used to characterize that a conversion operation is triggered after a click operation is triggered on the target multimedia information.
[0011] In a second aspect, an embodiment of the present application provides a data processing device, including:
[0012] A trigger unit, configured to obtain operation data to be processed based on a trigger operation for target multimedia information in a target application scenario, wherein the operation data to be processed includes data identification information and an operation type;
[0013] An acquisition unit, configured to acquire each candidate historical click data corresponding to the target application scenario when it is determined that the operation type is a specified operation, each candidate historical click data including corresponding data identification information;
[0014] A screening unit, configured to screen out target historical click data corresponding to the operation data to be processed from the candidate historical click data based on the data identification information respectively included in the operation data to be processed and the candidate historical click data;
[0015] The calibration unit is used to set a first type of label for the target historical click data, and use the target historical click data obtained after setting the label as the first type of sample data, wherein the first type of label is used to characterize that a conversion operation is triggered after a click operation is triggered on the target multimedia information.
[0016] As a possible implementation manner, the calibration unit is further used for:
[0017] If it is determined that the operation type is a specified operation, a second type label is set for the operation data to be processed, and the operation data to be processed obtained after setting the second type label is used as the second type of sample data, wherein the second type label is used to characterize that after a click operation is triggered on the target multimedia information, no conversion operation is triggered.
[0018] As a possible implementation manner, the calibration unit is further used for:
[0019] If it is determined that the operation type is an exposure operation, a third type tag is set for the operation data to be processed; wherein the third type tag is used to indicate that no click operation is triggered for the target multimedia information;
[0020] Based on the operation data to be processed obtained after setting the third type of label, at least one third type of sample data is obtained.
[0021] As a possible implementation manner, when acquiring each candidate historical click data corresponding to the target application scenario, the acquiring unit is specifically configured to:
[0022] Each candidate historical click data corresponding to the target application scenario is obtained from the designated cache area, wherein in the designated cache area, the cache duration of each candidate historical click data is not greater than a preset cache duration threshold.
[0023] As a possible implementation manner, the calibration unit is further used for:
[0024] The to-be-processed operation data is stored in the designated cache area as new historical click data;
[0025] When it is determined that the operation data to be processed meets the preset removal condition, the operation data to be processed is removed from the designated cache area.
[0026] As a possible implementation manner, when it is determined that the operation data to be processed meets the preset removal condition, the calibration unit is specifically used to:
[0027] When the cache time length of the operation data to be processed is greater than the cache time length threshold, determining that the operation data to be processed meets the preset removal condition; or,
[0028] When there is a corresponding relationship between the operation data to be processed and the new operation data to be processed, it is determined that the operation data to be processed meets the preset removal condition.
[0029] As a possible implementation manner, a training unit is further included, and the training unit is used to:
[0030] Get a sample data set;
[0031] Based on the sample data set, an initial prediction model for outputting click-through conversion rate prediction values is trained to obtain a target prediction model, wherein the initial prediction model includes a click-through rate prediction sub-model and a conversion rate prediction sub-model, and the click-through conversion rate prediction value is obtained based on the click-through rate prediction value output by the click-through rate prediction sub-model and the conversion rate prediction value output by the conversion rate prediction sub-model.
[0032] As a possible implementation, based on the sample data set, the initial prediction model for outputting the click-through conversion rate prediction value is trained to obtain the target prediction model, and the training unit is specifically used to:
[0033] For each sample data included in the sample data set, the following operations are iteratively performed:
[0034] Obtaining a sample data from the sample data set, and inputting the sample data into the initial prediction model to obtain a click-through conversion rate prediction value and a click-through rate prediction value corresponding to the sample data;
[0035] Determine the click-to-conversion rate loss based on the click-to-conversion rate prediction value corresponding to the one sample data, determine the click-to-conversion rate loss based on the click-to-rate prediction value corresponding to the one sample data, and obtain the model loss value based on the click-to-conversion rate loss and the click-to-conversion rate loss;
[0036] Based on the model loss value, the model parameters of the initial prediction model are adjusted.
[0037] As a possible implementation manner, when determining the click rate loss based on the click rate prediction value corresponding to the one sample data, the training unit is specifically used to:
[0038] Determining a non-click probability corresponding to the sample data based on a click rate prediction value corresponding to the sample data;
[0039] The click rate loss is determined based on a first weight corresponding to the click rate prediction value and a second weight corresponding to the non-click probability; wherein the first weight is determined based on sample distribution information of sample data whose operation type is conversion operation, and the second weight is determined based on sample distribution information of sample data whose operation type is non-conversion operation.
[0040] As a possible implementation manner, when determining the click-through conversion rate loss based on the click-through conversion rate prediction value corresponding to the one sample data, the training unit is specifically configured to:
[0041] Determining a non-click conversion probability corresponding to the sample data based on a click-through conversion rate prediction value corresponding to the sample data;
[0042] Based on the third weight corresponding to the click-conversion rate prediction value and the fourth weight corresponding to the non-click conversion probability, the click-conversion rate loss is determined; wherein the third weight is determined based on the sample distribution information of the sample data whose operation type is click operation, and the fourth weight is determined based on the sample distribution information of the sample data whose operation type is exposure operation.
[0043] As a possible implementation manner, the data identification information at least includes an operation object identification and a publishing object identification;
[0044] Then, when the target historical click data corresponding to the operation data to be processed is screened out from the candidate historical click data based on the data identification information respectively included in the operation data to be processed and the candidate historical click data, the screening unit is specifically used to:
[0045] From the candidate historical click data, select candidate historical click data whose operation object identifier is the same as the operation object identifier of the operation data to be processed and whose publishing object identifier is the same as the publishing object identifier of the operation data to be processed;
[0046] The screened candidate historical click data are used as the target historical click data corresponding to the operation data to be processed.
[0047] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned data processing method.
[0048] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the above-mentioned data processing method.
[0049] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device performs the steps of the above-mentioned data processing method.
[0050] In an embodiment of the present application, when obtaining pending operation data whose operation type is a conversion operation, each candidate historical click data corresponding to the target application scenario is obtained, and then, based on the data identification information, the target historical click data corresponding to the pending operation data is screened out from each candidate historical click data. Thereafter, a first type of label is set for the target historical click data, and the target historical click data obtained after setting the label is used as the first type of sample data. The first type of label is used to characterize that a conversion operation is triggered after a click operation is triggered on the target multimedia information.
[0051] In this way, compared with the method of waiting to trigger the conversion operation, the model input lag is avoided to a certain extent, thereby realizing real-time training. At the same time, it avoids the impact of unreasonable waiting time setting on the model training efficiency. In addition, by screening the target historical click data as the first category of sample data from the candidate historical click data, the first category of sample data can be obtained, which can reduce the amount of data calculation and thus improve the model training efficiency and model accuracy.
[0052] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0054] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;
[0055] Figure 2 A flowchart of a data processing method provided in an embodiment of the present application;
[0056] Figure 3A A schematic diagram of a triggering conversion operation provided in an embodiment of the present application;
[0057] Figure 3B A schematic diagram of determining target historical click data provided in an embodiment of the present application;
[0058] Figure 4A A logical schematic diagram for obtaining the second type of sample data provided in an embodiment of the present application;
[0059] Figure 4B A logical schematic diagram for obtaining the third type of sample data provided in an embodiment of the present application;
[0060] Figure 5 A schematic diagram of a cache pool provided in an embodiment of the present application;
[0061] Figure 6 A schematic diagram of another buffer pool provided in an embodiment of the present application;
[0062] Figure 7 A flow chart of a model training method provided in an embodiment of the present application;
[0063] Figure 8 A schematic diagram of the structure of an initial prediction model provided in an embodiment of the present application;
[0064] Fig. 9 A schematic diagram of the flow of a model training method in an iterative process provided in an embodiment of the present application;
[0065] Fig.10A logical schematic diagram of a data processing method provided in an embodiment of the present application;
[0066] Fig.11 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0067] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.
[0069] The following is an introduction to some concepts involved in the embodiments of the present application.
[0070] 1. Conversion operation: refers to the designated operations such as like, comment, forward, repurchase, etc. triggered after the operation object triggers a click operation on a certain multimedia information. Among them, the repurchase operation refers to the click operation of the operation object on other multimedia information published by the publisher of the multimedia information, but is not limited to this.
[0071] 2. Multimedia information: including but not limited to text, video, audio, advertising and other types of information.
[0072] 3. Importance Weighting (IW):
[0073] IW is used when the sample data distribution is inconsistent with the real data distribution. It corrects the sample probability distribution function to make the model prediction value close to the real value of the model. The specific correction is as follows:
[0074] Assume that the real data distribution is p(x,y), and the sample data distribution after sampling is q(x,y); the model parameter is θ. Ideally, the loss function It can be directly obtained in the p(x,y) distribution using the following formula (1):
[0075]
[0076] Since the sample data distribution after sampling is q(x,y), refer to formula (2), at this time, we can model the relationship between p(x,y) and q(x,y) to Transformed into a loss function under q(x,y) distribution:
[0077]
[0078] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0079] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics and other technologies. Artificial intelligence software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.
[0080] Among them, machine learning (ML) is a multi-disciplinary interdisciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.
[0081] The solution provided in the embodiment of the present application involves the machine learning technology of artificial intelligence. In the embodiment of the present application, it mainly involves the training process of the initial prediction model. Specifically, a sample data set is obtained, and then, based on the sample data set, the initial prediction model for outputting the click-through conversion rate prediction value is trained to obtain the target prediction model. The detailed training process of the initial prediction model is shown below and will not be repeated here.
[0082] With the continuous development of computer technology, accurate push in recommendation scenarios can be achieved by predicting click-through rate and conversion rate. The click-through rate refers to the probability of triggering a click operation on a certain multimedia information, and the conversion rate refers to the probability of triggering a conversion operation after triggering a click operation on the multimedia information. The conversion operation includes but is not limited to commenting, forwarding, and collecting.
[0083] In the related art, the training samples of the prediction model are usually collected in the following way: after determining that a click operation is triggered for a multimedia information, wait for a limited time period T. If the conversion operation is not triggered within the time period T, a negative sample is generated based on the click operation. If the conversion operation is triggered within the time period T, a positive sample is generated based on the click operation.
[0084] However, the above training sample collection process is heavily dependent on the setting of the time period T. If the time period T is set too short, the number of negative samples will increase, resulting in the data distribution of the training samples being inconsistent with the real data distribution, affecting the accuracy of the model. If the time period T is set too long, it will cause a large input lag in the model training, especially in the real-time model training process, which will seriously affect the model training efficiency.
[0085] In an embodiment of the present application, when obtaining pending operation data whose operation type is a specified operation, each candidate historical click data corresponding to the target application scenario is obtained, and then, based on the data identification information, the target historical click data corresponding to the pending operation data is screened out from each candidate historical click data. Thereafter, a first type of label is set for the target historical click data, and the target historical click data obtained after setting the label is used as the first type of sample data. The first type of label is used to characterize that a conversion operation is triggered after a click operation is triggered on the target multimedia information.
[0086] In this way, compared with the method of waiting to trigger the conversion operation, the model input lag is avoided to a certain extent, thereby realizing real-time training. At the same time, it avoids the impact of unreasonable waiting time setting on the model training efficiency. In addition, by screening the target historical click data as the first category of sample data from the candidate historical click data, the first category of sample data can be obtained, which can reduce the amount of data calculation and thus improve the model training efficiency and model accuracy.
[0087] It is understood that in the specific implementation of this application, when it involves operation data, click data and other related data, when the embodiments of this application are applied to specific products or technologies, it is necessary to obtain permission or consent for use, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. The relevant data will be deleted after collection, use and processing.
[0088] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments of the present application and the features in the embodiments may be combined with each other if there is no conflict.
[0089] See also Figure 1 As shown, it is a schematic diagram of an application scenario provided in an embodiment of the present application. The application scenario includes at least a terminal device 110 and a server 120. The number of terminal devices 110 can be one or more, and the number of servers 120 can also be one or more. The present application does not specifically limit the number of terminal devices 110 and servers 120. The terminal device 110 in the embodiment of the present application can be installed with a client related to data processing, and the server 120 can be a server related to data processing. In addition, the client in the present application can be software, or a web page, a small program, etc., and the server is a background server corresponding to the software or web page, a small program, etc., or a server specifically used for data processing, etc., which is not specifically limited in the present application.
[0090] In the embodiment of the present application, the terminal device 110 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an Internet of Things device, a smart home appliance, a car terminal, etc., but is not limited thereto.
[0091] The server 120 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal device 110 and the server 120 may be directly or indirectly connected via wired or wireless communication, which is not limited in this application.
[0092] It should be noted that the data processing method in the embodiment of the present application can be executed by a server or a terminal device alone, or can be executed by a server and a terminal device together.
[0093] For example, the terminal device obtains pending operation data including data identification information and operation type based on the trigger operation for the target multimedia information in the target application scenario. Then, when the operation type is determined to be a specified operation, each candidate historical click data corresponding to the target application scenario is obtained, and each candidate historical click data includes the corresponding data identification information. Then, based on the pending operation data and the data identification information contained in each candidate historical click data, the target historical click data corresponding to the pending operation data is filtered out from each candidate historical click data. Finally, a first type label is set for the target historical click data, and the target historical click data obtained after setting the label is used as the first type of sample data. The first type label is used to characterize that a conversion operation is triggered after a click operation is triggered for the target multimedia information. Alternatively, the above data processing process is performed by the server.
[0094] Alternatively, the terminal device responds to a trigger operation on the target multimedia information in the target application scenario to obtain the operation data to be processed, and then the server obtains the candidate historical click data corresponding to the target application scenario when determining that the operation type is a conversion operation, and based on the data identification information, filters out the target historical click data corresponding to the operation data to be processed from the candidate historical click data, and sets a first type of label for the target historical click data, and uses the target historical click data obtained after setting the label as the first type of sample data. This application does not make any specific limitations on this.
[0095] The following describes the data processing method provided by the exemplary embodiment of the present application in combination with the application scenarios described above and with reference to the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present application, and the implementation methods of the present application are not limited in this regard.
[0096] See also Figure 2 As shown, it is a flow chart of a data processing method provided in an embodiment of the present application. The method is applied to an electronic device, which may be a terminal device or a server. The specific process is as follows:
[0097] S201. Based on a triggering operation on target multimedia information in a target application scenario, obtain operation data to be processed, where the operation data to be processed includes data identification information and an operation type.
[0098] The trigger operation for the target multimedia information in the target application scenario may refer to an exposure operation for the target multimedia information, or a click operation of the target operation object for the target multimedia information, or a designated operation of the target operation object for the target multimedia information, wherein the exposure operation refers to presenting the target multimedia information in the operation interface of the target operation object, and the designated operation includes but is not limited to any one of the operations of liking, commenting, forwarding, repurchasing, etc. It should be noted that since the repurchasing operation is a click operation for other multimedia information, it is actually also a click operation, so the designated operation may also refer to a click operation.
[0099] If an exposure operation is triggered for the target multimedia information in the target application scenario, the operation type of the operation data to be processed is an exposure operation; if a click operation is triggered for the target multimedia information in the target application scenario, the operation type of the operation data to be processed is a click operation; if a specified operation is triggered for the target multimedia information in the target application scenario, the operation type of the operation data to be processed is a specified operation.
[0100] In the embodiment of the present application, in different application scenarios, the specified operation can be different types of operations. Figure 3A As shown, in the public account message recommendation scenario, a conversion operation may refer to a click operation triggered by the target operation object on a certain public account message, and then a click operation is triggered again on other public account messages published by the target publishing object of the public account message. That is, the designated operation refers to a click operation on other public account messages published by the target publishing object of the public account message.
[0101] The data identification information may include one or more of an object identification, a content identification of a target multimedia information, a publishing object identification, etc. Among them, the operation object identification is used to represent the object identification of the target operation object, and the publishing object identification is used to represent the object identification of the target publishing object. The object identification of the target operation object, the content identification of the target multimedia information, and the object identification of the target publishing object can all be represented by an identity document (ID), but are not limited thereto.
[0102] Taking the public account message recommendation scenario as an example, it is assumed that the data identification information of the operation data 1 to be processed includes the object identification of the target operation object, the content identification of the target multimedia information, and the object identification of the target publishing object, among which the object identification of the target operation object is ID "Zhang San", ID "Zhang San" is used to represent the account "Zhang San", the content identification of the target multimedia information is ID "Popular Science Article A", ID "Popular Science Article A" is used to represent Popular Science Article A, and the object identification of the target publishing object is ID "xx Popular Science Organization", ID "xx Popular Science Organization" is used to represent the public account account "xx Popular Science Organization".
[0103] In the following, only the public account message recommendation scenario is used as an example for explanation of the target application scenario.
[0104] For ease of description, the object identifier of the target operation object can also be called user id, the content identifier of the target multimedia information can be referred to as item id, and the object identifier of the target publication object can be called author id. The data identification information can be represented by a triple, which can be represented as (user id, item id, author id). For example, the data identification information of the operation data 1 to be processed can be represented as (ID "Zhang San", ID "Popular Science Article A", ID "xx Popular Science Organization").
[0105] S202: When it is determined that the operation type is a designated operation, each candidate historical click data corresponding to the target application scenario is obtained, and each candidate historical click data contains corresponding data identification information.
[0106] For example, assuming that the specified operation is a repurchase operation, when the operation type is determined to be a repurchase operation, that is, when the operation type is determined to be a click operation, the candidate historical click data corresponding to the target application scenario are obtained, and the candidate historical click data corresponding to the target application scenario include historical click data 1, historical click data 2, and historical click data 3, wherein the data identification information contained in the historical click data 1 is (ID "Zhang San", ID "Popular Science Article B", ID "xx Popular Science Organization"), that is, the historical click data 1 is obtained based on the click operation triggered by the account "Zhang San" for the popular science article B published by the account "xx Popular Science Organization", the data identification information contained in the historical click data 2 is (ID "Li Si", ID "Popular Science Article A", ID "xx Popular Science Organization"), that is, the historical click data 2 is obtained based on the click operation triggered by the account "Li Si" for the popular science article A published by the account "xx Popular Science Organization", and the data identification information contained in the historical click data 3 is (ID "Zhang San", ID "News Information A", ID "Wang Wu"), that is, the historical click data 3 is obtained based on the click operation triggered by the account "Zhang San" for the news information A published by the account "Wang Wu".
[0107] S203: based on the data identification information respectively included in the operation data to be processed and each candidate historical click data, the target historical click data corresponding to the operation data to be processed is screened out from each candidate historical click data.
[0108] Specifically, in the embodiment of the present application, the data identification information at least includes an operation object identification and a publishing object identification. Accordingly, when S203 is executed, it includes:
[0109] From each candidate historical click data, select candidate historical click data whose operation object identifier is the same as the operation object identifier of the operation data to be processed, and whose publishing object identifier is the same as the publishing object identifier of the operation data to be processed;
[0110] The filtered candidate historical click data is used as the target historical click data corresponding to the operation data to be processed.
[0111] For example, see Figure 3B As shown, the data identification information contained in the operation data 1 to be processed is (ID "Zhang San", ID "Popular Science Article A", ID "xx Popular Science Organization"), the data identification information contained in the historical click data 1 is (ID "Zhang San", ID "Popular Science Article B", ID "xx Popular Science Organization"), the data identification information contained in the historical click data 2 is (ID "Li Si", ID "Popular Science Article A", ID "xx Popular Science Organization"), and the data identification information contained in the historical click data 3 is (ID "Zhang San", ID "News Information A", ID "Wang Wu"). Obviously, in the historical click data 1, the historical click data 2 and the historical click data 3, the operation object identifier is the same as the operation object identifier of the operation data to be processed, and the candidate historical click data whose publishing object identifier is the same as the publishing object identifier of the operation data to be processed is the historical click data 1. Therefore, from each candidate historical click data, the historical click data 1 is screened out, and the screened out historical click data 1 is used as the target historical click data corresponding to the operation data 1 to be processed.
[0112] Through the above implementation, by determining the historical click status of other multimedia information published by the publisher of the target multimedia information, it is helpful to achieve accurate information recommendation for the publisher, thereby improving the click rate of the multimedia information published by the publisher.
[0113] S204. Set a first type of tag for the target historical click data, and use the target historical click data obtained after setting the tag as the first type of sample data. The first type of tag is used to represent that a conversion operation is triggered after a click operation is triggered on the target multimedia information.
[0114] In the embodiment of the present application, the type label can be expressed in the form of (a, b), where a indicates whether the operation type corresponding to the data is a click operation, and b indicates whether the operation type corresponding to the data is a conversion operation. The values of a and b are 0 or 1, and the value of 0 indicates no, and the value of 1 indicates yes. Therefore, the first type label can be expressed as (1, 1). The first type of sample data can also be called (1, 1) sample data.
[0115] For example, for the historical click data 1, the type label (1, 1) is set, and the historical click data 1 obtained after setting the type label (1, 1) is used as the (1, 1) sample data.
[0116] It should be noted that in the embodiments of the present application, only the acquisition of one operation data to be processed is used as an example for explanation. In actual application, in order to improve data processing efficiency, corresponding operation data to be processed can be obtained based on each trigger operation for the target multimedia information in the target application scenario. For each operation data to be processed, the processing process shown in S202-S204 is executed, and the specific process will not be repeated here.
[0117] In some embodiments, if it is determined that the operation type contained in the operation data to be processed is a specified operation, a second type label can also be set for the operation data to be processed, and the operation data to be processed obtained after setting the second type label can be used as the second type of sample data, wherein the second type label is used to characterize that after a click operation is triggered on the target multimedia information, no conversion operation is triggered.
[0118] The second type of label can be expressed as (1, 0), and the second type of sample data can also be called (1, 0) sample data.
[0119] For example, see Figure 4A As shown, when the operation type contained in the operation data 1 to be processed is a click operation, the operation type is determined to be a specified operation, and the type label (1, 0) is set for the operation data 1 to be processed, and the operation data 1 to be processed obtained after setting the type label (1, 0) is used as the (1, 0) sample data, and through the above S202-S204, the target history click data obtained after setting the type label (1, 1) is obtained, and the target history click data obtained after setting the type label (1, 1) is used as the (1, 1) sample data.
[0120] Through the above implementation method, the sample distribution of sample data can be made more consistent with the sample distribution of real data, thereby reducing the number of model parameters that need to be adjusted in the subsequent model training process, thereby reducing the computational complexity and improving the model training speed.
[0121] In some embodiments, if the operation type is determined to be an exposure operation, a third type label can be set for the operation data to be processed, wherein the third type label is used to characterize that a click operation is not triggered for the target multimedia information; then, based on the operation data to be processed obtained after setting the third type label, at least one third type of sample data is obtained.
[0122] Among them, the third type label can be expressed as (0, 0), and the third type of sample data can also be called (0, 0) sample data.
[0123] It should be noted that in the embodiment of the present application, if the designated operation refers to a repurchase operation, then the operation type includes a click operation and an exposure operation. In this case, if the operation type is neither a click operation nor a designated operation, it is an exposure operation.
[0124] The number of the third type of sample data may be one or more. In order to make the sample distribution of the sample data more consistent with the sample distribution of the real data, the number of the third type of sample data may be two.
[0125] Take the operation data 2 to be processed as an example, see Figure 4B As shown, it is assumed that the operation type contained in the operation data 2 to be processed is an exposure operation, and the type label (0, 0) is set for the operation data 2 to be processed. Then, based on the operation data 2 to be processed obtained after setting the type label (0, 0), two operation data 2 to be processed obtained after setting the type label (0, 0) are generated, and the two operation data 2 to be processed obtained after setting the type label (0, 0) are respectively used as (0, 0) sample data.
[0126] Through the above implementation method, when the operation type of the operation data to be processed is an exposure operation, sample data of the corresponding type is obtained, so that the model training process includes sample data corresponding to the exposure operation, thereby ensuring the model training effect and improving the model accuracy.
[0127] In some embodiments, a cache pool may be used to store various historical click data. Since some historical click data may never be converted, in order to avoid the continuous increase of the historical click data contained in the cache pool, the cache duration of the historical click data may be limited. The cache pool may also be referred to as a designated cache area. Specifically, obtaining various candidate historical click data corresponding to the target application scenario includes:
[0128] From the designated cache area, each candidate historical click data corresponding to the target application scenario is obtained, wherein in the designated cache area, the cache duration of each candidate historical click data is not greater than a preset cache duration threshold.
[0129] The designated cache area may be a storage area in the server or a third-party storage server, and there is no restriction on this.
[0130] In actual application, the cache duration threshold can be set to 6 hours (h). This setting can ensure that 95% of conversion operations are covered, that is, only 5% of conversion operations have a triggering time interval with the click operation that exceeds the cache duration threshold. Since the operation data of conversion operations is very scarce, usually accounting for only 7%, the sample label calibration error for 5% of conversion operations can be ignored.
[0131] For example, see Figure 5 As shown, the cache pool contains historical click data 1, historical click data 2, historical click data 3, historical click data 4, etc. When the cache time of historical click data 4 exceeds 6 hours, historical click data 4 will be removed from the cache pool.
[0132] It should be noted that if the cache duration of a candidate historical click data is greater than the preset cache duration threshold, the type label (1, 0) will be set for the candidate historical click data, and the candidate historical click data obtained after setting the type label (1, 0) will be used as a (1, 0) sample data.
[0133] Through the above implementation method, the continuous increase of cached historical click data can be avoided, and the waste of storage resources can be avoided. At the same time, the amount of calculation can be reduced, the processing speed of the model can be increased, and the model training effect can be improved.
[0134] In some embodiments, when it is determined that the operation type of the operation data to be processed is a click operation, the operation data to be processed is stored in a designated cache area as a new historical click data;
[0135] When it is determined that the pending operation data meets the preset removal condition, the pending operation data is removed from the designated cache area.
[0136] For example, see Figure 6 As shown, when it is determined that the operation type of the operation data 1 to be processed is a click operation, the operation data 1 to be processed is stored in the cache pool as a new historical click data, and the new candidate historical click data is called historical click data x. Then, when it is determined that the historical click data x meets the preset removal conditions, the historical click data x is removed from the cache pool.
[0137] Specifically, when it is determined that the operation data to be processed meets the preset removal conditions, at least one of the following operations is performed:
[0138] Operation 1: When the cache duration of the pending operation data is greater than the cache duration threshold, it is determined that the pending operation data meets a preset removal condition.
[0139] For example, when the cache duration of the historical click data x is greater than 6 hours, it is determined that the operation data to be processed meets the preset removal condition.
[0140] Operation 2: When there is a corresponding relationship between the pending operation data and the new pending operation data, it is determined that the pending operation data meets the preset removal condition.
[0141] That is, when the operation data to be processed is used as target historical click data corresponding to new operation data to be processed, it is determined that the operation data to be processed meets the preset removal condition.
[0142] For example, the data identification information contained in the operation data 2 to be processed is (ID "Zhang San", ID "Popular Science Article C", ID "xx Popular Science Organization"), and the operation type contained in the operation data 2 to be processed is a click operation. Assuming that the historical click data x is filtered out as the target historical click data corresponding to the operation data 2 to be processed, it is determined that the operation data to be processed meets the preset removal conditions.
[0143] Through the above implementation method, after the operation data to be processed is obtained, if the operation type of the operation data to be processed is a click operation, the operation data to be processed can be used as historical click data. Then, after new operation data is subsequently obtained, the corresponding first-category sample data can be obtained based on the operation data to be processed, so that the subsequent new operation data does not need to wait for the triggering of the conversion operation.
[0144] In the recommendation scenario, click-through rate (CTR) is the most important indicator. In order to improve the conversion rate (CVR) while ensuring the stability of the click-through rate, the following two methods can be used, but are not limited to: the first method is to model the conversion rate alone, and then obtain the corresponding recommendation score by weighted summing it with the click target; the second method is to use multi-objective modeling, that is, to model the mixed goal of click-conversion. Considering the time consumption of online inference and other resource consumption, multi-objective modeling can be used. The following is an example of multi-objective modeling.
[0145] See also Figure 7 As shown, it is a flow chart of a model training method provided in an embodiment of the present application. The method can be applied to an electronic device, which can be a terminal device or a server. The specific process is as follows:
[0146] S701: Obtain a sample data set.
[0147] It should be noted that, in the embodiment of the present application, the sample data in the sample data set includes one or more items of first sample data, second category sample data, and third category sample data.
[0148] S702. Based on the sample data set, an initial prediction model for outputting a click-through conversion rate prediction value is trained to obtain a target prediction model, wherein the initial prediction model includes a click-through rate prediction sub-model and a conversion rate prediction sub-model, and the click-through conversion rate prediction value is obtained based on the click-through rate prediction value output by the click-through rate prediction sub-model and the conversion rate prediction value output by the conversion rate prediction sub-model.
[0149] See also Figure 8As shown, the initial prediction model includes an embedding layer, a pooling layer, a click-through rate branch, and a conversion rate branch, wherein the embedding layer includes an embedding vector representation of each domain, and each domain includes but is not limited to an operation object, multimedia information, and a publishing object. The click-through rate branch and the conversion rate branch share the underlying embedding layer. In the click-through rate branch, a click-through rate prediction submodel is used to output a click-through rate prediction value. In the conversion rate branch, a conversion rate prediction submodel is used to output a conversion rate prediction value. Based on the click-through rate prediction value and the conversion rate prediction value, a click-to-conversion rate prediction value can be obtained.
[0150] The click rate prediction sub-model and the conversion rate prediction sub-model can use deep neural networks with different structures, such as factorization machines (FM), multi-layer perceptron (MLP), etc., but are not limited to these.
[0151] In the following, P t Represents the click rate prediction value, using P v Represents the predicted value of conversion rate, using P tv represents the predicted value of click-through conversion rate, where P t , P v , P tv The relationship between is shown in formula (3).
[0152] P tv =P t *P v Formula (3)
[0153] To alleviate the problem of inconsistent online and offline distribution caused by sampling, see Fig. 9 As shown, in the process of executing S702, for each sample data included in the sample data set, the following operations are iteratively performed:
[0154] S901, obtain sample data x, and input the sample data x into the initial prediction model to obtain the click-through conversion rate prediction value and click-through rate prediction value corresponding to the sample data x. The sample data x can be any sample data in the sample data set.
[0155] S902. Determine the click-to-conversion rate loss based on the click-to-conversion rate prediction value corresponding to the sample data x, determine the click-to-conversion rate loss based on the click-to-rate prediction value corresponding to the sample data x, and obtain the model loss value based on the click-to-conversion rate loss and the click-to-conversion rate loss.
[0156] Specifically, refer to formula (4), the model loss value Loss of click-through rate and loss of click-through conversion rate It consists of two parts, where λ represents the weight of the click-through conversion rate loss:
[0157]
[0158] In some embodiments, the click-through rate loss can be determined in the following manner: based on the click-through rate prediction value corresponding to the sample data x, determine the non-click probability corresponding to the sample data x; then, based on the first weight corresponding to the click-through rate prediction value and the second weight corresponding to the non-click probability, determine the click-through rate loss.
[0159] The first weight is determined based on the sample distribution information of the sample data whose operation type is a conversion operation, and the second weight is determined based on the sample distribution information of the sample data whose operation type is a non-conversion operation.
[0160] Specifically, click-through rate loss It can be calculated by the following formula (5):
[0161]
[0162] Among them, Y t For the true value of the sample, They are Y t =1 and Y t =0, that is, the first weight and the second weight. t =1 indicates triggering click operation, Y t =0 indicates that the click operation is not triggered.
[0163] Through the above implementation method, since the data distribution of the CTR branch is corrected, the problem of inconsistent online and offline distribution caused by sampling can be alleviated, thereby ensuring the model training effect and improving the model accuracy.
[0164] In some embodiments, the click-through conversion rate loss may be determined in the following manner:
[0165] Based on the click-through conversion rate prediction value corresponding to the sample data x, determine the non-click conversion probability corresponding to the sample data x; based on the third weight corresponding to the click-through conversion rate prediction value and the fourth weight corresponding to the non-click conversion probability, determine the click-through conversion rate loss.
[0166] The third weight is determined based on the sample distribution information of the sample data whose operation type is a click operation, and the fourth weight is determined based on the sample distribution information of the sample data whose operation type is an exposure operation.
[0167] Specifically, click-through conversion rate loss It can be calculated by the following formula (6):
[0168]
[0169] Among them, Y tv For the true value of the sample, They are Y tv =1 and Y tv =0, that is, the first weight and the second weight. tv =1 indicates triggering the conversion operation, Y tv =0 indicates that no conversion operation is triggered.
[0170] Through the above implementation method, since the data distribution of the conversion rate branch is corrected, the problem of inconsistent online and offline distribution caused by sampling can be alleviated, thereby ensuring the model training effect and improving the model accuracy.
[0171] S903: Adjust the model parameters of the initial prediction model based on the model loss value.
[0172] Next, the calculation process of the IW coefficient is described.
[0173] After completing the sample construction, not only the distribution of conversion samples has changed, but also the distribution of click samples may have changed, where conversion samples refer to sample data where conversion operations have occurred, and click samples refer to sample data where click operations have occurred. Therefore, the sample distributions of the click-through rate branch and the click-through conversion rate (CTCVR) branch can be calculated separately, so that the optimization direction of CTR and CTCVR conforms to the online distribution. In the following derivation, the superscript "V" represents the sampled sample, and the superscript "T" represents the real sample (online distribution). In the sampled sample, the distribution of CTR=1 is expressed as P V (t=1), the distribution of CTCVR=1 is expressed as P V (tv=1), and so on.
[0174] For the CTR branch, for the two cases of CVR=0 and CVR=1, either two (1,0) samples are input, or one (1,0) sample plus one (1,1) sample is input. Therefore, it can be inferred that P V (t=1) and P T (t=1), we can see that the distribution of CTR has not changed:
[0175]
[0176] Similarly, P V (t=1) and P V The distribution of (t=0) is also consistent, so for the CTR branch:
[0177] For the CTCVR branch, PV With P T The relationship is derived as follows:
[0178]
[0179]
[0180] thus, You can use 1-P tv To approximate P T (tv=0), we can finally get: [.] indicates gradient truncation to avoid P tv The relevant network parameters are affected.
[0181] After outputting the target prediction model, the P tv As the recommendation score of the multimedia information, all candidate multimedia information are sorted to determine the recommended target multimedia information.
[0182] During the experiment, the data processing method mentioned in this application is called the Backward algorithm. As a comparison, a Forward algorithm is designed for comparison. In the Forward algorithm, the corresponding click sample is placed in the sample pool only when the conversion operation is triggered. The type label of the click sample is (1, 1). At the same time, a waiting time window is set, and the type label of the click sample that has not triggered the conversion behavior within the time window is marked with (1, 0). The Forward algorithm and the Backward algorithm use the same prediction model. In addition, the reference model (baseline) is set to a model trained only with CTR as the target, named the Base algorithm.
[0183] An AB experiment was conducted in the subscription account picture and text recommendation scenario with a 7-day cycle. The Forward and Backward algorithms were both 5% of the experimental traffic, while the Base algorithm was 10% of the experimental traffic. The evaluation indicators included: exposure click rate, that is, the total number of clicks divided by the total number of exposures; conversion rate, that is, the number of authors who had conversion operations divided by the total number of publishing objects associated with the exposed multimedia information. See Table 1 for the experimental results. It should be noted that the data recorded in the table is a change relative to the Base algorithm:
[0184] Table 1 Experimental results
[0185] Model Exposure click rate Conversion rate Base - - Forward -1.12% +2.1% Backward -0.11% +2.0%
[0186] As shown in Table 1, since Forward and Backward use a model based on multi-objective modeling to optimize the conversion target, the conversion rate is significantly improved compared to the Base model; for the exposure click rate indicator, since the Forward algorithm cannot update the CTR branch in time, while the Backward algorithm can update the CTR branch in time, the Backward and Base are basically the same, while the Forward has a significant drop of 1.12%; in addition, since the delayed feedback algorithm is used to correct the objective function of the Backward algorithm, the problem of inconsistent online and offline distribution caused by sampling is alleviated. Therefore, for the conversion rate indicator, the Backward algorithm is basically the same as the Forward algorithm. In summary, the Backward algorithm can significantly improve the conversion rate without sacrificing the click rate indicator.
[0187] The data processing method of the present application is described below in conjunction with specific embodiments.
[0188] Take the target application scenario as an example, see Fig.10 As shown, the designated operation is a repurchase operation, that is, a click operation. Based on the click operation on video 1 in the target application scenario, the processing operation data 3 is obtained. The operation data 3 to be processed includes data identification information and operation type. Among them, in the data identification information of the operation data 3 to be processed, the operation object identification information represents that the operation object is the account "Li Si", the content identification information represents video 1, and the publishing object identification information represents that the publishing object of video 1 is the account "Wang Wu".
[0189] The operation type of the pending operation data 3 is a click operation. After the type tag (1, 0) is set for the pending operation data 3, the pending operation data 3 obtained after the type tag (1, 0) is set is used as a (1, 0) sample data. In addition, each candidate historical click data corresponding to the target application scenario is obtained from the cache pool. Each candidate historical click data includes: historical click data 5 and historical click data 6. Among them, historical click data 5 is obtained after the account "Li Si" clicks on the video 2 released by the account "Wang Wu", and historical click data 6 is obtained after the account "Li Si" clicks on the video 3 released by the account "Zhang San".
[0190] Based on the data identification information contained in the operation data 3 to be processed and each candidate historical click data, the target historical click data corresponding to the operation data 3 to be processed is screened out from each candidate historical click data, as the historical click data 5. Then, for the historical click data 5, the type label (1, 1) is set, and the historical click data 5 obtained after setting the type label (1, 1) is used as a (1, 1) sample data.
[0191] Obviously, for the operation data 3 to be processed, a (1, 0) sample data and a (1, 1) sample data can be obtained, wherein the (1, 0) sample data is the operation data 3 to be processed obtained after setting the type label (1, 0), and the (1, 1) sample data is the historical click data 5 obtained after setting the type label (1, 1).
[0192] Taking the target application scenario as the information recommendation scenario in social software as an example, and the designated operation as the comment operation as an example, based on the triggered comment operation on information 1 with content x as social news, the processed operation data 4 is obtained. The operation data 4 to be processed includes data identification information and operation type. Among them, in the data identification information of the operation data 4 to be processed, the operation object identification information represents that the operation object is the account "Li Si", the content identification information represents information 1, and the publishing object identification information represents that the publishing object of information 1 is the account "Wang Wu".
[0193] The operation type of the pending operation data 4 is a comment operation. After the type label (1, 0) is set for the pending operation data 4, the pending operation data 4 with the type label (1, 0) is used as a (1, 0) sample data. In addition, each candidate historical click data corresponding to the target application scenario is obtained. Each candidate historical click data includes: historical click data 7 and historical click data 8. Among them, historical click data 7 is obtained after the account "Li Si" clicks on the funny article published by the account "Zhang Si", and historical click data 8 is obtained after the account "Li Si" clicks on the information 2 published by the account "Wang Wu".
[0194] Based on the data identification information contained in the operation data 4 to be processed and each candidate historical click data, the target historical click data corresponding to the operation data 4 to be processed is screened out from each candidate historical click data, as the historical click data 8. Then, for the historical click data 8, the type label (1, 1) is set, and the historical click data 8 obtained after setting the type label (1, 1) is used as a (1, 1) sample data.
[0195] Obviously, for the operation data 4 to be processed, a (1, 0) sample data and a (1, 1) sample data can also be obtained, wherein the (1, 0) sample data is the operation data 4 to be processed obtained after setting the type label (1, 0), and the (1, 1) sample data is the historical click data 8 obtained after setting the type label (1, 1).
[0196] Based on the same inventive concept, the present application embodiment provides a data processing device. Fig.11 As shown, it is a schematic diagram of the structure of the data processing device 1100, which may include:
[0197] A trigger unit 1101 is used to obtain operation data to be processed based on a trigger operation on target multimedia information in a target application scenario, wherein the operation data to be processed includes data identification information and an operation type;
[0198] An acquiring unit 1102 is configured to acquire each candidate historical click data corresponding to the target application scenario when it is determined that the operation type is a specified operation, each candidate historical click data including corresponding data identification information;
[0199] A screening unit 1103 is used to screen out target historical click data corresponding to the operation data to be processed from the candidate historical click data based on the data identification information respectively included in the operation data to be processed and the candidate historical click data;
[0200] The calibration unit 1104 is used to set a first type of label for the target historical click data, and use the target historical click data obtained after setting the label as the first type of sample data. The first type of label is used to characterize that a conversion operation is triggered after a click operation is triggered on the target multimedia information.
[0201] As a possible implementation manner, the calibration unit 1104 is further configured to:
[0202] If it is determined that the operation type is a specified operation, a second type label is set for the operation data to be processed, and the operation data to be processed obtained after setting the second type label is used as the second type of sample data, wherein the second type label is used to characterize that after a click operation is triggered on the target multimedia information, no conversion operation is triggered.
[0203] As a possible implementation manner, the calibration unit 1104 is further configured to:
[0204] If it is determined that the operation type is an exposure operation, a third type tag is set for the operation data to be processed; wherein the third type tag is used to indicate that no click operation is triggered for the target multimedia information;
[0205] Based on the operation data to be processed obtained after setting the third type of label, at least one third type of sample data is obtained.
[0206] As a possible implementation, when acquiring each candidate historical click data corresponding to the target application scenario, the acquiring unit 1102 is specifically configured to:
[0207] Each candidate historical click data corresponding to the target application scenario is obtained from the designated cache area, wherein in the designated cache area, the cache duration of each candidate historical click data is not greater than a preset cache duration threshold.
[0208] As a possible implementation manner, the calibration unit 1104 is further configured to:
[0209] The to-be-processed operation data is stored in the designated cache area as new historical click data;
[0210] When it is determined that the operation data to be processed meets the preset removal condition, the operation data to be processed is removed from the designated cache area.
[0211] As a possible implementation manner, when it is determined that the operation data to be processed meets the preset removal condition, the calibration unit 1104 is specifically used to:
[0212] When the cache time length of the operation data to be processed is greater than the cache time length threshold, determining that the operation data to be processed meets the preset removal condition; or,
[0213] When there is a corresponding relationship between the operation data to be processed and the new operation data to be processed, it is determined that the operation data to be processed meets the preset removal condition.
[0214] As a possible implementation, a training unit 1105 is further included, and the training unit 1105 is used to:
[0215] Get a sample data set;
[0216] Based on the sample data set, an initial prediction model for outputting click-through conversion rate prediction values is trained to obtain a target prediction model, wherein the initial prediction model includes a click-through rate prediction sub-model and a conversion rate prediction sub-model, and the click-through conversion rate prediction value is obtained based on the click-through rate prediction value output by the click-through rate prediction sub-model and the conversion rate prediction value output by the conversion rate prediction sub-model.
[0217] As a possible implementation, based on the sample data set, the initial prediction model for outputting the click-through conversion rate prediction value is trained to obtain the target prediction model, and the training unit 1105 is specifically used to:
[0218] For each sample data included in the sample data set, the following operations are iteratively performed:
[0219] Obtaining a sample data from the sample data set, and inputting the sample data into the initial prediction model to obtain a click-through conversion rate prediction value and a click-through rate prediction value corresponding to the sample data;
[0220] Determine the click-to-conversion rate loss based on the click-to-conversion rate prediction value corresponding to the one sample data, determine the click-to-conversion rate loss based on the click-to-rate prediction value corresponding to the one sample data, and obtain the model loss value based on the click-to-conversion rate loss and the click-to-conversion rate loss;
[0221] Based on the model loss value, the model parameters of the initial prediction model are adjusted.
[0222] As a possible implementation manner, when determining the click rate loss based on the click rate prediction value corresponding to the one sample data, the training unit 1105 is specifically used to:
[0223] Determining a non-click probability corresponding to the sample data based on a click rate prediction value corresponding to the sample data;
[0224] The click rate loss is determined based on a first weight corresponding to the click rate prediction value and a second weight corresponding to the non-click probability; wherein the first weight is determined based on sample distribution information of sample data whose operation type is conversion operation, and the second weight is determined based on sample distribution information of sample data whose operation type is non-conversion operation.
[0225] As a possible implementation manner, when determining the click-through conversion rate loss based on the click-through conversion rate prediction value corresponding to the one sample data, the training unit 1105 is specifically configured to:
[0226] Determining a non-click conversion probability corresponding to the sample data based on a click-through conversion rate prediction value corresponding to the sample data;
[0227] Based on the third weight corresponding to the click-conversion rate prediction value and the fourth weight corresponding to the non-click conversion probability, the click-conversion rate loss is determined; wherein the third weight is determined based on the sample distribution information of the sample data whose operation type is click operation, and the fourth weight is determined based on the sample distribution information of the sample data whose operation type is exposure operation.
[0228] As a possible implementation manner, the data identification information at least includes an operation object identification and a publishing object identification;
[0229] When the target historical click data corresponding to the operation data to be processed is screened out from the candidate historical click data based on the data identification information respectively included in the operation data to be processed and the candidate historical click data, the screening unit 1103 is specifically used to:
[0230] From the candidate historical click data, select candidate historical click data whose operation object identifier is the same as the operation object identifier of the operation data to be processed and whose publishing object identifier is the same as the publishing object identifier of the operation data to be processed;
[0231] The screened candidate historical click data are used as the target historical click data corresponding to the operation data to be processed.
[0232] Based on the same inventive concept, the embodiment of the present application also provides an electronic device. In one embodiment, the electronic device can be a server or a terminal device. Fig.12 As shown, it is a schematic diagram of the structure of a possible electronic device provided in an embodiment of the present application, Fig.12 In the embodiment, the electronic device 1200 includes: a processor 1210 and a memory 1220.
[0233] The memory 1220 stores a computer program that can be executed by the processor 1210 , and the processor 1210 can perform the steps of the above-mentioned data processing method by executing the instructions stored in the memory 1220 .
[0234] The memory 1220 may be a volatile memory, such as a random-access memory (RAM); the memory 1220 may also be a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 1220 may be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1220 may also be a combination of the above memories.
[0235] The processor 1210 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 1210 is configured to implement the above data processing method when executing a computer program stored in the memory 1220 .
[0236] In some embodiments, the processor 1210 and the memory 1220 may be implemented on the same chip. In some embodiments, they may also be implemented on separate chips.
[0237] The specific connection medium between the processor 1210 and the memory 1220 is not limited in the embodiment of the present application. In the embodiment of the present application, the processor 1210 and the memory 1220 are connected via a bus as an example. Fig.12 The connections between the other components are only for illustration and are not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Fig.12 The diagram shows that only one thick line is used, but this does not mean that there is only one bus or only one type of bus.
[0238] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to perform the steps of the above-mentioned data processing method. In some possible implementations, various aspects of the data processing method provided by the present application can also be implemented in the form of a program product, which includes a computer program. When the program product is run on an electronic device, the computer program is used to enable the electronic device to perform the steps in the above-mentioned data processing method. For example, the electronic device can perform the following steps: Figure 2 Follow the steps shown in .
[0239] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (Compact Disk Read Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0240] The program product of the embodiment of the present application may adopt a CD-ROM and include a computer program, and can be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a computer program, which may be used by or in combination with a command execution system, apparatus or device.
[0241] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a computer program for use by or in conjunction with a command execution system, apparatus, or device.
[0242] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0243] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data processing method, characterized in that: The method comprises: Based on a trigger operation for target multimedia information in a target application scenario, to-be-processed operation data is obtained, wherein the to-be-processed operation data includes data identification information and an operation type, wherein the data identification information includes at least an operation object identification and a publishing object identification; the target multimedia information is text, video, audio or advertisement; When it is determined that the operation type is a conversion operation, each candidate historical click data corresponding to the target application scenario is obtained, each candidate historical click data contains corresponding data identification information; the conversion operation refers to: a specified operation triggered after the click operation is triggered; Filter out, from the various candidate historical click data, candidate historical click data whose operation object identifier is the same as the operation object identifier of the operation data to be processed, and whose publishing object identifier is the same as the publishing object identifier of the operation data to be processed, and use the filtered candidate historical click data as the target historical click data corresponding to the operation data to be processed; For the target historical click data, a first type of tag is set, and the target historical click data obtained after the tag is set is used as the first type of sample data, wherein the first type of tag is used to indicate that a conversion operation is triggered after a click operation is triggered on the target multimedia information; Obtain a sample data set, where the sample data set includes the first type of sample data; Based on the sample data set, an initial prediction model for outputting a click-through conversion rate prediction value is trained to obtain a target prediction model; wherein the initial prediction model includes a click-through rate prediction sub-model and a conversion rate prediction sub-model, and the click-through conversion rate prediction value is obtained based on a click-through rate prediction value output by the click-through rate prediction sub-model and a conversion rate prediction value output by the conversion rate prediction sub-model; The step of training an initial prediction model for outputting a click-through conversion rate prediction value based on the sample data set to obtain a target prediction model includes: For each sample data included in the sample data set, the following operations are iteratively performed: Obtaining a sample data from the sample data set, and inputting the sample data into the initial prediction model to obtain a click-through conversion rate prediction value and a click-through rate prediction value corresponding to the sample data; Based on the click-through conversion rate prediction value corresponding to the one sample data, determine the non-click conversion probability corresponding to the one sample data, and based on the third weight corresponding to the click-through conversion rate prediction value and the fourth weight corresponding to the non-click conversion probability, determine the click-through conversion rate loss; wherein the third weight is determined based on the sample distribution information of the sample data whose operation type is the click operation, and the fourth weight is determined based on the sample distribution information of the sample data whose operation type is the exposure operation; Based on the click rate prediction value corresponding to the one sample data, the click rate loss is determined, and based on the click rate loss and the click rate loss, a model loss value is obtained.
2. The method according to claim 1, characterized in that Also includes: If it is determined that the operation type is a click operation, a second type label is set for the operation data to be processed, and the operation data to be processed obtained after setting the second type label is used as the second type of sample data, wherein the second type label is used to characterize that after the click operation is triggered for the target multimedia information, no conversion operation is triggered.
3. The method according to claim 1, characterized in that Also includes: If it is determined that the operation type is an exposure operation, a third type tag is set for the operation data to be processed; wherein the third type tag is used to indicate that no click operation is triggered for the target multimedia information; Based on the operation data to be processed obtained after setting the third type of label, at least one third type of sample data is obtained.
4. The method according to claim 1, 2 or 3, characterized in that: The obtaining of each candidate historical click data corresponding to the target application scenario includes: Each candidate historical click data corresponding to the target application scenario is obtained from the designated cache area, wherein in the designated cache area, the cache duration of each candidate historical click data is not greater than a preset cache duration threshold.
5. The method according to claim 4, characterized in that Also includes: The to-be-processed operation data is stored in the designated cache area as new historical click data; When it is determined that the operation data to be processed meets the preset removal condition, the operation data to be processed is removed from the designated cache area.
6. The method according to claim 5, characterized in that The determining that the to-be-processed operation data meets a preset removal condition includes: When the cache time length of the operation data to be processed is greater than the cache time length threshold, determining that the operation data to be processed meets the preset removal condition; or, When there is a corresponding relationship between the operation data to be processed and the new operation data to be processed, it is determined that the operation data to be processed meets the preset removal condition.
7. The method according to claim 1, 2 or 3, characterized in that: The step of determining the click rate loss based on the click rate prediction value corresponding to the one sample data includes: Determining a non-click probability corresponding to the sample data based on a click rate prediction value corresponding to the sample data; The click rate loss is determined based on a first weight corresponding to the click rate prediction value and a second weight corresponding to the non-click probability; wherein the first weight is determined based on sample distribution information of sample data whose operation type is conversion operation, and the second weight is determined based on sample distribution information of sample data whose operation type is non-conversion operation.
8. A data processing device, characterized in that: include: A trigger unit, configured to obtain operation data to be processed based on a trigger operation for target multimedia information in a target application scenario, wherein the operation data to be processed includes data identification information and an operation type, wherein the data identification information includes at least an operation object identification and a publishing object identification; the target multimedia information is text, video, audio or advertisement; An acquisition unit, for acquiring each candidate historical click data corresponding to the target application scenario when it is determined that the operation type is a conversion operation, each candidate historical click data containing corresponding data identification information; the conversion operation refers to: a specified operation triggered after the click operation is triggered; A screening unit, used to screen out, from the candidate historical click data, candidate historical click data whose operation object identifier is the same as the operation object identifier of the operation data to be processed and whose publishing object identifier is the same as the publishing object identifier of the operation data to be processed, and use the screened candidate historical click data as the target historical click data corresponding to the operation data to be processed; a calibration unit, configured to set a first type of label for the target historical click data, and use the target historical click data obtained after setting the label as first type of sample data, wherein the first type of label is used to indicate that a conversion operation is triggered after a click operation is triggered on the target multimedia information; A training unit, used for obtaining a sample data set, wherein the sample data set includes a first type of sample data; Based on the sample data set, an initial prediction model for outputting a click-through conversion rate prediction value is trained to obtain a target prediction model; wherein the initial prediction model includes a click-through rate prediction sub-model and a conversion rate prediction sub-model, and the click-through conversion rate prediction value is obtained based on a click-through rate prediction value output by the click-through rate prediction sub-model and a conversion rate prediction value output by the conversion rate prediction sub-model; The step of training an initial prediction model for outputting a click-through conversion rate prediction value based on the sample data set to obtain a target prediction model includes: For each sample data included in the sample data set, the following operations are iteratively performed: Obtaining a sample data from the sample data set, and inputting the sample data into the initial prediction model to obtain a click-through conversion rate prediction value and a click-through rate prediction value corresponding to the sample data; Based on the click-through conversion rate prediction value corresponding to the one sample data, determine the non-click conversion probability corresponding to the one sample data, and based on the third weight corresponding to the click-through conversion rate prediction value and the fourth weight corresponding to the non-click conversion probability, determine the click-through conversion rate loss; wherein the third weight is determined based on the sample distribution information of the sample data whose operation type is the click operation, and the fourth weight is determined based on the sample distribution information of the sample data whose operation type is the exposure operation; Based on the click rate prediction value corresponding to the one sample data, the click rate loss is determined, and based on the click rate loss and the click rate loss, a model loss value is obtained.
9. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: It includes a computer program, and when the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the method described in any one of claims 1 to 7.
11. A computer program product, characterized in that It includes a computer program, which is stored in a computer-readable storage medium. A processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device performs the steps of the method described in any one of claims 1 to 7.
