Consumption prediction method fusing graph wavelet transform and long short-term memory network

By integrating graph wavelet transform and long short-term memory network into a consumer forecasting method, an undirected weighted graph is constructed and low-frequency components are extracted to generate a fusion tensor. This solves the problems of fragmented data features and high computational complexity in consumer forecasting, and enables more accurate consumer behavior prediction and marketing strategy support.

CN120931322APending Publication Date: 2025-11-11SHANDONG INSPUR DIGITAL BUSINESS TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511035028.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing consumer forecasting methods struggle to effectively extract potential information from consumer behavior data, resulting in inaccurate predictions. Furthermore, they lack effective decomposition and correlation analysis of data features, leading to unstable model performance across different application scenarios.

Method used

We employ a method that combines graph wavelet transform and long short-term memory network. By constructing an undirected weighted graph with consumers as nodes, we perform feature decomposition and graph wavelet transform to extract low-frequency components. We then combine these components with consumer behavior data to generate a fusion tensor and use the long short-term memory network to predict consumption probability.

Benefits of technology

It enhances the ability to characterize the behavioral interaction patterns of consumer groups and individuals, strengthens the robustness and predictive comprehensiveness of the model, adapts to large-scale consumer data scenarios, reduces computational complexity, and supports differentiated marketing strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120931322A_ABST
    Figure CN120931322A_ABST
Patent Text Reader

Abstract

The invention discloses a consumption prediction method fusing graph wavelet transform and a long short-term memory network, which comprises the following steps: establishing an undirected weighted graph taking consumers as nodes according to acquired basic attribute data and time sequence behavior data of the consumers, the time sequence behavior data comprising browsing behavior data and consumption behavior data; according to the undirected weighted graph, obtaining a plurality of feature values and feature vectors through feature decomposition, sorting according to the feature values from small to large, selecting a plurality of corresponding feature vectors, and obtaining a low-frequency component through graph wavelet transformation; obtaining a time sequence component according to the consumption behavior data, generating a fusion tensor in combination with the low-frequency component of the corresponding node, and obtaining the possibility probability of consumer consumption through a long-short-term memory network. According to the method, the consumer undirected graph is constructed, the graph wavelet transform and the LSTM are fused, the problems of space-time splitting and long dependence in consumption prediction are solved through low-frequency feature extraction and fusion tensor generation, and the prediction precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of specific computational model technology, specifically relating to a consumption prediction method that integrates graph wavelet transform and long short-term memory network. Background Technology

[0002] With the rapid development of information technology, consumer forecasting, as a market operation model, is increasingly attracting the attention of various enterprises. Accurately predicting consumers' purchasing probability is of great significance for improving marketing efficiency, optimizing inventory management, and increasing corporate profits.

[0003] The evolution of consumer forecasting technology has consistently revolved around two main themes: increasing data complexity and evolving business needs. Early on, businesses primarily relied on basic statistical models for consumer forecasting. These methods were based on single-dimensional historical consumption data (such as purchase frequency and amount), extrapolating through linear assumptions or time series patterns. For example, linear models like ARIMA and SARIMA rely on linear assumptions and cannot capture non-linear consumption patterns (such as non-linear consumption surges triggered by promotional activities). Furthermore, logistic regression time series analysis cannot model group correlation effects among consumers.

[0004] As consumer behavior data becomes more multidimensional and dynamic, the limitations of traditional methods in separating spatiotemporal features are becoming increasingly apparent. Focusing only on time series features and ignoring spatial relationships between consumer groups (such as the transmission of consumption preferences among geographically proximate users) results in predictions that lack the ability to characterize the interaction between "group and individual" behaviors.

[0005] Based on this, graph-based consumer forecasting methods have emerged, which use graph neural networks to model consumer relationships to capture group associations. However, the global operations based on Laplacian matrix eigenvalue decomposition lead to an exponential increase in computational costs when processing large-scale consumer graphs, resulting in high computational complexity. This makes it difficult to handle large-scale heterogeneous consumer networks and also makes it difficult to balance macro-level consumption trends with micro-level individual differences.

[0006] However, a single model is difficult to handle graph-structured data (spatial correlation) and time-series data (dynamic behavior) simultaneously. There is an urgent need to develop a consumption forecasting method that integrates graph wavelet transform and long short-term memory networks to adapt to consumption forecasting based on multimodal data fusion. Summary of the Invention

[0007] This invention provides a consumer forecasting method that integrates graph wavelet transform and long short-term memory network to address the problem of inaccurate prediction results due to insufficient mining of potential information in consumer behavior data, as well as the problem of unstable model performance in different application scenarios due to the lack of effective decomposition and correlation analysis of data features.

[0008] The technical solution adopted in this invention is as follows:

[0009] A consumption forecasting method integrating graph wavelet transform and long short-term memory networks includes:

[0010] Based on the collected basic attribute data and time-series behavioral data of consumers, an undirected weighted graph with consumers as nodes is established, wherein the time-series behavioral data includes browsing behavior data and consumption behavior data.

[0011] Based on the undirected weighted graph, multiple eigenvalues ​​and eigenvectors are obtained through eigenvalue decomposition. Based on the eigenvalues, they are sorted from smallest to largest, and multiple corresponding eigenvectors are selected. Low-frequency components are obtained through graph wavelet transform.

