User consumption behavior analysis method and system fusing multi-source data

CN122529784APending Publication Date: 2026-08-07BEIJING ZHONGCHAN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING ZHONGCHAN INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2026-06-24
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

然而,传统方法常采用固定的权重或简单的拼接策略,无法依据用户当前的具体状态自动调整各数据源的置信度

Benefits of technology

[0016]本发明融合行为交互数据、历史事务数据和关系网络数据,解决了单一数据源信息片面性问题,显著提升预测模型输入信息丰度与可靠性。通过识别用户决策演进阶段并计算进度量化指标,使模型动态调整分析粒度,大幅提高了预测的实时性与准确性,尤其适应快速变化的消费场景。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122529784A_ABST
    Figure CN122529784A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data analysis, and more particularly to a user consumption behavior analysis method and system fusing multi-source data, which identifies a decision evolution stage and calculates a progress quantification index by acquiring user multi-source data, constructs a decision trajectory sequence to convert a decision path feature vector, and updates a memory state by using a gate update mechanism, generates a contribution weight distribution to fuse data sources, splices the stage fusion feature vector obtained after the data source representation is weighted and fused with the memory state, generates an ideal consumption behavior prediction result based on the stage fusion feature vector, and generates a realistic prediction result by combining user constraint conditions to output a weighted combination, which can accurately predict user consumption behavior and improve personalized recommendation effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data analysis technology, and in particular to a method and system for analyzing user consumption behavior by integrating multi-source data. Background Technology

[0002] In the field of user consumption behavior analysis, existing technologies generally rely on single data sources or simple concatenation of multi-source data for modeling. For example, a common practice is to collect users' historical transaction records, browsing and click logs, or publicly available information from social networks, train independent predictive models for each, and then combine the outputs of each model through voting or weighted averaging. Some improvements introduce early feature-level fusion, directly concatenating numerical features from different sources into a high-dimensional vector input to a classifier, or using attention mechanisms to weight behavioral sequences within a fixed window to attempt to capture short-term changes in user interests. Furthermore, models based on recurrent neural networks or graph neural networks have also been used to mine temporal dependencies and social connections, but these are typically only modeled on a limited range of data types.

[0003] These conventional approaches have significant flaws. On the one hand, user consumption decisions often go through multiple evolutionary stages (such as cognition, consideration, evaluation, and purchase), while current methods mostly treat users as static entities, using a globally uniform feature representation to process all behaviors, ignoring the differences in user intent and changes in behavioral patterns at different decision-making stages. This leads to the model being prone to misjudgment when users are in the early exploration stage, and lacking sensitivity to later decision-making motivations, making it unable to accurately predict the turning point of consumption behavior at specific moments.

[0004] On the other hand, existing fusion mechanisms lack the ability to dynamically adapt to the contribution of different data sources. When users are at different decision-making stages or face different scenarios, the importance of behavioral interaction data, historical transaction data, and relationship network data to the prediction results changes significantly. However, traditional methods often employ fixed weights or simple concatenation strategies, failing to automatically adjust the confidence levels of each data source based on the user's current specific state. This rigid fusion approach introduces noisy data, dilutes the effectiveness of key information, and reduces the stability and accuracy of the prediction. Summary of the Invention

[0005] The embodiments of the present invention provide a method and system for analyzing user consumption behavior by integrating multi-source data, which can solve the problems in the prior art.

[0006] A first aspect of the present invention provides a method for analyzing user consumption behavior by fusing multi-source data, comprising: The system acquires multi-source user data, including behavioral interaction data, historical transaction data, and relationship network data; based on the behavioral interaction data, it identifies the user's current decision-making evolution stage and calculates a progress quantification index representing the user's completion rate within the current decision-making evolution stage; A decision trajectory sequence is constructed and converted into a decision path feature vector. When a user's decision evolution stage transition is detected, a gating update mechanism is used to update the memory state vector. The gating update mechanism configures the forget gate and input gate differently according to the stage transition type. Based on the decision path feature vector and the progress quantification index, a contribution weight distribution for each data source is generated. According to the contribution weight distribution, the feature representations of the multi-source heterogeneous data are weighted and fused using the decision path feature vector as the query vector to generate a weighted fused data source representation. After concatenation with the memory state vector, a stage fusion feature vector is output. Ideal consumption behavior prediction results are generated based on stage-fused feature vectors, and real consumption behavior prediction results are generated by combining them with user-constrained conditions. The weighted combination then generates the final consumption behavior prediction output.

[0007] Based on the behavioral interaction data, the user's current decision-making evolution stage is identified, and a progress quantification index representing the user's completion level within the current decision-making evolution stage is calculated, including: The behavioral interaction data is subjected to temporal and semantic encoding. The temporal and semantic encoding results are then input into a stage recognition network to identify the user's current decision-making evolution stage. Extract the set of characteristic behaviors corresponding to the current decision evolution stage from the behavioral interaction data, count the completion status of each behavior in the set of characteristic behaviors, and calculate the completion degree of the characteristic behaviors in the stage; The frequency of cross-stage behaviors in the behavioral interaction data is statistically analyzed, and a time decay factor is calculated based on the time interval between the occurrence time of each behavior and the current time. The time decay factor, the completion degree of the stage characteristic behavior, and the frequency of cross-stage behavior are weighted and fused to generate a quantitative progress index that represents the user's completion degree in the current decision evolution stage.

[0008] Constructing a decision trajectory sequence and converting it into a decision path feature vector includes: Record the user's dwell time, execution behavior patterns, and progress metrics at each stage of the decision-making process, and organize them into a decision trajectory sequence; A stage identifier embedding is assigned to the stage identifier of each decision evolution stage in the decision trajectory sequence, a duration embedding is assigned to the dwell time, a progress embedding is assigned to the progress quantification index, and a behavior pattern embedding is assigned to the execution behavior pattern. The stage identifier embedding, duration embedding, progress embedding, and behavior pattern embedding are combined into a token representation sequence. The token representation sequence is input into a self-attention encoding network, which calculates the association weights between tokens in the token representation sequence and outputs a decision path feature vector.

[0009] When a user's decision evolution stage transition is detected, a gating update mechanism is used to update the memory state vector. This gating update mechanism configures the forget gate and input gate differently based on the stage transition type, including: The initialization memory state vector is embedded based on the decision path feature vector and the stage identifier of the first decision evolution stage; Real-time monitoring of changes in the decision evolution stage; when a user is detected to have transitioned from a previous decision evolution stage to the current decision evolution stage, the stage feature representations of the previous and current decision evolution stages are extracted, the feature difference vector is calculated, and the stage transition type is determined. Calculate the stage span between the previous decision evolution stage and the current decision evolution stage, and calculate the transition intensity index based on the stage span and the feature difference vector; The stage transition type, the transition intensity index, the progress quantification index of the preceding decision evolution stage, and the progress quantification index of the current decision evolution stage are input into the gating parameter generation network to dynamically generate the forget gate weight matrix and the input gate weight matrix; The memory state vector is weighted using the forget gate weight matrix to generate a retained memory component, and the decision path feature vector and progress quantification index of the current decision evolution stage are used to generate an acceptance memory component based on the input gate weight matrix. The retained memory component and the accepted memory component are added together to generate an updated memory state vector.

[0010] Based on the decision path feature vector and the progress quantification index, a contribution weight distribution for each data source is generated. Using the decision path feature vector as the query vector, the feature representations of the multi-source heterogeneous data are weighted and fused according to the contribution weight distribution to generate a weighted fused data source representation. This representation is then concatenated with the memory state vector to output a stage fusion feature vector, including: Extract the stage-related feature components corresponding to the current decision evolution stage from the feature vector of the decision path, and concatenate them with the progress quantification index to generate a stage condition vector; The stage condition vector is input into the contribution allocation network, and the contribution allocation network calculates contribution weight values ​​for the behavioral interaction data, historical transaction data, and relationship network data respectively. The contribution weight values ​​represent the prior importance of the corresponding data source in the current decision evolution stage. The decision path feature vector is transformed into a query vector through query projection transformation, and the feature representations of the behavioral interaction data, historical transaction data, and relational network data are transformed into corresponding key vectors through key projection transformation. Calculate and normalize the inner product between the query vector and the key vector corresponding to each data source to generate the query matching degree of each data source. The query matching degree represents the semantic association strength between the corresponding data source and the current decision path. The contribution weight of each data source is multiplied by the corresponding query matching degree to generate a fusion weight. Based on the fusion weight, the feature representations of each data source are weighted and summed to generate a weighted fusion data source representation. The weighted fusion data source representation is concatenated with the updated memory state vector to output the stage fusion feature vector.

