Model training method, click rate prediction method and device, and storage medium

By using the dependency between global interests and local interests in user historical behavior data to train the click-through rate prediction model, the problem that users' current interests in the prior art is difficult to accurately predict, and the accuracy of click-through rate prediction is improved.

CN120030218APending Publication Date: 2025-05-23BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311568792.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-22
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

The prior art is difficult to accurately predict the current interests of users, resulting in inaccurate click-through rate estimate results.

Method used

By obtaining the user's historical behavior data, inputting the initial click-through rate prediction model, obtaining global and local interests, and using the dependency between the two to train the click-through rate prediction model to improve prediction accuracy.

Benefits of technology

Improve the accuracy of click-through rate prediction, can more stably and accurately determine the user's short-term interests, and alleviate the problem of dilution or masking of historical behavior data information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120030218A_ABST
    Figure CN120030218A_ABST
Patent Text Reader

Abstract

Embodiments of the invention disclose a model training method, a click rate prediction method and apparatus, and a storage medium. The model training method comprises the steps of obtaining sample historical behavior data, a sample prediction object and a sample prediction result of a sample customer; inputting the sample historical behavior data and the sample prediction object into the initial click rate prediction model to obtain a sample global interest and a sample local interest; and training an initial click rate prediction model by using the dependency relationship between the sample global interest and the sample local interest and the sample prediction result to obtain a click rate prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of information recommendation, and in particular to a model training method, a click rate prediction method and device, and a storage medium. Background Art

[0002] Recommendation system is an effective way to solve information overload and has been widely used in e-commerce, social networking and streaming media. Click-through rate prediction (CTR) is an important part of recommendation system. CTR can improve the click-through rate, conversion rate and user satisfaction by optimizing the ranking of recommendation results and personalized recommendation strategy. Therefore, CTR prediction plays an important role in search, recommendation and advertising.

[0003] In the related art, the CTR prediction models based on deep learning all use the user's historical behavior data, user and item portrait data, context and other data to determine the user's stable interest information, and then generate the user's score estimation result for the candidate item based on the interest information. Since the user's interest changes dynamically, this method cannot accurately determine the user's current interest, resulting in inaccurate click-through rate estimation results. Summary of the invention

[0004] In order to solve the above technical problems, the embodiments of the present application hope to provide a model training method, a click-through rate prediction method and device, and a storage medium, which can improve the accuracy of click-through rate prediction.

[0005] The technical solution of this application is implemented as follows:

[0006] The present application provides a model training method, which includes:

[0007] Obtain sample historical behavior data, sample prediction objects and sample prediction results of sample customers;

[0008] Inputting the sample historical behavior data and the sample prediction object into an initial click rate prediction model to obtain sample global interest and sample local interest;

[0009] The initial click rate prediction model is trained by utilizing the dependency relationship between the sample global interest and the sample local interest and the sample prediction result to obtain the click rate prediction model.

[0010] The present application provides a click rate prediction method, which includes:

[0011] Upon receiving a click rate prediction instruction from a target customer for a prediction object, obtaining historical behavior data of the target customer;

[0012] Inputting the historical behavior data into a click rate prediction model to obtain the global interest and local interest of the target customer; the click rate prediction model is a model obtained by modeling the dependency relationship between the sample global interest and the sample local interest; the sample global interest and the sample local interest are determined according to the sample historical behavior data;

[0013] The click rate of the object to be predicted is predicted according to the global interest and the local interest to obtain a click rate prediction result.

[0014] The present application embodiment provides a model training device, the device comprising:

[0015] A first acquisition unit is used to acquire sample historical behavior data, sample prediction objects and sample prediction results of sample customers;

[0016] A first input unit is used to input the sample historical behavior data and the sample prediction object into an initial click rate prediction model to obtain the sample global interest and the sample local interest;

[0017] A training unit is used to train the initial click rate prediction model by utilizing the dependency relationship between the sample global interest and the sample local interest and the sample prediction result to obtain the click rate prediction model.

[0018] The present application embodiment provides a click rate prediction device, the device comprising:

[0019] A second acquisition unit is used to acquire the historical behavior data of the target customer when receiving a click rate prediction instruction of the target customer for the prediction object;

[0020] A second input unit is used to input the historical behavior data into a click rate prediction model to obtain the global interest and local interest of the target customer; the click rate prediction model is a model obtained by modeling the dependency relationship between the sample global interest and the sample local interest; the sample global interest and the sample local interest are determined according to the sample historical behavior data;

[0021] The first prediction unit is used to predict the click rate of the object to be predicted according to the global interest and the local interest to obtain a click rate prediction result.

[0022] The present application embodiment provides a model training device, the device comprising:

[0023] A first memory, a first processor and a first communication bus, wherein the first memory communicates with the first processor via the first communication bus, and the first memory stores a model training program executable by the first processor. When the model training program is executed, the above-mentioned model training method is executed by the first processor.

[0024] The present application embodiment provides a click rate prediction device, the device comprising:

[0025] A second memory, a second processor and a second communication bus, wherein the second memory communicates with the second processor via the second communication bus, and the second memory stores a click rate prediction program executable by the second processor. When the click rate prediction program is executed, the click rate prediction method described above is executed by the second processor.

[0026] An embodiment of the present application provides a storage medium having a computer program stored thereon, which is applied to a click rate prediction device and a model training device, and is characterized in that when the computer program is executed by a first processor, the above-mentioned model training method is implemented; when the computer program is executed by a second processor, the above-mentioned click rate prediction method is implemented.

[0027] The embodiments of the present application provide a model training method, a click-through rate prediction method and device, and a storage medium. The click-through rate prediction method includes: obtaining sample historical behavior data, sample prediction objects, and sample prediction results of sample customers; inputting the sample historical behavior data and the sample prediction objects into an initial click-through rate prediction model to obtain sample global interests and sample local interests; using the dependency relationship between sample global interests and sample local interests and the sample prediction results to train the initial click-through rate prediction model to obtain a click-through rate prediction model. The above method is adopted to implement the scheme. The model training device determines the sample local interests of the sample customers according to the sample historical behavior data, that is, determines the sample short-term interests of the sample users, so as to alleviate the situation where the current behavior sequence information of the sample users is diluted or masked by the information represented by the too long sample historical behavior sequence; then the initial click-through rate prediction model is trained according to the dependency relationship between the sample global interest and the sample local interest and the sample prediction result, so that in the process of model training, the behavior of the sample local interest can be used to activate the related interest behavior in the behavior of the sample global interest. When the behavior of the sample local interest is sparse, the behavior of the sample global interest can be used as a supplement to the behavior of the sample local interest, so that the sample local interest is more stable and accurate, thereby obtaining a highly accurate click-through rate prediction model, and using the highly accurate click-through rate prediction model to perform click-through rate prediction, the accuracy of click-through rate prediction is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1A flow chart of a model training method provided in an embodiment of the present application;

[0029] Figure 2 An exemplary click rate prediction framework diagram provided in an embodiment of the present application;

[0030] Figure 3 An exemplary mutual attention network structure diagram provided for an embodiment of the present application;

[0031] Figure 4 An exemplary model training schematic diagram provided for an embodiment of the present application;

[0032] Figure 5 A click rate prediction flow chart provided in an embodiment of the present application;

[0033] Figure 6 A schematic diagram of the structure of a model training device provided in an embodiment of the present application Figure 1 ;

[0034] Figure 7 A schematic diagram of the structure of a model training device provided in an embodiment of the present application Figure 2

[0035] Figure 8 A schematic diagram of the structure of a click rate prediction device provided in an embodiment of the present application Figure 1 ;

[0036] Fig. 9 A schematic diagram of the structure of a click rate prediction device provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.

[0038] The present application embodiment provides a model training method, a model training method is applied to a model training device, Figure 1 A flow chart of a model training method provided in an embodiment of the present application, such as Figure 1 As shown, the model training method may include:

[0039] S101. Obtain sample historical behavior data, sample prediction objects, and sample prediction results of sample customers.

[0040] A model training method provided in an embodiment of the present application is suitable for the scenario of training a click-through rate prediction model.