[0012] Based on the consumer behavior data, a time-series component is obtained. Combined with the low-frequency component of the corresponding node, a fusion tensor is generated. Through a long short-term memory network, the probability of the consumer's consumption is obtained.

[0013] The consumption prediction method integrating graph wavelet transform and long short-term memory network described in this invention also includes the following additional technical features:

[0014] The basic attribute data, the browsing behavior data, and the consumption behavior data are specifically as follows:

[0015] The basic attribute data includes at least one of the following: the consumer's age, gender, region, membership level, and consumer preference tags;

[0016] The browsing behavior data includes at least one of the following: page dwell time, scroll depth, access frequency, and click hotspot distribution;

[0017] The consumer behavior data includes at least one of the following: purchase amount, purchase frequency, average order value, and product category distribution.

[0018] Construct an undirected weighted graph with consumers as nodes, specifically as follows:

[0019] Taking consumers as the node,

[0020] Based on the similarity of basic attributes and temporal behavior among consumers, similarity weights are obtained. Edges are then constructed based on these similarity weights.

[0021] Based on the nodes and edges, an undirected weighted graph is obtained;

[0022] The basic attribute similarity can be obtained at least through the cosine distance of the attribute vectors, and the behavioral correlation can be obtained at least through the Pearson correlation coefficient of the time-series vectors.

[0023] Based on the undirected weighted graph, multiple eigenvalues ​​and eigenvectors are obtained through eigenvalue decomposition, specifically:

[0024] Given a given node, the angle matrix is ​​obtained by summing the similarity weights of all edges connected to that node;

[0025] The similarity weight matrix is ​​obtained by considering the similarity of all edges connected to the node.

[0026] Based on the angle matrix and the similarity weight matrix, the graph Laplacian matrix is ​​obtained;

[0027] Based on the graph Laplacian matrix, multiple eigenvectors and corresponding eigenvalues ​​are obtained through eigenvalue decomposition.

[0028] Based on the eigenvalues, sort them from smallest to largest, and select multiple corresponding eigenvectors, specifically:

[0029] Based on the feature values, sort them from smallest to largest, and sequentially select multiple feature values ​​to obtain feature vectors corresponding to the multiple feature values;

[0030] The number of selected feature values ​​is determined based on the graph structure complexity, signal frequency domain distribution, or the periodicity of consumer behavior.

[0031] Based on the aforementioned consumer behavior data, the time-series component is obtained, specifically:

[0032] Based on the consumption behavior data, and according to the purchase amount, a historical consumption sequence is obtained through a sliding window, and the historical consumption sequence is normalized.

[0033] The sliding window includes the current time and the time interval before it, and the time interval is set according to the consumption cycle.

[0034] The temporal components are obtained, and combined with the low-frequency components of the corresponding nodes, a fusion tensor is generated, specifically as follows:

[0035] Based on the fusion tensor, the historical information retention parameters are obtained through the forgetting gate.

[0036] The current information filtering parameters are obtained through the input gate, the candidate consumption state is obtained through the hyperbolic tangent function, the historical consumption state is corrected by the historical information retention parameters, and the candidate consumption state is corrected by the current information filtering parameters to obtain the current consumption state.

[0037] The hidden state is obtained through the output gate. Combined with the current consumption state, the hidden attribute is obtained, and the probability of consumption is obtained through the hidden attribute.

[0038] The probability of obtaining consumption also includes:

[0039] The probability is corrected based on a preset external variable calibration factor;

[0040] The external variable calibration factor is set according to the intensity of the promotional activity and / or the seasonal index at the current moment.

[0041] The present invention also provides a storage medium,

[0042] The storage medium stores a computer program, which, when executed, implements the steps of the consumption prediction method based on the fusion graph wavelet transform and long short-term memory network.

[0043] The present invention further provides a processing apparatus, comprising:

[0044] Memory, used to store computer programs;

[0045] A processor is configured to implement the consumption prediction method of the fusion graph wavelet transform and long short-term memory network when executing the computer program.

[0046] Due to the adoption of the above technical solution, the beneficial effects achieved by this invention are as follows:

[0047] 1. This invention constructs an undirected weighted graph with consumers as nodes to achieve spatial association modeling and quantify the strength of associations between consumers. It reveals implicit associations between consumer groups, overcoming the fragmentation problem of traditional models relying solely on time-series features, and improving the ability to characterize the behavioral interaction patterns of "group-individual". It generates time-series components based on consumer behavior data, preserving the temporal evolution patterns of consumer behavior. It can capture the periodicity, short-term fluctuations, and long-term trends of consumers' historical consumption.

[0048] By employing eigenvalue decomposition and graph wavelet transform, low-frequency components (eigenvectors corresponding to the first few smallest eigenvalues) are extracted from the graph structure. These low-frequency components characterize the macro-level consumption patterns of consumer groups (such as regional commonalities and changes in overall purchasing power), enhancing the model's ability to predict long-term trends. Furthermore, they can filter out interference from occasional consumption events (such as impulsive purchases during promotions or large expenditures during festivals), thus strengthening the model's robustness.

[0049] Low-frequency components (spatial features) and temporal components (temporal features) are concatenated along time steps to generate a fused tensor, which serves as the input to the LSTM. Simultaneously, historical consumer behavior (temporal dimension) and group association (spatial dimension) are utilized to enhance the comprehensiveness of predictions. The consumption probability (p∈[0,1]) is obtained through LSTM mapping, supporting hierarchical prediction of future consumer consumption probabilities (high, medium, low), assisting enterprises in formulating differentiated marketing strategies (such as targeted discounts for high-probability users and reactivation for low-probability users).