[0011] The stage condition vector is input into the contribution allocation network, and the contribution weight values ​​are calculated for the behavioral interaction data, historical transaction data, and relationship network data through the contribution allocation network, including: The stage condition vector is decomposed into stage semantic components and progress state components. The stage semantic components represent the type characteristics of the current decision evolution stage, and the progress state components represent the completion degree characteristics of the current decision evolution stage. In the contribution allocation network, behavioral interaction data branches, historical transaction data branches, and relationship network data branches are set up. The stage semantic components are input into each branch respectively, and the stage semantic components are transformed by the independent parameters of each branch to generate the stage-sensitive representation of the corresponding data source. Based on the progress state components, a progress control factor is generated. Then, the stage-sensitive representation of each data source is multiplied with the progress control factor to generate the control-post representation of the corresponding data source. The maintenance phase contribution memory stores the contribution weight values ​​of each data source in the historical decision evolution phase. Based on the phase identifier of the current decision evolution phase, the historical contribution pattern vector is obtained by querying the contribution memory. The modified representations of the behavioral interaction data, the modified representations of the historical transaction data, the modified representations of the relationship network data, and the historical contribution pattern vector are input into the fusion decision layer to calculate the contribution weight values ​​of each data source. The calculation results are then associated with the current stage identifier and stored in the stage contribution memory.

[0012] Ideal consumer behavior prediction results are generated based on stage-fused feature vectors, and actual consumer behavior prediction results are generated by combining them with user-constrained conditions. These are then weighted and combined to generate the final consumer behavior prediction output, which includes: The stage-fused feature vector is input into the ideal prediction network to generate ideal consumer behavior prediction results; user constraint features are extracted and concatenated with the stage-fused feature vector, then input into the reality prediction network to generate reality consumer behavior prediction results. The historical sequence of the progress quantification index is encoded to calculate the probability that a user will experience a stage transition within a preset time window; when the transition probability exceeds a trigger threshold, a weighted interpolation is performed on the prediction results of the current stage and the prediction results of the next stage based on the transition probability; Based on the current decision-making evolution stage, ideal prediction weights and actual prediction weights are dynamically generated. The prediction results of ideal consumption behavior and actual consumption behavior are then weighted and combined to generate the final consumption behavior prediction output. Collect comparison data between the final consumption behavior prediction output and the actual user behavior results, calculate the prediction error, and update the parameters of the ideal prediction network, the actual prediction network, and the dynamically weighted network through gradient backpropagation based on the prediction error.

[0013] A second aspect of the present invention provides a user consumption behavior analysis system that integrates multi-source data, comprising: The acquisition unit is used to acquire multi-source data of the user, including behavioral interaction data, historical transaction data, and relationship network data. A stage unit is used to identify the current decision-making evolution stage of the user based on the behavioral interaction data, and to calculate a progress quantification index that represents the user's completion rate in the current decision-making evolution stage. The update unit is used to construct a decision trajectory sequence and convert it into a decision path feature vector. When a user's decision evolution stage transition is detected, a gating update mechanism is used to update the memory state vector. The gating update mechanism is configured with a forget gate and an input gate differently according to the stage transition type. The fusion unit is used to generate a contribution weight distribution of each data source based on the decision path feature vector and the progress quantification index, and to perform weighted fusion of the feature representations of the multi-source heterogeneous data according to the contribution weight distribution and the decision path feature vector as the query vector to generate a weighted fused data source representation, which is then concatenated with the memory state vector to output a stage fusion feature vector. The prediction unit is used to generate ideal consumer behavior prediction results based on the stage fusion feature vector, and combine the actual consumer behavior prediction results generated by user constraints with weighted combinations to generate the final consumer behavior prediction output.

[0014] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0015] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0016] This invention integrates behavioral interaction data, historical transaction data, and relationship network data, solving the problem of information bias caused by a single data source and significantly improving the richness and reliability of the input information for the prediction model. By identifying the stages of user decision-making evolution and calculating progress quantification indicators, the model dynamically adjusts the granularity of analysis, greatly improving the real-time performance and accuracy of predictions, especially adapting to rapidly changing consumption scenarios.

[0017] The decision trajectory sequence is converted into a decision path feature vector, fully preserving the sequential information and evolutionary patterns of the user's decision logic. Combined with the contribution weight distribution generated by the progress quantification index, adaptive ranking and dynamic adjustment of the importance of multi-source data are achieved. The weighted fusion of data sources effectively highlights the influence of key data while suppressing redundancy and noise interference, greatly enhancing the model's robustness. The gating update mechanism configures the forget gate and input gate differently according to the stage transition type, flexibly adjusting the memory state when the user's decision path jumps, ensuring the continuity and consistency of the state vector, avoiding historical information confusion and forgetting, and enabling the model to cope with complex and ever-changing decision chain structures.

[0018] The method outputs a high-dimensional, refined representation of a user's current state by concatenating the stage-fused feature vector and the memory state vector, perfectly integrating the structured features of multi-source data with the dynamics of time series data. The ideal consumption behavior prediction generated based on this objectively reflects the user's potential needs, while the realistic consumption behavior prediction, generated by combining constraints such as budget, time, and preferences, closely aligns with actual scenarios and limitations. The two are dynamically balanced through weighted combination, ultimately outputting a prediction result that is both forward-looking and feasible. This method significantly improves the accuracy of user consumption behavior prediction and effectively enhances conversion rates and user satisfaction in applications such as personalized recommendations, precision marketing, and customer lifecycle management, demonstrating significant technological advancement and industrial application value. Attached Figure Description

[0019] Figure 1 A flowchart illustrating a method for analyzing user consumption behavior by integrating multi-source data; Figure 2 Flowchart for adaptive fusion of data sources. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0022] Figure 1 This is a flowchart illustrating the user consumption behavior analysis method that integrates multi-source data according to an embodiment of the present invention. The user consumption behavior analysis method that integrates multi-source data includes: Acquire user data from multiple sources, including behavioral interaction data, historical transaction data, and relationship network data; Behavioral interaction data refers to the time-series record of real-time interactive behaviors generated by users on the platform, such as browsing, clicking, searching, favoriting, adding to cart, and commenting; historical transaction data refers to structured transaction information such as users' past completed purchase orders, return and exchange records, consumption amounts, and category preferences; relationship network data refers to graph-structured data composed of users' friend relationships, following relationships, group affiliations, and social interaction behaviors in social networks. These three types of data characterize users' consumption characteristics from different dimensions: behavioral interaction data reflects users' current intentions, historical transaction data reflects users' long-term preferences, and relationship network data reflects social influencing factors. Based on the behavioral interaction data, the user's current decision-making evolution stage is identified, and a progress quantification index representing the user's completion rate within the current decision-making evolution stage is calculated; Based on the behavioral interaction data, the user's current decision-making evolution stage is identified, and a progress quantification index representing the user's completion rate within the current decision-making evolution stage is calculated; A decision trajectory sequence is constructed and converted into a decision path feature vector. When a user's decision evolution stage transition is detected, a gating update mechanism is used to update the memory state vector. The gating update mechanism configures the forget gate and input gate differently according to the stage transition type. Based on the decision path feature vector and the progress quantification index, a contribution weight distribution for each data source is generated. According to the contribution weight distribution, the feature representations of the multi-source heterogeneous data are weighted and fused using the decision path feature vector as the query vector to generate a weighted fused data source representation. After concatenation with the memory state vector, a stage fusion feature vector is output. Ideal consumption behavior prediction results are generated based on stage-fused feature vectors, and real consumption behavior prediction results are generated by combining them with user-constrained conditions. The weighted combination then generates the final consumption behavior prediction output.