[0041] In the embodiments of the present application, the model training device can be implemented in various forms. For example, the model training device described in the present application can include devices such as mobile phones, cameras, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, and devices such as digital TVs, desktop computers, and servers.

[0042] In the embodiment of the present application, the sample customer may be a user, and the number of sample customers may be multiple. The specific number may be determined according to actual conditions, and the embodiment of the present application does not limit this.

[0043] In the embodiment of the present application, the sample prediction object can be a commodity, that is, a product sold in an e-commerce application (APPlication, APP). The sample historical behavior data is the operation behavior data of the sample customer in the e-commerce APP within a historical period of time, such as the operation behavior data of the sample customer on the commodity (target object) in the e-commerce APP in a historical quarter, such as the operation behavior data of the sample customer on the commodity (target object) such as click, add to cart, and favorite in the e-commerce APP.

[0044] It should be noted that the historical period of time can be within 2 months, within half a year, or a prerequisite historical time period. The specific length of the historical period of time can be determined based on actual conditions, and the embodiments of the present application do not limit this.

[0045] It should be noted that the sample historical behavior data includes the sample customer portrait of the sample customer, the sample object portrait (product portrait) of the sample target object (products that have been historically operated), the sample operation behavior data of the sample customer when operating the sample target object (behavioral data such as clicks, purchases, and collections of products), and the sample operation environment data (including the time, season, and device number of the user's visit to the platform).

[0046] In an embodiment of the present application, the model training device can obtain sample historical behavior data in the database corresponding to the e-commerce APP; it can also obtain sample historical behavior data in the area indicated by the instruction; it can also obtain sample historical behavior data from the information carried in the instruction; the specific way in which the model training device obtains sample historical behavior data can be determined based on actual conditions, and the embodiment of the present application does not limit this.

[0047] In the embodiment of the present application, there may be multiple sample prediction objects, and the specific number of sample prediction objects may be determined based on actual conditions, which is not limited in the embodiment of the present application.

[0048] In an embodiment of the present application, the process of obtaining sample historical behavior data of sample customers through model training includes: obtaining sample object portraits corresponding to sample target objects historically operated by sample customers, sample customer portraits of sample customers, sample operation behavior data when sample customers operate on sample target objects, and sample operation environment data; preprocessing the sample operation behavior data, sample object portraits, sample customer portraits, and sample operation environment data, respectively, to obtain preprocessed sample operation behavior data, preprocessed sample object portraits, preprocessed sample customer portraits, and preprocessed sample operation environment data; constructing historical behavior data based on the preprocessed sample operation behavior data, preprocessed sample object portraits, preprocessed sample customer portraits, and preprocessed sample operation environment data.

[0049] It should be noted that the sample prediction object can be part of the sample target objects in the sample historical behavior data, or it can be an object not included in the sample target objects in the sample historical behavior data. The specific sample prediction object can be determined based on actual conditions, and the embodiments of the present application are not limited to this.

[0050] In the embodiment of the present application, the sample prediction result is the operation result of the sample customer on the sample prediction object, which is used to identify whether the sample customer has operated the sample prediction object, and the operation type is specifically click, add to cart, purchase, etc.

[0051] In an embodiment of the present application, the sample historical behavior data includes a first category of sample data, a second category of sample data, and a third category of sample data. The first category of sample data is the sample behavior data (operation behavior data) of sample users in different scenarios. On a macro level, it includes data such as clicks, purchases, and collections of sample users in different scenarios; on a micro level, it includes data such as the time a sample user stays on a certain item, the number of clicks, the number of reposts, and the number of swipes on the main picture of the item. The second category of sample data is the portrait data of the sample user and the portrait data of the item, wherein the portrait data of the sample user mainly includes data such as the age and gender of the sample user; the portrait data of the item mainly includes the store to which the item belongs, the brand brand, the price of the item, the local origin, the exposure expo of the item in different time periods (1 day, 1 week, etc.), clicks, and other data. The third category of sample data is contextual features (sample operating environment data), which mainly includes information such as the time, season, and device number of the sample user's visit to the e-commerce platform. Among them, when the first type of sample data, the second type of sample data and the third type of sample data are obtained, after data preprocessing, the regularized data is stored in the database corresponding to the model training device to prepare for generating the required feature embedding vector representation.

[0052] In the embodiment of the present application, the process of data preprocessing includes data cleaning, conversion and data normalization, etc., to ensure the integrity and consistency of the data. Data cleaning includes processing missing values, abnormal values ​​and repeated values, etc., filling missing values ​​with default values, and deleting or correcting repeated or abnormal values. For example, for the gender attribute of the sample user, 1 can be set for male and 0 for female. For data with missing gender attributes, 3 can be uniformly filled to represent. This type of feature data is also called discrete data. Data conversion is to convert the data to meet the requirements. For example, if the level of a certain item is A, A can be mapped to 1 to facilitate subsequent reading and processing. Data normalization is to scale the data features so that they have the same dimension or range to avoid certain features affecting the prediction results. For example, for the age of the sample user, it can be normalized to 1 for those less than 10 years old, 2 for those greater than or equal to 10 years old and less than 20 years old, and so on. This type of feature data is called continuous data. In summary, continuous data can be discretized by operations such as bucketing, and discrete features with large values ​​can be mapped to a fixed-size feature space by operations such as hashing to reduce feature dimensions, reduce noise and redundancy, and improve the training effect of the click-through rate prediction model.

[0053] S102: Input the sample historical behavior data and the sample prediction object into the initial click rate prediction model to obtain the sample global interest and the sample local interest.

[0054] In an embodiment of the present application, after the model training device obtains the sample historical behavior data, sample prediction objects and sample prediction results of the sample customers, the sample historical behavior data and the sample prediction objects can be input into the initial click-through rate prediction model to obtain the sample global interest and the sample local interest.

[0055] In an embodiment of the present application, the initial click-through rate prediction model can be a model configured in the model training device, or it can be obtained by the model training device through other methods. The specific method in which the model training device obtains the initial click-through rate prediction model can be determined based on actual conditions, and the embodiment of the present application does not limit this.

[0056] In an embodiment of the present application, the initial click rate prediction model includes an initial interest prediction sub-model, which can be used to process sample historical behavior data and sample prediction objects to obtain sample global interest and sample local interest.

[0057] It should be noted that the initial interest prediction sub-model can be a user intent-aware network (Intent-Aware Network, IAN) or other network models. The specific one can be determined according to actual conditions, and the embodiments of the present application do not limit this.

[0058] In an embodiment of the present application, the initial interest prediction sub-model processes the sample historical behavior data and the sample prediction object to obtain the sample global interest and the sample local interest, including: performing vector conversion on the sample historical behavior data to obtain the sample historical behavior vector; obtaining the sample short-term behavior vector from the sample historical behavior vector; determining the sample global interest based on the sample historical behavior vector; determining the sample local interest based on the sample global interest and the sample short-term behavior vector.

[0059] It should be noted that the sample historical behavior data can be vectorized by one-hot encoding to obtain the sample historical behavior vector; the sample historical behavior data can also be vectorized by other vector transformation methods to obtain the sample historical behavior vector; the specific implementation method can be determined according to actual conditions, and the embodiments of the present application are not limited to this.

[0060] In the embodiment of the present application, the initial interest prediction sub-model includes an initial multi-head attention network and an initial forward feedback neural network. The initial multi-head attention network can be used to determine the initial global interest of the sample according to the sample historical behavior vector; the initial forward feedback neural network can be used to perform interference removal on the initial global interest of the sample to obtain the sample global interest.

[0061] In the embodiment of the present application, the initial interest prediction sub-model also includes an initial attention network and an initial multi-layer perception network. The initial attention network can be used to determine the sample current interest vector of the sample prediction object according to the sample global interest and the sample short-term behavior vector; the initial multi-layer perception network can be used to transform the sample current interest vector to obtain the sample local interest.

[0062] In the embodiment of the present application, the behavior sequence input to the user intention perception network IAN (initial interest prediction sub-model) is the most recent K behavior sequences extracted from the long-term behavior sequence of the sample user (sample customer). Different lengths K can be extracted according to different data distributions (here it is mainly obtained by analyzing the approximate distribution of platform data). The behavior data of the last half an hour or so can be used to match the immediate intention of the sample user. Another part of the input of the IAN network is the item representation of the sample user's long-term behavior sequence after Transformer Encoder network modeling, such as Figure 2 The Transformer Encoder Layer shown in the figure. The Transformer Encoder Layer is the Encoder network part of the Transformer model commonly used in the industry. Its internal structure is composed of a multi-head self-attention network layer (initial multi-head attention network), an initial forward feedback neural network layer, and a residual normalization network layer.

[0063] Furthermore, if the behavior sequence (sample historical behavior data) of the sample user is s={v 1 ,v 2 ,…,v k ,…,v n}, where n is the length of the sample historical behavior sequence of the sample user, s l = {v k ,…,v n} represents the sample short-term behavior sequence (sample short-term behavior data, i.e., part of the sample historical behavior data). The set of embedding representations (vector representations) corresponding to the sample historical behavior data and the sample short-term behavior data is E s ={e 1 ,…,e k ,…,e n}(sample historical behavior vector) and E l ={e k ,…,e n}(sample short-term behavior vector). The execution process of the Encoder network is shown in formulas (1)-(2):

[0064]

[0065] Q=K=V=E s (2)

[0066] Formulas (1)-(2) are used to reduce the impact of noise data in the sequence. It plays the role of data normalization to avoid data being too small or too large. d is the dimension of the embedding vector, and softmax is a typical activation function in neural networks.

[0067] Furthermore, the calculation process of determining the initial global interest of the sample using the initial multi-head attention network and the historical behavior vector is shown in formulas (3)-(4):

[0068] S=Multi-head(Q,K,V)=Concat(head 1 ,…,head h )W H (3)

[0069] head i =Attention(Q i ,K i ,V i ) (4)

[0070] It should be noted that W His a parameter matrix whose values ​​are randomly initialized and change with the training of the network. The purpose of the initial multi-head attention network is to extract features of different aspects of the sample user behavior sequence. The calculation process of the initial forward feedback neural network in the encoder network (i.e., using the initial forward feedback neural network to remove interference from the initial global interest of the sample to obtain the sample global interest) is shown in formulas (5)-(6):

[0071] FFN(x)=ReLU(xW 1 +b 1 )W 2 +b 2 (5)

[0072] G global =FFN(S) (6)

[0073] The input of the initial forward feedback neural network is the output S of the initial multi-head attention network. In formula (5), ReLu is a typical activation function in the neural network, and W 1 ,W 2 Yes and W H A similar parameter matrix, b 1 ,b 2 It is a bias parameter established in the neural network to eliminate modeling bias.

[0074] Furthermore, the output of the Encoder network is represented by G global It contains a new embedding vector representation of all items in the user behavior sequence. global Input to the user intention perception network IAN network, the input of the user intention perception network also includes the embedding vector representation E of the local behavior sequence of the sample user l. Because the recent behavior sequence of the sample user reflects the current interest intention of the sample user, it is shorter than the long-term sequence and is easily affected by some events (festivals, birthdays, etc.), so the recent behavior sequence of the sample user changes faster and more complex than the long-term sequence. In summary, in order to generate a stable representation of the immediate intention of the sample user, the long-term behavior sequence can be used to assist in modeling the immediate intention of the sample user to generate a stable short-term sequence representation. The main idea is to use the Transformer Decoder network, which is similar to the Encoder network mentioned above, and regard the local behavior sequence embedding of the sample user as the query Q, and the long-term sequence representation of the sample user as K and V. The specific calculation process (i.e., using the initial attention network, determining the sample current interest vector of the sample prediction object based on the sample global interest and the sample short-term behavior vector; using the initial multi-layer perception network to transform the sample current interest vector to obtain the sample local interest) is shown in formulas (7)-(10):

[0075]

[0076]

[0077] K g =V g =G global (9)

[0078] Q l =E l (10)

[0079] in is the instant intention representation vector of the sample user, L local It is the embedding representation of the sample user's immediate interest vector generated by the sample user's immediate intention vector. MLP is a typical basic network in neural networks. Internally, it actually performs a linear transformation on the intent representation and maps it to the interest space using an activation function.

[0080] S103: train an initial click rate prediction model using the dependency relationship between the sample global interest and the sample local interest and the sample prediction result to obtain a click rate prediction model.

[0081] In an embodiment of the present application, the model training device inputs the sample historical behavior data and the sample prediction object into the initial click-through rate prediction model. After obtaining the sample global interest and the sample local interest, the dependency relationship between the sample global interest and the sample local interest and the sample prediction results can be used to train the initial click-through rate prediction model to obtain the click-through rate prediction model.

[0082] In an embodiment of the present application, a model training device uses the dependency relationship between sample global interests and sample local interests and sample prediction results to train an initial click-through rate prediction model to obtain a process of a click-through rate prediction model, including: the initial click-through rate prediction model determines a sample interest level parameter of a sample customer for a sample prediction object based on the sample global interests and sample local interests; the initial click-through rate prediction model predicts the click rate of the sample prediction object based on the sample interest level parameter to obtain an output prediction result; the model training device uses the sample prediction results, the output prediction results and the initial model parameters of the initial click-through rate prediction model to determine the model loss of the initial click-through rate prediction model; when the model loss is greater than or equal to a preset loss threshold, the initial click-through rate prediction model is continued to be trained using the sample historical behavior data, the sample prediction object and the sample prediction results to obtain a training model, until the training model loss of the training model is less than the preset loss threshold to obtain a click-through rate prediction model.

[0083] In an embodiment of the present application, the preset loss threshold may be a value configured in the model training device, or a value configured in the model training device and transmitted from other devices, or a value obtained by the model training device in other ways. The specific way in which the model training device obtains the preset loss threshold may be determined based on actual conditions, and the embodiment of the present application does not limit this.

[0084] In the embodiment of the present application, the click rate of the sample prediction object is predicted according to the sample interest level parameter, and the process of outputting the prediction result is as shown in formula (11):

[0085]

[0086] It should be noted that the initial click rate prediction model also includes a feedforward neural network MLP, which can generate the user's final score for the candidate item (sample prediction object) (output prediction results, i.e. ). l is the parameter matrix; e int is the sample interest parameter It is obtained through multi-layer MLP operation; l is the number of layers of the MLP network; σ is the activation function, such as the sigmoid function; b l are model parameters, which are randomly initialized at first and then automatically generated as the network is trained.

[0087] In an embodiment of the present application, the process of a model training device determining a sample customer's sample interest level parameter for a sample prediction object based on the sample global interest and the sample local interest includes: determining a sample first interest level parameter based on the sample prediction object and the sample global interest; determining a sample second interest level parameter based on the sample prediction object and the sample local interest; determining a sample interest level parameter based on the sample first interest level parameter and the sample second interest level parameter.

[0088] In an embodiment of the present application, the process of determining the sample first interest level parameter based on the sample prediction object and the sample global interest can be as follows: determining the sample vector of the sample prediction object; determining the first sample similarity between the sample vector and the sample global interest; and determining the sample first interest level parameter based on the first sample similarity and the sample global interest.

[0089] In an embodiment of the present application, the process of determining the sample second interest level parameter based on the sample prediction object and the sample local interest can be to determine the second sample similarity between the sample vector and the sample local interest; and determine the sample second interest level parameter based on the second sample similarity and the sample local interest.

[0090] In the embodiment of the present application, the process of determining the sample interest level parameter according to the sample first interest level parameter and the sample second interest level parameter is as shown in formula (12):

[0091]

[0092] It should be noted that is the first interest level parameter of the sample, is the second interest parameter of the sample, Agg is the aggregation function, and the typical processing method is the concatenation operation, that is, the two vectors Stitched together, is the sample interest level parameter.

[0093] In an embodiment of the present application, a model training device determines a model loss of an initial click-through rate prediction model using sample prediction results, output prediction results, and initial model parameters of an initial click-through rate prediction model, including: updating the sample global interest and the sample local interest according to a dependency relationship between the sample global interest and the sample local interest to obtain an updated sample global interest and an updated sample local interest; determining an interest preference loss according to the updated sample global interest, the updated sample local interest, a sample first interest level parameter, and a sample second interest level parameter; determining a main loss according to the sample prediction results and the output prediction results; obtaining model parameters of the initial click-through rate prediction model; and determining the model loss according to the interest preference loss, the main loss, and the model parameters.

[0094] In the embodiment of the present application, the first hyperparameter (β) and the second hyperparameter (λ) are obtained, the first product between the first hyperparameter and the interest preference loss is determined, the second product between the second hyperparameter and the model parameter is determined, and then the sum of the main loss, the first product and the second product is determined, thereby obtaining the model loss. Other methods can also be used to determine the model loss based on the interest preference loss, the main loss and the model parameters; the specific implementation method can be determined according to the actual situation, and the embodiment of the present application does not limit this.

[0095] In the embodiment of the present application, the generated global interest representation of the sample user (updated sample global interest) is global and local interest representation (updated sample local interest) e local Input to Figure 2 A self-supervised learning layer is added to further remove noise information from the features. Figure 2 In (sample second interest level parameter) and (The first interest level parameter of the sample) is the local interest representation L local and the global interest representation G global For candidate items (sample prediction objects) e tar , and the interest representation vector generated by the Transformer Decoder operation in the initial click rate prediction model. The self-supervised learning layer in the initial click rate prediction model mainly constructs auxiliary tasks during the network training process and assists the learning of the main network by optimizing the loss function. The specific implementation method is shown in formulas (13)-(16):

[0096]

[0097]

[0098]

[0099]

[0100] The main purpose is to make the distance between representation vectors that model the same interest (long-term or short-term) smaller than the distance between representation vectors of different interests.

[0101] Furthermore, the classic BPR loss function of deep learning in the initial click rate prediction model is used to integrate the above distance (Formulas (13)-(16)) into the model training. The specific method of determining the interest preference loss (BPR loss) is shown in Formula (17):

[0102]

[0103] It should be noted that when formula (13) is incorporated into formula 26, a is (sample first interest level parameter), p is e global (Updated sample global interest), q is e local (Updated sample local interest). When formula (14) is incorporated into formula 26, a is e global , p is q is (sample second interest level parameter). When formula (15) is incorporated into formula 26, a is p is e local , q is e global When formula (16) is incorporated into formula 26, a is e local , p is q is

[0104] It should be noted that the process of determining the interest preference loss is as shown in formulas (13)-(17) based on the updated sample global interest, the updated sample local interest, the sample first interest level parameter and the sample second interest level parameter.

[0105] In the embodiment of the present application, the loss function (model loss) is determined according to the interest preference loss, the main loss and the model parameters. ), as shown in formulas (18)-(19):