[0050] Furthermore, by extracting features from local subgraphs, the computational complexity of graph structure processing is reduced, avoiding the bottleneck of global matrix operations in traditional spectral graph convolution. This makes it suitable for large-scale consumer data scenarios (such as millions of users) and improves the model's processing efficiency.

[0051] In summary, this invention solves the core problems in the field of consumer forecasting, such as the fragmentation of spatiotemporal features, inefficient graph structure processing, and long-term reliance on insufficient modeling, through the deep integration of graph wavelet transform and LSTM. Attached Figure Description

[0052] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:

[0053] Figure 1 This is a flowchart illustrating the consumption prediction method based on the fusion of graph wavelet transform and long short-term memory network according to one embodiment of the present invention. Detailed Implementation

[0054] To more clearly illustrate the overall concept of the present invention, a detailed description will be provided below with reference to the accompanying drawings and examples.

[0055] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0056] like Figure 1 As shown, a consumption prediction method integrating graph wavelet transform and long short-term memory network includes:

[0057] S100: Based on the collected basic attribute data and time-series behavior data of consumers, establish an undirected weighted graph with consumers as nodes, wherein the time-series behavior data includes browsing behavior data and consumption behavior data.

[0058] This step aims to quantify the strength of associations among consumers by constructing an undirected weighted graph with consumers as nodes, thereby revealing group-individual behavioral interaction characteristics that are not effectively represented by traditional models.

[0059] Some consumer forecasting models rely solely on time-series features (such as historical purchase records), neglecting spatial relationships between consumer groups (such as the transmission of regional preferences and the diffusion of social network behaviors). This step addresses this deficiency by using graph structure modeling, enhancing the ability to depict the interaction patterns between "groups" and individuals. By integrating multidimensional data on basic consumer attributes (such as age and region), browsing behavior (such as page dwell time), and consumption behavior (such as purchase amount), a unified association graph is constructed, providing structured input for subsequent graph wavelet transform and LSTM modeling.

[0060] It should be noted that each consumer is treated as a node in the graph, and edges are constructed based on the similarity weights between consumers. The larger the weight value, the stronger the connection between nodes. An undirected weighted graph containing consumer nodes and their associated edges is generated for subsequent low-frequency component extraction in graph wavelet transform.

[0061] By quantifying the strength of connections between consumers through graph structures (such as the transmission of preferences among geographically proximate users), we can uncover group behavior patterns overlooked by traditional models and reveal implicit connections. Furthermore, the construction of undirected weighted graphs focuses on direct connections between consumers. Through localization, it avoids the global matrix operation bottleneck of traditional spectral graph convolution, reducing computational complexity and adapting to large-scale data scenarios.

[0062] Furthermore, the output undirected weighted graph provides a mathematical basis for subsequent graph wavelet transform to extract low-frequency components (macroeconomic consumption trends) and high-frequency components (local anomalies). Moreover, by supplementing spatial correlation features through the graph structure, it complements the subsequent LSTM temporal modeling, providing multi-dimensional information support for consumption probability prediction.

[0063] S200: Based on the undirected weighted graph, multiple eigenvalues ​​and eigenvectors are obtained through eigenvalue decomposition. Based on the eigenvalues, they are sorted from smallest to largest, and multiple corresponding eigenvectors are selected. Low-frequency components are obtained through graph wavelet transform.

[0064] This step aims to extract the macro-level consumption trends of consumer groups by using the low-frequency components of graph wavelet transform, and to capture the global features of the consumer association graph (such as regional commonalities and changes in overall purchasing power), thus overcoming the fragmented problem of traditional models that rely solely on time series features.

[0065] By leveraging the sparse representation and localization analysis of graph wavelet transform to replace the global matrix operations of traditional spectral graph convolution, the complexity of graph structure processing is reduced, thus addressing the computational bottleneck of Graph Neural Networks (GNNs) in large-scale consumer data scenarios. Low-frequency components represent long-term trends in consumer behavior (such as seasonal consumption patterns), providing stable input for subsequent LSTM time-series modeling, enhancing the model's ability to characterize long-term dependencies, and improving the predictive model's adaptability to long-term consumption cycles.

[0066] It should be noted that a graph Laplacian matrix L can be constructed based on an undirected weighted graph, and eigenvalues ​​and corresponding eigenvectors can be obtained through the eigenvalue decomposition of the graph Laplacian matrix L.

[0067] The eigenvalues ​​are sorted from smallest to largest, and the eigenvectors corresponding to the k smallest eigenvalues ​​are selected. This preserves the low-frequency components (corresponding to smaller eigenvalues) to extract the global trend. Understandably, low-frequency components focus on macro trends (such as common regional consumption patterns), while high-frequency components capture local anomalies (such as occasional large purchases). By extracting low-frequency components, the interference of occasional consumption events (such as impulsive purchases during promotions) is filtered out, preserving the core trend of regular repurchase behavior. Furthermore, low-frequency components provide stable global feature input for the LSTM, enhancing the model's ability to model long-term consumption cycles (such as annual membership renewal patterns).