[0023] In one optional implementation, based on the behavioral interaction data, the user's current decision-making evolution stage is identified, and a progress quantification index characterizing the user's completion level within the current decision-making evolution stage is calculated, including: The behavioral interaction data is subjected to temporal and semantic encoding. The temporal and semantic encoding results are then input into a stage recognition network to identify the user's current decision-making evolution stage. Extract the set of characteristic behaviors corresponding to the current decision evolution stage from the behavioral interaction data, count the completion status of each behavior in the set of characteristic behaviors, and calculate the completion degree of the characteristic behaviors in the stage; The frequency of cross-stage behaviors in the behavioral interaction data is statistically analyzed, and a time decay factor is calculated based on the time interval between the occurrence time of each behavior and the current time. The time decay factor, the completion degree of the stage characteristic behavior, and the frequency of cross-stage behavior are weighted and fused to generate a quantitative progress index that represents the user's completion degree in the current decision evolution stage.

[0024] For example, when encoding behavioral interaction data, it is necessary to simultaneously capture the temporal distribution patterns and semantic content features of user behavior. In the temporal encoding stage, the sequence of behavioral events generated by the user within a time window is arranged according to their occurrence time. A combination of positional encoding and recurrent neural networks is used to map the occurrence time of each behavioral event into a continuous temporal position embedding vector. This vector is then concatenated with the type embedding vector of the behavioral event itself and input into the temporal encoder to extract the temporal distribution pattern of the behavioral sequence. By modeling the time intervals between adjacent behaviors, the temporal encoder can perceive changes in the rhythm of user behavior. For example, the consumption intention reflected by a user's intensive browsing of a certain type of product page in a short period is significantly different from that of a single visit after a long time interval; the temporal encoding result can effectively distinguish between these two patterns. In the semantic encoding stage, the content description of each behavioral event (such as the product category browsed, search keywords, clicked promotional information, etc.) is converted into a semantic vector through a pre-trained language model or domain-specific term embedding matrix. Subsequently, a multi-head self-attention mechanism is used to model the association between semantic vectors at different positions in the behavioral sequence, outputting a semantic encoding result that reflects the user's interest bias and intention tendency. The temporal encoding results and semantic encoding results are concatenated along the feature dimension and used together as the input to the stage recognition network.

[0025] The stage recognition network employs a multi-classification architecture, consisting of three stacked fully connected layers. The first layer maps the concatenated encoded vector to a hidden dimension of 512, activates it with ReLU, and then inputs it into the second layer, which has a dimension of 256 and is also activated with ReLU. The third layer, the output layer, has the same number of nodes as the predefined number of decision evolution stages. The decision evolution stages are divided based on typical patterns of user consumption behavior, typically into several categories such as the demand emergence stage, information gathering stage, comparison and evaluation stage, purchase decision stage, and post-purchase feedback stage. During training, the stage recognition network uses historical behavior sequences labeled with stage tags as supervision signals and optimizes network parameters using the cross-entropy loss function, enabling the network to accurately output the user's current decision evolution stage category based on the concatenated encoded vector. In actual inference, the stage recognition network outputs the probability distribution of each stage, taking the stage with the highest probability as the current recognition result, while retaining the probability distribution itself for subsequent stage transition detection.

[0026] After identifying the user's current decision-making stage, a set of characteristic behaviors corresponding to that stage is extracted from the behavioral interaction data. This set of characteristic behaviors is a predefined set of typical behavior types for each decision-making stage. For example, in the comparison and evaluation stage, the set of characteristic behaviors might include behaviors such as "viewing product comparison pages," "reading user reviews," "saving multiple similar products," and "checking price history." For each behavior type in the set of characteristic behaviors, it is determined whether the user has completed the behavior within the current stage's time window. The completion status is represented as a binary variable: 1 for completed and 0 for incomplete. Stage Characteristic Behavior Completion Rate Defined as the ratio of the number of completed behaviors in the feature behavior set to the total number of behaviors in the set, i.e. ,in This indicates the number of feature behaviors that have been completed. This represents the total number of behaviors in the characteristic behavior set. This metric directly reflects the user's task execution level at the current stage. The closer the value is to 1, the more fully the user has performed at that stage, and the more likely a stage transition is to occur.

[0027] Cross-stage behavior refers to behaviors that belong to the characteristic behavior set of other decision-making evolution stages but appear within the time window of the current stage. When calculating the frequency of cross-stage behavior, all behaviors within the current time window are categorized according to their respective stages, and the proportion of behaviors not belonging to the current stage is calculated to obtain the cross-stage behavior frequency. The occurrence of cross-stage behaviors indicates a non-linear characteristic in the user's decision-making process. For example, a user in the comparison and evaluation stage may exhibit a large number of behaviors belonging to the purchase decision stage, potentially suggesting a rapid decision-making process. When calculating the frequency of cross-stage behaviors, it is necessary to consider the impact of the time distance between the occurrence of each behavior and the current time on the effectiveness of the behavior. Let the time interval between the occurrence of a certain behavior and the current time be... Time decay factor Calculated using the exponential decay method, i.e. ,in The decay rate hyperparameter controls how quickly the influence of historical behavior diminishes over time. Time interval. The larger the value, the greater the corresponding time decay factor. The smaller the value, the lower the contribution of the behavior to the judgment at the current stage. In practical applications, The value can be adjusted according to the timeliness of behavior in different consumption scenarios. For example, in the fast-moving consumer goods (FMCG) category, the user decision-making cycle is relatively short. The value is relatively large, and in the case of high-priced durable goods, the user decision-making cycle is relatively long. The value is relatively small.

[0028] The time decay factor, the completion degree of stage characteristic behaviors, and the frequency of cross-stage behaviors are weighted and fused to generate quantitative progress indicators. The weighted fusion calculation method is as follows: ,in This represents the weighted average of the time decay factors corresponding to all actions within the current time window. , , These are the fusion weights corresponding to the three components, satisfying... The fusion weights can be determined through regression training on historical labeled data, or manually configured based on prior business knowledge. Progress quantification metrics. The value ranges from 0 to 1, with a higher value indicating a higher degree of completion by the user in the current decision-making process. When the preset threshold is exceeded, the subsequent stage transition detection logic can be triggered to determine whether the user is about to enter the next decision evolution stage.

[0029] Progress Quantitative Indicators It not only describes the user's current stage completion status but also serves as a crucial input for generating subsequent contribution weight distributions. Within different ranges of progress quantification metrics, the importance of different data sources for predicting consumer behavior varies. For example, when stage completion is low, long-term preference information provided by historical transaction data is more valuable, while when stage completion is high, the immediate intent reflected by current behavioral interaction data should be given higher weight. By inputting the progress quantification metrics and decision path feature vectors into the weight generation network, dynamic adaptive adjustment of the contribution of multi-source data can be achieved, making the fusion result more accurately reflect the user's true consumption behavior tendencies at specific decision-making stages.

[0030] In one alternative implementation, a decision trajectory sequence is constructed and converted into a decision path feature vector, including: Record the user's dwell time, execution behavior patterns, and progress metrics at each stage of the decision-making process, and organize them into a decision trajectory sequence; A stage identifier embedding is assigned to the stage identifier of each decision evolution stage in the decision trajectory sequence, a duration embedding is assigned to the dwell time, a progress embedding is assigned to the progress quantification index, and a behavior pattern embedding is assigned to the execution behavior pattern. The stage identifier embedding, duration embedding, progress embedding, and behavior pattern embedding are combined into a token representation sequence. The token representation sequence is input into a self-attention encoding network, which calculates the association weights between tokens in the token representation sequence and outputs a decision path feature vector.

[0031] For example, after acquiring multi-source user data and completing the identification of decision evolution stages and calculation of progress quantification indicators, it is necessary to structure the behavioral information accumulated by the user in each decision evolution stage into a sequence representation that can be processed by the subsequent network. To this end, three core types of user information are recorded in each decision evolution stage: dwell time, execution behavior pattern, and progress quantification indicator. Dwell time reflects the total time spent by the user in that stage, which can be calculated by the difference between the stage entry time and the stage exit time (or the current time); execution behavior pattern describes the combination of user behavior types and their frequency distribution in that stage, such as the combination pattern of clicks, favorites, and add-to-cart behaviors in the browsing stage; progress quantification indicator is a numerical value reflecting the user's completion rate in that stage, calculated by the aforementioned steps. These three types of information are arranged according to the chronological order of the user's experience in each stage, forming a decision trajectory sequence. Each sequence element corresponds to the user's complete state record in a certain decision evolution stage, containing four fields: stage identifier, dwell time, execution behavior pattern, and progress quantification indicator.