[0106]

[0107]

[0108] Among them, y is the real label (sample prediction result), which indicates whether the sample user clicks on the candidate item (sample prediction object). To output the prediction results, λ and β are hyperparameters. is the set of training samples, |Θ| 2 Model parameters for the initial click rate prediction model.

[0109] In an embodiment of the present application, a model training device updates the sample global interest and the sample local interest according to the dependency relationship between the sample global interest and the sample local interest to obtain an updated sample global interest and an updated sample local interest, the process comprising: determining an association matrix according to the sample global interest and the sample local interest; mapping the sample global interest to the global space using the association matrix to obtain an updated sample global interest; mapping the sample local interest to the local space using the association matrix to obtain an updated sample local interest.

[0110] It should be noted that both the global interest of the sample and the local interest of the sample can be represented by vectors, or by other forms of expression, which can be determined based on actual conditions, and the embodiments of the present application do not limit this.

[0111] In an embodiment of the present application, a vector transposition process can be first performed on the representation vector of the sample global interest to obtain the transpose of the sample global interest vector, and the product between the transpose of the sample global interest vector, the third parameter matrix and the representation vector of the sample local interest can be determined. Then, the product can be processed using the activation function in the neural network to obtain the association matrix.

[0112] It should be noted that the third parameter matrix is ​​a randomly initialized parameter matrix.

