A deep learning-based business user behavior pattern analysis method
By generating counterfactual behavior sequences through a dual-branch decoupling architecture and a deep diffusion model, the problem of decoupling causal intent from environmental confounding factors in existing technologies is solved, enabling precise marketing resource allocation on the e-commerce platform and reducing marketing cost waste.
Patent Information
- Application Number
- CN202611304443.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-11-20
AI Technical Summary
In the absence of counterfactual labeling data, existing technologies struggle to decouple the true causal purchase intention from external environmental confounding factors in user behavior sequences. This results in models being unable to distinguish between users who would normally make a purchase and those who would only make a purchase under subsidies, and also makes it impossible to accurately quantify the net incremental effect of commercial intervention.
A dual-branch decoupled architecture is adopted, consisting of a shared feature extraction network, a causal intent branch network, and an environment hybrid branch network. Combined with a joint training mechanism of independence constraint loss, reconstruction loss, and prediction loss, a deep diffusion model is used to generate counterfactual behavior sequences and calculate net incremental scores to identify user groups.
It enables precise quantification of the net incremental effect of commercial intervention in the absence of counterfactual data, eliminates the interference of external marketing intervention on the prediction results, and provides support for the precise allocation of marketing resources to commercial platforms.
Smart Images

Figure CN123141015A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and big data analysis in commerce, specifically a method for analyzing the behavior patterns of commerce users based on deep learning. Background Technology
[0002] In e-commerce, live-streaming sales, and other business scenarios, platforms typically use deep neural networks to predict user click-through rates or conversion rates based on historical user behavior data such as browsing, clicking, adding to cart, coupon usage, and order placement. This data guides product ranking and marketing resource allocation. The closest existing technology to this invention is a Transformer-based user behavior sequence prediction method. This method embeds features into each behavioral event in the user's historical behavior sequence, calculates the correlation weights between different moments within the sequence using a multi-layer self-attention network, obtains a user interest representation vector that incorporates contextual information, and then performs interactive operations with candidate product features to obtain a prediction score. Finally, it uses historical real labels to calculate cross-entropy loss for end-to-end training of network parameters. This type of method has achieved good results on offline evaluation metrics and has been applied in the ranking systems of multiple business platforms.
[0003] However, the aforementioned existing technologies essentially fit the statistical correlation between user historical behavior sequences and conversion results. In the training data, there is a natural strong correlation between whether users are subject to marketing interventions such as coupons or major promotions and whether users convert. This makes it easy for the model to establish a strong correlation between the superficial feature of coupons and the purchase result, and it cannot identify whether users originally had the intention to buy. As a result, it is difficult to distinguish between users who would buy in the first place and users who would only buy under subsidies. At the same time, since real commercial systems can only record the behavior of users under one type of intervention at a time, they cannot simultaneously obtain the behavior of the same user under another type of intervention. Existing methods lack counterfactual labels during the training phase and can only output conversion probabilities. Summary of the Invention
[0004] To address the shortcomings of the existing technologies, the technical problem this invention aims to solve is: how to decouple the true causal purchase intention from the confounding factors of the external environment from the user behavior sequence in the absence of counterfactual label data, and thereby accurately quantify the net incremental effect of commercial intervention on user conversion, thus avoiding the allocation of marketing resources to user groups that would convert regardless of whether intervention is applied.
[0005] To address the aforementioned technical problems, this invention provides a method for analyzing business user behavior patterns based on deep learning, comprising: acquiring the user's original behavior sequence data and the intervention condition label data corresponding to the user;
[0006] The original behavioral sequence data is input into a shared feature extraction network to obtain a unified representation vector;
[0007] The unified representation vector is input into the causal intention branch network and the environmental confounding branch network respectively to obtain the causal intention latent variable representing the user's intrinsic purchasing tendency and the environmental confounding latent variable representing the external intervention factor.
[0008] The shared feature extraction network, the causal intent branch network, and the environmental confounding branch network are jointly trained based on the independence constraint loss, reconstruction loss, and prediction loss. The independence constraint loss is used to constrain the statistical independence between the causal intent latent variable and the environmental confounding latent variable. The reconstruction loss is used to constrain the consistency between the behavior sequence reconstructed from the causal intent latent variable and the environmental confounding latent variable and the original behavior sequence data. The prediction loss is used to constrain the consistency between the conversion label predicted by the causal intent latent variable and the real conversion label.
[0009] Using the causal intent latent variables obtained through the joint training as initial latent variables, multi-step forward noise addition is performed on the initial latent variables according to a preset noise scheduling sequence to obtain noise latent variables;
[0010] The noise latent variable and the target intervention condition are input into the conditional noise prediction network. Multi-step reverse denoising is performed on the noise latent variable to generate the user's counterfactual causal intention latent variable under the target intervention condition. The target intervention condition is an intervention setting that the user has not actually experienced.
[0011] The latent variable of counterfactual causal intent is concatenated with the latent variable of environmental confounding corresponding to the target intervention condition, and then input into the reconstruction decoding network to obtain the counterfactual behavior sequence.
[0012] The actual behavioral sequence under the intervention conditions experienced by the user is input into the prediction head network to obtain the actual conversion probability, and the counterfactual behavioral sequence is input into the prediction head network to obtain the counterfactual conversion probability.
[0013] The difference between the actual conversion probability and the counterfactual conversion probability is calculated to obtain a net incremental score, and the users are grouped according to the net incremental score.
[0014] Compared with the prior art, the beneficial effects of the present invention by adopting the above technical solution are as follows:
[0015] 1. This invention employs a dual-branch decoupled architecture consisting of a shared feature extraction network, a causal intent branch network, and an environmental confounding branch network. Combined with a joint training mechanism of independence constraint loss, reconstruction loss, and prediction loss, this invention can forcibly decouple latent variables of user behavior into two statistically independent dimensions: causal intent latent variables and environmental confounding latent variables. This avoids the model establishing a false correlation between the superficial feature of external marketing intervention and the conversion result, thereby eliminating the interference of confounding factors on the prediction result.
[0016] 2. This invention uses a counterfactual behavior generation method based on a conditional deep diffusion model. It starts with latent variables of real causal intent and performs forward noise addition. In the reverse noise reduction process, it introduces target intervention conditions. This method can generate virtual counterfactual behavior trajectories of users under intervention settings that they have not experienced, even when counterfactual data cannot be directly observed. This makes up for the technical deficiency that counterfactual data cannot be directly observed in real business scenarios.
[0017] 3. By comparing the output probability difference between the actual observed behavior sequence and the generated counterfactual behavior sequence under the same prediction head network, this invention can accurately calculate the net causal increment score brought about by commercial intervention behavior, and identify user groups that will only produce purchasing behavior under intervention stimuli. This provides technical support for commercial platforms to achieve precise subsidy distribution and reduce marketing cost waste. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the overall system in an embodiment of the present invention;
[0019] Figure 2 This is a flowchart of the counterfactual behavior generation module in an embodiment of the present invention;
[0020] Figure 3 This is a flowchart illustrating the end-to-end training and online deployment process in an embodiment of the present invention. Detailed Implementation
[0021] The following is in conjunction with the appendix Figure 1-3 The specific embodiments of the present invention will be further described below. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.
[0022] The technical solution of the present invention will be further described in detail below with reference to specific embodiments. It should be noted that the embodiments provided by the present invention are only used to explain the present invention and are not intended to limit the scope of protection of the present invention. Other embodiments that can be conceived by those skilled in the art based on the content disclosed in the present invention should all fall within the scope of protection of the present invention.
[0023] (I) Overall System Architecture
[0024] The deep learning-based business user behavior pattern analysis method provided in this embodiment consists of three core modules connected in a pipeline manner: a causal structure graph encoder module, a counterfactual behavior generation module based on a deep diffusion model, and a net incremental intent dynamic quantification module. Together, they realize end-to-end causal decoupled user behavior analysis. The data source of this method is the original time-series user behavior data collected by the business platform's data tracking system, including browsing time, click sequence, add-to-cart actions, etc., as well as corresponding intervention tag data, including whether coupons are issued, discount level, whether it is in a major promotion period, etc. The causal structure graph encoder module receives the original behavior sequence and outputs the decoupled causal intent latent variables and environmental confounding latent variables.
[0025] The counterfactual behavior generation module receives latent variables of causal intent and combines them with specified target intervention conditions to generate virtual counterfactual behavior trajectories of the user under different intervention settings.
[0026] The net increment intention dynamic quantification module compares the predicted results of the actual observed behavioral trajectory with the predicted results of the generated counterfactual behavioral trajectory, outputs the net increment score, and provides this score to the re-ranking or subsidy decision system of the business platform.
[0027] (ii) Causal Structure Graph Encoder Module
[0028] The original user behavior sequence is preprocessed by mapping the discrete features of each behavior event in the sequence, such as product category, behavior type, and occurrence time interval, into a dense vector through an embedding layer. These vectors are then concatenated in chronological order to obtain a temporal feature matrix, denoted as:
[0029] ;
[0030] in Indicates the first The behavioral feature vector at each time point Indicates the total length of the action sequence.
[0031] Time series feature matrix The input is a shared feature extraction network consisting of stacked multi-head self-attention sublayers and feedforward sublayers. The correlation weights between time steps within the sequence are calculated. After nonlinear transformation by the feedforward sublayer, a unified representation vector incorporating contextual information is obtained. , represented as:
[0032] ;
[0033] in This represents the mapping function corresponding to the shared feature extraction network.
[0034] Unified representation vector By inputting a symmetric but parameter-independent causal intention branch network and an environment-mixed branch network respectively, two sets of decoupled latent variables are obtained:
[0035] ;
[0036] in These represent latent variables indicating causal intent, used to characterize users' intrinsic purchasing tendencies towards the product itself, unaffected by external marketing interventions.
[0037] This represents the mapping function corresponding to the causal intention branch network;
[0038] This represents a confounding latent variable in the environment, used to characterize external factors such as platform promotions, coupon interventions, and limited-time discounts.
[0039] This represents the mapping function corresponding to the mixed-environment branch network.
[0040] To force and To maintain statistical independence, this embodiment uses the Hilbert-Schmidt independence criterion to measure the degree of dependence between the two, and obtains the independence constraint loss:
[0041] ;
[0042] in The function representing the Hilbert-Schmidt independence criterion is: the smaller the value, the higher the degree of statistical independence between the latent variable of causal intent and the latent variable of environmental confounding.
[0043] Will and The concatenated sequence is input into the reconstruction decoding network to reconstruct the original behavior sequence, ensuring that the two sets of latent variables after decoupling do not lose their original information. The reconstruction loss is then obtained.
[0044] ;
[0045] in This represents the mapping function corresponding to the reconstruction decoding network. This represents the L2 norm operation.
[0046] Using causal intentions and latent variables By separately connecting to the prediction head network, the system predicts whether a user will ultimately convert, ensuring that the latent variable truly carries discriminative information related to purchase intent. This yields the supervised loss for the prediction label.
[0047] ;
[0048] in This indicates the actual conversion tag corresponding to the user. This represents the mapping function corresponding to the prediction head network. This represents the cross-entropy loss function.
[0049] The total training loss of the causal structure graph encoder module is obtained by weighted summing of the above three losses:
[0050] ;
[0051] in , The pre-defined weights are used to balance the contribution of each loss term to the total loss. By backpropagating this total training loss, the parameters of the shared feature extraction network, the causal intent branch network, the environmental clutter branch network, the reconstruction decoding network, and the prediction head network are gradually updated, ultimately making the causal intent latent variable... Convergence represents a true reflection of the user's intrinsic purchase intention, with environmental confounding latent variables. Convergence is a representation that reflects external marketing interventions and environmental factors, and that the two remain statistically independent.
[0052] (III) Counterfactual Behavior Generation Module Based on Deep Diffusion Model
[0053] This module is used to generate virtual counterfactual behavior trajectories of users under target intervention conditions that they have not actually experienced, when counterfactual data cannot be directly observed. It consists of two processes: forward noise addition and reverse conditional denoising.
[0054] During the forward noise addition process, the true causal intent latent variables obtained by training the causal structure graph encoder module are used. As the initial state, according to the preset noise scheduling sequence Perform multi-step noise addition, for the first The step, the noise-adding process, is defined as follows:
[0055] ;
[0056] in Indicates the first The latent variable state after adding noise. Indicates the first The noise intensity coefficient of the step, This indicates the preset total number of diffusion steps. Represents the unit covariance matrix. The mean is Covariance is Gaussian distribution, after After step-by-step iteration with added noise, the latent variable state approximately approaches a standard Gaussian distribution.
[0057] Constructing a conditional noise prediction network Its training objective is set to achieve the following given current diffusion steps: and the intervention condition labels that the user actually experienced in the training samples. In the case of accurately predicting the first The noise added in each step, the training loss is defined as:
[0058] ;
[0059] in This represents the actual standard Gaussian noise added during the forward noise addition process. Indicates For a conditional noise prediction network with learnable parameters, This indicates taking the expectation of the expression within the parentheses.
[0060] During the inference phase after model training, a reverse conditional denoising process is performed to generate counterfactual latent variables, given the target counterfactual intervention conditions. This refers to intervention settings that the user has not actually experienced and whose effectiveness needs to be evaluated, such as the setting of not issuing coupons for users who have actually received coupons, starting from a noise state that follows a standard Gaussian distribution. Depart, proceed in sequence to the next step. Denoising sampling step:
[0061]
[0062] in Represents the conditional noise prediction network The mean function is obtained by back-calculating the output. This represents the covariance function at the corresponding diffusion step number. Together, they constitute the sampling distribution in the inverse denoising process. After iterative denoising, the user's condition under the target intervention is obtained. The counterfactual causal intention of the hidden variable .
[0063] Will With target intervention conditions Corresponding environmental confounding latent variable representation The data is then concatenated and input into the reconstruction decoding network trained by the aforementioned causal structure graph encoder module. Restored to a counterfactual sequence of actions:
[0064] ;
[0065] in The generated counterfactual behavior sequence, in its specific implementation, is characterized by environmental confounding latent variables. It can be determined by sampling based on the historical statistical characteristics corresponding to the target intervention conditions or the distribution of environmental confounding latent variables of other users in the same batch under the same intervention conditions.
[0066] (iv) Dynamic Quantification Module for Net Increment Intent
[0067] Latent variables of causal intent corresponding to the user's actual sequence of behaviors Input prediction head network , thus obtaining the actual conversion probability;
[0068] The latent variable of counterfactual causal intent obtained by the counterfactual behavior generation module Inputting the same predictor head network yields the counterfactual transformation probabilities, which are expressed as follows:
[0069] ;
[0070] in This represents the conversion probability predicted based on the actual observed behavior sequence. This represents the conversion probability predicted based on the generated behavioral sequence from counterfactual data.
[0071] Calculate the user's net incremental score under the conditions of this intervention:
[0072] ;
[0073] in Indicates user The net incremental score, This indicates the intervention conditions that the user actually experienced. This indicates the corresponding counterfactual intervention condition.
[0074] According to the preset first threshold With the second threshold ( Less than The net increment score is used to determine the grouping:
[0075] when Not less than At that time, the user was determined to be a high-net-net-growth sensitive user, that is, the target subsidy group that will only make purchases under intervention and stimulation.
[0076] when Not greater than If the user is determined to be a low-net-growth, naturally converted user, meaning a group that would buy regardless of intervention, then subsidies for that user can be reduced or stopped.
[0077] Users whose net incremental score falls between the second and first thresholds are classified as the intermediate transition group and can be treated differently based on business rules.
[0078] The net incremental score and grouping results of each user are output to the marketing decision-making system of the e-commerce platform, which serves as the basis for issuing coupons and setting discount levels, so as to allocate the marketing budget towards users with high net incremental sensitivity.
[0079] (v) End-to-end training and online deployment process
[0080] The complete process from offline training to online inference deployment provided in this embodiment is as follows: First, raw behavioral data and intervention label data are collected and preprocessed;
[0081] Subsequently, the causal structure graph encoder modules were jointly trained, and the encoder module parameters were solidified after the training converged.
[0082] Next, the solidified causal intention latent variables are used as training material to train the conditional noise prediction network;
[0083] After the two-stage training is completed, the offline batch inference stage is entered, where the net incremental score is calculated for all users and stored in the feature storage system.
[0084] During the online service phase, after the existing ranking system completes the initial ranking of candidate products, the method provided by this invention is accessed in the form of a re-ranking plugin. It reads the net incremental score obtained from offline calculation to calibrate and adjust the candidate results, and finally outputs the calibrated ranking results and subsidy decision suggestions. The above deployment method achieves the support capability for accurate subsidy decision-making without changing the low-latency architecture of the existing ranking system.
[0085] (vi) Application Examples
[0086] Taking the coupon distribution scenario of a certain e-commerce platform as an example, the implementation process of this invention is explained. The platform has implemented coupon distribution intervention for a certain batch of users. It collects the behavioral sequences of this batch of users before and after the coupon distribution, such as browsing, clicking, adding to cart, and placing orders, as well as the corresponding intervention tags. The behavioral sequences of this batch of users are input into the trained causal structure graph encoder module to obtain the causal intention latent variables and environmental confounding latent variables of each user. For each user, with their causal intention latent variables as the initial state, the target intervention condition is set as no coupon distribution. After forward noise addition and reverse conditional noise reduction by the counterfactual behavior generation module, the counterfactual causal intention latent variables and counterfactual behavior sequences of the user under the condition of no coupon distribution are generated. The actual behavior sequence of the user under the actual coupon distribution condition and the generated counterfactual behavior sequence under the condition of no coupon distribution are respectively input into the same prediction head network to obtain the actual conversion probability and the counterfactual conversion probability. The net incremental score of the user is obtained by subtracting the two. For users whose net incremental score is not less than the first threshold, they are judged as high net incremental sensitive users, and the platform can continue to distribute coupons to them in the subsequent marketing cycle.
[0087] For users whose net incremental score is no greater than the second threshold, they are judged as low net incremental natural conversion users. The platform can reduce subsidies for them and concentrate the marketing budget on the user group that has generated incremental conversion due to intervention.
[0088] (vii) Other implementation methods
[0089] In another embodiment of the present invention, the deep diffusion model in the counterfactual behavior generation module can be replaced by a conditional variational autoencoder. The distribution of the latent variable of causal intent is assumed to be a conditional Gaussian distribution. The mean and variance parameters of this distribution are output by the encoder network. The latent variable is resampled in combination with the target intervention conditions and restored to the counterfactual behavior sequence by the decoder. This embodiment has lower inference computation overhead and is suitable for online scenarios with high real-time requirements.
[0090] In another embodiment of the present invention, a dual machine learning method or a propensity score matching method based on observable covariates can be introduced in the causal decoupling and counterfactual generation stage. By estimating the propensity score of user features and matching or weighting the adjustment, the individual causal effect can be directly estimated from the observable data as an approximate calculation method for the net incremental score. This embodiment has a low dependence on deep neural networks and is suitable for business platform scenarios with a small amount of user behavior data.
[0091] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, any modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the protection scope defined by the claims of the present invention.
Claims
1. A method for analyzing business user behavior patterns based on deep learning, comprising acquiring raw behavioral sequence data of users and intervention condition label data corresponding to the users; Its features are, Also includes: The original behavioral sequence data is input into a shared feature extraction network to obtain a unified representation vector; The unified representation vector is input into the causal intention branch network and the environmental confounding branch network respectively to obtain the causal intention latent variable representing the user's intrinsic purchasing tendency and the environmental confounding latent variable representing the external intervention factor. The shared feature extraction network, the causal intent branch network, and the environmental confounding branch network are jointly trained based on the independence constraint loss, reconstruction loss, and prediction loss. The independence constraint loss is used to constrain the statistical independence between the causal intent latent variable and the environmental confounding latent variable. The reconstruction loss is used to constrain the consistency between the behavior sequence reconstructed from the causal intent latent variable and the environmental confounding latent variable and the original behavior sequence data. The prediction loss is used to constrain the consistency between the conversion label predicted by the causal intent latent variable and the real conversion label. Using the causal intent latent variables obtained through the joint training as initial latent variables, multi-step forward noise addition is performed on the initial latent variables according to a preset noise scheduling sequence to obtain noise latent variables; The noise latent variable and the target intervention condition are input into the conditional noise prediction network. Multi-step reverse denoising is performed on the noise latent variable to generate the user's counterfactual causal intention latent variable under the target intervention condition. The target intervention condition is an intervention setting that the user has not actually experienced. The latent variable of counterfactual causal intent is concatenated with the latent variable of environmental confounding corresponding to the target intervention condition, and then input into the reconstruction decoding network to obtain the counterfactual behavior sequence. The actual behavioral sequence under the intervention conditions experienced by the user is input into the prediction head network to obtain the actual conversion probability, and the counterfactual behavioral sequence is input into the prediction head network to obtain the counterfactual conversion probability. The difference between the actual conversion probability and the counterfactual conversion probability is calculated to obtain a net incremental score, and the users are grouped according to the net incremental score.
2. The method according to claim 1, characterized in that, The shared feature extraction network includes a multi-head self-attention sublayer and a feedforward sublayer. The step of inputting the original behavior sequence data into the shared feature extraction network to obtain a unified representation vector includes: calculating the correlation weights between the behavior feature vectors at each time step in the original behavior sequence data through the multi-head self-attention sublayer, and performing a nonlinear transformation on the weighted feature vectors through the feedforward sublayer to obtain the unified representation vector.
3. The method according to claim 1, characterized in that, The independence constraint loss is calculated using the Hilbert-Schmidt independence criterion and is used to measure the degree of statistical dependence between the causal intention latent variable and the environmental confounding latent variable. The lower the degree of statistical dependence, the smaller the value of the independence constraint loss.
4. The method according to claim 1, characterized in that, The total training loss used when jointly training the shared feature extraction network, the causal intent branch network, and the environment hybrid branch network is the sum of the reconstruction loss, the independence constraint loss after being weighted by the first weight coefficient, and the prediction loss after being weighted by the second weight coefficient.
5. The method according to claim 1, characterized in that, The step of performing multi-step forward noise addition on the initial latent variable according to the preset noise scheduling sequence includes: during the noise addition process in the k-th step, obtaining the mean of the Gaussian distribution based on the latent variable state after noise addition in the (k-1)-th step and the scaling factor determined by the noise intensity coefficient corresponding to the k-th step, determining the variance of the Gaussian distribution based on the noise intensity coefficient, and sampling the latent variable state after noise addition in the k-th step.
6. The method according to claim 1, characterized in that, The conditional noise prediction network is trained in the following way: given the current diffusion step number and the intervention condition labels corresponding to the training samples, the parameters of the conditional noise prediction network are optimized with the training objective of accurately predicting the noise added during the forward noise addition process at the corresponding diffusion step number.
7. The method according to claim 1, characterized in that, The multi-step reverse denoising of the noise latent variable includes: taking the latent variable that follows a standard Gaussian distribution as the initial state for denoising; in each denoising step, determining the mean and variance of the distribution that the latent variable state follows after denoising based on the output of the conditional noise prediction network at the current diffusion step and the target intervention condition; and sampling based on the mean and variance until the counterfactual causal intention latent variable is obtained.
8. The method according to claim 1, characterized in that, The step of grouping users according to the net incremental score includes: when the net incremental score is not less than a preset first threshold, determining that the user is a high net incremental sensitivity user. When the net incremental score is not greater than a preset second threshold, the user is determined to be a low net incremental natural conversion user, where the second threshold is less than the first threshold.
9. The method according to claim 1, characterized in that, Also includes: The net incremental score and clustering results are output to the marketing decision-making system of the e-commerce platform for calibration and adjustment of the ranking results of candidate products and for determining coupon distribution decisions.
10. An electronic device comprising a memory and a processor, the memory storing a computer program capable of running on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 9.
