Model training method, channel attribution value determination method, device and equipment

By using a temporal convolutional network model based on an attention mechanism, the relationship features between channels are extracted and enhanced, which solves the problem of inaccurate channel attribution values ​​and achieves higher prediction accuracy and channel contribution determination.

CN115906981BActive Publication Date: 2026-01-06BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211424406.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-14
Publication Date
2026-01-06
Estimated Expiration
2042-11-14

AI Technical Summary

Technical Problem

Existing channel attribution methods have limited information extracted due to model structure limitations, resulting in inaccurate channel attribution values.

Method used

We employ a temporal convolutional network model based on an attention mechanism. By amplifying key features that significantly impact user conversion results through the attention mechanism, and combining the structure of the temporal convolutional network model, we extract the relationship features between touchpoints. We use causal dilated convolution and residual layer structures to prevent gradient explosion or gradient vanishing, thereby improving prediction accuracy.

Benefits of technology

It improves the accuracy of channel attribution value calculation, enabling a more accurate determination of each channel's contribution to user conversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115906981B_ABST
    Figure CN115906981B_ABST
Patent Text Reader

Abstract

The application provides a model training method, a channel attribution value determination method and device, electronic equipment and a readable storage medium. The model training method comprises: obtaining user sample data, the user sample data comprising a preset number of contact point related data and user conversion results, the contact point representing the interaction between the user and the advertising channel; inputting the user sample data into a time convolution network model based on an attention mechanism for training, and outputting the predicted conversion results of each user sample data; determining the accuracy of the model according to the user conversion results and the predicted conversion results of all user sample data; when the accuracy is higher than a preset threshold, determining the weight corresponding to the key features of each contact point output by the attention mechanism layer of the model as the attribution value of each contact point, wherein the key features refer to the features that have a key influence on the user conversion results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of deep learning, and in particular to a model training method, a method for determining channel attribution values, an apparatus, an electronic device, and a readable storage medium. Background Technology

[0002] In advertising and marketing, advertisers typically run ads across multiple channels, meaning users often encounter the same product's advertisement through various channels. Advertisers need to understand which channels contribute most to user conversions in order to selectively target their ads. The method for determining the contribution of advertising channels is channel attribution. A channel's attribution value represents its contribution to user conversions.

[0003] Existing algorithm-based attribution methods mainly include Shapley value, Markov chain, survival analysis, channel attribution methods in machine learning, and channel attribution methods based on long short-term memory models.

[0004] Existing channel attribution methods have limited information extracted due to model structure limitations, resulting in inaccurate attribution values ​​for each channel. Summary of the Invention

[0005] To improve the accuracy of attribution value calculation for each channel, this application provides a model training method, a method for determining channel attribution values, an apparatus, an electronic device, and a readable storage medium.

[0006] This application provides a model training method, comprising: acquiring user sample data, wherein the user sample data includes a preset number of touchpoint-related data and user conversion results, wherein the touchpoints represent the interaction between users and advertising channels; inputting the user sample data into a temporal convolutional network model based on an attention mechanism for training, and outputting a predicted conversion result for each user sample data; determining the accuracy of the model based on the user conversion results and the predicted conversion results of all user sample data; and when the accuracy is higher than a preset threshold, determining the weights corresponding to the key features of each touchpoint output by the attention mechanism layer of the model as the attribution value of each touchpoint, wherein the key features refer to features that have a key impact on the user conversion results.

[0007] In the above implementation process, the attention mechanism can amplify key features that have a significant impact on user conversion results. The structure of the temporal convolutional network model can increase temporal constraints, flexibly expand the receptive field, extract more features of the relationship between touchpoints, and enable the acquired features to be mapped to touchpoint-related data from more distant times, thereby improving prediction accuracy and making the attribution values ​​of each touchpoint obtained after model training more accurate.

[0008] Furthermore, the attention-based temporal convolutional network model includes, in sequence, a first temporal convolutional layer, an attention-based residual layer, and a prediction layer; the attention-based residual layer includes the attention mechanism layer; the step of inputting the user sample data into the attention-based temporal convolutional network model for training and outputting the prediction transformation result for each user sample data includes: for each user sample data, using the first temporal convolutional layer to extract the first shallow features of each contact point from the contact point-related data; using the attention-based residual layer to enhance the first shallow features of each contact point to obtain the first enhanced features of each contact point; and using the prediction layer to process the first enhanced features of each contact point to obtain the prediction transformation result for each user sample data.

[0009] In the above implementation process, more shallow features can be extracted through the first convolutional layer, and the features can be further enhanced through the residual layer based on the attention mechanism, thereby improving the network prediction performance, expanding the network depth, preventing gradient explosion or gradient vanishing, and obtaining the prediction transformation results of user sample data through the prediction layer.

[0010] Furthermore, the first temporal convolutional layer includes a first convolutional layer and a first causal dilation convolutional layer connected in sequence. The step of extracting the first shallow features of each contact point from the contact point-related data using the temporal convolutional layer for each user sample data includes: performing a first convolution operation on the contact point-related data using the first convolutional layer for each user sample data to obtain first basic data; and performing a first causal dilation convolution operation on the first basic data using the first causal dilation convolutional layer to obtain the first shallow features of each contact point.

[0011] In the above implementation process, causal convolution operation can add temporal constraints to the first basic data, and dilated convolution operation can map the extracted features to a larger receptive field, that is, rely on contact point related data from a more distant time.

[0012] Further, the attention-based residual layer includes a first branch, a second branch, and a fusion layer; the first branch includes a second convolutional layer, the attention mechanism layer, and a second temporal convolutional layer connected in sequence, and the second branch includes another second convolutional layer; the outputs of the first branch and the second branch are the inputs of the fusion layer; the enhancement of the first shallow features of each contact point by the attention-based residual layer to obtain the first enhanced features of each contact point includes: performing a second convolution operation on the first shallow features of each contact point through the second convolutional layer of the first branch to obtain second basic data; performing an attention amplification operation on the second basic data through the attention mechanism layer of the first branch to obtain the key features; performing convolution operations on the key features sequentially through the second temporal convolutional layer of the first branch to obtain the first deep features of each contact point; performing a second convolution operation on the first shallow features of each contact point through the second branch to obtain the second shallow features of each contact point; and fusing the first deep features and the second shallow features of each contact point through the fusion layer to obtain the first enhanced features of each contact point.

