An advertising marketing recommendation method based on deep reinforcement learning
Through deep reinforcement learning and Transformer model, combined with multi-scale feature fusion and self-attention mechanism, the problem of flexibility and personalization of the advertising recommendation system is solved, and efficient and accurate advertising recommendation is achieved.
Patent Information
- Application Number
- CN202410835695.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-26
AI Technical Summary
When faced with complex and changing user needs and advertising content, existing advertising recommendation systems have problems such as insufficient flexibility, high computational complexity, poor real-time performance, and low degree of personalized recommendations, especially for the recommendation of new users and new ads. Less effective.
Adopting an advertising marketing recommendation method based on deep reinforcement learning, by constructing original data sets, performing feature extraction and multi-scale feature fusion, and combining the Transformer model and deep reinforcement learning to capture the complex relationship between users and advertisements to achieve personalized recommendations.
It achieves high-quality data collection and feature extraction, self-supervised learning to mine potential patterns from unlabeled data, multi-scale feature fusion and self-attention mechanisms to capture complex relationships, and deep reinforcement learning to optimize recommendation strategies, improving the accuracy and accuracy of recommendations. Real-time and adaptable to changes in user interests and business trends.
Smart Images

Figure CN118396685B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer data processing technology, and in particular relates to an advertising marketing recommendation method based on deep reinforcement learning. Background Art
[0002] With the rapid development of the Internet and the popularity of mobile devices, online advertising has become an important channel for businesses to promote their products and services. However, in the face of massive user behavior data and advertising content, how to achieve accurate advertising recommendations and improve advertising click-through rates and conversion rates has become an important research topic in the field of advertising marketing. Traditional advertising recommendation systems often have many shortcomings when dealing with complex and changing user needs and advertising content. Therefore, developing a more intelligent and efficient advertising recommendation method has important practical significance and commercial value.
[0003] Existing advertising and marketing recommendation methods and technologies mainly include the following three types: rule-based recommendation technology, collaborative filtering recommendation technology and content recommendation technology.
[0004] Rule-based recommendation technology: Rule-based recommendation technology uses predefined rules (such as based on the user's geographic location, browsing history) to recommend ads. However, the formulation of rules requires a lot of manual intervention, lacks flexibility, and cannot adapt to rapidly changing user needs and advertising content, resulting in poor recommendation results.
[0005] Collaborative filtering recommendation technology: Collaborative filtering technology makes recommendations based on the user's historical behavior data and the behavior of similar users. It is divided into user-based collaborative filtering and item-based collaborative filtering. However, collaborative filtering relies on the user's historical behavior data, and the recommendation effect for new users (cold start problem) and new advertisements is poor. In addition, when the scale of user and advertisement data is large, the computational complexity is high and the real-time performance is poor.
[0006] Content recommendation technology: Content recommendation technology recommends based on the characteristics of advertising content and matches advertising content that matches user interests. Because it relies too much on the characteristics of advertising content and cannot fully utilize user behavior data, the degree of personalization of recommendations is low, and it is difficult to accurately capture users' actual interests and needs.
[0007] Therefore, the above existing advertising marketing recommendation methods all have limitations, and traditional methods rely on rule-making, historical behavioral data, and advertising content characteristics. Summary of the invention
[0008] In view of the above problems, the present invention proposes an advertising marketing recommendation method based on deep reinforcement learning, which includes the following processes:
[0009] S1, build the original data set, which includes user behavior data , user attribute data and advertising content data ;
[0010] S2, extract features from the original data set, mine potential patterns from unlabeled data through self-supervised learning, and perform multi-scale feature fusion on user features to generate rich user and advertising feature representations and obtain a standard feature data set;
[0011] S3, builds a Transformer-based advertising marketing recommendation model, uses the self-attention mechanism to capture the complex relationship between users and ads, and conducts deeper feature interactions to obtain prediction results for advertising marketing recommendations;
[0012] S4, based on the standard feature data set of S2, combines deep reinforcement learning to perform model training and optimization to obtain the trained advertising marketing recommendation model;
[0013] S5, deploy the trained advertising marketing recommendation model to the actual advertising recommendation system for online learning, obtain the processed feature data in real time, and output personalized advertising marketing recommendation results.
[0014] Preferably, the user behavior data in S1 Collection, including user click stream data , browsing behavior data and purchasing behavior data , denoted as , and it is time series data;
[0015] The click stream data captures the user's click behavior on each element in the page, records the timestamp of the click event, the user ID and the ID information of the click element, and the click stream data is recorded as ;
[0016] The browsing behavior data records the user's browsing behavior through the front-end visible area capture technology, including the browsing event timestamp, user ID, browsing page URL and stay time information; the browsing behavior data is recorded as ;
[0017] The purchase behavior data is collected in the e-commerce application, including the key nodes of order placement, payment, and refund, and records the event time, user ID, order ID, and product ID information; the purchase behavior data is recorded as ;
[0018] User behavior data includes user click stream data , browsing behavior data and purchasing behavior data , denoted as , and it is time series data;
[0019] The user attribute data in S1 The collection is to obtain basic information from the user registration information, including name, email, age, gender, address; and finally obtain user attribute data , and it is static data;
[0020] The advertisement content data in S1 The collection includes advertising delivery record data and advertising creative content data , denoted as ;
[0021] The advertisement delivery record includes the advertisement ID, delivery location ID identification data and advertisement click data recorded by the server. The advertisement delivery record data is recorded as ;
[0022] The collection of the creative content of the advertisement involves capturing the title, description, display pictures and video creative materials of the advertisement. The creative content data of the advertisement is recorded as .
[0023] Preferably, the specific process of S2 includes:
[0024] User behavior feature extraction: Feature extraction is performed by constructing an autoencoder; the autoencoder learns a dense feature representation that captures the essential distribution and structure of the data by minimizing the difference between the input data and the reconstructed data, forcing it to learn a feature representation that can efficiently compress and reconstruct the user behavior sequence. , as user behavior characteristics;
[0025] User attribute feature extraction: Convert the originally discrete user attribute data into a continuous vector representation, enhance the data representation capability, and make it more suitable for subsequent deep learning processing. Converted into vector form through the Embedding layer;
[0026] Ad feature extraction: Get ad delivery features and creative content features , and splice them together to get the comprehensive features of the advertisement ;
[0027] Multi-scale user feature fusion based on self-supervised learning: Through self-supervised pre-training, temporal behavior feature fusion, and behavior and attribute feature fusion, multi-scale behavior patterns of users are mined from massive unsupervised behavior data and fused with structured attribute information to generate high-quality and rich user representations. .
[0028] Preferably, for discrete user behavior time series data First, the embedding layer is used to convert it into a continuous vector representation, so that the neural network can better learn the potential semantics and patterns between the behavioral data;
[0029] Then, the behavior sequence after Embedding The encoder is input into the autoencoder network. The encoder uses a 1D convolutional neural network CNN_Encoder, which moves on the time series through a sliding window mechanism to capture local features and contextual information and generate more representative potential representations. ;
[0030] Next, Input to the decoder CNN_Decoder, the decoder will try to reconstruct the original behavior sequence , the decoder uses a deconvolutional neural network;
[0031] According to the feature extraction network of the encoder-decoder of the established autoencoder, training is performed to minimize the reconstruction loss :
[0032]
[0033] The autoencoder is forced to learn feature representations that can efficiently compress and reconstruct user behavior sequences. .
[0034] Preferably, the user attribute feature extraction uses a multi-layer perceptron MLP to further improve the expression ability of attribute features. Perform nonlinear transformation; Multilayer Perceptron MLP consists of N fully connected layers, each of which contains a nonlinear activation function; captures the complex nonlinear relationship between attribute features, thereby obtaining more expressive user attribute features :
[0035]
[0036] in, Through multi-layer nonlinear transformation, user attribute features Possesses higher nonlinear expression capabilities.
[0037] Preferably, the advertisement feature extraction, wherein the advertisement delivery feature, counts the advertisement category, advertisement location ID and click data obtained from the advertisement ID, and processes them after normalization, and splices these delivery-related statistics into a delivery feature vector ;
[0038] Among the creative content features, the title and description copy use TextCNN to extract feature vectors, the image uses CNN to obtain visual feature vectors, and the video uses 3D-CNN to extract motion feature vectors; and the text, image and video feature vectors are spliced as creative content features. .
[0039] Preferably, the multi-scale user feature fusion based on self-supervised learning is to mine user behavior data The complex behavior patterns and interest preferences contained in the Organic fusion to generate multi-scale and rich user representations;
[0040] Self-supervised pre-training is to learn useful behavior pattern representations from unlabeled user behavior sequence data and transform the user's temporal behavior feature data Treat it as unsupervised data; design a self-supervised task. Given a complete sequence of user behaviors, randomly mask some of them and let the model learn to predict the masked behaviors. The objective function of this task is to minimize the negative logarithm of the predicted probability of the masked behaviors:
[0041]
[0042] in, For the The behavior of the time step, The model is based on the prediction of other time-step behavior probability;
[0043] The temporal behavior feature fusion is based on the self-supervised pre-training model in the first step, which is used to fusion the original user behavior sequence. Perform feature encoding to obtain behavioral feature representations at different levels, and then use a hierarchical attention mechanism to fuse these multi-scale representations:
[0044]
[0045] in, is the fused feature representation, For the time step, The state vector of the hidden layer, is the layer attention weight, which controls the importance of different layer features in fusion;
[0046] The fusion of behavior and attribute features is to obtain the user's temporal behavior representation Then, it is combined with the user's static attribute features Fusion to generate a more comprehensive user representation ; The attribute gating mechanism is used during fusion, that is, different fusion weights are adaptively assigned to the current behavior and attribute according to their importance; the attribute gating vector By current behavior and properties The weighted sum of is then and Perform element-by-element multiplication and addition respectively, and finally get It combines the user's dynamic behavior patterns and static attribute information:
[0047]
[0048]
[0049] in, That is, the final multi-scale user representation after fusing temporal behavior and user attributes; It is the gate operation mechanism; It is a soft gating vector that adaptively determines the weight of the two in fusion according to the current timing behavior and attribute characteristics; Represents the user's temporal behavior The corresponding weights, Attribute feature The corresponding weight, is the bias term.
[0050] Preferably, the construction of the Transformer-based advertising marketing recommendation model is specifically as follows:
[0051] The comprehensive features of users after multi-scale feature fusion and the comprehensive characteristics of advertising As input, in order to establish the interaction between features, a Transformer-based self-attention mechanism is adopted;
[0052] The comprehensive characteristics of advertising is regarded as a query; at the same time, the user's comprehensive features Considered as key Key and value Value:
[0053]
[0054] in, is the self-attention mechanism function, is the activation function, For the comprehensive characteristics of advertising, For the comprehensive characteristics of users, is the key vector By calculating the relevance scores of ad query Q and user key K, the model dynamically adjusts the degree of attention paid to different user features and automatically learns the intrinsic mapping relationship between the two.
[0055] Extract interactive information from different subspaces through Multi-Head Attention:
[0056]
[0057]
[0058] in, is the output of the multi-head attention mechanism. Each head generates an output vector, and then these output vectors are concatenated. For the connection operation, after the connection, the resulting vector is multiplied by a weight matrix Perform a linear transformation to map it to the desired output dimension; Respectively Linear projection of attention heads to map queries, keys, and values to corresponding subspaces;
[0059] Then the fusion features of the output of the multi-head attention mechanism are residually connected with the original features of the original user, so that the model can capture the interaction relationship while retaining the original core features of the user, and then undergo layer normalization;
[0060] By stacking L layers of multi-head attention mechanisms, more contextual information is gradually integrated to capture more complex and abstract relationships and obtain the final interactive representation. ;
[0061] The final interaction is represented as Input to the fully connected layer to get the predicted probability value of ad recommendation:
[0062]
[0063] in, and are trainable weights and bias terms; for A K-dimensional vector at a certain moment, where each dimension corresponds to a possible recommendation result for a type of advertisement, 0 means not recommended at all, and 1 means fully recommended.
[0064] Preferably, in S4, deep reinforcement learning is combined to perform model training and optimization, specifically:
[0065] Establish a state space and action space, and determine the state transition process of the environment, using Represents the time step The state of Represents the time step The action of time, Indicates in status Execute an action The immediate reward obtained after the state space is represented by the interactive features obtained by the interaction between the current user features and the advertising features. The final interactive representation is obtained in the above text. ,Right now ;
[0066] The action space represents a series of actions that can be taken in a given state. The probability of recommending an option for all ads , 0 means not recommended at all, 1 means fully recommended, that is ;
[0067] Design a reward function to guide the behavior of reinforcement learning advertising recommendation, and optimize the goal to achieve the optimal advertising marketing recommendation probability , so the reward function is:
[0068]
[0069] in, Parameters for weighing the probability of advertisement recommendation and the optimal probability of advertisement recommendation;
[0070] Construct a Q-value function to learn the action-value function to guide the selection of actions; the Q-value function represents the state Next action The expected cumulative reward, that is, the Q value function is based on the cumulative reward function And update.
[0071] Preferably, the Transformer-based deep learning model is trained based on the Q-value function, and the loss function is defined; through each experience tuple The expected value of the sample is calculated as is the next state; the loss function is:
[0072]
[0073] in, Indicates the expected operator, is the discount factor, is the parameter of the target network, which is used to calculate the target Q value, that is, the expected cumulative reward in the future. are the parameters of the main network, used to evaluate the Q value of taking different actions in a given state, For the status The following actions are taken.
[0074] Compared with the prior art, the present invention has the following beneficial effects:
[0075] (1) High-quality data collection across all channels: Through multiple channels such as mobile applications, website plug-ins, and e-commerce applications, we comprehensively collect behavioral data such as user click streams, browsing behaviors, and purchasing behaviors, as well as user attribute data such as basic information and addresses, as well as advertising placement records and creative content data. After these multi-dimensional and multi-modal raw data are standardized and organized, the data format is unified and the structure is complete, laying a solid data foundation for downstream feature extraction and model training.
[0076] (2) Self-supervised learning to mine the underlying laws of data: Introducing the autoencoder framework, taking unlabeled user behavior sequence data as input to extract user behavior features. Based on self-supervised learning, under the goal of minimizing reconstruction loss, it automatically learns an effective representation that can efficiently compress and reconstruct the original sequence. This self-supervised learning method does not require manual data annotation, and can automatically mine potential behavior patterns that are close to the actual distribution from massive unsupervised data, avoiding the bias that may be caused by artificially designed features, and fundamentally solving the dependence of traditional supervised learning on a large amount of labeled data.
[0077] (3) Multi-scale feature fusion: First, self-supervised pre-training is used to obtain the user's multi-scale temporal behavior representation, and then the hierarchical attention mechanism is used to fuse the features of different levels; then the attribute gating mechanism is used to fuse the user behavior representation with the static attribute information, and the weights of the two in the fusion are adaptively determined. This multi-level and multi-modal feature fusion fully explores and integrates the user's dynamic behavior pattern and static attribute information, generating a high-quality and rich comprehensive user representation, which helps to accurately portray the complex and changing user interest preferences.
[0078] (4) Capturing feature interactions based on self-attention mechanism: Based on the Transformer-based multi-head self-attention mechanism, the fused user comprehensive representation and advertising features are regarded as key-value pairs and query pairs in the attention mechanism respectively. By calculating the dot product attention of the two sequence representations, the key semantic connection between users and advertisements is captured, and deeper feature interactions are performed. Compared with traditional RNN and other models, the self-attention mechanism better mines the long-distance dependencies between sequences and learns the interaction between the two modalities in a targeted manner, laying the foundation for achieving accurate personalized recommendations.
[0079] (5) Deep reinforcement learning to optimize recommendation strategies: Deep reinforcement learning is applied to the training and reasoning process of the model, and the optimal recommendation strategy is automatically searched through the interaction of state space and action space. The model parameters are continuously optimized and updated with the goal of maximizing the expected cumulative return. Unlike artificially set rules or heuristics, reinforcement learning can autonomously explore the strategy space. At the same time, it also has online learning capabilities, and can continuously absorb real-time user feedback for transfer learning and parameter updates, so that the model can track user interest shifts and business hotspot dynamics in real time, ensuring the long-term optimal recommendation effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] In order to more clearly illustrate the technical solutions of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, what is described below is only one embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0081] Figure 1 This is the overall framework diagram of the deep learning-based advertising and marketing recommendation of the present invention;
[0082] Figure 2 This is a prediction model framework diagram for the advertising marketing recommendation model based on deep learning;
[0083] Figure 3 This is a schematic diagram of the multi-head attention mechanism network structure;
[0084] Figure 4 Schematic diagram of the interaction between the Q network and the environment in deep reinforcement learning; DETAILED DESCRIPTION
[0085] In order to improve the accuracy and effect of advertising recommendation, the present invention proposes an advertising marketing recommendation method based on deep learning. The present invention proposes a method combining multi-scale feature fusion, self-supervised learning and deep reinforcement learning, aiming to make full use of massive unlabeled data and complex user behavior patterns to achieve efficient advertising recommendation.
[0086] The overall framework of the advertising marketing recommendation based on deep learning in this invention is as follows: Figure 1As shown in the figure, the following key steps are included: first, collect user behavior data, user attribute data and advertising content data, and obtain high-quality data from all channels; then, extract features from the collected raw data, mine potential rules from unlabeled data through self-supervised learning, and perform multi-scale feature fusion to generate rich user and advertising feature representations; second, build a Transformer-based deep learning model, use the self-attention mechanism to capture the complex relationship between users and advertisements, improve the feature interaction effect, and combine deep reinforcement learning for model training and optimization to continuously optimize the recommendation strategy. Finally, through real-time data processing and online learning, the model can quickly adapt to changes in user interests and business trends, and achieve accurate advertising recommendations.
[0087] The method of the present invention is further described below in conjunction with specific embodiments.
[0088] 1. Collection and production of original data sets:
[0089] The data collection of the present invention is aimed at obtaining high-quality user behavior data from all channels , user attribute data and advertising content data , providing basic data support for subsequent feature engineering and model training. The collection process is as follows:
[0090] User behavior data collection:
[0091] 1. Clickstream data collection is to embed collection code in mobile applications and websites, use JavaScript plug-ins to capture users' clicks on elements on the page, and record the timestamp (time), user ID (userID) and click element ID information (elementID) of the click event. Clickstream data is recorded as ;
[0092] 2. Browsing behavior data records user browsing behavior through front-end visible area capture technology, including browsing event timestamp (time), user ID (userID), browsed page URL (URL) and stay time information (duration). Browsing behavior data is recorded as ;
[0093] 3. Purchase behavior data collects key nodes of order placement, payment, and refund in e-commerce applications, and records event time (time), user ID (userID), order ID (orderID), and product ID information (productID). Purchase behavior data is recorded as .
[0094] User behavior data includes user click stream data , browsing behavior data and purchasing behavior data , denoted as , and it is time series data.
[0095] Collection of user attribute data:
[0096] Get basic information from user registration information: name, email, age, sex, address. Finally get user attribute data , and it is static data.
[0097] Collection of advertising content data:
[0098] 1. Advertisement delivery records include the advertisement ID, placement ID, and click data recorded by the server. .
[0099] 2. The collection of advertising creative content involves capturing the title, description, images and video creative materials of the advertisement. The advertising creative content data is recorded as .
[0100] Ad content data includes ad delivery record data and advertising creative content data , denoted as .
[0101] Through the above methods, user behavior data , user attribute data and advertising content data The collected raw data is in a unified and structured format, covering all core dimensions, and providing high-quality data foundation support for downstream feature engineering, model training and other links.
[0102] 2. Feature extraction and fusion to build a standard data set:
[0103] For the collected user behavior data , user attribute data and advertising content data It is necessary to extract features from the original data in order to provide high-quality feature data for subsequent model recognition and training. The specific process is as follows:
[0104] 1. User behavior feature extraction:
[0105] User behavior features are extracted by constructing an autoencoder. This feature extraction mechanism can automatically learn the potential representation and high-order statistical characteristics of data from a large amount of unlabeled data, reducing the cost of manual annotation while also avoiding the bias and deficiencies that may be caused by manually designed features. By minimizing the difference between input data and reconstructed data, the autoencoder can learn dense feature representations that capture the essential distribution and structure of the data, providing effective feature input for subsequent tasks.
[0106] For discrete user behavior time series data , first use the embedding layer to convert it into a continuous vector representation, the purpose is to enable the neural network to better learn the potential semantics and patterns between behavioral data:
[0107]
[0108] in, is the user behavior sequence after embedding, is the embedded function.
[0109] Then, the behavior sequence after Embedding Input to the encoder in the autoencoder network. The encoder uses a 1D convolutional neural network CNN_Encoder, which moves on the time series through a sliding window mechanism to capture local features and contextual information. This operation can effectively extract important features in the user behavior sequence and generate a more representative potential representation. :
[0110]
[0111] Next, Input to the decoder CNN_Decoder, the decoder will try to reconstruct the original behavior sequence , where the decoder uses a deconvolutional neural network (transposed convolutional network), which can transform the potential representation Reconstruction is achieved by converting back to a sequence of the same dimension as the original input.
[0112]
[0113] According to the feature extraction network of the encoder-decoder of the established autoencoder, training is performed to minimize the reconstruction loss :
[0114]
[0115] The autoencoder is forced to learn feature representations that can efficiently compress and reconstruct user behavior sequences. After the training converges, the encoder can directly extract features from the new user behavior data to obtain As user behavior features, they are used in subsequent advertising recommendation models. This process ensures that the model can extract meaningful features from complex user behavior data and improve the accuracy and effectiveness of the recommendation system.
[0116] 2. User attribute feature extraction:
[0117] In order to transform the originally discrete user attribute data into a continuous vector representation, enhance the data representation ability, and make it more suitable for subsequent deep learning processing, the user attribute data is transformed into a continuous vector representation. Converted into vector form after the Embedding layer:
[0118]
[0119] in, Represents the user attribute sequence after embedding.
[0120] In order to further improve the expressiveness of attribute features, a multi-layer perceptron (MLP) is used to embed these vectors. Perform nonlinear transformation. The multi-layer perceptron consists of N fully connected layers, each of which contains a nonlinear activation function. Such a structure can capture the complex nonlinear relationship between attribute features, thereby obtaining more expressive user attribute features. :
[0121]
[0122] in, Through multi-layer nonlinear transformation, user attribute features It has higher nonlinear expression ability. This can not only better reflect the internal structure of user attribute data, but also provide richer feature input for subsequent models, thus improving the accuracy and effect of the recommendation system.
[0123] 3. Advertising feature extraction:
[0124] Advertisement delivery features: Count the ad category, ad location ID, and click data obtained from the ad ID, and process them after normalization, and splice these delivery-related statistics into a delivery feature vector ;
[0125] Creative content features: TextCNN is used to extract feature vectors for titles and descriptions; CNN is used to obtain visual feature vectors for images; 3D-CNN is used to extract motion feature vectors for videos. The feature vectors of text, image, and video are concatenated as creative content features. .
[0126] Finally, the advertising features and creative content features Splice to get the comprehensive feature representation of the advertisement :
[0127] .
[0128] 4. Multi-scale user feature fusion based on self-supervised learning:
[0129] In order to fully tap into user behavior data The complex behavior patterns and interest preferences contained in the Organic fusion generates multi-scale and rich user representations. To this end, a user feature fusion module based on self-supervised learning is proposed, which includes the following three key steps:
[0130] (1) Self-supervised pre-training of user behavior sequences:
[0131] In order to learn useful behavior pattern representations from unlabeled user behavior sequence data, the user’s temporal behavior feature data Consider it as unsupervised data (unlabeled data), and design a self-supervised task: given a complete sequence of user behaviors, randomly mask some of them, and let the model learn to predict the masked behaviors. The objective function of this task is to minimize the negative logarithm of the predicted probability of the masked behavior. In this way, the model is forced to mine potential behavior patterns from the behavior sequence in order to more accurately predict the missing behaviors and automatically learn effective behavior representations without manual annotation. The objective function of the task is:
[0132]
[0133] in, For the The behavior of the time step, The model is based on the prediction of other time-step behavior This pre-training task can drive the model to learn the user's potential behavior patterns from the behavior sequence.
[0134] (2) Fusion of temporal behavior features
[0135] Based on the self-supervised pre-training model, the original user behavior sequence Feature encoding is performed to obtain different levels of behavioral feature representations. These different levels of representation reflect the user's behavioral patterns at different time scales. For example, the bottom layer captures local single behavioral details, while the top layer corresponds to broader behavioral preferences and interests. These multi-scale representations are then fused using a hierarchical attention mechanism, and the attention weights at different levels control their importance in the fusion. In this way, an overall user representation that integrates behavioral patterns at multiple time scales is obtained.
[0136] These representations are fused using a hierarchical attention mechanism:
[0137]
[0138] in, is the fused feature representation, For the time step, The state vector of the hidden layer, is the layer attention weight, which controls the importance of different layer features in fusion.
[0139] Through this attention fusion mechanism, we can obtain the user temporal representation that integrates different levels of behavior patterns. , which fully exploits the complex temporal structure and rich semantics of user behavior.
[0140] (3) Fusion of behavior and attribute features
[0141] Obtaining the user's temporal behavior representation Then, it is combined with the user's static attribute features Fusion to generate a more comprehensive user representation The attribute gating mechanism is used during fusion, that is, different fusion weights are adaptively assigned to the current behavior and attribute according to their importance. Specifically, the attribute gating vector By current behavior and properties The weighted sum of is then and The element-by-element products are performed and added respectively, so as to realize the adaptive fusion of the two feature sources. It combines the user's dynamic behavior patterns and static attribute information:
[0142]
[0143]
[0144] in, That is, the final multi-scale user representation after fusing temporal behavior and user attributes; It is the gate operation mechanism; It is a soft gating vector that adaptively determines the weight of the two in fusion according to the current timing behavior and attribute characteristics; Represents the user's temporal behavior The corresponding weights, Attribute feature The corresponding weight, is the bias term.
[0145] Through the above self-supervised pre-training, time series fusion and attribute fusion, we successfully mined the multi-scale behavior patterns of users from massive unsupervised behavior data and fused them with structured attribute information to generate high-quality and rich user representations. This representation will be used in subsequent deep learning models to capture the complex interactive relationship between users and ads and achieve accurate recommendations.
[0146] 3. Construction of Transformer's deep learning model:
[0147] Advertising marketing recommendation model prediction model based on deep learning Figure 2 As shown. The user comprehensive features obtained after multi-scale feature fusion are the user comprehensive representation , which integrates the user's temporal behavior pattern and attribute information. At the same time, the above extracted advertising comprehensive features Including advertising and creative content information. and the comprehensive characteristics of advertising As input, the relationship between the two can be fully utilized to predict advertising marketing recommendations. User features reflect the user's interest preferences, while advertising features describe the content and delivery information of the advertisement. The degree of match between the two determines the accuracy of the recommendation. In order to establish the interaction between features, a self-attention mechanism based on Transformer is adopted. In this way, the user's comprehensive features can be input into the sequence model. and the comprehensive characteristics of advertising , and uses the Transformer’s self-attention mechanism to capture the complex interactive relationship between users and ads.
[0148] The comprehensive characteristics of advertising At the same time, in order to preserve the integrity of user features and ensure that all user behavior patterns and attribute information are fully retained during attention calculation, and to avoid the loss of important features that may be caused by separate encoding, user features are Treated as Key and Value:
[0149]
[0150] in, is the self-attention mechanism function, is the activation function, For advertising features, For user characteristics, is the key vector Dimension.
[0151] The Query-Key-Value attention mechanism can adaptively capture the importance of user features to ad features, making full use of the guiding role of user behavior in ad recommendations. Specifically, by calculating the relevance score of ad query Q and user key K, the model can dynamically adjust the degree of attention to different user features and automatically learn the intrinsic mapping relationship between the two.
[0152] Because the associations between users and ads are diverse, it is necessary to capture different semantics from different representation subspaces. Therefore, by running multiple attention heads in parallel, each head focuses on different semantic relationships, and finally fuses the features of different subspaces, making the model more expressive. By extracting interactive information from different subspaces through multi-head attention, the model structure is as follows: Figure 3 As shown:
[0153]
[0154]
[0155] in, is the output of the multi-head attention mechanism, in which each head generates an output vector, and then these output vectors are concatenated. For the connection operation, after the connection, the obtained vector needs to be multiplied by a weight matrix Perform a linear transformation to map it to the desired output dimension. Respectively The linear projection of the attention heads maps the query, key, and value to the corresponding subspace.
[0156] In order to ensure that the fused features are not distorted, the fused features output by the multi-head attention mechanism are residually connected with the original features of the original user, so that the model can capture the interaction relationship while retaining the original core features of the user. , making the representation more robust and not overly affected by noise. Then layer normalization helps the training convergence and improves the generalization performance. These operations ensure that the model does not lose the original main features of the user while mining the interactive information:
[0157]
[0158] in, Represents residual connection and layer normalization operations.
[0159] In order to further explore the high-level interaction information between users and ads, and extract feature representations with deeper levels and richer semantics, the model can gradually integrate more contextual information and capture more complex and abstract relationships by stacking L layers of multi-head attention mechanisms, laying the foundation for subsequent accurate recommendations. After this operation, the final interaction representation is obtained. .
[0160] The final interaction is represented as Input to the fully connected layer to get the predicted probability value of ad recommendation:
[0161]
[0162] in, and are trainable weights and bias terms. for A K-dimensional vector at a certain moment, where each dimension corresponds to a possible recommendation result for a type of advertisement, 0 means no recommendation at all, and 1 means full recommendation. The probability distribution of each recommendation result can be obtained through the softmax function.
[0163] 4. Model training and optimization based on deep reinforcement learning:
[0164] In the advertising recommendation system, in order to be able to recommend the most suitable advertisements to users based on their behaviors and preferences. However, simple supervised learning methods are difficult to fully capture the complex relationship and long-term value between users and advertisements. Therefore, deep reinforcement learning methods are used to optimize the recommendation strategy to achieve the goal of maximizing the advertising marketing effect.
[0165] In deep reinforcement learning, in order to obtain the best results, it is necessary to establish a state space and action space and determine the state transition process of the environment. Represents the time step The state of Represents the time step The action of time, Indicates in status Execute an action In the ad recommendation scenario, the state space is the interactive feature obtained by the interaction between the current user features and ad features. To indicate that, the final interaction representation is obtained above ,Right now .
[0166] The action space represents a series of action options that can be taken in a given state, usually represented as a continuous space or a discrete space. The probability of recommending an option for all ads , 0 means not recommended at all, 1 means fully recommended, that is .
[0167] Design a reward function to guide the behavior of reinforcement learning ad recommendation. It should be consistent with the optimization goal. In this invention, the optimization goal is to achieve the best advertising marketing recommendation probability. , so the reward function is:
[0168]
[0169] in, A parameter that weighs the probability of ad recommendation and the optimal ad recommendation probability.
[0170] Construct a Q-value function to learn the action-value function to guide the selection of actions. The Q-value function represents the state Next action The expected cumulative reward, that is, the Q value function is based on the cumulative reward function Based on the Q-value function, the Transformer-based deep learning model is trained and the loss function is defined by each experience tuple. The expected value of the sample is calculated as is the next state. The loss function is:
[0171]
[0172] in, Indicates the expected operator, is the discount factor, is the parameter of the target network, which is used to calculate the target Q value, that is, the expected cumulative reward in the future. are the parameters of the main network, used to evaluate the Q value of taking different actions in a given state, For the status The interaction process between the Q network and the environment in deep reinforcement learning is as follows: Figure 4 shown.
[0173] Based on this loss function, the Transformer-based deep learning model is trained. The specific steps are:
[0174] S1, initialize the experience tuple , parameters of the main network and target network parameters And the state space ;
[0175] S2, select actions based on the current Q network ;
[0176] S3, perform actions in the environment , observe the next state , get instant rewards ;
[0177] S4, Store the experience tuple;
[0178] S5, samples batch data from the experience tuple and uses the loss function defined above Calculate the loss of the batch data;
[0179] S6, use stochastic gradient descent to update the Q value network parameters and perform state Updates;
[0180] S7, repeat steps S2-S6. When the total reward of the model does not increase significantly, it proves that the model has converged and the training ends.
[0181] Table 1 Verification results
[0182] Verification has shown that the model has the ability to make accurate advertising and marketing recommendations.
[0183] 5. Model deployment application and online learning:
[0184] 1. Model deployment
[0185] Complete the establishment, training and optimization of the advertising marketing recommendation model, serialize its configuration into a deployable format, publish it to the online server cluster through an automated process, start efficient online reasoning services, and provide real-time model computing capabilities for the system.
[0186] 2. Real-time data collection and processing
[0187] Establish a high-throughput data collection pipeline to obtain the latest user behavior data stream, attribute data, and advertising content data from various data sources of the advertising system (mobile APP, e-commerce website) in real time. Perform the same feature extraction processing on the collected raw data as in training to generate standardized user behavior features, attribute features, and advertising feature tensors as input for online inference services.
[0188] 3. Online reasoning and precise advertising presentation
[0189] The processed feature data is input into the online inference service in real time, and the published advertising marketing recommendation model is used to calculate and generate personalized advertising recommendation results. Based on the recommendation results, the advertising content of interest is accurately presented to users, thereby improving the click-through rate and conversion rate of advertisements.
[0190] 4. Online learning and incremental model updates
[0191] The advertising marketing recommendation system continuously learns from the latest user behavior data and advertising data generated online, periodically performs incremental training on the model in small batches of data, and uses optimization algorithms to automatically update model parameters based on the loss function. The automated process publishes new model parameters to the online service cluster to replace the old model, thereby achieving real-time model updates and quickly adapting to changes in user interests and business trends.
[0192] Through the above-mentioned integrated online deployment process, the trained recommendation model is seamlessly integrated into each link of the advertising recommendation system, realizing key functions such as real-time data processing, online learning, and automatic model update. This allows the system to continuously learn the latest data on users and advertisements, and quickly adapt to changing user interests and business trends, thereby providing users with personalized and timely accurate advertising recommendations, maximizing the marketing effect of advertising.
[0193] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0194] Although the above describes the specific implementation methods of the present invention, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. An advertising marketing recommendation method based on deep reinforcement learning, characterized in that: The process includes: S1, build the original data set, which includes user behavior data , user attribute data and advertising content data ; S2, extract features from the original data set, mine potential patterns from unlabeled data through self-supervised learning, and perform multi-scale feature fusion on user features to generate rich user and advertising feature representations and obtain a standard feature data set; The specific process includes: User behavior feature extraction: Feature extraction is performed by constructing an autoencoder; the autoencoder learns a dense feature representation that captures the essential distribution and structure of the data by minimizing the difference between the input data and the reconstructed data, forcing it to learn to efficiently compress and reconstruct the user's temporal behavior feature data. , as user behavior characteristics; User attribute feature extraction: Convert the originally discrete user attribute data into a continuous vector representation, enhance the data representation capability, and make it more suitable for subsequent deep learning processing. Converted into vector form through the Embedding layer; Ad feature extraction: Get ad delivery features and creative content features , and splice them together to get the comprehensive features of the advertisement ; Multi-scale user feature fusion based on self-supervised learning: Through self-supervised pre-training, temporal behavior feature fusion, and behavior and attribute feature fusion, multi-scale behavior patterns of users are mined from massive unsupervised behavior data and fused with structured attribute information to generate high-quality and rich user representations. ; The multi-scale user feature fusion based on self-supervised learning is to mine the user's temporal behavior feature data The complex behavior patterns and interest preferences contained in the Organic fusion to generate multi-scale and rich user representations; Self-supervised pre-training is to learn useful behavior pattern representations from unlabeled user behavior sequence data and transform the user's temporal behavior feature data Treat it as unsupervised data; design a self-supervised task. Given a complete sequence of user behaviors, randomly mask some of them and let the model learn to predict the masked behaviors. The objective function of this task is to minimize the negative logarithm of the predicted probability of the masked behaviors: ; in, For the The behavior of the time step, The model is based on the prediction of other time-step behavior The probability of The temporal behavior feature fusion is based on the self-supervised pre-training model in the first step, which is used to fusion the original user’s temporal behavior feature data. Perform feature encoding to obtain behavioral feature representations at different levels, and then use a hierarchical attention mechanism to fuse these multi-scale representations: ; in, is the fused feature representation, For the time step, The state vector of the hidden layer, is the layer attention weight, which controls the importance of different layer features in fusion; The fusion of behavior and attribute features is to obtain the user's temporal behavior representation Then, it is combined with the user's static attribute features Fusion to generate a more comprehensive user representation ; The attribute gating mechanism is used during fusion, that is, different fusion weights are adaptively assigned to the current behavior and attribute according to their importance; the attribute gating vector By current behavior and properties The weighted sum of is then and Perform element-by-element multiplication and addition respectively, and finally get It combines the user's dynamic behavior patterns and static attribute information: ; ; in, That is, the final multi-scale user representation after fusing temporal behavior and user attributes; It is the gate operation mechanism; It is a soft gating vector that adaptively determines the weight of the two in fusion according to the current timing behavior and attribute characteristics; Represents the user's temporal behavior The corresponding weights, Attribute feature The corresponding weight, is the bias term; S3, builds a Transformer-based advertising marketing recommendation model, uses the self-attention mechanism to capture the complex relationship between users and ads, and conducts deeper feature interactions to obtain prediction results for advertising marketing recommendations; S4, based on the standard feature data set of S2, combines deep reinforcement learning to perform model training and optimization to obtain the trained advertising marketing recommendation model; S5, deploy the trained advertising marketing recommendation model to the actual advertising recommendation system for online learning, obtain the processed feature data in real time, and output personalized advertising marketing recommendation results.
2. The advertising marketing recommendation method based on deep reinforcement learning according to claim 1, characterized in that: The user behavior data in S1 Collection, including user click stream data , browsing behavior data and purchasing behavior data , denoted as , and it is time series data; The click stream data captures the user's click behavior on each element in the page, records the timestamp of the click event, the user ID and the ID information of the click element, and the click stream data is recorded as ; The browsing behavior data records user browsing behavior through front-end visible area capture technology, including browsing event timestamp, user ID, browsed page URL and stay time information; Browsing behavior data is recorded as ; The purchase behavior data is collected in the e-commerce application, including the key nodes of order placement, payment, and refund, and records the event time, user ID, order ID, and product ID information; the purchase behavior data is recorded as ; User behavior data includes user click stream data , browsing behavior data and purchasing behavior data , denoted as , and it is time series data; The user attribute data in S1 The collection is to obtain basic information from the user's registration information, including name ,Mail ,age ,gender ,address ; Finally get the user attribute data , and it is static data; The advertisement content data in S1 The collection includes advertising delivery record data and advertising creative content data , denoted as ; The advertisement delivery record includes the advertisement ID, delivery location ID identification data and advertisement click data recorded by the server. The advertisement delivery record data is recorded as ; The collection of the creative content of the advertisement involves capturing the title, description, display pictures and video creative materials of the advertisement. The creative content data of the advertisement is recorded as .
3. The advertising marketing recommendation method based on deep reinforcement learning according to claim 1, characterized in that: The user behavior feature extraction is specifically as follows: For discrete user behavior time series data First, the embedding layer is used to convert it into a continuous vector representation, so that the neural network can better learn the potential semantics and patterns between behavioral data; Then, the behavior sequence after Embedding The encoder is input into the autoencoder network. The encoder uses a 1D convolutional neural network CNN_Encoder, which moves on the time series through a sliding window mechanism to capture local features and contextual information and generate more representative potential representations. ; Next, Input to the decoder CNN_Decoder, the decoder will try to reconstruct the original behavior sequence , the decoder uses a deconvolutional neural network; According to the feature extraction network of the encoder-decoder of the established autoencoder, training is performed to minimize the reconstruction loss : ; The autoencoder is forced to learn feature representations that can efficiently compress and reconstruct user behavior sequences. .
4. The advertising marketing recommendation method based on deep reinforcement learning according to claim 1, characterized in that: The user attribute feature extraction, in order to further improve the expression ability of attribute features, uses a multi-layer perceptron MLP to these embedded vectors Perform nonlinear transformation; Multilayer Perceptron MLP consists of N fully connected layers, each of which contains a nonlinear activation function; captures the complex nonlinear relationship between attribute features, thereby obtaining more expressive user attribute features : ; in, Through multi-layer nonlinear transformation, user attribute features Possesses higher nonlinear expression capabilities.
5. The advertising marketing recommendation method based on deep reinforcement learning according to claim 1, characterized in that: The ad feature extraction, including ad placement features, counts the ad category, ad location ID and click data obtained from the ad ID, and processes them after normalization, splicing these placement-related statistics into a placement feature vector ; Among the creative content features, the title and description copy use TextCNN to extract feature vectors, the image uses CNN to obtain visual feature vectors, and the video uses 3D-CNN to extract motion feature vectors; and the text, image and video feature vectors are spliced as creative content features. .
6. The advertising marketing recommendation method based on deep reinforcement learning according to claim 1, characterized in that: In S4, deep reinforcement learning is combined to perform model training and optimization, specifically: Establish a state space and action space, and determine the state transition process of the environment, using Represents the time step The state of Represents the time step The action of time, Indicates in status Execute an action The immediate reward obtained after the state space is represented by the interactive features obtained by the interaction between the current user features and the advertising features. The final interactive representation is obtained in the above text. ,Right now ; The action space represents a series of actions that can be taken in a given state. The probability of recommending an option for all ads , 0 means not recommended at all, 1 means fully recommended, that is ; Design a reward function to guide the behavior of reinforcement learning advertising recommendation, and optimize the goal to achieve the optimal advertising marketing recommendation probability , so the reward function is: ; in, Parameters for weighing the probability of advertisement recommendation and the optimal probability of advertisement recommendation; Construct a Q-value function to learn the action-value function to guide the selection of actions; the Q-value function represents the state Next action The expected cumulative reward, that is, the Q value function is based on the cumulative reward function And update.
7. The advertising marketing recommendation method based on deep reinforcement learning according to claim 6, characterized in that: Based on the Q-value function, the Transformer-based deep learning model is trained and the loss function is defined; through each experience tuple The expected value of the sample is calculated as is the next state; the loss function is: ; in, Indicates the expected operator, is the discount factor, is the parameter of the target network, which is used to calculate the target Q value, that is, the expected cumulative reward in the future. are the parameters of the main network, used to evaluate the Q value of taking different actions in a given state, For the status The following actions are taken.
