Model training method and related device
By obtaining multi-dimensional features of merchant transaction data, including attribute expansion, calculation method expansion and time expansion, determining transaction stability and training prediction models, the problem of single dimensions of machine learning model is solved and the accuracy of trading trend prediction is improved.
Patent Information
- Application Number
- CN202410067680.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-16
- Publication Date
- 2025-07-18
AI Technical Summary
The existing machine learning model has a single dimension when predicting the trend of merchant trading capabilities, resulting in insufficient prediction accuracy.
By obtaining transaction data around the first time point, dividing multiple categories, extracting the characteristics of attribute expansion, calculation method expansion and time expansion, determining transaction stability, and training prediction models based on information value to predict transaction trends.
The accuracy of the prediction model is improved, and by covering information from multiple dimensions, the sample feature description is more comprehensive, and transaction stability is introduced, which enhances the accuracy of prediction.
Smart Images

Figure CN120336841A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and in particular, to a model training method and related devices. Background Art
[0002] Currently, in many application scenarios, it is necessary to estimate the capabilities of target objects and perform corresponding processing based on the estimation results. For example, for some small, medium, and micro enterprises, since small, medium, and micro enterprises are the main force in the national economy and social development, and are an important force in expanding employment, improving people's livelihood, and promoting entrepreneurship and innovation, they play an important role in stabilizing growth, promoting reform, adjusting the structure, benefiting people's livelihood, and preventing risks. The historical transaction situation of merchants is one of the important bases for enterprise risk control. By analyzing the historical transaction situation of merchants, the subsequent risk trend can be predicted, and corresponding risk control measures can be taken.
[0003] Currently, machine learning models are mostly used to analyze historical data, construct machine learning models, and predict the future trend of merchant transaction capabilities. However, most machine learning models are designed based on structured data such as transaction behaviors, and the dimensions are relatively single. Summary of the Invention
[0004] The embodiments of this application provide a model training method and related devices. The sample features cover information in multiple dimensions, making the description of sample features more comprehensive. By introducing transaction stability, the accuracy of the prediction model is improved.
[0005] In view of this, on the one hand, this application provides a model training method, including:
[0006] Obtain sample data, where the sample data includes transaction data in a first time range and transaction data in a second time range, and the first time range and the second time range are time ranges before and after a first time point respectively;
[0007] Based on the change situation of the transaction data in the first time range relative to the transaction data in the second time range, divide the sample data into multiple categories;
[0008] Extract sample features from the sample data, where the sample features include features in three dimensions: attribute extension, calculation method extension, and time extension;
[0009] Determine the transaction stability corresponding to the sample features according to the sample features;
[0010] Determine the information value of the sample features according to the sample features and the corresponding categories;
[0011] Use the sample features corresponding to the information value that meets the preset conditions as important features;
[0012] Train a prediction model based on important features and the trading stability corresponding to the important features. The prediction model is used to predict the trading trend according to the data to be predicted.
[0013] On the other hand, the present application provides a model training device, including:
[0014] An acquisition unit, configured to acquire sample data, where the sample data includes trading data in a first time range and trading data in a second time range, and the first time range and the second time range are time ranges before and after a first time point respectively;
[0015] A classification unit, configured to divide the sample data into multiple categories based on the change of the trading data in the first time range relative to the trading data in the second time range;
[0016] An extraction unit, configured to extract sample features from the sample data, where the sample features include features in three dimensions: attribute extension, calculation method extension, and time extension;
[0017] A determination unit, configured to determine the trading stability corresponding to the sample features according to the sample features; determine the information value of the sample features according to the sample features and the corresponding categories; use the sample features corresponding to the information value that meets the preset conditions as important features;
[0018] A training unit, configured to train a prediction model based on the important features and the trading stability corresponding to the important features. The prediction model is used to predict the trading trend according to the data to be predicted.
[0019] In a possible design, in another implementation manner of the other aspect of the embodiments of the present application, the classification unit is specifically configured to:
[0020] Determine the first monthly average trading amount of the trading data in the first time range and the second monthly average trading amount of the trading data in the second time range;
[0021] Divide the sample data into multiple categories according to the difference between the first monthly average trading amount and the second monthly average trading amount.
[0022] In a possible design, in another implementation manner of the other aspect of the embodiments of the present application, the determination unit is specifically configured to:
[0023] Determine the trading stability according to the trading amount, trading frequency, and trading remarks of the sample features.
[0024] In a possible design, in another implementation manner of the other aspect of the embodiments of the present application, the sample data includes structured data and unstructured data, and the extraction unit is specifically configured to:
[0025] Numerically process structured data and perform category mapping on unstructured data to obtain sample features.
[0026] In a possible design, in another implementation of another aspect of the embodiments of the present application, the extraction unit is specifically configured to:
[0027] Determine data of different transaction methods, different transaction amount ranges, and different transaction times from the sample data as dimension features for attribute expansion;
[0028] Determine multiple quota calculation values from the sample data as dimension features for calculation method expansion;
[0029] Determine data of different transaction time intervals from the sample data as dimension features for time expansion;
[0030] Cross the dimension features for attribute expansion, the dimension features for calculation method expansion, and the dimension features for time expansion to obtain sample features.
[0031] In a possible design, in another implementation of another aspect of the embodiments of the present application, the determination unit is specifically configured to:
[0032] Determine the weight of evidence of the sample features according to the sample features and the corresponding categories;
[0033] Calculate the weighted sum of the weights of evidence to determine the information value.
[0034] In a possible design, in another implementation of another aspect of the embodiments of the present application, the first time point includes multiple second time points, and the multiple second time points are evenly distributed throughout the year.
[0035] The acquisition unit is specifically configured to:
[0036] Acquire the transaction data of multiple second time points in the first time range and the transaction data of the second time range as sample data.
[0037] In a possible design, in another implementation of another aspect of the embodiments of the present application, the extraction unit is further configured to:
[0038] Extract prediction features from the data to be predicted according to the important features;
[0039] The determination unit is further configured to:
[0040] Determine the transaction stability corresponding to the prediction features according to the prediction features;
[0041] The model training device further includes a prediction unit, and the prediction unit is specifically configured to:
[0042] Input the prediction features and the trading stability corresponding to the prediction features into a prediction model to output the trading trend.
[0043] Another aspect of the present application provides a computer device, including:
[0044] A memory, a transceiver, a processor, and a bus system;
[0045] Wherein, the memory is used to store programs;
[0046] The processor is used to execute the programs in the memory, including executing the methods of the above aspects;
[0047] The bus system is used to connect the memory and the processor to enable the memory and the processor to communicate.
[0048] Another aspect of the present application provides a computer-readable storage medium, in which instructions are stored. When it runs on a computer, it causes the computer to execute the methods of the above aspects.
[0049] Another aspect of the present application provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above aspects.
[0050] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0051] In the embodiments of the present application, by using the transaction data in the first time range and the second time range before and after the first time point as sample data, the change situation of the transaction data in the first time range relative to the transaction data in the second time range is determined, the sample data is divided into multiple categories, sample features are extracted from the sample data according to the attribute extension dimension, the calculation method extension dimension, and the time extension dimension, and the trading stability of the sample features is determined. Based on the sample features and the corresponding categories, the information value of the sample features for trading trend prediction can be determined. The important features with information value that meet the preset conditions in the sample features and the trading stability corresponding to the important features are used to train the prediction model to predict the trading trend through the prediction model. In the above manner, the sample features cover information in multiple dimensions, making the description of the sample features more comprehensive. By introducing trading stability, the accuracy of the prediction model is improved. Description of the Drawings
[0052] Figure 1 It is a schematic diagram of the architecture of the prediction system in the embodiments of the present application;
[0053] Figure 2 It is a schematic flowchart of a model training method in an embodiment of the present application;
[0054] Figure 3 It is a schematic structural diagram of the BERT model in an embodiment of the present application;
[0055] Figure 4 It is a schematic diagram of the feature processing process in an embodiment of the present application;
[0056] Figure 5 It is a schematic diagram of the prediction process architecture in an embodiment of the present application;
[0057] Figure 6 It is a schematic structural diagram of a model training device in an embodiment of the present application;
[0058] Figure 7 It is a schematic structural diagram of a computer device in an embodiment of the present application. Detailed implementation manners
[0059] The embodiments of the present application provide a model training method and related devices. The sample features cover information in multiple dimensions, making the description of the sample features more comprehensive. Then, by introducing trading stability, the accuracy of the prediction model is improved.
[0060] The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and above-mentioned drawings of the present application are used to distinguish similar objects and do not necessarily need to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order different from those illustrated or described here. In addition, the terms "include" and "correspond to" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0061] The special term "exemplary" here means "serving as an example, embodiment or illustration". Any embodiment described as "exemplary" here does not have to be interpreted as being superior to or better than other embodiments.
[0062] In the embodiments of the present application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the function of that module or unit.
[0063] In addition, for a better illustration of the present application, numerous specific details are given in the following detailed implementation manners. Those skilled in the art should understand that the present application can also be implemented without some specific details. In some instances, methods, means, elements, and circuits well-known to those skilled in the art are not described in detail to highlight the gist of the present application.
[0064] Some terms that appear in the embodiments of the present application are explained below.
[0065] Weight of evidence (WOE) represents the relationship between a predictable variable and a binary classification variable.
[0066] Information value (IV) is used to represent the contribution degree of a feature to the target prediction, that is, the prediction ability of the feature. Generally speaking, the higher the IV value, the stronger the prediction ability of the feature and the higher the information contribution degree.
[0067] Currently, in many application scenarios, it is necessary to estimate the capabilities of a target object and perform corresponding processing based on the estimation results. For example, for some small, medium, and micro enterprises, since small, medium, and micro enterprises are the main force in national economic and social development, an important force in expanding employment, improving people's livelihoods, and promoting entrepreneurship and innovation, they play an important role in stabilizing growth, promoting reform, adjusting the structure, benefiting the people's livelihood, and preventing risks. The historical transaction situation of a merchant is one of the important bases for enterprise risk control. By analyzing the historical transaction situation of a merchant, the subsequent risk trend can be predicted, and corresponding risk control measures can be taken.
[0068] Currently, machine learning models are mostly used to analyze historical data, construct machine learning models, and predict the future trend of merchant transaction capabilities. However, most machine learning models are designed based on structured data such as transaction behaviors, and the dimensions are relatively single.
[0069] Based on this, the embodiments of the present application provide a trading trend prediction method. The trading data within the first time range and the second time range before and after the first time point are used as sample data to determine the change of the trading data within the first time range relative to the trading data within the second time range. The sample data is divided into multiple categories, and sample features are extracted from the sample data according to the attribute expansion dimension, the calculation method expansion dimension, and the time expansion dimension, and the trading stability of the sample features is determined. Based on the sample features and the corresponding categories, the information value of the sample features for trading trend prediction can be determined. The important features with information value that meet the preset conditions in the sample features and the trading stability corresponding to the important features are used to train a prediction model to predict the trading trend through the prediction model. Through the above method, the sample features cover information in multiple dimensions, making the description of the sample features more comprehensive. By introducing trading stability, the accuracy of the prediction model is improved.
[0070] In the embodiments of the present application, the sample data can be input locally or obtained from a server. The server stores corresponding sample data based on cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data computing, storage, processing, and sharing. It is the general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model, which can form a resource pool, be used on demand, and be flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark and needs to be transmitted to the background system for logical processing. Data at different levels will be processed separately, and various industry data requires a powerful system backing support, which can only be achieved through cloud computing.
[0071] The embodiments of the present application are applied to the field of artificial intelligence (AI). Artificial intelligence uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, and is a theory, method, technology, and application system that perceives the environment, acquires knowledge, and uses knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science. It attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable the machines to have the functions of perception, reasoning, and decision-making.
[0072] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operation / interaction systems, mechatronics, etc. Among them, the pre-trained model, also known as the large model or the foundation model, can be widely applied to downstream tasks in various directions of artificial intelligence after fine-tuning. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0073] Machine learning is an interdisciplinary field that involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and rote learning.
[0074] The model training method provided by the embodiments of this application can be implemented by various electronic devices. For example, it can be implemented by a terminal device alone or by a server and a terminal device in cooperation. For example, the terminal device alone executes the model training method described below, or the terminal device and the server cooperate to execute the model training method described below. For example, the server stores transaction data of merchants, and the terminal device can screen the transaction data within a time range before and after the first time point from the server, such as the transaction data in the first time range and the transaction data in the second time range, as sample data. The first time point can be one or more. The terminal device can classify the sample data according to the changes between the transaction data in the two time ranges, and then extract sample features from the sample data in combination with the attribute extension dimension, the calculation method extension dimension, and the time extension dimension. The sample features include the features of these three dimensions at the same time, and at the same time determine the transaction stability of the sample features. After determining the information value of the corresponding transaction trend prediction based on the sample features and the category corresponding to the sample features, the important features with information values that meet the preset conditions in the sample features and the transaction stability corresponding to the important features can be used to train the prediction model to predict the transaction trend through the prediction model.
[0075] The electronic device for trading trend prediction provided by the embodiments of the present application can be various types of terminal devices or servers. Among them, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected through wired or wireless communication methods, and the embodiments of the present application do not limit this.
[0076] Taking the server as an example, for example, it can be a server cluster deployed in the cloud, which opens artificial intelligence cloud services (AIaaS, AI as a Service) to objects. The AIaaS platform will split several common AI services and provide independent or packaged services in the cloud. This service model is similar to an AI-themed mall, and all objects can access and use one or more artificial intelligence services provided by the AIaaS platform through the application programming interface.
[0077] For example, one of the artificial intelligence cloud services can be a trading trend prediction service, that is, the server in the cloud encapsulates the trading trend prediction program provided by the embodiments of the present application. In response to the object's trading trend prediction operation, the terminal device calls the trading trend prediction service in the cloud service, so that the server deployed in the cloud calls the encapsulated trading trend prediction program, obtains sample data, compares the changes in trading data in the time range before and after the first time point, determines the category of the sample data, then extracts sample features according to the attribute extension dimension, calculation method extension dimension and time extension dimension, determines the trading stability, determines the information value based on the sample features and the category, and then combines the important features whose information value meets the preset conditions with the trading stability corresponding to the important features to train the prediction model to predict the trading trend.
[0078] The following takes the collaborative implementation of the model training method provided by the embodiments of the present application by the server and the terminal as an example for description. See Figure 1 , Figure 1 is the architecture schematic diagram of the prediction system provided by the embodiments of the present application. The terminal device 11 is connected to the server 13 through the network 12. The network 12 can be a wide area network or a local area network, or a combination of the two.
[0079] In some embodiments, an object can view the transaction data of the server 13 through the terminal device 11, load sample data from the server 13, then determine the change of the transaction data in the first time range relative to the transaction data in the second time range, divide the sample data into multiple categories, extract sample features from the sample data according to the attribute expansion dimension, calculation method expansion dimension, and time expansion dimension, and determine the transaction stability of the sample features. Based on the sample features and the corresponding categories, the information value of the sample features for transaction trend prediction can be determined. The important features with information value that meet the preset conditions and the transaction stability corresponding to the important features are used to train a prediction model to predict the transaction trend.
[0080] The model training method provided by the embodiments of the present application will be described below with reference to the accompanying drawings. The execution subject of the following model training method is taken as the terminal device for example, and specifically, it can be implemented by the terminal device running various computer programs above; of course, according to the understanding of the following text, it is not difficult to see that the model training method provided by the embodiments of the present application can also be jointly implemented by the terminal device and the server.
[0081] Please refer to Figure 2 , Figure 2 FIG. shows a schematic flow chart of a model training method provided by an embodiment of the present application. The method includes:
[0082] Step 201. Obtain sample data, where the sample data includes transaction data in a first time range and transaction data in a second time range, and the first time range and the second time range are time ranges before and after a first time point respectively.
[0083] In one or more embodiments, first screen out part of the data from the transaction data of the object as sample data. Among them, a first time point can be set. The transaction data before the first time point can be regarded as the input set, and the transaction data after the first time point can be regarded as the label set. The sample data is a set of the input set and the label set. In the embodiments of the present application, the transaction data in the first time range can be selected as the input set, and the transaction data in the second time range can be selected as the label set. The first time range and the second time range can be the same or different. Taking the case where the first time range is different from the second time range as an example, for the node in March 2022, the input set selects the data in the nearly one year from April 2021 to March 2022, and the label set selects the data in the next 6 months from April 2022 to September 2022. Random sampling is performed on the data of each time node and aggregated into the total sample data.
[0084] Step 202. Based on the change of the transaction data in the first time range relative to the transaction data in the second time range, divide the sample data into multiple categories.
[0085] In one or more embodiments, the transaction data in the first time range is compared with the transaction data in the second time range to obtain the changes between the transaction data in the two time ranges. A change interval is set for the changes, and corresponding categories are set for different change intervals. That is, the category corresponding to the change situation of each object can be determined according to the change interval where it is located. The sample data including the transaction data of multiple objects can be divided into multiple categories.
[0086] Exemplarily, Y labels can be set for the change intervals, and the Y labels are divided into three categories, namely: the increase amplitude exceeds 50%, the decrease amplitude exceeds 50%, and the change amplitude is between plus and minus 50% (denoted as other). Taking the first time range before the second time range as an example, the transaction data in the second time range with an increase amplitude exceeding 50% compared to the transaction data in the first time range can be regarded as good samples, the transaction data in the second time range with a decrease amplitude exceeding 50% compared to the transaction data in the first time range is regarded as bad samples, and the transaction data in the second time range with a change amplitude between plus and minus 50% compared to the transaction data in the first time range is regarded as other samples.
[0087] Step 203. Extract sample features from the sample data. The sample features include features in three dimensions: attribute extension, calculation method extension, and time extension.
[0088] In one or more embodiments, the sample data is processed to process the sample data into a form of dimensional features of attribute extension, calculation method extension, and time extension. The data including the dimensional features of attribute extension, calculation method extension, and time extension simultaneously is used as the sample features.
[0089] Step 204. Determine the transaction stability corresponding to the sample features according to the sample features.
[0090] In one or more embodiments, the dimensional features of the sample features can reflect whether the transaction is stable. Therefore, the transaction stability can be determined according to the dimensional features of the sample features, such as the stability degree of the amount and the transaction time, or whether the transaction remarks indicate a stable transaction, etc.
[0091] Step 205. Determine the information value of the sample features according to the sample features and the corresponding categories.
[0092] In one or more embodiments, in the binary classification problem of machine learning, the information value (IV value) is mainly used to encode the input variables and evaluate the predictive ability, and the size of the IV value indicates the strength of the predictive ability of the variable. The embodiment of the present application can determine the category of the sample data according to step 202, and determine the category of the sample feature extracted from the sample data, and then the contribution of the sample feature to the prediction can be determined based on the calculation method of the IV value of feature screening, for the sample feature and the category of the sample feature.
[0093] Among them, the value range of IV value is: [0, positive infinity), and the meaning of IV value can be shown in Table 1:
[0094] Table 1
[0095] IV Predictive ability <0.03 No predictive ability 0.03-0.09 Low 0.1-0.29 Medium 0.3-0.49 High >=0.5 Extremely high and suspicious
[0096] Step 206. The sample features corresponding to the information values that meet the preset conditions are taken as important features.
[0097] In one or more embodiments, the preset condition may be that the information value is greater than a preset threshold or the size of the information value is within a preset sorting range, then the sample features corresponding to the information value greater than the preset threshold or the information value within the preset sorting range may be determined as important features. Exemplarily, each sample feature may be sorted based on the size of the information value of each sample feature, and the information value of the features ranked higher has a high predictive ability, and the sample features corresponding to the information value within the preset sorting range ranked higher are selected as important features. For example, the TOP100 features may be selected based on the size of the IV value, and the extracted TOP features may be selected as important features.
[0098] Step 207: Train a prediction model based on the important features and the transaction stability corresponding to the important features. The prediction model is used to predict transaction trends based on the data to be predicted.
[0099] In one or more embodiments, after obtaining important features, the transaction stability corresponding to the important features can be determined accordingly. The prediction model to be trained can be trained based on the important features and the transaction stability corresponding to the important features. After meeting the training conditions, the prediction model can be obtained. Among them, the important features and the corresponding transaction stability can be divided into simulated input samples and simulated output samples. The simulated output samples can be the important features and the transaction stability corresponding to the important features within the second time range, and the simulated input samples can be the important features and the transaction stability corresponding to the important features within the first time range. The prediction model to be trained receives the simulated input samples and the simulated output samples, and uses an optimization algorithm (such as gradient descent) to continuously adjust the model parameters, and trains based on a preset loss function until the model converges, that is, minimizes the gap between the predicted value based on the simulated input samples and the simulated output samples, so as to obtain the prediction model. This prediction model can then be used to input the data to be predicted to output the predicted transaction trend. The prediction model to be trained can be an extreme gradient boosting (XGB) model, which is not limited here.
[0100] In the embodiments of the present application, by using the transaction data within the first time range and the second time range before and after the first time point as sample data, the change situation of the transaction data within the first time range relative to the transaction data within the second time range is determined. The sample data is divided into multiple categories, sample features are extracted from the sample data according to the attribute expansion dimension, the calculation method expansion dimension, and the time expansion dimension, and the transaction stability of the sample features is determined. Based on the sample features and the corresponding categories, the information value of the sample features for predicting the transaction trend can be determined. The important features with information value that meet the preset conditions in the sample features and the transaction stability corresponding to the important features are used to train the prediction model to predict the transaction trend through the prediction model. Through the above method, the sample features cover information in multiple dimensions, making the description of the sample features more comprehensive. Then, by introducing the transaction stability, the accuracy of the prediction model is improved.
[0101] Optionally, based on the corresponding embodiments above Figure 2 In another optional embodiment provided by the embodiments of the present application, based on the change situation of the transaction data within the first time range relative to the transaction data within the second time range, dividing the sample data into multiple categories includes:
[0102] Determine the first average monthly transaction amount of the transaction data within the first time range and the second average monthly transaction amount of the transaction data within the second time range;
[0103] According to the difference between the first average monthly transaction amount and the second average monthly transaction amount, divide the sample data into multiple categories.
[0104] In one or more embodiments, a method for classifying sample data is introduced. By calculating the total transaction amount of the transaction data in the first time range and the duration of the first time range (such as the number of months), the average monthly transaction amount of the first time range can be determined (it can also be the average value for other time periods, such as 3 months, 100 days, etc.). The average monthly transaction amount of the first time range can be referred to as the first average monthly transaction amount. By calculating the total transaction amount of the transaction data in the second time range and the duration of the second time range, the average monthly transaction amount of the second time range can be determined. The average monthly transaction amount of the second time range can be referred to as the second average monthly transaction amount. Then, by comparing the second average monthly transaction amount with the first average monthly transaction amount to determine the difference, the category of the sample data can be determined based on this difference.
[0105] Exemplarily, to analyze the changes between the transaction data of two time ranges, the outlier interference can be removed from the transaction data of the object, the transaction amount can be analyzed, the daily transaction records can be processed to obtain the average monthly transaction amount of each object for each month, and the distribution curve of the average monthly transaction amount can be plotted. Data samples corresponding to too large or too small values can also be excluded, and then the change in the average monthly transaction amount for the next 6 months compared to the average monthly transaction amount for the previous 12 months can be calculated for each transaction object at each time node. An example of the distribution of the change intervals of the object's transaction trend can be referred to Table 2 below. To view the specific changes of the object, the change intervals can be divided into more detailed ones, such as [-1, -0.5), [-0.5, -0.3), [-0.3, 0), 0, [0, 0.1), [0.1, 0.3), [0.3, 0.5), [0.5, 0.8), [above 0.8), and outliers, and the proportion of the transaction objects corresponding to each change interval in the total transaction objects is given as an example.
[0106] Table 2
[0107] Change range Ratio Outlier 2.08% [Above 0.8) 19.75% [0.5,0.8) 6.60% [0.3,0.5) 6.43% [0.1,0.3) 8.63% [0,0.1) 5.19% 0 0.03% [-0.3,0) 17.89% [-0.5,-0.3) 11.64% [-1,-0.5) 21.75% Total 100%
[0108] Secondly, in the embodiments of the present application, a method for classifying sample data is provided. By the above method, taking the mean of the transaction data in the first time range and the transaction data in the second time range and then comparing them reduces the impact of unexpected situations and improves the anti-interference ability and the accuracy of the category.
[0109] Optionally, based on the corresponding embodiments above Figure 2 In another optional embodiment provided by the embodiments of the present application, determining the transaction stability corresponding to the sample feature according to the sample feature includes:
[0110] Determining the transaction stability according to the transaction amount, transaction frequency, and transaction remarks of the sample feature.
[0111] In one or more embodiments, a method for determining transaction stability is introduced. Transaction stability refers to transactions of transaction objects that have obvious time and frequency characteristics, such as monthly transactions, transactions of specific amounts, frequent transactions, and cases where special text is indicated in the transaction remarks (for example, the transaction remark is "tuition fee payment"). Embodiments of the present application can determine transaction stability by determining the transaction frequency of the transaction amount with such sample characteristics within a certain period of time, determining transaction stability based on the transaction frequency, or determining transaction stability based on the content of the transaction remarks.
[0112] Exemplarily, the transaction stability evaluation formula for each transaction per day can be as follows:
[0113]
[0114]
[0115] Take the amount of this transaction and count the frequency of the same amount in the past 3 months. In formula (1), Score represents the stability score of this transaction, amt i represents the total amount of transactions with the same amount of i, amt all represents the total amount of transactions of this merchant in the past 3 months, cnt i represents the number of occurrences of transactions with the same amount of i, cnt all the total number of transactions of this merchant in the past 3 months, Score remark represents the special text score (special text refers to transaction remarks input into the BERT classification model predicted as stable expenditures, such as including tuition fee payment, phone bill recharge, etc.). The specific calculation method is shown in formula (2): The number of occurrences of the special text in the past 3 months, cnt remark If it occurs more than 1 time, the score is 1, otherwise it is 0. W1, W2, and W3 are weights respectively, and their sum is 1.
[0116] Secondly, in embodiments of the present application, a method for determining transaction stability is provided. Through the above method, by determining transaction stability based on the transaction amount, transaction frequency, and transaction remarks of sample characteristics, it can clearly reflect whether the transaction is stable and improve the accuracy of transaction stability.
[0117] Optionally, on the basis of the above Figure 2 corresponding embodiments, in another optional embodiment provided by embodiments of the present application, the sample data includes structured data and unstructured data. Extracting sample characteristics from the sample data includes:
[0118] Performing numerical dimension processing on the structured data and performing category mapping on the unstructured data to obtain sample characteristics.
[0119] In one or more embodiments, a method for extracting sample features is introduced. The sample data is divided into structured data and unstructured data. Among them, the structured data can be amount, number of transactions, transaction method, etc., and the unstructured data can be time, IP, transaction remarks, etc. For the structured data, the method of numerical dimension processing can be adopted to numericalize the structured data. For various types of information in the unstructured data, through the method of category mapping, the information in the unstructured data is mapped into various categories to form an unstructured feature representation form.
[0120] Exemplarily, the daily basic transaction data may include (1) structured data: amount, number of transactions, transaction method, etc. (2) unstructured data: time, IP, transaction remarks, etc.
[0121] For the structured data, mainly numerical dimension processing is performed, including handling null values, outliers, etc.
[0122] For the unstructured data, mainly category mapping is performed as follows:
[0123] "Transaction time" can be further processed into time intervals such as night transactions, morning transactions, etc.
[0124] "Transaction IP" can be further classified into domestic IP, overseas IP or the province corresponding to the IP is extracted, and its proportion is generated.
[0125] "Transaction remarks" are mainly classified into whether the transaction is stable.
[0126] The features involved in the embodiments of this application refer to structured and unstructured features related to transactions. The main process is to extract the daily basic transaction data of each merchant, and then perform feature processing (numericalization, unstructured feature representation), and further perform cross-derivation of features from three dimensions: attribute extension, calculation method extension, and time extension.
[0127] Among them, the method of classifying whether the transaction is stable can be to preprocess the transaction remarks, and the processed text is input into a bidirectional encoder representation from transformers (BERT) model, and a binary classification label is output: it is a stable transaction, it is not a stable transaction.
[0128] Among them, the BERT model can refer to Figure 3 As shown, the BERT model can perform an embedding operation on the processed text (text 1 to text M, M is the number of transactions) to obtain the initial vector representation corresponding to each transaction, such as Figure 3 the initial vector 1 to the initial vector M in.
[0129] The initial vectors of the object identifiers in the object sequence sequentially pass through the bidirectional Transformers of each layer, and finally the feature representations of each transaction can be extracted, that is, the object feature vectors 1-M of the transaction remarks. Among them, the BERT model can also configure the special symbol [CLS], which also generates a binary classification vector through the embedding operation, sequentially passes through the bidirectional Transformers of each layer, connects the output feature vector C of [CLS] to a binary classifier (class label), and performs a binary classification task.
[0130] Secondly, in the embodiments of the present application, a method for extracting sample features is provided. Through the above method, when performing feature derivation on multi-dimensional transaction data, text data, etc., unstructured features are introduced, making the sample dimensions more abundant.
[0131] Optionally, based on the corresponding various embodiments above, in another optional embodiment provided by the embodiments of the present application, extracting sample features from sample data includes: Figure 2 Determining data of different transaction methods, different transaction amount ranges, and different transaction times from the sample data as the dimensional features of attribute expansion;
[0132] Determining various quota calculation values from the sample data as the dimensional features of calculation method expansion;
[0133] Determining data of different transaction time intervals from the sample data as the dimensional features of time expansion;
[0134] Crossing the dimensional features of attribute expansion, the dimensional features of calculation method expansion, and the dimensional features of time expansion to obtain sample features.
[0135] Crossing the dimensional features of attribute expansion, the dimensional features of calculation method expansion, and the dimensional features of time expansion to obtain sample features.
[0136] In one or more embodiments, a method for extracting sample features is introduced. Screening the sample data according to the transaction method, amount range, and transaction time, data including the dimensional features of attribute expansion can be obtained. According to different statistical methods of quota calculation values, corresponding features are screened from the sample data as the dimensional features of calculation method expansion. Then, according to the transaction time interval where the transaction is located, the dimensional features of time expansion are screened from the sample data. Then, cross-processing can be performed on the features including these three types of dimensional features, that is, screening the features that simultaneously include these three types of dimensional features as sample features.
[0137] Among them, for attribute expansion, different transaction methods can be online payment, offline payment, etc., different amount ranges can refer to aggregating transaction amounts into different range intervals, for example: below 10,000, 10,000 - 50,000, above 50,000, etc., and different transaction times can be morning transactions, early morning transactions, etc. Transaction stability can also be directly reflected through attribute expansion, such as whether the attribute expansion directly indicates stable transactions, such as determining whether this expenditure is a regular expenditure.
[0138] For calculation method expansion, it can include calculating the total, proportion, maximum, minimum, or average, etc. The total can be the sum of this feature data; the proportion can be the numerical ratio of different attributes; the maximum can be the maximum value of this feature data; the minimum can be the minimum value of this feature data; the average can be the average value of this feature data.
[0139] For time expansion, it means calculating within different time intervals, for example including the last 1 month, 3 months, 6 months, 9 months, 12 months, etc.
[0140] Cross - derivative is performed by integrating three dimensions. Taking the transaction method as an example, first, the attribute expansion examples are two methods: online payment and offline payment, which are respectively represented by numerical codes (for example, online payment is recorded as 1, and offline payment is recorded as 2). Then, time and calculation method expansions are performed to generate the total amount of offline payments in the last 1 month, the total number of offline payment transactions in the last 1 month, the ratio of the amount of offline payments in the last 1 month to the total transaction amount, the ratio of the number of offline payment transactions in the last 1 month to the total number of transactions, the maximum amount of offline payments in the last 1 month, the minimum amount of offline payments in the last 1 month, the average daily amount of offline payments in the last 1 month, and the average daily number of offline payment transactions in the last 1 month. The same applies to online payment, and the same applies to other months.
[0141] Exemplarily, the feature processing process can refer to Figure 4 As shown, obtain daily basic transaction data, extract information such as amount, time, location, transaction method, order remarks, etc. from the transaction flow of the transaction data. After these information are processed and derived, sample features including attribute expansion dimension, calculation method expansion dimension, and time expansion dimension are generated. The attribute expansion dimension can include different transaction methods, different amount ranges, different transaction times, whether it is a stable transaction, etc. The calculation method expansion dimension can include total, proportion, maximum, minimum, average, etc. The time expansion dimension can include the last 1 month, the last 3 months, the last 6 months, the last 9 months, the last 12 months, etc.
[0142] The prediction process architecture of the embodiments of this application can refer to Figure 5As shown in the figure, the data preprocessing process: select sample data from the transaction data according to the time point, then determine the distribution of the transaction amounts of the sample data, and remove the sample data corresponding to the too large and too small values. Analyze the change interval of the transaction trend of the sample data, determine the change interval distribution, and label the change intervals. Feature generation step: perform feature derivation on the sample data, that is, process the sample data into sample features based on structured features / unstructured features, determine the transaction stability of the sample features based on the sample features, and then select the TOP features by determining the IV value of the sample features. Model prediction step: input the TOP features and the corresponding transaction stability into the XGB model for prediction.
[0143] Secondly, in the embodiments of the present application, a method for extracting sample features is provided. Through the above method, the specific expansion contents of attribute expansion, calculation method expansion, and time expansion are refined, so that the information contained in the sample features is more comprehensive and specific.
[0144] Optionally, on the basis of the above Figure 2 corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, determining the information value of the sample feature according to the sample feature and the corresponding category includes:
[0145] Determine the weight of evidence of the sample feature according to the sample feature and the corresponding category;
[0146] Calculate the weighted sum of the weights of evidence to determine the information value.
[0147] In one or more embodiments, a method for determining the information value of sample features is introduced. The calculation of the information value (IV value) is based on the weight of evidence (WOE). The meaning represented by WOE is the difference between "the proportion of good samples in the current group among all good samples" and "the proportion of bad samples in the current group among all bad samples". WOE is a coding form of the original variable. To perform WOE coding on a sample feature, first, the sample feature needs to be grouped, that is, binned or discretized. Common discretization methods include equal-width grouping, equal-height grouping, or using a decision tree for grouping. Then, based on the samples and categories within the group, determine the weight of evidence for the group. The IV value measures the amount of information of a certain variable, which is equivalent to a weighted sum of the WOE values of the independent variables, and the size of its value determines the influence degree of the independent variable on the target variable.
[0148] Exemplarily, first, group the single-sample feature variables. The greater the difference, the greater the WOE, and the greater the likelihood of the samples in this group responding, that is, the greater the contribution to classification. As shown in Table 3 below, bin the feature 1. The binning method can be equal-width binning, equal-frequency binning, or user-defined intervals. Taking equal-frequency binning as an example in Table 1, divide the feature 1 into 10 intervals, and count the concentration of good samples and the concentration of bad samples in each interval. Among them, the concentration of good samples is the proportion of good samples in this interval to all good samples, and the concentration of bad samples is the proportion of bad samples in this interval to all bad samples. Then, determine the weight of evidence for this interval based on the concentration of good samples and the concentration of bad samples. The interval with the largest WOE value is the optimal threshold interval. For example, the WOE value of the interval (38.9, 43.6) in Table 3 is the largest, so define the binning interval with the largest WOE value as the optimal threshold interval.
[0149] Table 3
[0150]
[0151]
[0152] Obtain the IV value of each feature by weighted summation of WOE. The example is shown in Table 4:
[0153] Feature IV value Feature 1 5.167103 Feature 2 5.167103 Feature 3 4.688601 Feature 4 4.539491 Feature 5 4.538491 Feature 6 3.925617 Feature 7 3.721977 Feature 8 3.721977 Feature 9 3.684654 Feature 10 3.64114
[0154] Then, the features can be sorted from largest to smallest according to the IV value.
[0155] Secondly, in the embodiments of the present application, a method for determining the information value of sample features is provided. Through the above method, first determine the weight of evidence of the feature, and then determine the information value based on the weight of evidence, improving the accuracy of the information value.
[0156] Optionally, based on the above Figure 2 In another optional embodiment provided by the embodiments of the present application on the basis of the corresponding various embodiments, the first time point includes a plurality of second time points, and the plurality of second time points are evenly distributed throughout the year.
[0157] Obtaining sample data includes:
[0158] Obtain the transaction data of a plurality of second time points in the first time range and the transaction data of the second time range as sample data.
[0159] In one or more embodiments, a method for obtaining the category of sample data is introduced. In order to eliminate the impact of volatility of time factors such as months and seasons as much as possible, special processing can be performed on sample selection, such as selecting multiple second time points evenly distributed in the year, and obtaining the transaction data of the preset time range before and after each second time point as sample data. Exemplarily, four second time nodes in March, June, September, and December of a year are selected, and each second time node traces back the transaction data of the past year and the next 6 months as sample data.
[0160] Secondly, in the embodiment of the present application, a method for obtaining the category of sample data is provided. Through the above method, data of multiple time nodes are selected for sample design, which reduces the influence of time fluctuations.
[0161] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after training the prediction model according to the important features and the transaction stability corresponding to the important features, the method further includes:
[0162] Extract prediction features from the data to be predicted based on important features;
[0163] Determine the transaction stability corresponding to the predicted feature according to the predicted feature;
[0164] The prediction features and the transaction stability corresponding to the prediction features are input into the prediction model to output the transaction trend.
[0165] In one or more embodiments, a method for predicting transaction trends is introduced. Based on the important features corresponding to the information value that meets the preset conditions determined before training the prediction model, features of the same type as the important features can be extracted from the data to be predicted as prediction features, and the transaction stability corresponding to the prediction features can be determined based on the information of the prediction features. The prediction features and the corresponding transaction stability can then be input into the prediction model to output the transaction trends. Exemplarily, the TOP features are extracted from the data to be predicted, and the TOP features and the corresponding transaction stability are judged by multiple leaf nodes in the regression tree of the prediction model, ultimately pointing to a transaction trend that meets the judgment results.
[0166] Secondly, in the embodiment of the present application, a method for predicting transaction trends is provided. Through the above method, prediction features are first extracted from the data to be predicted according to important features, and then transaction trends are predicted in combination with transaction stability, thereby improving the correlation between prediction features and prediction models, making model predictions more accurate.
[0167] The model training device in this application is described in detail below. Figure 6 , Figure 6Schematic diagram of an embodiment of a model training apparatus in an embodiment of the present application. The model training apparatus 60 includes:
[0168] An acquisition unit 601, configured to acquire sample data, where the sample data includes transaction data in a first time range and transaction data in a second time range, and the first time range and the second time range are time ranges before and after a first time point respectively;
[0169] A classification unit 602, configured to divide the sample data into multiple categories based on the change situation of the transaction data in the first time range relative to the transaction data in the second time range;
[0170] An extraction unit 603, configured to extract sample features from the sample data, where the sample features include features in three dimensions: attribute extension, calculation method extension, and time extension;
[0171] A determination unit 604, configured to determine the transaction stability corresponding to the sample features according to the sample features; determine the information value of the sample features according to the sample features and the corresponding categories; and use the sample features corresponding to the information value that meets the preset conditions as important features;
[0172] A training unit 605, configured to train a prediction model according to the important features and the transaction stability corresponding to the important features, where the prediction model is used to predict the transaction trend according to the data to be predicted.
[0173] In an embodiment of the present application, a model training apparatus is provided. Through the above apparatus, the sample features cover information in multiple dimensions, making the description of the sample features more comprehensive. Then, by introducing transaction stability, the accuracy of the prediction model is improved.
[0174] Optionally, based on the corresponding embodiment above, Figure 6 In another embodiment of the model training apparatus 60 provided in an embodiment of the present application, the classification unit 602 is specifically configured to:
[0175] Determine a first monthly average transaction amount of the transaction data in the first time range and a second monthly average transaction amount of the transaction data in the second time range;
[0176] Divide the sample data into multiple categories according to the difference between the first monthly average transaction amount and the second monthly average transaction amount.
[0177] In an embodiment of the present application, a model training apparatus is provided. Through the above apparatus, by calculating the averages of the transaction data in the first time range and the second time range and then comparing them, the influence of sudden situations is reduced, and the anti-interference ability and the accuracy of the categories are improved.
[0178] Optionally, based on the above Figure 6Based on the corresponding embodiment, in another embodiment of the model training device 60 provided in the embodiments of the present application, the determining unit 604 is specifically configured to:
[0179] Determine the transaction stability according to the transaction amount, transaction frequency, and transaction remarks of the sample features.
[0180] In the embodiments of the present application, a model training device is provided. Through the above device, according to the transaction amount, transaction frequency, and transaction remarks of the sample features, the transaction stability is determined, which can clearly reflect whether the transaction is stable and improve the accuracy of the transaction stability.
[0181] Optionally, based on the corresponding embodiment above, in another embodiment of the model training device 60 provided in the embodiments of the present application, the sample data includes structured data and unstructured data, and the extraction unit 603 is specifically configured to: Figure 6 Perform numerical dimension processing on the structured data and perform category mapping on the unstructured data to obtain sample features.
[0182] In the embodiments of the present application, a data processing device is provided. Through the above device, when performing feature derivation on multi-dimensional transaction data, text data, etc., unstructured features are introduced, making the sample dimensions more abundant.
[0183] In the embodiments of the present application, a data processing device is provided. Through the above device, when performing feature derivation on multi-dimensional transaction data, text data, etc., unstructured features are introduced, making the sample dimensions more abundant.
[0184] Optionally, based on the corresponding embodiment above, in another embodiment of the model training device 60 provided in the embodiments of the present application, the extraction unit 603 is specifically configured to: Figure 6 Determine data of different transaction methods, different transaction amount intervals, and different transaction times from the sample data as dimension features for attribute expansion;
[0185] Determine various amount calculation values from the sample data as dimension features for calculation method expansion;
[0186] Determine data of different transaction time intervals from the sample data as dimension features for time expansion;
[0187] Cross the dimension features for attribute expansion, the dimension features for calculation method expansion, and the dimension features for time expansion to obtain sample features.
[0188] In the embodiments of the present application, a model training device is provided. Through the above device, the specific expansion contents of attribute expansion, calculation method expansion, and time expansion are refined, making the information contained in the sample features more comprehensive and specific.
[0189] In the embodiments of the present application, a model training device is provided. Through the above device, the specific expansion contents of attribute expansion, calculation method expansion, and time expansion are refined, making the information contained in the sample features more comprehensive and specific.
[0190] Optionally, based on the corresponding embodiment above, in another embodiment of the model training device 60 provided in the embodiments of the present application, Figure 6Based on the corresponding embodiment, in another embodiment of the model training device 60 provided in the embodiments of the present application, the determining unit 604 is specifically configured to:
[0191] Determine the evidence weight of the sample feature according to the sample feature and the corresponding category;
[0192] Calculate the weighted sum of the evidence weights to determine the information value.
[0193] In the embodiments of the present application, a model training device is provided. Through the above device, the evidence weight of the feature is first determined, and then the information value is determined based on the evidence weight, improving the accuracy of the information value.
[0194] Optionally, based on the corresponding embodiment above, in another embodiment of the model training device 60 provided in the embodiments of the present application, the first time point includes a plurality of second time points, and the plurality of second time points are evenly distributed throughout the year. Figure 6 The obtaining unit 601 is specifically configured to:
[0195] Obtain the transaction data of the plurality of second time points in the first time range and the transaction data of the second time range as sample data.
[0196] In the embodiments of the present application, a model training device is provided. Through the above device, the data of multiple time nodes are selected for sample design, reducing the influence of time fluctuations.
[0197] Optionally, based on the corresponding embodiment above, in another embodiment of the model training device 60 provided in the embodiments of the present application, the extraction unit 603 is further configured to:
[0198] Extract prediction features from the data to be predicted according to the important features; Figure 6 The determining unit 604 is further configured to:
[0199] Determine the transaction stability corresponding to the prediction feature according to the prediction feature;
[0200] The model training device 60 further includes a prediction unit 606, and the prediction unit 606 is specifically configured to:
[0201] Input the prediction feature and the transaction stability corresponding to the prediction feature into the prediction model to output the transaction trend.
[0202] In the embodiments of the present application, a model training device is provided. Through the above device, according to the important features, the prediction features are first extracted from the data to be predicted, and then the transaction trend is predicted in combination with the transaction stability, improving the relevance between the prediction features and the prediction model and making the model prediction more accurate.
[0203]
[0204]
[0204]
[0205] Figure 7 It is a schematic structural diagram of a computer device provided by an embodiment of the present application. The computer device 300 may vary greatly due to different configurations or performances, and may include one or more central processing units (CPUs) 322 (for example, one or more processors) and a memory 332, and one or more storage media 330 (for example, one or more mass storage devices) for storing application programs 342 or data 344. Among them, the memory 332 and the storage media 330 may be transient storage or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the computer device. Further, the central processor 322 may be configured to communicate with the storage media 330 and execute a series of instruction operations in the storage media 330 on the computer device 300.
[0206] The computer device 300 may further include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so on.
[0207] The steps executed by the terminal device in the above embodiment may be based on the Figure 7 shown computer device structure.
[0208] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the methods described in the foregoing embodiments are implemented.
[0209] An embodiment of the present application further provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the methods described in the foregoing embodiments are implemented.
[0210] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices, and units described above may refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0211] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling, direct coupling, or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be in electrical, mechanical, or other forms.
[0212] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0213] In addition, each functional unit in various embodiments of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0214] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0215] As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of various embodiments of the present application.
Claims
1. A model training method, characterized in that, Including: Obtain sample data, where the sample data includes transaction data in a first time range and transaction data in a second time range, and the first time range and the second time range are time ranges before and after a first time point respectively; Divide the sample data into multiple categories based on the change situation of the transaction data in the first time range relative to the transaction data in the second time range; Extract sample features from the sample data, where the sample features include features in three dimensions: attribute extension, calculation method extension, and time extension; Determine the transaction stability corresponding to the sample features according to the sample features; Determine the information value of the sample features according to the sample features and the corresponding categories; Use the sample features corresponding to the information values that meet the preset conditions as important features; Train a prediction model according to the important features and the transaction stability corresponding to the important features, and the prediction model is used to predict the transaction trend according to the data to be predicted.
2. The method according to claim 1, characterized in that, Dividing the sample data into multiple categories based on the change situation of the transaction data in the first time range relative to the transaction data in the second time range includes: Determine the first average monthly transaction amount of the transaction data in the first time range and the second average monthly transaction amount of the transaction data in the second time range; Divide the sample data into the multiple categories according to the difference between the first average monthly transaction amount and the second average monthly transaction amount.
3. The method according to claim 1, wherein The determining the transaction stability corresponding to the sample features according to the sample features includes: Determine the transaction stability corresponding to the sample features according to the transaction amount, transaction frequency, and transaction remarks of the sample features.
4. The method according to claim 1, wherein The sample data includes structured data and unstructured data, and the extracting sample features from the sample data includes: Perform numerical dimension processing on the structured data and perform category mapping on the unstructured data to obtain the sample features.
5. The method according to claim 1, characterized in that The extracting sample features from the sample data includes: Determine data of different transaction methods, different transaction amount intervals, and different transaction times from the sample data as the dimension features of the attribute extension; Determine multiple quota calculation values from the sample data as the dimension features of the calculation method extension; Determine data of different transaction time intervals from the sample data as the dimension features of the time extension; Cross the dimension features of the attribute extension, the dimension features of the calculation method extension, and the dimension features of the time extension to obtain the sample features.
6. The method according to claim 1, wherein The determining the information value of the sample features according to the sample features and the corresponding categories includes: Determine the weight of evidence of the sample features according to the sample features and the corresponding categories; Calculate the weighted sum of the weights of evidence to determine the information value.
7. The method according to claim 1, characterized in that The first time point includes multiple second time points, and the multiple second time points are evenly distributed throughout the year; The obtaining sample data includes: Obtain the transaction data of the multiple second time points in the first time range and the transaction data in the second time range as the sample data.
8. The method according to claim 1, wherein After training the prediction model according to the important features and the trading stability corresponding to the important features, the method further includes: Extracting prediction features from the data to be predicted according to the important features; Determining the trading stability corresponding to the prediction features according to the prediction features; Inputting the prediction features and the trading stability corresponding to the prediction features into the prediction model to output the trading trend.
9. A model training device, characterized in that, Includes: An acquisition unit for acquiring sample data, where the sample data includes trading data in a first time range and trading data in a second time range, and the first time range and the second time range are time ranges before and after a first time point respectively; A classification unit for dividing the sample data into multiple categories based on the change of the trading data in the first time range relative to the trading data in the second time range; An extraction unit for extracting sample features from the sample data, where the sample features include features in three dimensions: attribute extension, calculation method extension, and time extension; A determination unit for determining the trading stability of the sample features; determining the information value of the sample features according to the sample features and the corresponding categories; using the sample features corresponding to the information value that meets the preset conditions as important features; A training unit for training a prediction model according to the important features and the trading stability corresponding to the important features, where the prediction model is used to predict the trading trend according to the data to be predicted.
10. A computer device, characterized in that, Includes: A memory, a transceiver, a processor, and a bus system; Wherein, the memory is used to store programs; The processor is used to execute the programs in the memory, including executing the method according to any one of claims 1 to 8; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate.
11. A computer-readable storage medium including instructions, which when running on a computer, cause the computer to execute the method according to any one of claims 1 to 8.
12. A computer program product, characterized in that, When the computer program product is executed on a computer, the computer executes the method according to any one of claims 1 to 8.
Citation Information
Cited By
Online payment information reminding method and system
CN121034041A