[0113] In an embodiment of the present application, the model training device uses an association matrix to map the sample global interest to the global space to obtain an updated sample global interest, including: determining a sample vector corresponding to a sample prediction object; updating the sample global interest according to the sample vector, the sample local interest and the association matrix to obtain an updated sample global interest.

[0114] In the embodiment of the present application, the model training device can encode the sample prediction object to obtain a sample vector. Specifically, the sample prediction object can be encoded by one-hot encoding to obtain a sample vector; the sample vector corresponding to the sample prediction object can also be determined by other methods; the specific implementation method can be determined according to the actual situation, and the embodiment of the present application does not limit this.

[0115] In an embodiment of the present application, the model training device uses an association matrix to map the sample local interest to the local space to obtain an updated sample local interest, including: updating the sample local interest according to the sample vector, the sample global vector and the association matrix to obtain an updated sample local interest.

[0116] In the embodiment of the present application, an exemplary mutual attention network structure diagram is as follows: Figure 3 As shown: From left to right, in order to model the dynamic relationship between the sample global interest representation and the sample local interest representation, the association matrix M is established A , specifically according to the sample global interest (G global ) and sample local interest (L local ) The method of determining the correlation matrix is ​​shown in formula (20):

[0117]

[0118] Among them, the third parameter matrix W 3is a randomly initialized parameter matrix, and tanh is a typical activation function in neural networks.

[0119] Further, such as Figure 3 As shown, after obtaining the correlation matrix M A Afterwards, the association matrix can be used to convert the sample local interest L local and the sample global interest G global Each is mapped to the corresponding space to realize the process of updating the sample global interest and sample local interest. The sample global interest is updated according to the sample vector, sample local interest and association matrix to obtain the updated sample global interest (e global ), as shown in formulas (21)-(24):

[0120]

[0121]

[0122]

[0123]

[0124] It should be noted that all W in formulas (21)-(24) are parameter matrices of the model, and the values ​​are generated by random initialization. is the transposed vector of the embedding representation of the candidate item (sample prediction object) (i.e., the transposed sample vector). global It is a brand new representation of the sample global interest that integrates the sample local interest representation (i.e., the updated sample global interest).