[0032] For each sequence element in the decision trajectory sequence, embedding mapping is performed on its four fields to uniformly transform discrete or continuous original features into a fixed-dimensional dense vector representation. Stage identifier embedding maps discrete stage categories to low-dimensional dense vectors using a learnable embedding matrix. Different decision evolution stages (such as cognition stage, interest stage, intention stage, purchase stage, etc.) correspond to different embedding vectors, enabling the network to distinguish semantic differences between stages. Duration embedding maps continuous dwell time values ​​to fixed-dimensional vectors after binning or linear projection to capture differences in user time investment at different stages. For example, shorter dwell time may reflect quick decision-making or insufficient interest, while longer dwell time may reflect deep comparison or hesitation. Progress embedding maps progress quantification indicators to vector representations through linear projection or piecewise embedding, encoding completion information within a stage into the token representation, enabling subsequent attention mechanisms to perceive the user's progress at each stage. Behavioral pattern embedding vectorizes the execution behavior patterns. This can be achieved by summing the embedding vectors of each behavior type within the stage according to frequency weights, or by extracting the representation vectors of the behavior patterns through a pre-trained behavior sequence encoder, thereby compressing the user's behavioral combination information within the stage into a fixed-dimensional vector.

[0033] After completing the embedding mapping for each field, the stage identifier embedding, duration embedding, progress embedding, and behavior pattern embedding corresponding to the same sequence element are combined to form the token representation of that sequence element. The combination method can employ vector concatenation followed by a linear projection layer, concatenating the four types of embedding vectors into a high-dimensional vector and then compressing it to a unified token dimension through a linear transformation. ,in The token representation's dimensionality is a hyperparameter; alternatively, element-wise addition can be used, requiring the four types of embedding vectors to have the same dimension, and multi-type feature information is fused through summation. The above token representation construction process is performed sequentially on all sequence elements in the decision trajectory sequence to obtain a token representation of length [length missing]. The tokens represent sequences, where Let each token represent the number of stages contained in the decision trajectory sequence, and let each token represent a dimension. The vector.

[0034] The token representation sequence is input into a self-attention encoding network, which calculates the association weights between tokens in the sequence using a multi-head self-attention mechanism, thereby capturing the dependencies between different decision-making evolution stages. The self-attention encoding network takes the token representation sequence as input and calculates the association weights between tokens in the sequence for each token. The token and the first Attention score between tokens It is obtained by calculating the dot product of the query vector and the key vector, i.e. ,in For the first A query vector for each token. For the first The key vector of each token. The dimension of the key vector, divided by The purpose is to prevent the gradient from vanishing due to excessively large dot product values. The attention scores for all key tokens are normalized using softmax to obtain the attention weight distribution. Then, the value vectors of each token are weighted and summed according to the attention weights to obtain the nth... The updated context representation of each token. The multi-head attention mechanism performs the above computation in parallel on multiple independent attention heads. Each attention head uses an independent query, key, and value projection matrix to capture the correlation information between tokens from different representation subspaces. Finally, the outputs of each attention head are concatenated and fused into a representation of a unified dimension through linear projection.

[0035] Self-attention encoding networks consist of multiple stacked self-attention layers. Each layer contains a multi-head self-attention sublayer and a feedforward neural network sublayer. Layer normalization and residual connections are applied before and after each sublayer to alleviate the vanishing gradient problem in deep networks and accelerate convergence. In self-attention encoding networks, to preserve the positional information of tokens in the sequence, positional encoding vectors are superimposed when the input token represents the sequence. Positional encoding can employ fixed sine / cosine functions or learnable positional embeddings, enabling the network to distinguish semantic differences when the same stage appears at different historical positions.

[0036] After multiple layers of self-attention encoding, the network outputs a context representation sequence of the same length as the input sequence, where the output vector at each position has incorporated the association information from all other tokens in the sequence. To aggregate the sequence-level context representation into a single decision path feature vector, a special aggregation token (similar to the [CLS] token in BERT) can be inserted at the beginning of the sequence. After self-attention encoding, the output vector corresponding to this aggregation token is taken as the decision path feature vector. Alternatively, average pooling or weighted pooling can be performed on the representation vectors of all tokens in the output sequence, and the pooling result is used as the decision path feature vector. The final decision path feature vector has the following dimension: It comprehensively encodes the user's stage type, dwell time, behavior pattern and progress completion information at each stage of decision evolution, as well as the temporal dependencies between stages, providing a structured sequence-level feature input for subsequent calculation of data source contribution weight distribution and generation of weighted fusion data source representation based on decision path feature vectors.

[0037] In one optional implementation, when a user's decision evolution stage transition is detected, a gating update mechanism is used to update the memory state vector. This gating update mechanism configures the forget gate and input gate differently based on the stage transition type, including: The initialization memory state vector is embedded based on the decision path feature vector and the stage identifier of the first decision evolution stage; Real-time monitoring of changes in the decision evolution stage; when a user is detected to have transitioned from a previous decision evolution stage to the current decision evolution stage, the stage feature representations of the previous and current decision evolution stages are extracted, the feature difference vector is calculated, and the stage transition type is determined. Calculate the stage span between the previous decision evolution stage and the current decision evolution stage, and calculate the transition intensity index based on the stage span and the feature difference vector; The stage transition type, the transition intensity index, the progress quantification index of the preceding decision evolution stage, and the progress quantification index of the current decision evolution stage are input into the gating parameter generation network to dynamically generate the forget gate weight matrix and the input gate weight matrix; The memory state vector is weighted using the forget gate weight matrix to generate a retained memory component, and the decision path feature vector and progress quantification index of the current decision evolution stage are used to generate an acceptance memory component based on the input gate weight matrix. The retained memory component and the accepted memory component are added together to generate an updated memory state vector.

[0038] For example, the initialization of the memory state vector relies on two core inputs: the decision path feature vector and the stage identifier embedding of the first decision evolution stage. The stage identifier embedding is a learnable dense vector mapping of the discrete identifiers of the user's initial decision stage (such as "information browsing stage," "comparison and filtering stage," etc.). The mapping dimension is consistent with the dimension of the decision path feature vector, thus supporting concatenation or additive fusion operations between the two. After concatenating the decision path feature vector with the stage identifier embedding of the first stage, it is compressed to the memory state dimension through a linear projection layer. The initial memory state vector is obtained. This initialization method ensures that the memory state already carries the global structural information of the user's decision path and the semantic information of the current stage at the starting point, laying an effective initial state foundation for subsequent gating updates.

[0039] As users continuously generate behavioral interaction data, it is necessary to monitor in real time whether their decision-making evolution stage changes. Specifically, whenever a new behavioral event arrives, the type of the event is matched with the characteristic behavior set of the current stage, and the dynamic changes in progress quantification indicators are used to determine whether the stage transition conditions are met. Once a user is detected to have transitioned from a previous decision-making evolution stage to the current decision-making evolution stage, the stage feature representations of each stage are immediately extracted. The stage feature representation is constructed by embedding the stage identifier and concatenating it with the aggregated representation of all behavioral events within that stage, reflecting the semantic category of that stage and the actual distribution of user behavior within that stage. Let the previous stage feature representation be... The characteristics of the current stage are represented as follows: Then the feature difference vector Defined as: Feature difference vector The direction and magnitude of the equations together characterize the degree of semantic shift between two adjacent decision-making stages. Based on this, further analysis... L2 norm normalization is performed, and the feature difference vector is then subjected to type-aware weighted correction based on the category information of the stage transition type (such as "sequential advancement", "cross-stage jump", "stage regression", etc.) to obtain the corrected difference vector for subsequent calculations. The stage transition type is determined by comparing the relative size of the previous stage number and the current stage number, as well as the number of stages traversed: if the current stage number is exactly 1 greater than the previous stage number, it is determined to be sequential advancement; if it traverses multiple stages, it is determined to be a stage jump; if the current stage number is less than the previous stage number, it is determined to be a stage rollback.