[0013] In the above implementation process, by embedding an attention mechanism layer into the first branch, key features affecting user conversion results can be filtered out. Through multiple convolution operations, deep features of each contact point can be extracted. The right branch extracts the second shallow features of each contact point through a single convolution layer. By fusing the shallow and deep features, feature enhancement is achieved.

[0014] Furthermore, the attention mechanism layer includes a global average pooling layer, a first fully connected layer, a second fully connected layer, and a classification layer; the step of performing attention amplification on the second basic data through the attention mechanism layer to obtain the key features includes: performing global average pooling on the second basic data through the global average pooling layer to obtain global features for each contact point; reducing the dimensionality of the global features through the first fully connected layer; restoring the original dimensionality of the dimensionality-reduced global features through the second fully connected layer; and selecting the key features from the global features with restored original dimensionality through the classification layer.

[0015] In the above implementation process, since global features reflect the mutual influence between various touchpoints, global average pooling can be used to extract global features, thereby revealing the relationships between touchpoints. Dimensional transformation yields global features of the desired dimensions, and classification of these global features identifies the key features influencing user conversion results.

[0016] Furthermore, the step of processing the first enhanced features of each contact point using the prediction layer to obtain the prediction transformation result of each user sample data includes: performing a fourth convolution operation and a downsampling operation on the first enhanced features of each contact point in sequence to obtain the prediction transformation result of each user sample data.

[0017] In the above implementation process, by performing convolution and downsampling operations on the first enhanced features of each contact point, accurate prediction and transformation results can be obtained.

[0018] Furthermore, the contact point-related data includes channel identifier, whether it was clicked, timestamp, contact duration, and contact method.

[0019] Furthermore, the attention-based temporal convolutional network model further includes: another residual layer, which is connected after the first temporal convolutional layer and before the attention-based residual layer.

[0020] In the above implementation process, another residual layer can be superimposed to further extend the network depth, accelerate network feedback and convergence, thereby solving the problems of gradient vanishing and gradient explosion, and can also further realize feature enhancement and improve the prediction performance of the network.

[0021] This application provides a method for determining channel attribution values, comprising: obtaining attribution values ​​for each touchpoint of each user sample; the user sample includes touchpoint-related data, the touchpoints representing the interaction between the user and the advertising channel, and the attribution values ​​being the weights corresponding to the key features of each touchpoint output by the attention mechanism layer of the trained attention mechanism-based temporal convolutional network model; based on the channel identifier in the touchpoint-related data of the user sample, calculating the quotient of the sum of the touchpoint attribution values ​​corresponding to the same channel identifier of the user sample and the number of successfully converted users, and determining this quotient as the attribution value of the channel.

[0022] Furthermore, the attention-based temporal convolutional network model is trained according to any of the model training methods provided in this application.

[0023] In the above implementation process, the attention mechanism can amplify key features that have a significant impact on user conversion results. The structure of the temporal convolutional network model can increase temporal constraints, flexibly expand the receptive field, extract more features of the relationship between touchpoints, and enable the acquired features to be mapped to touchpoint-related data from more distant times, thereby improving prediction accuracy and making the attribution values ​​of each touchpoint obtained after model training more accurate. Attached Figure Description

[0024] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 A schematic flowchart illustrating a model training method provided in an embodiment of this application;

[0026] Figure 2 A flowchart illustrating a method for determining channel attribution values ​​provided in an embodiment of this application;

[0027] Figure 3 This is a schematic diagram of the structure of a model training device provided in an embodiment of this application;

[0028] Figure 4 A schematic diagram of a device for determining channel attribution values ​​provided in an embodiment of this application;

[0029] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0030] Figure 6 A schematic diagram of the temporal convolutional network model structure based on the attention mechanism provided in this application embodiment;

[0031] Figure 7 A schematic diagram of the basic structure of the temporal convolutional layer provided in the embodiments of this application;

[0032] Figure 8 A schematic diagram of the basic structure of the attention-based residual layer provided in the embodiments of this application;

[0033] Figure 9 This is a schematic diagram of the attention mechanism layer provided in an embodiment of this application;

[0034] Figure 10 The AUC variation curves of each model in the experimental design provided in the embodiments of this application;

[0035] Figure 11 The loss function variation curves of each model in the experimental design provided in the embodiments of this application. Detailed Implementation

[0036] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. To better understand the technical solutions of this application, the following explanations of terms will be provided:

[0037] Touchpoints: The interaction between advertising channels and users. For example, if a user sees a product advertisement on a live streaming platform, a search website, or a social media platform, then the advertising channels through which the user interacts with the product advertisement become different touchpoints in the order in which they occur.

[0038] Touchpoint Attribution Value: The contribution of a single touchpoint to the conversion result of a single user.

[0039] Channel Attribution Value: The contribution of an advertising channel to user conversion results. Channel Attribution Value is the quotient of the sum of the attribution values ​​of all touchpoints corresponding to the same channel for all converted users and the number of successfully converted users.

[0040] Example 1

[0041] To more accurately determine the attribution value of advertising channels, this application provides a model training method. See also... Figure 1 As shown, Figure 1 This is a flowchart illustrating a model training method provided in an embodiment of this application, including:

[0042] S101: Obtain user sample data, which includes a preset number of touchpoint-related data and user conversion results. Touchpoints represent the interaction between users and advertising channels.

[0043] The touchpoint-related data includes basic information about the advertising channel and user interaction information with the advertising channel. For example, touchpoint-related data may include channel identifiers, timestamps, and whether a click occurred. Each touchpoint represents one interaction between the user and the advertising channel, and a user sample data set can contain multiple touchpoint-related data points. User conversion results are categorized as successful or unsuccessful, with 1 representing success and 0 representing failure. The preset number is not specifically limited and can range from a positive integer greater than 3. For example, the preset number could be 20.