[0125] In the embodiments of the present application, Figure 3 As shown in FIG. 1 , based on the operation of obtaining the updated sample global interest, the representation of the sample local interest incorporating the sample global interaction features can be generated in the same way (i.e., the sample local interest is updated according to the sample vector, the sample global vector and the association matrix to obtain the updated sample local interest (e local ), the calculation process is shown in formulas (25)-(28):

[0126] H l =tanh(W 5 L local +W 6 e n +(W 4 G global )M A ) (25)

[0127]

[0128]

[0129]

[0130] It should be noted that the initial click rate prediction model also includes the initial mutual attention sub-model (Co-Attention Network, CAN). All W in formulas (25)-(28) are parameter matrices of the initial mutual attention model, e local is the representation of the new sample local interest (updated sample local interest), e n is the data in the sample historical behavior vector.

[0131] For example, Figure 4 As shown: obtain sample historical behavior data, sample prediction objects and sample prediction results of sample customers (data acquisition); input the sample historical behavior data and sample prediction objects into the initial click-through rate prediction model to obtain sample global interests and sample local interests (data preprocessing, generate embedding vectors of users, items, etc., and model the user intention perception network of user immediate intentions); according to the dependency relationship between the sample global interests and the sample local interests, update the sample global interests and the sample local interests to obtain updated sample global interests and updated sample local interests (modeling the mutual attention network of user long-term and short-term interest interactions); according to the updated sample global interests, the updated sample local interests, the sample first interest level parameters, the sample second interest level parameters, the sample prediction results, the output prediction results and the model parameters of the initial click-through rate prediction model, determine the model loss of the initial click-through rate prediction model, and when the model loss is greater than or equal to the preset loss threshold, continue to train the initial click-through rate prediction model to obtain the training model, until the training model loss of the training model is less than the preset loss threshold, and obtain the click-through rate prediction model. When receiving a click rate prediction instruction from a target customer for a prediction object, the historical behavior data of the target customer is obtained; the historical behavior data and the object to be predicted are input into a click rate prediction model, and the click rate prediction result is obtained and output (the output model's score for the candidate item).

[0132] It can be understood that the model training device determines the sample local interests of the sample customers based on the sample historical behavior data, that is, determines the sample short-term interests of the sample users, so as to alleviate the situation where the current behavior sequence information of the sample users is diluted or masked by the information represented by the overly long sample historical behavior sequence; then the initial click-through rate prediction model is trained according to the dependency relationship between the sample global interest and the sample local interest and the sample prediction results, so that in the process of model training, the behavior of the sample local interest can be used to activate the related interest behavior in the behavior of the sample global interest. When the behavior of the sample local interest is sparse, the behavior of the sample global interest can be used as a supplement to the behavior of the sample local interest, making the sample local interest more stable and accurate, thereby obtaining a highly accurate click-through rate prediction model, and using the highly accurate click-through rate prediction model to perform click-through rate prediction, the accuracy of click-through rate prediction is improved.

[0133] The present application embodiment provides a click rate prediction method, and the click rate prediction method is applied to a click rate prediction device. Figure 5 A flow chart of a click rate prediction method provided in an embodiment of the present application is as follows: Figure 5 As shown, the click rate prediction method may include:

[0134] S201 . Upon receiving a click rate prediction instruction from a target customer for a prediction object, obtaining historical behavior data of the target customer.

[0135] A click rate prediction method provided in an embodiment of the present application is applicable to a scenario in which the click rate of an object to be predicted is predicted.

[0136] In the embodiments of the present application, the click rate prediction device can be implemented in various forms. For example, the click rate prediction device described in the present application can include devices such as mobile phones, cameras, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, and devices such as digital TVs, desktop computers, and servers.

[0137] In the embodiment of the present application, the target customer may be a user. The object to be predicted may be a commodity, that is, a product sold in an e-commerce application (APP). The historical behavior data is the operation behavior data of the target customer in the e-commerce APP over a period of time in history, including the operation behavior data of the target customer on the commodity (target object) in the e-commerce APP such as clicks, add-to-cart, and favorites in a quarter of history.

[0138] It should be noted that historical behavior data includes customer portraits of target customers, object portraits (product portraits) of target objects (products that have been historically operated), operational behavior data of target customers when operating target objects (behavioral data such as clicks, purchases, and collections of products), and operating environment data (including the time, season, and device number of users’ access to the platform).

[0139] In an embodiment of the present application, the click-through rate prediction device can obtain historical behavior data in a database corresponding to the e-commerce APP; it can also obtain historical behavior data through the area indicated by the click-through rate prediction instruction; it can also obtain historical behavior data from the information carried in the click-through rate prediction instruction; the specific way in which the click-through rate prediction device obtains historical behavior data can be determined based on actual conditions, and the embodiment of the present application does not limit this.

[0140] In the embodiment of the present application, the number of objects to be predicted may be one or more. The specific number of objects to be predicted may be determined according to actual conditions, and the embodiment of the present application does not limit this.

[0141] In an embodiment of the present application, the process of the click-through rate prediction device obtaining the historical behavior data of the target customer includes: obtaining the object portrait corresponding to the target object that the target customer has historically operated, the customer portrait of the target customer, the operation behavior data of the target customer when operating the target object, and the operation environment data; preprocessing the operation behavior data, object portrait, customer portrait, and operation environment data respectively to obtain preprocessed operation behavior data, preprocessed object portrait, preprocessed customer portrait, and preprocessed operation environment data; constructing historical behavior data based on the preprocessed operation behavior data, preprocessed object portrait, preprocessed customer portrait, and preprocessed operation environment data.

[0142] In the embodiment of the present application, the historical behavior data includes the first category of data, the second category of data and the third category of data. The first category of data is the behavior data (operation behavior data) of users in different scenarios. On a macro level, it includes the clicks, purchases, collections and other data of users in different scenarios; on a micro level, it includes the specific time a user stays on a certain item, the number of clicks, the number of forwardings and the number of slides on the main picture of the item. The second category of data is the user's portrait data and the item's portrait data, wherein the user's portrait data mainly includes the user's age, gender and other data; the item's portrait data mainly includes the store to which the item belongs, the brand brand, the price of the item, the local origin, the exposure expo of the item in different time periods (1 day, 1 week, etc.), clicks and other data. The third category of data is contextual features (operation environment data), which mainly includes information such as the time, season and device number of the user's visit to the platform. Among them, when the first category of data, the second category of data and the third category of data are obtained, the regularized data is stored in the database corresponding to the click-through rate prediction device after data preprocessing, in order to generate the required feature embedding vector representation.

[0143] S202: Input the historical behavior data into a click rate prediction model to obtain the global interest and local interest of the target customers.

[0144] In the embodiment of the present application, after the click rate prediction device obtains the historical behavior data of the target customer, the historical behavior data can be input into the click rate prediction model to obtain the global interest and local interest of the target customer.

[0145] It should be noted that the click rate prediction model is a model obtained by modeling the dependency relationship between the sample global interest and the sample local interest; the sample global interest and the sample local interest are determined based on the sample historical behavior data.

[0146] In an embodiment of the present application, a click-through rate prediction device inputs historical behavior data into a click-through rate prediction model to obtain a target customer's global interest and local interest, including: the click-through rate prediction model performs vector conversion on the historical behavior data to obtain a historical behavior vector; obtains a short-term behavior vector from the historical behavior vector; determines the global interest based on the historical behavior vector; and determines the local interest based on the global interest and the short-term behavior vector.

[0147] In the embodiment of the present application, the click rate prediction model includes an interest prediction sub-model. The interest prediction sub-model can be used to determine the global interest according to the historical behavior vector; and determine the local interest according to the global interest and the short-term behavior vector.

[0148] It should be noted that the interest prediction sub-model can be a user intent-aware network (Intent-Aware Network, IAN) or other network models. The specific one can be determined according to actual conditions, and the embodiments of the present application do not limit this.

[0149] In an embodiment of the present application, the historical behavior data can be vectorized by One-Hot Encoding to obtain the historical behavior vector; the historical behavior data can also be vectorized by other methods to obtain the historical behavior vector; the specific method of vectorizing the historical behavior data to obtain the historical behavior vector can be determined according to actual conditions, and the embodiment of the present application is not limited to this.

[0150] For example, the user's age group is divided into 10 buckets according to the operation of S1, where the embedding vector of people under 10 years old can be expressed as (1, 0, 0, 0, 0, 0, 0, 0, 0, 0), and the embedding vector of people over 100 years old is expressed as (0, 0, 0, 0, 0, 0, 0, 0, 0, 1). For another example, the user's gender can be represented by a three-dimensional vector, with male as (1, 0, 0), female as (0, 1, 0), and the embedding vector of unknown gender as (0, 0, 1). Other features can be deduced by analogy.

[0151] In the embodiment of the present application, the process of the click rate prediction device determining the global interest based on the historical behavior vector includes: using a multi-head attention network to determine the initial global interest based on the historical behavior vector; using a forward feedback neural network to remove interference from the initial global interest to obtain the global interest.

[0152] In an embodiment of the present application, the interest prediction sub-model includes a multi-head attention network and a feed-forward neural network.

[0153] In an embodiment of the present application, the process of the click rate prediction device determining the local interest based on the global interest and the short-term behavior vector includes: using the attention network to determine the current interest vector of the target object based on the global interest and the short-term behavior vector; using the multi-layer perception network to transform the current interest vector to obtain the local interest.

[0154] In an embodiment of the present application, the interest prediction sub-model also includes an attention network and a multi-layer perception network.

[0155] In the embodiment of the present application, if the user's behavior sequence (historical behavior data) is s={v 1 ,v 2 ,…,v k ,…,v n}, where n is the length of the user's historical behavior sequence, sl = {v k ,…,v n} represents a short-term behavior sequence (short-term behavior data, i.e., part of the historical behavior data). The set of embedding representations (vectorized representations) corresponding to the historical behavior data and the short-term behavior data is E s ={e 1 ,…,e k ,…,e n}(historical behavior vector) and E l ={e k ,…,e n}(short-term behavior vector). The execution process of the Encoder network is shown in formulas (1)-(2):

[0156]

[0157] Q=K=V=E s (2)

[0158] Formulas (1)-(2) are used to reduce the impact of noise data in the sequence. It plays the role of data normalization to avoid data being too small or too large. d is the dimension of the embedding vector, and softmax is a typical activation function in neural networks.

[0159] Furthermore, the calculation process of determining the initial global interest (i.e., multi-head attention network) based on the historical behavior vector is shown in formulas (3)-(4):

[0160] S=Multi-head(Q,K,V)=Concat(head 1 ,…,head h )W H (3)

[0161] head i =Attention(Q i ,K i ,V i ) (4)

[0162] It should be noted that W H is a parameter matrix whose values ​​are randomly initialized and change as the network is trained. The purpose of the multi-head attention network is to extract features of different aspects of the user behavior sequence. The calculation process of the feedforward neural network in the encoder network (i.e., using the feedforward neural network to remove interference from the initial global interest to obtain the global interest) is shown in formulas (5)-(6):

[0163] FFN(x)=ReLU(xW 1 +b 1 )W 2 +b 2 (5)

[0164] G global =FFN(S) (6)

[0165] The input of the feedforward neural network is the output S of the multi-head attention network. In formula (5), ReLu is a typical activation function in the neural network, and W 1 ,W 2 Yes and W H Similar parameter matrix, b 1 ,b 2 It is a bias parameter established in the neural network to eliminate modeling bias.

[0166] Furthermore, the output of the Encoder network is represented by G global It contains a new embedding vector representation of all items in the user behavior sequence. global Input to the user intention perception network IAN network, the input of the user intention perception network also includes the embedding vector representation E of the user's local behavior sequence l . Because the user's recent behavior sequence reflects the user's current interest intention, it is shorter than the long-term sequence and is easily affected by some events (festivals, birthdays, etc.), so the user's recent behavior sequence changes faster and more complex than the long-term sequence. In summary, in order to generate a stable representation of the user's immediate intention, the long-term behavior sequence can be used to assist in modeling the user's immediate intention to generate a stable short-term sequence representation. The main idea is to use the Transformer Decoder network, which is similar to the Encoder network mentioned above. The user's local behavior sequence embedding is regarded as the query Q, and the user's long-term sequence representation is used as K and V. The specific calculation process (i.e., using the attention network to determine the current interest vector of the target object based on the global interest and short-term behavior vector; using the multi-layer perception network to transform the current interest vector to obtain the local interest) is shown in formulas (7)-(10):

[0167]

[0168]

[0169] K g =V g =G global (9)

[0170] Q l =El (10)

[0171] It should be noted that is the user's immediate intention representation vector, L local It is the embedding representation of the user's immediate interest vector generated by the user's immediate intention vector.

[0172] S203 , predicting the click rate of the object to be predicted according to the global interest and the local interest, and obtaining a click rate prediction result.

[0173] In an embodiment of the present application, the click-through rate prediction device inputs historical behavior data into a click-through rate prediction model, and after obtaining the global interest and local interest of the target customer, the click-through rate prediction of the prediction object can be performed based on the global interest and local interest to obtain a click-through rate prediction result.

[0174] In an embodiment of the present application, the click-through rate prediction device also includes a mutual attention sub-model, which can use the mutual attention sub-model (Co-Attention Network, CAN) to determine the target customer's target interest level parameters for the predicted object based on global interest and local interest, and then perform click-through rate prediction on the predicted object based on the target interest level parameters to obtain a click-through rate prediction result.

[0175] In an embodiment of the present application, a click-through rate prediction device predicts the click-through rate of a prediction object based on global interests and local interests to obtain a click-through rate prediction result, including: determining a target interest level parameter of a target customer for the prediction object based on global interests and local interests; predicting the click-through rate of the prediction object based on the target interest level parameter to obtain a click-through rate prediction result.

[0176] In an embodiment of the present application, the process of a click-through rate prediction device determining a target customer's target interest level parameter for a predicted object based on global interest and local interest includes: determining a first similarity between a vector to be detected corresponding to the predicted object and the global interest; determining a first interest level parameter based on the first similarity and the global interest; determining a second similarity between the vector to be detected and the local interest; determining a second interest level parameter based on the second similarity and the local interest; and determining a target interest level parameter based on the first interest level parameter and the second interest level parameter.

[0177] In an embodiment of the present application, the cosine similarity between the vector to be detected and the global interest can be determined to obtain a first similarity; the Euclidean distance between the vector to be detected and the global interest can be determined to obtain a first similarity; the Pearson correlation coefficient between the vector to be detected and the global interest can also be determined to obtain a first similarity; the first similarity between the vector to be detected and the global interest can also be determined by other methods; the specific implementation method can be determined according to actual conditions, and the embodiment of the present application is not limited to this.

[0178] In the embodiment of the present application, the manner of determining the first similarity between the vector to be detected and the global interest is the same as the manner of determining the second similarity between the vector to be detected and the local interest.

[0179] In the embodiment of the present application, the manner of determining the first interest level parameter according to the first similarity and the global interest is the same as the manner of determining the second interest level parameter according to the second similarity and the local interest.

[0180] In the embodiment of the present application, the process of determining the target interest level parameter based on the first interest level parameter and the second interest level parameter can be to concatenate the first interest level parameter and the second interest level parameter to obtain the target interest level parameter; or the target interest level parameter can be determined based on the first interest level parameter and the second interest level parameter in other ways; the specific implementation method can be determined according to actual conditions, and the embodiment of the present application is not limited to this.

[0181] In this embodiment of the present application, the vector corresponding to the second interest level parameter The vector corresponding to the first interest level parameter They are local interests L local and global interest G global For candidate items (objects to be predicted) tar , and the interest representation vector generated by the Transformer Decoder operation.

[0182] In the embodiment of the present application, the target interest level parameter ( The process of the final user interest representation is shown in formula (12):

[0183]

[0184] Among them, in formula (12) is the first interest level parameter, is the second interest level parameter, and the two vectors are aggregated by the aggregation function Agg. The feedforward neural network MLP in the click-through rate prediction model is used to generate the user's final score for the candidate item (the object to be predicted) (the click-through rate prediction result, i.e. ), the calculation method is shown in formula (11):

[0185]

[0186] It should be noted that W l is the parameter matrix of the click rate prediction model; e int is the target interest level parameter It is obtained through multi-layer MLP operation; l is the number of layers of the MLP network; σ is the activation function b l are model parameters, which are randomly initialized at first and then automatically generated as the network is trained.

[0187] It can be understood that the click-through rate prediction model in the click-through rate prediction device is a model obtained by modeling the dependency relationship between the sample global interest and the sample local interest. The sample global interest and the sample local interest are determined based on the sample historical behavior data, so that in the process of model training, the sample local interest behavior can be used to activate the related interest behavior in the sample global interest behavior. When the sample local interest behavior is sparse, the sample global interest behavior can be used as a supplement to the sample local interest behavior, making the sample local interest more stable and accurate, thereby obtaining a highly accurate click-through rate prediction model. The highly accurate click-through rate prediction model is used to determine the accurate global interest and local interest based on the historical behavior data of the target customer, that is, to determine the short-term interest of the target customer, so as to alleviate the situation where the current behavior sequence information of the sample user is diluted or masked by the information represented by the too long sample historical behavior sequence, thereby improving the accuracy of determining the click-through rate prediction result.

[0188] Based on the same inventive concept as the above-mentioned model training method, the embodiment of the present application provides a model training device 1, corresponding to a model training method; Figure 6 A schematic diagram of the structure of a model training device provided in an embodiment of the present application Figure 1 , the model training device 1 may include:

[0189] The first acquisition unit 11 is used to acquire sample historical behavior data, sample prediction objects and sample prediction results of sample customers;

[0190] A first input unit 12 is used to input the sample historical behavior data and the sample prediction object into an initial click rate prediction model to obtain sample global interest and sample local interest;

[0191] The training unit 13 is used to train the initial click rate prediction model by using the dependency relationship between the sample global interest and the sample local interest and the sample prediction result to obtain the click rate prediction model.

[0192] In some embodiments of the present application, the apparatus further includes a first determining unit and a second predicting unit;

[0193] The first determination unit is used to determine the sample interest degree parameter of the sample customer for the sample prediction object according to the sample global interest and the sample local interest; and determine the model loss of the initial click rate prediction model using the sample prediction result, the output prediction result and the initial model parameters of the initial click rate prediction model;

[0194] The second prediction unit is used to predict the click rate of the sample prediction object according to the sample interest level parameter to obtain an output prediction result;

[0195] The training unit 13 is used to continue training the initial click-through rate prediction model using the sample historical behavior data, sample prediction objects and sample prediction results to obtain a training model when the model loss is greater than or equal to a preset loss threshold, until the training model loss of the training model is less than the preset loss threshold, thereby obtaining the click-through rate prediction model.

[0196] In some embodiments of the present application, the first determination unit is used to determine a first interest level parameter of the sample based on the sample prediction object and the sample global interest; determine a second interest level parameter of the sample based on the sample prediction object and the sample local interest; and determine the sample interest level parameter based on the sample first interest level parameter and the sample second interest level parameter.

[0197] In some embodiments of the present application, the apparatus further includes a first updating unit;

[0198] The first updating unit is used to update the sample global interest and the sample local interest according to the dependency relationship between the sample global interest and the sample local interest to obtain an updated sample global interest and an updated sample local interest;

[0199] The first determination unit is used to determine the interest preference loss according to the updated sample global interest, the updated sample local interest, the sample first interest level parameter and the sample second interest level parameter; determine the main loss according to the sample prediction result and the output prediction result; determine the model loss according to the interest preference loss, the main loss and the model parameter;

[0200] The first acquisition unit 11 is used to acquire model parameters of the initial click rate prediction model.

[0201] In some embodiments of the present application, the apparatus further includes a first mapping unit;

[0202] The first determining unit is used to determine a correlation matrix according to the sample global interest and the sample local interest;

[0203] The first mapping unit is used to map the sample global interest to the global space using the association matrix to obtain the updated sample global interest; and map the sample local interest to the local space using the association matrix to obtain the updated sample local interest.

[0204] In some embodiments of the present application, the first determining unit is used to determine a sample vector corresponding to the sample prediction object;

[0205] The first updating unit is used to update the sample global interest according to the sample vector, the sample local interest and the association matrix to obtain the updated sample global interest.

[0206] In some embodiments of the present application, the first updating unit is used to update the sample local interest according to the sample vector, the sample global vector and the association matrix to obtain the updated sample local interest.

[0207] It should be noted that, in actual applications, the above-mentioned first acquisition unit 11, first input unit 12 and training unit 13 can be implemented by the first processor 14 on the model training device 1, specifically a CPU (Central Processing Unit), MPU (Microprocessor Unit), DSP (Digital Signal Processing) or a field programmable gate array (FPGA); the above-mentioned data storage can be implemented by the first memory 15 on the model training device 1.

[0208] The present application also provides a model training device 1, such as Figure 7 As shown, the model training device 1 includes: a first processor 14, a first memory 15 and a first communication bus 16. The first memory 15 communicates with the first processor 14 through the first communication bus 16. The first memory 15 stores a program executable by the first processor 14. When the program is executed, the model training method described above is executed by the first processor 14.

[0209] In practical applications, the first memory 15 may be a volatile memory, such as a random access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above types of memories, and provide instructions and data to the first processor 14.

[0210] An embodiment of the present application provides a computer-readable storage medium having a computer program thereon, which, when executed by the first processor 14, implements the model training method as described above.

[0211] It can be understood that the model training device determines the sample local interests of the sample customers based on the sample historical behavior data, that is, determines the sample short-term interests of the sample users, so as to alleviate the situation where the current behavior sequence information of the sample users is diluted or masked by the information represented by the overly long sample historical behavior sequence; then the initial click-through rate prediction model is trained according to the dependency relationship between the sample global interest and the sample local interest and the sample prediction results, so that in the process of model training, the behavior of the sample local interest can be used to activate the related interest behavior in the behavior of the sample global interest. When the behavior of the sample local interest is sparse, the behavior of the sample global interest can be used as a supplement to the behavior of the sample local interest, making the sample local interest more stable and accurate, thereby obtaining a highly accurate click-through rate prediction model, and using the highly accurate click-through rate prediction model to perform click-through rate prediction, the accuracy of click-through rate prediction is improved.

[0212] Based on the same inventive concept as the above-mentioned click rate prediction method, the embodiment of the present application provides a click rate prediction device 2, corresponding to a click rate prediction method; Figure 8 A schematic diagram of the structure of a click rate prediction device provided in an embodiment of the present application Figure 1 , the click rate prediction device 2 may include:

[0213] The second acquisition unit 21 is used to acquire the historical behavior data of the target customer when receiving the click rate prediction instruction of the target customer for the prediction object;

[0214] The second input unit 22 is used to input the historical behavior data into the click rate prediction model to obtain the global interest and local interest of the target customer; the click rate prediction model is a model obtained by modeling the dependency relationship between the sample global interest and the sample local interest; the sample global interest and the sample local interest are determined according to the sample historical behavior data;

[0215] The first prediction unit 23 is used to predict the click rate of the object to be predicted according to the global interest and the local interest to obtain a click rate prediction result.

[0216] In some embodiments of the present application, the apparatus further includes a second determining unit;

[0217] The second determining unit is used to determine a target interest degree parameter of the target customer for the object to be predicted according to the global interest and the local interest;

[0218] The first prediction unit 23 is used to predict the click rate of the object to be predicted according to the global interest and the local interest to obtain a click rate prediction result.

[0219] In some embodiments of the present application, the second determination unit is used to determine a first similarity between the vector to be detected corresponding to the object to be predicted and the global interest; determine a first interest level parameter based on the first similarity and the global interest; determine a second similarity between the vector to be detected and the local interest; determine a second interest level parameter based on the second similarity and the local interest; and determine the target interest level parameter based on the first interest level parameter and the second interest level parameter.

[0220] In some embodiments of the present application, the device further comprises a conversion unit;

[0221] The conversion unit is used to perform vector conversion on the historical behavior data to obtain a historical behavior vector;

[0222] The second acquisition unit 21 is used to acquire a short-term behavior vector from the historical behavior vector;

[0223] The second determining unit is configured to determine the global interest according to the historical behavior vector; and determine the local interest according to the global interest and the short-term behavior vector.

[0224] In some embodiments of the present application, the apparatus further comprises a processing unit;

[0225] The second determination unit is used to determine the initial global interest according to the historical behavior vector using a multi-head attention network;

[0226] The processing unit is used to perform interference removal processing on the initial global interest by using a forward feedback neural network to obtain the global interest.

[0227] In some embodiments of the present application, the second determining unit is used to determine the current interest vector of the target object according to the global interest and the short-term behavior vector using an attention network;

[0228] The conversion unit is used to transform the current interest vector using a multi-layer perception network to obtain the local interest.

[0229] It should be noted that, in actual applications, the above-mentioned second acquisition unit 21, second input unit 22, and first prediction unit 23 can be implemented by the second processor 24 on the click-through rate prediction device 2, specifically a CPU (Central Processing Unit), an MPU (Microprocessor Unit), a DSP (Digital Signal Processing) or a field programmable gate array (FPGA); the above-mentioned data storage can be implemented by the second memory 25 on the click-through rate prediction device 2.

[0230] The present application embodiment also provides a click rate prediction device 2, such as Fig. 9 As shown, the click rate prediction device 2 includes: a second processor 24, a second memory 25 and a second communication bus 26. The second memory 25 communicates with the second processor 24 via the second communication bus 26. The second memory 25 stores a program executable by the second processor 24. When the program is executed, the click rate prediction method described above is executed by the second processor 24.

[0231] In practical applications, the second memory 25 may be a volatile memory, such as a random access memory (RAM); or 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 a combination of the above types of memories, and provide instructions and data to the second processor 24.

[0232] The embodiment of the present application provides a computer-readable storage medium having a computer program thereon, and when the program is executed by the second processor 24, the click rate prediction method as described above is implemented.

[0233] It can be understood that the click-through rate prediction model in the click-through rate prediction device is a model obtained by modeling the dependency relationship between the sample global interest and the sample local interest. The sample global interest and the sample local interest are determined based on the sample historical behavior data, so that in the process of model training, the sample local interest behavior can be used to activate the relevant interest behavior in the sample global interest behavior. When the sample local interest behavior is sparse, the sample global interest behavior can be used as a supplement to the sample local interest behavior, making the sample local interest more stable and accurate, thereby obtaining a highly accurate click-through rate prediction model. The highly accurate click-through rate prediction model is used to determine the accurate global interest and local interest based on the historical behavior data of the target customer, that is, to determine the short-term interest of the target customer, so as to alleviate the situation where the current behavior sequence information of the sample user is diluted or masked by the information represented by the excessively long sample historical behavior sequence, thereby improving the accuracy of determining the click-through rate prediction result.

[0234] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0235] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0236] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0237] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0238] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. A model training method, It is characterized in that The method comprises: Obtain sample historical behavior data, sample prediction objects and sample prediction results of sample customers; Inputting the sample historical behavior data and the sample prediction object into an initial click rate prediction model to obtain sample global interest and sample local interest; The initial click rate prediction model is trained by utilizing the dependency relationship between the sample global interest and the sample local interest and the sample prediction result to obtain the click rate prediction model.

