A method for analyzing points marketing data based on machine learning
Patent Information
- Application Number
- CN202611199161.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-09
- Publication Date
- 2026-10-13
AI Technical Summary
[0005]本发明要解决的技术问题是:在积分营销流式分析场景中,由于用户积分兑换、流失等真实标签存在长达数周甚至数月的确认延迟,导致现有依赖即时标签反馈的概念漂移检测与在线学习机制失效,使得积分营销分析模型在标签真空期内无法感知用户行为分布的变化并及时修正,进而造成积分资产浪费、营销策略失配及营销投资回报率归因失真等问题,具体而言,需要解决如下两个子问题:其一,如何在缺乏即时真实标签的情况下,实时、无监督地检测用户积分行为分布是否已发生漂移,其二,如何在检测到漂移后,不等待长延迟的最终标签到达,即可低延迟地获取有效监督信号并对模型进行修正;
[0008]1.本发明通过共享参数的变分自编码器将历史长周期行为特征与实时短周期行为特征映射至同一隐空间,并基于隐空间表示之间的最大均值差异统计量判断分布差异,使系统能够在真实标签到达之前,仅依据行为特征分布的变化即完成概念漂移的识别,弥补了现有有监督检测方法在标签长延迟场景下的失效缺陷;
Smart Images

Figure CN122905731A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning and marketing data analysis technology, specifically to a points-based marketing data analysis method based on machine learning. Background Technology
[0002] In the digital membership economy and points operation system, companies typically use machine learning models to predict users' points redemption tendency and churn probability based on users' historical transaction, login, and browsing behavior log data. Based on this, they formulate differentiated points incentive and marketing intervention strategies. After the model goes live, it is usually retrained at fixed intervals to adapt to changes in data distribution. However, because users' points consumption behavior is dynamically affected by factors such as the market environment and competitors' marketing activities, the intrinsic relationship between their behavior patterns and prediction targets will continue to change, which is called concept drift. When drift occurs and the model is not updated in time, the model's prediction accuracy will drop significantly, leading to a misallocation of marketing resources.
[0003] Currently, the industry generally believes that effective detection and model correction of concept drift requires the arrival of real labels as a prerequisite. That is, prediction error can only be calculated and model retraining triggered after obtaining real labels immediately (e.g., DDM algorithm, EDDM algorithm). This application breaks through this technical bias and proposes that before the arrival of real labels, drift identification can be completed solely based on the statistical distance of behavioral features distributed in the latent space. Combined with pseudo-labels as proxy indicators, low-latency local correction of the model is achieved, thus overcoming the industry's long-standing reliance on label feedback. When the prediction error exceeds a preset threshold, concept drift is determined to have occurred and model retraining is triggered. Structurally, this scheme requires real labels that arrive immediately as the input for error calculation. However, in the context of points marketing, there is often a confirmation delay of several weeks to several months for whether users have completed redemption or lost real labels. This causes the drift detection and online correction mechanism to be in a state of failure for a long time during the label vacuum period, resulting in problems such as waste of points assets and mismatch of marketing strategies. To address this, we propose a points marketing data analysis method based on machine learning. Summary of the Invention
[0004] The purpose of this invention is to provide a data analysis method for points-based marketing based on machine learning.
[0005] The technical problem this invention aims to solve is that in the context of points-based marketing streaming analytics, the confirmation delay of real tags such as user points redemption and churn can last for weeks or even months. This causes existing concept drift detection and online learning mechanisms that rely on real-time tag feedback to fail, making it impossible for points-based marketing analytics models to perceive changes in user behavior distribution and correct them in a timely manner during the tag vacuum period. This results in problems such as wasted points assets, mismatched marketing strategies, and distorted attribution of marketing return on investment. Specifically, the invention needs to solve the following two sub-problems: First, how to detect whether user points behavior distribution has drifted in real time and without supervision when real-time tags are lacking; second, how to obtain effective supervision signals with low latency and correct the model after drift is detected without waiting for the long-delayed final tags to arrive.
[0006] To address the aforementioned technical problems, this invention provides a machine learning-based points-based marketing data analysis method, comprising: acquiring a set of historical long-term behavioral features of users and a set of real-time short-term behavioral features acquired based on a sliding time window; inputting the historical long-term behavioral feature set and the real-time short-term behavioral feature set into an encoder of a pre-trained shared-parameter variational autoencoder to obtain corresponding historical latent space representation sets and real-time latent space representation sets; calculating the maximum mean difference statistic between the historical latent space representation set and the real-time latent space representation set based on a kernel function; comparing the maximum mean difference statistic with a preset threshold; and determining whether the maximum mean difference statistic is greater than the preset threshold. When user behavior distribution experiences conceptual drift, a drift alarm signal is output. In response to the drift alarm signal, a proxy indicator feature sequence within a preset observation window is acquired from the time the drift alarm signal is output. The proxy indicator feature sequence is weighted and aggregated based on an attention mechanism to obtain a confidence pseudo-label. Based on the difference statistic between the confidence pseudo-label and the maximum mean, a dynamic loss weight coefficient is calculated. Based on the dynamic loss weight coefficient, a total loss function that fuses pseudo-label loss and base loss is constructed. The parameters of the fully connected output layer in the integral behavior prediction model are updated according to the total loss function to obtain a corrected integral behavior prediction model. Based on the prediction results output by the corrected integral behavior prediction model, an integral marketing strategy is generated.
[0007] Compared with the prior art, the beneficial effects of the present invention by adopting the above technical solution are as follows:
[0008] 1. This invention maps historical long-cycle behavioral features and real-time short-cycle behavioral features to the same latent space through a variational autoencoder with shared parameters, and judges the distribution difference based on the maximum mean difference statistic between the latent space representations. This enables the system to complete the identification of concept drift based solely on the change in the distribution of behavioral features before the real label arrives, thus making up for the failure of existing supervised detection methods in scenarios with long label delays.
[0009] 2. This invention introduces a confidence pseudo-label generation based on proxy indicators and a dynamic loss weighted online incremental learning mechanism, enabling the system to complete local model correction within a short time window after drift occurs, without waiting for the final label confirmation period of several weeks to several months. This shortens the model failure window and reduces the risk of wasting integral assets and attribution distortion of marketing investment return rate.
[0010] 3. This invention updates the gradients of only some network layer parameters in the basic prediction model and retains the basic loss term calculated based on historically confirmed labels in the loss function. This balances the model's rapid response to new pseudo-label signals with the preservation of historical distribution information, reducing the risk of catastrophic forgetting during incremental updates. Attached Figure Description
[0011] Figure 1 This is a schematic diagram of the overall complete business process in an embodiment of the present invention;
[0012] Figure 2 This is a schematic diagram of the unsupervised concept drift detection sub-process in an embodiment of the present invention;
[0013] Figure 3 This is a schematic diagram of the sub-process of pseudo-label generation and model incremental correction after drift in an embodiment of the present invention. Detailed Implementation
[0014] 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.
[0015] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0016] The method described in this invention is based on a streaming computing architecture. The overall system consists of a data access layer, an offline pre-training layer, an online drift detection layer, a weakly supervised pseudo-label generation layer, and an online incremental learning correction layer. The data access module is used to collect real-time user behavior log streams on the points platform, including login frequency, number of times the points mall is viewed, product add-to-cart behavior, coupon click behavior, and historical redemption and churn tags. The data access module is connected to both a historical feature cache module and a real-time feature window module. The historical feature cache module is used to store long-term user profile features, and the real-time feature window module is used to maintain short-term data within a sliding time window. As a feature, the outputs of the historical feature caching module and the real-time feature window module are jointly fed into the unsupervised drift detection module based on variational autoencoder and maximum mean difference statistic. The output of the drift detection module is fed into the judgment unit. When a drift is determined to have occurred, the weakly supervised pseudo-label generation module is activated. The pseudo-label generation module takes the surrogate indicator feature stream as input, and its output confidence pseudo-label is fed into the dynamic loss weighted online incremental learning module. The incremental learning module locally updates the parameters of the basic points behavior prediction model. The updated model is then re-output to the points marketing strategy decision module to generate intervention strategies such as points distribution and coupon recommendation.
[0017] I. Unsupervised concept drift detection based on latent space alignment:
[0018] The core idea of this part is: without real labels, we can achieve early detection of drift by simply comparing the statistical distance between the distribution of a user's recent short-term behavioral features and the distribution of historical long-term profile features in the latent space.
[0019] The system continuously collects raw logs of user points behavior from the data access module, extracts multi-dimensional features including login frequency, number of visits to the points mall, page dwell time, and historical spending amount, and constructs a long-term historical feature set. and real-time short-period feature sets based on sliding time windows. ,in For the number of historical samples, This represents the number of real-time samples within the current window.
[0020] The variational autoencoder network is pre-trained offline using historical full-scale feature data, enabling the encoder to learn a latent space mapping function that can represent the distribution of normal user behavior. With decoder reconstruction function The training objective is to improve the following variational lower bound:
[0021] ;
[0022] in, This represents the approximate posterior distribution of the latent variables in the encoder output. This represents the reconstruction distribution of the decoder. This represents the presupposed prior distribution of the latent variables, typically taken as the standard normal distribution. The KL divergence represents the distance between two distributions. This indicates the expectation under an approximate posterior distribution;
[0023] Set of characteristics of long historical cycles With real-time short-period feature set By inputting each of the trained variational autoencoders, we obtain the corresponding latent space representation sets. and The two latent spaces represent the calculation units for the maximum mean difference of the inputs, and the calculation formulas are as follows:
[0024] ;
[0025] in, This represents the kernel function; in this embodiment, a Gaussian kernel function is used. Represents the first in the set of historical features The latent space representation of each sample, Represents the first element in the real-time feature set. The latent space representation of each sample, and These represent the number of samples in the two sets, respectively.
[0026] This statistic is input into the threshold judgment unit, and Value and preset threshold Comparison: In Greater than In the case of a significant shift in the distribution of user group behavior, a drift alarm signal is output and the weak supervision pseudo-label generation process is activated. If the threshold is not exceeded, the current model is maintained and the real-time window is slid forward by a preset step size. The above latent space mapping and distance calculation process is repeated to continuously monitor the drift.
[0027] II. Weakly Supervised Pseudo-Label Generation and Online Incremental Learning Based on Proxy Indicators:
[0028] After the drift alarm signal is activated, the system does not wait for long-delay real redemption or lost tags, but instead uses short-term high-frequency agent interaction behavior to generate weakly supervised pseudo-tags, and drives the online incremental correction of the model accordingly.
[0029] The proxy indicator feature sequence input unit extracts the proxy interaction behavior sequence of the user group within a preset short observation window starting from the drift alarm time. ,in Indicates the first The agent behavior feature vector at each time step covers signals such as adding to cart, clicking on coupons, and page view depth. This indicates the total number of time steps within the observation window;
[0030] The attention weight calculation unit calculates the feature vector of each time step in the agent behavior sequence. Calculate its corresponding attention score:
[0031] ;
[0032] in, This represents the learnable weight matrix. This represents a learnable weight vector. Indicates the bias term. The hyperbolic tangent activation function is then used, followed by normalization of the attention score:
[0033] ;
[0034] in, Indicates the first Normalized attention weights for each time step. Represents an exponential function;
[0035] The confidence pseudo-label output unit performs weighted aggregation of the behavior sequence based on normalized attention weights to obtain the confidence pseudo-label of the user's scoring intent:
[0036] ;
[0037] in, This represents the Sigmoid activation function. This represents the pseudo-label confidence score, which ranges from 0 to 1. Its value indicates the degree of confidence that the user currently intends to redeem points.
[0038] Dynamic loss weighted calculation unit comprehensive pseudo-label confidence With drift distance statistics Calculate the dynamic weight coefficients of the current pseudo-labeled sample in the incremental training loss function:
[0039] ;
[0040] in, and These are preset, adjustable hyperparameters used to balance the impact of pseudo-label confidence and drift severity on the weights. A positive constant set to prevent the denominator from being zero. This represents the final dynamic loss weight coefficient, which ranges from 0 to 1.
[0041] The model parameter incremental update unit is based on dynamic weight coefficients. Construct a total loss function that combines the pseudo-label loss and the base model loss:
[0042] ;
[0043] in, This represents the pseudo-label and the model's current prediction. Cross-entropy loss between This indicates that the model is based on historically confirmed labels before drift. The calculated base loss is used to prevent catastrophic forgetting during incremental updates. The system is based on the total loss function. Calculate the gradient and update the parameters of only some network layers (e.g., fully connected output layers) in the base prediction model using gradient descent to obtain the corrected model parameters, which are then used for real-time decision output of the points marketing strategy.
[0044] After the model parameters are updated, the system continuously monitors the distribution of user behavior through a sliding window: if the maximum mean difference statistic detected subsequently falls below the threshold, the current corrected model is maintained. When the real long-delay label arrives, the system uses this real label to post-validate the incremental learning effect driven by the pseudo-label, and adjusts the preset threshold accordingly. and hyperparameters , Periodic optimization and adjustments are made to form a closed-loop adaptive system.
[0045] III. Latent Space Feature Alignment Principle:
[0046] The latent space obtained by the variational autoencoder is illustrated by a two-dimensional projection. The set of historical long-period feature points is presented in the first label form and aggregates to form the baseline distribution region. The set of real-time short-period feature points is presented in the second label form. When the aggregation centers and distribution patterns of the two types of feature point sets in the latent space are basically coincident, it indicates that no drift has occurred. When the distribution region of the real-time feature point set is significantly offset from the baseline distribution region, it indicates that conceptual drift has occurred.
[0047] IV. Alternative Implementation Methods:
[0048] In the unsupervised drift detection process, in addition to using a combination of variational autoencoders and maximum mean difference statistics, principal component analysis or isolated forests can be used to reduce the dimensionality or score the anomalies of historical and real-time features. In addition, nonparametric statistical test methods such as the Kolmogorov-Smirnov test can be used to determine whether the distribution differences of the two sets of features in the dimensionality-reduced subspace or key statistics are significant, as alternative or supplementary means.
[0049] In the weakly supervised pseudo-label generation stage, in addition to adopting the weighted aggregation method based on the attention mechanism, a business rule scoring system for proxy indicators can be pre-set. Pre-set scores can be assigned to add-to-cart behavior and coupon click behavior respectively, and the intent score can be obtained by weighted summation. Combined with the label propagation algorithm in semi-supervised learning, the neighboring sample information of the existing labeled samples can be propagated to the unlabeled samples in the current batch to generate approximate pseudo-labels and confidence scores, which can be used as an alternative to the attention mechanism scheme.
[0050] 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 data analysis method for points-based marketing based on machine learning, characterized in that, include: Obtain the user's historical long-term behavioral feature set, as well as the real-time short-term behavioral feature set obtained based on the sliding time window; The historical long-cycle behavior feature set and the real-time short-cycle behavior feature set are respectively input into the encoder of the pre-trained shared parameter variational autoencoder to obtain the corresponding historical latent space representation set and real-time latent space representation set. The maximum mean difference statistic between the historical latent space representation set and the real-time latent space representation set is calculated based on the kernel function. The maximum mean difference statistic is compared with a preset threshold. If the maximum mean difference statistic is greater than the preset threshold, it is determined that the user behavior distribution has undergone conceptual drift, and a drift alarm signal is output. In response to the drift alarm signal, a proxy indicator feature sequence within a preset observation window is obtained from the time the drift alarm signal is output. The proxy indicator feature sequence includes a feature vector characterizing the user's short-term interaction behavior. Based on the attention mechanism, the feature vectors of each time step in the feature sequence of the proxy index are weighted and aggregated to obtain the confidence pseudo-label; Calculate the dynamic loss weight coefficient based on the difference statistic between the confidence pseudo-label and the maximum mean; Based on the dynamic loss weight coefficients, a total loss function is constructed that integrates pseudo-label loss and basic loss, wherein the basic loss is calculated based on historically confirmed labels. The gradient is calculated based on the total loss function, and the parameters of the fully connected output layer in the integral behavior prediction model are updated to obtain the corrected integral behavior prediction model. Based on the prediction results output by the modified points behavior prediction model, a points marketing strategy is generated.
2. The data analysis method for points-based marketing based on machine learning according to claim 1, characterized in that: The feature vectors in the historical long-cycle behavior feature set and the real-time short-cycle behavior feature set include at least one of the following: login frequency feature, points mall visit frequency feature, page dwell time feature, and historical consumption amount feature.
3. The data analysis method for points-based marketing based on machine learning according to claim 1, characterized in that: The shared parameter variational autoencoder is obtained by offline training on historical behavioral feature data. The training process aims to improve the variational lower bound composed of the reconstructed likelihood and the KL divergence of the latent variable approximate posterior distribution relative to the preset prior distribution.
4. The data analysis method for points-based marketing based on machine learning according to claim 1, characterized in that: In the step of calculating the maximum mean difference statistic, a Gaussian kernel function is used to calculate the kernel function value between each latent space representation in the historical latent space representation set and the real-time latent space representation set, and the maximum mean difference statistic is obtained based on the kernel function value.
5. The data analysis method for points-based marketing based on machine learning according to claim 1, characterized in that: The step of weighted aggregation of the proxy indicator feature sequence based on the attention mechanism includes: calculating the corresponding attention score for the feature vector of each time step in the proxy indicator feature sequence through a learnable weight matrix, weight vector and bias term; The attention scores at each time step are normalized to obtain normalized attention weights; The proxy indicator feature sequence is weighted and summed according to the normalized attention weights, and the confidence pseudo-label is obtained by processing it through an activation function.
6. The data analysis method for points-based marketing based on machine learning according to claim 1, characterized in that: The dynamic loss weight coefficient is obtained by weighting the values of the confidence pseudo-labels and the reciprocal of the maximum mean difference statistic, and then mapping it through an activation function. The value range is from 0 to 1.
7. The data analysis method for points-based marketing based on machine learning according to claim 1, characterized in that: After obtaining the revised integral behavior prediction model, it also includes: continuously monitoring the distribution of user behavior through a sliding window; If the real label corresponding to the drift alarm signal is obtained, the effect of the model correction driven by the confidence pseudo-label is verified based on the real label, and the preset threshold and the hyperparameters used to calculate the dynamic loss weight coefficient are adjusted accordingly.
8. A points-based marketing data analysis system based on machine learning, characterized in that, include: The data access module is used to collect user behavior log streams on the points platform; The historical feature cache module and the real-time feature window module are respectively connected to the data access module. The historical feature cache module is used to store historical long-cycle behavioral features, and the real-time feature window module is used to maintain real-time short-cycle behavioral features within the sliding time window. The drift detection module, connected to the historical feature caching module and the real-time feature window module, is used to map the historical long-cycle behavior features and the real-time short-cycle behavior features to the same latent space, and to determine whether the user behavior distribution has undergone concept drift based on the maximum mean difference statistic between the latent space representations. The judgment unit, connected to the drift detection module, is used to output a drift alarm signal when it is determined that concept drift has occurred. A pseudo-label generation module, connected to the judgment unit, is used to generate pseudo-labels with confidence based on the proxy indicator feature stream in response to the drift alarm signal. The incremental learning module, connected to the pseudo-label generation module, is used to calculate the dynamic loss weight coefficient based on the confidence level of the pseudo-label and the maximum mean difference statistic, and to update some network layer parameters of the integral behavior prediction model based on the dynamic loss weight coefficient. The decision module, connected to the incremental learning module, is used to generate points-based marketing strategies based on the prediction results output by the updated points-based behavior prediction model.
9. A points-based marketing data analysis system based on machine learning according to claim 8, characterized in that: The pseudo-label generation module includes a proxy indicator feature sequence input unit, an attention weight calculation unit, and a confidence pseudo-label output unit. The proxy indicator feature sequence input unit is used to receive the proxy interaction behavior sequence of the user within the observation window. The attention weight calculation unit is used to calculate the normalized attention weight of the feature vector at each time step in the proxy interaction behavior sequence. The confidence pseudo-label output unit is used to perform weighted aggregation of the proxy interaction behavior sequence according to the normalized attention weight to obtain the pseudo-label and its confidence score.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the machine learning-based points marketing data analysis method according to any one of claims 1 to 7.