[0068] The eigenvectors are used as graph wavelet basis functions to perform multi-scale decomposition on the original consumer correlation graph signal. The original data is mapped from the vertex domain to the graph frequency domain through graph wavelet transform, and low-frequency components (corresponding to the projections of the first k eigenvectors) are extracted.

[0069] Traditional GNNs, based on spectral graph convolution, rely on global Laplacian matrix eigenvalue decomposition, resulting in computational complexity that increases exponentially with graph size, making them unsuitable for handling large-scale consumer data. This step, however, achieves sparse representation through local subgraph feature extraction, reducing redundant computations, lowering the computational cost of graph structure processing, significantly improving processing efficiency, and making it suitable for large-scale consumer data scenarios.

[0070] S300: Based on the consumer behavior data, obtain the time-series component, combine it with the low-frequency component of the corresponding node, generate a fusion tensor, and obtain the probability of the consumer's consumption through a long short-term memory network.

[0071] This step aims to combine the temporal components of consumers' historical consumption behavior with the low-frequency components (spatial features) of graph wavelets to generate a fusion tensor as the input to LSTM, thereby solving the problem of spatiotemporal feature fragmentation in traditional models and improving the ability to characterize consumer behavior patterns.

[0072] Consumers' historical consumption sequences (such as purchase amounts and frequencies over the past 36 months) are sliced ​​into time window matrices with a fixed window length (e.g., 12 months). The historical consumption sequences are then standardized (e.g., Z-score normalization) to eliminate differences in data units and improve model convergence efficiency.

[0073] The temporal components and low-frequency components are concatenated along the time step dimension to generate a fusion tensor. At each time step, the temporal features of the current time point are concatenated with the low-frequency components of the corresponding node to ensure that spatial features continuously influence the model's predictions in the time dimension.

[0074] Understandably, traditional models that rely solely on time series data (such as ARIMA) or graph structures (such as GNNs) cannot jointly model the temporal dynamics and group relationships of consumer behavior. This step, through the fusion of tensor design, achieves spatiotemporal joint modeling, significantly improving the comprehensiveness of predictions.

[0075] Among them, the time-series component preserves the time evolution pattern of consumer behavior (such as the surge caused by promotional activities), the low-frequency component supplements the macro trends of the group (such as regional common preferences), and suppresses the noise interference of occasional consumption events (such as large expenditures during festivals), thereby achieving multi-dimensional feature complementarity.

[0076] Based on the fusion tensor, it is processed by an LSTM network and mapped to the consumption probability p∈[0,1]. LSTM uses gating mechanisms (forget gate, input gate) to accurately filter historical information, effectively solving the problem of long-term dependency.

[0077] In a preferred embodiment of the present invention, the basic attribute data, the browsing behavior data, and the consumption behavior data specifically refer to:

[0078] The basic attribute data includes at least one of the following: the consumer's age, gender, region, membership level, and consumer preference tags;

[0079] The browsing behavior data includes at least one of the following: page dwell time, scroll depth, access frequency, and click hotspot distribution;

[0080] The consumer behavior data includes at least one of the following: purchase amount, purchase frequency, average order value, and product category distribution.

[0081] This implementation aims to construct a multi-dimensional consumer feature space. Basic attribute data (age, gender, region, etc.) reflects the static characteristics of consumers, providing a basic framework for group association modeling. Browsing behavior data (page dwell time, click hotspot distribution, etc.) quantifies users' dynamic interactive behavior, revealing potential consumption intentions. Consumption behavior data (purchase amount, frequency, etc.) directly characterizes users' actual spending power and preferences, providing core input for prediction.

[0082] For basic attribute data, structured data such as age, gender, region (accurate to province, city, and county), and membership level are extracted from user registration information and the membership system. Consumer preference tags (such as "high-frequency repurchase" and "price-sensitive") are generated using clustering algorithms (such as K-means) or a rule engine.

[0083] For browsing behavior data, front-end tracking technology is used to record behavioral metrics such as page dwell time, scroll depth, and access frequency. Click hotspot distribution is quantified using heatmap tools (such as Google Analytics) to measure the areas of user attention.

[0084] For consumer behavior data, indicators such as purchase amount, frequency, and average order value are extracted from the transaction system and further subdivided by product category (necessities, luxury goods, etc.).

[0085] Understandably, traditional models rely solely on time-series data (such as ARIMA), neglecting the correlation effects among consumer groups. This invention fuses attribute and behavioral data to construct an undirected weighted graph, revealing implicit correlations such as the transmission of preferences among geographically proximate users and the diffusion of social network behaviors. Attribute labels (such as "price-sensitive") supplement the deficiencies in behavioral data, improving the predictive robustness for new users or scenarios with missing data.

[0086] This implementation method enhances the comprehensiveness of predictions by integrating basic attributes, browsing behavior, and consumer behavior data in multiple dimensions, and by jointly analyzing static attributes, dynamic behaviors, and group association characteristics. It is the core input of consumer prediction methods and directly affects the depth of the model's characterization of consumer behavior and the accuracy of business decisions.

[0087] As a preferred embodiment of the present invention, an undirected weighted graph with consumers as nodes is established, specifically as follows:

[0088] Taking consumers as the node,

[0089] Based on the similarity of basic attributes and temporal behavior among consumers, similarity weights are obtained. Edges are then constructed based on these similarity weights.