2. The method according to claim 1, It is characterized in that The using the dependency relationship between the sample global interest and the sample local interest and the sample prediction result to train the initial click rate prediction model to obtain the click rate prediction model includes: Determining a sample interest degree parameter of the sample customer for the sample prediction object according to the sample global interest and the sample local interest; According to the sample interest level parameter, click rate prediction is performed on the sample prediction object to obtain an output prediction result; Determine the model loss of the initial click rate prediction model using the sample prediction result, the output prediction result and the initial model parameters of the initial click rate prediction model; When the model loss is greater than or equal to a preset loss threshold, the initial click-through rate prediction model is continued to be trained using the sample historical behavior data, sample prediction objects and sample prediction results to obtain a training model, until the training model loss of the training model is less than the preset loss threshold to obtain the click-through rate prediction model.

3. The method according to claim 2, It is characterized in that The determining of the sample interest level parameter of the sample customer for the sample prediction object according to the sample global interest and the sample local interest includes: Determining a first interest level parameter of the sample according to the sample prediction object and the sample global interest; Determining a second interest level parameter of the sample according to the sample prediction object and the sample local interest; The sample interest level parameter is determined according to the sample first interest level parameter and the sample second interest level parameter.

4. The method according to claim 2, It is characterized in that The determining the model loss of the initial click rate prediction model by using the sample prediction result, the output prediction result and the initial model parameters of the initial click rate prediction model includes: According to the dependency relationship between the sample global interest and the sample local interest, the sample global interest and the sample local interest are updated to obtain an updated sample global interest and an updated sample local interest; Determining the interest preference loss according to the updated sample global interest, the updated sample local interest, the sample first interest level parameter and the sample second interest level parameter; Determining a main loss according to the sample prediction result and the output prediction result; Obtaining model parameters of the initial click rate prediction model; The model loss is determined according to the interest preference loss, the main loss and the model parameters.

