Transaction prediction method, electronic device, and storage medium
Patent Information
- Application Number
- CN202611213710.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-27
AI Technical Summary
[0005]本申请的主要目的在于提供一种交易预测方法、电子设备及存储介质,旨在解决交易预测方法分析维度单一和准确性低的技术问题
本申请通过获取目标客户原始交易数据并提取数据特征,利用全局模型对数据特征进行分析并生成第一预测数据,能够有效挖掘全体客户共有的群体交易规律,捕捉通用性收支变化趋势;从提取的数据特征中进一步筛选目标客户对应的单人交易序列,通过个性化模型生成第二预测数据,可精准聚焦单个客户独有的交易行为与个性化交易习惯,弥补全局模型输出的预测数据对客户的个体差异化交易刻画不足的缺陷;结合数据特征与预设的规则知识库,通过经验模型生成第三预测数据,能将成熟的业务规则和专家经验融入预测过程,解决纯算法预测与实际业务场景脱节的问题,提升预测结果的业务适配性;通过质量评分规则分别对全局模型、个性化模型、经验模型的预测结果进行评价,结合三路预测数据及其对应质量评分,通过预设编排规则融合计算得到最终交易预测结果,实现多模型优势互补、优劣权重自适应调配,能够适配复杂多样的真实客户交易场景,解决了从传统的交易预测方法分析维度单一和准确性低的技术问题。
Smart Images