[0044] Specifically, there are no restrictions on how user sample data is obtained. For example, user sample data can be obtained from an open-source database or from the log files of an application that interacts with the user.

[0045] Optionally, raw user sample data can be obtained from an open-source database. The raw data is then preprocessed and formatted into a uniform format. This raw data consists of user journey data, which comprises information about a series of advertising channels that the user encounters before a conversion occurs, all related to that conversion outcome.

[0046] For example, user u iBefore a conversion occurs, if an ad for a particular product is seen on social media platforms, search engines, and live streaming platforms, then the relevant information from these interactions, arranged chronologically, constitutes the user's profile. i Journey data for user u i The same advertising channel encountered during the journey becomes different touchpoints depending on where it appears.

[0047] User journey data should include the following: Where n is the total number of users. User u i The corresponding conversion journey is Where m i The total number of touchpoints a user experiences during their conversion journey, p j On behalf of user u i The j-th touchpoint in the conversion journey, containing relevant data such as timestamp, duration of contact, and advertising channel identifier. i Indicates user u i The conversion behavior results, label i =1 indicates successful user conversion, label i =0 indicates that the user conversion failed.

[0048] User journey data may be stored in different ways and preprocessed in different ways, but the processed data format is the same.

[0049] For example, using a real dataset, the data preprocessing process is illustrated. This dataset structure contains one user row and multiple data rows. The first element of the user row is the number of touchpoints, and the second element is the user conversion result. Each data row corresponds to one touchpoint-related data point, including timestamp, click status, channel identifier, etc. Based on the timestamp, 20 touchpoint-related data points within two weeks of the user conversion behavior are selected. When the number of touchpoint-related data points reaches 20, zeros are used to fill in the missing touchpoints. The touchpoint-related data corresponding to the number of touchpoints is extracted from the data rows based on the first element of the user row and stored as a touchpoint-related data list. The second element of the user row is then read into the user conversion result list. This yields a user sample dataset.

[0050] In one feasible implementation, the touchpoint-related data includes channel identifier, whether a click occurred, timestamp, touch duration, and touch method.

[0051] S102: Input user sample data into a temporal convolutional network model based on an attention mechanism for training, and output the predicted transformation result for each user sample data.

[0052] Among them, the attention-based temporal convolutional network model adds an attention mechanism layer to the temporal convolutional network model. The basic structure of the attention-based temporal convolutional network model is as follows: Figure 6 As shown, but not limited to Figure 6 The model structure shown. For example, it can be... Figure 6 Multiple convolutional layers or multiple residual layers are stacked on the basic structure shown.

[0053] Specifically, user sample data is used as input data to train a temporal convolutional network model based on an attention mechanism, and the predicted transformation result for each user sample data is output.

[0054] In one feasible implementation, the attention-based temporal convolutional network model includes, in sequence, a first temporal convolutional layer, an attention-based residual layer, and a prediction layer. The attention-based residual layer includes an attention mechanism layer.

[0055] Accordingly, step S102 involves inputting the user sample data into a temporal convolutional network model based on an attention mechanism for training, and outputting the predicted transformation result for each user sample data, including:

[0056] S201: For each user sample data, a first-time convolutional layer is used to extract the first shallow features of each contact point from the contact point related data.

[0057] The first-time convolutional layer includes at least a convolutional layer and a causal dilated convolutional layer, such as... Figure 7 As shown, other structures may also be included, without specific limitations here. For example, a normalization layer and an activation layer may also be included.

[0058] Specifically, each user sample data is input into the first time convolutional layer, and the first shallow features of each contact point are extracted by performing at least one convolution operation and a causal dilation convolution operation based on the contact point related data.

[0059] Optionally, normalization and feature activation can also be performed on the extracted first shallow features.

[0060] In one feasible implementation, the first temporal convolutional layer includes a first convolutional layer and a first causal dilated convolutional layer connected in sequence. Correspondingly, step S201, which involves extracting the first shallow features of each contact point from the contact point-related data using the temporal convolutional layer for each user sample data, includes:

[0061] S301: For each user sample data, the first convolutional layer is used to perform the first convolution operation on the contact point related data to obtain the first basic data.

[0062] In one implementation, the kernel size of the first convolution operation is 5 and the stride is 1.

[0063] Specifically, a convolution kernel of size 5 and stride 1 is used to perform the first convolution operation on the contact point related data to obtain the first basic data.

[0064] The kernel size is set to 5, which balances the receptive field and computational cost, so that features with a larger receptive field can be extracted with a suitable amount of computation, i.e. a suitable training time.

[0065] Optionally, the first convolutional layer may also contain multiple convolutional kernels, and the kernel size and stride may be other values.

[0066] S302: The first causal dilated convolutional layer is used to perform the first causal dilated convolution operation on the first basic data to obtain the first shallow features of each contact point.