[0040] Stage span Defined as the absolute value of the difference between the current stage number and the previous stage number, i.e. ,in and These are the position numbers of the current stage and the preceding stage within the predefined stage sequence, respectively. (Transition intensity index) Taking into account both the stage span and the magnitude of the feature difference vector, the calculation method is as follows: ;in This represents the L2 norm of the modified difference vector. The larger the value, the more drastic the change in the user's decision-making state, and the more significant the adjustment to the memory state vector is required. A smaller value indicates a relatively smooth phase transition and that more historical memory should be preserved. The introduction of the transition intensity index allows the gating parameters to adaptively respond to phase transition events of different intensities, avoiding the problem of insufficient expression of fixed gating parameters when facing diverse transition patterns.

[0041] Gated parameter generation network uses one-hot encoded vectors of stage transition type Intensity of transfer index (Scalar expanded to vector), progress quantification indicators for the preceding decision-making evolution stage And quantitative indicators of progress in the current decision-making evolution stage As joint inputs, they are concatenated to form the gated input vector. ;in A vector of all ones, used to convert scalars The network is expanded to the same dimension as the other components for concatenation. The gated parameter generation network consists of two fully connected layers and a ReLU activation function, ultimately outputting forget gate weight matrices. and input gate weight matrix Both weight matrices are constrained to the (0,1) interval by the Sigmoid activation function to ensure that the gated values ​​have probabilistic semantics. Compared with the fixed-structure gating computation method in traditional LSTM, this dynamic generation mechanism can more finely configure the forget gate and input gate according to the specific semantics and intensity of the stage transition, thereby achieving a more reasonable trade-off between "how much history should be forgotten" and "how much new information should be accepted".

[0042] Retain memory components The current memory state vector is obtained by using the forget gate weight matrix. We obtain the following by performing element-wise weighted summation: ;in This represents element-wise multiplication. When the transition severity... When the value is large, the gated parameter generation network tends to output a smaller value. The value of historical memory is greatly diminished when the transition between stages is smooth. Approaching a value of 1, historical memory is fully preserved. Accepting the weight of memory. The information for the current stage is then generated by weighting the input gate weight matrix. The information for the current stage is derived from the decision path feature vector of the current stage. Quantitative indicators of current stage progress After splicing, the data is compressed to the memory state dimension via linear transformation. Candidate memory vectors are obtained. Then multiply it element-wise with the input gate weight matrix: ; will retain memory components With the acceptance of memory components Perform addition to obtain the updated memory state vector. : Updated memory state vector This will serve as the initial memory state for the next stage transition detection, participating in subsequent gating update iterations. Through this mechanism, the memory state vector can continuously accumulate effective historical information throughout the user's decision-making evolution process, while flexibly adjusting the retention ratio of historical information at key stage transition nodes, ultimately providing a memory representation rich in temporal evolution semantics for subsequent weighted fusion and consumer behavior prediction.

[0043] In one optional implementation, a contribution weight distribution for each data source is generated based on the decision path feature vector and the progress quantification index. Then, based on the contribution weight distribution and using the decision path feature vector as the query vector, the feature representations of the multi-source heterogeneous data are weighted and fused to generate a weighted fused data source representation. This representation is then concatenated with the memory state vector to output a stage fusion feature vector, including: Extract the stage-related feature components corresponding to the current decision evolution stage from the feature vector of the decision path, and concatenate them with the progress quantification index to generate a stage condition vector; The stage condition vector is input into the contribution allocation network, and the contribution allocation network calculates contribution weight values ​​for the behavioral interaction data, historical transaction data, and relationship network data respectively. The contribution weight values ​​represent the prior importance of the corresponding data source in the current decision evolution stage. The decision path feature vector is transformed into a query vector through query projection transformation, and the feature representations of the behavioral interaction data, historical transaction data, and relational network data are transformed into corresponding key vectors through key projection transformation. Calculate and normalize the inner product between the query vector and the key vector corresponding to each data source to generate the query matching degree of each data source. The query matching degree represents the semantic association strength between the corresponding data source and the current decision path. The contribution weight of each data source is multiplied by the corresponding query matching degree to generate a fusion weight. Based on the fusion weight, the feature representations of each data source are weighted and summed to generate a weighted fusion data source representation. The weighted fusion data source representation is concatenated with the updated memory state vector to output the stage fusion feature vector.

[0044] Combination Figure 2 The adaptive data source fusion flowchart illustrates the process. After obtaining the decision path feature vector and progress quantification indicators, it is necessary to effectively fuse information from multi-source heterogeneous data to generate a stage-fused feature vector that comprehensively reflects the user's current decision-making status. The core of the entire fusion process lies in: using prior information from the current decision evolution stage to assign initial importance weights to each data source, and dynamically adjusting the actual contribution ratio of each data source through data-driven semantic matching. Only by multiplying these two factors can a comprehensive fusion weight that takes into account both prior knowledge and real-time semantics be formed.

[0045] Extract stage-related feature components corresponding to the current decision evolution stage from the decision path feature vector. The dimension of the decision path feature vector is... This involves a comprehensive encoding of the entire decision trajectory sequence, but the components at different positions do not contribute equally to the representation of the current stage. By indexing the position of the current stage in the sequence and extracting the corresponding local feature components, a dimension of [dimensional value missing] is obtained. The phase-related feature component focuses on the path context information of the current phase. This phase-related feature component is then compared with the progress quantification index. Concatenate along the feature dimension to obtain the dimension. Phase condition vector Quantitative indicators of progress It is a scalar whose value reflects the degree of completion of the user in the current decision evolution stage. It is directly concatenated to the end of the stage-related feature components, so that the stage condition vector carries both stage path context and stage progress information, providing richer condition input for the subsequent contribution allocation network.

[0046] Contribution allocation network reception phase condition vector As input, it outputs the contribution weight values ​​of each data source. The contribution allocation network consists of two fully connected layers; the first layer... Mapping to hidden dimensions The first layer introduces non-linearity through the ReLU activation function; the second layer maps the hidden representation to a 3-dimensional output vector, corresponding to three data sources: behavioral interaction data, historical transaction data, and relationship network data. Finally, after Softmax normalization, the contribution weight values ​​of each of the three data sources are obtained. , , ,satisfy The contribution weight value represents the prior importance of the corresponding data source at the current stage of decision-making evolution: for example, when users are in the information gathering stage and the progress quantification index is low, behavioral interaction data often receives a high contribution weight; while when users enter the decision confirmation stage and the progress quantification index is close to 1, the contribution weight of historical transaction data and relationship network data usually increases significantly, reflecting the dominant role of social influence and historical preferences in the final decision.

[0047] While generating contribution weights, it's also necessary to calculate the semantic association strength between each data source and the current decision path, i.e., the query matching degree, using an attention mechanism. The decision path feature vector is then transformed using a query projection matrix. Perform a linear transformation to generate a dimension of query vector The characteristics of the behavioral interaction data are represented separately. Characteristic representation of historical transaction data Feature representation of relational network data Through their respective independent key projection transformation matrices , , Perform a linear transformation to generate the corresponding key vector. , , All dimensions .in For each data source feature representation dimension, is the dimensional hyperparameter of the attention space. Using independent key projection matrices instead of shared matrices allows features from different modalities to retain their respective modal characteristics when projected into the attention space, avoiding semantic confusion caused by forcibly sharing the projection space.

[0048] Calculate query vector The inner product with each key vector, divided by Scale the result to obtain the raw attention score. , , ,in , .right , , Perform Softmax normalization to obtain the query matching degree. , , ,satisfy Query matching degree measures the semantic alignment between the features of each data source and the current decision path from a data-driven perspective, complementing the prior importance represented by the contribution weight value: the contribution weight value reflects prior knowledge at the stage level, while query matching degree reflects dynamic semantic associations at the instance level.

[0049] The contribution weights of each data source are multiplied element-wise with their corresponding query matching scores to generate the final fusion weight. ,in To ensure that the sum of the fusion weights still satisfies the normalization constraint, for , , Normalization is performed to obtain the normalized fusion weights. The feature representations of the three types of data sources are weighted and summed based on normalized fusion weights to generate a weighted fusion data source representation. : ,in The dimension is This fusion mechanism, which combines prior and dynamic weighting, can adaptively adjust the actual contributions of each data source at different decision-making stages, avoiding the information mismatch problem that occurs when switching stages in a fixed-weight fusion scheme.

