Feature extraction method and device, equipment, storage medium and product
By extracting and deriving trading mode features based on time windows and statistical dimensions in the financial trading system, and using a quasi-real-time computing framework for sliding window calculations, the problem of feature extraction delay is solved, and efficient and real-time feature extraction is achieved to meet the rapid decision-making needs of financial institutions.
Patent Information
- Application Number
- CN202411494473.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-03-14
AI Technical Summary
The delay in feature extraction in the prior art causes financial institutions to fail to meet the needs of real-time analysis and rapid decision-making, which affects the efficiency of risk management and customer service.
By extracting the trading mode feature quantity from the target trading system based on the preset time window information and preset statistical dimensions, and performing feature derivation based on the preset feature derivation strategy, a sliding window calculation is used to realize the statistics of multiple time windows, multiple dimensions and multiple statistics.
It significantly improves the timeliness and efficiency of feature extraction of trading modes in the financial field, and can perform feature extraction without waiting for settlement of natural day or trading day, thereby meeting application scenarios with high real-time requirements.
Smart Images

Figure CN119622302A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of feature extraction technology, and in particular to a feature extraction method, device, equipment, storage medium and product. Background Art
[0002] In the financial sector, feature extraction technology plays a vital role, especially in the analysis of capital transaction patterns for corporate customers. With the development of big data and machine learning technology, financial institutions are increasingly relying on in-depth analysis of customer transaction data to identify potential risks, optimize services, and improve efficiency. These analyses usually require extracting key features from a large number of transaction records in order to build accurate prediction models.
[0003] Currently, feature extraction mainly relies on offline data processing technology. Specifically, financial institutions extract transaction pattern features through batch computing jobs after the transaction data is fully ready. Although this method can process large amounts of data, its main drawback is its lack of timeliness. Feature data usually needs to be ready the next day or later after the transaction is completed, which makes it unable to meet application scenarios with extremely high real-time requirements, such as transaction anomaly monitoring. In these scenarios, quickly identifying and responding to abnormal transaction behavior is crucial to preventing fraud and protecting customer assets.
[0004] Therefore, the main problem faced by existing technologies is the delay in feature extraction. This delay not only limits the ability of financial institutions to analyze transaction data in real time, but also affects their ability to make decisions in a rapidly changing market environment. In addition, due to the low frequency of feature data updates, financial institutions may not be able to capture the latest changes in customer transaction behaviors in a timely manner, thus affecting the efficiency of risk management and customer service.
[0005] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0006] The main purpose of this application is to provide a feature extraction method, device, equipment, storage medium and computer program product, aiming to improve the timeliness and efficiency of feature extraction of transaction patterns in the financial field.
[0007] To achieve the above purpose, the present application proposes a feature extraction method, which comprises:
[0008] Extracting transaction pattern features from the target transaction system based on preset time window information and preset statistical dimension;
[0009] Feature derivation is performed based on a preset feature derivation strategy and the transaction pattern feature quantity to obtain the transaction pattern derived feature quantity.
[0010] In one embodiment, the time window information includes a first time window and / or a second time window, and the step of extracting a transaction pattern feature from a target transaction system based on the preset time window information and a statistical dimension includes:
[0011] Performing aggregation calculation on the historical transaction details acquired within the first time window based on the statistical dimension to obtain a first transaction pattern characteristic value;
[0012] Based on the second time window, a sliding window calculation is performed through a quasi-real-time calculation framework to obtain a second transaction mode characteristic value.
[0013] In one embodiment, the step of performing sliding window calculation based on the second time window through a quasi-real-time calculation framework to obtain the second transaction mode feature value includes:
[0014] Generate a corresponding number of quasi-real-time computing frameworks according to the statistical dimension;
[0015] Determining a sliding statistical association relationship between the plurality of quasi-real-time computing frameworks and corresponding target statistics;
[0016] Based on the sliding statistical association relationship, a sliding window calculation is performed on the target statistic through the quasi-real-time calculation framework to obtain a second transaction mode characteristic value.
[0017] In one embodiment, the step of performing feature derivation based on a preset feature derivation strategy and the transaction pattern feature quantity to obtain the transaction pattern derived feature quantity comprises:
[0018] Determine a target feature derivative strategy according to the statistical dimension corresponding to the transaction pattern feature, wherein the target feature derivative strategy includes a trend derivative strategy or a proportion derivative strategy;
[0019] Perform trend derivation on the transaction pattern feature quantity according to the trend derivation strategy to obtain the transaction pattern trend derivation feature quantity; and / or,
[0020] The transaction pattern characteristic quantity is subjected to proportion derivation according to the proportion derivation strategy to obtain the transaction pattern proportion derived characteristic quantity.
[0021] In one embodiment, the step of performing trend derivation on the transaction pattern feature quantity according to the trend derivation strategy to obtain the transaction pattern trend derived feature quantity comprises:
[0022] Obtaining time window information corresponding to the transaction mode characteristic quantity;
[0023] Acquire several historical time window statistics within a preset time period based on the time window information;
[0024] Calculating the change rate of adjacent window statistics based on the several historical time window statistics;
[0025] The adjacent window statistic change rate is determined as the transaction pattern derived feature.
[0026] In one embodiment, the step of deriving the transaction mode feature quantity by proportion according to the proportion derivation strategy to obtain the transaction mode proportion derived feature quantity includes:
[0027] Obtaining statistical component information and statistical total amount information corresponding to the transaction pattern characteristic quantity;
[0028] Calculate the statistical quantity proportion based on the statistical quantity component information and the statistical quantity total quantity information;
[0029] The statistical proportion is determined as a derived characteristic quantity of the transaction pattern.
[0030] In addition, to achieve the above purpose, the present application also proposes a feature extraction device, which includes:
[0031] An extraction module, used for extracting transaction pattern feature quantities from a target transaction system based on preset time window information and preset statistical quantity dimensions;
[0032] The derivation module is used to perform feature derivation based on a preset feature derivation strategy and the transaction pattern feature quantity to obtain the transaction pattern derived feature quantity.
[0033] In addition, to achieve the above objectives, the present application also proposes a feature extraction device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the feature extraction method described above.
[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which 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, the steps of the feature extraction method described above are implemented.
[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the feature extraction method described above are implemented.
[0036] One or more technical solutions proposed in the present application extract transaction pattern characteristics from the target transaction system based on preset time window information and preset statistical dimensions; perform feature derivation based on a preset feature derivation strategy and the transaction pattern characteristics to obtain transaction pattern derived characteristics. Through the above solution, statistics of multiple time windows, multiple different dimensions, and multiple statistics can be achieved without waiting for a natural day or trading day settlement to perform feature extraction. In addition, feature derivation can be performed for some features that cannot be counted but are needed, thereby significantly improving the timeliness and efficiency of transaction pattern feature extraction in the financial field. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0039] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the feature extraction method of the present application;
[0040] Figure 2 Schematic diagram of the online feature computer storage process of the feature extraction method of this application
[0041] Figure 3 A schematic diagram of a flow chart provided for the second embodiment of the feature extraction method of the present application;
[0042] Figure 4 This is a schematic diagram of the module structure of the feature extraction device according to an embodiment of the present application;
[0043] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the feature extraction method in the embodiment of the present application.
[0044] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0045] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0046] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0047] The main solution of the embodiment of the present application is: a method for feature extraction and quasi-real-time deployment of corporate customer transaction patterns. The solution aims to solve the problem of insufficient timeliness of feature extraction in the prior art, especially in business scenarios that require real-time monitoring, such as transaction anomaly monitoring. Specifically, this solution adopts a feature extraction method based on a time window, and characterizes the customer's transaction pattern through multi-dimensional, multi-window numerical statistics to extract multi-dimensional transaction pattern features. This method uses time windows of different lengths, including short time windows and long time windows from 3 minutes to 61 days, to count multiple dimensions of transactions and calculate a variety of statistics, such as the number of transactions, total transaction amount, maximum transaction amount, etc. In addition, this solution also includes feature derivation methods, such as trend derivation and proportion derivation, to further enrich feature dimensions.
[0048] In order to improve the timeliness of feature extraction, this solution adopts a quasi-real-time feature calculation solution based on Flink. For short windows within 48 hours, the Flink open source computing framework is used for quasi-real-time feature calculation. By developing Flink programs for different time windows, the sliding window function of Flink is used to perform window calculations, and the calculation results of multiple Flink programs are summarized. For windows of 48 hours and above, the Spark offline computing engine is used for aggregation calculations. In addition, this solution also uses Redis as a feature cache to achieve fast feature access response to meet the real-time model's requirements for response time and request QPS. In this way, this solution can greatly improve the timeliness of feature extraction, thereby meeting the needs of downstream modeling scenarios with high real-time requirements.
[0049] Because the feature extraction of existing technologies mainly relies on offline data processing technology. Specifically, financial institutions will extract transaction pattern features through batch computing jobs after the transaction data is fully ready. Although this method can process a large amount of data, its main drawback is that it lacks timeliness. Feature data usually needs to be prepared the next day or later after the transaction is completed, which makes it unable to meet those application scenarios with extremely high real-time requirements, such as transaction anomaly monitoring. In these scenarios, quickly identifying and responding to abnormal transaction behavior is crucial to preventing fraud and protecting customer assets.
[0050] Therefore, the main problem faced by existing technologies is the latency of feature extraction. This latency not only limits financial institutions’ ability to analyze transaction data in real time, but also affects their ability to make decisions in a rapidly changing market environment. In addition, due to the low frequency of feature data updates, financial institutions may not be able to capture the latest changes in customer transaction behaviors in a timely manner, thus affecting the efficiency of risk management and customer service. These shortcomings highlight the need for a more efficient and real-time feature extraction method so that financial institutions can better adapt to the challenges of modern financial markets.
[0051] The present application provides a solution, by extracting transaction pattern feature quantities based on preset time window information and preset statistical quantity dimensions; performing feature derivation based on a preset feature derivation strategy and the transaction pattern feature quantities to obtain transaction pattern derived feature quantities. Through the above solution, statistics of multiple time windows, multiple different dimensions, and multiple statistical quantities can be achieved without waiting for a natural day or a trading day to be settled for feature extraction. In addition, feature derivation can be performed for some features that cannot be counted but are needed, thereby significantly improving the timeliness and efficiency of transaction pattern feature extraction in the financial field.
[0052] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a feature extraction system, etc. The following takes the feature extraction system as an example to illustrate this embodiment and the following embodiments.
[0053] Based on this, the present application embodiment provides a feature extraction method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the feature extraction method of the present application.
[0054] In this embodiment, the feature extraction method includes steps S1000 to S2000:
[0055] Step S1000: extracting transaction pattern feature quantities from the target transaction system based on preset time window information and preset statistical quantity dimensions;
[0056] It should be noted that in order to solve the problem of insufficient timeliness and accuracy of feature extraction of corporate customer transaction patterns, especially in non-counter online banking transaction scenarios, traditional offline data processing methods cannot meet business needs with high real-time requirements, such as transaction anomaly monitoring. To solve this problem, the solution adopts a feature extraction method based on time windows, which comprehensively captures the characteristics of transaction behavior by performing multi-dimensional statistical analysis on transaction data in time windows of different lengths. At the same time, feature derivation strategies such as trend derivation and proportion derivation are introduced to further enrich feature dimensions and reveal deep-level transaction patterns and trends. In order to improve the timeliness of feature extraction, the solution adopts a quasi-real-time feature calculation framework based on Flink, performs sliding window calculation on transaction details, quickly extracts features, and meets real-time requirements. In addition, Redis is used as a high-speed feature cache to meet the pressure of real-time models on response time and request QPS, ensuring that the system can quickly retrieve the features corresponding to a single transaction from the storage system and provide them to the model for scoring. For data in different time windows, the solution combines offline and online computing methods, using the Spark offline computing engine to process data in windows of 48 hours or more, while Flink processes short window data within 48 hours, which not only ensures the accuracy of feature extraction, but also improves timeliness. Through these comprehensive means, this technical solution can provide financial institutions with an efficient and real-time data processing and analysis method to help them better understand and predict customer transaction behaviors, thereby providing stronger support in risk management and customer service.
[0057] First, in this embodiment, the preset time window information and statistical dimension can be used to extract the transaction pattern feature. Time window information refers to the framework for analyzing transaction data within a specific time period, usually including short time windows and long time windows. Short time windows can help capture rapidly changing transaction behaviors, while long time windows help identify long-term trends and patterns. Statistical dimensions refer to different indicators based on which features are extracted, such as the number of transactions, transaction amount, maximum transaction amount, etc. These statistics can fully reflect the characteristics of transaction activities.
[0058] In addition, it should be noted that by performing aggregate calculations on historical transaction details, the system can extract effective transaction pattern features from them. This process not only improves the efficiency of data processing, but also ensures the accuracy of the extraction results. The extracted features will provide important basic data for subsequent analysis and modeling, helping financial institutions better understand customers' transaction behaviors and patterns, thereby providing support for decision-making.
[0059] For example, in a specific implementation, the system first obtains preset time window information, and analyzes historical transaction data based on this information, and finally obtains a series of transaction pattern feature quantities, which will be used for subsequent feature derivation and real-time monitoring.
[0060] Step S2000: deriving features based on a preset feature derivation strategy and the transaction pattern feature quantity to obtain the transaction pattern derived feature quantity.
[0061] It should be noted that, in this embodiment, the extracted transaction pattern feature quantities are further processed and analyzed through a preset feature derivation strategy to generate transaction pattern derived feature quantities. Feature derivation strategy refers to a method for performing a deeper level of analysis based on existing feature quantities after feature extraction, usually including strategies such as trend derivation and proportion derivation. Trend derivation focuses on the changing trend of feature quantities in the time dimension, while proportion derivation focuses on the relative proportion of feature quantities in the whole.
[0062] In addition, it should be noted that by implementing feature derivation strategies, the system can extract more insightful derived features from transaction pattern features. These derived features not only enrich the dimensions of the data, but also reveal potential changes in transaction patterns and customer behavior trends, thereby providing more accurate input data for subsequent machine learning models. The effectiveness of this process directly affects the model's predictive ability and the accuracy of decision support.
[0063] For example, in a specific implementation, the system selects an appropriate feature derivation strategy based on the statistical dimension of the transaction pattern feature quantity, and ultimately generates a series of transaction pattern derived feature quantities, which will be used in application scenarios such as real-time monitoring and anomaly detection.
[0064] In a feasible implementation manner, the time window information includes a first time window and / or a second time window, and step S1000 may include steps S1100 to S1200:
[0065] Step S1100: performing aggregation calculation on the historical transaction details acquired within the first time window based on the statistical dimension to obtain a first transaction pattern feature;
[0066] Step S1200: Based on the second time window, a sliding window calculation is performed through a quasi-real-time calculation framework to obtain a second transaction mode feature value.
[0067] It should be noted that, in this embodiment, the time window information, including the first time window and the second time window, is the basic framework for analyzing transaction data. They correspond to different time ranges and are used to identify short-term transaction behaviors and long-term trends. The customer's transaction pattern is characterized by multi-dimensional, multi-window numerical statistics. Using multiple time windows of different lengths, statistics are performed in multiple different dimensions of the transaction, and multiple statistics are counted at the same time. Referring to Table 1 below, the first time window is usually used to analyze the more recent transaction history, while the second time window covers a longer time span.
[0068] Table 1 Time windows of different lengths
[0069]
[0070] Aggregate computing is the process of processing historical transaction details within the first time window. It aggregates multiple transaction records according to specific statistical dimensions to generate characteristic quantities that describe transaction patterns, such as the number of transactions, total transaction amount, etc. Refer to Table 2 and Table 3 below. The statistical dimensions include account inflows and outflows, transaction types, transaction time, etc. Sliding window computing is performed within the second time window. It uses a quasi-real-time computing framework, such as Flink, to dynamically and continuously analyze transaction data to capture the latest changes in transaction behavior in real time.
[0071] Table 2 Different statistical dimensions
[0072]
[0073] Table 3 Examples of various statistics
[0074]
[0075] In addition, it should be noted that the introduction of the quasi-real-time computing framework has greatly improved the timeliness of feature extraction, enabling it to meet business scenarios with high real-time requirements. This computing framework can perform real-time sliding window statistical calculations on transaction data by generating a corresponding number of computing instances and determining the correlation between these instances and the target statistics, thereby obtaining feature quantities that reflect current transaction activities. These feature quantities include not only static descriptions of transactions, such as transaction amounts and counterparty information, but also dynamically changing trends and proportions, providing rich information for in-depth understanding of customers' transaction patterns.
[0076] For example, in a feasible implementation, the system first configures preset time window information, including multiple time windows ranging from a few minutes to dozens of days. Then, the system aggregates the historical transaction details in each time window to obtain the first transaction pattern feature quantity, which describes the basic situation of the transaction. Next, the system uses the Flink framework to perform sliding window calculations on the data in the second time window to obtain the second transaction pattern feature quantity that reflects the latest transaction activities. In this way, the system can capture and analyze transaction data in real time, and provide accurate and real-time input features for machine learning models, thereby improving the model's predictive ability and the risk management capabilities of financial institutions.
[0077] In a feasible implementation manner, step S1200 may include steps S1210 to S1230:
[0078] Step S1210: generating a corresponding number of quasi-real-time computing frameworks according to the statistical dimension;
[0079] Step S1220: determining a sliding statistical association relationship between the plurality of quasi-real-time computing frameworks and corresponding target statistics;
[0080] Step S1230: Based on the sliding statistical association relationship, a sliding window calculation is performed on the target statistic through the quasi-real-time calculation framework to obtain a second transaction mode feature value.
[0081] It should be noted that, first of all, the system generates a corresponding number of quasi-real-time computing frameworks based on the preset statistical dimensions. These frameworks are computing units used to process real-time data streams and can efficiently and dynamically analyze transaction data. Statistical dimensions refer to different indicators used in the feature extraction process, such as transaction amount, number of transactions, etc. These dimensions help the system fully understand transaction behavior.
[0082] In addition, it should be noted that after the system generates the quasi-real-time calculation framework, it will determine the sliding statistical association between these frameworks and the target statistics. This process is to ensure that each calculation framework can perform effective sliding window calculations for specific statistics, thereby capturing changes in transaction data in real time. Sliding window calculation is a dynamic analysis method that allows the system to continuously update statistical results in the data stream to reflect the latest transaction pattern characteristics.
[0083] Based on the above sliding statistical association, the system performs sliding window calculation on the target statistics through a quasi-real-time calculation framework, and finally obtains the second transaction mode feature quantity. These feature quantities can not only reflect the current transaction activities, but also provide important data support for subsequent analysis and decision-making. In this way, the system can realize real-time monitoring and analysis of transaction patterns to meet business needs with high timeliness requirements.
[0084] For example, in a feasible implementation, the system first generates multiple quasi-real-time computing frameworks according to preset statistical dimensions to process different transaction statistics. Then, the system determines the sliding statistical association between these computing frameworks and the target statistics to ensure that each framework can effectively perform sliding window calculations. Subsequently, the system uses these frameworks to perform sliding window calculations on the target statistics to obtain the second transaction mode feature in real time. These feature quantities will be used for subsequent feature derivation and machine learning model input, thereby improving the understanding and prediction capabilities of financial institutions on customer transaction behaviors. Specifically, in this embodiment, by developing a flink program, a topic of a transaction detail kafka is used as a quasi-real-time data source, and the "sliding window" function in flink is used for window calculations. Since flink consumes a large amount of resources for sliding window statistics, we develop a flink program for each window, that is, a flink statistical program is only responsible for the statistical calculation of one window, and then the calculation results of multiple flink programs are summarized.
[0085] In addition, this reference Figure 2 , Figure 2 This is a schematic diagram of the online feature computer storage process of the feature extraction method of this application. The embodiment uses Redis as the feature cache. For real-time models, because the upstream system has response time and request QPS requirements, we need to quickly retrieve the features corresponding to a single transaction from the storage system and then provide them to the model for scoring. To meet this requirement, we use Redis as a high-speed feature cache, which can achieve feature access response within 10ms. For offline features, we develop data jobs to load all data into Redis on a daily basis; for online features, the online feature flink calculation job will immediately update the corresponding data in Redis after the calculation is completed.
[0086] The present embodiment provides a feature extraction method, which extracts transaction pattern feature quantities based on preset time window information and preset statistical quantity dimensions; performs feature derivation based on a preset feature derivation strategy and the transaction pattern feature quantities to obtain transaction pattern derived feature quantities. The above scheme can achieve statistics of multiple time windows, multiple different dimensions, and multiple statistical quantities without waiting for a natural day or a transaction day to settle before performing feature extraction. In addition, feature derivation can be performed for some features that cannot be counted but are needed, thereby significantly improving the timeliness and efficiency of transaction pattern feature extraction in the financial field.
[0087] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3The step S2000 of the feature extraction method further includes steps S2100 to S2300:
[0088] Step S2100: determining a target feature derivation strategy according to the statistical dimension corresponding to the transaction pattern feature, wherein the target feature derivation strategy includes a trend derivation strategy or a proportion derivation strategy;
[0089] It should be noted that this step involves determining the target feature derivation strategy based on the statistical dimension corresponding to the transaction pattern feature quantity. Here, the statistical dimension refers to the different attributes of the transaction data, such as transaction amount, transaction frequency, etc. These attributes can characterize different aspects of the transaction pattern. The purpose of determining the target feature derivation strategy is to further extract deeper information from the original transaction pattern feature quantity to enhance the effect of subsequent analysis or model training. The target feature derivation strategy usually includes trend derivation strategy and proportion derivation strategy, which respectively focus on the trend of feature quantity over time and the relative importance of feature quantity in the overall.
[0090] For example, in a specific implementation, the system first analyzes the transaction pattern features extracted from different time windows, and then decides whether to adopt a trend derivative strategy or a proportion derivative strategy to further process these features based on the statistical dimensions corresponding to these features.
[0091] Step S2200: performing trend derivation on the transaction pattern feature quantity according to the trend derivation strategy to obtain the transaction pattern trend derivation feature quantity; and / or,
[0092] It should be noted that the trend derivation strategy is used to derive the trading pattern feature quantity, and the trading pattern trend derived feature quantity is obtained. The purpose is to identify the growth or decline trend of the trading pattern over time by analyzing the change trend of the trading feature quantity over time, such as by comparing the trading volume or transaction amount in different time windows. This strategy can help identify short-term trading anomalies or long-term trading trend changes, thereby providing support for risk control or business decision-making.
[0093] In this embodiment, the system calculates transaction feature quantities in different time windows through time series analysis of historical transaction data, and derives new trend feature quantities based on the changing trends of these feature quantities. These feature quantities can reflect the dynamic changes of transaction patterns over time.
[0094] Step S2300: deriving the transaction pattern feature quantity by proportion according to the proportion derivation strategy to obtain the transaction pattern proportion derived feature quantity.
[0095] It should be noted that, in this embodiment, the purpose of the proportion derivative strategy is to identify the relative importance of a certain statistical dimension in the overall. For example, by calculating the proportion of a specific transaction type in the total transactions, the degree of influence of the transaction type on the customer's transaction behavior can be revealed. Such derivative features are of great significance for understanding customers' transaction preferences and optimizing services.
[0096] In this embodiment, the system calculates the proportion of various transaction characteristics in the total by analyzing different statistical components and total information in the transaction details data, and uses these proportion values as derived characteristic quantities. These proportion characteristic quantities help to reveal the key points and patterns in customer transaction behaviors, and provide financial institutions with a more detailed understanding of transaction patterns.
[0097] In a feasible implementation manner, step S2200 may include steps S2210 to S2240:
[0098] Step S2210: Obtaining time window information corresponding to the transaction mode feature quantity;
[0099] Step S2220: acquiring several historical time window statistics within a preset time period based on the time window information;
[0100] Step S2230: Calculating the adjacent window statistic change rate based on the plurality of historical time window statistics;
[0101] Step S2240: Determine the adjacent window statistic change rate as a transaction pattern derived feature.
[0102] It should be noted that the trend derivation strategy is used to extract the dynamic characteristics of the trading pattern. This process first requires obtaining the time window information related to the characteristic quantity of the trading pattern, which is the basis for analyzing the trading trend. The time window can be a fixed length or a sliding one to cover continuous trading activities. Subsequently, based on this time window information, the system will collect several historical time window statistics within a preset time period, which involves the aggregation calculation of historical trading data to obtain the trading characteristics under different time windows.
[0103] In addition, it should be noted that the system calculates the rate of change of statistics in adjacent time windows. This step is the key to trend-derived strategies because it can reveal the trend of changes in trading activities over time. The calculation of the rate of change can be achieved through simple differences or more complex statistical methods, with the goal of obtaining a quantitative indicator that reflects the changes in trading patterns. Ultimately, these rates of change are determined as trading pattern-derived features, which can provide machine learning models with important information about changes in trading dynamics.
[0104] For example, in a feasible implementation, the system first determines the trend derivation strategy for analysis, and collects time window information related to the transaction pattern feature quantity according to this strategy. Then, the system uses this information to obtain the transaction statistics in the historical time window through aggregation calculation. Then, the system calculates the change rate of these statistics between adjacent time windows, and uses these change rates as derived feature quantities to reflect the evolution of transaction patterns over time. These derived feature quantities can not only reveal the trend changes of transaction activities, but also provide support for real-time transaction monitoring and prediction. In this way, financial institutions can more accurately identify and respond to potential transaction risks, thereby improving their service quality and operational efficiency. For example, for a certain statistic, different time windows are divided to calculate the trend of the statistic in the time dimension. If the ratio is greater than 1, it means that the trend is rising or increasing, and if the ratio is less than 1, it means that the trend is falling or decreasing.
[0105] In a feasible implementation manner, step S2300 may include steps S2310 to S2330:
[0106] Step S2310: Obtaining statistical component information and statistical total amount information corresponding to the transaction pattern characteristic quantity;
[0107] Step S2320: Calculate the statistical quantity proportion based on the statistical quantity component information and the statistical quantity total quantity information;
[0108] Step S2330: Determine the statistical quantity ratio as a transaction pattern derived characteristic quantity.
[0109] It should be noted that the purpose of step S2300 is to obtain the derived feature quantity of the transaction pattern through the proportion derivative strategy, which helps to reveal the relative importance of different transaction types or counterparties in the overall transaction activities. Statistical component information refers to the measurement of a specific aspect of the transaction data, such as the transaction amount of a specific type or the number of transactions of a certain counterparty. Statistical total information refers to the cumulative amount of all transactions within a specific time window, such as the total transaction amount or the total number of transactions. By comparing the component information with the total information, the proportion of each type of transaction or counterparty in the total transaction can be calculated, thereby obtaining a more insightful feature quantity.
[0110] In addition, it should be noted that the implementation of the proportion derivative strategy can provide financial institutions with a deep understanding of customer trading behavior, especially in identifying key transaction types or major counterparties. For example, if the proportion of a certain type of transaction in the total transaction amount suddenly increases, it may indicate that the customer's trading behavior has changed or that market conditions have shown new trends. This derivative feature quantity is of great value for real-time monitoring of trading patterns, predicting market trends, and formulating targeted customer service strategies.
[0111] For example, in a feasible implementation, the system first collects the statistical component information and total amount information corresponding to the characteristic quantities of the transaction pattern. This information may cover data of different dimensions such as various transaction types, counterparties, and transaction accounts. Subsequently, the system calculates the proportion of these components in the total amount. For example, by dividing the amount of a certain type of transaction by the total transaction amount, the proportion of this type of transaction is obtained. Finally, the system determines these proportions as the derived characteristic quantities of the transaction pattern, which provides a basis for further analysis and decision-making. In this way, financial institutions can more accurately grasp the transaction preferences of customers, optimize service strategies accordingly, and improve the efficiency of risk management.
[0112] The present embodiment provides a feature extraction method, by determining a target feature derivation strategy according to the statistical dimension corresponding to the transaction pattern feature, the target feature derivation strategy includes a trend derivation strategy or a proportion derivation strategy; performing trend derivation on the transaction pattern feature according to the trend derivation strategy to obtain a transaction pattern trend derived feature; and / or performing proportion derivation on the transaction pattern feature according to the proportion derivation strategy to obtain a transaction pattern proportion derived feature. The above method can achieve statistics of multiple time windows, multiple different dimensions, and multiple statistics without waiting for a natural day or trading day to be settled for feature extraction. In addition, feature derivation can be performed for some features that cannot be counted but are needed, thereby significantly improving the timeliness and efficiency of transaction pattern feature extraction in the financial field.
[0113] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the feature extraction method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0114] Please refer to Figure 4 The present application also provides a feature extraction device, the feature extraction device comprising:
[0115] An extraction module 41, used to extract transaction pattern features based on preset time window information and preset statistical dimension;
[0116] The derivation module 42 is used to perform feature derivation based on a preset feature derivation strategy and the transaction pattern feature quantity to obtain the transaction pattern derived feature quantity.
[0117] The feature extraction device provided by the present application adopts the feature extraction method in the above embodiment, which can solve the technical problem of feature extraction. Compared with the prior art, the beneficial effects of the feature extraction device provided by the present application are the same as the beneficial effects of the feature extraction method provided by the above embodiment, and the other technical features in the feature extraction device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0118] The present application provides a feature extraction 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, and the instructions are executed by the at least one processor so that the at least one processor can execute the feature extraction method in the above-mentioned embodiment one.
[0119] Reference below Figure 5 , which shows a schematic diagram of the structure of a feature extraction device suitable for implementing the embodiment of the present application. The feature extraction device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The feature extraction device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0120] like Figure 5 As shown, the feature extraction device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the feature extraction device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the feature extraction device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a feature extraction device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0121] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0122] The feature extraction device provided in the present application adopts the feature extraction method in the above-mentioned embodiment. Compared with the prior art, the beneficial effects of the feature extraction device provided in the present application are the same as the beneficial effects of the feature extraction method provided in the above-mentioned embodiment, and other technical features in the feature extraction device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0123] It should be understood that the various parts disclosed in this application can be implemented by 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 one or more embodiments or examples in a suitable manner.
[0124] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0125] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the feature extraction method in the above-mentioned embodiment.
[0126] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. 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 combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0127] The computer-readable storage medium may be included in the feature extraction device; or it may exist independently without being assembled into the feature extraction device.
[0128] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0129] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0130] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0131] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned feature extraction method, and can solve the technical problem of feature extraction. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the feature extraction method provided in the above-mentioned embodiment, and will not be described in detail here.
[0132] The present application also provides a computer program product, including a computer program, which implements the steps of the feature extraction method as described above when executed by a processor.
[0133] The computer program product provided by this application can solve the technical problem of feature extraction. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the feature extraction method provided by the above embodiment, which will not be repeated here.
[0134] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A feature extraction method, characterized in that: The method comprises: Extracting transaction pattern features from the target transaction system based on preset time window information and preset statistical dimension; Feature derivation is performed based on a preset feature derivation strategy and the transaction pattern feature quantity to obtain the transaction pattern derived feature quantity.
2. The method according to claim 1, characterized in that The time window information includes a first time window and / or a second time window, and the step of extracting a transaction pattern feature from a target transaction system based on the preset time window information and a statistical dimension includes: Performing aggregation calculation on the historical transaction details acquired within the first time window based on the statistical dimension to obtain a first transaction mode feature; Based on the second time window, a sliding window calculation is performed through a quasi-real-time calculation framework to obtain a second transaction mode characteristic value.
3. The method according to claim 2, characterized in that The step of performing sliding window calculation based on the second time window through a quasi-real-time calculation framework to obtain the second transaction mode feature quantity includes: Generate a corresponding number of quasi-real-time computing frameworks according to the statistical dimension; Determining a sliding statistical association relationship between the plurality of quasi-real-time computing frameworks and corresponding target statistics; Based on the sliding statistical association relationship, a sliding window calculation is performed on the target statistic through the quasi-real-time calculation framework to obtain a second transaction mode characteristic value.
4. The method according to claim 1, characterized in that The step of performing feature derivation based on the preset feature derivation strategy and the transaction mode feature quantity to obtain the transaction mode derived feature quantity comprises: Determine a target feature derivative strategy according to the statistical dimension corresponding to the transaction pattern feature, wherein the target feature derivative strategy includes a trend derivative strategy or a proportion derivative strategy; Perform trend derivation on the transaction pattern feature quantity according to the trend derivation strategy to obtain the transaction pattern trend derivation feature quantity; and / or, The transaction pattern characteristic quantity is derived from the proportion according to the proportion derivation strategy to obtain the transaction pattern proportion derived characteristic quantity.
5. The method according to claim 4, characterized in that The step of performing trend derivation on the transaction pattern feature quantity according to the trend derivation strategy to obtain the transaction pattern trend derived feature quantity comprises: Obtaining time window information corresponding to the transaction mode characteristic quantity; Acquire several historical time window statistics within a preset time period based on the time window information; Calculating the change rate of adjacent window statistics based on the several historical time window statistics; The adjacent window statistic change rate is determined as the transaction pattern derived feature.
6. The method according to claim 4, characterized in that The step of deriving the transaction mode feature quantity by proportion according to the proportion derivation strategy to obtain the transaction mode proportion derived feature quantity comprises: Obtaining statistical component information and statistical total amount information corresponding to the transaction pattern characteristic quantity; Calculate the statistical quantity proportion based on the statistical quantity component information and the statistical quantity total quantity information; The statistical proportion is determined as a derived characteristic quantity of the transaction pattern.
7. A feature extraction device, characterized in that: The device comprises: An extraction module, used for extracting transaction pattern feature quantities from a target transaction system based on preset time window information and preset statistical quantity dimensions; The derivation module is used to perform feature derivation based on a preset feature derivation strategy and the transaction pattern feature quantity to obtain the transaction pattern derived feature quantity.
8. A feature extraction device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the feature extraction method according to any one of claims 1 to 6.
9. 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, the steps of the feature extraction method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the feature extraction method according to any one of claims 1 to 6 are implemented.