[0090] Based on the nodes and edges, an undirected weighted graph is obtained;

[0091] The basic attribute similarity can be obtained at least through the cosine distance of the attribute vectors, and the behavioral correlation can be obtained at least through the Pearson correlation coefficient of the time-series vectors.

[0092] Traditional models (such as logistic regression and ARIMA) rely solely on time-series features, neglecting spatial relationships among consumer groups (such as the transmission of regional preferences and the diffusion of social network behaviors). This implementation aims to quantify the similarity of attributes and behaviors among consumers by constructing an undirected weighted graph, revealing the "group-individual" behavioral interaction patterns that traditional models have not effectively represented.

[0093] In the diagram, each consumer is an independent node and needs to integrate data from multiple sources (such as membership systems, e-commerce platform behavior logs, and geographic location information) to ensure the comprehensiveness of node attributes.

[0094] After obtaining the basic attribute similarity, consumer attributes (such as age, gender, income, and consumption preference labels) are transformed into vectors, and the cosine distance between each pair is calculated. If the attribute vector is x...i and x j Then the cosine distance,

[0095]

[0096] The smaller the distance (i.e., the higher the cosine similarity), the closer the attributes are, and the greater the edge weight.

[0097] By obtaining temporal behavioral similarity, a temporal vector is generated based on the consumer's historical behavior (such as consumption amount, frequency, and category distribution), and the Pearson correlation coefficient between each pair is calculated.

[0098] If the time series vector is y i and y j Then the Pearson correlation coefficient,

[0099]

[0100] The higher the correlation coefficient (i.e. the more consistent the behavioral patterns), the greater the edge weight.

[0101] We perform weight fusion to obtain edge weights.

[0102]

[0103] Attribute similarity (cosine distance) reflects the matching degree of static features and is suitable for long-term stable group segmentation (such as regional consumer groups). Behavioral correlation (Pearson correlation coefficient) captures the consistency of dynamic behavior and is suitable for short-term trend prediction (such as promotion-sensitive users). Weights are dynamically calculated based on statistical indicators (cosine distance, Pearson correlation coefficient) to avoid subjective bias. Through weighted fusion, both static features and dynamic behaviors are taken into account, avoiding the limitations of a single dimension (such as the potential for noise interference from relying solely on behavior), and providing a more comprehensive characterization of consumer relationships.

[0104] In undirected graphs, consumer relationships are symmetrical, and the weights of weighted edges reflect the strength of these relationships. High-weighted edges precisely connect consumers with similar attributes and behaviors, forming stable core groups (such as high-net-worth user clusters). Low-weighted edges filter out occasional associations (such as one-time joint purchases), reducing noise interference. Using adjacency lists or adjacency matrices to represent the graph facilitates efficient computation of subsequent graph algorithms.

[0105] This implementation method solves the problems of incomplete consumer relationship modeling and coarse weight design in the prior art by constructing an undirected weighted graph and combining the dual similarity calculation of attributes and behaviors.

[0106] In a preferred embodiment of the present invention, multiple eigenvalues ​​and eigenvectors are obtained through eigenvalue decomposition based on the undirected weighted graph, specifically as follows:

[0107] Given a given node, the angle matrix is ​​obtained by summing the similarity weights of all edges connected to that node;

[0108] The similarity weight matrix is ​​obtained by considering the similarity of all edges connected to the node.

[0109] Based on the angle matrix and the similarity weight matrix, the graph Laplacian matrix is ​​obtained;

[0110] Based on the graph Laplacian matrix, multiple eigenvectors and corresponding eigenvalues ​​are obtained through eigenvalue decomposition.

[0111] The core objective of this implementation method is to extract low-frequency features (such as group commonalities and macro consumption patterns) from the consumer relationship graph through the eigenvalue decomposition of the graph Laplace matrix, providing a mathematical basis for subsequent consumer behavior prediction, group segmentation, or pattern analysis.

[0112] Construct the degree matrix and the diagonal matrix. The diagonal element D ij This is the degree of node i (i.e., the sum of the similarity weights of all edges connected to that node).

[0113] Constructing an adjacency matrix Where A ij =ω ij , where represents the edge weight between nodes i and j.

[0114] Constructing the Graph Laplace Matrix Defined as,

[0115] L = DW.

[0116] In this graph, the degree matrix D reflects the local connectivity strength (total weight) of each node; the adjacency matrix A reflects the direct associations between nodes (similarity weight). The Laplacian matrix L combines both to reflect the overall structural characteristics of the graph (such as connectivity and diffusion ability).

[0117] Performing eigenvalue decomposition on the Laplacian matrix L yields the eigenvalues ​​λ. k and its corresponding eigenvector u k .

[0118] Sort according to eigenvalues, that is, arrange the eigenvalues ​​in ascending order of size, λ1≤λ2≤…≤λ N Low-frequency features are extracted, and the eigenvectors u (k << N) corresponding to the k smallest eigenvalues ​​are selected to form a low-dimensional embedding matrix U for subsequent analysis. By retaining the first k eigenvectors, the computational complexity of the subsequent model is significantly reduced.

[0119] Furthermore, the eigenvector corresponding to the minimum eigenvalue reflects the overall structure of the graph (such as regional commonalities and group macro-behavior), which is suitable for long-term trend modeling, avoids the impact of abnormal fluctuations on consumption forecasts, and improves forecasting performance.