[0050] Representing the data source of weighted fusion With the updated memory state vector Concatenate along the feature dimension to obtain the dimension. The concatenated vector is then mapped to the target dimension through a linear projection layer. The output stage fuses feature vectors. Memory state vector It carries historical evolutionary information across stages, while the weighted fusion of data sources represents... This concentrates on reflecting the multi-source heterogeneous information of the current stage. After splicing the two together and then performing linear projection, the stage fusion feature vector can simultaneously contain historical memory and current multi-source information in a single representation space, providing a more complete feature foundation for subsequent consumer behavior prediction.

[0051] In one optional implementation, the stage condition vector is input into a contribution allocation network, and the contribution weight values ​​are calculated for the behavioral interaction data, historical transaction data, and relationship network data through the contribution allocation network, including: The stage condition vector is decomposed into stage semantic components and progress state components. The stage semantic components represent the type characteristics of the current decision evolution stage, and the progress state components represent the completion degree characteristics of the current decision evolution stage. In the contribution allocation network, behavioral interaction data branches, historical transaction data branches, and relationship network data branches are set up. The stage semantic components are input into each branch respectively, and the stage semantic components are transformed by the independent parameters of each branch to generate the stage-sensitive representation of the corresponding data source. Based on the progress state components, a progress control factor is generated. Then, the stage-sensitive representation of each data source is multiplied with the progress control factor to generate the control-post representation of the corresponding data source. The maintenance phase contribution memory stores the contribution weight values ​​of each data source in the historical decision evolution phase. Based on the phase identifier of the current decision evolution phase, the historical contribution pattern vector is obtained by querying the contribution memory. The modified representations of the behavioral interaction data, the modified representations of the historical transaction data, the modified representations of the relationship network data, and the historical contribution pattern vector are input into the fusion decision layer to calculate the contribution weight values ​​of each data source. The calculation results are then associated with the current stage identifier and stored in the stage contribution memory.

[0052] For example, the stage condition vector undergoes a structured decomposition process before entering the contribution allocation network. The stage condition vector is composed of two parts: the first half corresponds to the stage semantic component, and the second half corresponds to the progress state component. The dimension of the stage semantic component is denoted as... Its value is output by the stage embedding encoder, encoding the type characteristics of the current decision evolution stage, such as whether the user is in the "information gathering stage," "price comparison evaluation stage," or "final decision stage." Each stage type corresponds to a different semantic space distribution. The dimension of the progress state component is denoted as... Quantitative indicators of progress Derived from a linear mapping, it carries continuous numerical information about the user's progress in the current stage. The sum of the dimensions of the two equals the total dimension of the stage condition vector. ,Right now This decomposition operation is achieved through fixed-dimensional slicing, requiring no additional parameters, ensuring that the two types of information remain semantically independent in subsequent processing, and avoiding interference between stage type information and completion degree information.

