Real-time customer portrait dynamic update prediction method and system for retail scene
By calculating the information gain value and temporal correlation analysis of customer portrait features, a customer behavior fusion feature with temporal dependency is generated, which solves the problem of lack of timeliness and accuracy of customer portraits in existing technologies, realizes accurate prediction of customer behavior and personalized recommendations, and improves the marketing effect and customer satisfaction in retail scenarios.
Patent Information
- Application Number
- CN202510830112.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-06-20
AI Technical Summary
Existing customer profiling technology cannot effectively capture the temporal dependencies of customer behavior, resulting in the constructed customer profiles lacking timeliness and accuracy, unable to accurately reflect the changes in the importance of customer behavior characteristics, and difficult to predict future consumption intentions and behavioral change trends.
By calculating the information gain value of customer portrait features in different time windows, generating weighted feature vectors, using the sliding time window method to perform time series division, conducting time series correlation analysis, calculating the dynamic correlation coefficient between adjacent time windows, generating customer behavior fusion features with time series dependency, and predicting the customer's consumption behavior characteristics in the next time window.
It improves the accuracy and personalization of customer portraits, enables accurate prediction of customer consumption behavior, improves the response speed and accuracy of the recommendation system, meets the needs of retail companies for precision marketing, and enhances customer shopping experience and satisfaction.
Smart Images