[0120] This implementation method extracts low-frequency features from the consumer relationship graph through eigenvalue decomposition of the graph Laplacian matrix, thus solving the problems of incomplete graph structure analysis and coarse feature extraction in the prior art.

[0121] In a preferred embodiment of this implementation, multiple corresponding feature vectors are selected based on the feature values, sorted from smallest to largest, specifically as follows:

[0122] Based on the feature values, sort them from smallest to largest, and sequentially select multiple feature values ​​to obtain feature vectors corresponding to the multiple feature values;

[0123] The number of selected feature values ​​is determined based on the graph structure complexity, signal frequency domain distribution, or the periodicity of consumer behavior.

[0124] This embodiment aims to optimize computational efficiency and model performance by dynamically adjusting the number of selected feature values ​​while preserving key information about the graph structure.

[0125] The complexity of a graph structure can be evaluated by quantifying its complexity using metrics such as the number of nodes N, edge density, or clustering coefficient C.

[0126] For low-complexity graphs (such as sparse graphs), select fewer feature values ​​(e.g., the first m = log N) to avoid overfitting local noise. Conversely, for high-complexity graphs (such as dense graphs), select more feature values ​​(e.g., the first m = log N). (One), retaining richer global structural information.

[0127] Analyze the frequency domain distribution of the signal, and use graphical Fourier transform to analyze the frequency domain energy distribution of the signal (e.g., the proportion of low-frequency energy E). low For low-frequency dominant scenarios (such as long-term consumer behavior trends), only the eigenvectors corresponding to the top k smallest eigenvalues ​​(k << N) are retained, focusing on macro-level patterns. For high-frequency significant scenarios (such as short-term promotional response fluctuations), more eigenvalues ​​are retained (e.g., k = argmax). k (E low ≥90%·E total This ensures that high-frequency details are preserved.

[0128] Consumer behavior cyclical modeling identifies behavioral cyclicalities (e.g., weekly cyclicality for fresh produce, monthly cyclicality for home appliances) by using historical consumption data (e.g., purchase frequency, repurchase cycle). For short-cycle behaviors (e.g., weekly repurchases), a number of features matching the frequency is selected (e.g., m=5, corresponding to a smooth pattern of 5 purchases per week). For long-cycle behaviors (e.g., quarterly demand), more features are selected (e.g., m=10, covering fluctuations over a longer time span). Selecting the number of features corresponding to the cycle optimizes prediction performance.

[0129] The number of eigenvalues ​​is dynamically adjusted based on the graph structure, signal characteristics, and behavioral patterns to avoid a crude "one-size-fits-all" approach and ensure the scientific nature of the method.

[0130] This embodiment solves the problem of "one-size-fits-all" approach in existing spectral analysis by dynamically selecting the number of feature values, achieving a balance between accuracy and efficiency.

[0131] In a preferred embodiment of the present invention, a time-series component is obtained based on the consumer behavior data, specifically as follows:

[0132] Based on the consumption behavior data, and according to the purchase amount, a historical consumption sequence is obtained through a sliding window, and the historical consumption sequence is normalized.

[0133] The sliding window includes the current time and the time interval before it, and the time interval is set according to the consumption cycle.

[0134] The core objective of this implementation is to extract time-series components with periodic characteristics from consumer behavior data through sliding window and normalization processing, providing high-quality input data for subsequent consumption forecasting, behavior pattern recognition, or resource scheduling.

[0135] The sliding window contains the current time and the time interval before it. The length of the time interval is determined by the consumption cycle (e.g., a weekly cycle is set to 7 days, and a monthly cycle is set to 30 days).

[0136] The dynamic window size is set based on the consumption cycle of the product category (e.g., weekly cycle for fresh produce, monthly cycle for home appliances). For example, in short-cycle scenarios (e.g., daily necessities), the window size T = 7 (covering one week). In long-cycle scenarios (e.g., holiday products), the window size T = 30 (covering one month).

[0137] The step size is usually set to 1 (sliding daily) to ensure the continuity of the time series. If it is necessary to reduce data redundancy, the step size can be increased appropriately (e.g., step size = 3, sliding once every 3 days).

[0138] Using purchase amount as the core indicator, a time series y is constructed. t =[y1,y2,…,yT ], where y T This represents the total purchase amount on day T.

[0139] Apply a sliding window to the time series to generate time series components X. i =[y i-T+1 ,y i-T+2 ,…,y i The consumption amount is mapped to a uniform range (such as [0,1] or [-1,1]) by using Min-Max normalization or Z-Score normalization.

[0140] The temporal components are combined with the low-frequency components of the corresponding nodes to generate a fused tensor.

[0141]

[0142] Where N represents the number of samples, T is the length of the time window, D is the dimension of the time series component, and K is the dimension of the low-frequency component.

[0143] The low-frequency component of the wavelet, serving as a key structural information representation of the data, has a dimension of K and reflects the global trend and stable components of consumer data in the frequency domain. Through feature fusion with the time-series component, the input data incorporates both dynamic information from the time dimension and structural feature information, providing a richer feature representation for subsequent calculations of future consumer spending probabilities.

[0144] This implementation solves the problems of insufficient periodic modeling and dimensional differences caused by fixed windows in traditional methods by using dynamic sliding windows and normalization processing.

[0145] In a preferred embodiment of the present invention, the temporal components are obtained, and a fused tensor is generated by combining the low-frequency components of the corresponding nodes, specifically as follows:

[0146] Based on the fusion tensor, the historical information retention parameters are obtained through the forgetting gate.

[0147] The current information filtering parameters are obtained through the input gate, the candidate consumption state is obtained through the hyperbolic tangent function, the historical consumption state is corrected by the historical information retention parameters, and the candidate consumption state is corrected by the current information filtering parameters to obtain the current consumption state.

[0148] The hidden state is obtained through the output gate. Combined with the current consumption state, the hidden attribute is obtained, and the probability of consumption is obtained through the hidden attribute.

[0149] The core objective of this implementation is to achieve accurate prediction of consumption probability by dynamically modeling consumer behavior through the fusion of tensor information from time-series and low-frequency components and the combination of LSTM gating mechanisms (forget gate, input gate, output gate).

[0150] The generated fusion tensor is input into an LSTM network, and first passes through a forget gate to obtain parameters for preserving historical information.

[0151] f t =σ(W f ·[X t ,h t-1 ]+b f ),

[0152] Determine the proportion of information to retain from historical consumption data, f t ∈[0,1].

[0153] The current information filtering parameters are obtained through the input gate:

[0154] i t =σ(W i ·[X t ,h t-1 ]+b i ),

[0155] Used to filter the proportion of information that needs to be updated in the current consumption status (i) t (∈[0,1]). The forget gate and input gate of LSTM are adapted to the dynamic update requirements of long-term and short-term information, respectively, improving the flexibility of the model.

[0156] Furthermore, candidate consumption states are obtained through the hyperbolic tangent function.

[0157]

[0158] By generating candidate consumption states using the hyperbolic tangent function (tanh), the gradient vanishing problem of the traditional Sigmoid function can be alleviated.

[0159] The current consumption status is obtained by updating based on the candidate consumption status.

[0160]

[0161] Furthermore, the hidden state can be obtained through the output gate.

[0162] o t =σ(W o ·[X fusion,t ,h t-1 ]+b o ),

[0163] Control the hidden state through the output gate to adapt to sudden market changes (such as promotional activities and a sharp increase in demand during holidays).

[0164] Furthermore, combine the current consumption status to obtain hidden attributes.

[0165] h t = o t ⊙tanh(C t )

[0166] Where W is the weight matrix, b is the bias vector, σ represents the Sigmoid activation function, and ⊙ represents element-wise multiplication operation.

[0167] Input the hidden attribute h t into the fully connected layer and output the consumption possibility probability p through the Softmax activation function.

[0168] This embodiment solves the problem that long-term trends and short-term fluctuations cannot be modeled collaboratively in traditional consumption prediction models by integrating tensors and the LSTM gating mechanism.

[0169] As a preferred embodiment of this embodiment, obtaining the consumption possibility probability further includes:

[0170] Calibrate the possibility probability according to a preset external variable calibration factor;

[0171] Among them, the external variable calibration factor is set according to the intensity of the promotional activity and / or the seasonal index at the current moment.

[0172] The core purpose of this embodiment is to dynamically correct the consumption possibility probability output by the model by introducing external variable calibration factors (such as the intensity of promotional activities and the seasonal index), and solve the prediction deviation problem caused by ignoring external environmental changes (such as seasonal fluctuations and promotional activities) in traditional prediction methods.

[0173] Generate an external variable calibration factor, quantify the current promotional intensity (such as discount rate, advertising investment, coupon coverage rate) through the intensity of the promotional activity. Through the seasonal index, a periodic fluctuation index calculated based on historical data.

[0174] Obtain the promotional intensity factor α,

[0175]

[0176] For example, if the current discount rate is 50% while the historical average is 30%, then α = 1.67, indicating a significant increase in promotional intensity.

[0177] Obtain the seasonal index factor β,

[0178]

[0179] For example, if the seasonal index for the current month (such as December) is 150% (higher than the long-term average of 100%), then β = 1.5, indicating that demand for that month is significantly higher than the average level.

[0180] Comprehensive calibration factor γ,

[0181] γ = w1·α + w2·β.

[0182] The weights w1 and w2 are dynamically adjusted according to the business scenario (e.g., w1>w2 during promotional periods, w2>w1 during non-promotional periods).

[0183] The predicted probability p is obtained by integrating calibration factors. model Correction,

[0184] p final =p model ·(1+γ).

[0185] By adjusting the predicted probability in real time using external variable calibration factors, the static model's response to unforeseen factors is compensated for. Combining the intensity of promotional activities with seasonal indices overcomes the limitation of the trend-seasonal index method relying solely on trend values, and matching it with consumption scenarios improves the accuracy of predictions during peak seasons or promotional periods. This allows for adjustments to procurement plans based on corrected probabilities (such as increasing inventory before peak seasons) and enables the delivery of personalized promotional information to high-probability users, supporting refined operations.

[0186] This embodiment addresses the problem of traditional consumer forecasting models' insufficient response to promotional activities and seasonal fluctuations by introducing an external variable calibration factor.

[0187] The present invention also provides a storage medium,

[0188] The storage medium stores a computer program, which, when executed, implements the steps of the consumption prediction method based on the fusion graph wavelet transform and long short-term memory network.

[0189] Therefore, this storage medium can achieve any effect of the consumption prediction method that combines graph wavelet transform and long short-term memory network, which will not be elaborated here.

[0190] The present invention further provides an electronic device, comprising:

[0191] Memory, used to store computer instructions;

[0192] The processor is configured to implement the consumption prediction method of the fusion graph wavelet transform and long short-term memory network when executing the computer instructions.

[0193] Therefore, this electronic device can achieve any effect of the consumption prediction method that integrates graph wavelet transform and long short-term memory network, which will not be elaborated here.

[0194] For any parts not mentioned in this invention, existing technologies can be used or referenced.

[0195] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0196] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.

Claims

1. A consumption forecasting method integrating graph wavelet transform and long short-term memory network, characterized in that, include: Based on the collected basic attribute data and time-series behavioral data of consumers, an undirected weighted graph with consumers as nodes is established, wherein the time-series behavioral data includes browsing behavior data and consumption behavior data. Based on the undirected weighted graph, multiple eigenvalues ​​and eigenvectors are obtained through eigenvalue decomposition. Based on the eigenvalues, they are sorted from smallest to largest, and multiple corresponding eigenvectors are selected. Low-frequency components are obtained through graph wavelet transform. Based on the consumer behavior data, a time-series component is obtained. Combined with the low-frequency component of the corresponding node, a fusion tensor is generated. Through a long short-term memory network, the probability of the consumer's consumption is obtained.

2. The consumption prediction method integrating graph wavelet transform and long short-term memory network according to claim 1, characterized in that, The basic attribute data, the browsing behavior data, and the consumption behavior data are specifically as follows: The basic attribute data includes at least one of the following: the consumer's age, gender, region, membership level, and consumer preference tags; The browsing behavior data includes at least one of the following: page dwell time, scroll depth, access frequency, and click hotspot distribution; The consumer behavior data includes at least one of the following: purchase amount, purchase frequency, average order value, and product category distribution.

3. The consumption prediction method integrating graph wavelet transform and long short-term memory network according to claim 1, characterized in that, Construct an undirected weighted graph with consumers as nodes, specifically as follows: With consumers as the node, Based on the similarity of basic attributes and temporal behavior among consumers, similarity weights are obtained. Edges are then constructed based on these similarity weights. Based on the nodes and edges, an undirected weighted graph is obtained; The basic attribute similarity can be obtained at least through the cosine distance of the attribute vectors, and the behavioral correlation can be obtained at least through the Pearson correlation coefficient of the time-series vectors.

4. The consumption prediction method integrating graph wavelet transform and long short-term memory network according to claim 1, characterized in that, Based on the undirected weighted graph, multiple eigenvalues ​​and eigenvectors are obtained through eigenvalue decomposition, specifically: Given a given node, the angle matrix is ​​obtained by summing the similarity weights of all edges connected to that node; The similarity weight matrix is ​​obtained by considering the similarity of all edges connected to the node. Based on the angle matrix and the similarity weight matrix, the graph Laplacian matrix is ​​obtained; Based on the graph Laplacian matrix, multiple eigenvectors and corresponding eigenvalues ​​are obtained through eigenvalue decomposition.

5. The consumption prediction method integrating graph wavelet transform and long short-term memory network according to claim 4, characterized in that, Based on the eigenvalues, sort them from smallest to largest, and select multiple corresponding eigenvectors, specifically: Based on the feature values, sort them from smallest to largest, and sequentially select multiple feature values ​​to obtain feature vectors corresponding to the multiple feature values; The number of selected feature values ​​is determined based on the graph structure complexity, signal frequency domain distribution, or the periodicity of consumer behavior.

6. The consumption prediction method integrating graph wavelet transform and long short-term memory network according to claim 1, characterized in that, Based on the aforementioned consumer behavior data, the time-series component is obtained, specifically: Based on the consumption behavior data, and according to the purchase amount, a historical consumption sequence is obtained through a sliding window, and the historical consumption sequence is normalized. The sliding window includes the current time and the time interval before it, and the time interval is set according to the consumption cycle.

7. The consumption prediction method integrating graph wavelet transform and long short-term memory network according to claim 1, characterized in that, The temporal components are obtained, and combined with the low-frequency components of the corresponding nodes, a fusion tensor is generated, specifically as follows: Based on the fusion tensor, the historical information retention parameters are obtained through the forgetting gate. The current information filtering parameters are obtained through the input gate, the candidate consumption state is obtained through the hyperbolic tangent function, the historical consumption state is corrected by the historical information retention parameters, and the candidate consumption state is corrected by the current information filtering parameters to obtain the current consumption state. The hidden state is obtained through the output gate. Combined with the current consumption state, the hidden attribute is obtained, and the probability of consumption is obtained through the hidden attribute.

8. The consumption prediction method integrating graph wavelet transform and long short-term memory network according to claim 7, characterized in that, The probability of obtaining consumption also includes: The probability is corrected based on a preset external variable calibration factor; The external variable calibration factor is set according to the intensity of the promotional activity and / or the seasonal index at the current moment.

9. A storage medium, characterized in that, The storage medium stores a computer program that, when executed, implements the steps of the consumption prediction method that integrates graph wavelet transform and long short-term memory network as described in any one of claims 1 to 8.

10. A processing apparatus, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the consumption prediction method fusion graph wavelet transform and long short-term memory network as described in any one of claims 1 to 8 when executing the computer program.