[0053] The contribution allocation network has three parallel, independent branches, corresponding to behavioral interaction data, historical transaction data, and relational network data, respectively. All three branches have the same network structure—a two-layer fully connected transformation—but each maintains an independent learnable parameter matrix, allowing the same stage semantic components to produce differentiated outputs in different branches. Specifically, for the ... Branches ( The semantic components of the stage undergo a first-level linear transformation, followed by an activation function (using ReLU activation) to output a hidden layer representation. This hidden layer representation then undergoes a second-level linear transformation to obtain a representation of dimension [dimensional value missing]. The stage sensitivity is represented as . ,in The network hidden layer dimension is assigned to the contribution. The parameters of the three branches are independent of each other, which means that the behavioral interaction data branch will learn the pattern of "under which stage types behavioral interaction information is more valuable", the historical transaction data branch will learn the pattern of "under which stage types historical purchase records are more decisive", and the relationship network data branch will similarly learn the stage sensitivity pattern of social relationship information.

[0054] The schedule status components are processed by an independent schedule control network to generate a schedule control factor, denoted as . , dimension The progress control network consists of a single linear transformation layer plus a sigmoid activation function, with the output range limited to [value range missing]. Within the interval, ensure that the regulatory factor has gating properties. The choice of Sigmoid activation has a clear semantic meaning: when the progress quantification index... When the value is close to 0, it indicates that the user has just entered the current stage, and the various dimensions of the progress control factor tend to be smaller, resulting in a stronger inhibitory effect on stage-sensitive representations; when... As the time approaches 1, the user is about to complete the current stage, and all dimensions of the progress control factor tend to larger values, amplifying the effect of the stage-sensitive representation. The stage-sensitive representation of each branch... With progress control factors Perform element-wise multiplication to obtain the regulated representation of each data source. ,Right now ,in This represents element-wise multiplication. This operation allows contribution allocation to not only depend on the stage type, but also to be dynamically adjusted as the user progresses within a stage, achieving joint control of both "stage type" and "stage progress".

[0055] The stage contribution memory is a key-value storage structure indexed by stage identifiers, used to accumulate the contribution weight distribution patterns of various data sources during the historical decision-making process. Each stage identifier corresponds to a historical contribution pattern vector, denoted as... The memory has three dimensions, storing the historical average contribution weights of behavioral interaction data, historical transaction data, and relationship network data at this stage. During the initialization phase, each entry in the memory is initialized with a uniform distribution, meaning the historical contribution weights of the three data sources are all equal. As the model processes more user behavior sequences, the entries in the memory are updated using an exponential moving average, ensuring that the historical contribution pattern vector reflects the statistical regularity of data source contributions within the same stage. When processing the current user, the memory is queried based on the stage identifier of their decision evolution stage; if a corresponding entry already exists for that stage identifier, it is read directly. If it is the first time a stage identifier has appeared, then a uniform distribution is used as the default historical contribution pattern vector.

[0056] After the integrated decision-making level receives the regulation from the three branches, it indicates... , , and historical contribution pattern vector After splicing the first three together with They are input into a lightweight fusion network. The concatenated vector has a dimension of [missing information]. , and Concatenating along the feature dimensions yields a result with dimension . The integrated input vector is obtained. The fusion network consists of a linear transformation layer with Tanh activation, followed by another linear transformation layer to map to a 3D output. Finally, it is normalized by Softmax to output the contribution weights of the three data sources. , , ,satisfy Furthermore, all values ​​are non-negative. The choice of the Tanh activation function enables the fusion network to effectively model the positive and negative differences between historical patterns and sensitive information at the current stage, avoiding excessive interference from historical biases in current decisions. Historical contribution pattern vector In the fusion decision layer, it plays a priori anchoring role: when the behavioral data at the current stage is sparse and the signal-to-noise ratio of the adjusted representation is low, the fusion network naturally tends to rely on... Historical statistical information is provided; when behavioral data is sufficient and the results after regulation show significant distribution differences, the fusion network relies more on current stage-sensitive signals.

[0057] Calculate the contribution weight value , , Then, it is associated with the current stage identifier and written back to the stage contribution memory in an updated manner. The update strategy uses an exponential moving average, and the updated historical contribution pattern vector... It is obtained by weighted fusion of old and new calculated values, where the smoothing coefficient is... The retention ratio of historical information is controlled, typically set to a value close to 1 (e.g., 0.95), to ensure that the stability of the memory does not fluctuate drastically due to variations in single calculation results. This write-back mechanism enables the memory to continuously learn. As the number of users processed increases, the historical contribution pattern vectors of each stage gradually converge to the true statistical distribution of the importance of the data source at that stage, providing a more accurate prior reference for contribution allocation in subsequent similar stages. The entire contribution allocation network is optimized through end-to-end backpropagation during the training phase, while the memory is updated online during the inference phase. The two work together to balance the model's learning ability with its cross-user knowledge accumulation capabilities.

[0058] In one optional implementation, an ideal consumer behavior prediction result is generated based on the stage fusion feature vector, and the actual consumer behavior prediction result is generated by combining it with the user constraint conditions. The weighted combination then generates the final consumer behavior prediction output, including: The stage-fused feature vectors are input into the ideal prediction network to generate ideal consumer behavior prediction results. After extracting user constraint features and concatenating them with the stage fusion feature vector, the results are input into the reality prediction network to generate reality consumption behavior prediction results. The historical sequence of the progress quantification index is encoded to calculate the probability that a user will experience a stage transition within a preset time window; When the transition probability exceeds the trigger threshold, a weighted interpolation is performed on the prediction results of the current stage and the prediction results of the next stage based on the transition probability; Based on the current decision-making evolution stage, ideal prediction weights and actual prediction weights are dynamically generated. The prediction results of ideal consumption behavior and actual consumption behavior are then weighted and combined to generate the final consumption behavior prediction output. Collect comparison data between the final consumption behavior prediction output and the actual user behavior results, calculate the prediction error, and update the parameters of the ideal prediction network, the actual prediction network, and the dynamically weighted network through gradient backpropagation based on the prediction error.

[0059] For example, stage-fused feature vectors After preliminary processing, it carries multi-source fusion information about the user's current decision-making evolution stage. The ideal prediction network uses... Using this as the sole input, and without considering any external constraints, the network models the most likely consumption behavior of users. The network consists of four fully connected layers, with the first layer... The layer is mapped to a hidden dimension of 512, the second layer has a dimension of 256, and the third layer has a dimension of 128. ReLU is used as the activation function for all layers. The final output layer is selected based on the prediction task type: Softmax (for classification scenarios) or linear mapping (for regression scenarios). The output dimension is consistent with the number of consumer behavior categories to be predicted or the dimension of the target value. The output result is denoted as the ideal consumer behavior prediction result. The ideal predictive network is designed to capture users' intrinsic consumption intentions at the current stage, eliminating interference from realistic factors such as budget, inventory availability, and geographical limitations, thereby obtaining a predictive benchmark that reflects users' true preferences.

[0060] While obtaining ideal prediction results, user constraints need to be introduced to correct the predictions. These user constraints include structured information such as spending budget limits, historical spending frequency restrictions, regional preference constraints, and category blacklists. This information is processed by a dedicated constraint feature encoder to generate constraint feature vectors. Its dimensions are .Will and Concatenate along the feature dimension to obtain a dimension of The joint feature vector is then input into the reality prediction network. The reality prediction network maintains the same structure as the ideal prediction network, but due to the expanded input dimension, the number of columns in its first-layer weight matrix is ​​adjusted accordingly. The output is denoted as the reality consumer behavior prediction result. The actual prediction results reflect the most likely consumption behavior under the user's actual constraints, and together with the ideal prediction results, they constitute the two components of the subsequent weighted combination.

[0061] To depict the dynamic evolution of users' decision-making states, progress quantification indicators are used. The historical sequence is time-series encoded. Within a preset time window... Internally, it collects quantitative progress metrics for users at various times, forming a structure with a length of [length missing]. time series The sequence is input into a lightweight temporal encoder (such as a single-layer GRU or a one-dimensional convolutional network) to extract the trend features contained in the sequence and output a temporal encoding vector. Its dimensions are Based on this, a two-layer fully connected network will be used to... Mapped to scalar probability values This value represents the probability that a user will make a transition in the decision-making process within a preset time window, and its range is constrained within... The condition between these values ​​is guaranteed by the Sigmoid function. This reflects the urgency with which users migrate from the current stage to the next stage, and is the core basis for subsequent transition perception interpolation.

[0062] when Exceeding the preset trigger threshold At this time, the cross-stage prediction interpolation mechanism is triggered. In this case, in addition to the prediction results of the current stage... and Furthermore, it is also necessary to generate the corresponding prediction results for the next stage. The prediction for the next stage will be generated through... The next-stage prediction network, which has the same structure as the current-stage prediction network but with independent parameters, is used to obtain the ideal prediction results for the next stage. And actual prediction results Cross-stage interpolation uses a method based on... The linear weighting method is used, and the weights of the prediction results in the current stage are: The weight of the prediction results in the next stage is The ideal prediction result after interpolation is The interpolated reality prediction results are processed similarly. Not exceeding the threshold In this case, the prediction results of the current stage are used directly without interpolation. This design allows the prediction results to transition smoothly at the stage boundaries, avoiding prediction instability caused by abrupt changes in the stage.

[0063] The dynamic weight generation mechanism allocates the fusion ratio of ideal and realistic prediction results differently based on the semantic information of the current decision-making evolution stage. Different decision-making evolution stages correspond to different user psychological states: in the early exploration stage, users are less affected by constraints, so the ideal prediction weight should be higher; in the near-decision stage, users are more constrained by realistic constraints such as budget, so the realistic prediction weight should be increased accordingly. The current stage's one-hot encoding or stage embedding vector is then used. (dimension is) ) and progress quantification indicators After concatenation, the input is used to generate a dynamic weight network. This network consists of two fully connected layers and outputs a 2-dimensional vector, which is then normalized using Softmax to obtain the ideal predicted weights. And actual prediction weight ,satisfy Final consumption behavior prediction output It is obtained by weighted combination of the interpolated ideal prediction result and the actual prediction result, i.e. When transition interpolation is not triggered, use directly. and Participate in the combination.

[0064] During the model training phase, data is collected. Results of actual user behavior The prediction error is calculated by comparing the data between the two datasets. For classification tasks, the cross-entropy loss function is used; for regression tasks, the mean squared error loss function is used. The prediction error is used to update all learnable parameters of the ideal prediction network, the actual prediction network, and the dynamic weight generation network sequentially through the gradient backpropagation mechanism. During the backpropagation path, the gradient signal travels along... The weighted combination structure flows to the ideal prediction branch and the actual prediction branch respectively, and is further fed back to the stage fusion feature vector. The generation process enables end-to-end joint optimization. To prevent gradient explosion, gradients are pruned, limiting the gradient norm to a threshold value. Within [a certain range]. The optimizer uses the Adam algorithm, and the learning rate is dynamically adjusted according to the cosine annealing strategy to ensure stable convergence during the training process.

[0065] In practical deployment scenarios, to address the cold start problem caused by sparse user behavior data, both ideal and realistic prediction networks employ a pre-training and fine-tuning strategy: pre-training is first performed on a large-scale general consumer behavior dataset, followed by a few fine-tuning steps on data from the target user group, enabling the model to quickly adapt to the distribution characteristics of the specific scenario. Dynamic weight generation networks, due to their smaller parameter count, can be trained directly from random initialization during the fine-tuning stage without pre-training. (Transition probability trigger threshold) It can be flexibly configured according to business needs: For scenarios where it is desirable to capture user phase migration signals in advance, it can be configured to... Set to a lower value (e.g., 0.3); for scenarios where you want to ensure prediction stability, you can... Set it to a higher value (such as 0.7) to achieve a balance between sensitivity and stability.

[0066] A second aspect of the present invention provides a user consumption behavior analysis system that integrates multi-source data, comprising: The acquisition unit is used to acquire multi-source data of the user, including behavioral interaction data, historical transaction data, and relationship network data. A stage unit is used to identify the current decision-making evolution stage of the user based on the behavioral interaction data, and to calculate a progress quantification index that represents the user's completion rate in the current decision-making evolution stage. The update unit is used to construct a decision trajectory sequence and convert it into a decision path feature vector. When a user's decision evolution stage transition is detected, a gating update mechanism is used to update the memory state vector. The gating update mechanism is configured with a forget gate and an input gate differently according to the stage transition type. The fusion unit is used to generate a contribution weight distribution of each data source based on the decision path feature vector and the progress quantification index, and to perform weighted fusion of the feature representations of the multi-source heterogeneous data according to the contribution weight distribution and the decision path feature vector as the query vector to generate a weighted fused data source representation, which is then concatenated with the memory state vector to output a stage fusion feature vector. The prediction unit is used to generate ideal consumer behavior prediction results based on the stage fusion feature vector, and combine the actual consumer behavior prediction results generated by user constraints with weighted combinations to generate the final consumer behavior prediction output.

[0067] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0068] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0069] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.

[0070] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions 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 method for analyzing user consumption behavior by integrating multi-source data, characterized in that, include: The system acquires multi-source user data, including behavioral interaction data, historical transaction data, and relationship network data; based on the behavioral interaction data, it identifies the user's current decision-making evolution stage and calculates a progress quantification index representing the user's completion rate within the current decision-making evolution stage; A decision trajectory sequence is constructed and converted into a decision path feature vector. When a user's decision evolution stage transition is detected, a gating update mechanism is used to update the memory state vector. The gating update mechanism configures the forget gate and input gate differently according to the stage transition type. Based on the decision path feature vector and the progress quantification index, a contribution weight distribution for each data source is generated. According to the contribution weight distribution, the feature representations of the multi-source heterogeneous data are weighted and fused using the decision path feature vector as the query vector to generate a weighted fused data source representation. After concatenation with the memory state vector, a stage fusion feature vector is output. Ideal consumption behavior prediction results are generated based on stage-fused feature vectors, and real consumption behavior prediction results are generated by combining them with user-constrained conditions. The weighted combination then generates the final consumption behavior prediction output.

