Training method, recommendation method, device and electronic device for click rate prediction model
By using zero-normal regular terms and backpropagation to update weight parameters in the click-through rate prediction model, the problems of poor sparsity of weight parameters and large model size are solved, and the applicability of the model on memory finite devices is improved.
Patent Information
- Application Number
- CN201910673756.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-24
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2039-10-25
AI Technical Summary
The existing click-through rate prediction model has poor sparsity and large model file size during training, resulting in limited performance or inability to use on devices with limited memory, and low applicability.
By obtaining sample features and click results, initializing the click-through rate prediction model, using zero-normal regular terms to build the objective function, backpropagate errors to update the weight parameters, and retain non-zero values and corresponding dimensions to improve the sparsity of the weight parameters and the model applicability.
It improves the sparsity of weight parameters, reduces the size of model files, improves the applicability of click-through rate prediction, and ensures that the model can operate normally on devices with limited memory.
Smart Images

Figure CN110378434B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to artificial intelligence technology, and in particular to a training method, a recommendation method, a device, an electronic device and a storage medium for a click rate prediction model. Background Art
[0002] 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. Machine Learning (ML) is a multi-disciplinary interdisciplinary subject, the core of AI, and the fundamental way to make computers intelligent. Its applications are in various fields.
[0003] Click-through rate prediction is an important application branch of machine learning. For content data providers, click-through rate prediction is usually performed on various content data to ensure that the pushed content data meets user preferences, such as recommending beauty ads to users who prefer beauty products.
[0004] In the click-through rate prediction model solution provided by the related technology, the sparsity of the trained weight parameters is poor, and the size of the model file is large. When the device where the model is deployed has limited memory, the model may be limited in performance or even unusable, and its applicability for click-through rate prediction is low. Summary of the invention
[0005] The embodiments of the present invention provide a training method, a recommendation method, a device, an electronic device and a storage medium for a click-through rate prediction model, which can improve the sparsity of weight parameters, reduce the model volume and improve the applicability of click-through rate prediction.
[0006] The technical solution of the embodiment of the present invention is achieved as follows:
[0007] An embodiment of the present invention provides a method for training a click rate prediction model, comprising:
[0008] Obtain sample features and the user's click results corresponding to the sample features;
[0009] Initialize the click rate prediction model according to the set weight parameters;
[0010] Processing the sample features through the click rate prediction model to obtain a predicted click rate;
[0011] constructing an objective function according to an error between the click result and the predicted click rate, and a zero-norm regularization term;
[0012] The error is back-propagated in the click-through rate prediction model through the objective function, and the weight parameters of the click-through rate prediction model are updated during the propagation process.
[0013] The above scheme also includes:
[0014] The non-zero values and corresponding dimensions in the updated weight parameters are retained.
[0015] In the above solution, the obtaining of sample features and the sample features corresponding to the user's click results include:
[0016] Obtain sample features and the user's click results corresponding to the sample features from the database; or,
[0017] Obtain sample features from online data streams and the sample features corresponding to the user's click results.
[0018] The embodiment of the present invention provides a recommendation method based on a click rate prediction model, comprising:
[0019] Obtain user data and at least two content data;
[0020] Combining each of the content data with the user data in a one-to-one correspondence, and performing feature extraction on the combined data to obtain object features;
[0021] Processing the object features through the click rate prediction model to obtain a predicted click rate;
[0022] Recommend content data corresponding to the predicted click rate that meets the click rate value conditions.
[0023] An embodiment of the present invention provides a training device for a click rate prediction model, comprising:
[0024] An acquisition module, used to acquire sample features and the click results of the user corresponding to the sample features;
[0025] An initialization module is used to initialize the click rate prediction model according to the set weight parameters;
[0026] A processing module, used for processing the sample features through the click rate prediction model to obtain a predicted click rate;
[0027] A construction module, used for constructing an objective function according to an error between the click result and the predicted click rate, and a zero-norm regularization term;
[0028] An updating module is used to back-propagate the error in the click-through rate prediction model through the objective function, and to update the weight parameters of the click-through rate prediction model during the propagation process.
[0029] In the above solution, the training device of the click rate prediction model further includes:
[0030] The model updating module is used to retain the non-zero values and corresponding dimensions in the updated weight parameters.
[0031] In the above solution, the acquisition module is also used for:
[0032] Obtain sample features and the user's click results corresponding to the sample features from the database; or,
[0033] Obtain sample features from online data streams and the sample features corresponding to the user's click results.
[0034] An embodiment of the present invention provides a recommendation device based on a click rate prediction model, comprising:
[0035] A data acquisition module, used to acquire user data and at least two content data;
[0036] A feature extraction module, used to combine the content data with the user data in a one-to-one correspondence, and perform feature extraction on the combined data to obtain object features;
[0037] A click rate prediction module, used for processing the object features through the click rate prediction model to obtain a predicted click rate;
[0038] The recommendation module is used to recommend content data corresponding to the predicted click rate that meets the click rate value conditions.
[0039] An embodiment of the present invention provides an electronic device, including:
[0040] A memory for storing executable instructions;
[0041] The processor is used to implement the training method of the click-through rate prediction model or the recommendation method based on the click-through rate prediction model provided by the embodiment of the present invention when executing the executable instructions stored in the memory.
[0042] An embodiment of the present invention provides a storage medium storing executable instructions for causing a processor to execute and implement a training method for a click-through rate prediction model provided by an embodiment of the present invention, or a recommendation method based on a click-through rate prediction model.
[0043] The embodiments of the present invention have the following beneficial effects:
[0044] The embodiment of the present invention processes sample features according to an initialized click-through rate prediction model to obtain a predicted click-through rate, constructs an objective function according to the error between the existing click result and the predicted click-through rate, and a zero-norm regularization term, back-propagates the error according to the objective function, and updates the weight parameters of the click-through rate prediction model during the propagation process, thereby improving the sparsity of the updated weight parameters, reducing the file size of the click-through rate prediction model, and improving the applicability of the click-through rate prediction for various electronic devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is an optional architecture diagram of a training system 100 for a click rate prediction model provided in an embodiment of the present invention;
[0046] Figure 2A is an optional architecture diagram of the server 200 provided in an embodiment of the present invention;
[0047] Figure 2B is another optional architecture diagram of the server 200 provided in an embodiment of the present invention;
[0048] Figure 3 It is an optional flow chart of a training method of a click rate prediction model provided by an embodiment of the present invention;
[0049] Figure 4 is another optional flow chart of the training method of the click rate prediction model provided by the embodiment of the present invention;
[0050] Figure 5 This is an optional flow chart of a recommendation method based on a click rate prediction model provided by an embodiment of the present invention;
[0051] Figure 6 It is an optional architecture diagram of a click rate prediction system provided by an embodiment of the present invention;
[0052] Figure 7 It is an optional architectural diagram of a model training module provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.
[0054] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0055] In the following description, the terms "first\second" are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.
[0057] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are described. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.
[0058] 1) Click results: refers to existing results that have been clicked or not.
[0059] 2) Predicted click-through rate: refers to the predicted probability of the content data being clicked by the user. A function is usually used to obtain the predicted click-through rate.
[0060] 3) Weight parameter: refers to a set of parameters that determine the click rate prediction function, usually in vector form.
[0061] 4) Sample features: The interactive information between user data and content data is quantified to obtain multiple features, and multiple features are represented by multi-dimensional vectors. The multi-dimensional vectors are sample features, and the same is true for object features.
[0062] 5) Gradient: refers to the fastest descent (or ascent) direction of the defined objective function.
[0063] 6) Forward propagation: refers to the process of inputting features into the machine learning model to obtain prediction results.
[0064] 7) Backpropagation: refers to the process of updating the parameters in the machine learning model based on the error between the actual result and the predicted result corresponding to the feature, using the defined objective function, so that the subsequent error is gradually reduced.
[0065] The inventors found in the process of implementing the present invention that in order to recommend content data to users in a targeted manner, machine learning methods are usually applied, that is, the model is trained based on historical data, and the click rate of whether the user clicks on the content data is predicted by the model. In the solution provided by the related art, the objective function is usually constructed based on the one-norm regularization term and the two-norm regularization term to regularize the model. However, in the click rate prediction scenario, the dimension of the object features is usually high, and some can even reach the billion level. If the model is trained according to the above method, the sparsity of the weight parameters finally obtained is poor, and the size of the model file is large. In the case of limited memory, such as when the model is deployed to a mobile terminal, the performance of the model may be limited or even unusable.
[0066] Embodiments of the present invention provide a training method, a recommendation method, an apparatus, an electronic device, and a storage medium for a click-through rate prediction model, which can improve the sparsity of weight parameters, reduce the size of model files, and improve the applicability of click-through rate prediction. The following describes an exemplary application of the electronic device provided by an embodiment of the present invention.
[0067] See also Figure 1 , Figure 1 It is an optional architectural diagram of a training system 100 for a click-through rate prediction model provided in an embodiment of the present invention. To implement a training application supporting a click-through rate prediction model, a terminal 400 (terminal 400-1 and terminal 400-2 are shown as examples) is connected to a database 500 via a network 300, and sample features and click-through rates are stored in the database 500. The terminal 400 can also be connected to a server 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. The server 200 obtains data from the database 500 by connecting to the database 500.
[0068] Server 200 is used to obtain sample features and the click results of the user corresponding to the sample features; initialize the click rate prediction model according to the set weight parameters; process the sample features through the click rate prediction model to obtain the predicted click rate; construct an objective function according to the error between the click result and the predicted click rate, and the zero-norm regularization term; back-propagate the error in the click rate prediction model through the objective function, and update the weight parameters of the click rate prediction model during the propagation process.
[0069] Terminal 400( Figure 1The terminal 400-1 and the terminal 400-2 are exemplarily shown in the figure for sending user data to the server; the server 200 is also used to obtain user data and at least two content data, wherein the content data can be generated by a specific content platform; each of the content data is combined with the user data in a one-to-one correspondence, and feature extraction is performed on the combined data to obtain object features; the object features are processed by the click-through rate prediction model to obtain a predicted click-through rate; content data corresponding to the predicted click-through rate that meets the click-through rate value condition is recommended; the terminal 400 exemplarily displays the content data recommended by the server 200 in a list form in the graphical interface 410 (graphical interface 410-1 and graphical interface 410-2 are exemplarily shown).
[0070] It is worth noting that in Figure 1 In the example, the server 200 obtains sample features and the sample features corresponding to the user's click results from the database 500. Of course, it is not limited to this. The server 200 can also directly obtain sample features and the sample features corresponding to the user's click results from the online data stream of the terminal 400.
[0071] The following describes an exemplary application of an electronic device provided by an embodiment of the present invention. The electronic device can be implemented as various types of terminal devices such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device), and can also be implemented as a server. The following description takes the electronic device as a server as an example.
[0072] See also Figure 2A , Figure 2A The server 200 provided in the embodiment of the present invention (for example, it may be Figure 1 The server 200 shown in FIG. Figure 2A The server 200 shown includes: at least one processor 210, a memory 250, at least one network interface 220 and a user interface 230. The various components in the server 200 are coupled together via a bus system 240. It is understood that the bus system 240 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 240 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 240 is not described in detail. Figure 2A Various buses are labeled as bus system 240 .
[0073] The processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0074] The user interface 230 includes one or more output devices 231 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 230 also includes one or more input devices 232, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0075] The memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 250 may optionally include one or more storage devices that are physically remote from the processor 210.
[0076] The memory 250 includes a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. The nonvolatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 250 described in the embodiment of the present invention is intended to include any suitable type of memory.
[0077] In some embodiments, memory 250 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0078] Operating system 251, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0079] A network communication module 252, used to reach other computing devices via one or more (wired or wireless) network interfaces 220, exemplary network interfaces 220 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB);
[0080] a presentation module 253 for enabling presentation of information via one or more output devices 231 (e.g., display screen, speaker, etc.) associated with the user interface 230 (e.g., a user interface for operating peripherals and displaying content and information);
[0081] The input processing module 254 is used to detect one or more user inputs or interactions from one of the one or more input devices 232 and translate the detected inputs or interactions.
[0082] In some embodiments, the training device for the click rate prediction model provided by the embodiments of the present invention can be implemented in software. Figure 2A A training device 2550 for a click rate prediction model stored in a memory 250 is shown, which may be software in the form of a program or plug-in, including the following software modules: an acquisition module 25501, an initialization module 25502, a processing module 25503, a construction module 25504, and an update module 25505. These modules are logical and can therefore be arbitrarily combined or further split according to the functions implemented.
[0083] In some embodiments, the recommendation device based on the click rate prediction model provided in the embodiment of the present invention can also be implemented in a software manner, see Figure 2B , Figure 2B Except for the recommendation device 2551 based on the click rate prediction model shown, the rest are the same as Figure 2A The same is not repeated here. The recommendation device 2551 based on the click rate prediction model stored in the memory 250 can be software in the form of programs and plug-ins, including the following software modules: data acquisition module 25511, feature extraction module 25512, click rate prediction module 25513 and recommendation module 25514. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below.
[0084] In other embodiments, the training device of the click rate prediction model and the recommendation device based on the click rate prediction model provided by the embodiment of the present invention can be implemented in hardware. As an example, the training device of the click rate prediction model provided by the embodiment of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the training method of the click rate prediction model provided by the embodiment of the present invention; the recommendation device based on the click rate prediction model provided by the embodiment of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the recommendation method based on the click rate prediction model provided by the embodiment of the present invention. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.
[0085] The training method of the click rate prediction model and the recommendation method based on the click rate prediction model provided by the embodiment of the present invention can be executed by the above-mentioned server, or by a terminal device (for example, it can be Figure 1 The process may be executed by the terminal 400-1 and the terminal 400-2 shown in the figure, or may be executed jointly by the server and the terminal device.
[0086] The following will describe the process of implementing a click rate prediction model training method in an electronic device by using an embedded click rate prediction model training device in combination with the exemplary applications and structures of the electronic device described above.
[0087] See also Figure 3 , Figure 3 is an optional flow chart of a training method for a click rate prediction model provided by an embodiment of the present invention, which combines Figure 3 The steps shown are explained.
[0088] In step 301, sample features and the user's click results corresponding to the sample features are obtained.
[0089] Sample features refer to features related to click scenarios. For example, sample features may include user age, user gender, content data title, and time of content data release, etc. Content data such as news or advertisements. In addition, obtaining sample features corresponds to the user's click results. It is worth noting that the click result does not refer to probability, but to the existing results of click or non-click. According to different actual application scenarios, sample features and click results can be obtained in a targeted manner. For example, if you want to determine the click effect after a certain content is placed on a certain page, you can obtain sample features and corresponding click results generated by different users when browsing the page; if you want to determine the content that a certain user is interested in, you can obtain sample features and corresponding click results generated when the user uses the client (such as when using an advertising client). Since sample features and click results are usually obtained together, for the sake of convenience, sample features and click results are uniformly referred to as samples. On this basis, when the number of samples with click results is unbalanced with the number of samples with non-click results, the ratio between the two is used to adjust the weight (sample_weight) of the smaller number of samples to ensure that the number of positive and negative samples is consistent, so as to prevent adverse effects on subsequent training. For example, the number of samples with click results is 200, and the number of samples with not-click results is 100. If the weight of samples with click results is 1 by default, the weight of samples with not-click results is adjusted to 2.
[0090] In some embodiments, the above-mentioned acquisition of sample features and the sample features corresponding to the user's click results can be achieved in the following manner: acquiring sample content data and sample user data, and acquiring the corresponding user's click results on the sample content data; performing feature extraction on the sample content data and the sample user data to obtain sample features.
[0091] Since sample features usually involve two aspects, namely, user and content, in an embodiment of the present invention, sample content data and sample user data may be obtained, and feature extraction may be performed on the sample content data and sample user data to obtain sample features. The extracted sample features may be preset. The sample content data is data related to the content to be clicked, and the sample user data is data related to the user's own attributes. At the same time, the click result of the corresponding user on the sample content data, i.e., click or no click, is obtained. It is worth noting that after feature extraction, the features may also be processed, such as feature processing may be performed according to One-Hot encoding. One-Hot encoding uses an N-bit state register to encode N states, each state has an independent register bit, and at any time, only one of them is valid. For example, for the feature of age, if there are three possible values, namely, low, medium and high, then after One-Hot encoding, the value corresponding to low is 100, the value corresponding to medium is 010, and the value corresponding to high is 001. In this way, the sparsity of the data is improved.
[0092] In some embodiments, the acquisition of sample features and the sample features corresponding to the user's click results can be achieved in the following ways: acquiring sample features and the sample features corresponding to the user's click results from a database; or acquiring sample features and the sample features corresponding to the user's click results from an online data stream.
[0093] The embodiment of the present invention does not limit the data source of sample features and click results. For example, when a user uses a news client, an advertising client, or a browser, a database can be used to store sample features and the click results corresponding to the sample features. When it is necessary to train a click rate prediction model, the corresponding data can be obtained from the database for offline learning. Sample features and click results can also be directly obtained from online data streams to achieve online learning. The flexibility of data acquisition is improved in the above manner.
[0094] In step 302, the click rate prediction model is initialized according to the set weight parameters.
[0095] The weight parameter refers to a parameter used for click-through rate prediction and is updated during the training process of the click-through rate prediction model, which is described in detail below. Here, the click-through rate prediction model is initialized according to the set weight parameter.
[0096] In some embodiments, the above-mentioned initialization of the click-through rate prediction model according to the set weight parameters can be implemented in the following manner: determining the dimensions with non-zero values in the sample features; and initializing the click-through rate prediction model according to the weight parameters corresponding to the determined dimensions.
[0097] Since the sample feature is a multi-dimensional feature vector, it is necessary to set the value corresponding to each dimension of the sample feature in the weight parameter during initialization. In the embodiment of the present invention, the process of initializing the click rate prediction model can be optimized, specifically determining the dimension with a non-zero value in the sample feature, and setting the value corresponding to the determined dimension in the weight parameter, so as to initialize the click rate prediction model according to the set weight parameter.
[0098] For example, if the sample feature is a four-dimensional feature vector, the four dimensions are user age, user gender, content data title, and content data release time, and only the value corresponding to the content data title is non-zero, then the value corresponding to the content data title dimension in the weight parameter is set, and the click rate prediction model is initialized according to the weight parameter. In this way, the time for setting the weight parameter is reduced, and processing of irrelevant dimensions is avoided, resulting in a waste of resources.
[0099] In step 303, the sample features are processed by the click-through rate prediction model to obtain a predicted click-through rate.
[0100] The sample features are processed through the click-through rate prediction model. Specifically, a click-through rate prediction function is constructed according to the weight parameters set in the click-through rate prediction model, and the sample features are processed according to the click-through rate prediction function to obtain the predicted click-through rate. This step is the forward propagation process. There will be an error between the predicted click-through rate of the initialized click-through rate prediction model and the actual click results obtained.
[0101] In step 304, an objective function is constructed according to the error between the click result and the predicted click rate, and a zero-norm regularization term.
[0102] When training a click-through rate prediction model, it is necessary not only to make the click-through rate prediction model fit the sample features and click results as much as possible, and ensure that the training error is small enough, the training error refers to the error between the actual click result and the predicted click rate, but also to ensure that the test error of the click-through rate prediction model is small enough to avoid overfitting. In an embodiment of the present invention, the click-through rate prediction model is regularized, and the objective function is constructed specifically according to the error between the click result and the predicted click rate, as well as the zero-norm regularization term parameter, thereby constraining the click-through rate prediction model to be as simple as possible. The zero-norm regularization term refers to a regularization term constructed based on the L0 norm. The L0 norm refers to the number of non-zero elements in a vector, which itself is non-convex. Using the zero-norm regularization term to construct the objective function is essentially to expect more zero values to appear in the weight parameters.
[0103] In step 305, the error is back-propagated in the click-through rate prediction model through the objective function, and the weight parameters of the click-through rate prediction model are updated during the propagation process.
[0104] The error is back-propagated in the click-through rate prediction model through the objective function. The process of back-propagating the error is essentially to determine the value of the corresponding weight parameter based on the solution of the objective function, and to use the new value of the weight parameter to update the value of the weight parameter in the click-through rate prediction model.
[0105] In some embodiments, the above-mentioned updating of the weight parameters of the click-through rate prediction model during the propagation process can be achieved in the following manner: during the propagation process, the weight parameters corresponding to the determined dimensions in the click-through rate prediction model are updated.
[0106] On the basis of determining the dimensions whose values are non-zero in the sample features, during the propagation process, only the weight parameters of the click rate prediction model corresponding to the determined dimensions are updated, thereby improving the updating efficiency.
[0107] Through the embodiments of the invention Figure 3 It can be seen from the above exemplary implementation that the embodiment of the present invention constructs an objective function based on the zero-norm regularization term, thereby back-propagating the error in the click-through rate prediction model through the objective function to achieve the update of the weight parameters, thereby improving the sparsity of the weight parameters and also improving the accuracy of generating the click-through rate prediction model.
[0108] In some embodiments, see Figure 4 , Figure 4 is another optional flow chart of the training method of the click rate prediction model provided by the embodiment of the present invention. Figure 4 In step 401, before step 302, the dimensions may be set to be consistent with the sample features, and each dimension may include only a single numerical weight parameter.
[0109] Specifically, assume that the sample features and the corresponding click results are expressed as (x t ,y t ), x t is the sample feature of the tth sample, y t is the click result of the user corresponding to the t-th sample, t is an integer greater than 1, and the format of the weight parameter can be determined according to the logistic regression model (LR). The logistic regression model is shown in the following formula:
[0110]
[0111] In the above formula, p t is the predicted click rate corresponding to the tth sample. If the value corresponding to the click result in the sample is set to 1, and the value corresponding to the click result is set to 0, then p tThe value range of is between 0 and 1, and w in the above formula is the weight parameter. For the weight parameter determined by the logistic regression model, its dimension is consistent with the sample characteristics, and each dimension only includes a single value. When setting, the value of each dimension can be set according to the actual application scenario.
[0112] In step 402, the dimensions are set to be consistent with the sample features, and each dimension includes K numerical weight parameters, where K is an integer greater than 1.
[0113] In addition to the above method, K auxiliary vectors may be introduced for each dimension in the sample features, and correspondingly, the weight parameter also includes K values (ie, components) in each dimension.
[0114] Specifically, the format of the weight parameter can be determined according to the Factorization Machine (FM) model. The Factorization Machine model is shown in the following formula:
[0115]
[0116] Likewise, p t is the predicted click rate corresponding to the tth sample, v (k) is the weight parameter, and k is an integer. For the weight parameter determined by the factor decomposition machine model, the K specific values included in each dimension of the weight parameter can be set according to the actual application scenario.
[0117] exist Figure 4 In step 304, step 304 includes: in step 3041, a loss function is constructed according to the click result and the predicted click rate.
[0118] When constructing the objective function, a loss function is constructed based on the click results and the predicted click rate. As an example, assuming that the weight parameter is w, see the following formula:
[0119] l t (w) = -y t log(p t )+(1-y t )log(1-p t )
[0120] Among them, l t (w) is the loss function corresponding to the tth sample.
[0121] Finally, the loss function of T samples is integrated to obtain:
[0122]
[0123] Where T is the total number of samples, which is an integer greater than or equal to t, and L(w) is the average loss function corresponding to T samples.
[0124] In step 3042, the gradient of the loss function is determined based on the error between the click result and the predicted click rate.
[0125] After obtaining the sample features of the tth sample and the corresponding click results, that is, (x t ,y t ), the training objective is to find a weight parameter that minimizes the value of L(w), so in the embodiment of the present invention, the gradient of the loss function is determined according to the error between the click result and the predicted click rate. It is worth noting that for weight parameters of different formats, the method of determining the gradient of the loss function is also different.
[0126] When the weight parameters are determined according to the logistic regression model, the formula for determining the gradient of the loss function is as follows:
[0127] g t =(p t -y t )x t
[0128] g t is the gradient of the loss function corresponding to the tth sample.
[0129] When the weight parameters are determined according to the factorization machine model, since each dimension of the sample feature corresponds to K auxiliary vectors, the formula for determining the gradient of the loss function is as follows:
[0130] g t 0 =(p t -y t )x t
[0131] g t k =(p t -y t )(v k ·x t -diag(v k )diag(x t ))x t
[0132] Among them, the diag function is used to construct a diagonal matrix, g t 0 and t k are the gradients of the loss function corresponding to the tth sample.
[0133] In step 3043, an objective function is constructed based on the gradient of the loss function, the zero-norm regularization term and the constraint term, wherein the constraint term is used to constrain the degree of change of the weight parameter.
[0134] In addition to the gradient of the loss function and the zero-norm regularization term, the objective function is also constructed based on the constraint term. The constraint term is used to constrain the degree of change of the weight parameter to prevent the weight parameter from changing too much. After the objective function is constructed, the process of training the click-through rate prediction model can be converted into the process of solving the objective function.
[0135] In some embodiments, the above-mentioned construction of the objective function according to the gradient of the loss function, the zero-norm regularization term and the constraint term can be achieved in the following way: the objective function is constructed according to the gradient of the loss function, the zero-norm regularization term and the first constraint term, wherein the first constraint term is used to constrain the difference between the weight parameter and zero.
[0136] The objective function formula is as follows:
[0137]
[0138] Among them, <, > is the vector inner product operation, is the first constraint, η t is the step size, which is used to determine the convergence and convergence speed of the weight parameter, λ||w‖ 0 is the zero-norm regularization term, where λ is a hyperparameter that can be set based on experience or actual application scenarios.
[0139] In some embodiments, the above-mentioned construction of the objective function according to the gradient of the loss function, the zero-norm regularization term and the constraint term can be achieved in the following way: the objective function is constructed according to the gradient of the loss function, the zero-norm regularization term and the second constraint term, wherein the second constraint term is used to constrain the difference between the weight parameters after the update and the weight parameters before the update.
[0140] The objective function formula is as follows:
[0141]
[0142] Among them, <, > is the vector inner product operation, is the second constraint, σ s is the step size, which is also used to determine the convergence and convergence speed of the weight parameter, λ||w‖ 0 is the zero-norm regularization term, where λ is a hyperparameter that can be set based on experience or actual application scenarios. The above two objective functions can be selected based on actual application scenarios.
[0143] exist Figure 4In step 305, after step 403, the non-zero values and corresponding dimensions in the updated weight parameters can be retained.
[0144] It is worth noting that when training a click-through rate prediction model, sample features and click results corresponding to multiple samples are usually obtained for training. After the weight parameters are updated according to the sample features and click results of the current sample, the sample features corresponding to the next sample are processed according to the updated weight parameters to obtain the predicted click-through rate. The error between the click result and the predicted click-through rate is back-propagated according to the constructed objective function, so as to update the weight parameters again. The above process is repeated until the weight parameters are updated according to all samples, or it is stopped manually.
[0145] For the updated weight parameters, since they are multidimensional vectors, the zero values therein will not affect the predicted click-through rate. Therefore, in the embodiment of the present invention, only the non-zero values and corresponding dimensions in the updated weight parameters are retained, thereby reducing the file size of the click-through rate prediction model and facilitating its deployment to devices with limited memory or capacity.
[0146] Through the embodiments of the invention Figure 4 It can be seen from the above exemplary implementation that the embodiments of the present invention provide two formats of weight parameters and two formats of objective functions, which improves the flexibility of training the click rate prediction model.
[0147] In order to facilitate understanding of the content of the embodiments of the present invention, the following is a pseudo code of four ways of training click-through rate prediction models obtained by combining two formats of weight parameters and two formats of objective functions in a one-to-one correspondence. It is worth noting that the parameter α in the following is a hyperparameter used to adjust the step size, which can be set according to the actual application scenario; the hyperparameter β is used to prevent the numerator from being 0 when calculating the step size, and is usually set to 1; z and n are both intermediate parameters, specifically multidimensional vectors with dimensions consistent with sample characteristics, and their derivation process will not be repeated here.
[0148] (1) The objective function constructed using the first constraint is applied to the logistic regression model. The weight parameter is represented by w. The pseudo code of the process of training the click rate prediction model is as follows:
[0149] Set hyperparameters: α>0, β>0, λ>0
[0150] Initialize intermediate parameters: z = n = 0
[0151] Starting from 1, for each t between 1 and T, perform the following steps:
[0152] Get sample features x t , and determine x tThe set of dimensions whose values are non-zero in I t ,
[0153] The specific formula is I t ={i|x t ,i≠0}
[0154] For dimension set I t For each dimension i in , perform the following steps:
[0155] Update the value w of the weight parameter w in dimension i i , the formula is
[0156] }Execution ends
[0157] Determine the predicted click rate p t , the formula is p t =σ(x t ·w), where σ is the sigmoid function
[0158] For dimension set I t For each dimension i in , perform the following steps:
[0159] According to the click result y t , predict click rate p t and the value x of the sample feature in dimension i t,i ,
[0160] Determine the gradient g of dimension i i , the formula is g i =(p t -y t )x t,i
[0161] According to z i and g i Update the value of z i , the formula is z i ←z i +g i
[0162] According to n i and g i Update the value of n i , the formula is n i ←n i +g i 2
[0163] }Execution ends
[0164] }Execution ends
[0165] (2) The objective function constructed using the second constraint term is applied to the logistic regression model. The weight parameter is represented by w. The pseudo code of the process of training the click rate prediction model is as follows:
[0166] Set hyperparameters: α>0, β>0, λ>0
[0167] Initialize intermediate parameters: z = n = 0
[0168] Starting from 1, for each t between 1 and T, perform the following steps:
[0169] Get sample features x t , and determine x t The set of dimensions whose values are non-zero in I t ,
[0170] The specific formula is I t ={i|x t ,i≠0}
[0171] For dimension set I t For each dimension i in , perform the following steps:
[0172] Update the value w of the weight parameter w in dimension i i , the formula is
[0173] }Execution ends
[0174] Determine the predicted click rate p t , the formula is p t =σ(x t ·w), where σ is the sigmoid function
[0175] For dimension set I t For each dimension i in , perform the following steps:
[0176] According to the click result y t , predict click rate p t and the value x of the sample feature in dimension i t,i ,
[0177] Determine the gradient g of dimension i i , the formula is g i =(p t -y t )x ti
[0178] According to α, n i and g i The value update σ i , the formula is
[0179] According to z i , g i , σ i and w i Update the value of z i , the formula is z i ←z i +g i -σ i w i
[0180] According to n i and g i Update the value of n i , the formula is n i ←n i +g i 2
[0181] }Execution ends
[0182] }Execution ends
[0183] (3) The objective function constructed using the first constraint is applied to the factorization machine model, with the weight parameter v (k) The pseudo code for the process of training the click-through rate prediction model is as follows:
[0184] Set hyperparameters: α>0, β>0, λ>0, K>0
[0185] Initialize intermediate parameters: z (k) ,n (k) for k∈{0,...,K}
[0186] Starting from 1, for each t between 1 and T, perform the following steps:
[0187] Get sample features x t , and determine x t The set of dimensions whose values are non-zero in I t ,
[0188] The specific formula is I t ={i|x t ,i≠0}
[0189] For dimension set I t For each dimension i in , perform the following steps:
[0190] Starting from 0, for each k between 0 and K, perform the following steps:
[0191] Update the kth component v of the weight parameter in dimension i i (k) , the formula is
[0192]
[0193] }Execution ends
[0194] }Execution ends
[0195] Determine the predicted click rate p t , the formula is this
[0196] The σ at is the sigmoid function
[0197] For dimension set I t For each dimension i in , perform the following steps:
[0198] Starting from 0, for each k between 0 and K, perform the following steps:
[0199] When k is equal to 0, perform the following steps {
[0200] According to the click result y t , predict click rate p t and the value x of the sample feature in dimension i t,i , determine the 0th component g of the gradient in dimension i i (0) , the formula is g i (0) =(p t -y t )x t,i
[0201] }Execution ends
[0202] When k is not equal to 0, perform the following steps {
[0203] According to the click result y t , predict click rate p t , sample features x t , the value x of the sample feature in dimension i t,i And the weight parameter determines the kth component g of the gradient in dimension i i (k) , the formula is
[0204] g i (k) =(p t -y t )(v (k) ·x t -v i (k) x t,i )x t,i
[0205] }Execution ends
[0206] According to z i (k) and g i (k) Update the value of z i (k) , the formula is z i (k) ←z i (k) +g i (k)
[0207] According to n i (k) and g i (k) Update the value of n i (k) , the formula is n i (k) ←n i (k) +(g i (k) ) 2
[0208] }Execution ends
[0209] }Execution ends
[0210] }Execution ends
[0211] (4) The objective function constructed using the second constraint term is applied to the factorization machine model, and the weight parameter is v (k) The pseudo code for the process of training the click-through rate prediction model is as follows:
[0212] Set hyperparameters: α>0, β>0, λ>0, K>0
[0213] Initialize intermediate parameters: z (k) ,n (k) for k∈{0,...,K}
[0214] Starting from 1, for each t between 1 and T, perform the following steps:
[0215] Get sample features x t , and determine x t The set of dimensions whose values are non-zero in I t ,
[0216] The specific formula is I t ={i|x t ,i≠0}
[0217] For dimension set I t For each dimension i in , perform the following steps:
[0218] Starting from 0, for each k between 0 and K, perform the following steps:
[0219] Update the kth component of the weight parameter in dimension i The formula is
[0220]
[0221] }Execution ends
[0222] }Execution ends
[0223] Determine the predicted click rate p t , the formula is this
[0224] The σ at is the sigmoid function
[0225] For dimension set I t For each dimension i in , perform the following steps:
[0226] Starting from 0, for each k between 0 and K, perform the following steps:
[0227] When k is equal to 0, perform the following steps {
[0228] According to the click result y t , predict click rate p t and the value x of the sample feature in dimension i t,i , determine the 0th component of the gradient in dimension i
[0229] g i (0) , the formula is g i (0) =(p t -y t )x t,i
[0230] }Execution ends
[0231] When k is not equal to 0, perform the following steps {
[0232] According to the click result y t , predict click rate p t , sample features x t , the value x of the sample feature in dimension i ti And the weight parameter determines the kth component g of the gradient in dimension i i (k) , the formula is
[0233] g i (k) =(p t -yt )(v (k) ·x t -v i (k) x t,i )x t,i
[0234] }Execution ends
[0235] According to α, n i (k) and g i (k) The value update σ i (k) , the formula is
[0236]
[0237] According to z i (k) , g i (k) , σ i (k) and v i (k) Update the value of z i (k) , the formula is
[0238] z i (k) ←z i (k) +g i (k) -σ i (k) v i (k)
[0239] According to n i (k) and g i (k) Update the value of n i (k) , the formula is n i (k) ←n i (k) +(g i (k) ) 2
[0240] }Execution ends
[0241] }Execution ends
[0242] }Execution ends
[0243] It is worth noting that in the above four pseudo codes, the formula of the Truncate() function is:
[0244]
[0245] The parameters in the Truncate() function are only used to indicate different variables and have no actual meaning.
[0246] In actual application scenarios, one of the above four methods of training the click rate prediction model can be selected for training. After the training is completed, the weight parameters are updated using the Truncate() function according to the final intermediate parameters z and n.
[0247] The following will describe the process of implementing a recommendation method based on a click rate prediction model by embedding a recommendation device based on a click rate prediction model in an electronic device in combination with the exemplary applications and structures of the electronic device described above.
[0248] See also Figure 5 , Figure 5 is an optional flow chart of a recommendation method based on a click rate prediction model provided by an embodiment of the present invention, which combines Figure 5 The steps shown are explained.
[0249] In step 501, user data and at least two content data are obtained.
[0250] For example, user data and at least two content data to be recommended are obtained.
[0251] In step 502, each of the content data and the user data is combined in a one-to-one correspondence, and feature extraction is performed on the combined data to obtain object features.
[0252] Since object features involve users and content, each content data is combined with user data in a one-to-one correspondence, and feature extraction is performed on the combined data to finally obtain at least two object features. For example, if user data includes A and content data includes B and C, feature extraction is performed on A+B to obtain the corresponding object features; feature extraction is performed on A+C to obtain the corresponding object features.
[0253] In step 503, the object features are processed by the click rate prediction model to obtain a predicted click rate.
[0254] The click-through rate prediction function is constructed by using the weight parameters in the click-through rate prediction model, and each object feature is processed according to the click-through rate prediction function to obtain the corresponding predicted click-through rate. The click-through rate prediction function is the LR model or FM model mentioned above, and the predicted click-through rate is the p above. t .
[0255] In step 504, according to the set recommendation strategy, content data corresponding to the predicted click rate that meets the click rate value condition is recommended.
[0256] For example, different click-through rate value conditions can be set according to different application scenarios, and the embodiments of the present invention do not limit the click-through rate value conditions. Assuming that when training the click-through rate prediction model, the value of the click result for a click is set to 1, and the value of the click result for a non-click is set to 0, the greater the predicted click-through rate obtained by step 503, the greater the probability that the user clicks on the corresponding content data. In the above case, the click-through rate value condition can be set to the predicted click-through rate with the largest value, or the predicted click-through rate with a value greater than a set click-through rate threshold, such as 0.7. When the number of content data corresponding to the predicted click-through rate that meets the click-through rate value condition is at least two, the content data can be recommended in the terminal device in a list or other form in the order of the predicted click-through rate from large to small.
[0257] Through the embodiments of the invention Figure 5 It can be seen from the above exemplary implementation that the embodiment of the present invention combines each content data and user data in a one-to-one correspondence, performs feature extraction on the combined data to obtain object features, processes the object features through a trained click-through rate prediction model to obtain a predicted click-through rate, and recommends corresponding content data based on the predicted click-through rate, thereby improving the accuracy of content recommendation.
[0258] The following describes an exemplary application of an embodiment of the present invention in a practical application scenario.
[0259] See also Figure 6 , Figure 6 Schematic diagram of an optional architecture of the click rate prediction system provided by an embodiment of the present invention. Figure 6When training the click-through rate prediction model, the feature extraction module is used to extract features from the user data generated by the user and the content data generated by the content platform to obtain sample features. At the same time, the sample features are obtained corresponding to the user's click results. For ease of understanding, the sample features and click results are collectively referred to as training samples. For training samples, they can be stored in a database, and the model training module can obtain training samples from the database for offline training; the training samples can also be sent to the model training module in the form of an online data stream. In this way, while the user is using the client, the model training module can perform online training based on the online data stream. The model training module trains the click-through rate prediction model based on the training samples, and after the training is completed, the click-through rate prediction model is sent to the recommendation platform. It is worth noting that the recommendation platform can be a platform deployed on a terminal device or a platform deployed on a server, and the embodiments of the present invention do not limit this. When making content recommendations, the recommendation platform obtains the user data sent by the user and the content data provided by the content platform, performs the same feature extraction on the user data and the content data (not shown in the figure), obtains object features in the same format as the sample features, and then processes the object features according to the click-through rate prediction model to obtain the predicted click-through rate, obtains the recommendation result according to the predicted click-through rate, and returns the recommendation result to the user side to complete the content recommendation process. Figure 6 It can be seen from the above exemplary implementation that by training the user's historical data, content data that fits the user's interests is recommended, thereby improving the accuracy of content recommendation.
[0260] See also Figure 7 , Figure 7 FIG. 1 is a schematic diagram of an optional architecture of a model training module provided in an embodiment of the present invention. Figure 7 In the example, the model training module is a distributed training platform, including a parameter server and at least two computing nodes. For ease of understanding, the following is explained in steps.
[0261] Step (1): In a database or online data stream, the training samples are randomly divided into batches, and each batch includes at least one training sample. One batching method is to batch the training samples evenly according to a set number, where the set number is the maximum number of training samples that the computing node supports to process simultaneously. For example, if the set number is 100 and the training samples include 1000, the training samples can be divided into 10 batches, each batch including 100 training samples.
[0262] Step (2): Figure 7Each computing node in is used to process a batch of training samples. After the batching is completed, each batch of training samples flows into the corresponding computing node for processing. It is worth noting that after the batching is completed, the number of batches may be greater than the number of computing nodes. For example, 10 batches are divided, but there are only 3 computing nodes. For this case, the training samples of multiple batches are divided into several rounds. In each round, only the batches that can be accommodated by the computing node are sent to the computing node. For example, for the above example, it can be divided into 4 rounds. In each of the first 3 rounds, 3 batches of training samples are sent to the corresponding computing node. In the fourth round, the remaining 1 batch of training samples is sent to one of the computing nodes in the model training module. During the processing, the computing node requests the intermediate parameters z and n from the parameter server, and after obtaining the intermediate parameters, the gradient of each training sample in the obtained batch of training samples is calculated separately, and then all the gradients corresponding to the training samples in the batch are averaged. Among them, for the remaining hyperparameters, they can be set uniformly in the computing node and the parameter server in advance, or they can be sent to the computing node by the parameter server after being set.
[0263] Step (3): Based on the average gradient, the computing node can adopt any of the four methods of training the click rate prediction model mentioned above to update the intermediate parameters z and n. In particular, for the method of applying the second constraint item, since the weight parameter is involved in the process of updating the intermediate parameters, the computing node can first calculate the weight parameter corresponding to each training sample in a batch of training samples, and then average the weight parameters corresponding to the batch of training samples, and update the intermediate parameters z and n according to the average gradient, the averaged weight parameter and the intermediate parameters sent by the parameter server. In addition, in the case where a batch of training samples includes only one training sample, it is not necessary to calculate the average gradient.
[0264] Step (4): The computing node performs a difference operation on the intermediate parameters after the update and before the update, and calculates z new and n new Represents the updated intermediate parameters, expressed as z old and n old represents the intermediate parameter before updating, then the parameter difference Δz=z new -z old , Δn=n new -n old Each computing node uploads the parameter difference to the parameter server. After receiving the parameter difference uploaded by the computing nodes in a round, the parameter server accumulates each difference with the original intermediate parameters in the parameter server, that is, z new =z old +Δz 1 +…+Δz N , nnew =n old +Δn 1 +…+Δn N , where Δz 1 Refers to the parameter difference of the intermediate parameter z uploaded by the first computing node, where N is the total number of computing nodes.
[0265] Step (5): Repeat steps (2) to (4) until all rounds of training samples have been trained.
[0266] Step (6): The parameter server updates the weight parameters in the click rate prediction model based on the updated intermediate parameters.
[0267] Through the embodiments of the invention Figure 7 It can be seen from the above exemplary implementation that the embodiment of the present invention realizes distributed training of training samples by constructing at least two computing nodes, thereby effectively improving the efficiency of training the click-through rate prediction model.
[0268] The following is a description of an exemplary structure of a click rate prediction model training device 2550 provided in an embodiment of the present invention implemented as a software module. In some embodiments, Figure 2A As shown, the software modules in the training device 2550 of the click rate prediction model stored in the memory 250 may include: an acquisition module 25501, used to obtain sample features and the sample features corresponding to the user's click results; an initialization module 25502, used to initialize the click rate prediction model according to the set weight parameters; a processing module 25503, used to process the sample features through the click rate prediction model to obtain the predicted click rate; a construction module 25504, used to construct an objective function according to the error between the click result and the predicted click rate, and a zero-norm regularization term; an update module 25505, used to back-propagate the error in the click rate prediction model through the objective function, and update the weight parameters of the click rate prediction model during the propagation process.
[0269] In some embodiments, construction module 25504 is also used to: construct a loss function based on the click result and the predicted click rate; determine the gradient of the loss function based on the error between the click result and the predicted click rate; construct an objective function based on the gradient of the loss function, the zero-norm regularization term and the constraint term, wherein the constraint term is used to constrain the degree of change of the weight parameter.
[0270] In some embodiments, constructing the objective function according to the gradient of the loss function, the zero-norm regularization term and the constraint term includes: constructing the objective function according to the gradient of the loss function, the zero-norm regularization term and the first constraint term, wherein the first constraint term is used to constrain the difference between the weight parameter and zero; or, constructing the objective function according to the gradient of the loss function, the zero-norm regularization term and the second constraint term, wherein the second constraint term is used to constrain the difference between the weight parameter after the update and the weight parameter before the update.
[0271] In some embodiments, the initialization module 25502 is further used to: set the dimensions to be consistent with the sample characteristics, and each dimension includes only a single numerical weight parameter; or, set the dimensions to be consistent with the sample characteristics, and each dimension includes K numerical weight parameters, where K is an integer greater than 1.
[0272] In some embodiments, the initialization module 25502 is further used to: determine the dimensions whose values are non-zero in the sample features; and initialize the click-through rate prediction model according to the weight parameters corresponding to the determined dimensions.
[0273] In some embodiments, the updating module 25505 is further used to: update the weight parameters corresponding to the determined dimensions in the click rate prediction model during the propagation process.
[0274] In some embodiments, the acquisition module 25501 is further used to: acquire sample content data and sample user data, and acquire the click results of the corresponding user on the sample content data; perform feature extraction on the sample content data and the sample user data to obtain sample features.
[0275] In some embodiments, the training device 2550 for the click-through rate prediction model also includes: a model updating module, which is used to retain the non-zero values and corresponding dimensions in the updated weight parameters.
[0276] In some embodiments, the acquisition module 25501 is also used to: acquire sample features and the sample features corresponding to the user's click results from a database; or acquire sample features and the sample features corresponding to the user's click results from an online data stream.
[0277] The following is a description of an exemplary structure of a recommendation device 2551 based on a click rate prediction model provided by an embodiment of the present invention implemented as a software module. In some embodiments, Figure 2BAs shown, the software modules in the recommendation device 2551 based on the click rate prediction model stored in the memory 250 may include: a data acquisition module 25511, used to acquire user data and at least two content data; a feature extraction module 25512, used to combine each of the content data with the user data in a one-to-one correspondence, and perform feature extraction on the combined data to obtain object features; a click rate prediction module 25513, used to process the object features through the click rate prediction model to obtain a predicted click rate; a recommendation module 25514, used to recommend content data corresponding to the predicted click rate that meets the click rate value conditions.
[0278] An embodiment of the present invention provides a storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will be caused to execute the method provided by the embodiment of the present invention, for example, Figure 3 or Figure 4 The training method of the click rate prediction model shown, or Figure 5 The recommendation method based on the click-through rate prediction model is shown.
[0279] In some embodiments, the storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EE PROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0280] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0281] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0282] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0283] In summary, through the embodiments of the present invention, on the one hand, the click-through rate prediction model is regularized based on the zero-norm regularization term, which greatly improves the sparsity of the weight parameters, reduces the file size of the click-through rate prediction model finally generated, and improves the applicability of the click-through rate prediction model. The inventors have found through experiments that the method of training the click-through rate prediction model provided by the embodiments of the present invention does not have NP-hard problems in the click-through rate prediction scenario, and has better performance than traditional methods in terms of accuracy and model compression. On the other hand, the click-through rate prediction model is used to achieve targeted recommendation of content data, thereby improving the accuracy of content recommendation.
[0284] The above description is only an embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement and improvement made within the spirit and scope of the present invention are included in the protection scope of the present invention.
Claims
1. A training method for a click rate prediction model, characterized in that: include: Obtain sample features and the user's click results corresponding to the sample features; Initialize the click rate prediction model according to the set weight parameters; Processing the sample features through the click rate prediction model to obtain a predicted click rate; Constructing an objective function according to the error between the click result and the predicted click rate, a zero-norm regularization term, and a constraint term, wherein the constraint term includes a first constraint term and a second constraint term, the first constraint term is used to constrain the difference between the weight parameter and zero, and the second constraint term is used to constrain the difference between the updated weight parameter and the weight parameter before the update; The error is back-propagated in the click-through rate prediction model through the objective function, and the weight parameters of the click-through rate prediction model are updated during the propagation process.
2. The training method of the click rate prediction model according to claim 1, characterized in that: The constructing of the objective function according to the error between the click result and the predicted click rate, the zero-norm regularization term and the constraint term includes: Constructing a loss function according to the click result and the predicted click rate; Determining the gradient of the loss function according to the error between the click result and the predicted click rate; An objective function is constructed according to the gradient of the loss function, the zero-norm regularization term and the constraint term, wherein the constraint term is used to constrain the degree of change of the weight parameter.
3. The training method of the click rate prediction model according to claim 1, characterized in that: Before the click rate prediction model is initialized according to the set weight parameters, the method further includes: The dimensions are set to be consistent with the sample characteristics, and each dimension only includes a single numerical weight parameter; or, The dimension is set to be consistent with the sample feature, and each dimension includes K numerical weight parameters, where K is an integer greater than 1.
4. The method for training a click-through rate prediction model according to claim 1, characterized in that: Initializing the click rate prediction model according to the set weight parameters includes: Determining dimensions of the sample features whose values are non-zero; The click rate prediction model is initialized according to the weight parameters corresponding to the determined dimensions.
5. The method for training a click-through rate prediction model according to claim 4, characterized in that: The step of updating the weight parameters of the click rate prediction model during the propagation process includes: During the propagation process, the weight parameters corresponding to the determined dimensions in the click rate prediction model are updated.
6. The method for training a click rate prediction model according to claim 1, characterized in that: The obtaining of sample features and the sample features corresponding to the user's click results includes: Obtaining sample content data and sample user data, and obtaining click results of corresponding users on the sample content data; Feature extraction is performed on the sample content data and the sample user data to obtain sample features.
7. A recommendation method based on the click rate prediction model according to any one of claims 1 to 6, characterized in that: include: Obtain user data and at least two content data; Combining each of the content data with the user data in a one-to-one correspondence, and performing feature extraction on the combined data to obtain object features; Processing the object features through the click rate prediction model to obtain a predicted click rate; Recommend content data corresponding to the predicted click rate that meets the click rate value conditions.
8. A training device for a click rate prediction model, characterized in that: include: An acquisition module, used to acquire sample features and the click results of the user corresponding to the sample features; An initialization module is used to initialize the click rate prediction model according to the set weight parameters; A processing module, used for processing the sample features through the click rate prediction model to obtain a predicted click rate; A construction module, used to construct an objective function according to the error between the click result and the predicted click rate, a zero-norm regularization term, and a constraint term, wherein the constraint term includes a first constraint term and a second constraint term, the first constraint term is used to constrain the difference between the weight parameter and zero, and the second constraint term is used to constrain the difference between the updated weight parameter and the weight parameter before the update; An updating module is used to back-propagate the error in the click-through rate prediction model through the objective function, and to update the weight parameters of the click-through rate prediction model during the propagation process.
9. An electronic device, characterized in that: include: A memory for storing executable instructions; The processor is used to implement the training method of the click rate prediction model described in any one of claims 1 to 6, or the recommendation method described in claim 7 when executing the executable instructions stored in the memory.
10. A computer-readable storage medium storing executable instructions, characterized in that: When the executable instructions are executed by the processor, the training method of the click rate prediction model described in any one of claims 1 to 6, or the recommendation method described in claim 7 is implemented.
11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, it implements the training method of the click rate prediction model described in any one of claims 1 to 6, or the recommendation method described in claim 7.
Citation Information
Patent Citations
Method and device for estimating click rate of advertisement, equipment and storage medium
CN108109008A