5. The method according to claim 4, It is characterized in that The updating of the sample global interest and the sample local interest according to the dependency relationship between the sample global interest and the sample local interest to obtain the updated sample global interest and the updated sample local interest includes: Determining a correlation matrix according to the sample global interest and the sample local interest; Mapping the sample global interest to a global space using the association matrix to obtain the updated sample global interest; The sample local interest is mapped to a local space using the association matrix to obtain the updated sample local interest.

6. The method according to claim 5, It is characterized in that The using the association matrix to map the sample global interest to a global space to obtain the updated sample global interest includes: Determine a sample vector corresponding to the sample prediction object; The sample global interest is updated according to the sample vector, the sample local interest and the association matrix to obtain the updated sample global interest.

7. The method according to claim 5, It is characterized in that The using the association matrix to map the sample local interest to a local space to obtain the updated sample local interest includes: The sample local interest is updated according to the sample vector, the sample global vector and the association matrix to obtain the updated sample local interest.

8. A click rate prediction method, It is characterized in that The method comprises: Upon receiving a click rate prediction instruction from a target customer for a prediction object, obtaining historical behavior data of the target customer; Inputting the historical behavior data into a click rate prediction model to obtain the global interest and local interest of the target customer; the click rate prediction model is a model obtained by modeling the dependency relationship between the sample global interest and the sample local interest; the sample global interest and the sample local interest are determined according to the sample historical behavior data; The click rate of the object to be predicted is predicted according to the global interest and the local interest to obtain a click rate prediction result.