[0067] The first causal dilated convolutional layer includes causal convolutional layers and dilated convolutional layers. Causal convolution is a strictly temporally ordered unidirectional convolutional structure; the output of a subsequent convolutional layer at time t depends on the output of the preceding convolutional layer at time t and times prior to time t. t can be any time. In other words, causal convolution can only be based on past data and cannot use future data. Dilated convolution refers to convolution operations that sample at fixed intervals. The sampling interval is controlled by the dilation factor. The higher the number of convolutional layers, the larger the dilation factor value, increasing exponentially with the number of layers. Therefore, dilated convolution requires only a relatively small number of layers to obtain a large receptive field. When the filter F = (f1, f2, ..., f... k ), input sequence X = (x t-(k-1)*d ,…,x t-2d ,x t-d, x t When x t The causal dilation convolution at that point is:

[0068]

[0069] Among them, input data (x) t-(k-1)*d ,…,x t-2d ,x t-d, x t The expression represents the output data of the first convolutional layer at time t and times prior, where k is the number of filters, d is the dilation factor, and f is the value of f. i *x t-(k-i)*d The characterization filter performs a convolution operation on the input data.

[0070] Specifically, causal convolution and dilated convolution operations are performed sequentially on the first basic data, with a dilation factor of 4.

[0071] Alternatively, the inflation factor can be other values.

[0072] The model training method provided in this application adds temporal constraints to the initial basic data through causal convolution operations, ensuring that the data can be operated on in one temporal direction. Since causal convolution is still limited by the kernel size, more layers need to be added linearly when dependencies at more distant contact points are required. Dilated convolution, however, can reduce the number of layers needed while maintaining the same length of the contact point dependencies. Therefore, dilated convolution operations can reduce the required number of network layers while mapping the extracted features to a larger receptive field, even if the extracted features depend on data related to more distant contact points.

[0073] S202: An attention-based residual layer is used to enhance the first shallow layer features of each contact point, resulting in the first enhanced features of each contact point.

[0074] Specifically, the residual layer structure based on the attention mechanism is not specifically limited, such as... Figure 8 As shown, it can include the basic structure of the residual layer and the attention mechanism layer, or it can include other structures.

[0075] Specifically, deep features of each contact point are extracted through the first branch of the residual layer based on the attention mechanism, and shallow features of each contact point are extracted through the second branch of the residual layer based on the attention mechanism. The shallow features and deep features are then fused together to obtain the first enhanced features of each contact point.

[0076] In one feasible implementation, the attention-based residual layer includes a first branch, a second branch, and a fusion layer. The first branch includes a second convolutional layer, an attention mechanism layer, and a second temporal convolutional layer connected in sequence. The second branch includes another second convolutional layer. The outputs of the first branch and the second branch serve as the inputs to the fusion layer.

[0077] For example, the input to the attention-based residual layer is C. in The output is C out Let F(x) be the output of input x after passing through the second convolutional layer, the attention mechanism layer, and the second temporal convolutional layer, and H(x) be the output of input x after passing through the second convolutional layer. Then the formula can be expressed as:

[0078] C out =F(C in )+H(C in )

[0079] Accordingly, in step S202, an attention-based residual layer is used to enhance the first shallow features of each contact point, resulting in the first enhanced features of each contact point, including:

[0080] S401: The second convolution operation is performed on the first shallow features of each contact point through the second convolution layer of the first branch to obtain the second basic data.

[0081] In one implementation, the kernel size of the second convolution operation is 5 and the stride is 2.

[0082] Accordingly, a second convolution operation is performed on the first shallow layer features of each contact point using a convolution kernel of size 5 and stride of 2 to obtain the second basic data.

[0083] Optionally, the second convolutional layer may also include multiple convolutional kernels, and the kernel size may be other values.

[0084] S402: The attention mechanism layer of the first branch performs attention amplification operation on the second basic data to obtain key features.

[0085] The structure of the attention mechanism layer is not specifically limited. For example... Figure 9 The diagram shown is a structural diagram of an attention model. The structure of an attention model is not limited to... Figure 9 As shown, other structures are also possible. For example, the attention mechanism structure can be a spatial attention model, a channel attention model, or a hybrid spatial and channel attention model.

[0086] The principle of the attention mechanism layer is to select key information from numerous input information for in-depth processing and suppress some useless information, thereby improving the prediction accuracy.

[0087] In this embodiment, the attention mechanism calculates attention based on the contribution of each touchpoint to user conversion. For each user sample data, it focuses on the relationship between each touchpoint and uses the attention mechanism to obtain the contribution of different touchpoints to successful user conversion.

[0088] Specifically, the attention mechanism layer performs a global information embedding Squeeze operation on the second basic data, which is also a global average pooling operation, to extract global features at the contact point level. Then, it performs an adaptive adjustment Excitation operation on the global features, i.e., executes steps S502-S504, to learn the relationship between each contact point and extract the weights of key features of different contact points.

[0089] In one feasible implementation, the attention mechanism layer includes a global average pooling layer, a first fully connected layer, a second fully connected layer, and a classification layer. Accordingly, step S402, which involves performing an attention amplification operation on the second basic data through the attention mechanism layer of the first branch to obtain key features, includes:

[0090] S501: Global average pooling is performed on the second basic data through a global average pooling layer to obtain the global features of each contact point.

[0091] Specifically, all features at each contact point are encoded into a single global feature using global average pooling. The formula can be expressed as:

[0092]

[0093] Where u is the input contact point feature data, u[i] is the i-th feature, and W is the total number of features.

[0094] Global average pooling can transform an input of any size into an output of a specific size, while the number of features in the input and output remains unchanged.

[0095] S502: Dimensionality reduction of global features is achieved through the first fully connected layer.

[0096] Specifically, the global features are linearly transformed through the first fully connected layer to obtain the dimensionality-reduced global features.

[0097] Optionally, the attention mechanism layer can add an activation layer after the first fully connected layer, which can activate the dimensionality-reduced global features accordingly.

[0098] S503: The original dimension of the dimensionality-reduced global features is restored through the second fully connected layer.

[0099] Specifically, the reduced global features are linearly transformed again through the second fully connected layer to restore the original dimension of the reduced global features.

[0100] S504: Key features are selected from global features that restore the original dimensions through a classification layer.

[0101] Specifically, the classification layer uses the sigmoid classification function and gating mechanism to classify the global features that restore the original dimensions, and selects the key features that affect user conversion results.

[0102] The formula for the sigmoid gating mechanism can be expressed as:

[0103] s=σ(g(z,W))=σ(W2ReLU(W1z))

[0104] Where z is a global feature, W1∈R (C / r×C) ,W2∈R( C×C / r ), where r is the dimensionality reduction coefficient. W1 performs dimensionality reduction transformation on the global features, ReLU activates the dimensionality-reduced global features, and W2 performs dimensionality increase transformation on the dimensionality-reduced global features.

[0105] The model training method provided in this application, since global features reflect the mutual influence between various contact points, can extract global features through global average pooling to obtain the relationships between contact points. Global features of the desired dimensions are obtained through dimensional transformation, and key features affecting user conversion results are obtained by classifying these global features.

[0106] S403: The key features are convolved sequentially through the second time convolutional layer of the first branch to obtain the first deep features of each contact point.

[0107] The second temporal convolutional layer includes at least causal convolution and dilated convolution. Its structure is not specifically limited. For example, it may also include a normalization layer and an activation layer.

[0108] Specifically, the first deep features of each contact point are obtained by sequentially performing causal convolution and dilation convolution operations on the key features through the second temporal convolution layer.

[0109] Optionally, after the causal convolution and dilated convolution operations, the first deep features of each contact point can also be normalized and activated.

[0110] S404: Perform a second convolution operation on the first shallow features of each contact point through the second branch to obtain the second shallow features of each contact point.

[0111] The second convolution operation has a kernel size of 5 and a stride of 2.

[0112] Specifically, a second convolution operation is performed on the first shallow layer features of the contact points using a convolution kernel of size 5 and stride of 2 to obtain the second shallow layer features of each contact point.

[0113] Optionally, the second convolutional layer may also include multiple convolutional kernels, and the size of each convolutional kernel may also be other values.

[0114] S405: The first deep feature and the second shallow feature of each contact point are fused by the fusion layer to obtain the first enhanced feature of each contact point.

[0115] The model training method provided in this application can filter out key features that affect user conversion results by embedding an attention mechanism layer into the first branch. Through multiple convolution operations, deep features of each contact point can be extracted. The right branch extracts the second shallow features of each contact point through a single convolution layer. Feature enhancement is achieved by fusing the shallow and deep features.

[0116] S203: The prediction layer is used to process the first enhanced features of each contact point to obtain the prediction transformation result of each user sample data.

[0117] Specifically, the prediction layer sequentially performs convolution operations on the first enhanced features of each contact point, followed by global average pooling, to obtain the prediction transformation results of the user sample data.

[0118] Optionally, after the convolution operation, the output data can be normalized and activated.

[0119] In one feasible implementation, a prediction layer is used to process the first enhanced features of each contact point to obtain the prediction transformation result of each user sample data, including:

[0120] The fourth convolution operation and downsampling operation are performed sequentially on the first enhanced features of each contact point to obtain the prediction transformation result of each user sample data.

[0121] The fourth convolution operation has a kernel size of 2*2 and a stride of 1.

[0122] Optionally, the fourth convolution operation can also be a multi-layer convolution operation, and the kernel size can also be other values.

[0123] The model training method provided in this application can obtain accurate prediction and transformation results by performing convolution and downsampling operations on the first enhanced features of each contact point.

[0124] The model training method provided in this application can extract more shallow features through the first-time convolutional layer, and select key information from numerous input information for in-depth processing through the attention mechanism, while suppressing some useless information, thereby improving prediction accuracy. The residual layer can extend the network depth, prevent gradient explosion or gradient vanishing, further enhance features, and improve the network prediction performance. The prediction layer can obtain the prediction transformation results of user sample data.

[0125] In one feasible implementation, the attention-based temporal convolutional network model further includes: another residual layer connected after the first temporal convolutional layer and before the attention-based residual layer.

[0126] Specifically, the structure of the other residual layer is not specifically limited.

[0127] Optionally, the other residual layer includes a third branch, a fourth branch, and a second fusion layer. The third branch includes another second convolutional layer and another second temporal convolutional layer, and the fourth branch includes another second convolutional layer. The output data of the third and fourth branches are the input data of the second fusion layer.

[0128] For neural network models, the more layers there are, the more prone they are to gradient vanishing and gradient exploding during training. Introducing residual layers can effectively address this problem. Residual layers are implemented through cross-layer connections, allowing networks with fewer layers to be expanded into deeper networks, accelerating network feedback and convergence, thus resolving gradient vanishing and exploding issues. They also enable feature enhancement, improving the network's predictive performance. This application, by stacking another residual layer, further extends the network depth, preventing gradient vanishing and exploding, and further enhancing feature enhancement to improve network predictive performance.

[0129] S103: Determine the model's accuracy based on the user conversion results and predicted conversion results of all user sample data.

[0130] Specifically, the predicted conversion results and user conversion results of the same user sample data are compared, and the data with consistent comparison results are counted. The result is then divided by the total number of user sample data to obtain the accuracy rate.

[0131] For example, if the number of predicted conversion results that match the actual user conversion results for the same user sample data is 95, and the total number of user sample data is 100, then the accuracy rate is 95 / 100*100% = 95%.

[0132] S104: When the accuracy is higher than the preset threshold, the weights corresponding to the key features of each touchpoint output by the model's attention mechanism layer are determined as the attribution values ​​of each touchpoint. Key features refer to features that have a key impact on user conversion results.

[0133] The preset threshold is not limited. For example, it could be 95%.

[0134] Specifically, when the accuracy is higher than a preset threshold, the weights corresponding to each key feature output by the model's attention mechanism layer are used as the attribution values ​​for each contact point.

[0135] The model training method provided in this application can amplify key features that have a significant impact on user conversion results through the attention mechanism. The structure of the temporal convolutional network model can increase temporal constraints, flexibly expand the receptive field, extract more features of the relationship between touch points, and enable the acquired features to be mapped to touch point related data from more distant times, thereby improving prediction accuracy and making the attribution values ​​of each touch point obtained after model training more accurate.

[0136] Example 2

[0137] Figure 2 This is a flowchart illustrating the method for determining channel attribution values ​​provided in this application. For example... Figure 2 As shown, the method for determining channel attribution value provided in this application includes:

[0138] S601: Obtain the attribution values ​​for each touchpoint of each user sample. The user sample includes touchpoint-related data, which represents the interaction between the user and the advertising channel. The attribution values ​​are the weights corresponding to the key features of each touchpoint output by the attention mechanism layer of the trained attention-based temporal convolutional network model.

[0139] The user sample data includes a preset number of touchpoint-related data and user conversion results. Each touchpoint-related data includes channel identifier, timestamp, contact duration, and contact method. User conversion results include successful and failed conversions, represented by 1 and 0 respectively. The attention-based temporal convolutional network model can be trained according to the method described in Example 1, or it can be a pre-trained model obtained from elsewhere.

[0140] Specifically, since the contact point attribution value is only related to the temporal order, the weights of the key features of each contact point can be directly obtained from the attention mechanism layer of the trained model and used as the attribution value of each contact point at the corresponding position of each user sample.

[0141] In one feasible implementation, the attention-based temporal convolutional network model is trained according to any of the model training methods provided in this application.

[0142] S602: Based on the channel identifier in the user sample touchpoint related data, calculate the quotient of the sum of the touchpoint attribution values ​​corresponding to the same channel identifier of the user sample and the number of successfully converted users, and determine this quotient as the attribution value of the channel.

[0143] Specifically, since the calculation focuses on the channel's contribution to user conversion success—that is, the channel's attribution value—only the sample of successfully converted users needs to be considered in the calculation. The formula can be expressed as:

[0144]

[0145] Where Suc represents the number of users who successfully converted, and y i =1 indicates that the user conversion was successful. W ic The touchpoint attribution value corresponding to user i when the channel identifier is c in the touchpoint-related data, assuming the conversion is successful. ic The calculation formula can be expressed as:

[0146]

[0147] Where, p j [i d ] = c represents the i-th feature of the contact point. d +1) touchpoints with channel identifiers. m represents user u. iThe number of contact points. From this, the attribution value corresponding to each channel can be calculated.

