Click-through rate estimation method and apparatus, electronic device, storage medium, and program product
Through the multi-layer attention mechanism and GRU model, the user characteristics and advertising characteristics are encoded, and the accuracy of the click-through rate estimate model in user and advertising characteristics is solved, more accurate click-through rate prediction is achieved, and advertising delivery performance and advertiser returns are improved.
Patent Information
- Application Number
- PCT/CN2024/119652
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-09
- Filing Date
- 2024-09-19
- Publication Date
- 2025-04-17
AI Technical Summary
In the prior art, in the click-through rate estimate, the user's local click-through rate model and global click-through rate model are not sampled on the same data, resulting in insufficient confidence in the output, resulting in unstable final click-through rate. In addition, the second method depends on the advertiser's tag data accuracy.
Multi-layer attention mechanism and recurrent neural network are adopted to encode user characteristics and advertising characteristics, use the first layer attention mechanism and the second layer multi-head attention mechanism to calculate attention weights, combine the GRU model to capture dynamic changes in user interests and behavior, and finally predict click-through rates through the full connection layer and activation function.
Improve the accuracy of click-through rate estimates, helping advertising platforms choose the most relevant and attractive advertisements on limited advertising spaces, and improve advertising delivery performance and advertiser returns.
Smart Images

Figure CN2024119652_17042025_PF_FP_ABST
Abstract
Description
Click rate prediction method, device, electronic device, storage medium and program product
[0001] This disclosure claims priority to a Chinese patent application filed with the Patent Office of China on October 9, 2023, with application number 202311301860.4 and invention name “Click-through rate prediction method, device, electronic device and storage medium”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present application relates to the field of Internet technology, and in particular to a click-through rate prediction method, device, electronic device, storage medium, and program product. Background Art
[0003] Click-through rate (CTR) estimation is a crucial task in online advertising. It estimates the probability of a user clicking on an ad after it's been displayed to them. Given the limited number of ad slots, accurately estimating CTR is a critical task in the advertising industry. Addressing these challenges can help advertising platforms better understand user behavior and interests, thereby improving ad delivery effectiveness and returns for advertisers.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a click-through rate prediction method, device, electronic device, storage medium and program product, which can more accurately predict the user's click-through rate for advertisements, help advertising platforms select the most relevant and attractive advertisements in limited advertising spaces, thereby improving the effectiveness of advertising delivery and the returns of advertisers.
[0006] The technical solution of the embodiment of the present application is implemented as follows:
[0007] This embodiment of the present application provides a click-through rate estimation method, including:
[0008] Encoding the user features to obtain a user feature vector, and encoding the advertisement features to obtain an advertisement feature vector;
[0009] determining a first attention weight between the user feature and the advertisement feature according to the user feature vector and the advertisement feature vector;
[0010] Encoding the user feature based on a first vector determined by the first attention weight to obtain a second vector;
[0011] determining a second attention weight according to the second vector, the user feature vector, and the advertisement feature vector;
[0012] Obtaining a concatenated vector according to the second vector and a third vector determined by the second attention weight;
[0013] A click-through rate prediction result of the advertisement is obtained based on the splicing vector.
[0014] The present invention provides a click-through rate estimation device, comprising:
[0015] An encoding module, configured to encode user features to obtain a user feature vector, and to encode advertisement features to obtain an advertisement feature vector;
[0016] a determination module, configured to determine a first attention weight between the user feature and the advertisement feature based on the user feature vector and the advertisement feature vector;
[0017] The encoding module is further configured to encode the user feature based on the first vector determined by the first attention weight to obtain a second vector;
[0018] The determination module is further configured to determine a second attention weight based on the second vector, the user feature vector, and the advertisement feature vector;
[0019] a splicing module, configured to obtain a splicing vector based on the second vector and a third vector determined by the second attention weight;
[0020] The fully connected module and the mapping module are used to obtain a click rate estimation result of the advertisement based on the splicing vector.
[0021] An embodiment of the present application provides an electronic device, including:
[0022] a memory for storing executable instructions;
[0023] The processor is configured to implement the click-through rate prediction method provided in the embodiment of the present application when executing the executable instructions stored in the memory.
[0024] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for implementing the click-through rate estimation method provided in the embodiment of the present application when executed by a processor.
[0025] An embodiment of the present application provides a computer program product, including a computer program or computer-executable instructions, which, when executed by a processor, implements the click-through rate prediction method provided in the embodiment of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] FIG1 is a schematic diagram of the architecture of a click-through rate prediction system 100 provided in an embodiment of the present application;
[0027] FIG2 is a schematic structural diagram of an electronic device 500 provided in an embodiment of the present application;
[0028] FIG3 is a schematic diagram of an application scenario of the click-through rate prediction method provided in an embodiment of the present application;
[0029] FIG4 is a flow chart of a method for estimating click-through rate according to an embodiment of the present invention;
[0030] FIG5 is a flow chart of a method for estimating click-through rate according to an embodiment of the present application;
[0031] FIG6 is a schematic diagram showing the principle of a click-through rate estimation method provided in an embodiment of the present application;
[0032] FIG7 is a schematic diagram showing the principle of the click-through rate prediction method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0034] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0035] It is understandable that in the embodiments of the present application, when user information and other related data are involved, when the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0036] In the following description, the terms "first\second\..." are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first\second\..." can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0038] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0039] 1) Attention Mechanism: Originating from the study of human vision, cognitive science suggests that due to information processing bottlenecks, humans selectively focus on a portion of all information while ignoring other visible information. This mechanism is often referred to as the attention mechanism. Different parts of the human retina have varying degrees of information processing capacity, or acuity, with the fovea possessing the highest acuity. To effectively utilize limited visual information processing resources, humans need to select and focus their attention on specific areas within the visual field. In summary, the attention mechanism has two main aspects: determining which part of the input to focus on and allocating limited information processing resources to the important parts. At a high level, the attention mechanism can be understood as a mapping from a query vector to a series of key-value pairs.
[0040] 2) Multi-Head Attention: This mechanism uses multiple query vectors to parallelize the selection of multiple pieces of information from the input. Each attention element focuses on a different part of the input. For example, the query vector, key, and value are first linearly transformed before being fed into the scaled dot product attention mechanism. Note that this is done h times (h is an integer greater than 1), which is the so-called multi-head attention mechanism. Each time a head is calculated, parameters are not shared between heads, and the parameter W for each linear transformation of the query vector, key, and value is different. The h-fold scaled dot product attention results are then concatenated and linearly transformed again to obtain the value that serves as the result of the multi-head attention.
[0041] 3) Feature: Also known as attribute, it reflects the performance or nature of an event or object in a certain aspect. For example, user features (or user attributes) may include the user's income, age, gender, geographic location, etc. Advertising features (or advertising attributes) may include the advertising subject, advertising content, advertising channel, etc.
[0042] 4) Recurrent Neural Network (RNN): This type of neural network is used to process sequential data. After extracting features using a recurrent kernel (Cell), the features are fed into a subsequent network (such as a fully connected Dense network) for prediction and other operations. In other words, RNNs can extract information from the time dimension using the recurrent kernel, and the kernel parameters are time-shared. The recurrent kernel has memory, and by sharing parameters at different moments, it enables information extraction from time series.
[0043] 5) Gated Recurrent Unit (GRU): A commonly used gated recurrent neural network that better captures widely spaced dependencies in time series data. Like the Long-Short Term Memory (LSTM) model, the GRU model was developed to address issues such as long-term memory and gradients in backpropagation. The GRU model has only two gates: the update gate and the reset gate. The update gate controls the extent to which state information from the previous moment is incorporated into the current state. A larger value for the update gate indicates more state information from the previous moment is incorporated. The reset gate controls how much information from the previous state is written to the current candidate set. A smaller value for the reset gate indicates less information from the previous state is written.
[0044] Click-through rate (CTR) estimation is a crucial task in online advertising. It estimates the probability of a user clicking on an ad after it's been displayed to them. CTR estimation can help advertising platforms better understand user behavior and interests, improving ad delivery effectiveness and returns for advertisers. Regarding CTR estimation, the following two technical solutions are available:
[0045] Solution 1: Obtain user data and product data within the target scenario. Based on the obtained data and the local and global CTR prediction models for the target scenario, calculate the user's local and global CTR for the products within the target scenario, and determine the confidence levels corresponding to the local and global CTRs. Determine the user's final CTR for the product based on the confidence levels, local and global CTRs.
[0046] Solution 2: The estimation model includes an encoding network, a prediction network, and a loss function calculation module. The loss function calculation module calculates the specific loss function value based on the partial prediction results obtained by the prediction network and the advertiser's label data, and incorporates a differential privacy mechanism. The prediction network updates its own network based on the loss function value. The estimation model is trained using a training method.
[0047] However, the applicant discovered during the implementation of the embodiments of the present application that:
[0048] Regarding the above-mentioned solution 1: This solution uses the user dimension to build a local click-through rate model and a global click-through rate model for users and scenarios respectively. Finally, the click-through rate of the final product is confirmed based on the confidence level. However, the two models are not sampled on the same data, resulting in inaccurate confidence levels in the outputs of the two models, causing the final click-through rate to be unstable.
[0049] Regarding Solution 2 above: This solution uses encoding and model prediction from the advertising platform, calculates the loss function value using the advertiser's labeled data, and updates the prediction model based on the loss function value, thereby improving the accuracy of click-through rate estimation. Therefore, the accuracy of this solution depends on the advertiser's labeled data.
[0050] In view of this, the embodiments of the present application provide a click-through rate prediction method, device, electronic device, storage medium and program product, which can more accurately predict the user's click-through rate for advertisements, and help advertising platforms select the most relevant and attractive advertisements in limited advertising spaces, thereby improving the effectiveness of advertising delivery and the return of advertisers. The electronic device provided by the embodiment of the present application is described below. The electronic device provided by the embodiment of the present application can be a server, or a terminal device, or can be implemented by a server and a terminal device in collaboration. The following is an example of the click-through rate prediction method provided by the embodiment of the present application being implemented by a server and a terminal device in collaboration.
[0051] For example, see Figure 1, which is a schematic diagram of the architecture of a click-through rate prediction system 100 provided in an embodiment of the present application. In order to achieve an application that more accurately predicts the click-through rate of users for advertisements, as shown in Figure 1, the click-through rate prediction system 100 includes: a server 200, a network 300 and a terminal device 400, wherein the network 300 can be a local area network or a wide area network, or a combination of the two, the terminal device 400 is a terminal device associated with the user, and a client 410 runs on the terminal device 400. The client 410 can be various types of clients, such as news and information clients, instant messaging clients, e-commerce shopping clients, etc.
[0052] In some embodiments, the server 200 can encode the user features of the user (such as the user's income, geographic location, age, etc.) and the advertising features of the advertisement respectively, and obtain a user feature vector (also called user feature encoding) and an advertisement feature vector (also called advertisement feature encoding) accordingly. Then, in the first-layer attention mechanism, the server 200 can use the user feature vector as the first query vector and the advertisement feature vector as the first key vector to calculate the first attention weight between the user features and each advertisement feature of the advertisement to capture the user's attention to different features of the advertisement. Then, the server 200 can use the first vector output by the first-layer attention mechanism as input and encode the user features through a recurrent neural network (such as a GRU model) to capture the sequence information and dynamic changes of the user features, so as to better understand the user's interests and behaviors. In the second-layer attention mechanism (such as a multi-head attention mechanism), the server 200 can use the second vector (i.e., the hidden state vector) encoded and output by the GRU model as the second query vector, concatenate the user feature vector and the advertisement feature vector as the second key vector, and use the multi-head attention mechanism to calculate the second attention weight between the second query vector and the second key vector. The third vector output by the multi-head attention mechanism is concatenated with the second vector output by the GRU model encoding to obtain a comprehensive feature vector (i.e., a concatenated vector). The server 200 inputs the concatenated vector into a fully connected layer for nonlinear feature transformation and dimensionality mapping. Finally, it is mapped through an activation function (e.g., a Sigmoid function) to limit the prediction result to between 0 and 1, thereby obtaining the user's click-through rate for the advertisement.
[0053] In other embodiments, continuing from the above, after obtaining the click-through rate prediction results corresponding to multiple advertisements, the server 200 can sort the multiple advertisements in descending order according to the click-through rate prediction results from high to low, and select the top N advertisements from the descending sorting results (where N is a positive integer greater than or equal to 1). Subsequently, the server 200 can send the selected N advertisements to the terminal device 400 through the network 300, so that the terminal device 400 presents them through the human-computer interaction interface of the client 410. In this way, it can help the advertising platform select the most relevant and attractive advertisements in limited advertising spaces, thereby improving the advertising delivery effect and the return of advertisers.
[0054] In other embodiments, the embodiments of the present application can also be implemented with the help of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network within a wide area network or local area network to realize data calculation, storage, processing, and sharing.
[0055] Cloud technology is a general term for network, information, integration, management platform, and application technologies used in the cloud computing business model. It can form a resource pool that can be used flexibly and conveniently on demand. Cloud computing technology will become a key support. The backend services of technical network systems require a large amount of computing and storage resources.
[0056] For example, the server 200 in Figure 1 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDNs), and big data and artificial intelligence platforms. The terminal device 400 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, etc., but is not limited to this. The terminal device 400 and the server 200 can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0057] The structure of the electronic device provided by the embodiment of the present application will be described below. Taking the electronic device as a server as an example, refer to Figure 2, which is a structural diagram of an electronic device 500 provided by an embodiment of the present application. The electronic device 500 shown in Figure 2 includes: at least one processor 510, a memory 540, and at least one network interface 520. The various components in the electronic device 500 are coupled together through a bus system 530. It can be understood that the bus system 530 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 530 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as bus system 530 in Figure 2.
[0058] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0059] The memory 540 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 540 may optionally include one or more storage devices that are physically remote from the processor 510.
[0060] The memory 540 includes volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 540 described in the embodiments of the present application is intended to include any suitable type of memory.
[0061] In some embodiments, the memory 540 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.
[0062] Operating system 541, including system programs for processing various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, which are used to implement various basic services and process hardware-based tasks;
[0063] A network communication module 542 for reaching other computing devices via one or more (wired or wireless) network interfaces 520 , exemplary network interfaces 520 including Bluetooth, WiFi, and USB;
[0064] In some embodiments, the device provided by the embodiments of the present application can be implemented in software. FIG2 shows a click-through rate prediction device 543 stored in a memory 540, which can be software in the form of a program and a plug-in, including the following software modules: an encoding module 5431, a determination module 5432, a splicing module 5433, a full connection module 5434, a mapping module 5435, an acquisition module 5436, a weighted summation module 5437, a sorting module 5438, and a recommendation module 5439. These modules are logical and can be arbitrarily combined or further split according to the functions implemented. It should be pointed out that in FIG2, for the sake of convenience of expression, all the above modules are shown at once, but it should not be regarded as excluding the implementation of the click-through rate prediction device 543 that can only include the encoding module 5431, the determination module 5432, the splicing module 5433, the full connection module 5434, and the mapping module 5435. The functions of each module will be explained below.
[0065] The click-through rate estimation method provided in the embodiment of the present application will be specifically described below in combination with the exemplary application and implementation of the server provided in the embodiment of the present application.
[0066] Refer to Figure 3, which is a schematic diagram of the application scenario of the click-through rate prediction method provided by an embodiment of the present application. As shown in Figure 3, after receiving the advertisement acquisition request sent by the user's terminal device, the server can first obtain the user's user characteristics and the advertisement's advertisement characteristics from the database, and encode the user's user characteristics and the advertisement's advertisement characteristics respectively. For example, for user characteristics (such as the user's basic information, historical behavior, etc.), an embedding layer can be used to map them into a fixed-length vector representation (i.e., a user feature vector). For advertisement features, an embedding layer can also be used to encode information such as the content and context of the advertisement into a fixed-length vector representation (i.e., an advertisement feature vector).
[0067] Next, a multi-layer attention mechanism can be used to model the relationship between users and ads. For example, in the first-layer attention mechanism, the user feature vector can be used as the first query vector, the ad feature vector can be used as the first key vector, and the first attention weight between the user features and each ad feature can be calculated to capture the user's attention to different features of the ad. Then, a recurrent neural network (such as a GRU model) can be used to encode the user features. The GRU model can capture the sequence information and dynamic changes of user features, thereby better understanding the user's interests and behaviors. In the second-layer attention mechanism (such as a multi-head attention mechanism), the output vector (i.e., the second vector) encoded by the GRU model can be used as the second query vector, and the user feature vector and the ad feature vector can be concatenated as the second key vector. The multi-head attention mechanism is used to calculate the second attention weight between the second query vector and the second key vector. The third vector output by the multi-head attention mechanism is concatenated with the second vector to obtain a comprehensive feature vector (i.e., the concatenated vector). The concatenated feature vector is input into the fully connected layer for nonlinear feature transformation and dimensional mapping. Finally, the estimated result is limited to between 0 and 1 by mapping through an activation function (such as a Sigmoid function), and the click-through rate estimation result of the advertisement is obtained (that is, the estimated click-through rate of the user for the advertisement).
[0068] After obtaining the estimated click-through rates corresponding to multiple advertisements, the server can send advertisements with estimated click-through rates greater than a threshold (for example, 0.9) to the user's terminal device, that is, push advertisements with estimated click-through rates greater than the threshold to the user, thereby helping the advertising platform select the most relevant and attractive advertisements in limited advertising spaces, thereby improving the effectiveness of advertising delivery and the returns of advertisers.
[0069] The click rate prediction method provided in the embodiment of the present application will be described in detail below with reference to FIG4 .
[0070] For example, see FIG4 , which is a flow chart of a click-through rate prediction method provided in an embodiment of the present application, and will be described in conjunction with the steps shown in FIG4 .
[0071] In step 101, user features are encoded to obtain a user feature vector, and advertisement features of an advertisement are encoded to obtain an advertisement feature vector.
[0072] In some embodiments, step 101 can be implemented in the following manner: user features of the user and advertisement features of the advertisement are obtained respectively; for user features, the user features are encoded using an embedding layer to obtain a user feature vector; for advertisement features, the advertisement features can also be encoded using an embedding layer to obtain an advertisement feature vector.
[0073] For example, taking user features as an example, the user features of the user can be encoded. For example, an embedding layer can be used to map each user feature of the user into a fixed-length vector representation. For example, assuming that a user has two user features, "income" and "value", "income" and "value" can be encoded respectively to obtain a user feature vector (or user feature encoding) corresponding to "income" and a user feature vector (or user feature encoding) corresponding to "value". For example, taking user A as an example, user A's "age" can be encoded to obtain a user feature vector corresponding to "age" of [0.2, 0.4, 0.6]. User A's "gender" can be encoded to obtain a user feature vector corresponding to "gender" of [0.8, 0.2]. User A's "geographic location" can be encoded to obtain a user feature vector corresponding to "geographic location" of [0.1, 0.3, 0.5, 0.7]. User A's "income" can be encoded to obtain a user feature vector corresponding to "income" of [0.9, 0.6].
[0074] In other embodiments, user features may be encoded to obtain a user feature vector by: mapping and encoding the user features based on the data type of the user features to obtain encoded information; and performing dimensionality reduction on the encoded information based on the characteristic attributes of the user features to obtain a user feature vector. Data types may include numeric and text types. For example, if the user feature is "income," the corresponding data type may be numeric; if the user feature is "geographic location," the corresponding data type may be text. A characteristic attribute may represent an attribute corresponding to the user feature. For example, if the user feature is "income," the corresponding characteristic attribute may be an income attribute; if the user feature is "geographic location," the corresponding characteristic attribute may be a location attribute. This embodiment maps and encodes the user features based on their data type to obtain encoded information that accurately represents the user features. The encoded information is then subjected to dimensionality reduction based on the characteristic attributes of the user features. This allows accurate dimensionality reduction of the encoded information in combination with the characteristic attributes, thereby improving the representation accuracy of the user feature vector and preventing the excessive dimensionality of the user feature vector from affecting subsequent calculations.
[0075] In some embodiments, mapping and encoding user features based on their data types can be achieved by obtaining encoding information by: obtaining a code list corresponding to the data type, and mapping and encoding the user features based on the code list to obtain encoding information. Different data types correspond to different code lists. There can be multiple code lists corresponding to numerical values. For example, the code list corresponding to numerical values may include: a code list corresponding to continuous data and a code list corresponding to discrete data. This embodiment maps and encodes user features based on the code lists corresponding to different data types, which can improve the encoding accuracy of the encoding information.
[0076] In some embodiments, dimensionality reduction processing of the encoded information based on the characteristic attributes of the user characteristics can be implemented in the following manner to obtain a user feature vector: obtaining a configuration matrix corresponding to the characteristic attribute, and performing dimensionality reduction processing on the encoded information based on the configuration matrix to obtain a user feature vector. Different characteristic attributes correspond to different configuration matrices. For example, if the user characteristic is "income," the corresponding characteristic attribute may be the income attribute, and the configuration matrix corresponding to the income attribute is a 10,000*100 matrix. If the encoded information of the user characteristic "income" is a 1*10,000 vector, the 1*10,000 encoded information is multiplied by the 10,000*100 configuration matrix to obtain a 1*100 user feature vector. For another example, if the user characteristic is "geographic location," the corresponding characteristic attribute may be the location attribute, and the configuration matrix corresponding to the location attribute is a 2,000*50 matrix. If the encoded information of the user characteristic "geographic location" is a 1*2,000 vector, the 1*2,000 encoded information is multiplied by the 2,000*50 configuration matrix to obtain a 1*50 user feature vector. This embodiment can reasonably reduce the dimensionality of the encoded information by using different configuration matrices corresponding to different feature attributes, thereby avoiding the impact of excessively high dimensions of user feature vectors on the amount of calculation.
[0077] In other embodiments, the advertising features of an advertisement can also be encoded to obtain an advertising feature vector in the following manner: if the advertising features include text information, the advertising features are encoded according to a text mapping table to obtain an advertising feature vector. If the advertising features include image information, the advertising features are encoded according to the pixel value information corresponding to the advertising features to obtain an advertising feature vector. If the advertising features include text information and image information, the text information in the advertising features is encoded according to the text mapping table to obtain a first code, and the pixel value information corresponding to the image information in the advertising features is encoded to obtain a second code; the first code and the second code are concatenated to obtain an advertising feature vector. The text mapping table includes code values corresponding to different texts. In this embodiment, the text information in the advertising features is encoded by a text mapping table, and the pixel value information corresponding to the image information in the advertising features is encoded. Since the text information and image information distribution are encoded in different ways, the representation accuracy of the advertising feature vector can be improved.
[0078] It should be noted that in addition to encoding user features and advertising features by using an embedding layer, other methods can also be used to encode user features and advertising features. For example, user features and advertising features can be encoded by using a one-hot encoding method. This embodiment of the present application does not specifically limit this.
[0079] In step 102, a first attention weight between the user feature and the advertisement feature is determined based on the user feature vector and the advertisement feature vector.
[0080] In some embodiments, in a first-layer attention mechanism, the user feature vector is used as the first query vector, and the ad feature vector is used as the first key vector to obtain a first attention weight. The first-layer attention mechanism can be a scaled dot-product attention mechanism. Since an ad may have multiple ad features, step 102 can be implemented as follows: the user feature vector is used as the first query vector, each ad feature vector is used as the first key vector, and the scaled dot-product attention mechanism is used to calculate the first attention weight between the user feature and each ad feature.
[0081] For example, taking Advertisement A as an example, assuming that Advertisement A includes 4 different ad features, in the first layer of attention mechanism, the user feature vector can be used as the first query vector, and each of the 4 ad features can be used as the first key vector. The scaled dot product attention mechanism is used to calculate the first attention weight between the user feature and each ad feature of Advertisement A (that is, the 4 first attention weights corresponding to the 4 ad features). Among them, the first attention weight can be used to characterize the user's attention to the ad feature, that is, the more interested the user is in a certain type of ad feature, the greater the corresponding first attention weight. In other words, the technical solution provided in the embodiment of the present application is not simply to apply average pooling to the user, but to use the attention mechanism to find the user who best represents the ad feature in the interaction history, that is, to put more weight on users who are attracted by the ad feature, rather than users who have always been interested in the ad.
[0082] It should be noted that the scaled dot product attention mechanism is a common self-attention mechanism used to model sequence data in deep learning. In the scaled dot product attention mechanism, the input sequence is first mapped to a query vector, a key vector, and a value vector. Then, the dot product of the query vector and the key vector is calculated, and the dot product result is scaled. Finally, the scaled result and the value vector are weighted averaged to obtain the output of the scaled dot product attention mechanism. In addition, it should be noted that in addition to the scaled dot product attention mechanism, the first-layer attention mechanism can also adopt other types of attention mechanisms, and the embodiments of the present application do not specifically limit this.
[0083] In step 103, the user feature is encoded based on the first vector determined by the first attention weight to obtain a second vector.
[0084] Here, the first vector output by the first-layer attention mechanism may be determined based on the first attention weight. In some embodiments, the first vector may be determined by taking the advertisement feature vector as the first value vector and performing a weighted average based on the first attention weight and the first value vector to obtain the first vector.
[0085] In some embodiments, the second vector can be obtained by encoding the user features through a recurrent neural network. The recurrent neural network can be a gated recurrent unit, and step 103 can be implemented as follows: based on the first vector, the user features are encoded through the gated recurrent unit to obtain a hidden state vector (i.e., the second vector), wherein the hidden state vector is used to represent the dynamic changes of the user features.
[0086] For example, taking the recurrent neural network as a GRU model, the first vector output by the first layer of attention mechanism (for example, a vector composed of the first attention weights between the user features output by the first layer of attention mechanism and each advertising feature of the advertisement) can be used as the input of the GRU model, and the user features (or user attributes) are encoded by the GRU model. The GRU model can capture the sequence information of the changes in user features, thereby helping to model the dynamic changes of user features. For example, for time series data, it can be input into the GRU model in chronological order for encoding. The GRU model can learn the association and sequence information between user features and output a hidden state vector as a second vector, which is used to represent the dynamic changes of user features. For example, taking user A as an example, the first vector output by the first layer of attention mechanism can be used as input, and the user features of user A are encoded using the GRU model to obtain a corresponding hidden state vector (i.e., the second vector), which is assumed to be [0.3, 0.5, 0.2]. It should be noted that in addition to using the GRU model to encode user features, other models that can capture the dynamic changes of user features can also be used, such as the LSTM model, and this embodiment of the present application does not specifically limit this.
[0087] In step 104 , a second attention weight is determined based on the second vector, the user feature vector, and the advertisement feature vector.
[0088] In some embodiments, the second attention weight can be determined in the second-layer attention mechanism. The type of the second-layer attention mechanism can be a multi-head attention mechanism, that is, the number of second query vectors can be multiple (that is, the number of second vectors output by the GRU model can be multiple). Step 104 can be implemented in the following manner: multiple second vectors (such as the above-mentioned hidden state vectors) output by the recurrent neural network (such as a gated recurrent unit) are all used as second query vectors, and the user feature vector and the advertising feature vector are spliced as the second key vector. The multi-head attention mechanism is used to calculate the second attention weight between the multiple second query vectors and the second key vector. The second attention weight includes multiple groups of attention weight values, wherein the number of groups of attention weight values is the same as the number of second query vectors, the number of groups of attention weight values is the same as the number of heads included in the multi-head attention mechanism, and each group of attention weight values corresponds to a user feature.
[0089] In other embodiments, step 104 can also be implemented in the following manner: each second vector output by the gated recurrent unit (such as the hidden state vector mentioned above), the user feature vector, and the advertising feature vector are spliced as the corresponding second query vector, the user feature vector and the advertising feature vector are spliced as the second key vector, and a multi-head attention mechanism is used to calculate the second attention weights between multiple second query vectors and the second key vector, where the second attention weights include multiple groups of attention weight values.
[0090] For example, the second vector output by the GRU model can be spliced with the user feature vector and the advertising feature vector. For example, the second vector output by the GRU model (assuming the dimension of the second vector is d) can be spliced with the user feature vector (assuming the dimension of the user feature vector is d) and the advertising feature vector (for example, the dimension of the advertising feature vector is d) to obtain a vector with a dimension of 3d. This vector with a dimension of 3d is then used as the second query vector, and the user feature vector and the advertising feature vector are spliced as the second key vector. The second attention weight between the second query vector and the second key vector (for example, the weight of different head attentions) is calculated using a multi-head attention mechanism. For example, a self-attention mechanism or other attention mechanism can be used. For example, a 3-head attention mechanism can be used (i.e., the number of second query vectors is 3, corresponding to the 3 second vectors obtained by encoding 3 different types of user features using the GRU model). Then, 3 sets of attention weight values corresponding to the 3 different types of user features can be obtained, where the dimension of the output vector of each head attention is d.
[0091] In step 105, a concatenated vector is obtained based on the second vector and a third vector determined by the second attention weight.
[0092] Here, the third vector output by the second layer attention mechanism can be determined based on the second attention weight.
[0093] In some embodiments, step 105 can be implemented by: performing weighted summation on multiple sets of attention weight values and the advertising feature vector to obtain a third vector; and splicing the third vector and the second vector output by the recurrent neural network (e.g., a GRU model) to obtain a spliced vector.
[0094] For example, taking the multi-head attention mechanism as a two-head attention mechanism, assuming that the attention weight value output by the first attention head is [0.6, 0.4], and the attention weight value output by the second attention head is [0.8, 0.2], these two sets of attention weight values are weighted and summed with the advertisement feature vector to obtain a third vector. For example, assuming that the advertisement feature vector is [0.9, 0.7], the third vector can be [0.6*0.9+0.4*0.7, 0.8*0.9+0.2*0.7]. Subsequently, the third vector can be spliced with the second vector output by the GRU model (for example, the hidden state vector mentioned above, assuming it is [0.3, 0.5, 0.2]) to obtain a comprehensive feature vector (i.e., the spliced vector), assuming it is [0.82, 0.86, 0.3, 0.5, 0.2].
[0095] In step 106 , a click-through rate prediction result of the advertisement is obtained based on the concatenated vector.
[0096] In some embodiments, step 106 may be implemented by performing full connection processing on the concatenated vector to obtain a full connection processing result; and performing mapping processing on the full connection processing result to obtain a user click rate estimation result for the advertisement.
[0097] Among them, the full connection processing can include nonlinear transformation processing and dimension mapping processing, and the above-mentioned full connection processing of the splicing vector can be achieved in the following way: performing nonlinear transformation processing on the splicing vector to obtain a nonlinear transformation result; performing dimension mapping processing on the nonlinear transformation result to obtain a fully connected processing result.
[0098] For example, after splicing the third vector output by the second-layer multi-head attention mechanism with the second vector output by the GRU model to obtain a comprehensive feature vector (i.e., the spliced vector), the spliced vector can be input into the fully connected layer for nonlinear transformation and dimension mapping of the features, wherein the output dimension of the fully connected layer can be flexibly set according to task requirements. In addition, the ReLU activation function can be used for nonlinear transformation to map the dimension of the spliced vector to a higher-dimensional space.
[0099] In other embodiments, the above-mentioned mapping of the full connection processing results to obtain the user's click-through rate prediction result for the advertisement can be achieved by mapping the full connection processing results through an activation function, and using the mapping result as the user's click-through rate prediction result for the advertisement.
[0100] For example, taking Ad A as an example, the output of the fully connected layer (i.e., the result of the fully connected processing) can be mapped through the Sigmoid function, limiting the click-through rate estimation result to between 0 and 1, and used for click-through rate (CTR) estimation, where the output of the Sigmoid function represents the probability of a user clicking on Ad A. For example, assuming that the output dimension of the fully connected layer is set to 4, that is, after processing by the fully connected layer, a vector of dimension 4 can be obtained. Finally, the vector of dimension 4 is mapped through the Sigmoid function, limiting the click-through rate estimation result to between 0 and 1, and used for click-through rate (CTR) estimation. For example, assuming that the output of the Sigmoid function is 0.75, it means that the probability of a user clicking on Ad A is 75%.
[0101] In some embodiments, referring to FIG5 , FIG5 is a flow chart of the click-through rate prediction method provided in an embodiment of the present application. As shown in FIG5 , after executing step 106 shown in FIG4 , steps 107 and 108 shown in FIG5 may also be executed, which will be explained in conjunction with the steps shown in FIG5 .
[0102] In step 107, the plurality of advertisements are sorted in descending order according to the click rate estimation results to obtain a descending sorting result.
[0103] In some embodiments, taking user A as an example, assuming that there are 100 advertisements to be recommended in the advertising platform, namely advertisement 1 to advertisement 100, the method provided in the embodiment of the present application can be used to calculate the click-through rate estimation results (for example, click-through rate estimation values) corresponding to user A for these 100 advertisements, and then these 100 advertisements can be sorted in descending order according to the click-through rate estimation values, where the advertisements with higher rankings are more attractive to user A, and user A is more likely to click on them.
[0104] In step 108, the top N advertisements in the descending sorting results are recommended to the user.
[0105] Here, N is a positive integer greater than or equal to 1.
[0106] In some embodiments, continuing with the above example, after sorting the 100 advertisements to be recommended in the advertising platform in descending order of estimated click-through rate, the top N advertisements (e.g., the top 5 advertisements) can be selected from the sorting results and recommended to user A. This can help the advertising platform select the most relevant and attractive advertisements in limited advertising spaces, thereby improving the effectiveness of advertising delivery and the returns of advertisers.
[0107] The click-through rate prediction method provided in the embodiment of the present application can take into account the sequence information and contextual information of user features by introducing a multi-layer attention mechanism (including a first-layer attention mechanism and a second-layer attention mechanism) and recurrent neural network encoding. Among them, the recurrent neural network can capture the dynamic changes of user features, and the multi-layer attention mechanism can integrate contextual information, so as to better understand the user's interests and behaviors, and then more accurately predict the user's click-through rate for advertisements, thereby improving the advertising delivery effect and the advertiser's return.
[0108] The following describes an exemplary application of the embodiments of the present application in a practical application scenario.
[0109] In a rapidly developing e-commerce environment, user needs may appear, shift, and disappear, that is, user attributes may change (for example, changes in user income). In view of this, the embodiments of the present application are dedicated to dynamic user attribute representation, treating user attributes as auxiliary information and using a series of related advertisements to model the evolution of user attributes. For example, the embodiments of the present application can divide the advertisement sequence according to the user attribute value and propose a hierarchical attention mechanism, which applies attribute-aware attention to the advertisement aggregation under each attribute, and is used to activate personalized attention for similar advertisements to evaluate the degree of match between users and advertisements.
[0110] The click-through rate estimation method provided in the embodiment of the present application is described in detail below.
[0111] The embodiment of the present application aims at the goal of click-through rate prediction, and can accurately predict whether the user will be interested in the advertisement and click on it based on the user's characteristics (or attributes) and the characteristics of the advertisement. Specifically, the user's characteristics and the advertisement's characteristics can be encoded separately first. For example, for user characteristics (including the user's basic information, historical behavior, etc.), the user characteristics can be mapped to a vector representation of a fixed length using an embedding layer. For advertisement characteristics, the content, context, and other information of the advertisement can also be encoded into a vector representation of a fixed length using an embedding layer. Then, a multi-layer attention mechanism can be used to model the relationship between the user and the advertisement. For example, in the first layer of the attention mechanism, the user feature vector (or user feature encoding) can be used as the first query (Query) vector, and the advertisement feature vector (or advertisement feature encoding) can be used as the first key (Key) vector to calculate the first attention weight between the user features and the different attributes of the advertisement to capture the user's interest in the different attributes of the advertisement. Then, the GRU model can be used to encode the user features. The GRU model can capture the sequence information and dynamic changes of user features, helping the model to better understand the user's interests and behaviors.
[0112] In the second-layer multi-head attention mechanism, the second vector output by the GRU model encoding (or the concatenation of the second vector output by the GRU model encoding with the user feature vector and the ad feature vector) can be used as the second query vector. The concatenation of the user feature vector and the ad feature vector can be used as the second key vector. The multi-head attention mechanism is used to calculate the second attention weight between the second query vector and the second key vector. The second attention weight includes multiple sets of attention weight values. The third vector output by the multi-head attention mechanism is concatenated with the second vector output by the GRU model encoding to form a comprehensive feature vector (i.e., the concatenated vector). The concatenated vector is input into the fully connected layer for nonlinear feature transformation and dimensional mapping. Finally, the prediction result is limited to between 0 and 1 through mapping using the Sigmoid function to obtain the click-through rate estimate of the advertisement. The technical solution provided in the embodiments of the present application comprehensively considers the user's attributes, contextual information and sequence characteristics, and captures the dynamic changes of user behavior through a multi-layer attention mechanism and GRU model encoding. It can more accurately predict the click-through rate of advertisements and help advertising platforms select the most relevant and attractive advertisements in limited advertising spaces, thereby improving the effectiveness of advertising delivery and the returns of advertisers.
[0113] In some embodiments, referring to FIG6 , FIG6 is a schematic diagram of the principle of the click-through rate prediction method provided in an embodiment of the present application. As shown in FIG6 , user attributes (also referred to as user features) and advertising attributes (also referred to as advertising features) can be encoded separately to obtain user attribute encoding and advertising attribute encoding respectively. For example, taking user attribute encoding as an example, the user's attributes can be encoded. For example, an embedding layer can be used to map each attribute of the user into a vector representation of a fixed length. For example, assuming that there are two attributes of "income" and "value", "income" and "value" can be encoded separately, so that the encoding vector corresponding to "income" and the encoding vector corresponding to "value" can be obtained. Then, in the first-layer attention mechanism (such as the scaled dot product attention mechanism), the user attribute encoding can be used as the first query vector, the advertisement attribute encoding can be used as the first key vector, and the first attention weight between the user attribute and each attribute of the advertisement can be calculated to capture the user's attention to different attributes of the advertisement. The advertisement attribute encoding is used as the first value vector, and based on the first attention weight, the first vector output by the first-layer attention mechanism is obtained. The dimension of the first vector can be equal to the number of attributes of the advertisement (for example, assuming that the advertisement has 4 different attributes, the dimension of the second vector output by the first-layer attention mechanism is 4). Each value in the second vector output by the first-layer attention mechanism is used to represent the weight corresponding to each attribute of the advertisement, representing the user's interest in each attribute.
[0114] That is, the first layer of attention mechanism is applied at the bottom to aggregate users under a specific attribute. Instead of simply applying average pooling to these users, the attention mechanism is used to find the user who best represents the attribute in the interaction history. That is, more weight is placed on users who are attracted to the attribute rather than users who have always been interested in the item. To achieve this, as shown in Figure 6, the first query vector is the user attribute encoding (i.e., user attribute embedding), and the first key vector and the first value vector are both ad attribute encodings (i.e., both are embeddings of users who interacted with the target item under this attribute). In addition, the first query vector and the first key vector are both projected into other spaces to obtain appropriate similarity as the first attention weight. However, the first value vector is kept in its original representation space so that the output remains in a space consistent with the user attribute embedding. Therefore, it is compared with the target user in the following calculations. The attention of each perceived attribute works separately under each attribute, but shares the same parameters under the entire attribute.
[0115] In other embodiments, referring to FIG7 , FIG7 is a schematic diagram of the principle of the click-through rate prediction method provided by an embodiment of the present application. As shown in FIG7 , the first vector output by the first layer of the attention mechanism can be used as input, and the user attributes are encoded by the GRU model, wherein the GRU model can capture the sequence information of the attribute changes and help model the dynamic changes of the user attributes. Subsequently, the second vector (such as the hidden state vector) output by the GRU model encoding can be spliced with the user attribute encoding and the advertising attribute encoding as the second query vector, and the user attribute encoding and the advertising attribute encoding can be spliced as the second key vector and the second value vector. The multi-head attention mechanism is used to calculate the second attention weight between the second query vector and the second key vector. The second attention weight includes multiple groups of attention weight values. For example, for each user attribute, the corresponding advertising attention weight value can be obtained. The weighted sum of the multiple groups of attention weight values and the value of the advertisement (i.e., the advertising attribute encoding) can be used to obtain the attention representation of the advertisement (i.e., the third vector). Subsequently, the output vector (i.e., the third vector) of the second layer of the multi-head attention mechanism can be spliced with the output vector (i.e., the second vector) of the GRU model encoding to obtain a comprehensive feature vector (i.e., the spliced vector). The concatenated vector is fed into a fully connected layer for nonlinear feature transformation and dimensionality mapping. Finally, a sigmoid function is used for mapping, limiting the prediction result to between 0 and 1 to obtain the ad's CTR estimate. Through these steps, a multi-layer attention mechanism model is built, combining GRU model encoding and a multi-head attention mechanism to predict ad click-through rates. This model better captures the correlation and dynamic changes between user attributes, as well as the weighting of different ads based on user attributes.
[0116] For example, for user attribute encoding, assume the following user attributes: age, gender, location, income, etc. Each attribute can be encoded into a low-dimensional vector representation using an embedding layer. A GRU model can then be used to model the user attributes to capture the frequency of attribute changes. For example, the encoding of each user attribute can be input into the GRU model. For time series data, the attribute encodings can be input in chronological order. The GRU model can learn the associations and sequence information between the attributes and output a hidden state vector (i.e., the second vector) that represents the dynamic changes in the user attributes. Assume the GRU model has one hidden layer and the dimension of the output hidden state vector is d. The hidden state vector output by the GRU model can then be concatenated with the ad attribute encoding and the user attribute encoding. For example, each dimension of the hidden state vector output by the GRU model can be concatenated with the ad attribute encoding (assuming the ad attribute encoding also has dimension d) and the user attribute encoding (assuming the user attribute encoding also has dimension d), resulting in a vector of dimension 3d. Next, a multi-head attention mechanism can be used to calculate the weights of the different attention heads, such as a self-attention mechanism or other attention mechanisms. Each attention head will output the corresponding attention weight.
[0117] For example, a three-head attention mechanism can be used, with each head outputting a vector of dimension d. The output vector of the multi-head attention mechanism can then be concatenated with the output vector of the GRU model to produce a vector of dimension 4d. This concatenated vector is then fed into a fully connected layer for nonlinear feature transformation and dimensionality mapping. The output dimension of the fully connected layer can be flexibly configured based on task requirements. Furthermore, a ReLU activation function can be used for nonlinear transformation, mapping the vector dimensions to a higher-dimensional space. Finally, the output of the fully connected layer can be mapped through a sigmoid function to constrain the click-through rate estimate to a range between 0 and 1. The output of the sigmoid function represents the probability of a user clicking on the ad.
[0118] For example, suppose there is a user A whose age is encoded as [0.2, 0.4, 0.6], gender is encoded as [0.8, 0.2], location is encoded as [0.1, 0.3, 0.5, 0.7], and income is encoded as [0.9, 0.6]. A GRU model can be used to model these attributes, resulting in a hidden state vector (the second vector mentioned above). Assume the hidden state vector (the second vector mentioned above) is [0.3, 0.5, 0.2]. Next, the hidden state vector output by the GRU model can be concatenated with the ad attribute encoding (e.g., Ad A) and the user attribute encoding to obtain a 6-dimensional vector. This concatenated vector can then be processed using a multi-head attention mechanism. Assuming two attention heads are used, each with a 3-dimensional output vector, the weights of the two attention heads are calculated to obtain an attention representation of the ad. For example, assume the attention weights output by the first attention head are [0.6, 0.4], and the attention weights output by the second attention head are [0.8, 0.2]. The two sets of attention weights are weighted and summed with the attribute code of ad A to obtain the final ad attention representation (i.e., the third vector). Assuming that the attribute code of ad A is [0.9, 0.7], the final ad attention representation (i.e., the third vector) can be [0.6*0.9+0.4*0.7, 0.8*0.9+0.2*0.7]. Next, the ad attention representation (i.e., the third vector) can be concatenated with the output vector of the GRU model (i.e., the second vector) to obtain a vector with a dimension of 6. This concatenated vector is input to a fully connected layer for nonlinear feature transformation and dimensionality mapping. For example, the output dimension of the fully connected layer can be set to 4, resulting in a vector with a dimension of 4 after processing by the fully connected layer. Finally, this vector is mapped using a sigmoid function to constrain the click-through rate estimate to between 0 and 1. For example, if the output of the sigmoid function is 0.75, it means that user A has a 75% probability of clicking on ad A.
[0119] That is to say, the technical solution provided in the embodiment of the present application first divides and encodes users according to user attributes, such as income and value, and then uses the GRU model to model the user attributes to capture the frequency of attribute changes. At the same time, by introducing a multi-layer attention mechanism, contextual information can be integrated. For example, the attention weight and the advertising attribute encoding can be weighted summed to obtain the attention representation of the advertisement under the user attributes. After obtaining the attention representation of the advertisement, it is spliced with the output vector of the GRU model, and the features are nonlinearly transformed and mapped through the fully connected layer. Finally, the output of the fully connected layer is mapped through the Sigmoid function to obtain the estimated click-through rate of the advertisement.
[0120] In summary, the click-through rate estimation method provided in the embodiments of the present application has the following beneficial effects:
[0121] 1) Modeling the correlation between user attributes: The technical solution provided in the embodiments of this application can capture the correlation between user attributes through a multi-layer attention mechanism. Specifically, the weights of different user attributes will be dynamically adjusted according to the specific situation of the user and the characteristics of the advertisement, thereby better reflecting the user's interests and preferences for different advertisements. In addition, the introduction of a multi-head attention mechanism can calculate multiple attention representations in parallel, thereby better capturing the weight distribution between different advertisements. In addition, each attention head focuses on different features and relationships, thereby improving the expressiveness and generalization capabilities of the model.
[0122] 2) This embodiment of the application considers contextual information. By introducing a multi-layer attention mechanism and GRU encoding, it can consider both the sequence information and contextual information of user attributes. The GRU model can capture the dynamic changes of user attributes, while the multi-layer attention mechanism can integrate contextual information, making the prediction results more accurate.
[0123] 3) By combining the multi-layer attention mechanism with the encoding capabilities of the GRU model, the present embodiment can more accurately predict the click-through rate of ads. In addition, by considering the relevance, contextual information, and dynamic changes of user attributes, it can better understand user interests and behaviors, thereby improving the click-through rate and effectiveness of ads.
[0124] That is to say, the embodiment of the present application can better capture the weight distribution between different advertisements by introducing a multi-layer attention mechanism. Each attention head focuses on different features and relationships, thereby improving the expressiveness and generalization capabilities of the model. In addition, the technical solution provided by the embodiment of the present application can be flexibly adjusted and expanded according to specific field requirements. For example, different user attributes can be selected for encoding, and the structure and parameter settings of the attention layer can be added or modified to adapt to different data characteristics and business needs. In addition, the embodiment of the present application can capture the correlation between user attributes, and the weights of different user attributes will be dynamically adjusted according to the specific circumstances of the user and the characteristics of the advertisement. The embodiment of the present application combines the dynamic modeling of user attributes, the multi-layer attention mechanism and the GRU model, and can better capture the correlation between user attributes and the weight distribution between different advertisements under user attributes. In this way, it is possible to more accurately predict the user's interest in and click behavior of different advertisements, thereby improving the click-through rate and effectiveness of advertisements.
[0125] The following continues to describe an exemplary structure of the click-through rate prediction device 543 provided in an embodiment of the present application implemented as a software module. In some embodiments, as shown in Figure 2, the software modules stored in the click-through rate prediction device 543 in the memory 540 may include: an encoding module 5431, a determination module 5432, a splicing module 5433, a full connection module 5434 and a mapping module 5435.
[0126] The encoding module 5431 is used to encode user features to obtain a user feature vector, and to encode advertising features of an advertisement to obtain an advertising feature vector; the determination module 5432 is used to determine a first attention weight between the user features and the advertising features based on the user feature vector and the advertising feature vector; the encoding module 5431 is also used to encode the user features based on the first vector determined by the first attention weight to obtain a second vector; the determination module 5432 is also used to determine a second attention weight based on the second vector, the user feature vector and the advertising feature vector; the splicing module 5433 is used to obtain a splicing vector based on the second vector and the third vector determined by the second attention weight; the fully connected module 5434 and the mapping module 5435 are used to obtain an estimated click-through rate of the advertisement based on the splicing vector.
[0127] In some embodiments, the click-through rate prediction device 543 also includes an acquisition module 5436, which is used to respectively obtain user characteristics of the user and advertising characteristics of the advertisement; the encoding module 5431 is also used to encode the user characteristics using the embedding layer to obtain a user feature vector; and is used to encode the advertising characteristics using the embedding layer to obtain an advertising feature vector.
[0128] In some embodiments, the encoding module 5431 is further used to perform mapping encoding processing on the user features based on the data type of the user features to obtain encoding information; and perform dimensionality reduction processing on the encoding information based on the characteristic attributes of the user features to obtain a user feature vector.
[0129] In some embodiments, the encoding module 5431 is specifically used to obtain a coding list corresponding to the data type; based on the coding list, map and encode the user features to obtain coding information.
[0130] In some embodiments, the encoding module 5431 is specifically used to obtain a configuration matrix corresponding to a feature attribute; based on the configuration matrix, perform dimensionality reduction processing on the encoding information to obtain a user feature vector.
[0131] In some embodiments, the encoding module 5431 is also used to encode the advertising features according to a text mapping table to obtain an advertising feature vector if the advertising features include text information; encode according to pixel value information corresponding to the advertising features to obtain an advertising feature vector if the advertising features include image information; if the advertising features include text information and image information, encode the text information in the advertising features according to the text mapping table to obtain a first code, encode the pixel value information corresponding to the image information in the advertising features to obtain a second code, and concatenate the first code and the second code to obtain an advertising feature vector.
[0132] In some embodiments, the determination module 5432 is further used to use the user feature vector as the first query vector and the advertisement feature vector as the first key vector, and adopt the scaled dot product attention mechanism to calculate the first attention weight between the user feature and the advertisement feature.
[0133] In some embodiments, the encoding module 5431 is further configured to encode the user features using a gated recurrent unit based on the first vector as input to obtain a second vector, wherein the second vector is used to represent dynamic changes in the user features.
[0134] In some embodiments, the determination module 5432 is further used to use the second vector as the second query vector, concatenate the user feature vector and the advertisement feature vector as the second key vector, and adopt a multi-head attention mechanism to calculate the second attention weight between the second query vector and the second key vector. The second attention weight includes multiple groups of attention weight values, wherein the number of groups of the multiple attention weight values is the same as the number of heads included in the multi-head attention mechanism.
[0135] In some embodiments, the determination module 5432 is further used to concatenate the second vector, the user feature vector, and the advertising feature vector as a second query vector, and to concatenate the user feature vector and the advertising feature vector as a second key vector, and to use a multi-head attention mechanism to calculate a second attention weight between the second query vector and the second key vector, where the second attention weight includes multiple sets of attention weight values.
[0136] In some embodiments, the click-through rate prediction device 543 also includes a weighted summation module 5437, which is used to perform weighted summation on multiple sets of attention weight values and the advertising feature vector to obtain a third vector; the splicing module 5433 is also used to splice the third vector and the second vector to obtain a spliced vector.
[0137] In some embodiments, the fully connected module 5434 is further used to perform fully connected processing on the splicing vector to obtain a fully connected processing result; the mapping module 5435 is further used to map the fully connected processing result through an activation function to obtain a user click-through rate estimation result for the advertisement.
[0138] In some embodiments, the fully connected module 5434 is further configured to perform nonlinear transformation processing on the concatenated vector to obtain a nonlinear transformation result; and perform dimension mapping processing on the nonlinear transformation result to obtain a fully connected processing result.
[0139] In some embodiments, the click-through rate prediction device 543 also includes a sorting module 5438 and a recommendation module 5439, wherein the sorting module 5438 is used to sort multiple advertisements in descending order according to the click-through rate prediction result to obtain a sorting result; the recommendation module 5439 is used to recommend the advertisements ranked in the top N positions in the descending sorting result to the user, wherein N is a positive integer greater than or equal to 1.
[0140] It should be noted that the description of the apparatus in the embodiment of the present application is similar to the description of the method embodiment described above, and has similar beneficial effects as the method embodiment, so it will not be repeated here. Any technical details not covered in the click-through rate estimation apparatus provided in the embodiment of the present application can be understood based on the description of either Figure 4 or Figure 5.
[0141] The present invention provides a computer program product comprising a computer program or computer-executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the computer device to perform the click-through rate estimation method described above in the present invention.
[0142] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will execute the click-through rate prediction method provided by the embodiment of the present application, for example, the click-through rate prediction method shown in Figure 4 or Figure 5.
[0143] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or various devices including one or any combination of the above memories.
[0144] In some embodiments, executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0145] As an example, executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed across multiple sites and interconnected by a communication network.
[0146] The above are merely examples of the present application and are not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.
Claims
1. A click rate estimation method, the method comprising: Encoding the user features to obtain a user feature vector, and encoding the advertisement features of the advertisement to obtain an advertisement feature vector; Determining a first attention weight between the user feature and the advertisement feature according to the user feature vector and the advertisement feature vector; Encoding the user feature based on the first vector determined by the first attention weight to obtain a second vector; Determining a second attention weight according to the second vector, the user feature vector, and the advertisement feature vector; Obtaining a concatenated vector according to the second vector and a third vector determined by the second attention weight; Based on the splicing vector, a click rate estimation result of the advertisement is obtained.
2. The method according to claim 1, wherein encoding the user features to obtain the user feature vector and encoding the advertisement features of the advertisement to obtain the advertisement feature vector comprises: Encoding the user features using an embedding layer to obtain the user feature vector; The advertisement feature is encoded using the embedding layer to obtain the advertisement feature vector.
3. The method according to claim 1, wherein encoding the user features to obtain the user feature vector comprises: Based on the data type of the user feature, mapping and encoding the user feature to obtain encoding information; Based on the characteristic attributes of the user features, the coded information is subjected to dimensionality reduction processing to obtain the user feature vector.
4. The method according to claim 3, wherein the mapping and encoding processing of the user features based on the data type of the user features to obtain the encoding information comprises: Get a list of codes corresponding to the data type; Based on the coding list, the user characteristics are mapped and coded to obtain the coding information.
5. The method according to claim 3, wherein the dimensionality reduction processing is performed on the coded information based on the characteristic attributes of the user characteristics to obtain the user characteristic vector, comprising: Obtaining a configuration matrix corresponding to the characteristic attribute; Based on the configuration matrix, dimension reduction processing is performed on the encoded information to obtain the user feature vector.
6. The method according to claim 1, wherein encoding the advertisement features of the advertisement to obtain the advertisement feature vector comprises: If the advertisement feature includes text information, encoding the advertisement feature according to a text mapping table to obtain the advertisement feature vector; If the advertisement feature includes image information, encoding is performed according to pixel value information corresponding to the advertisement feature to obtain the advertisement feature vector; If the advertising feature includes the text information and the image information, the text information in the advertising feature is encoded according to the text mapping table to obtain a first code, the pixel value information corresponding to the image information in the advertising feature is encoded to obtain a second code, and the first code and the second code are concatenated to obtain the advertising feature vector.
7. The method according to claim 1, wherein determining a first attention weight between the user feature and the advertisement feature according to the user feature vector and the advertisement feature vector comprises: The user feature vector is used as the first query vector, the advertisement feature vector is used as the first key vector, and the A dot product attention mechanism is applied to calculate the first attention weight between the user feature and the advertisement feature.
8. The method according to claim 1, encoding the user feature based on the first vector determined based on the first attention weight to obtain a second vector, comprising: Based on the first vector, the user feature is encoded through a gated recurrent unit to obtain the second vector, wherein the second vector is used to characterize a dynamic change of the user feature.
9. The method according to claim 1, wherein determining the second attention weight according to the second vector, the user feature vector and the advertisement feature vector comprises: The second vector is used as the second query vector, and the user feature vector and the advertisement feature vector are concatenated as the second key vector. A multi-head attention mechanism is adopted to calculate a second attention weight between the second query vector and the second key vector, where the second attention weight includes multiple groups of attention weight values, wherein the number of groups of the multiple groups of attention weight values is the same as the number of heads included in the multi-head attention mechanism.
10. The method according to claim 1, wherein determining a second attention weight according to the second vector, the user feature vector and the advertisement feature vector further comprises: The second vector, the user feature vector and the advertisement feature vector are concatenated as a second query vector, and the user feature vector and the advertisement feature vector are concatenated as a second key vector. A multi-head attention mechanism is used to calculate a second attention weight between the second query vector and the second key vector, where the second attention weight includes multiple groups of attention weight values.
11. The method according to claim 9 or 10, wherein obtaining a concatenated vector based on the third vector determined according to the second vector and the second attention weight comprises: Performing weighted summation of the multiple groups of attention weight values and the advertisement feature vector to obtain the third vector; The third vector and the second vector are concatenated to obtain the concatenated vector.
12. The method according to claim 1, wherein obtaining a click rate estimation result of the advertisement based on the splicing vector comprises: Performing full connection processing on the concatenated vector to obtain a full connection processing result; The fully connected processing result is mapped through an activation function to obtain a click rate estimation result of the advertisement.
13. The method according to claim 12, The step of performing full connection processing on the concatenated vector to obtain a full connection processing result includes: Performing nonlinear transformation processing on the splicing vector to obtain a nonlinear transformation result; The nonlinear transformation result is subjected to dimension mapping processing to obtain a fully connected processing result.
14. The method according to claim 1, further comprising: Sorting the multiple advertisements in descending order according to the click rate estimation result to obtain a descending order result; The advertisements ranked in the top N positions in the descending sorting result are recommended to the user, where N is a positive integer greater than or equal to 1.
15. A click rate estimation device, comprising: An encoding module, used to encode the user features and the advertisement features of the advertisement respectively, to obtain a user feature vector corresponding to the user features and an advertisement feature vector corresponding to the advertisement features; A determination module, configured to determine a first attention weight between the user feature and the advertisement feature according to the user feature vector and the advertisement feature vector; The encoding module is further used to encode the user feature based on the first vector determined by the first attention weight to obtain a second vector; The determination module is further used to determine a second attention weight according to the second vector, the user feature vector and the advertisement feature vector; A splicing module, configured to obtain a splicing vector according to the second vector and a third vector determined by the second attention weight; The fully connected module and the mapping module are used to obtain the click rate estimation result of the advertisement based on the splicing vector.
16. An electronic device comprising: A memory for storing executable instructions; The processor is used to implement the click rate prediction method described in any one of claims 1 to 14 when executing the executable instructions stored in the memory.
17. A computer-readable storage medium storing computer-executable instructions, wherein when the computer-executable instructions are executed by a processor, the click rate prediction method according to any one of claims 1 to 14 is implemented.
18. A computer program product, comprising a computer program or a computer executable instruction, wherein when the computer program or the computer executable instruction is executed by a processor, the click rate prediction method according to any one of claims 1 to 14 is implemented.
Citation Information
Patent Citations
Advertisement click rate estimation method based on improved Transformer
CN112381581A
Advertisement click rate estimation method based on bilinear FFM and multi-head attention mechanism
CN113793175A
Click rate estimation model based on feature representation under attention mechanism
CN113887694A
Advertisement click rate prediction method and device and computer equipment
CN113888238A
Click rate estimation method and device, electronic equipment and storage medium
CN117952678A
Cited By
Recommendation data rearrangement method and device, computer program product and electronic equipment
CN120707223A
Advertisement effect evaluation method and system based on reinforcement learning
CN120996875A