9. The method according to claim 8, It is characterized in that The step of performing click rate prediction on the object to be predicted according to the global interest and the local interest to obtain a click rate prediction result includes: Determining a target interest degree parameter of the target customer for the object to be predicted according to the global interest and the local interest; The click rate of the object to be predicted is predicted according to the target interest level parameter to obtain a click rate prediction result.

10. The method according to claim 9, It is characterized in that The step of determining the target customer's target interest level parameter for the object to be predicted based on the global interest and the local interest includes: Determining a first similarity between the vector to be detected corresponding to the object to be predicted and the global interest; determining a first interest level parameter according to the first similarity and the global interest; Determining a second similarity between the vector to be detected and the local interest; determining a second interest level parameter according to the second similarity and the local interest; The target interest level parameter is determined according to the first interest level parameter and the second interest level parameter.

11. The method according to claim 8, It is characterized in that The step of inputting the historical behavior data into a click rate prediction model to obtain the global interest and local interest of the target customer includes: Performing vector conversion on the historical behavior data to obtain a historical behavior vector; Obtaining a short-term behavior vector from the historical behavior vector; determining the global interest according to the historical behavior vector; The local interest is determined according to the global interest and the short-term behavior vector.

12. The method according to claim 11, It is characterized in that The determining the global interest according to the historical behavior vector comprises: Determine an initial global interest based on the historical behavior vector using a multi-head attention network; The initial global interest is subjected to interference removal processing by using a forward feedback neural network to obtain the global interest.

13. The method according to claim 11, It is characterized in that The determining the local interest according to the global interest and the short-term behavior vector comprises: Determine a current interest vector of the target object according to the global interest and the short-term behavior vector using an attention network; The current interest vector is transformed by using a multi-layer perception network to obtain the local interest.

14. A model training device, It is characterized in that The device comprises: A first acquisition unit is used to acquire sample historical behavior data, sample prediction objects and sample prediction results of sample customers; A first input unit is used to input the sample historical behavior data and the sample prediction object into an initial click rate prediction model to obtain the sample global interest and the sample local interest; A training unit is used to train the initial click rate prediction model by utilizing the dependency relationship between the sample global interest and the sample local interest and the sample prediction result to obtain the click rate prediction model.

15. A click rate prediction device, It is characterized in that The device comprises: A second acquisition unit is used to acquire the historical behavior data of the target customer when receiving a click rate prediction instruction of the target customer for the prediction object; A second input unit is used to input the historical behavior data into a click rate prediction model to obtain the global interest and local interest of the target customer; the click rate prediction model is a model obtained by modeling the dependency relationship between the sample global interest and the sample local interest; the sample global interest and the sample local interest are determined according to the sample historical behavior data; The first prediction unit is used to predict the click rate of the object to be predicted according to the global interest and the local interest to obtain a click rate prediction result.

16. A model training device, It is characterized in that The device comprises: A first memory, a first processor and a first communication bus, wherein the first memory communicates with the first processor via the first communication bus, the first memory stores a model training program executable by the first processor, and when the model training program is executed, the method described in any one of claims 1 to 7 is executed by the first processor.

17. A click rate prediction device, It is characterized in that The device comprises: A second memory, a second processor and a second communication bus, the second memory communicates with the second processor via the second communication bus, the second memory stores a click-through rate prediction program executable by the second processor, and when the click-through rate prediction program is executed, the method described in any one of claims 8 to 13 is executed by the second processor.

18. A storage medium having a computer program stored thereon, applied to a click rate prediction device and a model training device, It is characterized in that When the computer program is executed by a first processor, the method described in any one of claims 1 to 7 is implemented. When the computer program is executed by a second processor, the method described in any one of claims 8 to 13 is implemented.