[0148] The method for determining channel attribution values ​​provided in this application can obtain the attribution values ​​of each touchpoint for each user sample through a trained model. Since the touchpoint attribution value can only represent the attribution value of a user's single contact with a channel, the attribution value of the channel can be obtained more accurately by calculating the quotient of the sum of the touchpoint attribution values ​​of all user samples for the same channel and the number of successfully converted users.

[0149] Comparative experimental design

[0150] The tasks of experimental design include the following two items:

[0151] (1) Predict conversion results based on user sample data.

[0152] (2) Calculate the impact of each advertising channel on user conversion success and assign attribution values.

[0153] Dataset description:

[0154] The dataset used is a real-world dataset released by Criteo AI Lab containing conversion data from over 2.2 million users. The dataset includes timestamps, click status, ad channel IDs, ad channel information, and user conversion results. The data preprocessing process is as described above.

[0155] Baseline Model Introduction

[0156] To demonstrate the performance of the attention-based temporal convolutional network model, experiments were conducted comparing it with four baseline models and a temporal convolutional network model without attention. The models involved in the experiments are described below:

[0157] Logistic Regression (LR) model

[0158] The Logistic Regression (LR) model assumes that the data follows a Bernoulli distribution. It divides the data into two parts by maximizing the likelihood function and solving for the parameters using gradient descent. LR is a fundamental machine learning model with the advantages of simple implementation and fast computation.