Figure CN120707249A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis technology, and in particular to a real-time customer profile dynamic update prediction method and system for retail scenarios. Background Art
[0002] With the digital transformation of the retail industry, customer profiling technology has become a crucial tool for understanding customer needs and optimizing marketing strategies. A customer profile describes various customer characteristics, including demographics, consumer behavior, and preferences. In modern retail scenarios, dynamic updates and predictions of real-time customer profiles are crucial for accurately understanding customer needs and providing personalized services. Traditional customer profiling relies primarily on static data analysis, building relatively stable customer profile models by collecting data such as historical purchase records and browsing behavior.
[0003] With the development of big data technologies and artificial intelligence algorithms, retailers are able to collect and analyze a richer array of customer behavior data, including multi-source, heterogeneous data such as online browsing patterns, search keywords, shopping cart activity, and offline in-store behavior. This data makes it possible to build more comprehensive and accurate customer profiles. However, effectively utilizing this data to achieve real-time dynamic updates of customer profiles and predict consumer behavior still presents numerous technical challenges.
[0004] Existing customer profiling technology has the following main defects and shortcomings:
[0005] Existing customer profiling technologies usually ignore the value differences of customer behavior data in different time windows, and use the same weight to process all features. They cannot accurately reflect the changes in the importance of customer behavior features in different periods, resulting in the constructed customer profiles lacking timeliness and accuracy.
[0006] Traditional customer profile update methods cannot effectively capture the temporal dependencies of customer behavior. They only extract and update features based on independent time points, ignoring the correlation and evolution of customer behavior in the time dimension, making it difficult to predict customers' future consumption intentions and behavioral change trends. Summary of the Invention
[0007] The embodiments of the present invention provide a real-time customer profile dynamic update prediction method and system for retail scenarios, which can solve the problems in the prior art.
[0008] A first aspect of an embodiment of the present invention provides a real-time customer profile dynamic update prediction method for retail scenarios, comprising:
[0009] Determine the customer profile feature set corresponding to customer behavior data in retail scenarios;
[0010] Calculating feature importance scores according to information gain values of different customer profile features in the customer profile feature set in different time windows, and generating a customer profile weighted feature vector based on the feature importance scores;
[0011] Using a sliding time window method to perform time series division on the weighted feature vector of the customer portrait, to obtain customer behavior feature sequences of multiple time windows;
[0012] Performing a time series correlation analysis on the customer behavior feature sequences of the multiple time windows, calculating a dynamic correlation coefficient of the customer behavior feature sequences between adjacent time windows, and generating a customer behavior fusion feature with a time series dependency based on the dynamic correlation coefficient;
[0013] Calculating a feature correlation matrix based on the customer behavior fusion feature and the customer portrait weighted feature vector, and predicting the customer's consumption behavior characteristics in the next time window based on the feature correlation matrix;
[0014] The customer portrait feature set is updated according to the consumption behavior characteristics and the customer behavior fusion characteristics, and personalized product recommendations and marketing strategies are determined for the customer based on the updated customer portrait feature set.
[0015] Calculating feature importance scores according to information gain values of different customer profile features in the customer profile feature set in different time windows, and generating a customer profile weighted feature vector based on the feature importance scores, including:
[0016] Dividing the customer portrait feature set into time windows according to preset time intervals to obtain customer portrait feature sequences for multiple time windows;
[0017] Constructing an information entropy matrix for each customer portrait feature in the customer portrait feature sequence, wherein the information entropy matrix includes information entropy values of each customer portrait feature in different time windows;
[0018] Based on the information entropy matrix, a multidimensional feature importance evaluation index is determined by calculating the rate of change of information entropy between adjacent time windows, wherein the multidimensional feature importance evaluation index reflects the sensitivity of customer profile features to changes in customer behavior;
[0019] Performing hierarchical clustering on the customer profile features according to the multidimensional feature importance evaluation index to obtain a feature hierarchical clustering result;
[0020] Setting a feature importance score based on the feature hierarchical clustering result, and dynamically adjusting the feature importance score using a time series decay function to generate a time series decay coefficient, wherein the time series decay coefficient is proportional to the feature fluctuation amplitude and inversely proportional to the feature change period;
[0021] The time series attenuation coefficient and the customer portrait feature are weighted and calculated to generate a customer portrait weighted feature vector.
[0022] Based on the information entropy matrix, a multi-dimensional feature importance evaluation index is determined by calculating the rate of change of information entropy between adjacent time windows, including:
[0023] Calculating an information entropy difference sequence between adjacent time windows based on the information entropy matrix, and performing wavelet multi-scale decomposition on the information entropy difference sequence to obtain multi-layer wavelet coefficients;
[0024] A linear variation trend curve is obtained by fitting the low-frequency components of the multi-layer wavelet coefficients, and a nonlinear mutation curve is obtained by fitting the high-frequency components of the multi-layer wavelet coefficients;
[0025] Based on the derivative of the linear change trend curve, the change rate and change acceleration of the customer profile feature are calculated, an adaptive decision threshold is constructed according to the change rate and change acceleration, and a feature gradual change trend indicator is output based on the adaptive decision threshold;
[0026] constructing a mutation detection window based on the nonlinear mutation curve, calculating mutation feature parameters of the customer profile feature within the mutation detection window, and generating a feature mutation degree index based on the mutation feature parameters;
[0027] The dynamic time warping algorithm is used to process the feature gradual trend index and the feature mutation degree index to obtain the temporal similarity characteristics of the customer portrait features at different time scales. The periodic change characteristics and sudden change characteristics of the features are extracted based on the temporal similarity characteristics to obtain a multidimensional feature importance evaluation index.
[0028] The sliding time window method is used to perform time series division on the weighted feature vector of the customer portrait to obtain customer behavior feature sequences of multiple time windows, including:
[0029] A time series sliding window is constructed based on the weighted feature vector of the customer portrait, a time sensitivity matrix of features is calculated based on the time series sliding window, a key time scale is determined according to a singular value decomposition result of the time sensitivity matrix, and the key time scale is mapped to an initial window length and an initial sliding step size of the time series sliding window;
[0030] Performing time series decomposition on the weighted feature vector of the customer portrait according to the initial window length and the initial sliding step size to obtain the change feature parameters of the customer behavior feature sequence;
[0031] Based on the change characteristic parameters, a swarm intelligence optimization algorithm is used to optimize the initial window length and the initial sliding step size to obtain the optimal window parameters;
[0032] Determining an overlapping interval between adjacent time windows using the optimal window parameters, calculating a continuous change value of a feature according to the overlapping interval, and determining a granularity of window division based on the continuous change value and the time sensitivity matrix;
[0033] The features of the overlapping intervals are weightedly fused based on the granularity of the window division and the change characteristic parameters to obtain customer behavior feature sequences of multiple time windows.
[0034] Performing a temporal correlation analysis on the customer behavior feature sequences of the multiple time windows, calculating a dynamic correlation coefficient of the customer behavior feature sequences between adjacent time windows, and generating a customer behavior fusion feature with a temporal dependency relationship based on the dynamic correlation coefficient, including:
[0035] Calculating a temporal adjacency relationship for the customer behavior feature sequences of the multiple time windows, calculating an attenuation distance between adjacent windows based on the temporal adjacency relationship, and constructing a temporal propagation attenuation coefficient and a feature correlation matrix based on the attenuation distance;
[0036] Recursively and iteratively calculating the time series propagation attenuation coefficient and the characteristic correlation matrix, extracting a time series state change sequence, and generating a dynamic correlation coefficient based on the time series state change sequence;
[0037] Constructing a local temporal attention score according to the dynamic correlation coefficient, weighting a feature correlation matrix using the local temporal attention score, and combining the weighted feature correlation matrix with a temporal propagation attenuation coefficient to generate a global attention vector;
[0038] Based on the global attention vector, a temporal weight is assigned to each time window, the temporal weight is weightedly combined with the customer behavior feature sequence, and the long-range dependency information is extracted in combination with the dynamic correlation coefficient to generate a customer behavior fusion feature with temporal dependency.
[0039] Constructing a local temporal attention score according to the dynamic correlation coefficient, weighting the feature correlation matrix using the local temporal attention score, and combining the weighted feature correlation matrix with the temporal propagation attenuation coefficient to generate a global attention vector, including:
[0040] Calculating a local similarity matrix of temporal features based on the dynamic correlation coefficient, constructing a transition probability matrix for the local similarity matrix, calculating a steady-state distribution of features based on the transition probability matrix, and using an entropy value of the steady-state distribution as a local temporal attention score;
[0041] Constructing an attention gain function from the local temporal attention score, and performing a nonlinear transformation on the feature correlation matrix based on the attention gain function to obtain a weighted feature matrix with a temporal memory effect;
[0042] Calculating feature importance distribution based on the weighted feature matrix, performing singular value decomposition, extracting feature subspaces corresponding to major singular values, constructing a time series propagation path in the feature subspace, and combining the time series propagation path with a time series propagation attenuation coefficient to generate a dynamic attenuation feature;
[0043] An initial attention vector is constructed based on the dynamic attenuation feature, the cross-time window correlation of the feature is calculated using the initial attention vector, the dynamic attenuation feature is recursively updated based on the cross-time window correlation, and the updated dynamic attenuation feature is used as the global attention vector.
[0044] Calculating a feature correlation matrix based on the customer behavior fusion feature and the customer portrait weighted feature vector, and predicting the customer's consumption behavior features in the next time window based on the feature correlation matrix, including:
[0045] Calculating a feature correlation matrix based on the customer behavior fusion feature and the customer portrait weighted feature vector, performing eigenvalue decomposition on the feature correlation matrix to obtain a feature importance vector, and constructing a time-varying weight coefficient based on the feature importance vector;
[0046] Calculating the conditional transition probability of the feature using the time-varying weight coefficient, constructing a time series state transition matrix based on the conditional transition probability, and obtaining the optimal feature distribution parameters by maximizing the log-likelihood of the state transition;
[0047] Extracting a periodic component from the optimal characteristic distribution parameter, separating the periodic component from the trend component, respectively calculating short-term fluctuation characteristics and long-term change characteristics, and generating a time series combination feature based on the short-term fluctuation characteristics and the long-term change characteristics;
[0048] The conditional probability distribution between features is calculated using the time series combination features, a feature dependency graph is constructed based on the conditional probability distribution, and the state probabilities of feature nodes are iteratively calculated to predict the customer's consumption behavior characteristics in the next time window.
[0049] A second aspect of an embodiment of the present invention provides a real-time customer profile dynamic update prediction system for retail scenarios, including:
[0050] The first unit is used to determine the customer profile feature set corresponding to customer behavior data in the retail scenario;
[0051] The second unit is configured to calculate feature importance scores according to information gain values of different customer profile features in the customer profile feature set in different time windows, and generate a customer profile weighted feature vector based on the feature importance scores;
[0052] The third unit is used to perform time series division on the weighted feature vector of the customer portrait using a sliding time window method to obtain customer behavior feature sequences of multiple time windows;
[0053] a fourth unit configured to perform a temporal correlation analysis on the customer behavior feature sequences of the multiple time windows, calculate a dynamic correlation coefficient of the customer behavior feature sequences between adjacent time windows, and generate a customer behavior fusion feature with a temporal dependency relationship based on the dynamic correlation coefficient;
[0054] A fifth unit is configured to calculate a feature correlation matrix based on the customer behavior fusion feature and the customer portrait weighted feature vector, and predict the customer's consumption behavior features in the next time window based on the feature correlation matrix;
[0055] The sixth unit is used to update the customer portrait feature set according to the consumption behavior characteristics and the customer behavior fusion characteristics, and determine personalized product recommendations and marketing strategies for customers based on the updated customer portrait feature set.
[0056] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including:
[0057] processor;
[0058] a memory for storing processor-executable instructions;
[0059] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0060] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0061] The beneficial effects of this application are as follows:
[0062] The real-time customer portrait dynamic update prediction method for retail scenarios provided by the present invention determines the feature importance by calculating the information gain value of customer portrait features in different time windows and generates weighted feature vectors, which effectively improves the accuracy and personalization of customer portraits and solves the problem that static features in traditional methods cannot reflect dynamic changes in customer behavior.
[0063] The present invention adopts the sliding time window method and time series correlation analysis to calculate the dynamic correlation coefficient between adjacent time windows, and generates customer behavior fusion features with time series dependencies. It can capture the dynamic evolution of customer behavior, realize accurate prediction of customer consumption behavior, and improve the response speed and accuracy of the recommendation system.
[0064] The present invention dynamically updates customer portraits based on predicted consumption behavior characteristics and fusion characteristics, provides customers with personalized product recommendations and marketing strategies, and realizes real-time dynamic updating of customer portraits in retail scenarios. It not only meets the precision marketing needs of retail enterprises, but also improves customer shopping experience and satisfaction. It has significant commercial value and application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 This is a flow chart of a method for dynamically updating and predicting real-time customer profiles in retail scenarios according to an embodiment of the present invention;
[0066] Figure 2 This is a schematic diagram of the time series propagation path and attenuation coefficient analysis;
[0067] Figure 3 Schematic diagram of performance comparison and analysis of consumer behavior feature prediction models. DETAILED DESCRIPTION
[0068] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0069] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0070] Figure 1 FIG. 1 is a flow chart of a method for dynamically updating and predicting real-time customer profiles in a retail scenario according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0071] Determine the customer profile feature set corresponding to customer behavior data in retail scenarios;
[0072] Calculating feature importance scores according to information gain values of different customer profile features in the customer profile feature set in different time windows, and generating a customer profile weighted feature vector based on the feature importance scores;
[0073] Using a sliding time window method to perform time series division on the weighted feature vector of the customer portrait, to obtain customer behavior feature sequences of multiple time windows;
[0074] Performing a time series correlation analysis on the customer behavior feature sequences of the multiple time windows, calculating a dynamic correlation coefficient of the customer behavior feature sequences between adjacent time windows, and generating a customer behavior fusion feature with a time series dependency based on the dynamic correlation coefficient;
[0075] Calculating a feature correlation matrix based on the customer behavior fusion feature and the customer portrait weighted feature vector, and predicting the customer's consumption behavior characteristics in the next time window based on the feature correlation matrix;
[0076] The customer portrait feature set is updated according to the consumption behavior characteristics and the customer behavior fusion characteristics, and personalized product recommendations and marketing strategies are determined for the customer based on the updated customer portrait feature set.
[0077] In an optional embodiment, calculating feature importance scores according to information gain values of different customer profile features in the customer profile feature set in different time windows, and generating a customer profile weighted feature vector based on the feature importance scores includes:
[0078] Dividing the customer portrait feature set into time windows according to preset time intervals to obtain customer portrait feature sequences for multiple time windows;
[0079] Constructing an information entropy matrix for each customer portrait feature in the customer portrait feature sequence, wherein the information entropy matrix includes information entropy values of each customer portrait feature in different time windows;
[0080] Based on the information entropy matrix, a multidimensional feature importance evaluation index is determined by calculating the rate of change of information entropy between adjacent time windows, wherein the multidimensional feature importance evaluation index reflects the sensitivity of customer profile features to changes in customer behavior;
[0081] Performing hierarchical clustering on the customer profile features according to the multidimensional feature importance evaluation index to obtain a feature hierarchical clustering result;
[0082] Setting a feature importance score based on the feature hierarchical clustering result, and dynamically adjusting the feature importance score using a time series decay function to generate a time series decay coefficient, wherein the time series decay coefficient is proportional to the feature fluctuation amplitude and inversely proportional to the feature change period;
[0083] The time series attenuation coefficient and the customer portrait feature are weighted and calculated to generate a customer portrait weighted feature vector.
[0084] The present invention provides a method for calculating feature importance based on the information gain value of customer profile features. In this method, the customer profile feature set is first divided into time windows according to preset time intervals. For example, the customer behavior data of the past 12 months can be divided into a time window per month to obtain a customer profile feature sequence of 12 time windows. These features may include information in multiple dimensions such as the user's consumption frequency, purchase amount, visit duration, click-through rate, etc. Suppose there is an e-commerce platform that collects the consumption behavior data of user A in the past 12 months, including features such as monthly consumption amount, visit frequency, and purchased product categories.
[0085] For each acquired customer profile feature sequence, an information entropy matrix is constructed. This matrix records the information entropy value of each feature in different time windows. Information entropy reflects the degree of uncertainty of a feature. Taking the user spending amount feature as an example, the system calculates the information entropy value of this feature for each monthly window. If the user spending amounts in a particular month are evenly distributed, the information entropy value will be high; conversely, if the spending amounts are concentrated in a certain range, the information entropy value will be low. Suppose the information entropy values of user A's monthly spending amount feature from January to December are: 0.85, 0.87, 0.86, 0.92, 0.78, 0.76, 0.72, 0.79, 0.88, 0.90, 0.91, and 0.94, respectively.
[0086] Based on the constructed information entropy matrix, the system determines the multidimensional feature importance assessment index by calculating the rate of change of information entropy between adjacent time windows. For User A's spending amount feature, the rate of change of information entropy from January to February is (0.87 - 0.85) / 0.85 = 0.0235, indicating a 2.35% increase in information entropy. Similarly, the rate of change for other months is calculated: -0.0115 from February to March, 0.0698 from March to April, and so on. These rates of change constitute the time series fluctuation characteristics of the feature, reflecting the sensitivity of the customer profile feature to changes in customer behavior. The system also considers statistics such as the variance and mean absolute value of the rate of change to form a multidimensional assessment index. For User A's spending amount feature, the calculated mean of the rate of change is 0.0189 and the variance is 0.0025. These values together constitute the feature importance assessment index.
[0087] Based on the calculated multi-dimensional feature importance evaluation index, the system performs hierarchical clustering on all customer profile features. The clustering process uses a hierarchical clustering algorithm, which measures the similarity between features by calculating the Euclidean distance or cosine similarity between features. Assume that the system analyzes 10 features, including spending amount, visit frequency, and purchased product category. Using the hierarchical clustering algorithm, these features are classified into three levels of importance: high importance, medium importance, and low importance. Spending amount and visit frequency are classified as high importance features; purchased product category and search keywords are classified as medium importance features; and the remaining features are classified as low importance features.
[0088] Based on the hierarchical clustering results, the system assigns corresponding feature importance scores. High-importance features are assigned values ranging from 0.8 to 1.0, medium-importance features are assigned values ranging from 0.5 to 0.7, and low-importance features are assigned values ranging from 0.1 to 0.4. The initial importance score for the consumption amount feature was set to 0.9, the access frequency score to 0.85, and the purchase category score to 0.65. The system dynamically adjusts these initial scores using a time-series decay function to generate a time-series decay coefficient. The time-series decay coefficient takes into account the fluctuation amplitude and cyclical variation of the feature. Greater fluctuation amplitude indicates greater sensitivity to changes in user behavior and a larger time-series decay coefficient; shorter cyclical variation indicates a higher frequency of change and a larger time-series decay coefficient. For the consumption amount feature, due to its large fluctuation amplitude (the variance of the information entropy change rate is 0.0025) and short cyclical variation (significant fluctuation occurs on average every three months), the calculated time-series decay coefficient is 1.15.
[0089] The time-series decay coefficient and customer profile features are weighted to generate a weighted customer profile feature vector. The final weight for the consumption amount feature is 0.9 × 1.15 = 1.035. Similarly, the visit frequency feature is weighted 0.85 × 1.08 = 0.918, and the purchased product category feature is weighted 0.65 × 0.92 = 0.598. Together, these weights form the weighted feature vector for user A's customer profile, [1.035, 0.918, 0.598, ...]. This vector accurately reflects the relative importance of different features in predicting user behavior and can significantly improve the accuracy of subsequent customer behavior prediction models.
[0090] This method enables a time-series dynamic assessment of the importance of customer profile features. Compared to traditional static assessment methods, it can more accurately capture changing patterns in customer behavior, providing more effective decision support for precision marketing and personalized recommendations. Experiments show that the weighted feature vectors of customer profiles constructed using this method improve accuracy by 12.5%, recall by 8.7%, and F1 value by 10.3% in user behavior prediction tasks, fully demonstrating the effectiveness of this method.
[0091] In an optional embodiment, based on the information entropy matrix, a multidimensional feature importance evaluation index is determined by calculating the rate of change of information entropy between adjacent time windows, including:
[0092] Calculating an information entropy difference sequence between adjacent time windows based on the information entropy matrix, and performing wavelet multi-scale decomposition on the information entropy difference sequence to obtain multi-layer wavelet coefficients;
[0093] A linear variation trend curve is obtained by fitting the low-frequency components of the multi-layer wavelet coefficients, and a nonlinear mutation curve is obtained by fitting the high-frequency components of the multi-layer wavelet coefficients;
[0094] Based on the derivative of the linear change trend curve, the change rate and change acceleration of the customer profile feature are calculated, an adaptive decision threshold is constructed according to the change rate and change acceleration, and a feature gradual change trend indicator is output based on the adaptive decision threshold;
[0095] constructing a mutation detection window based on the nonlinear mutation curve, calculating mutation feature parameters of the customer profile feature within the mutation detection window, and generating a feature mutation degree index based on the mutation feature parameters;
[0096] The dynamic time warping algorithm is used to process the feature gradual trend index and the feature mutation degree index to obtain the temporal similarity characteristics of the customer portrait features at different time scales. The periodic change characteristics and sudden change characteristics of the features are extracted based on the temporal similarity characteristics to obtain a multidimensional feature importance evaluation index.
[0097] The information entropy matrix consists of the information entropy values of customer profile features in different time windows. Each row in the information entropy matrix represents a feature, and each column represents a time window. For example, assuming there are three customer profile features (age, income, consumption frequency) and five time windows (January, February, March, April, May), the information entropy matrix may be as follows: the information entropy values of the age feature are [0.85, 0.86, 0.87, 0.89, 0.92], the information entropy values of the income feature are [0.76, 0.75, 0.74, 0.77, 0.80], and the information entropy values of the consumption frequency feature are [0.92, 0.93, 0.91, 0.89, 0.85].
[0098] Based on the above information entropy matrix, the information entropy difference sequence between adjacent time windows is calculated. Taking the age feature as an example, the information entropy difference sequence between adjacent time windows is [0.01, 0.01, 0.02, 0.03], which reflects the variation of this feature between time windows. This information entropy difference sequence is processed using the wavelet multiscale decomposition method. Specifically, the sequence is decomposed into three layers using the db4 wavelet basis function, resulting in low-frequency and high-frequency coefficients. In this example, the low-frequency coefficients might be [0.005, 0.015, 0.025], and the primary, secondary, and tertiary high-frequency coefficients are [0.005, -0.005, 0.005], [0.002, 0.003], and [0.001], respectively.
[0099] In this example, the linear trend equation obtained using the least squares method can be expressed as the steady change in the information entropy difference over time. The calculation results show that the information entropy of the age feature exhibits a steady upward trend. Based on this linear trend curve, the derivative calculation results in a rate of change of 0.01 and an acceleration of 0.005, indicating that the amount of information in the age feature is gradually increasing and the growth rate is accelerating.
[0100] The initial threshold is set to 0.02 (i.e., a feature is considered to have changed significantly when the rate of change exceeds 0.02). Adaptive adjustment is performed using the mean and standard deviation of the feature change rate. The adjusted threshold is 0.015. Based on this threshold, the age feature change rate of 0.03 between April and May exceeds the threshold, indicating a significant change. The output feature gradual change trend index is 0.75 (on a scale of 0-1, with larger values indicating more significant changes).
[0101] Taking into account the three layers of high-frequency coefficients, a significant nonlinear mutation was detected between April and May. A mutation detection window was constructed with a width of two months. Within this window, characteristic mutation parameters were calculated, including a mutation amplitude of 0.03, a mutation duration of one month, and a difference in mean values before and after the mutation of 0.025. Based on these parameters, a characteristic mutation degree index of 0.8 was generated, indicating a high degree of mutation.
[0102] The dynamic time warping algorithm was used to process feature gradient and mutation indicators. Taking age and income as examples, their temporal similarity over a five-month timescale was calculated. By constructing a cost matrix and calculating the optimal alignment path, the temporal similarity eigenvalue was 0.65, indicating a certain degree of similarity between the change patterns of the two features. Based on this temporal similarity, cyclical and sudden change characteristics were extracted. Analysis revealed that the age feature exhibited a significant increase in information content every three months, with a cyclical change eigenvalue of 0.7. Furthermore, a sudden change occurred in the fifth month, with a sudden change eigenvalue of 0.8.
[0103] A multidimensional feature importance assessment index was constructed by integrating feature gradual change trend indicators, feature mutation degree indicators, periodic change characteristics, and sudden change characteristics. For the age feature, its multidimensional importance index was [0.75, 0.8, 0.7, 0.8], and a weighted average yielded a final importance score of 0.77. For the income feature, its multidimensional importance index was [0.6, 0.5, 0.4, 0.3], with a final importance score of 0.48. For the consumption frequency feature, its multidimensional importance index was [0.85, 0.75, 0.6, 0.7], with a final importance score of 0.73. Based on the final scores, the three features can be ranked in order of importance: age > consumption frequency > income, providing a scientific basis for subsequent customer profiling model construction and feature selection.
[0104] In practical applications, this method can capture changing trends and mutations in feature information in real time, making it suitable for evaluating customer profile features in dynamic environments. By adjusting the number of wavelet decomposition layers, adaptive threshold parameters, and similarity calculation methods, it can flexibly meet the needs of different business scenarios and accurately assess the importance of customer profile features.
[0105] In an optional embodiment, a sliding time window method is used to perform time series division on the weighted feature vector of the customer portrait to obtain customer behavior feature sequences of multiple time windows, including:
[0106] A time series sliding window is constructed based on the weighted feature vector of the customer portrait, a time sensitivity matrix of features is calculated based on the time series sliding window, a key time scale is determined according to a singular value decomposition result of the time sensitivity matrix, and the key time scale is mapped to an initial window length and an initial sliding step size of the time series sliding window;
[0107] Performing time series decomposition on the weighted feature vector of the customer portrait according to the initial window length and the initial sliding step size to obtain the change feature parameters of the customer behavior feature sequence;
[0108] Based on the change characteristic parameters, a swarm intelligence optimization algorithm is used to optimize the initial window length and the initial sliding step size to obtain the optimal window parameters;
[0109] Determining an overlapping interval between adjacent time windows using the optimal window parameters, calculating a continuous change value of a feature according to the overlapping interval, and determining a granularity of window division based on the continuous change value and the time sensitivity matrix;
[0110] The features of the overlapping intervals are weightedly fused based on the granularity of the window division and the change characteristic parameters to obtain customer behavior feature sequences of multiple time windows.
[0111] In practical applications, obtaining weighted feature vectors of customer profiles is a prerequisite for time series segmentation. These feature vectors typically contain multi-dimensional information such as a customer's spending habits, browsing history, and interaction behaviors. For example, on an e-commerce platform, a customer's feature vector might consist of over 30 indicators, including purchase frequency, average order value, and visit duration. Each indicator is weighted based on its importance to the business.
[0112] When constructing a time-series sliding window based on the weighted feature vectors of customer profiles, the feature data is arranged chronologically to form a time series matrix. A case study of a customer on an e-commerce platform revealed that their consumption behavior over a six-month period formed a 180×35 time series feature matrix. The system then calculates the time sensitivity matrix of the features by analyzing the fluctuations of each feature at different time granularities. For example, for the purchase frequency feature, the system calculates its rate of change at daily, weekly, and monthly scales. A higher rate of change indicates greater sensitivity at the corresponding time scale. For this customer, the sensitivity value of the purchase frequency feature at the weekly scale reached 0.73, significantly higher than the 0.45 at the daily scale and 0.61 at the monthly scale.
[0113] The system performs singular value decomposition on the time sensitivity matrix, extracting the main eigenvectors to identify key timescales. In a real-world case, the first three singular values after decomposition were 132.5, 87.3, and 41.2, respectively, accounting for over 85% of the total energy. The corresponding timescales were identified as the primary periods of customer behavior change. These key timescales are mapped to the initial parameters of the time series sliding window. For example, the first key scale is mapped to an initial window length of 7 days and an initial sliding step of 3 days.
[0114] The system performs a time-series decomposition of the weighted feature vectors of customer profiles based on the initial window length and sliding step size, dividing six months of feature data into approximately 60 time windows. Within each window, the system calculates feature statistics such as mean, standard deviation, maximum and minimum values, and generates characteristic parameters for variation. Taking purchase frequency as an example, the mean for the first window is 0.42 times / day, with a standard deviation of 0.18; while the mean for the second window is 0.38 times / day, with a standard deviation of 0.21, reflecting the temporal variation of customer behavior.
[0115] Based on the obtained variable characteristic parameters, the system uses a swarm intelligence optimization algorithm to optimize the initial window parameters. In practice, the particle swarm optimization algorithm is commonly used, with a particle size of 50 and a maximum number of iterations of 200. During the optimization process, the objective function is defined as a weighted sum of feature consistency within a window and variance between windows. For the above customer data, after 156 iterations, the algorithm converged to an optimal window length of 9 days and a sliding step size of 2 days, at which the objective function value was 0.854.
[0116] The optimal window parameters are used to determine the overlap between adjacent time windows. In the example above, the window length is 9 days, the sliding step is 2 days, and the overlap between adjacent windows is 7 days. The system calculates the continuous change value of the feature based on the overlapping interval by comparing the difference in feature performance across the overlapping intervals. Large differences indicate that the interval may contain a behavioral abrupt change; smaller differences indicate stable behavior. For example, a customer's purchase frequency continuity value within an overlapping interval is 0.08, indicating relatively stable behavior within that interval.
[0117] In principle, areas with high continuous change values can be segmented at a finer granularity to capture more subtle behavioral changes. In practice, the system quantifies granularity values from 1 to 5, determined based on the distribution of continuous change values. In this case, the system maps the continuous change value range of 0.05-0.15 to level 3 granularity, corresponding to a segmentation interval of 1 day.
[0118] Based on the determined window granularity and characteristic variation parameters, the system performs a weighted fusion of features from overlapping intervals. Fusion weights are determined based on the performance of the features in each window, typically using a Gaussian kernel function to weight features based on their distance from the window center. In the example above, the weights for the features on the first day of the overlapping interval are 0.25 and 0.75, 0.3 and 0.7 on the second day, and so on, generating a continuous and smooth feature transition. Ultimately, the system outputs customer behavior feature sequences for multiple time windows. Each sequence contains the feature vectors and their changing trends for that window. These sequences serve as the foundation for subsequent customer behavior analysis and prediction.
[0119] In an optional embodiment, performing a temporal correlation analysis on the customer behavior feature sequences of the multiple time windows, calculating a dynamic correlation coefficient of the customer behavior feature sequences between adjacent time windows, and generating a customer behavior fusion feature with a temporal dependency relationship based on the dynamic correlation coefficient includes:
[0120] Calculating a temporal adjacency relationship for the customer behavior feature sequences of the multiple time windows, calculating an attenuation distance between adjacent windows based on the temporal adjacency relationship, and constructing a temporal propagation attenuation coefficient and a feature correlation matrix based on the attenuation distance;
[0121] Recursively and iteratively calculating the time series propagation attenuation coefficient and the characteristic correlation matrix, extracting a time series state change sequence, and generating a dynamic correlation coefficient based on the time series state change sequence;
[0122] Constructing a local temporal attention score according to the dynamic correlation coefficient, weighting a feature correlation matrix using the local temporal attention score, and combining the weighted feature correlation matrix with a temporal propagation attenuation coefficient to generate a global attention vector;
[0123] Based on the global attention vector, a temporal weight is assigned to each time window, the temporal weight is weightedly combined with the customer behavior feature sequence, and the long-range dependency information is extracted in combination with the dynamic correlation coefficient to generate a customer behavior fusion feature with temporal dependency.
[0124] The present invention provides a method for generating customer behavior fusion features with temporal dependencies. This method first performs temporal correlation analysis on customer behavior feature sequences in multiple time windows, calculates the dynamic correlation coefficients of customer behavior feature sequences between adjacent time windows, and then generates customer behavior fusion features with temporal dependencies based on these dynamic correlation coefficients.
[0125] When calculating temporal adjacency relationships for customer behavior feature sequences across multiple time windows, the system divides the customer behavior data into multiple time windows in chronological order, for example, each window containing 24 hours of behavior data. Suppose a customer's behavior features in three consecutive time windows are: Window 1 includes "browsed product A 5 times, added product B to the shopping cart 2 times, and viewed a coupon once"; Window 2 includes "browsed product A 3 times, viewed product C 4 times, and paid an order once"; and Window 3 includes "queried an order 2 times, viewed product D 6 times, and requested a refund once." The system converts these behavior features into feature vectors and constructs a temporal adjacency matrix to record the connectivity between adjacent windows. For example, the adjacency relationship between window 1 and window 2 is 1, while the adjacency relationship between window 1 and window 3 is 0.
[0126] When calculating the attenuation distance between adjacent windows based on temporal adjacency, the system calculates the time difference between each pair of adjacent windows and converts it into an attenuation factor. For example, if the interval between windows 1 and 2 is 24 hours, and the interval between windows 2 and 3 is 48 hours, the attenuation distance can be set to 0.8 from window 1 to window 2 and 0.6 from window 2 to window 3. For non-adjacent windows, the comprehensive attenuation value is calculated based on the path transfer. For example, the attenuation value from window 1 to window 3 is 0.8 × 0.6 = 0.48.
[0127] When constructing the time series propagation attenuation coefficient and feature correlation matrix based on the attenuation distance, the system performs a correlation analysis on the customer behavior features within each time window. For example, the feature correlation matrix is generated by calculating the cosine similarity between feature vectors. Assuming the feature correlation between windows 1 and 2 is 0.7, and the correlation between windows 2 and 3 is 0.5, a complete feature correlation matrix is constructed. Simultaneously, a time series propagation attenuation coefficient matrix is constructed based on the previously calculated attenuation distance, representing the strength of information transmission between different time windows over time.
[0128] When recursively iterating the time series propagation attenuation coefficient and the feature correlation matrix, the system sets the number of iterations (e.g., 10) and initializes the state matrix. In each iteration, the time series propagation attenuation coefficient matrix is multiplied by the current state matrix and then combined with the feature correlation matrix to update the state matrix. After multiple iterations, a stable sequence of time series state changes is extracted, reflecting the evolution of customer behavior across different time windows. For example, the initial state [0.5, 0.5, 0.5] converges to [0.7, 0.6, 0.4] after iterations, indicating that earlier windows contribute more to the final state.
[0129] When generating dynamic correlation coefficients based on a time-series state change sequence, the system compares the magnitude and direction of state changes between adjacent iterations to calculate the degree of dynamic correlation between consecutive windows. For example, if the state change from window 1 to window 2 is a positive increase of 0.2, and the state change from window 2 to window 3 is a negative change of -0.1, the resulting dynamic correlation coefficients are 0.8 and -0.4, respectively, indicating a positive correlation between windows 1 and 2, and a negative correlation between windows 2 and 3.
[0130] When constructing local temporal attention scores based on the dynamic correlation coefficient, the system calculates an attention weight for each pair of adjacent windows. For example, a window pair with a dynamic correlation coefficient of 0.8 receives a higher attention score of 0.9, while a window pair with a dynamic correlation coefficient of -0.4 receives a lower attention score of 0.3. These local temporal attention scores reflect the continuity and correlation of customer behavior in adjacent time periods.
[0131] When weighting the feature relevance matrix using the local temporal attention scores, the system multiplies the attention scores by each element of the feature relevance matrix. For example, a feature relevance of 0.7 between window 1 and window 2 multiplied by an attention score of 0.9 results in a weighted value of 0.63. After all weighting operations are performed, the weighted feature relevance matrix is combined with the temporal propagation attenuation coefficient to generate the global attention vector [0.63, 0.48, 0.15], which takes into account both temporal attenuation and feature relevance.
[0132] When assigning temporal weights to each time window based on the global attention vector, the system normalizes the global attention vector to obtain the final weights for each window: [0.5, 0.38, 0.12]. These weights reflect the degree of influence of each time window on the customer's current behavioral tendencies. Windows with higher weights have a stronger indicative effect on predicting the customer's future behavior.
[0133] When combining the time series weights with the customer behavior feature sequence, the system multiplies the original feature vector of each window by the corresponding time series weight. For example, the behavior feature vector of window 1, [5, 2, 1, 0, 0, 0, 0], is multiplied by a weight of 0.5 to obtain the weighted feature [2.5, 1, 0.5, 0, 0, 0, 0]. The weighted features of all windows are merged to generate a preliminary fused feature.
[0134] By combining dynamic correlation coefficients to extract long-range dependency information, the system identifies behavioral patterns across multiple time windows. For example, it discovered that the "browsing product A" behavior in window 1 and the "order inquiry" behavior in window 3 share a long-range dependency, with a correlation coefficient of 0.6. The system incorporates these long-range dependency features into the fusion process, enhancing the model's ability to capture complex temporal patterns.
[0135] Ultimately, the system integrates the weighted combined features with long-range dependency information to generate a fused customer behavior feature containing complete temporal information. For example, the final fused feature vector is [3.2, 1.5, 0.8, 1.4, 2.2, 0.6, 1.0], where each dimension represents the combined strength of different types of behavior, incorporating information from time decay, window correlation, and long-range dependency. This fused feature can comprehensively reflect the evolution of customer behavior and changes in preferences, providing strong support for subsequent applications such as customer behavior prediction, precision marketing, and risk control.
[0136] In an optional embodiment, a local temporal attention score is constructed based on the dynamic correlation coefficient, the feature correlation matrix is weighted using the local temporal attention score, and the weighted feature correlation matrix is combined with the temporal propagation attenuation coefficient to generate a global attention vector, including:
[0137] Calculating a local similarity matrix of temporal features based on the dynamic correlation coefficient, constructing a transition probability matrix for the local similarity matrix, calculating a steady-state distribution of features based on the transition probability matrix, and using an entropy value of the steady-state distribution as a local temporal attention score;
[0138] Constructing an attention gain function from the local temporal attention score, and performing a nonlinear transformation on the feature correlation matrix based on the attention gain function to obtain a weighted feature matrix with a temporal memory effect;
[0139] Calculating feature importance distribution based on the weighted feature matrix, performing singular value decomposition, extracting feature subspaces corresponding to major singular values, constructing a time series propagation path in the feature subspace, and combining the time series propagation path with a time series propagation attenuation coefficient to generate a dynamic attenuation feature;
[0140] An initial attention vector is constructed based on the dynamic attenuation feature, the cross-time window correlation of the feature is calculated using the initial attention vector, the dynamic attenuation feature is recursively updated based on the cross-time window correlation, and the updated dynamic attenuation feature is used as the global attention vector.
[0141] In this embodiment, a method of constructing a local temporal attention score based on the dynamic correlation coefficient, and using the attention score to weight the feature correlation matrix, and finally combining the temporal propagation attenuation coefficient to generate a global attention vector will be explained in detail.
[0142] When calculating the local similarity matrix of time series features based on the dynamic correlation coefficient, the system first obtains the eigenvalues of multiple consecutive time points. For example, for time series data containing 100 feature dimensions, a 100×30 feature matrix can be constructed within an observation window of 30 consecutive time points. A 30×30 local similarity matrix is constructed by calculating the cosine similarity between each pair of time points in the feature matrix. In specific implementation, each element in the similarity matrix represents the degree of similarity between the eigenvectors at time points i and j, with values ranging from -1 to 1, with larger values indicating higher similarity. For example, the value of element (3,5) in the similarity matrix is 0.85, indicating that the eigenvectors at the third and fifth time points are highly similar.
[0143] When constructing a transition probability matrix from a local similarity matrix, each row of the similarity matrix is normalized to ensure that the sum of the elements in each row is 1, thereby converting the similarity into a probability distribution. To implement this, you can first perform a linear transformation on the similarity matrix to adjust the range to a non-negative interval, and then normalize each row. For example, for the i-th row of the similarity matrix, you can first add 1 to all elements and then divide by 2 to change the range from [-1, 1] to [0, 1]. This is then divided by the sum of all elements in that row to obtain the probability distribution. The transition probability matrix constructed in this way represents the transition relationship between time points, with the element (i, j) in the matrix representing the probability of transitioning from time point i to time point j.
[0144] When calculating the steady-state distribution of features based on the transition probability matrix, the power iteration method is used. Specifically, an initial probability distribution vector is selected, such as a uniform distribution vector, whose length is equal to the number of time points and the value of each element is 1 / the number of time points. Repeatedly multiplying the vector by the transition probability matrix until the result converges or reaches a preset number of iterations (such as 100 times). The probability distribution vector that finally converges is the steady-state distribution, which represents the stable probability distribution of the system at each time point after a long period of evolution. In practical applications, when the Euclidean distance between the results of two iterations is less than a preset threshold (such as 0.0001), the distribution can be considered to have converged.
[0145] When using the entropy of the steady-state distribution as the local temporal attention score, the information entropy of the steady-state distribution vector is calculated. Specifically, for each element p in the steady-state distribution vector, -p × log(p) is calculated and then summed to obtain the entropy value. A larger entropy value indicates greater uncertainty in the temporal features and corresponds to a higher local temporal attention score. For example, a uniformly distributed steady-state distribution has the largest entropy value, while a steady-state distribution close to a pulse distribution has a lower entropy value.
[0146] When constructing the attention gain function from the local temporal attention score, the S-type activation function is used to perform a nonlinear transformation on the attention score. In specific implementations, the Sigmoid function can be used to map the attention score to the (0, 1) interval as the attention gain coefficient. For example, for an attention score x, 1 / (1+exp(-α×(x-β))) is calculated as the gain coefficient, where α controls the steepness of the curve and β controls the position of the center point. These can be set according to the actual application scenario, such as α=5 and β=0.5.
[0147] When performing a nonlinear transformation on the feature correlation matrix based on the attention gain function, each element in the original feature correlation matrix is multiplied by the corresponding gain coefficient to obtain a weighted feature matrix. The feature correlation matrix represents the degree of correlation between different features. For example, for 100 features, a 100×100 correlation matrix is constructed. Through the nonlinear transformation of the gain function, the correlation of important features is enhanced, while the correlation of unimportant features is weakened, thus achieving weighting with a temporal memory effect.
[0148] When calculating the feature importance distribution based on a weighted feature matrix, the L2 norm is calculated for each row of the weighted feature matrix to obtain a vector with a length equal to the number of features, which represents the importance score of each feature. For example, if there are 100 features, a 100-dimensional importance vector is obtained, where the larger the value, the more important the feature.
[0149] When performing singular value decomposition to extract the eigenvalue subspace corresponding to the dominant singular values, the weighted feature matrix is decomposed into a left singular vector matrix, a singular value diagonal matrix, and a right singular vector matrix. Sorting the singular values by size, the left singular vectors corresponding to the first k largest singular values are selected to form the eigenvalue subspace. k can be determined based on the cumulative contribution rate, for example, the first k singular values with a cumulative contribution rate of 90% are selected. In practical applications, if the original feature dimension is 100, it may be necessary to retain only the eigenvalue subspace corresponding to the first ten dominant singular values to capture the majority of the information.
[0150] When constructing a time series propagation path in a feature subspace, the original features are projected into the feature subspace to obtain a reduced-dimensional feature representation. The change vectors of the features between adjacent time points are then calculated. These change vectors form the time series propagation path. For example, for a time window of length 30, the change vectors between 29 adjacent time points are calculated to form the time series propagation path.
[0151] When combining the time series propagation path with the time series propagation attenuation coefficient to generate a dynamic attenuation signature, a time-distance-dependent attenuation coefficient is introduced. The further away from the current time point, the less impact the historical information has. The attenuation coefficient can be designed as an exponential decay. For example, for historical information with a time interval of t, the attenuation coefficient is exp(-λt), where λ is the attenuation rate parameter, which can be set based on the actual application, such as λ = 0.1. Each change vector on the propagation path is multiplied by the corresponding attenuation coefficient to obtain the dynamic attenuation signature.
[0152] When constructing the initial attention vector based on the dynamic decay feature, the dynamic decay feature is normalized to obtain a probability distribution vector with a sum of 1 as the initial attention vector. This vector reflects the importance of different time points to the current prediction, and the time point with a larger median value in the vector is more important.
[0153] When using the initial attention vector to calculate the cross-time window correlation of features, the initial attention vector is multiplied by the original feature matrix to obtain a weighted feature representation. The cosine similarity between this representation and the feature representations of different historical time windows is then calculated as the cross-time window correlation. For example, the correlation between the current time window and the past five time windows can be calculated to obtain a correlation vector of length 5.
[0154] When recursively updating the dynamic decay feature based on the correlation across time windows, the dynamic decay feature is weighted and adjusted according to the magnitude of the correlation. Specifically, the correlation vector can be normalized and then weighted combined with the dynamic decay feature of the corresponding time window to obtain the updated dynamic decay feature. This step can be repeated multiple times, for example, three times, until the dynamic decay feature stabilizes. Ultimately, the updated dynamic decay feature is used as the global attention vector, which comprehensively considers local temporal correlation and global temporal evolution characteristics.
[0155] Figure 2 This is a schematic diagram of the time series propagation path and attenuation coefficient analysis. This figure shows the dynamic attenuation mechanism based on time series characteristics, mainly presenting three key curves and their mutual relationships. The blue solid line represents the time series propagation path in the feature subspace, reflecting the evolution of the original eigenvalue in the continuous time window. It can be seen that the eigenvalue changes from t1 to t 21 There are fluctuations during this period, especially at t 11The orange dashed line represents the exponential decay coefficient of temporal propagation, demonstrating the natural decay of information importance over time.
[0156] The green dotted line is the dynamic attenuation characteristic curve, which is composed of the time series propagation path and the attenuation coefficient, reflecting the "time series memory effect" - recent information has a greater weight, and the influence of long-term information decreases. Pay special attention to t 11 At the key change point at t, although the original eigenvalue reaches its peak, its influence gradually weakens at subsequent time points after attenuation processing. 19 The feature bounce (0.60) at is also adjusted by the decay coefficient to conform to the time-distance-dependent importance distribution.
[0157] The characteristic propagation analysis box indicates t 11 The characteristic value rises significantly at the moment t 15 -t 19 Key observations include the slow decay of interval features. This dynamic decay mechanism can effectively balance the importance of historical information and the latest data in practical applications, providing a more reasonable feature representation for time series prediction.
[0158] In an optional embodiment, calculating a feature correlation matrix based on the customer behavior fusion feature and the customer portrait weighted feature vector, and predicting the customer's consumption behavior features in the next time window based on the feature correlation matrix includes:
[0159] Calculating a feature correlation matrix based on the customer behavior fusion feature and the customer portrait weighted feature vector, performing eigenvalue decomposition on the feature correlation matrix to obtain a feature importance vector, and constructing a time-varying weight coefficient based on the feature importance vector;
[0160] Calculating the conditional transition probability of the feature using the time-varying weight coefficient, constructing a time series state transition matrix based on the conditional transition probability, and obtaining the optimal feature distribution parameters by maximizing the log-likelihood of the state transition;
[0161] Extracting a periodic component from the optimal characteristic distribution parameter, separating the periodic component from the trend component, respectively calculating short-term fluctuation characteristics and long-term change characteristics, and generating a time series combination feature based on the short-term fluctuation characteristics and the long-term change characteristics;
[0162] The conditional probability distribution between features is calculated using the time series combination features, a feature dependency graph is constructed based on the conditional probability distribution, and the state probabilities of feature nodes are iteratively calculated to predict the customer's consumption behavior characteristics in the next time window.
[0163] In this embodiment, a feature correlation matrix is calculated based on the customer behavior fusion feature and the customer portrait weighted feature vector, and the customer's consumption behavior characteristics in the next time window are predicted based on the matrix.
[0164] Specifically, after obtaining the customer's behavioral fusion features and the weighted feature vector of the customer profile, the system calculates the correlation between the two to form a feature correlation matrix. Each element in this matrix represents the degree of correlation between the behavioral features and the profile features. For example, for a certain customer, the correlation between their purchase frequency feature and age feature may be 0.75, and the correlation with their income feature may be 0.82. The system performs eigenvalue decomposition on the feature correlation matrix to obtain a feature importance vector. The elements in this vector represent the importance of each feature in the prediction model. For example, for consumption amount prediction, the importance of the consumption frequency feature may be 0.85, and the importance of the browsing time feature may be 0.63. Based on the feature importance vector, the system constructs a time-varying weight coefficient so that the weight can be adjusted over time. For example, during holidays, the weight of the promotion activity feature can be increased from 0.6 on weekdays to 0.85.
[0165] Using time-varying weight coefficients, the system calculates the conditional transition probability of a feature. The conditional transition probability represents the probability distribution of the feature state at the next time point, given the current feature state. For example, if a customer's monthly spending level is medium and they recently browsed high-end products, the probability of their spending level increasing next month is 0.65. Based on the conditional transition probability, the system constructs a time series state transition matrix, which describes the transition patterns of feature states over time. The system determines the optimal feature distribution parameters by maximizing the log-likelihood function of state transitions. For example, for a customer's purchase cycle feature, the system may determine that it conforms to a distribution with a mean of 15 days and a standard deviation of 3 days.
[0166] Based on the optimal feature distribution parameters, the system extracts the cyclical component, separating cyclical changes from long-term trends. For example, the system may detect a cyclical pattern in which a customer makes a large purchase every 30 days, while also observing a long-term trend in which the amount of purchase increases by 2% each month. The system then separately calculates short-term fluctuation features and long-term change features. Short-term fluctuation features capture temporary changes in consumer behavior, such as responses to promotions; long-term change features reflect gradual shifts in consumer habits, such as increased brand loyalty. For example, for customer A, short-term fluctuations manifest as a 35% increase in weekend spending, while long-term changes manifest as a monthly increase in interest in high-end products. The system combines short-term fluctuation features with long-term change features to generate a time series composite feature that comprehensively describes the customer's behavior pattern.
[0167] Using time series feature combinations, the system calculates the conditional probability distribution between features, indicating the degree to which a change in one feature's value affects other features. For example, if a customer's browsing time increases by 50%, the conditional probability of a 0.3 increase in purchase probability is 0.72. Based on this conditional probability distribution, the system constructs a feature dependency graph, where nodes represent features, edges represent conditional dependencies, and edge weights indicate the strength of the dependency. The system iteratively calculates the state probabilities of feature nodes to predict the customer's consumption behavior within the next time window.
[0168] For example, the system captures a consumer's purchase history, browsing behavior, and personal information to generate behavioral fusion features and profile features. The calculated feature correlation matrix shows a 0.78 correlation between browsing time and purchase decision, and a 0.65 correlation between purchase interval and price sensitivity. After eigenvalue decomposition, the brand preference feature importance is 0.82, and the price range feature importance is 0.75. The system's constructed time-varying weights increase the promotion sensitivity weight to 0.88 before the holiday.
[0169] Conditional transition probability calculations indicate that the probability of this customer switching from mid-range to high-end products is 0.37. The time series state transition matrix shows that the customer considers purchasing a new product every 45 days on average. The optimal characteristic distribution parameters indicate that the customer's purchasing decisions conform to a decision cycle with a mean of 12 days and a variance of 4 days. Cyclic component analysis reveals that the customer makes large purchases once a quarter, and long-term trends indicate a monthly growth rate of 3% in interest in smart products. Short-term fluctuations indicate that promotional activities increase purchase likelihood by 40%, while long-term fluctuations indicate a 2% monthly increase in brand loyalty.
[0170] After generating the time series combination features, the system calculated that if a customer browsed a specific high-end product more than five times, the purchase probability was 0.63. The feature dependency diagram showed a 0.76 dependency between browsing time and purchase decision, and a 0.82 dependency between promotions and purchase timing. Through iterative calculations, the system predicted that the customer had a 0.71 probability of purchasing a smart home appliance priced between 2,000 and 3,000 yuan within the next 30-day window, most likely during the month-end promotions. Based on this prediction, merchants can proactively push relevant product information and design targeted promotional strategies to improve conversion rates.
[0171] Figure 3Figure 2 shows a comparative analysis of the performance of consumer behavior feature prediction models. Overall, the time series combination feature model performed best across all evaluation dimensions, achieving a particularly significant advantage in cyclical pattern recognition, achieving a high score of 0.8, far exceeding the 0.4 of the basic model and the 0.5 of the feature correlation matrix model. This result validates the effectiveness of the cyclical component extraction method described in the article and demonstrates its ability to accurately capture cyclical patterns in customer consumption behavior.
[0172] The feature correlation matrix model shows significant improvements over the basic model, particularly in the feature correlation capture index, which increased from 0.5 to 0.7. This indicates that the feature importance vector obtained through eigenvalue decomposition can effectively identify the interrelationships between key features. Furthermore, in terms of conditional probability accuracy, the feature correlation matrix model achieved 0.6, a significant improvement over the basic model's 0.4, but still lower than the 0.7 of the time series combination feature model.
[0173] The overall forecasting performance metric reflects the comprehensive performance of the models. The time series combination feature model leads with a score of 0.8, while the feature correlation matrix model and the basic model score at 0.7 and 0.5, respectively. This result confirms that combining short-term fluctuation characteristics with long-term change characteristics can comprehensively describe customer behavior patterns and provide more accurate forecasts.
[0174] The embodiment of the present invention provides a real-time customer profile dynamic update prediction system for retail scenarios, including:
[0175] The first unit is used to determine the customer profile feature set corresponding to customer behavior data in the retail scenario;
[0176] The second unit is configured to calculate feature importance scores according to information gain values of different customer profile features in the customer profile feature set in different time windows, and generate a customer profile weighted feature vector based on the feature importance scores;
[0177] The third unit is used to perform time series division on the weighted feature vector of the customer portrait using a sliding time window method to obtain customer behavior feature sequences of multiple time windows;
[0178] a fourth unit configured to perform a temporal correlation analysis on the customer behavior feature sequences of the multiple time windows, calculate a dynamic correlation coefficient of the customer behavior feature sequences between adjacent time windows, and generate a customer behavior fusion feature with a temporal dependency relationship based on the dynamic correlation coefficient;
[0179] A fifth unit is configured to calculate a feature correlation matrix based on the customer behavior fusion feature and the customer portrait weighted feature vector, and predict the customer's consumption behavior features in the next time window based on the feature correlation matrix;
[0180] The sixth unit is used to update the customer portrait feature set according to the consumption behavior characteristics and the customer behavior fusion characteristics, and determine personalized product recommendations and marketing strategies for customers based on the updated customer portrait feature set.
[0181] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including:
[0182] processor;
[0183] a memory for storing processor-executable instructions;
[0184] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0185] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0186] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0187] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A real-time customer profile dynamic update prediction method for retail scenarios, characterized by: include: Determine the customer profile feature set corresponding to customer behavior data in retail scenarios; Calculating feature importance scores according to information gain values of different customer profile features in the customer profile feature set in different time windows, and generating a customer profile weighted feature vector based on the feature importance scores; Using a sliding time window method to perform time series division on the weighted feature vector of the customer portrait, to obtain customer behavior feature sequences of multiple time windows; Performing a time series correlation analysis on the customer behavior feature sequences of the multiple time windows, calculating a dynamic correlation coefficient of the customer behavior feature sequences between adjacent time windows, and generating a customer behavior fusion feature with a time series dependency based on the dynamic correlation coefficient; Calculating a feature correlation matrix based on the customer behavior fusion feature and the customer portrait weighted feature vector, and predicting the customer's consumption behavior characteristics in the next time window based on the feature correlation matrix; The customer portrait feature set is updated according to the consumption behavior characteristics and the customer behavior fusion characteristics, and personalized product recommendations and marketing strategies are determined for the customer based on the updated customer portrait feature set.
2. The method according to claim 1, characterized in that Calculating feature importance scores according to information gain values of different customer profile features in the customer profile feature set in different time windows, and generating a customer profile weighted feature vector based on the feature importance scores, including: Dividing the customer portrait feature set into time windows according to preset time intervals to obtain customer portrait feature sequences for multiple time windows; Constructing an information entropy matrix for each customer portrait feature in the customer portrait feature sequence, wherein the information entropy matrix includes information entropy values of each customer portrait feature in different time windows; Based on the information entropy matrix, a multidimensional feature importance evaluation index is determined by calculating the rate of change of information entropy between adjacent time windows, wherein the multidimensional feature importance evaluation index reflects the sensitivity of customer profile features to changes in customer behavior; Performing hierarchical clustering on the customer profile features according to the multidimensional feature importance evaluation index to obtain a feature hierarchical clustering result; Setting a feature importance score based on the feature hierarchical clustering result, and dynamically adjusting the feature importance score using a time series decay function to generate a time series decay coefficient, wherein the time series decay coefficient is proportional to the feature fluctuation amplitude and inversely proportional to the feature change period; The time series attenuation coefficient and the customer portrait feature are weighted and calculated to generate a customer portrait weighted feature vector.
3. The method according to claim 2, characterized in that Based on the information entropy matrix, a multi-dimensional feature importance evaluation index is determined by calculating the rate of change of information entropy between adjacent time windows, including: Calculating an information entropy difference sequence between adjacent time windows based on the information entropy matrix, and performing wavelet multi-scale decomposition on the information entropy difference sequence to obtain multi-layer wavelet coefficients; A linear variation trend curve is obtained by fitting the low-frequency components of the multi-layer wavelet coefficients, and a nonlinear mutation curve is obtained by fitting the high-frequency components of the multi-layer wavelet coefficients; Based on the derivative of the linear change trend curve, the change rate and change acceleration of the customer profile feature are calculated, an adaptive decision threshold is constructed according to the change rate and change acceleration, and a feature gradual change trend indicator is output based on the adaptive decision threshold; constructing a mutation detection window based on the nonlinear mutation curve, calculating mutation feature parameters of the customer profile feature within the mutation detection window, and generating a feature mutation degree index based on the mutation feature parameters; The dynamic time warping algorithm is used to process the feature gradual trend index and the feature mutation degree index to obtain the temporal similarity characteristics of the customer portrait features at different time scales. The periodic change characteristics and sudden change characteristics of the features are extracted based on the temporal similarity characteristics to obtain a multidimensional feature importance evaluation index.
4. The method according to claim 1, wherein The sliding time window method is used to perform time series division on the weighted feature vector of the customer portrait to obtain customer behavior feature sequences of multiple time windows, including: A time series sliding window is constructed based on the weighted feature vector of the customer portrait, a time sensitivity matrix of features is calculated based on the time series sliding window, a key time scale is determined according to a singular value decomposition result of the time sensitivity matrix, and the key time scale is mapped to an initial window length and an initial sliding step size of the time series sliding window; Performing time series decomposition on the weighted feature vector of the customer portrait according to the initial window length and the initial sliding step size to obtain the change feature parameters of the customer behavior feature sequence; Based on the change characteristic parameters, a swarm intelligence optimization algorithm is used to optimize the initial window length and the initial sliding step size to obtain the optimal window parameters; Determining an overlapping interval between adjacent time windows using the optimal window parameters, calculating a continuous change value of a feature according to the overlapping interval, and determining a granularity of window division based on the continuous change value and the time sensitivity matrix; The features of the overlapping intervals are weightedly fused based on the granularity of the window division and the change characteristic parameters to obtain customer behavior feature sequences of multiple time windows.
5. The method according to claim 1, wherein Performing a temporal correlation analysis on the customer behavior feature sequences of the multiple time windows, calculating a dynamic correlation coefficient of the customer behavior feature sequences between adjacent time windows, and generating a customer behavior fusion feature with a temporal dependency relationship based on the dynamic correlation coefficient, including: Calculating a temporal adjacency relationship for the customer behavior feature sequences of the multiple time windows, calculating an attenuation distance between adjacent windows based on the temporal adjacency relationship, and constructing a temporal propagation attenuation coefficient and a feature correlation matrix based on the attenuation distance; Recursively and iteratively calculating the time series propagation attenuation coefficient and the characteristic correlation matrix, extracting a time series state change sequence, and generating a dynamic correlation coefficient based on the time series state change sequence; Constructing a local temporal attention score according to the dynamic correlation coefficient, weighting a feature correlation matrix using the local temporal attention score, and combining the weighted feature correlation matrix with a temporal propagation attenuation coefficient to generate a global attention vector; Based on the global attention vector, a temporal weight is assigned to each time window, the temporal weight is weightedly combined with the customer behavior feature sequence, and the long-range dependency information is extracted in combination with the dynamic correlation coefficient to generate a customer behavior fusion feature with temporal dependency.
6. The method according to claim 5, characterized in that Constructing a local temporal attention score according to the dynamic correlation coefficient, weighting the feature correlation matrix using the local temporal attention score, and combining the weighted feature correlation matrix with the temporal propagation attenuation coefficient to generate a global attention vector, including: Calculating a local similarity matrix of temporal features based on the dynamic correlation coefficient, constructing a transition probability matrix for the local similarity matrix, calculating a steady-state distribution of features based on the transition probability matrix, and using an entropy value of the steady-state distribution as a local temporal attention score; Constructing an attention gain function from the local temporal attention score, and performing a nonlinear transformation on the feature correlation matrix based on the attention gain function to obtain a weighted feature matrix with a temporal memory effect; Calculating feature importance distribution based on the weighted feature matrix, performing singular value decomposition, extracting feature subspaces corresponding to major singular values, constructing a time series propagation path in the feature subspace, and combining the time series propagation path with a time series propagation attenuation coefficient to generate a dynamic attenuation feature; An initial attention vector is constructed based on the dynamic attenuation feature, the cross-time window correlation of the feature is calculated using the initial attention vector, the dynamic attenuation feature is recursively updated based on the cross-time window correlation, and the updated dynamic attenuation feature is used as the global attention vector.
7. The method according to claim 1, characterized in that Calculating a feature correlation matrix based on the customer behavior fusion feature and the customer portrait weighted feature vector, and predicting the customer's consumption behavior features in the next time window based on the feature correlation matrix, including: Calculating a feature correlation matrix based on the customer behavior fusion feature and the customer portrait weighted feature vector, performing eigenvalue decomposition on the feature correlation matrix to obtain a feature importance vector, and constructing a time-varying weight coefficient based on the feature importance vector; Calculating the conditional transition probability of the feature using the time-varying weight coefficient, constructing a time series state transition matrix based on the conditional transition probability, and obtaining the optimal feature distribution parameters by maximizing the log-likelihood of the state transition; Extracting a periodic component from the optimal characteristic distribution parameter, separating the periodic component from the trend component, respectively calculating short-term fluctuation characteristics and long-term change characteristics, and generating a time series combination feature based on the short-term fluctuation characteristics and the long-term change characteristics; The conditional probability distribution between features is calculated using the time series combination features, a feature dependency graph is constructed based on the conditional probability distribution, and the state probabilities of feature nodes are iteratively calculated to predict the customer's consumption behavior characteristics in the next time window.
8. A real-time customer profile dynamic update prediction system for retail scenarios, used to implement the method according to any one of claims 1 to 7, characterized in that: include: The first unit is used to determine the customer profile feature set corresponding to customer behavior data in the retail scenario; The second unit is configured to calculate feature importance scores according to information gain values of different customer profile features in the customer profile feature set in different time windows, and generate a customer profile weighted feature vector based on the feature importance scores; The third unit is used to perform time series division on the weighted feature vector of the customer portrait using a sliding time window method to obtain customer behavior feature sequences of multiple time windows; a fourth unit configured to perform a temporal correlation analysis on the customer behavior feature sequences of the multiple time windows, calculate a dynamic correlation coefficient of the customer behavior feature sequences between adjacent time windows, and generate a customer behavior fusion feature with a temporal dependency relationship based on the dynamic correlation coefficient; A fifth unit is configured to calculate a feature correlation matrix based on the customer behavior fusion feature and the customer portrait weighted feature vector, and predict the customer's consumption behavior features in the next time window based on the feature correlation matrix; The sixth unit is used to update the customer portrait feature set according to the consumption behavior characteristics and the customer behavior fusion characteristics, and determine personalized product recommendations and marketing strategies for customers based on the updated customer portrait feature set.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Petrochemical area inspection system based on inspection robot
CN118656734A
Security propaganda and education recommendation method and system based on demand portrait and content label
CN118797173A
Customer portrait key data mining method and system based on space-time big data
CN118797542A
Visitor identification and multi-dimensional user portrait routing distribution method based on private domain traffic
CN119172298A
LLM-based client intention identification and response system, method and device, and medium
CN119808789A
Cited By
E-commerce operation platform user portrait generation method based on big data
CN121032556A