Transaction behavior prediction method and device, storage medium and computer program product
By screening the intersection of important transaction characteristics of linear and nonlinear models for prediction, the problem of low accuracy of trading behavior prediction in the prior art is solved, and the accuracy and stability of the prediction results are improved.
Patent Information
- Application Number
- CN202411301728.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-03
AI Technical Summary
In the prediction of user transaction behavior, simple statistical analysis alone leads to insufficient explanatory results, and the accuracy of prediction results is low, which cannot effectively improve the accuracy of user transaction behavior prediction.
By receiving behavior prediction requests, obtaining transaction behavior data, filtering out the intersection of transaction characteristics considered important by linear model and nonlinear model, and inputting them into the pre-trained target behavior prediction model for prediction.
By screening important transaction characteristics, the impact of noise characteristics on the prediction results is reduced, the accuracy of user transaction behavior prediction is improved, and the reliability and effectiveness of the prediction results are ensured.
Smart Images

Figure CN119250885A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a transaction behavior prediction method, device, storage medium and computer program product. Background Art
[0002] With the increasing popularity and application of the Internet in various industries, companies in e-commerce, Internet finance, life services, games and other fields are committed to collecting and analyzing user information data, exploring user behavior needs, and providing users with more targeted products or services.
[0003] In banks and other financial institutions, the main role of predicting users' transaction behaviors (such as predicting whether users will buy bonds, predicting whether users will sell bonds, etc.) can be divided into two aspects. One is to predict users' potential business needs and transaction behaviors, and assist users in handling business quickly. The other is to analyze users' product preferences and assist customer service personnel or bank systems in product design and improvement.
[0004] At present, the user's transaction behavior data is usually directly used as the data to be processed, and the user's transaction behavior is predicted relying on simple statistical analysis. However, statistical analysis based only on the transaction behavior data will lead to insufficient explanation of the user's transaction behavior, which in turn leads to the prediction results of user behavior being relatively one-sided and the accuracy of the prediction results being low.
[0005] Therefore, how to improve the accuracy of user transaction behavior prediction results is a problem that needs to be solved urgently. Summary of the invention
[0006] The main purpose of this application is to provide a transaction behavior prediction method, device, storage medium and computer program product, aiming to solve the technical problem of improving the accuracy of user transaction behavior prediction results.
[0007] To achieve the above objectives, the present application proposes a transaction behavior prediction method, which includes:
[0008] receiving a behavior prediction request, and obtaining transaction behavior data according to the behavior prediction request;
[0009] Obtaining a target important transaction feature in the historical transaction behavior data, wherein the target important transaction feature is an intersection of a first important transaction feature screened from the historical transaction behavior data according to a preset linear model and a second important transaction feature screened from the historical transaction behavior data according to a preset nonlinear model;
[0010] According to the target important transaction features, important features are screened from the transaction behavior data, and the important features are input into a pre-trained target behavior prediction model to obtain a prediction result.
[0011] In one embodiment, the method further comprises:
[0012] Acquiring preset historical transaction behavior data, wherein the historical transaction behavior data includes a plurality of transaction features;
[0013] Evaluating the first importance of each of the transaction features based on a preset linear model, and evaluating the second importance of each of the transaction features based on a preset nonlinear model;
[0014] Selecting first important transaction features from the transaction features according to the first importance, and selecting second important transaction features from the transaction features according to the second importance;
[0015] The intersection of the first important transaction feature and the second important transaction feature is determined as a target important transaction feature, and a preset behavior prediction model is trained according to the target important transaction feature to obtain a trained target behavior prediction model.
[0016] In one embodiment, after the step of obtaining preset historical transaction behavior data, the method further includes:
[0017] Obtaining the weight of evidence and information value corresponding to each of the transaction characteristics;
[0018] Based on the evidence weight and the information value, selecting a target transaction feature from the transaction features;
[0019] The steps of evaluating the first importance of each of the transaction features based on a preset linear model and evaluating the second importance of each of the transaction features based on a preset nonlinear model are performed based on each of the target transaction features.
[0020] In one embodiment, the step of selecting a target transaction feature from the transaction features based on the evidence weight and the information value includes:
[0021] Selecting an initial transaction feature whose information value is greater than or equal to a preset threshold from among the transaction features;
[0022] If there are multiple initial transaction features, for each initial transaction feature, identifying the nonlinear relationship corresponding to the initial transaction feature based on the evidence weight of the initial transaction feature;
[0023] A target transaction feature whose nonlinear relationship is an inverted U-shaped relationship is selected from each of the initial transaction features.
[0024] In one embodiment, the step of training a preset behavior prediction model according to the target important transaction features to obtain a trained target behavior prediction model includes:
[0025] Performing dimensionality reduction processing on the target important transaction features to obtain reduced-dimensional important transaction features;
[0026] The preset behavior prediction model is trained according to the dimensionally reduced important transaction features to obtain a trained target behavior prediction model.
[0027] In one embodiment, the step of selecting a first important transaction feature from each of the transaction features according to each of the first importances, and selecting a second important transaction feature from each of the transaction features according to each of the second importances, comprises:
[0028] Sorting the transaction features in a non-decreasing order of the first importance to obtain a first feature sequence, and determining the first preset number of transaction features in the first feature sequence as first important transaction features;
[0029] The transaction features are sorted in non-decreasing order of the second importance to obtain a second feature sequence, and a first preset number of transaction features in the second feature sequence are determined as second important transaction features.
[0030] In one embodiment, the step of training a preset behavior prediction model according to the target important transaction features to obtain a trained target behavior prediction model includes:
[0031] According to the target important transaction features, the preset multiple behavior prediction models are trained respectively to obtain the trained behavior prediction models, wherein the multiple behavior prediction models include at least one linear model and at least one nonlinear model;
[0032] Testing the prediction accuracy of each behavior prediction model after training according to a preset test data set;
[0033] The behavior prediction model with the highest prediction accuracy among the behavior prediction models that have been trained is determined as the target behavior prediction model.
[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a transaction behavior prediction device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the transaction behavior prediction method described above.
[0035] 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 transaction behavior prediction method described above are implemented.
[0036] 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, it implements the steps of the transaction behavior prediction method described above.
[0037] One or more technical solutions proposed in this application have at least the following technical effects:
[0038] By receiving a behavior prediction request, the transaction behavior data is obtained according to the behavior prediction request; so that the transaction behavior data obtained provides a data basis for subsequent prediction of the user's transaction behavior. Obtain target important transaction features in historical transaction behavior data, wherein the target important transaction features are the intersection of the first important transaction features screened out from the historical transaction behavior data according to a preset linear model and the second important transaction features screened out from the historical transaction behavior data according to a preset nonlinear model; based on the linear model, the linear relationship between the features is captured; based on the nonlinear model, the nonlinear relationship between the features is captured; the importance of the transaction features is evaluated respectively by using the complementarity between the two models, so as to achieve a comprehensive evaluation of the importance of each transaction feature, screen the first important transaction feature that the linear model considers to be of high importance, and screen the second important transaction feature that the nonlinear model considers to be of high importance, thereby screening out the first important transaction feature and the second important transaction feature from all transaction features contained in the historical transaction data, preliminarily eliminating the transaction features that both the linear model and the nonlinear model consider to be of low importance, ensuring that the eliminated transaction features are features with low contribution to the prediction results of the predicted transaction behavior, and screening the target important transaction features that both the linear model and the nonlinear model consider to be relatively important, the intersection of the target important transaction features combines the advantages of the two models, and performs well in both models, so as to achieve the screening out of all transaction features from which the target important transaction features with large contribution to the prediction results are achieved. According to the target important transaction characteristics, important features are screened from the transaction behavior data, and the important features are input into the pre-trained target behavior prediction model to obtain the prediction results; based on the target important transaction characteristics, important features that contribute more to the prediction results are screened from the transaction behavior data to reduce the impact of noise transaction features (such as features that contribute less to the prediction results) on the prediction results. The pre-trained target behavior prediction model is used to predict the transaction behavior based on the important features, rather than manually analyzing the user's transaction behavior data to predict the user's transaction behavior, thereby improving the accuracy of the prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] 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.
[0040] 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.
[0041] Figure 1 A flowchart of the first embodiment of the transaction behavior prediction method of the present application is provided;
[0042] Figure 2 A schematic diagram of the relationship between important transaction characteristics involved in an embodiment of the transaction behavior prediction method of the present application;
[0043] Figure 3 This is a brief flowchart of an embodiment of a transaction behavior prediction method of the present application;
[0044] Figure 4 A schematic diagram of a brief process involved in another embodiment of the transaction behavior prediction method of the present application;
[0045] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the transaction behavior prediction method in the embodiment of the present application.
[0046] 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
[0047] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0048] It should be noted that the execution subject of each embodiment of the transaction behavior prediction method of the present application 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, a server, etc., or a transaction behavior prediction device that can realize the above functions. By way of example, the various embodiments of the transaction behavior prediction method of the present application are described with the server as the execution subject.
[0049] The transaction behavior prediction scheme of the present application is used to predict the transaction behavior of the user, specifically, it can be used to predict whether the user buys bonds, whether the user sells bonds, etc. Exemplarily, the application scenario of predicting whether the user buys bonds is used to illustrate and describe the various embodiments of the transaction behavior prediction method of the present application.
[0050] Based on this, the first embodiment of the transaction behavior prediction method of this application is proposed below. Figure 1 , Figure 1 This is a flow chart of the first embodiment of the transaction behavior prediction method of the present application.
[0051] In this embodiment, the transaction behavior prediction method includes steps S10 to S30:
[0052] Step S10, if a behavior prediction request is received, obtaining transaction behavior data according to the behavior prediction request;
[0053] When relevant personnel need to predict the transaction behavior of users, they can initiate a behavior prediction request. Specifically, the initiation method of the behavior prediction request can be set according to actual needs, for example, the behavior prediction request can be initiated by clicking the behavior prediction function icon in the application. This embodiment does not make specific restrictions on this.
[0054] The transaction behavior data may specifically be various data records related to bond products, such as user information, transaction details and other characteristic data. Among them, user information represents the user's personal or corporate information, such as but not limited to name, contact information, contact address, education level and other transaction characteristics. Transaction details represent characteristics related to bonds, such as but not limited to service industry production index, face interest rate, actual total issuance amount, number of issuances, issuance time, issuance rate, issuance period, bond credit rating, bond face value, bond type, bond maturity period, interest payment frequency, redemption price and other transaction characteristics. That is, in this embodiment, the transaction behavior data includes but is not limited to service industry production index, face interest rate, actual total issuance amount, number of issuances, issuance time, issuance rate, issuance period, bond credit rating, bond face value, bond type, bond maturity period, interest payment frequency, redemption price, name, contact information, contact address, education level and one or more transaction characteristics, which can be set by relevant personnel according to actual needs, and this embodiment does not make specific restrictions on this.
[0055] Step S20, obtaining a target important transaction feature in the historical transaction behavior data, wherein the target important transaction feature is an intersection of a first important transaction feature screened from the historical transaction behavior data according to a preset linear model and a second important transaction feature screened from the historical transaction behavior data according to a preset nonlinear model;
[0056] The preset linear model is specifically any linear model that can be set in advance, such as an LR model (Logistic Regression Model), a SVM (Support Vector Machine), a linear regression model, etc. This embodiment does not impose any specific restrictions on this.
[0057] The preset nonlinear model can be any nonlinear model set in advance, such as an xgboost (Extreme Gradient Boosting) model, a decision tree model, a random forest model, a GBM (Gradient Boosting Machines) model, a deep learning model, etc. This embodiment does not impose any specific restrictions on this.
[0058] Exemplarily, the embodiments of the present application are described and illustrated by taking the preset linear model as the LR model and the preset nonlinear model as the xgboost model.
[0059] The LR model and the xgboost model can respectively evaluate the importance of each transaction feature first. The importance evaluated by the LR model is recorded as the first importance of each transaction feature, and the importance evaluated by the xgboost model is recorded as the second importance of each transaction feature. The first important transaction feature is selected based on the first importance of each transaction feature, and the second important transaction feature is selected based on the second importance of each transaction feature.
[0060] It should be noted that the evaluation method for feature importance (including the first importance and the second importance) can be based on the feature importance evaluation method built into the model to evaluate the importance of each transaction feature.
[0061] Specifically, in the LR model, the importance of a feature can usually be evaluated by the feature coefficient (weight) of the model. The size of the feature coefficient reflects the degree of influence of each feature on the model prediction result. Specifically, the coefficient of a feature directly represents the contribution of the feature to the prediction target. The larger the absolute value of the feature coefficient, the higher the importance of the feature in the model. Based on this, the feature coefficient of each transaction feature evaluated by the LR model can be obtained, and then the first importance of each transaction feature can be obtained (the first importance is positively correlated with the feature coefficient). Exemplarily, in a specific embodiment, the feature coefficient can be obtained through the coef_ attribute of the LR model. For example, in the LR model using the scikit-learn library, model.coef_ can be used to obtain the feature coefficient.
[0062] In the xgboost model, the importance of a feature is usually calculated based on the average gain of the feature when it is split in all trees. For example, in a specific implementation, the importance of each feature can be obtained through the feature_importances_ attribute of the model.
[0063] The target important transaction feature is the intersection of the first important transaction feature and the second important transaction feature. Figure 2 As shown, assuming that the first important transaction feature is [A, B, C, D, E, Q, R, S, M] and the second important transaction feature is [C, D, P, Q, L, X, S, M], then the target important transaction feature is [C, D, Q, S, M].
[0064] Step S30, selecting important features from the transaction behavior data according to the target important transaction features, and inputting the important features into a pre-trained target behavior prediction model to obtain a prediction result.
[0065] It can be understood that the transaction behavior data includes multiple transaction features, and the important features can be screened from the transaction features contained in the transaction behavior data based on the target important transaction features. Specifically, the target important transaction features are important features of the same feature type as the important features, so as to ensure that the target behavior prediction model can effectively predict the results based on the important features. Exemplarily, assuming that the target important transaction features selected from the transaction features of the service industry production index, face interest rate, actual total issuance amount, number of issuances, issuance time, issuance rate, issuance period, bond credit rating, bond face value, bond type, bond maturity period, interest payment frequency, redemption price, user age, user gender, and education level contained in the historical transaction behavior data are [service industry production index, actual total issuance amount, bond credit rating, bond face value], then the important features screened from the transaction behavior data are also [service industry production index, actual total issuance amount, bond credit rating, bond face value].
[0066] Furthermore, after obtaining the transaction behavior data, the transaction behavior data may be preprocessed, and then subsequent processing may be performed based on the preprocessed transaction behavior data. The data preprocessing may include deleting abnormal data, filling missing values, standardization or normalization, etc., and this embodiment does not specifically limit this.
[0067] Furthermore, if, when training the behavior prediction model, the target important transaction features are subjected to dimensionality reduction processing, and the behavior prediction model is trained based on the target important transaction features after dimensionality reduction processing, then after obtaining the important features, the important features are also subjected to dimensionality reduction processing, and the important features after dimensionality reduction processing are input into the target behavior prediction model to obtain the prediction results.
[0068] This embodiment receives a behavior prediction request and obtains transaction behavior data according to the behavior prediction request; thereby obtaining the transaction behavior data provides a data basis for subsequent prediction of the user's transaction behavior. Obtain target important transaction features in historical transaction behavior data, wherein the target important transaction features are the intersection of the first important transaction features screened out from the historical transaction behavior data according to a preset linear model and the second important transaction features screened out from the historical transaction behavior data according to a preset nonlinear model; based on the linear model, the linear relationship between the features is captured; based on the nonlinear model, the nonlinear relationship between the features is captured; the importance of the transaction features is evaluated respectively by using the complementarity between the two models, so as to achieve a comprehensive evaluation of the importance of each transaction feature, screen the first important transaction feature with higher importance considered by the linear model, and screen the second important transaction feature with higher importance considered by the nonlinear model, thereby screening out the first important transaction feature and the second important transaction feature from all the transaction features contained in the historical transaction behavior data, preliminarily eliminating the transaction features that are considered to be less important by both the linear model and the nonlinear model, ensuring that the eliminated transaction features are features with lower contribution to the prediction results of the predicted transaction behavior, and screening the target important transaction features that are considered to be relatively important by both the linear model and the nonlinear model. The intersection of the target important transaction features combines the advantages of the two models and performs well in both models, so as to achieve the screening out of all the transaction features with higher contribution to the prediction results. According to the target important transaction characteristics, important features are screened from the transaction behavior data, and the important features are input into the pre-trained target behavior prediction model to obtain the prediction results; based on the target important transaction characteristics, important features that contribute more to the prediction results are screened from the transaction behavior data to reduce the impact of noise transaction features (such as features that contribute less to the prediction results) on the prediction results. The pre-trained target behavior prediction model is used to predict the transaction behavior based on the important features, rather than manually analyzing the user's transaction behavior data to predict the user's transaction behavior, thereby improving the accuracy of the prediction results.
[0069] Based on the above first embodiment, a second embodiment of the transaction behavior prediction method of the present application is proposed. In this embodiment, the same or similar contents as those of the above first embodiment can be referred to the above introduction, and will not be repeated later. In this embodiment, the method further includes:
[0070] Step A10, obtaining preset historical transaction behavior data, wherein the historical transaction behavior data includes a plurality of transaction features;
[0071] It should be noted that historical transaction behavior data can be obtained by pre-collecting multiple transaction behavior data generated when different users or the same user browse, collect and / or buy bond products, and it can be understood that each transaction behavior data includes multiple transaction features.
[0072] The historical transaction behavior data may specifically be various data records generated when a user browses, collects and / or buys bond products. The historical transaction behavior data is similar to the transaction behavior data. Each piece of historical transaction behavior data includes but is not limited to one or more transaction characteristics of the service industry production index, face interest rate, actual total issuance amount, number of issuances, issuance time, issuance rate, issuance period, bond credit rating, bond face value, bond type, bond maturity, interest payment frequency, redemption price, name, contact information, contact address, and education level.
[0073] Furthermore, after obtaining the historical transaction behavior data, the historical transaction behavior data may be preprocessed, and subsequent processing may be performed based on the preprocessed historical transaction behavior data. The data preprocessing may include deleting abnormal data, filling missing values, standardization or normalization, etc., and this embodiment does not specifically limit this.
[0074] Step A20, evaluating the first importance of each of the transaction features based on a preset linear model, and evaluating the second importance of each of the transaction features based on a preset nonlinear model;
[0075] It should be noted that the LR model and the xgboost model can be trained based on the historical transaction behavior data. Specifically, the historical transaction behavior data is used as the input of the model, and the user's actual transaction behavior (whether to buy bonds) is used as the training label of the model to train the LR model and the xgboost model. After the training is completed, the first importance of each transaction feature evaluated by the LR model and the second importance of each transaction feature evaluated by the xgboost model can be obtained.
[0076] Step A30, selecting a first important transaction feature from each of the transaction features according to each of the first importances, and selecting a second important transaction feature from each of the transaction features according to each of the second importances;
[0077] In a possible implementation, the step of selecting a first important transaction feature from each of the transaction features according to each of the first importances, and selecting a second important transaction feature from each of the transaction features according to each of the second importances, includes steps A301 to A302:
[0078] Step A301, sorting the transaction features in a non-decreasing order of the first importance to obtain a first feature sequence, and determining the first preset number of transaction features in the first feature sequence as first important transaction features;
[0079] Specifically, each transaction feature can be sorted in a non-decreasing order according to the first importance of the transaction feature. For example, assuming that the transaction features are [A, B, C, D, E, F, G, H], and the corresponding first importances are [0.6, 0.5, 0.8, 0.2, 0.3, 0.4, 0.6, 0.85], then the transaction features are sorted in a non-decreasing order according to the first importance to obtain a first feature sequence of [H, C, A, G, B, F, E, D].
[0080] After the first feature sequence is obtained, a preset number of transaction features are screened from the first feature sequence as the first important transaction features. For example, assuming that the first feature sequence is [H, C, A, G, B, F, E, D] and the preset number is 4, the first important transaction feature screened is [H, C, A, G].
[0081] The preset number may be any integer value set in advance that is less than or equal to the total number of transaction features, and this embodiment does not impose any specific limitation on this.
[0082] Step A302: sorting the transaction features in non-decreasing order of the second importance to obtain a second feature sequence, and determining the first preset number of transaction features in the second feature sequence as second important transaction features.
[0083] Similar to the screening method of the first important transaction feature, for the screening of the second important transaction feature, each transaction feature is sorted in non-decreasing order of the second importance to obtain a second feature sequence, and the first preset number of transaction features are selected from the second feature sequence as the second important transaction features.
[0084] It should be noted that the number of features of the first important transaction feature and the number of the second important transaction feature may be the same or different, and this embodiment does not impose any specific limitation on this.
[0085] In another possible implementation, the first important transaction feature may specifically be a transaction feature whose first importance is greater than a first preset threshold, and the second important transaction feature may specifically be a transaction feature whose second importance is greater than a second preset threshold, wherein the first preset threshold and the second preset threshold may be the same or different, and this embodiment does not impose any specific limitation on this.
[0086] Step A40: determine the intersection of the first important transaction feature and the second important transaction feature as a target important transaction feature, train a preset behavior prediction model based on the target important transaction feature, and obtain a trained target behavior prediction model.
[0087] As for the preset behavior prediction model, as one implementation, the preset behavior prediction model can be specifically an LR model and / or an xgboost model for evaluating feature importance, that is, the LR model and / or the xgboost model can be retrained based on the target important transaction features. As another implementation, the preset behavior prediction model can be one or more new models, that is, a new model can be retrained based on the target important transaction features, such as retraining an LR model, a decision tree model, an xgboost model, a random forest model, etc., and this embodiment does not impose specific restrictions on this.
[0088] Furthermore, if there are multiple preset behavior prediction models, any trained behavior prediction model can be selected as the target behavior prediction model, or a behavior prediction model with the highest prediction accuracy among the trained behavior prediction models can be selected as the target behavior prediction model. This embodiment does not impose any specific restrictions on this.
[0089] In this embodiment, the intersection of the first important transaction feature and the second important transaction feature is taken, and the target important transaction features that are evaluated to be relatively important by both the linear model and the nonlinear model are screened. The behavior prediction model is trained based on the target important transaction features. The target important transaction features of the intersection combine the advantages of the two models and perform well in both models. This helps to reduce the behavior prediction model's dependence on noise features, improve the stability of the model, and reduce the risk of overfitting, so that when the user's transaction behavior is predicted based on the target behavior prediction model obtained through training, the prediction result has a higher accuracy.
[0090] Based on the above first and / or second embodiments, a third embodiment of the transaction behavior prediction method of the present application is proposed. In this embodiment, the same or similar contents as those of the above first and second embodiments can be referred to the above introduction, and will not be repeated later. In this embodiment, after the step of obtaining the preset historical transaction behavior data, the method further includes steps A10 to A30:
[0091] Step B10, obtaining the evidence weight and information value corresponding to each of the transaction features;
[0092] Weight of Evidence (WOE) is also called a coding of independent variables. In essence, WOE represents the difference in the proportion of good and bad data in the current bin. The larger the absolute value of WOE, the more obvious the difference, and the smaller the absolute value, the less obvious the difference. If WOE is 0, it means that the proportion of good and bad data in the bin is equal to the ratio of random data to good data. At this time, this bin has no predictive ability. The larger the difference, the more obvious the risk differentiation. Specifically, WOE = ln (the proportion of users who bought bonds / the proportion of users who did not buy bonds).
[0093] Information Value (IV) is used to rank variables according to their importance.
[0094] Step B20, based on the evidence weight and the information value, selecting a target transaction feature from the transaction features;
[0095] After obtaining the transaction features, since the features involved in the transaction features are too complex and diverse, there are still many transaction features that have no effect or too little effect on whether the user buys bonds, such as the transaction feature of name, which usually has no effect on whether the user buys bonds. Therefore, after obtaining the transaction features, this embodiment performs corresponding feature screening on the transaction features, specifically, obtains the evidence weight and information value corresponding to each transaction feature, and screens the target transaction feature from each transaction feature based on the evidence weight and information value.
[0096] Step B30, based on each of the target transaction features, executing the step of evaluating the first importance of each of the transaction features based on a preset linear model and evaluating the second importance of each of the transaction features based on a preset nonlinear model.
[0097] In this embodiment, the target transaction features are screened out in combination with the evidence weight and information value of each transaction feature, and subsequent feature screening and model training are performed based on the target transaction features, thereby reducing the number of features that need to be evaluated for importance, thereby improving the evaluation efficiency of feature importance, and further improving the training efficiency of the model.
[0098] In a possible implementation, the step of selecting a target transaction feature from the transaction features based on the evidence weight and the information value includes steps C10 to C30:
[0099] Step C10, selecting an initial transaction feature whose information value is greater than or equal to a preset threshold from the transaction features;
[0100] The preset threshold may be any threshold set in advance, and this embodiment does not impose any specific limitation on this.
[0101] It can be understood that the greater the information value of a transaction feature, the more effectively the transaction feature can distinguish different target categories (bought bond categories and non-bought bond categories), that is, the distribution of transaction features between different target categories is significantly different, and the transaction feature can improve the prediction accuracy of the model because it contains important information that helps predict whether the user buys bonds. Therefore, this embodiment first selects initial transaction features whose information value is greater than a preset threshold from the transaction features.
[0102] Step C20, if there are multiple initial transaction features, identifying the nonlinear relationship corresponding to the initial transaction feature for the evidence weight of each initial transaction feature;
[0103] If there is only one initial transaction feature, the initial transaction feature can be directly used as the target transaction feature, or the nonlinear relationship of the initial transaction feature can be identified. If the nonlinear relationship of the initial transaction feature is an inverted U-shaped relationship, the initial transaction feature can be used as the target transaction feature. If it is not an inverted U-shaped relationship, a prompt message can be output.
[0104] For the identification of the nonlinear relationship of the initial transaction features, specifically, the WOE value of the initial transaction features can be used as the horizontal axis, and the occurrence ratio of the target variable can be used as the vertical axis to draw a scatter plot, which characterizes the nonlinear relationship corresponding to the initial transaction features. Among them, the occurrence ratio of the target variable is specifically the probability of the user buying a bond divided by the probability of the user not buying a bond.
[0105] Step C30, selecting a target transaction feature whose nonlinear relationship is an inverted U-shaped relationship from each of the initial transaction features.
[0106] If the similarity between the scatter plot corresponding to the initial transaction feature and the preset inverted U-shaped relationship scatter plot is greater than a preset similarity threshold, the nonlinear relationship corresponding to the initial transaction feature is determined to be an inverted U-shaped relationship. The preset inverted U-shaped curve may be a pre-set standard inverted U-shaped curve.
[0107] When the nonlinear relationship corresponding to the transaction feature is an inverted U-shaped relationship, it means that the relationship between the transaction feature and whether the user buys the bond shows a trend of first increasing and then decreasing, forming an inverted U-shaped curve. In the inverted U-shaped relationship, when the value of the transaction feature increases before a certain point (the inflection point of the inverted U-shaped curve), the occurrence ratio or probability of the target variable will also increase; but when the value of the feature exceeds this point, the occurrence ratio or probability begins to decrease instead.
[0108] This inverted U-shaped relationship usually indicates that the relationship between the feature and the target variable is nonlinear, and there is an optimal threshold or range. Within this optimal threshold or range, the value of the feature can best predict the occurrence of the target variable. Identifying the inverted U-shaped relationship of transaction features can help the model capture the nonlinear relationship between transaction features and whether the user buys bonds. Therefore, in this embodiment, the target transaction features with nonlinear relationships of inverted U-shaped relationships are screened from the initial transaction features.
[0109] In this embodiment, target transaction features that are strongly correlated with whether the user buys bonds are selected based on information value and evidence weight, further improving the accuracy of the prediction results of the subsequent trained behavior prediction model.
[0110] In a possible implementation, the step of training a preset behavior prediction model according to the target important transaction features to obtain a trained target behavior prediction model includes steps D10 to D20:
[0111] Step D10, performing dimensionality reduction processing on the target important transaction features to obtain reduced-dimensional important transaction features;
[0112] Step D20, training the preset behavior prediction model based on the dimensionally reduced important transaction features to obtain a trained target behavior prediction model.
[0113] Specifically, the dimension reduction process of the target important transaction features can be performed based on principal component analysis (PCA).
[0114] Principal component analysis refers to a statistical method. Specifically, principal component analysis converts a set of variables that may be correlated into a set of linearly uncorrelated variables through orthogonal transformation. The converted set of variables is called principal components. In many cases, there is a certain correlation between variables. When there is a certain correlation between two variables, it can be interpreted that the information reflected by these two variables on this subject has a certain overlap. Principal component analysis is to delete redundant repeated variables (closely related variables) for all the variables originally proposed, and establish as few new variables as possible, so that these new variables are uncorrelated with each other, and these new variables keep the original information as much as possible in reflecting the information of the subject. Therefore, after obtaining the target important transaction features, the target important transaction features can be processed through principal component analysis, thereby achieving dimensionality reduction of the target important transaction features, extracting the main features, and ensuring the comprehensiveness and efficiency of the features.
[0115] Specifically, after obtaining the target important transaction features, we can first determine the correlation between the target important transaction features, and then convert the correlated target important transaction features into reduced-dimensional features through orthogonal transformation, thereby deleting possible repeated variables in the target important transaction features, achieving dimensionality reduction of the target important transaction features, and maintaining the original information of the target important transaction features as much as possible.
[0116] Based on the above-mentioned first, second and / or third embodiments, a fourth embodiment of the transaction behavior prediction method of the present application is proposed. In this embodiment, the same or similar contents as those of the above-mentioned first, second and third embodiments can be referred to the above introduction, and will not be repeated later. In this embodiment, the steps of training the preset behavior prediction model according to the target important transaction features to obtain the trained target behavior prediction model include:
[0117] Step E10, training a plurality of preset behavior prediction models respectively according to the target important transaction features to obtain the trained behavior prediction models, wherein the plurality of behavior prediction models include at least one linear model and at least one nonlinear model;
[0118] It should be noted that when there are multiple behavior prediction models, the multiple behavior prediction models include at least one linear model and at least one nonlinear model to evaluate the accuracy of the linear model and the nonlinear model on the prediction results. In a specific embodiment, the preset multiple behavior prediction models can be an LR model and an xgboost model.
[0119] Step E20, testing the prediction accuracy of each of the behavior prediction models that have been trained according to a preset test data set;
[0120] The preset test data set includes at least one historical transaction behavior data and an actual transaction behavior corresponding to each historical transaction behavior data. In this embodiment, the actual transaction behavior is a behavior that indicates whether the user buys bonds.
[0121] Step E30: determining the behavior prediction model with the highest prediction accuracy among the behavior prediction models that have been trained as the target behavior prediction model.
[0122] In this embodiment, multiple behavior prediction models are trained based on target important transaction features, and the prediction result accuracy of each trained behavior prediction model on a preset test data set is tested, and then the behavior prediction model with the highest prediction result accuracy is selected as the target behavior prediction model. In this way, the prediction result accuracy of multiple different behavior prediction models is measured in advance, so as to select the target behavior prediction model with the highest prediction result accuracy to predict the user's transaction behavior, thereby further improving the accuracy of the prediction results.
[0123] For example, to assist in understanding the technical concept and technical principle of this embodiment, a specific embodiment is given. In this specific embodiment, refer to Figure 3As shown in the figure, LR1 is a preset linear model, xgboost1 is a preset linear model, and both the LR1 model and the xgboost1 model are trained models. The importance of each transaction feature in the historical transaction behavior data is evaluated based on LR1 and xgboost1 respectively, and the first importance and the second importance of each transaction feature are obtained. The target important transaction features are screened based on the first importance and the second importance. The preset behavior prediction models are two new models, which are respectively recorded as the LR2 model and the xgboost2 model. The LR2 model and the xgboost2 model are trained respectively based on the target important transaction features. Finally, a behavior prediction model with the highest prediction result accuracy can be selected from the trained LR2 model or xgboost2 model as the target behavior prediction model.
[0124] In order to help understand the above embodiments of the transaction behavior prediction method of the present application, an example of the transaction behavior prediction method in combination with the above embodiments is proposed. Figure 4 As shown, the specific steps are as follows:
[0125] 1. Collect historical data: Specifically, users’ historical transaction behavior data can be collected from relevant applications, websites and other channels.
[0126] 2. Preliminary feature extraction: Use information value (IV) and weight of evidence (WOE) to preliminarily screen various transaction features in historical transaction behavior data and preliminarily extract useful target transaction features. IV and WOE can effectively measure the relationship between features and target variables and screen out target transaction features with high discrimination ability.
[0127] 3. Important feature extraction: The initially extracted target transaction features are input into the LR model and the xgboost model respectively to evaluate the importance of the target transaction features, respectively extract the N target transaction features with the highest importance, and take the intersection of these N target transaction features as the target important transaction features with the highest importance.
[0128] 4. Extraction of main features: Use principal component analysis to reduce the dimension of the extracted target important transaction features and extract the main features. These features retain the main information of the original data, reduce feature redundancy, improve the accuracy of the model, and improve the training efficiency of the model.
[0129] 5. Model training: The main features extracted by PCA are used as the final features and input into the LR model and xgboost model for training to build a behavior prediction model. The behavior prediction model with the highest prediction accuracy is selected as the target behavior prediction model.
[0130] 6. Model prediction: Use the trained target behavior prediction model to predict new data and output a label indicating whether the user trades (i.e., buys bonds).
[0131] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the transaction behavior prediction method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0132] An embodiment of the present application provides a transaction behavior prediction 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 transaction behavior prediction method in the above-mentioned embodiment one.
[0133] Reference below Figure 5 , which shows a schematic diagram of the structure of a transaction behavior prediction device suitable for implementing the embodiment of the present application. The transaction behavior prediction 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), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The transaction behavior prediction 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.
[0134] like Figure 5As shown, the transaction behavior prediction device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: 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 transaction behavior prediction 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 transaction behavior prediction device to communicate with other devices wirelessly or by wire to exchange data. Although the transaction behavior prediction device with various systems is shown in the figure, 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.
[0135] 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.
[0136] Compared with the prior art, the beneficial effects of the transaction behavior prediction device provided in the embodiment of the present application are the same as the beneficial effects of the transaction behavior prediction method provided in the above embodiment, and other technical features in the transaction behavior prediction device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0137] It should be understood that the various parts disclosed in the embodiments of the present 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.
[0138] 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.
[0139] An embodiment of the present application provides a storage medium, which is a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the transaction behavior prediction method in the above-mentioned embodiment.
[0140] The storage medium provided in the embodiment of 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: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the 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 storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0141] The above-mentioned storage medium may be included in the transaction behavior prediction device; or it may exist independently without being assembled into the transaction behavior prediction device.
[0142] The storage medium carries one or more programs. When the one or more programs are executed by the transaction behavior prediction device, the transaction behavior prediction device performs the functions defined in the method of the embodiment disclosed in the present application.
[0143] 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).
[0144] 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.
[0145] 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.
[0146] The storage medium provided in the embodiment of the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned transaction behavior prediction method. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the embodiment of the present application are the same as the beneficial effects of the transaction behavior prediction method provided in the above-mentioned embodiment, which will not be repeated here.
[0147] An embodiment of the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned transaction behavior prediction method when executed by a processor.
[0148] Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of the present application are the same as the beneficial effects of the transaction behavior prediction method provided in the above-mentioned embodiment, which will not be elaborated here.
[0149] 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 transaction behavior prediction method, characterized in that: The transaction behavior prediction method comprises: receiving a behavior prediction request, and obtaining transaction behavior data according to the behavior prediction request; Obtaining a target important transaction feature in the historical transaction behavior data, wherein the target important transaction feature is an intersection of a first important transaction feature screened from the historical transaction behavior data according to a preset linear model and a second important transaction feature screened from the historical transaction behavior data according to a preset nonlinear model; According to the target important transaction features, important features are screened from the transaction behavior data, and the important features are input into a pre-trained target behavior prediction model to obtain a prediction result.
2. The method according to claim 1, characterized in that The method further comprises: Acquiring preset historical transaction behavior data, wherein the historical transaction behavior data includes a plurality of transaction features; Evaluating the first importance of each of the transaction features based on a preset linear model, and evaluating the second importance of each of the transaction features based on a preset nonlinear model; Selecting first important transaction features from the transaction features according to the first importance, and selecting second important transaction features from the transaction features according to the second importance; The intersection of the first important transaction feature and the second important transaction feature is determined as a target important transaction feature, and a preset behavior prediction model is trained according to the target important transaction feature to obtain a trained target behavior prediction model.
3. The method according to claim 2, characterized in that After the step of obtaining preset historical transaction behavior data, the method further includes: Obtaining the weight of evidence and information value corresponding to each of the transaction characteristics; Based on the evidence weight and the information value, selecting a target transaction feature from the transaction features; The steps of evaluating the first importance of each of the transaction features based on a preset linear model and evaluating the second importance of each of the transaction features based on a preset nonlinear model are performed based on each of the target transaction features.
4. The method according to claim 3, characterized in that The step of selecting a target transaction feature from the transaction features based on the evidence weight and the information value includes: Selecting an initial transaction feature whose information value is greater than or equal to a preset threshold from among the transaction features; If there are multiple initial transaction features, for each initial transaction feature, identifying the nonlinear relationship corresponding to the initial transaction feature based on the evidence weight of the initial transaction feature; A target transaction feature whose nonlinear relationship is an inverted U-shaped relationship is selected from each of the initial transaction features.
5. The method according to claim 2, characterized in that The step of training a preset behavior prediction model according to the target important transaction features includes: Performing dimensionality reduction processing on the target important transaction features to obtain reduced-dimensional important transaction features; The preset behavior prediction model is trained based on the reduced-dimensional important transaction features.
6. The method according to claim 2, characterized in that The step of selecting a first important transaction feature from each of the transaction features according to each of the first importances, and selecting a second important transaction feature from each of the transaction features according to each of the second importances, comprises: Sorting the transaction features in a non-decreasing order of the first importance to obtain a first feature sequence, and determining the first preset number of transaction features in the first feature sequence as first important transaction features; The transaction features are sorted in non-decreasing order of the second importance to obtain a second feature sequence, and a first preset number of transaction features in the second feature sequence are determined as second important transaction features.
7. The method according to claim 2, characterized in that The step of training a preset behavior prediction model according to the target important transaction features to obtain a trained target behavior prediction model includes: According to the target important transaction features, the preset multiple behavior prediction models are trained respectively to obtain the trained behavior prediction models, wherein the multiple behavior prediction models include at least one linear model and at least one nonlinear model; Testing the prediction accuracy of each behavior prediction model after training according to a preset test data set; The behavior prediction model with the highest prediction accuracy among the behavior prediction models that have been trained is determined as the target behavior prediction model.
8. A transaction behavior prediction 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 transaction behavior prediction method according to any one of claims 1 to 7.
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 transaction behavior prediction method according to any one of claims 1 to 7 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 transaction behavior prediction method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Transaction behavior determination method and device
CN122072930A