[0159] Additive Hazard (AH) regression model

[0160] The AH model is the first multi-touch attribution model based on survival analysis principles and the additive hazard model, which reduces prediction error by employing a probabilistic framework.

[0161] Simple Probabilistic Model (SP)

[0162] SP is a simple probabilistic model driven by causality, used to calculate the contribution of advertising to user conversions. The conversion result for each user is calculated using the following formula:

[0163]

[0164] Wherein, Pr(y=1|c j =k) ​​is the probability of conversion on the k-th channel.

[0165] Additional Multiple Electric Shock Attribution Model (AMTA)

[0166] AMTA uses survival analysis for modeling and takes into account time decay factors, using risk rates to measure the impact of advertising.

[0167] DNAMTA, a deep neural network attribution model with attention

[0168] DNAMTA uses LSTM as its base model, taking into account time decay factors and incorporating additional user attribute information.

[0169] Recurrent Neural Network (RNN)

[0170] RNNs use LSTM to implement the basic recurrent neural network model.

[0171] Temporal Convolutional Network (TCN)

[0172] Compared to attention-based temporal convolutional network models, the TCN model lacks an attention mechanism and is used as a reference for experimental comparison.

[0173] Att-TCN, a temporal convolutional network model based on attention mechanism

[0174] Att-TCN is a TCN model with an attention mechanism proposed in this application. It incorporates the attention layer into the residual module to better achieve prediction and attribution value assignment.

[0175] Experimental results

[0176] For task (1), this application selects two metrics, AUC and LogLoss, to verify the experimental results. AUC is the area under the ROC curve, which reflects the classifier's ability to classify zoning and welfare. LogLoss reflects the average bias of the samples; the higher the AUC value and the lower the LogLoss value, the more accurate the prediction results.

[0177] Table 1 Comparison of AUC and LogLoss values ​​for all experimental models

[0178]

[0179] Based on the statistical data in Table 1, Att-TCN outperforms other baselines in terms of both AUC and LogLoss. Figure 10 and Figure 11 The results show that Att-TCN converges relatively quickly and stably. Based on these results, we can conclude that: (i) the Att-TCN model proposed in this application achieves better transition prediction accuracy than other baseline models. (ii) compared with RNN and TCN, the novel models DNAMTA and Att-TCN, which integrate the attention mechanism, have better performance. This indicates that the attention mechanism plays an important role in solving sequential prediction tasks. (iii) compared with other models, AH and SP have poor transition classification performance.

[0180] For task (2), the allocation of attribution values ​​often varies depending on the model. For example, in models based on Shapley values, marginal contribution is usually used for calculation; in the model provided in this application, an attention mechanism is used to calculate the attribution value. Currently, there is a lack of complete verification methods for the rationality of attribution value allocation, but in general, models that perform well in predicting conversion rates are often considered to have more reasonable attribution values. Experimental data shows that the Att-TCN method performs excellently in predicting conversion rates.

[0181] Example 3:

[0182] Figure 3 This is a schematic diagram of a model training device provided in this application. Figure 3 As shown, this application provides a model training device 300, including an acquisition module 301, a training module 302, a determination module 303, and a judgment module 304.

[0183] The acquisition module 301 is used to acquire user sample data, which includes a preset number of touchpoint-related data and user conversion results. Touchpoints represent the interaction between users and advertising channels.

[0184] The training module 302 is used to input user sample data into a temporal convolutional network model based on an attention mechanism for training, and output the predicted transformation result for each user sample data.