Figure CN122989301A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a transaction prediction method, electronic device, and storage medium. Background Technology
[0002] With the rapid development of intelligent financial accounting management, the demand for transaction forecasting of customer account income and expenditure continues to increase. Predicting future cash inflows and outflows based on historical transaction data can support the implementation of digital financial services such as intelligent wealth management and cash flow alerts. The accuracy of transaction forecasting directly affects the financial service experience.
[0003] Current customer account transaction prediction solutions mainly fall into two categories: one category employs traditional time-series statistical models such as autoregressive integral moving average models and prophetic models, making predictions based on the time trends and seasonal patterns of transaction data. However, these models struggle to fully capture individual customer trading habits, and their predictive effectiveness significantly decreases when dealing with highly volatile, non-stationary transaction data. The other category uses machine learning models such as gradient boosting decision trees, recurrent neural networks, or long short-term memory networks. These models can deeply mine transaction features from a single dimension, but they cannot simultaneously account for general group trading patterns and individual customer behavioral differences. Furthermore, most existing prediction solutions rely solely on model computation to output prediction results, lacking the auxiliary correction of business experience rules, making the prediction results prone to detachment from actual business scenarios.
[0004] This demonstrates that existing transaction prediction methods suffer from technical problems such as limited analytical dimensions and low accuracy. Summary of the Invention
[0005] The main purpose of this application is to provide a transaction prediction method, electronic device, and storage medium, which aims to solve the technical problems of transaction prediction methods having a single analytical dimension and low accuracy.
[0006] To achieve the above objectives, this application proposes a transaction prediction method, the method comprising: Obtain the original transaction data of the target customer and extract the data features from the original transaction data; Based on the data features, first prediction data is generated using a pre-trained target global model; Obtain the individual transaction sequence corresponding to the target customer from the data features, and generate second prediction data based on the individual transaction sequence through the personalized model corresponding to the target customer, wherein the personalized model is trained through the historical transaction sequence of the target customer; Based on the data features and the preset rule knowledge base, a third prediction data is generated through a preset experience model; Based on preset quality scoring rules, determine the real-time quality scores corresponding to the target global model, the personalized model, and the experience model, respectively. Based on the first prediction data, the second prediction data, the third prediction data, and each of the real-time quality scores, the transaction prediction result for the target customer is calculated according to the preset arrangement rules.
[0007] For example, the step of determining the real-time quality scores corresponding to the target global model, the personalized model, and the experience model based on preset quality scoring rules includes: Read the historical prediction results of the target customer in the previous prediction period, corresponding to the target global model, the personalized model, and the experience model, respectively. The historical prediction results are compared with the original transaction data to obtain the real-time quality scores corresponding to the target global model, the personalized model, and the empirical model, respectively. The step of calculating the transaction prediction result of the target customer based on the first prediction data, the second prediction data, the third prediction data, and each of the real-time quality scores, according to a preset arrangement rule, includes: Based on the real-time quality scores corresponding to the target global model, the personalized model, and the empirical model, the score weights corresponding to the first predicted data, the second predicted data, and the third predicted data are calculated respectively. Read the preset business configuration parameters, and calculate the first prediction data, the second prediction data, and the third prediction data based on the preset integration strategy and the scoring weights and the business configuration parameters to obtain the transaction prediction result. The integration strategy includes at least one of weighted calculation, dynamic model filtering, and stacked integration.
[0008] For example, the step of generating third-party prediction data based on the data features and a preset rule knowledge base using a preset experience model includes: Input the data features into the experience model, and retrieve the data features based on the rule knowledge base in the experience model to obtain business rules that match the data features; Based on the data characteristics and the business rules, the third prediction data is generated through the empirical model.
[0009] For example, prior to the step of obtaining the target customer's original transaction data, the method further includes: The historical transaction sequence of the target customer is obtained, and the historical transaction sequence is calculated using a preset Fourier transform algorithm to obtain the autocorrelation coefficients corresponding to multiple lag orders. Based on the autocorrelation coefficients and the preset lag order selection algorithm, the target lag order corresponding to the target customer is obtained; Based on the historical transaction sequence and the target lag order, a preset initial single-person model is trained to obtain a personalized model corresponding to the target customer.
[0010] For example, the step of obtaining the individual transaction sequence corresponding to the target customer in the data features, and generating second prediction data based on the individual transaction sequence through a preset personalized model includes: Based on the target customer's identity identifier, extract the individual transaction sequence corresponding to the target customer from the data features; Input the individual transaction sequence into the personalized model to generate the original prediction result; Based on the preset verification window, a backtracking verification sequence is extracted from the single-person transaction sequence; The personalized model is backtested based on the backtesting sequence to obtain the backtesting matching score corresponding to the personalized model. If the backtracking matching score is greater than or equal to the preset backtracking score threshold, the original prediction result is used as the second prediction data; If the backtracking matching score is less than a preset backtracking score threshold, the second predicted data will be marked as invalid.
[0011] For example, prior to the step of obtaining the target customer's original transaction data, the method further includes: Acquire training transaction data from multiple customers, and perform data augmentation on the training transaction data according to preset calendar difference processing rules and / or preset transaction date offset rules to obtain first transaction data; Extract the training global features from the first transaction data, and normalize the training global features to obtain the second transaction data; For each customer's individual time-series feature in the second transaction data, the individual time-series feature is normalized to obtain the third transaction data. Based on the third transaction data, the preset initial global model is trained to obtain the target global model.
[0012] For example, the step of generating the first prediction data based on the data features using a pre-trained target global model includes: The data features are mapped to multidimensional feature vectors, wherein the data features include at least time-series features, calendar features, and global features, and the multidimensional feature vectors include at least time-series vectors, calendar vectors, and global vectors; The multidimensional feature vector is input into the attention encoder of the target global model to obtain a global attention vector, wherein the global attention vector includes the customer label and transaction sequence vector corresponding to the target customer; The global attention vector is input to a preset hybrid expert module in the target global model, and the expert network corresponding to the target customer is determined through the routing network in the hybrid expert module. The hybrid expert module includes the routing network and multiple expert networks. The transaction sequence vector is converted into a high-order feature sequence through the expert network corresponding to the target customer; The high-order feature sequence is input into the prediction module of the target global model, and the prediction module generates the first prediction data.
[0013] For example, the attention encoder includes a self-attention encoder and a cross-attention encoder, and the step of inputting the multi-dimensional feature vector to the attention encoder of the target global model to obtain the global attention vector includes: Extract the temporal vector and the global vector from the multidimensional feature vector, and input the temporal vector into the self-attention encoder to obtain enhanced transaction features; The enhanced transaction features and the global vector are input into the cross-attention encoder to obtain the global attention vector.
[0014] Furthermore, to achieve the above objectives, this application also proposes a transaction prediction device, which includes: The data acquisition module is used to acquire the raw transaction data of the target customer and extract the data features from the raw transaction data; The prediction module is used to generate the first prediction data, the second prediction data, and the third prediction data based on the data features through the target global model, the personalized model, and the empirical model. The quality inspection module is used to determine the real-time quality scores corresponding to the target global model, the personalized model, and the experience model based on preset quality scoring rules. The orchestration module is used to calculate the transaction prediction result of the target customer based on the first prediction data, the second prediction data and the third prediction data, according to a preset orchestration rule.
[0015] In addition, to achieve the above objectives, this application also proposes an electronic device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the transaction prediction method as described above.
[0016] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the transaction prediction method described above.
[0017] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the transaction prediction method described above.
[0018] One or more technical solutions proposed in this application have at least the following technical effects: This application acquires raw transaction data from target customers and extracts data features. It then uses a global model to analyze these features and generate first-order prediction data, effectively uncovering common group transaction patterns among all customers and capturing general trends in income and expenditure. Further filtering of the extracted data features reveals individual transaction sequences corresponding to the target customer, generating second-order prediction data through a personalized model. This accurately focuses on the unique transaction behaviors and personalized habits of individual customers, compensating for the shortcomings of the global model's prediction data in depicting individual customer differences. Combining data features with a pre-set rule knowledge base, a third-order prediction data is generated through an experience model. This integrates mature business rules and expert experience into the prediction process, addressing the disconnect between pure algorithmic prediction and actual business scenarios and improving the business adaptability of the prediction results. Quality scoring rules evaluate the prediction results of the global model, personalized model, and experience model respectively. Combining the three prediction data and their corresponding quality scores, a final transaction prediction result is obtained through fusion calculation using pre-set arrangement rules. This achieves complementary advantages of multiple models and adaptive weighting of strengths and weaknesses, adapting to complex and diverse real-world customer transaction scenarios and solving the technical problems of single-dimensional analysis and low accuracy in traditional transaction prediction methods. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating an embodiment of the transaction prediction method of this application. Figure 2A flowchart illustrating steps S21 to S25 of an embodiment of the transaction prediction method of this application; Figure 3 A flowchart illustrating steps S31 to S36 of an embodiment of the transaction prediction method of this application; Figure 4 This is a schematic diagram of the module structure of the transaction prediction device according to an embodiment of this application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the transaction prediction method in the embodiments of this application.
[0022] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0023] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0024] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0025] The main solution in this application embodiment is: Existing technologies for predicting customer account transactions reveal multiple shortcomings when dealing with real-world business transaction data. Firstly, they are prone to mean regression when handling highly random, sparse, and personalized transactions, making it difficult to capture sudden, individual transaction behaviors. Secondly, they struggle to uncover hidden behavioral patterns among different customer groups from complex data, resulting in limited model generalization. Furthermore, modeling and predicting transactions involving tens of millions of customers and hundreds of millions of transactions incurs enormous computational costs; under limited computing power, model training can take hundreds of days, highlighting computational efficiency bottlenecks. Customer transaction behavior is simultaneously constrained by three factors: group statistical patterns, individual customer historical habits, and established business rules. A single model or prediction path may miss some relevant information, leading to prediction bias. After trying various solutions such as optimizing the global model, expanding the rule base, and directly upgrading hardware configuration, the optimal implementation method of this application was determined: deploying the global model, the customer-personalized model, and the experience model in parallel to output three prediction data. Fourier transform algorithm, training data fuzzification, normalization and other means are introduced to alleviate the computing power pressure of large-scale data. Then, the quality scores of each prediction data and business configuration are combined, and the three outputs are integrated through multiple integration strategies to obtain the final transaction prediction result.
[0026] This application provides a solution that combines information from three aspects—group transaction patterns, individual customer transaction habits, and business expert rules—to complete transaction prediction. A global model uses a hybrid expert module to distinguish the behavioral patterns of different customer groups, outputting the first prediction data. For each individual customer, a personalized model is trained based on historical transaction sequences. Fourier transform is used to accelerate the calculation of autocorrelation coefficients, and quality priors based on backtesting are used to obtain the second prediction data. A rule knowledge base containing expert knowledge and specific business rules is used to match corresponding business rules, generating the third prediction data. Weights are determined based on the current quality scores of each model, and weighted calculation, dynamic model selection, and stacking integration are used to complete the orchestration and fusion of multiple models. Simultaneously, data augmentation techniques such as calendar difference fuzzing and transaction offset fuzzing, along with dedicated normalization processing, significantly reduce the model training time for tens of millions of customer groups under limited hardware resources. This application's solution balances prediction accuracy and computational efficiency, adapting to individual transaction scenarios, effectively mining common group behaviors, and supporting modeling and inference for ultra-large-scale customer groups under limited computing power, demonstrating good practicality and scalability.
[0027] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions. The following description uses an electronic computer as an example to illustrate this embodiment and the subsequent embodiments.
[0028] Based on this, embodiments of this application provide a transaction prediction method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the transaction prediction method of this application.
[0029] In this embodiment, the transaction prediction method includes steps S10 to S60: Step S10: Obtain the original transaction data of the target customer and extract the data features from the original transaction data; It should be noted that the target customer is the bank account customer to be predicted in the current prediction process, and is the sole processing object for this single transaction prediction; the raw transaction data is all account transaction records generated by the target customer within a preset historical time period, which may include data such as transaction time, transaction amount, transaction type, income and expenditure identifiers, and customer identity identifiers; the data features are a set of multi-dimensional features obtained by cleaning, filtering, and structuring the raw transaction data, including but not limited to time series features, calendar features, and global features, which can comprehensively characterize the customer's transaction behavior patterns and attribute characteristics.
[0030] Specifically, historical raw transaction data of target customers is retrieved through the financial business database interface. The raw transaction data is preprocessed to remove missing values, outliers, and duplicate or invalid data to ensure the integrity and validity of the data source. Subsequently, multi-dimensional features are extracted from the preprocessed transaction data. Time-series features can include time-series statistical features such as income and expenditure fluctuations, sliding window statistics, and transaction frequency generated based on transaction records. Calendar features can include time-dimensional features such as holiday identifiers, month, season, and transaction day attributes. Global features can include customer-specific attributes such as customer KYC (Know Your Customer) attributes, transaction scenario tags, and customer level. Finally, the three types of features are integrated to form structured customer data features, providing standardized input for subsequent multi-model predictions.
[0031] Step S20: Based on the data features, generate the first prediction data through a pre-trained global target model; It should be noted that the target global model is a group prediction model pre-trained based on massive customer samples. It can be selected from various deep learning or machine learning models such as variant Transformer model, convolutional neural network model, gradient boosting model, etc. In this embodiment, a variant Transformer model with a Mixture of Experts (MoE) architecture is preferred to mine the common transaction patterns of all customers. The first prediction data is the transaction prediction result output by the global model based on the group pattern, which is used to characterize the future transaction trend of customers that conforms to the common characteristics of the group.
[0032] Specifically, the preprocessed multidimensional data features are mapped to standardized feature vectors and input into the pre-trained target global model. The global model can fuse temporal features and customer global features through self-attention and cross-attention mechanisms, and can also mine group transaction patterns through clustering and feature statistics. At the same time, it can rely on the MoE architecture and multi-branch network structure to achieve differentiated modeling of different customer groups, avoiding the mean regression problem of traditional single models. The target global model outputs the prediction results. During the global model training phase, various optimization methods such as data augmentation, feature normalization, and computing power scheduling can be used to reduce the computing power consumption of large-scale customer group modeling and improve the model's generalization ability and training efficiency.
[0033] Step S30: Obtain the individual transaction sequence corresponding to the target customer in the data features. Based on the individual transaction sequence, generate the second prediction data through the personalized model corresponding to the target customer. The personalized model is trained through the historical transaction sequence of the target customer. It should be noted that the individual transaction sequence is independent time-series transaction data specific to the target customer, without interference from other customer data, and is used to characterize the customer's personalized transaction behavior; the personalized model is an independent prediction model exclusive to the target customer, adopting a one-person-one-model modeling approach, trained solely on the target customer's own historical transaction data, used to capture individual sparse, random, and sudden transaction patterns, and to compensate for the deficiencies of the global model in personalized transaction prediction; the second prediction data is the future transaction prediction data inferred and output by the personalized model exclusive to the target customer based on the target customer's individual transaction sequence.
[0034] Specifically, a personalized model is trained based on the target customer's historical transaction data. This personalized model can employ various model types, including time-series statistical models, lightweight machine learning models, and shallow neural networks. Feature calculation can utilize a step-by-step calculation method based on autocorrelation coefficients, as well as accelerated calculation methods using Fast Fourier Transform (FFT) and Inverse Fast Fourier Transform (IFFT) to improve feature mining efficiency. The model input features are optimized using methods such as lag order selection and adaptive feature construction to accurately capture individual customer transaction patterns. A unique single-person transaction sequence is extracted from the data features based on the customer's identity identifier. This single-person transaction sequence is input into the personalized model corresponding to the customer's identity identifier, and the personalized model then predicts and generates second-prediction data.
[0035] Step S40: Based on data features and a preset rule knowledge base, generate third prediction data through a preset experience model; It should be noted that the rule knowledge base is a pre-stored and organized set of standardized business transaction rules, including deterministic transaction patterns and expert experience in specific financial business scenarios. The rule knowledge base supports manual updates and data iterations, and can be adapted to business scenarios at different stages. The experience model is a predictive model that completes rule matching and logical deduction based on the rule knowledge base. Unlike data-driven training models, it does not require massive sample iterative training and relies on fixed business rules to achieve accurate predictions. The third prediction data is the future transaction prediction data calculated by the experience model based on customer data characteristics and matching corresponding business rules.
[0036] Specifically, by loading a pre-defined rule knowledge base into the empirical model, the system reads the standardized data features preprocessed by the target customer and performs a comprehensive search and matching of the customer's transaction scenarios, transaction cycles, account attributes, and income and expenditure characteristics. This accurately retrieves transaction rules suitable for the customer's current business scenario, such as pre-deposited account annual fee deduction, monthly salary disbursement, regular wealth management repayments, and handling fee deductions. Based on the matched target business rules, and combined with the customer's real-time multi-dimensional data features, quantitative inference and qualitative judgment are performed, outputting third-party prediction data for the corresponding scenario. The rule matching of the empirical model is not limited to precise field matching, multi-condition combination matching, or time-series period matching. The rule knowledge base can be updated in real-time to continuously adapt to new business scenarios, effectively compensating for the shortcomings of data-driven models in predicting unstable and biased results in fixed-format transaction scenarios.
[0037] Step S50: Based on the preset quality scoring rules, determine the real-time quality scores corresponding to the target global model, the personalized model, and the empirical model, respectively. It should be noted that the quality scoring rules are a pre-set objective evaluation rule system used to uniformly judge the accuracy and reliability of the prediction results of the three types of models; the real-time quality score is a quantitative score dynamically generated based on the comparison and verification of the previous round of historical prediction results and the actual transaction data of the customer for the current prediction period and the current target customer. It is used to characterize the reliability of the current single-round prediction results of the target global model, personalized model and experience model respectively.
[0038] Specifically, the system reads the previous historical prediction results of the target global model, personalized model, and experience model for the current target customer. It extracts the customer's actual transaction data within the prediction period corresponding to the previous historical prediction results as the scoring standard. The historical prediction results of the three models are then compared with the actual transaction data item by item across multiple dimensions. The error magnitude, scenario matching degree, and time series fit degree between the predicted and actual values are quantified and calculated. Based on preset quality scoring rules, the multi-dimensional error indicators are normalized and converted to obtain the real-time quality scores for each of the three models. For example, the quantitative comparison indicators may include absolute error in transaction amount, transaction time deviation, transaction scenario matching degree, and time series trend similarity.
[0039] Step S60: Based on the first prediction data, the second prediction data, the third prediction data, and each real-time quality score, the transaction prediction result for the target customer is calculated according to the preset arrangement rules.
[0040] It should be noted that the arrangement rules are a preset intelligent integration and fusion strategy for multi-model prediction results. This strategy is used to adaptively adjust the fusion weight and filtering logic of each model's prediction results based on the real-time quality scores of the three types of models. The transaction prediction results integrate the advantages of the first, second, and third prediction data, eliminate low-quality prediction interference, and finally output standardized prediction results that fit the actual transaction patterns of the target customers.
[0041] Specifically, the first, second, and third prediction data generated in this round of predictions, along with the real-time quality scores corresponding to the three types of models, are aggregated. Multi-source prediction data fusion calculations are then performed based on preset orchestration rules. These orchestration rules may include preset algorithms such as dynamic weighted fusion, dynamic threshold-based optimal fusion, and stacked integration fusion. Based on the real-time quality scores of each model, higher fusion weights are assigned to high-scoring, high-reliability models, while lower weights are reduced or models with low scores and low reliability are directly filtered out. Finally, the transaction prediction results for the target customer are calculated.
[0042] This embodiment acquires the original transaction data of the target customer and extracts data features. It then uses a global model to analyze these features and generate the first prediction data, effectively uncovering common group transaction patterns among all customers and capturing general trends in income and expenditure. Further filtering of the extracted data features reveals individual transaction sequences corresponding to the target customer, generating the second prediction data through a personalized model. This accurately focuses on the unique transaction behaviors and personalized transaction habits of individual customers, compensating for the shortcomings of the global model's prediction data in depicting individual customer differences. Combining data features with a pre-set rule knowledge base, a third prediction data is generated through an experience model. This integrates mature business rules and expert experience into the prediction process, solving the problem of pure algorithm prediction being disconnected from actual business scenarios and improving the business adaptability of the prediction results. The prediction results of the global model, personalized model, and experience model are evaluated using quality scoring rules. Combining the real-time quality scores of the three prediction data and their corresponding models, the final transaction prediction result is obtained through fusion calculation using pre-set orchestration rules. This achieves complementary advantages of multiple models and adaptive weighting of strengths and weaknesses, adapting to complex and diverse real-world customer transaction scenarios and solving the technical problems of single analytical dimensions and low accuracy in traditional transaction prediction methods.
[0043] In one feasible implementation, the transaction prediction method may further include steps B10 to B40 before step S10: Step B10: Obtain training transaction data from multiple customers, and perform data augmentation on the training transaction data according to preset calendar difference processing rules and / or preset transaction date offset rules to obtain the first transaction data; It should be noted that the training transaction data is a collection of transaction flow samples from multiple different customers' historical records, used to complete the offline training of the initial global model; the calendar difference processing rule is a data processing rule used to smooth out the time series deviation caused by the inconsistent number of days in natural months; the transaction date offset rule is a data augmentation rule that randomly shifts the transaction occurrence date; the first transaction data is the augmented sample data obtained after calendar difference processing and transaction date offset augmentation.
[0044] Specifically, a large number of historical raw transaction records from different customers are collected in batches as training transaction data. This data is then processed according to preset calendar difference processing rules, such as standardizing the number of days in each calendar month to 30 days, while ensuring that the statistical distribution of transaction amounts after augmentation is completely consistent with the original training transaction data. Based on preset transaction date offset rules, the occurrence date of each transaction is randomly shifted forward or backward within a predetermined time range, expanding the periodic diversity of the training samples and improving the model's adaptability to different prediction periods. Calendar difference processing and transaction date offset processing can be performed separately, or both can be performed simultaneously. After data augmentation, the first set of transaction data is output.
[0045] Step B20: Extract the training global features from the first transaction data, normalize the training global features, and obtain the second transaction data; It should be noted that the training global features are features representing the overall attributes and group attributes of customers extracted from the first transaction data; the normalization process is a data scaling operation that maps the feature values to a uniform numerical range; the second transaction data is the dataset obtained after the normalization process of the training global features.
[0046] Specifically, training global features corresponding to multiple customers are extracted from the first transaction data. The training global features may include customer identity attributes, customer level, scene tags, customer group classification tags, etc. Before the dataset is split, the mean and variance obtained from global statistics are used to normalize and scale all training global features to eliminate model training interference caused by differences in the scale of different features. The processed data set is recorded as the second transaction data.
[0047] Step B30: For each individual time series feature corresponding to each customer in the second transaction data, normalize the individual time series features to obtain the third transaction data; It should be noted that the individual time-series features are time-series transaction features associated with a single customer; the third transaction data is the final training dataset obtained after all individual time-series features of all customers have been independently normalized at the customer granularity, and is used as input for model training.
[0048] Specifically, each customer in the second transaction data is traversed, and the individual time-series features corresponding to each customer are extracted at the granularity of a single customer. Based on the statistical measures of the customer's own time-series features, the normalization process of the customer's time-series features is completed independently, and the normalization statistical parameters between different customers are independent of each other. After all the individual time-series features of all customers have been processed, they are integrated to obtain the third transaction data.
[0049] Step B40: Based on the third transaction data, train the preset initial global model to obtain the target global model.
[0050] It should be noted that the initial global model is a basic model that has not yet completed parameter convergence and is yet to be trained iteratively; the target global model is a pre-trained global model that has been iteratively trained using the third transaction data and can be used for online inference and prediction.
[0051] Specifically, the third-party transaction data is divided into a training subset and a validation subset. The training subset is input into the initial global model, and multiple rounds of iterative training are performed. The validation subset is used to monitor the model's convergence status, complete the backpropagation of the loss function, and update the parameters. When the validation subset index meets the preset convergence condition, training stops, the model parameters are saved, and the target global model is obtained. During the training process, regularization techniques such as dropout and weight decay can be used to reduce the risk of overfitting.
[0052] This implementation method performs fuzzy data augmentation processing on the training transaction data during the global model training phase to eliminate temporal interference caused by inconsistent month and day numbers while ensuring that the distribution of transaction amounts remains consistent with the original data. It also alleviates the problem of a single prediction period caused by the reduction of training data and improves the robustness of the model. A normalization strategy is adopted to complete the normalization of global training features before the dataset is split. The temporal features of each individual customer are normalized independently at the granularity of each customer, avoiding the long-tail effect caused by global normalization. Under the condition of limited hardware resources, the training time of the model with tens of millions of samples is significantly shortened, and the training efficiency and prediction accuracy of the target global model are effectively improved.
[0053] In one feasible implementation, please refer to Figure 2 , Figure 2 This is a flowchart illustrating steps S21 to S25 in this embodiment. Step S20 may further include steps S21 to S25: Step S21: Map the data features into multi-dimensional feature vectors, wherein the data features include at least time-series features, calendar features and global features, and the multi-dimensional feature vectors include at least time-series vectors, calendar vectors and global vectors. It should be noted that multidimensional feature vectors are vector forms obtained by mapping and transforming various discrete and statistical data features; time-series vectors are vector expressions obtained by mapping time-series features, calendar vectors are vector expressions obtained by mapping calendar features, and global vectors are vector expressions obtained by mapping global features. Mapping data to a standardized vector form can facilitate subsequent neural network operations.
[0054] Specifically, the preprocessed data features are read, and feature mapping operations are performed on the time-series features, calendar features, and global features respectively. Numerical features are mapped to vectors through linear transformations, and categorical features are converted into corresponding vectors through an embedding layer. Time-series vectors, calendar vectors, and global vectors are generated respectively, and combined to obtain a complete multidimensional feature vector, thus completing the transformation of features from the original feature space to the model input vector space.
[0055] Step S22: Input the multidimensional feature vector into the attention encoder of the target global model to obtain the global attention vector, wherein the global attention vector includes the customer label and transaction sequence vector corresponding to the target customer; It should be noted that the attention encoder is an encoding module built on the attention mechanism, generally composed of multiple layers of stacked networks. It filters and fuses information from the input vector through attention weight calculation to achieve the focused extraction of key information. Self-attention is an operation that calculates the correlation weights between elements within the same set of sequences. Cross-attention is an operation that calculates the correlation weights between two different sets of sequences to achieve information interaction. The global attention vector is a fused vector output by the attention encoder after performing attention interaction calculations on multi-dimensional feature vectors. Customer labels are used to represent the category or group attributes to which the sample belongs, and the transaction sequence vector is a time-series vector expression obtained by encoding the customer's historical transaction flow.
[0056] Specifically, the multidimensional feature vector output in step S21 is input into the attention encoder. The self-attention encoder in the attention encoder performs self-attention calculation on the temporal vector to mine the dependencies within the transaction sequence itself. The cross-attention encoder performs cross-attention operation on the global vector and the temporal vector to realize the feature interaction fusion of customer global attributes and temporal transaction information. After encoding and fusion, the global attention vector is output, which integrates customer tag information and transaction sequence vector information.
[0057] Step S23: Input the global attention vector into the preset hybrid expert module in the target global model, and determine the expert network corresponding to the target customer through the routing network in the hybrid expert module. The hybrid expert module includes a routing network and multiple expert networks. It should be noted that the hybrid expert module is a multi-branch neural network structure that can break down complex modeling tasks and assign them to multiple sub-networks for processing. It dynamically activates some sub-networks to participate in the computation based on the features of the input samples. The routing network is the selection sub-network within the hybrid expert module, which is used to receive sample features, calculate the matching weights between each expert network and the current sample, and complete the scheduling and selection of expert networks. The expert networks are several independent feedforward neural networks. Each expert network learns a non-linear mapping relationship from input to output, and different expert networks can fit different data distribution patterns.
[0058] Step S24: Convert the transaction sequence vector into a high-order feature sequence through the expert network corresponding to the target customer; Step S25: Input the high-order feature sequence into the prediction module of the target global model, and generate the first prediction data through the prediction module.
[0059] It should be noted that the higher-order feature sequence is the feature sequence obtained after the original input vector has undergone multiple nonlinear transformations in a neural network. Compared with the original input, it can represent more abstract and deeper data relationships. The prediction module, also known as the prediction head, is the output sub-module at the end of the neural network, which maps the higher-order features extracted by the previous network to the task target output.
[0060] Specifically, the global attention vector is input into the routing network of the hybrid expert module. The routing network calculates the matching weight of each expert network based on the input vector. One or more expert networks that are suitable for the current sample are selected as the target expert network according to the weight. The transaction sequence vector carried by the global attention vector is sent to the target expert network selected in step S23. The expert network performs linear operations and nonlinear activation transformations on the transaction sequence vector layer by layer to mine the abstract nonlinear correlation within the transaction data and output the high-order feature sequence. The high-order feature sequence output by the expert network is input into the prediction module. The prediction module performs feature parsing and mapping calculation on the high-order feature sequence and outputs the prediction result of the customer's future transaction in the group dimension. At the same time, the credibility evaluation information can be calculated by combining the feature matching degree to obtain the first prediction data. For example, the prediction module can be constructed by pooling layers. A single prediction pooling layer can be used to predict the occurrence date and amount of a future transaction. The high-order feature sequence is grouped according to the prediction offset. The sequence segments at specific offset positions are processed by multiple fully-connected networks (FCN). The data processing process can be expressed by formula (1): (1) in, i Represents the predicted offset. x i Represents the first in the historical sequencei A vector, F i Representing the i Input sequence fragments of each FCN module seq_len The length of the historical sequence. pre_len To predict the sequence length.
[0061] This implementation maps temporal features, calendar features, and global features into multi-dimensional feature vectors. It leverages the self-attention operation of the attention encoder to mine behavioral patterns within the customer's historical transaction sequence and uses cross-attention operation to achieve interactive fusion of transaction sequence features and customer static attribute features. Common features are extracted from personalized transaction data to obtain a global attention vector. Then, the routing network of the hybrid expert module dynamically selects the appropriate expert network based on the customer group's pattern characteristics, realizing clustering and differentiated nonlinear processing of different customer groups. This avoids the mean regression problem caused by mixed training of multi-group data. The prediction module generates the first prediction data, which fully combines customer transaction history and customer profile information, improving the generalization ability and prediction accuracy of the global model.
[0062] In one feasible implementation, the attention encoder includes a self-attention encoder and a cross-attention encoder, and step S22 may further include steps S221 to S222: Step S221: Extract the temporal vector and global vector from the multidimensional feature vector, and input the temporal vector into the self-attention encoder to obtain the enhanced transaction features; Step S222: Input the enhanced transaction features and global vector into the cross-attention encoder to obtain the global attention vector.
[0063] It should be noted that the self-attention encoder is a feature encoding module built on the self-attention mechanism, which can perform correlation calculations on features at various positions within a sequence and uncover the dependencies between elements within the sequence itself; the enhanced transaction feature is a transaction sequence feature vector that has been updated and strengthened after self-attention calculation; the cross-attention encoder is a feature encoding module built on the cross-attention mechanism, which supports mutual attention interaction between two sets of features from different sources, fusing information from one set of features into another set of features to achieve information association between different types of features; the global attention vector is an integrated encoding vector output after fusing customer transaction time-series information and customer global attribute information.
[0064] Specifically, the multidimensional feature vector is dimensionally split to separate the time-series vector representing transaction time-series information, which is then input into the self-attention encoder. The encoder calculates the attention weight between each transaction time-series feature and the other transaction time-series features. Based on the weights, the original time-series features are weighted and aggregated to complete the information interaction within the sequence, resulting in enhanced transaction features. The self-attention encoder can be configured with multi-head attention units, layer normalization units, and feedforward network units. The enhanced transaction features and the global vector are then input into the cross-attention encoder. The enhanced transaction features are used as the query end, and the global vector is used as the key and value end to perform cross-attention operations, completing the injection of customer basic attribute information into the transaction sequence features. After feature transformation through layer normalization and the feedforward network, the fused global attention vector is output.
[0065] This implementation method sets up a dual encoding module containing a self-attention encoder and a cross-attention encoder. First, the self-attention encoder is used to mine the inherent temporal dependencies within the transaction sequence to obtain enhanced transaction features. Then, the cross-attention encoder is used to realize cross-feature interaction and fusion of transaction sequence features and customer global attribute features. This takes into account both individual transaction behavior patterns and common features of the group, thereby improving the accuracy of the prediction results of the transaction prediction method.
[0066] In one feasible implementation, the transaction prediction method further includes steps A10 to A30 before step S10: Step A10: Obtain the historical transaction sequence of the target customer, and calculate the autocorrelation coefficients corresponding to multiple lag orders by using a preset Fourier transform algorithm. It should be noted that the historical transaction sequence is a time series consisting of all historical transaction data of the target customer arranged in chronological order, used to characterize the long-term transaction behavior changes of the customer; the lag order is an order parameter used in time series analysis to characterize the time interval between the current transaction and historical transactions; the autocorrelation coefficient is a statistical indicator used to quantify the degree of correlation between the data of the same time series under different lag orders, and the higher the value, the stronger the correlation between the time series; the Fourier transform algorithm is a signal processing algorithm that converts time-domain time series signals into frequency-domain signals, which can efficiently extract time series periodic patterns and calculate time series correlations.
[0067] Specifically, based on the unique identifier of the target customer, the archived historical transaction records of that customer's account are retrieved from the account transaction database stored on the business side. These historical transaction records are sorted by transaction occurrence time, and invalid test data and voided reversal records are filtered to obtain the historical transaction sequence. A Fast Fourier Transform (FFT) is used to transform the historical transaction sequence from the time domain to the frequency domain. The product of the frequency domain sequence and its complex conjugate is calculated, and then an Inverse Fourier Transform (IFT) is performed to transform the result back to the time domain, obtaining the autocorrelation coefficients corresponding to each lag order. This step significantly reduces the time complexity of solving the autocorrelation function to obtain the autocorrelation coefficients, thus improving the training speed of the personalized model.
[0068] Step A20: Based on their respective correlation coefficients and the preset lag order selection algorithm, the target lag order corresponding to the target customer is obtained; Step A30: Based on the historical transaction sequence and the target lag order, train the preset initial single-person model to obtain the personalized model corresponding to the target customer.
[0069] It should be noted that the lag order selection algorithm is a standardized screening strategy used to select the optimal time-series lag parameters, which is used to select the parameters that best fit the customer's trading patterns from multiple sets of lag orders; the target lag order is the optimal lag order parameter selected for the current target customer, which is used to accurately match the individual customer's trading time-series dependency patterns; the initial single-person model is a personalized model base network that has not undergone iterative training with customer data and parameter initialization.
[0070] Specifically, the multi-order autocorrelation coefficients obtained in step A10 are input into the lag order selection algorithm. Based on the decay law of the autocorrelation coefficients, significance threshold, and fitting error index, the algorithm eliminates invalid lag orders with weak correlation and poor fitting effect, and retains the lag order with the strongest time series correlation and best characterizing the individual transaction characteristics of the customer, which is determined as the target lag order corresponding to the target customer. Using the target lag order as the time series slicing standard, the historical transaction sequence of the target customer is reconstructed and features are constructed to generate training samples that fit the optimal time series pattern of the customer. The reconstructed exclusive time series samples are input into the initial single-person model to complete multiple rounds of iterative training, parameter updates, and convergence verification. After training, the exclusive model parameters are saved to obtain a personalized model that fits the individual transaction pattern of the target customer.
[0071] This implementation method uses the Fourier transform algorithm to calculate the time-series correlation of customers' historical transaction sequences, accelerating the calculation of autocorrelation coefficients corresponding to different lag orders. This significantly reduces the computational cost of lag operator features for customers with tens of millions of customers. Combined with a lag order selection algorithm, it selects a target lag order that matches the individual transaction patterns of customers. Based on the optimal lag order, it reconstructs customer-specific time-series samples and completes the iterative training of the initial single-person model. This method can adapt to the personalized time-series features of different customers and avoid the time-series feature extraction bias caused by fixed lag parameters. It not only solves the computing power bottleneck in large-scale "one person, one model" scenarios, but also significantly improves the fitting accuracy and prediction reliability of personalized models for niche and non-group transaction behaviors.
[0072] In one feasible implementation, please refer to Figure 3 , Figure 3 This is a flowchart illustrating steps S31 to S36 in this embodiment. Step S30 may further include steps S31 to S36: Step S31: Based on the target customer's identity identifier, extract the individual transaction sequence corresponding to the target customer from the data features; Step S32: Input the individual transaction sequence into the personalized model to generate the original prediction result; It should be noted that the target customer's identity identifier is an identification field used within the business system to uniquely distinguish different customers. It can be a customer number or a unique customer code, used to locate a single customer's data in a mixed set of data features from multiple customers; the single-person transaction sequence is the transaction time series data of the target customer; the raw prediction result is the preliminary prediction output directly from the personalized model without quality verification.
[0073] Specifically, the integrated set of data features is read, and the target customer's identity is used as the retrieval index. The time-series data belonging only to the customer is filtered out from the data features, and transaction-related data of other customers are removed to extract the individual transaction sequence corresponding to the customer. The individual transaction sequence is encoded into a vector format that the model can accept, and input into the personalized model exclusive to the customer to complete the forward inference calculation. The model reads the transaction change features inside the sequence and outputs the original prediction result of the customer's transaction.
[0074] Step S33: Extract the backtracking verification sequence from the single-person transaction sequence according to the preset verification window; Step S34: Perform backtracking tests on the personalized model based on the backtracking verification sequence to obtain the backtracking matching score corresponding to the original prediction result; Step S35: If the retrospective matching score is greater than or equal to the preset retrospective score threshold, the original prediction result is used as the second prediction result. Step S36: If the backtracking matching score is less than the preset backtracking score threshold, then the second prediction data is marked as invalid.
[0075] It should be noted that the verification window is a pre-configured time window parameter used to define the data range used in backtracking testing; the backtracking verification sequence is a subsequence of real historical transactions extracted from the complete single-person transaction sequence according to the verification window. This sequence contains the true values of the actual transactions and is used to conduct backtracking quality verification; backtracking testing is a quality assessment method that uses the historical subsequence of known true values to conduct simulation predictions and compares the model simulation output with the true values of real transactions; the backtracking matching score is a score that quantifies the degree of fit between the model prediction output and the real transactions; the backtracking score threshold is a pre-set credibility judgment threshold used to distinguish between usable and unusable model outputs, which can be configured and adjusted according to business scenarios; marking as invalid means that the current personalized model output lacks credibility, and the prediction result of this path will not participate in subsequent orchestration and fusion calculations to avoid low-quality output interfering with the final transaction prediction result.
[0076] Specifically, the system reads the preset verification window configuration, which can be configured with a fixed duration, such as the most recent 3 months or the most recent 6 months. Based on the start and end time boundaries of the window, the complete single-person transaction sequence is sliced and extracted to extract real transaction records falling within the window time range, which are then assembled into a backtracking verification sequence. The first part of the backtracking verification sequence is input into the personalized model for simulation inference to obtain the simulation prediction output. The simulation prediction output is compared with the known real transaction values of the latter part of the backtracking verification sequence, and the backtracking matching score is calculated by combining the error and fit index. The backtracking matching score is compared with the preset backtracking score threshold. When the backtracking matching score is greater than or equal to the threshold, the output of the personalized model is determined to be credible, and the original prediction result is directly determined as the second prediction result and participates in the subsequent multi-model orchestration and fusion calculation. When the backtracking matching score is lower than the backtracking score threshold, the current personalized model output quality of the customer is determined to be substandard, and the second prediction data is marked as invalid. In the subsequent multi-model orchestration and fusion, the invalid prediction data is not included in the fusion calculation. The system can persistently store the backtracking matching score output from each inference calculation, forming a time-series record of the backtracking score for the customer's personalized model. The system continuously monitors the score, and when a sharp drop in the backtracking matching score is detected, it automatically generates and pushes an alarm message to remind relevant personnel to check the distribution of underlying transaction data, sample conditions, and the running status of the personalized model, so as to facilitate timely handling operations such as model retraining and parameter verification.
[0077] This implementation method extracts individual transaction sequences based on target customer identification and inputs them into a personalized model to obtain the original prediction results. A pre-defined verification window is used to extract backtesting sequences from the individual transaction sequences for backtesting testing. A backtesting matching score is calculated, and a quality gating judgment is achieved in the inference stage by combining the backtesting score threshold. Specific checks are performed to address the issues of overfitting and divergent prediction results in personalized models, promptly intercepting the output of personalized models with insufficient credibility. This prevents low-quality prediction results from interfering with the fusion calculation of multi-path models. This approach retains the ability of personalized models to capture individual customer transaction characteristics while reducing the negative impact of abnormal outputs on the final prediction results, thus improving the stability and reliability of the transaction prediction method.
[0078] In one feasible implementation, step S40 may include steps S41-S42: Step S41: Input data features into the experience model, retrieve the data features based on the rule knowledge base in the experience model, and obtain business rules that match the data features; Step S42: Based on data characteristics and business rules, generate third prediction data through empirical model prediction.
[0079] It should be noted that the experience model is a rule-driven predictive model built upon the knowledge of business experts and historical business statistics; the rule knowledge base is a collection of pre-stored deterministic business rules, which are derived from historical transaction statistics and the experience of business experts; the business rules are deterministic business logics summarized from customer transaction behavior, which can be used to characterize periodic and fixed-event transaction behaviors, such as: automatic deduction of mortgage repayments on the 25th of each month, payment of fixed deposit interest on the 20th of the last month of each quarter, a high probability of triggering wealth management subscriptions and large transfers within 3-7 days after a large amount of income, and the accompanying expenses of property fees and utilities after rental income is received, etc.
[0080] Specifically, the data features extracted in step S10 are input into the empirical model. The empirical model reads all business rules from the pre-stored rule knowledge base and matches the customer attributes, calendar information, and historical statistical features in the data features with the triggering conditions of each business rule one by one. One or more business rules whose triggering conditions match the current data features are selected. The matched business rules are called, and combined with the customer account information, time information, and historical statistical information carried by the data features, the model performs inference according to the built-in calculation logic of the business rules to generate the corresponding predicted transaction time and predicted transaction amount, which are then assembled into third-party prediction data. If multiple business rules are matched simultaneously, the output results of the multiple rules are merged to obtain the complete third-party prediction data. For example, if the business rule "the 10th of each month is the payday" is matched, combined with the monthly salary amount obtained from the customer's historical salary transaction statistics, the empirical model predicts that a fixed salary will be deposited on the 10th of the following month, and the transaction time and salary amount are encapsulated as third-party prediction data.
[0081] This implementation method inputs data features into an empirical model, retrieves business rules matching the current customer data features from a rule knowledge base, and generates third-party prediction data by combining the calculation logic of the business rules. The empirical model can capture periodic, event-driven deterministic transaction behaviors, compensating for the shortcomings of global and personalized machine learning models in fitting specific business rule scenarios. It provides expert experience-based prediction basis for subsequent multi-model orchestration and fusion, enriches the sources of prediction information, improves the adaptability of the final transaction prediction results to fixed-period business events, and further enhances the analytical dimensions and accuracy of the transaction prediction method.
[0082] In one feasible implementation, step S50 may include steps S51-S52: Step S51: Read the historical prediction results for the target customer in the previous prediction period, corresponding to the global model, personalized model, and empirical model respectively. Step S52: Compare the historical prediction results with the original transaction data to obtain the real-time quality scores corresponding to the target global model, personalized model and empirical model respectively. It should be noted that the prediction period is the execution process range corresponding to a single complete model prediction behavior. Each complete prediction inference process corresponds to an independent prediction period. The historical prediction results are the first prediction data, the second prediction data, and the third prediction data independently output by the three types of models in the previous prediction period. The original transaction data is the real transaction flow truth data that has actually occurred and has been archived, obtained through step S10. The real-time quality score is a dynamic score that quantifies the accuracy and reliability of a single model's prediction in this round. It can reflect the fitting effect of different models under the current customer and current data distribution in real time. The higher the score, the higher the accuracy of the model's prediction in this round.
[0083] Specifically, the system retrieves historical prediction log data from local or data warehouse storage. Based on the unique identifier of the target customer, it locates the previous complete prediction period corresponding to the target customer and extracts the group-dimensional prediction results output by the global model, the individual-specific prediction results output by the personalized model, and the rule-matching prediction results output by the experience model. The previous historical prediction results of each of the three models are compared with the actual original transaction data of the customer within the corresponding period. The fitting accuracy is calculated from multiple dimensions, including transaction time error, transaction amount error, and transaction type matching degree. Combined with preset scoring calculation rules, the real-time quality scores corresponding to the target global model, personalized model, and experience model are quantified, achieving dynamic quantitative evaluation of the prediction effect of the three models. For example, the predicted transaction amount and transaction time output by the three models in the previous complete prediction behavior are compared with the customer's actual income and expenditure flow during the corresponding period to calculate the accuracy, resulting in a global model quality score of 0.82, a personalized model quality score of 0.91, and an experience model quality score of 0.87.
[0084] Step S60 may include steps S61 to S62: Step S61: Based on the real-time quality scores corresponding to the target global model, personalized model, and empirical model, calculate the score weights corresponding to the first predicted data, the second predicted data, and the third predicted data, respectively. Step S62: Read the preset business configuration parameters, and calculate the first prediction data, the second prediction data, and the third prediction data based on the preset integration strategy, according to the scoring weights and business configuration parameters, to obtain the transaction prediction result. The integration strategy includes at least one of weighted calculation, dynamic model filtering, and stacked integration.
[0085] It should be noted that the scoring weight is a fusion weight coefficient dynamically allocated based on the real-time prediction accuracy of each model, used to characterize the contribution ratio of single-path prediction data in the final result. The scoring weight is positively correlated with the real-time quality score of the model. The business configuration parameters are scenario constraint parameters, weight correction parameters, and model priority parameters preset by the business side, used to adapt to the prediction needs of different customer groups and different transaction scenarios. The integration strategy is the fusion calculation mechanism of the prediction results of multiple models, including but not limited to weighted calculation, dynamic model selection, stacked integration, etc. Weighted calculation is a method of fusion of multiple prediction results by weighting, dynamic model selection is a method of selecting the high-precision model output and discarding the low-precision model output, and stacked integration is a method of fusing the prediction information of multiple models by stacking multiple layers of features.
[0086] Specifically, based on the real-time quality scores of the three types of models, a normalization algorithm is used to convert each score into a corresponding dynamic score weight, making the sum of all model weights a fixed value. The system reads the preset business configuration parameters, combines the score weights of each prediction data source, and calls an integration strategy adapted to the current business scenario: if weighted calculation is used, the three types of prediction data are weighted and fused according to the score weights; if dynamic model screening is used, the high-precision model prediction data that meets the quality score standard is selected for fusion; if stacked integration is used, multi-level feature stacking fusion is performed on multiple prediction data sources, and finally, a unified and accurate customer transaction prediction result is output.
[0087] This implementation compares the prediction data of each model from the previous period with the actual original transaction data of customers acquired in the current period, and obtains the quality score corresponding to each model in real time. Then, it dynamically generates the fusion weight of each prediction data based on the quality score. Combined with preset business configuration parameters and multiple integration strategies, it adaptively fuses the three types of prediction data output by the global model, personalized model and experience model. It can dynamically adjust the contribution ratio of each model according to the real-time prediction accuracy, and fully combine the group common fitting ability of the global model, the individual feature capture ability of the personalized model and the business rule adaptation ability of the experience model. It leverages the strengths and avoids the weaknesses, and selects the best to fuse multiple prediction information, effectively reducing the one-sidedness and error of single model prediction, and significantly improving the accuracy, stability and scenario adaptability of the transaction prediction method.
[0088] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the transaction prediction method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0089] This application also provides a transaction prediction device, please refer to... Figure 4 The transaction prediction device includes: The data acquisition module 10 is used to acquire the original transaction data of the target customer and extract the data features from the original transaction data; Prediction module 20 is used to generate first prediction data, second prediction data and third prediction data based on data features through a target global model, a personalized model and an empirical model; The quality inspection module 30 is used to determine the real-time quality scores corresponding to the target global model, the personalized model and the experience model respectively based on the preset quality scoring rules. The orchestration module 40 is used to calculate the transaction prediction results of the target customer based on the first prediction data, the second prediction data and the third prediction data, according to the preset orchestration rules.
[0090] The transaction prediction device provided in this application, employing the transaction prediction method in the above embodiments, can solve the technical problems of single analytical dimensions and low accuracy in transaction prediction methods. Compared with the prior art, the beneficial effects of the transaction prediction device provided in this application are the same as those of the transaction prediction method provided in the above embodiments, and other technical features in the transaction prediction device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0091] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the transaction prediction method in Embodiment 1 above.
[0092] The following is for reference. Figure 5 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0093] like Figure 5As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. While electronic devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0094] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0095] The electronic device provided in this application, employing the transaction prediction method described in the above embodiments, can solve the technical problems of single analytical dimensions and low accuracy in transaction prediction methods. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the transaction prediction method provided in the above embodiments, and other technical features of this electronic device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0096] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0097] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0098] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the transaction prediction method in the above embodiments.
[0099] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0100] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0101] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by an electronic device, cause the electronic device to: Obtain the original transaction data of the target customer and extract the data features from the original transaction data; Based on the data features, first prediction data is generated using a pre-trained target global model; Obtain the individual transaction sequence corresponding to the target customer from the data features, and generate second prediction data based on the individual transaction sequence through the personalized model corresponding to the target customer, wherein the personalized model is trained through the historical transaction sequence of the target customer; Based on the data characteristics and the preset rule knowledge base, third prediction data is generated through a preset experience model; Based on the first prediction data, the second prediction data, and the third prediction data, the transaction prediction result of the target customer is calculated according to the preset arrangement rules.
[0102] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0104] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0105] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described transaction prediction method, thereby solving the technical problems of the single analytical dimension and low accuracy of the transaction prediction method. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the transaction prediction method provided in the above embodiments, and will not be repeated here.
[0106] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the transaction prediction method described above.
[0107] The computer program product provided in this application can solve the technical problems of single analytical dimensions and low accuracy in transaction prediction methods. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the transaction prediction methods provided in the above embodiments, and will not be repeated here.
[0108] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A transaction prediction method, characterized in that, The method includes: Obtain the original transaction data of the target customer and extract the data features from the original transaction data; Based on the data features, first prediction data is generated using a pre-trained target global model; Obtain the individual transaction sequence corresponding to the target customer from the data features, and generate second prediction data based on the individual transaction sequence through the personalized model corresponding to the target customer, wherein the personalized model is trained through the historical transaction sequence of the target customer; Based on the data features and the preset rule knowledge base, a third prediction data is generated through a preset experience model; Based on preset quality scoring rules, determine the real-time quality scores corresponding to the target global model, the personalized model, and the experience model, respectively. Based on the first prediction data, the second prediction data, the third prediction data, and each of the real-time quality scores, the transaction prediction result for the target customer is calculated according to the preset arrangement rules.
2. The method as described in claim 1, characterized in that, The step of determining the real-time quality scores corresponding to the target global model, the personalized model, and the empirical model based on preset quality scoring rules includes: Read the historical prediction results of the target customer in the previous prediction period, corresponding to the target global model, the personalized model, and the experience model, respectively. The historical prediction results are compared with the original transaction data to obtain the real-time quality scores corresponding to the target global model, the personalized model, and the empirical model, respectively. The step of calculating the transaction prediction result of the target customer based on the first prediction data, the second prediction data, the third prediction data, and each of the real-time quality scores, according to a preset arrangement rule, includes: Based on the real-time quality scores corresponding to the target global model, the personalized model, and the empirical model, the score weights corresponding to the first predicted data, the second predicted data, and the third predicted data are calculated respectively. Read the preset business configuration parameters, and calculate the first prediction data, the second prediction data, and the third prediction data based on the preset integration strategy and the scoring weights and the business configuration parameters to obtain the transaction prediction result. The integration strategy includes at least one of weighted calculation, dynamic model filtering, and stacked integration.
3. The method as described in claim 1, characterized in that, The step of generating third prediction data based on the data features and a preset rule knowledge base, using a preset empirical model, includes: Input the data features into the experience model, and retrieve the data features based on the rule knowledge base in the experience model to obtain business rules that match the data features; Based on the data characteristics and the business rules, the third prediction data is generated through the empirical model.
4. The method as described in claim 1, characterized in that, Prior to the step of obtaining the target customer's original transaction data, the method further includes: The historical transaction sequence of the target customer is obtained, and the historical transaction sequence is calculated using a preset Fourier transform algorithm to obtain the autocorrelation coefficients corresponding to multiple lag orders. Based on the autocorrelation coefficients and the preset lag order selection algorithm, the target lag order corresponding to the target customer is obtained; Based on the historical transaction sequence and the target lag order, a preset initial single-person model is trained to obtain a personalized model corresponding to the target customer.
5. The method as described in claim 4, characterized in that, The step of obtaining the individual transaction sequence corresponding to the target customer from the data features, and generating second prediction data based on the individual transaction sequence through a preset personalized model, includes: Based on the target customer's identity identifier, extract the individual transaction sequence corresponding to the target customer from the data features; Input the individual transaction sequence into the personalized model to generate the original prediction result; Based on the preset verification window, a backtracking verification sequence is extracted from the single-person transaction sequence; The personalized model is backtested based on the backtesting sequence to obtain the backtesting matching score corresponding to the original prediction result; If the backtracking matching score is greater than or equal to the preset backtracking score threshold, the original prediction result is used as the second prediction data; If the backtracking matching score is less than a preset backtracking score threshold, the second predicted data will be marked as invalid.
6. The method as described in claim 1, characterized in that, Prior to the step of obtaining the target customer's original transaction data, the method further includes: Acquire training transaction data from multiple customers, and perform data augmentation on the training transaction data according to preset calendar difference processing rules and / or preset transaction date offset rules to obtain first transaction data; Extract the training global features from the first transaction data, and normalize the training global features to obtain the second transaction data; For each customer's individual time-series feature in the second transaction data, the individual time-series feature is normalized to obtain the third transaction data. Based on the third transaction data, the preset initial global model is trained to obtain the target global model.
7. The method as described in claim 1, characterized in that, The step of generating the first prediction data based on the data features using a pre-trained target global model includes: The data features are mapped to multidimensional feature vectors, wherein the data features include at least time-series features, calendar features, and global features, and the multidimensional feature vectors include at least time-series vectors, calendar vectors, and global vectors; The multidimensional feature vector is input into the attention encoder of the target global model to obtain a global attention vector, wherein the global attention vector includes the customer label and transaction sequence vector corresponding to the target customer; The global attention vector is input to a preset hybrid expert module in the target global model, and the expert network corresponding to the target customer is determined through the routing network in the hybrid expert module. The hybrid expert module includes the routing network and multiple expert networks. The transaction sequence vector is converted into a high-order feature sequence through the expert network corresponding to the target customer; The high-order feature sequence is input into the prediction module of the target global model, and the prediction module generates the first prediction data.
8. The method as described in claim 7, characterized in that, The attention encoder includes a self-attention encoder and a cross-attention encoder. The step of inputting the multi-dimensional feature vector into the attention encoder of the target global model to obtain the global attention vector includes: Extract the temporal vector and the global vector from the multidimensional feature vector, and input the temporal vector into the self-attention encoder to obtain enhanced transaction features; The enhanced transaction features and the global vector are input into the cross-attention encoder to obtain the global attention vector.
9. An electronic device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the transaction prediction method as described in any one of claims 1 to 8.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the transaction prediction method as described in any one of claims 1 to 8.