2. The method according to claim 1, characterized in that, Based on the behavioral interaction data, the user's current decision-making evolution stage is identified, and a progress quantification index representing the user's completion level within the current decision-making evolution stage is calculated, including: The behavioral interaction data is subjected to temporal and semantic encoding. The temporal and semantic encoding results are then input into a stage recognition network to identify the user's current decision-making evolution stage. Extract the set of characteristic behaviors corresponding to the current decision evolution stage from the behavioral interaction data, count the completion status of each behavior in the set of characteristic behaviors, and calculate the completion degree of the characteristic behaviors in the stage; The frequency of cross-stage behaviors in the behavioral interaction data is statistically analyzed, and a time decay factor is calculated based on the time interval between the occurrence time of each behavior and the current time. The time decay factor, the completion degree of the stage characteristic behavior, and the frequency of cross-stage behavior are weighted and fused to generate a quantitative progress index that represents the user's completion degree in the current decision evolution stage.

3. The method according to claim 1, characterized in that, Constructing a decision trajectory sequence and converting it into a decision path feature vector includes: Record the user's dwell time, execution behavior patterns, and progress metrics at each stage of the decision-making process, and organize them into a decision trajectory sequence; A stage identifier embedding is assigned to the stage identifier of each decision evolution stage in the decision trajectory sequence, a duration embedding is assigned to the dwell time, a progress embedding is assigned to the progress quantification index, and a behavior pattern embedding is assigned to the execution behavior pattern. The stage identifier embedding, duration embedding, progress embedding, and behavior pattern embedding are combined into a token representation sequence. The token representation sequence is input into a self-attention encoding network, which calculates the association weights between tokens in the token representation sequence and outputs a decision path feature vector.

4. The method according to claim 1, characterized in that, When a user's decision evolution stage transition is detected, a gating update mechanism is used to update the memory state vector. This gating update mechanism configures the forget gate and input gate differently based on the stage transition type, including: The initialization memory state vector is embedded based on the decision path feature vector and the stage identifier of the first decision evolution stage; Real-time monitoring of changes in the decision evolution stage; when a user is detected to have transitioned from a previous decision evolution stage to the current decision evolution stage, the stage feature representations of the previous and current decision evolution stages are extracted, the feature difference vector is calculated, and the stage transition type is determined. Calculate the stage span between the previous decision evolution stage and the current decision evolution stage, and calculate the transition intensity index based on the stage span and the feature difference vector; The stage transition type, the transition intensity index, the progress quantification index of the preceding decision evolution stage, and the progress quantification index of the current decision evolution stage are input into the gating parameter generation network to dynamically generate the forget gate weight matrix and the input gate weight matrix; The memory state vector is weighted using the forget gate weight matrix to generate a retained memory component, and the decision path feature vector and progress quantification index of the current decision evolution stage are used to generate an acceptance memory component based on the input gate weight matrix. The retained memory component and the accepted memory component are added together to generate an updated memory state vector.

5. The method according to claim 1, characterized in that, Based on the decision path feature vector and the progress quantification index, a contribution weight distribution for each data source is generated. Then, according to the contribution weight distribution, the feature representations of the multi-source heterogeneous data are weighted and fused using the decision path feature vector as the query vector to generate a weighted fused data source representation, including: Extract the stage-related feature components corresponding to the current decision evolution stage from the feature vector of the decision path, and concatenate them with the progress quantification index to generate a stage condition vector; The stage condition vector is input into the contribution allocation network, and the contribution allocation network calculates contribution weight values ​​for the behavioral interaction data, historical transaction data, and relationship network data respectively. The contribution weight values ​​represent the prior importance of the corresponding data source in the current decision evolution stage. The decision path feature vector is transformed into a query vector through query projection transformation, and the feature representations of the behavioral interaction data, historical transaction data, and relational network data are transformed into corresponding key vectors through key projection transformation. Calculate and normalize the inner product between the query vector and the key vector corresponding to each data source to generate the query matching degree of each data source. The query matching degree represents the semantic association strength between the corresponding data source and the current decision path. The contribution weight of each data source is multiplied with the corresponding query matching degree to generate a fusion weight. Based on the fusion weight, the feature representations of each data source are weighted and summed to generate a weighted fusion data source representation.

6. The method according to claim 5, characterized in that, The stage condition vector is input into the contribution allocation network, and the contribution weight values ​​are calculated for the behavioral interaction data, historical transaction data, and relationship network data through the contribution allocation network, including: The stage condition vector is decomposed into stage semantic components and progress state components. The stage semantic components represent the type characteristics of the current decision evolution stage, and the progress state components represent the completion degree characteristics of the current decision evolution stage. In the contribution allocation network, behavioral interaction data branches, historical transaction data branches, and relationship network data branches are set up. The stage semantic components are input into each branch respectively, and the stage semantic components are transformed by the independent parameters of each branch to generate the stage-sensitive representation of the corresponding data source. Based on the progress state components, a progress control factor is generated. Then, the stage-sensitive representation of each data source is multiplied with the progress control factor to generate the control-post representation of the corresponding data source. The maintenance phase contribution memory stores the contribution weight values ​​of each data source in the historical decision evolution phase. Based on the phase identifier of the current decision evolution phase, the historical contribution pattern vector is obtained by querying the contribution memory. The modified representations of the behavioral interaction data, the modified representations of the historical transaction data, the modified representations of the relationship network data, and the historical contribution pattern vector are input into the fusion decision layer to calculate the contribution weight values ​​of each data source. The calculation results are then associated with the current stage identifier and stored in the stage contribution memory.

7. The method according to claim 1, characterized in that, Ideal consumer behavior prediction results are generated based on stage-fused feature vectors, and actual consumer behavior prediction results are generated by combining them with user-constrained conditions. These are then weighted and combined to generate the final consumer behavior prediction output, which includes: The stage-fused feature vector is input into the ideal prediction network to generate ideal consumer behavior prediction results; user constraint features are extracted and concatenated with the stage-fused feature vector, then input into the reality prediction network to generate reality consumer behavior prediction results. The historical sequence of the progress quantification index is encoded to calculate the probability that a user will experience a stage transition within a preset time window; when the transition probability exceeds a trigger threshold, a weighted interpolation is performed on the prediction results of the current stage and the prediction results of the next stage based on the transition probability; Based on the current decision-making evolution stage, ideal prediction weights and actual prediction weights are dynamically generated. The prediction results of ideal consumption behavior and actual consumption behavior are then weighted and combined to generate the final consumption behavior prediction output. Collect comparison data between the final consumption behavior prediction output and the actual user behavior results, calculate the prediction error, and update the parameters of the ideal prediction network and the actual prediction network based on the prediction error through gradient backpropagation.

8. A user consumption behavior analysis system that integrates multi-source data, used to implement the method as described in any one of claims 1-7, characterized in that, include: The acquisition unit is used to acquire multi-source data of the user, including behavioral interaction data, historical transaction data, and relationship network data. A stage unit is used to identify the current decision-making evolution stage of the user based on the behavioral interaction data, and to calculate a progress quantification index that represents the user's completion rate in the current decision-making evolution stage. The update unit is used to construct a decision trajectory sequence and convert it into a decision path feature vector. When a user's decision evolution stage transition is detected, a gating update mechanism is used to update the memory state vector. The gating update mechanism is configured with a forget gate and an input gate differently according to the stage transition type. The fusion unit is used to generate a contribution weight distribution of each data source based on the decision path feature vector and the progress quantification index, and to perform weighted fusion of the feature representations of the multi-source heterogeneous data according to the contribution weight distribution and the decision path feature vector as the query vector to generate a weighted fused data source representation, which is then concatenated with the memory state vector to output a stage fusion feature vector. The prediction unit is used to generate ideal consumer behavior prediction results based on the stage fusion feature vector, and combine the actual consumer behavior prediction results generated by user constraints with weighted combinations to generate the final consumer behavior prediction output.

9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke 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 the processor, they implement the method described in any one of claims 1 to 7.