[0185] The determination module 303 is used to determine the accuracy of the model based on the user conversion results and predicted conversion results of all user sample data.

[0186] The judgment module 304 is used to determine the weights corresponding to the key features of each touchpoint output by the model's attention mechanism layer as the attribution value of each touchpoint when the accuracy is higher than a preset threshold. Key features refer to features that have a key impact on user conversion results.

[0187] The training module 302 is specifically used to extract the first shallow features of each contact point from the relevant data using a first-time convolutional layer for each user sample data. An attention-based residual layer is then used to enhance these first shallow features, resulting in enhanced features for each contact point. Finally, a prediction layer processes these enhanced features to obtain the predicted transformation result for each user sample data.

[0188] The training module 302 is specifically used to perform a first convolution operation on the contact point-related data using a first convolutional layer for each user sample data to obtain the first basic data. Then, a first causal dilation convolutional layer is used to perform a first causal dilation convolution operation on the first basic data to obtain the first shallow features of each contact point.

[0189] Training module 302 is specifically used to perform a second convolution operation on the first shallow features of each contact point through the second convolutional layer of the first branch to obtain the second basic data. An attention mechanism layer of the first branch is used to perform attention amplification on the second basic data to obtain key features. The second temporal convolutional layer of the first branch sequentially performs convolution operations on the key features to obtain the first deep features of each contact point. The second branch performs a second convolution operation on the first shallow features of each contact point to obtain the second shallow features of each contact point. A fusion layer fuses the first deep features and the second shallow features of each contact point to obtain the first enhanced features of each contact point.

[0190] Training module 302 is specifically used to perform global average pooling on the second base data through a global average pooling layer to obtain global features for each contact point. A first fully connected layer is used to reduce the dimensionality of the global features. A second fully connected layer is used to restore the original dimensionality of the dimensionality-reduced global features. A classification layer is used to filter out key features from the global features with restored original dimensionality.

[0191] The training module 302 is specifically used to perform the fourth convolution operation and downsampling operation on the first enhancement features of each contact point in sequence to obtain the prediction transformation result of each user sample data.

[0192] Example 4:

[0193] Example 4 illustrates a channel attribution value determination apparatus provided in an embodiment of this application. This application provides a channel attribution value determination apparatus 400, as shown... Figure 4 As shown, the channel attribution value determination device 400 includes a second acquisition module 401 and a second determination module 402.

[0194] The second acquisition module 401 is used to acquire the attribution values ​​of each touchpoint for each user sample. The user sample includes touchpoint-related data, where touchpoints represent the interaction between the user and the advertising channel, and the attribution values ​​are the weights corresponding to the key features of each touchpoint output by the attention mechanism layer of the trained attention-based temporal convolutional network model.

[0195] The second determining module 402 is used to calculate the quotient of the sum of the contact point attribution values ​​corresponding to the same channel identifier of the user sample and the number of successfully converted users based on the channel identifier in the contact point related data of the user sample, and to determine this quotient as the attribution value of the channel.

[0196] Example 5:

[0197] This application provides an electronic device, see [link to relevant documentation] Figure 5 As shown, it includes a processor 501 and a memory 502. Wherein:

[0198] The processor 501 is used to execute one or more programs stored in the memory 502 to implement the method described in Embodiment 1 or Embodiment 2 above.

[0199] Understandable. Figure 5 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 5 The more or fewer components shown, or having the same Figure 5 The different configurations shown.

[0200] For example, the processor 501 and the memory 502 may be connected via a communication bus. As another example, the electronic device may also include components such as a display, mouse, and keyboard.

[0201] In this embodiment, the processor 501 can be a central processing unit, a microprocessor, a microcontroller, etc., but this is not a limitation. The memory 502 can be a random access memory, a read-only memory, a programmable read-only memory, an erasable read-only memory, an electrically erasable read-only memory, etc., but this is not a limitation.

[0202] In the embodiments of this application, the electronic device can be, but is not limited to, physical devices such as desktop computers, laptops, smartphones, smart wearable devices, and in-vehicle devices, or virtual devices such as virtual machines. Furthermore, the electronic device is not necessarily a single device; it can be a combination of multiple devices, such as a server cluster, etc.

[0203] This embodiment also provides a computer-readable storage medium, such as a floppy disk, optical disk, hard disk, flash memory, USB flash drive, SD (Secure Digital Memory Card), MMC (Multimedia Card), etc., in which one or more programs implementing the above steps are stored. These one or more programs can be executed by one or more processors to implement the model training method described in Embodiment 1 or the channel attribution value determination method described in Embodiment 2. Further details will not be elaborated here.

[0204] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0205] In the various embodiments of this application, the functional modules can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0206] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0207] In this article, "multiple" refers to two or more.

[0208] The above are merely embodiments of this application and are not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A model training method, characterized in that, The method comprises the following steps: acquiring user sample data, the user sample data comprising a preset number of touch point related data and user conversion results, the touch point representing the interaction between the user and the advertising channel; inputting the user sample data into a time convolution network model based on an attention mechanism for training, and outputting the predicted conversion results of each user sample data; determining the accuracy of the model according to the user conversion results and the predicted conversion results of all user sample data; when the accuracy is higher than a preset threshold, determining the weight corresponding to the key features of each touch point output by the attention mechanism layer of the model as the attribution value of each touch point, the key features being the features having a key influence on the user conversion results; the time convolution network model based on the attention mechanism comprises a first time convolution layer, a residual layer based on the attention mechanism and a prediction layer connected in sequence; the residual layer based on the attention mechanism comprises the attention mechanism layer; the residual layer based on the attention mechanism comprises a first branch, a second branch and a fusion layer; the first branch comprises a second convolution layer, the attention mechanism layer and a second time convolution layer connected in sequence, and the second branch comprises another second convolution layer; the output of the first branch and the output of the second branch are the inputs of the fusion layer; the inputting of the user sample data into the time convolution network model based on the attention mechanism for training and the outputting of the predicted conversion results of each user sample data comprise the following steps: for each user sample data, extracting first shallow layer features of each touch point from the touch point related data by using the first time convolution layer; performing second convolution operation on the first shallow layer features of each touch point by using the second convolution layer of the first branch to obtain second basic data; performing attention amplification operation on the second basic data by using the attention mechanism layer of the first branch to obtain the key features; performing convolution operation on the key features in sequence by using the second time convolution layer of the first branch to obtain first deep layer features of each touch point; performing second convolution operation on the first shallow layer features of each touch point by using the second branch to obtain second shallow layer features of each touch point; fusing the first deep layer features of each touch point and the second shallow layer features of each touch point by using the fusion layer to obtain first enhanced features of each touch point; processing the first enhanced features of each touch point by using the prediction layer to obtain the predicted conversion results of each user sample data.

2. The method of claim 1, wherein, the first time convolution layer comprises a first convolution layer and a first causal dilated convolution layer connected in sequence, and the extracting of the first shallow layer features of each touch point from the touch point related data by using the time convolution layer for each user sample data comprises the following steps: for each user sample data, performing first convolution operation on the touch point related data by using the first convolution layer to obtain first basic data; performing first causal dilated convolution operation on the first basic data by using the first causal dilated convolution layer to obtain the first shallow layer features of each touch point.

3. The method of claim 1, wherein, The attention mechanism layer comprises a global average pooling layer, a first full connection layer, a second full connection layer and a classification layer; the attention amplification operation of the second basic data through the attention mechanism layer comprises: The global average pooling layer is used to perform global average pooling processing on the second basic data to obtain global features of each contact point; The first full connection layer is used to reduce the dimension of the global features; The second full connection layer is used to restore the original dimension of the global features after dimension reduction; The classification layer is used to screen the key features from the global features with the restored original dimension.

4. The method of claim 1, wherein, The prediction layer is used to process the first enhanced features of each contact point to obtain a predicted conversion result of each user sample data, comprising: The fourth convolution operation and the down-sampling operation are sequentially performed on the first enhanced features of each contact point to obtain the predicted conversion result of each user sample data.

5. The method of claim 1, wherein, The contact point related data comprises a channel identifier, whether clicking, a timestamp, a contact duration and a contact mode.

6. The method of claim 1, wherein, The attention mechanism based time convolution network model further comprises another residual layer connected after the first time convolution layer and before the attention mechanism based residual layer.

7. A method of determining a channel attribution value, the method comprising: comprising: obtaining an attribution value of each contact point of each user sample; The user sample comprises contact point related data, the contact point representing the interaction between the user and the advertising channel, and the attribution value is a weight corresponding to the key feature of each contact point output by the attention mechanism layer of the trained attention mechanism based time convolution network model; the attention mechanism based time convolution network model is trained according to any one of claims 1-6; According to the channel identifier in the contact point related data of the user sample, the quotient value of the sum of the attribution values of the contact points corresponding to the same channel identifier of the user sample and the number of successfully converted users is calculated, and the quotient value is determined as the attribution value of the channel.

8. A model training apparatus, comprising: comprising: an obtaining module configured to obtain user sample data, the user sample data comprising a preset number of contact point related data and a user conversion result, the contact point representing the interaction between the user and the advertising channel; a training module configured to input the user sample data into an attention mechanism based time convolution network model for training, and output a predicted conversion result of each user sample data; a determining module configured to determine the accuracy of the model according to the user conversion result and the predicted conversion result of all user sample data; a judging module configured to, when the accuracy is higher than a preset threshold, determine the weight corresponding to the key feature of each contact point output by the attention mechanism layer of the model as the attribution value of each contact point, the key feature being a feature having a key influence on the user conversion result; The attention mechanism based time convolution network model comprises a first time convolution layer, an attention mechanism based residual layer and a prediction layer connected in sequence; the attention mechanism based residual layer comprises the attention mechanism layer. The attention mechanism-based residual layer includes a first branch, a second branch, and a fusion layer; the first branch includes a second convolutional layer, the attention mechanism layer, and a second time convolutional layer connected in sequence, and the second branch includes another second convolutional layer; the output of the first branch and the output of the second branch are inputs of the fusion layer; The training module is specifically configured to extract, for each user sample data, first shallow layer features of each contact point from the contact point related data by using the first time convolutional layer; obtain second basic data by performing second convolutional operation on the first shallow layer features of each contact point by using the second convolutional layer of the first branch; obtain the key features by performing attention amplification operation on the second basic data by using the attention mechanism layer of the first branch; obtain first deep layer features of each contact point by sequentially performing convolutional operation on the key features by using the second time convolutional layer of the first branch; obtain second shallow layer features of each contact point by performing second convolutional operation on the first shallow layer features of each contact point by using the second branch; obtain the first enhanced features of each contact point by fusing the first deep layer features of each contact point and the second shallow layer features of each contact point by using the fusion layer; and obtain the predicted conversion result of each user sample data by processing the first enhanced features of each contact point by using the prediction layer.

9. A device for determining channel attribution values, characterized in that, Comprise: The second acquisition module is configured to acquire an attribution value of each contact point of each user sample; The user sample includes contact point related data, the contact point represents interaction between a user and an advertising channel, and the attribution value is a weight corresponding to key features of each contact point output by an attention mechanism layer of the trained attention mechanism-based time convolutional network model; the attention mechanism-based time convolutional network model is trained according to the method in any one of claims 1-6; The second determination module is configured to calculate a quotient value of a sum of attribution values of contact points corresponding to a same channel identifier of the user sample and a number of successfully converted users according to the channel identifier in the contact point related data of the user sample, and determine the quotient value as the attribution value of the channel.

10. An electronic device, comprising: Comprise: A processor and a memory, the processor is used to execute one or more programs stored in the memory to implement the model training method in any one of claims 1-6 or the method for determining the attribution value of the channel in claim 7.

11. A computer readable storage medium characterized by The computer readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method in any one of claims 1 to 6 or claim 7.

Citation Information

Patent Citations

  • Advertisement click-through rate prediction model construction method and advertisement click-through rate prediction method

    CN114445121A

  • System and method for identifying creativity of high-value users in online product community

    CN114547296A