A transaction flow processing method and system based on multi-model fusion

By adopting a multi-model fusion and convolutional neural network transaction processing system in the online banking APP, real-time marking and error correction of user transaction flows is achieved, and the problem of users' unclear transaction flow information is solved, and the user experience is improved and the intelligence of trading flow display.

CN112561530BActive Publication Date: 2024-11-12MINSHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011567495.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-25
Publication Date
2024-11-12
Estimated Expiration
2040-12-25

AI Technical Summary

Technical Problem

The existing online banking apps lack personalized information such as consumption type and total consumption type proportion when displaying expenditure details, resulting in users' understanding of transaction flows unclear and intuitive.

Method used

The transaction flow processing system based on machine learning is adopted to realize real-time marking and error correction of user transaction flows through a hierarchical classification system, provide consumption type tags, and support independent learning and user interaction.

Benefits of technology

It improves the user experience, enriches the transaction details display interface, provides more intelligent accounting functions, and improves the classification accuracy of user click-through rates and transaction flows.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112561530B_ABST
    Figure CN112561530B_ABST
Patent Text Reader

Abstract

A transaction flow processing method and system based on multi-model fusion, involving the field of intelligent classification technology, the method includes S1: collecting transaction flow samples to construct a training set; S2: preprocessing the training set to obtain the input vector of each transaction flow sample; S3: substituting the input vector into LightGBM, SVM and Softmax for training respectively, and combining the three trained models to complete the prediction of the first-level label of the transaction flow to be classified; S4: based on the first-level label predicted by S3, using the convolutional neural network model to complete the prediction of the second-level label of the transaction flow to be classified. The method of the present invention adopts a hierarchical classification system, which can quickly and accurately display consumption type labels to users, and has the characteristics of error correction and autonomous learning, which can interact well with users and improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent classification technology, and in particular to a transaction flow processing method and system based on multi-model fusion. Background Art

[0002] Income and expenditure details refer to the data that records all transaction flows of the customer's corresponding account, generally including basic information such as transaction time, customer name, transaction amount, etc. for customers to view. Nowadays, with the development of the Internet, convenient payment has opened a new era of mobile payment. The volume and flow of online and offline transactions have increased rapidly. At the same time, people's demand for income and expenditure functions has also continued to increase. The real-time and transparent income and expenditure details data has become a major trend in the financial payment market.

[0003] According to statistics, "viewing income and expenditure details" has become one of the most frequently used functions after logging into the online banking APP. Optimizing the content and display form of income and expenditure details based on user needs can greatly improve user experience and thus enhance user stickiness. At present, most online banking APPs only display expenditure details to users, including basic information such as transaction time, transaction account, customer name, and transaction amount. There is no relevant data presentation for personalized information such as the consumption type of each expenditure and the proportion of total consumption types, resulting in users not having a clear and intuitive understanding of the income or expenditure, income source or channel, and expenditure destination or type of a single personal transaction. Summary of the invention

[0004] In view of this, the present invention proposes a transaction flow processing method and system based on multi-model fusion, adopts a hierarchical classification system, and provides a transaction flow processing system based on machine learning multi-model fusion and convolutional neural network model. The system can realize real-time marking of user transaction flow, can quickly and accurately display consumption type labels to users, and has the characteristics of error correction and autonomous learning, which can generate good interaction with users and improve user experience.

[0005] To achieve the above object, the present invention adopts the following technical solution:

[0006] According to a first aspect of the present invention, a transaction flow processing method based on multi-model fusion is provided, the method comprising the following steps:

[0007] S1: Collect transaction flow samples to build a training set, where the samples include transaction flow data and primary and secondary labels corresponding to the transaction flow data;

[0008] S2: Preprocess the training set to obtain the input vector of each transaction flow sample;

[0009] S3: Substitute the input vector into the light gradient boosting regression tree model, support vector machine model and logistic regression model for training respectively, and combine the three trained models to complete the prediction of the first-level label of the transaction flow to be classified;

[0010] S4: Based on the primary labels predicted in S3, a convolutional neural network model is used to predict the secondary labels of the transaction flow to be classified;

[0011] S5: The incorrect prediction results are corrected and used as new samples to form a training set, and steps S2 to S4 are repeated to complete the optimization of the model.

[0012] Furthermore, the transaction flow data in S1 includes multiple fields, including name, remarks, amount, and transaction time.

[0013] Furthermore, the S2 specifically includes:

[0014] S21: Remove special characters and stop words from the transaction flow data of the training set;

[0015] S22: Perform word segmentation processing on each field of the transaction flow data;

[0016] S23: Convert the words obtained after word segmentation into word vectors;

[0017] S24: Accumulate all word vectors of each field and take the average value to obtain the field vector;

[0018] S25: concatenate the field vectors of each sample to obtain an input vector set of each sample.

[0019] Furthermore, the word2vec model is used in S23 to complete the conversion from words to word vectors, which can overcome the huge dimensionality disaster and vector sparsity problems caused by the discrete representation model when building a dictionary.

[0020] Furthermore, the S3 specifically includes:

[0021] S31: Input the transaction flow data in the training set and the first-level labels corresponding to the transaction flow data into the light gradient boosting regression tree model for training, and predict the probability P of the transaction flow data to be classified belonging to each first-level label based on the trained light gradient boosting regression tree model. L (j), where j represents the number of the primary tag;

[0022] S32: Input the transaction flow data in the training set and the primary labels corresponding to the transaction flow data into the support vector machine model for training, and predict the probability P of the transaction flow to be classified belonging to each primary label based on the trained support vector machine model. SVM (j);

[0023] S33: Input the transaction flow data in the training set and the primary labels corresponding to the transaction flow data into the logistic regression model for training, and predict the probability P of the transaction flow to be classified belonging to each primary label based on the trained logistic regression model. S (j);

[0024] S34: Calculate the probability average P of each primary label j =(P L (j)+P SVM (j)+P S (j)) / 3, select the first-level label with the largest average probability as the first-level label prediction result of the transaction flow to be classified.

[0025] Furthermore, the S4 specifically includes:

[0026] S41: Divide the training set into a plurality of sub-training sets according to the primary labels in the training set;

[0027] S42: Inputting the transaction flow data and the secondary labels corresponding to the transaction flow data contained in each sub-training set into the convolutional neural network for training, and obtaining multiple convolutional neural network models corresponding to each primary label;

[0028] S43: Select a convolutional neural network model corresponding to the primary label of the transaction flow to be classified output by S3 to complete the prediction of the secondary label of the transaction flow to be classified.

[0029] Furthermore, the convolutional neural network model includes:

[0030] The input layer is used to convert transaction flow samples into neural network input vectors;

[0031] A convolutional layer for extracting text features from each neural network input vector;

[0032] A pooling layer, used to filter out important features from the text features;

[0033] A fully connected layer is used to connect the important features to the classifier to obtain the probability that the transaction flow to be classified belongs to each secondary label;

[0034] The prediction layer is used to output the secondary label corresponding to the maximum probability as the prediction result.

[0035] According to a second aspect of the present invention, a transaction flow processing system based on multi-model fusion is provided, comprising:

[0036] A sample collection module, used to collect transaction flow samples to construct a training set, wherein the samples include transaction flow data and primary labels and secondary labels corresponding to the transaction flow data;

[0037] The sample processing module is used to pre-process the training set to obtain the input vector of each transaction flow sample;

[0038] The first-level label prediction module is used to substitute the input vector into the light gradient boosting regression tree, support vector machine and logistic regression model for training, and use the majority voting method to complete the prediction of the first-level label of the transaction flow to be classified based on the output results of the three trained models;

[0039] A secondary label prediction module is used to complete the prediction of the secondary label of the transaction flow to be classified by using a convolutional neural network model based on the primary label predicted by S3;

[0040] The result optimization module is used to correct the erroneous prediction results and use them as new samples to form a training set to complete the optimization of the model.

[0041] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method described above when executed by a processor.

[0042] According to a fourth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described above when executing the program.

[0043] Compared with the prior art, the transaction flow processing method and system based on multi-model fusion described in the present invention has the following advantages:

[0044] The system of the present invention adopts a hierarchical classification system, first adopts a light gradient boosting regression tree model (LightGBM), a support vector machine model (SVM) and a logistic regression model (Softmax) to perform a first-level label classification by fusion voting, and then adopts a convolutional neural network model (CNN) to perform a second-level label classification on the basis of the model, and displays the results to the user. The entire system completely realizes the real-time labeling of user transaction flows. Only the basic information of the transaction flow needs to be provided to automatically obtain the consumption type label, and the operation is simple and fast. At the same time, the display of system results enriches the user transaction details display interface, and supports users to modify the labeling results, providing users with a more intelligent accounting function, improving user experience, and increasing user click-through rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:

[0046] Figure 1 The figure is a specific flow chart of the method of the present invention. DETAILED DESCRIPTION

[0047] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0048] The terms "first", "second", etc. in the specification and claims of the present disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0049] Multiple includes two or more.

[0050] It should be understood that the term "and / or" used in this disclosure is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone.

[0051] The present invention adopts a hierarchical classification system, firstly divides the data into multiple first-level consumption labels, and then divides the data under each first-level label into second-level consumption labels under the corresponding label. This method decomposes a large multi-classification problem into multiple sub-classification problems, which can greatly reduce the number of labels corresponding to a single model, improve the accuracy of the model, and effectively avoid the situation where the model classification accuracy is low when there are many categories. At the same time, training multiple models in parallel under the hierarchical classification system can not only ensure speed, but also improve the overall efficiency of the system.

[0052] The present invention has a self-learning mechanism and can regularly revise and update the model in the system according to the correction data.

[0053] The present invention takes into account the characteristics of CNN and uses a CNN model to process bank transaction flows. The network can extract local features, taking into account the importance of local information, and is more suitable for the characteristic that significant key words in the Chinese field of flow data will have a key impact on the results. At the same time, the extraction of local features is equivalent to capturing multiple different n-gram features of the text, and for an n-gram feature it also has many different filters to extract useful information from different angles. This combination of multiple information can learn the implicit correspondence between different fields in the flow data. Compared with other neural network models, this model has the advantages of not being easy to overfit and fast speed.

[0054] The method of the present invention specifically comprises the following steps:

[0055] S1: Bank transaction data consists of multiple fields: customer name, customer notes, bank notes, amount, transaction time and other fields as features. At the same time, the transaction transaction data is labeled with primary and secondary labels according to the transaction transaction category. The obtained transaction data and corresponding labels constitute the training set of the following model.

[0056] S2: Perform data preprocessing on the obtained training data set. The data preprocessing steps are as follows:

[0057] S21: Remove special characters and stop words from Chinese fields;

[0058] S22: The Chinese field is segmented using Jieba word segmentation. The content corresponding to the final field is represented as: S = {w1, w2, w3, ..., w l}, where w i refers to the word after the i-th word segmentation process, and l is the number of words obtained after the above processing steps are performed on the Chinese field.

[0059] S23: Use the word2vec model to represent Chinese word vectors. Word2vec can represent words as a dense, low-dimensional real-valued vector with good semantic properties, which is suitable for modeling data with diverse business names. This distributed vector representation can effectively overcome the drawbacks of discrete representation models such as the bag-of-words model, which produces huge dimensional disasters and very sparse vectors when building dictionaries.

[0060] S24: The final vector representation of the entire Chinese field is calculated by accumulating and averaging all word vectors:

[0061]

[0062] Among them, S_vec is the vector corresponding to the content of the Chinese field, w_vec iRepresents the word vector for each word.

[0063] S25: Concatenate the vectors corresponding to all Chinese fields to obtain the input of each sample:

[0064] X=concat(S_vec1;...;S_vec m )

[0065] Where m represents the number of Chinese fields.

[0066] S3: Use three models, Light Gradient Boosting Regression Tree Model (LightGBM), Support Vector Machine Model (SVM) and Logistic Regression Model (Softmax) to train the training data, and then obtain the primary classification label of the data through a voting mechanism. These three machine learning models are independent of each other, and the optimization functions and feature processing methods within the models are different, so the correlation between the models is quite different, and the repeatability of the prediction results is lower than that of the results of similar models, which is suitable for the method of model fusion using a voting mechanism. The specific operations of this step are as follows:

[0067] S31: Put the training set data corresponding to the first-level label into the LightGBM model for training, and predict the probability P of each first-level label based on the trained LightGBM model. L (j), where j represents the number of the first-level label. The LightGBM model formula is as follows:

[0068]

[0069] Among them, f k (x i ) represents the kth residual tree for the i-th sample x i The predicted value of the k-th round residual, F is the function space of the residual tree. From the perspective of function, each residual tree is similar to a piecewise function.

[0070] S32: Similarly, the training set data with only primary labels is put into the SVM model, and OVR (i.e., during training, samples of a certain category are classified into one category, and the remaining samples are classified into another category) is used to predict the probability P of obtaining each primary label of the data. SVM (j), the specific formula is as follows:

[0071] P SVM (j)=max(f1(x),f2(x),...,f n (x)

[0072] Among them, f n (x) is the nth SVM classifier, and j is the label corresponding to the maximum value in the prediction result.

[0073] S33: Similarly, the training set data with only the first-level labels is put into the Softmax regression model, and the probability P of each first-level label of the data is predicted based on the following formula: S (j);

[0074]

[0075] Among them, θ is the model parameter, n is the number of first-level labels, and x is the sample.

[0076] S34: A voting mechanism is used for the three predicted probabilities obtained to calculate the average probability. The specific formula is as follows:

[0077] P j =(P L (j)+P SVM (j)+P S (j)) / 3

[0078] Finally, the category with the highest probability is selected as the first-level label classification result.

[0079] S4: Based on the primary label, the Convolutional Neural Network (CNN) model is used to predict the secondary label. Because the transaction flow data of banks can reach billions, the training speed of traditional machine learning models is slow. Compared with traditional machine learning models, neural network models can show strong learning ability in such a large amount of data. The specific training process of CNN is as follows:

[0080] S41: Divide the data set into n parts according to the first-level labels (n is the number of first-level labels, data i Indicates the data corresponding to the i-th label):

[0081]

[0082] S42: Change data i Input into CNN for training.

[0083] Input layer: This layer receives the vectorized representation of the flow data. The vector consists of a Chinese character vector, a category vector, and a numerical vector. Among them, the category variable (the corresponding category field in the transaction flow: transaction category, transaction behavior, etc.) uses the onehot encoding method to obtain the corresponding vector representation C_vec. In the onehot encoding method, the vector dimension is the number of categories, the category representation is the corresponding dimension is 1, and the other dimensions are 0. The vector representation of the Chinese field in the input data uses the concatenated pre-trained word vector. The word vector char_vec corresponding to each word in the Chinese field is concatenated with the category vector C_vec and the numerical vector to obtain the vector representation x corresponding to each word. i ,Right now

[0084] x i =concat(char_vec i ; C_vec1; ...; C_vec n ;num1;...;num t )

[0085] Where n represents the number of category fields, t represents the number of numeric fields, and num i Represents a numeric field.

[0086] Finally, the input vector X of each pipeline data sample is obtained:

[0087]

[0088] Where r is the number of characters in the Chinese field.

[0089] Convolutional layer: This layer is the core layer of CNN. It mainly performs convolution operation on the vector obtained from the input layer through a convolution kernel of size h×d to extract deeper features and obtain the corresponding feature representation T={t1,t2,...,t k}, where t k Represents the corresponding column vector obtained by the kth convolution kernel, and the sizes of the convolution kernels are selected as 1, 2, and 3 respectively.

[0090] Pooling layer: This layer compresses the features obtained by the convolution layer and extracts the main features (using dimensionality reduction operation). The present invention adopts the maximum pooling operation, that is, the column vector t k The maximum value in is taken as the most important feature.

[0091] Fully connected layer: The vector output by the pooling layer is input into the fully connected layer, and the predicted probability set P = {p1, p2, ..., p n}, where p n The probability corresponding to the nth label, where n is the number of labels to be predicted.

[0092] Prediction layer: The label with the maximum probability value in the probability set output by the fully connected layer is output as the prediction result. The formula is as follows:

[0093] Label = argmax(P)

[0094] Label represents the final predicted label, and P represents the probability.

[0095] For n pieces of data, a total of n CNN models are trained.

[0096] S5: The incorrect prediction results are corrected and sent to the model as a new sample training set, and a new model is trained based on the previous model.

[0097] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0098] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0099] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0100] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. A transaction flow processing method based on multi-model fusion, characterized in that: The method comprises the following steps: S1: Collect transaction flow samples to build a training set, where the samples include transaction flow data and primary and secondary labels corresponding to the transaction flow data; S2: Preprocess the training set to obtain the input vector of each transaction flow sample; S3: Substitute the input vector into the light gradient boosting regression tree model, support vector machine model and logistic regression model for training respectively, and combine the three trained models to complete the prediction of the first-level label of the transaction flow to be classified; S4: Based on the primary labels predicted in S3, a convolutional neural network model is used to predict the secondary labels of the transaction flow to be classified; The S3 specifically includes: S31: Input the transaction flow data in the training set and the primary labels corresponding to the transaction flow data into the light gradient boosting regression tree model for training, and predict the probability P of the transaction flow data to be classified belonging to each primary label based on the trained light gradient boosting regression tree model. L (j) , where j represents the number of the primary tag; S32: Input the transaction flow data in the training set and the primary labels corresponding to the transaction flow data into the support vector machine model for training, and predict the probability P of the transaction flow to be classified belonging to each primary label based on the trained support vector machine model. SVM (j) ; S33: Input the transaction flow data in the training set and the primary labels corresponding to the transaction flow data into the logistic regression model for training, and predict the probability P of the transaction flow to be classified belonging to each primary label based on the trained logistic regression model. S (j) ; S34: Calculate the probability average P of each primary label j =(P L (j)+P SVM (j)+P S (j)) / 3, select the first-level label with the largest average probability as the first-level label prediction result of the transaction flow to be classified.

2. According to the transaction flow processing method based on multi-model fusion according to claim 1, it is characterized in that: The transaction flow data in S1 includes multiple fields, including name, remarks, amount, and transaction time.

3. According to the transaction flow processing method based on multi-model fusion according to claim 2, it is characterized in that: The S2 specifically includes: S21: Remove special characters and stop words from the transaction flow data of the training set; S22: Perform word segmentation processing on each field of the transaction flow data; S23: Convert the words obtained after word segmentation into word vectors; S24: Accumulate all word vectors of each field and take the average value to obtain the field vector; S25: concatenate the field vectors of each sample to obtain an input vector set of each sample.

4. According to the transaction flow processing method based on multi-model fusion according to claim 1, it is characterized in that: The erroneous prediction results are corrected and used as new samples to form a training set, and steps S2 to S4 are repeated to complete the optimization of the model.

5. According to the transaction flow processing method based on multi-model fusion according to claim 1, it is characterized in that: The S4 specifically includes: S41: Divide the training set into a plurality of sub-training sets according to the primary labels in the training set; S42: Inputting the transaction flow data and the secondary labels corresponding to the transaction flow data contained in each sub-training set into the convolutional neural network for training, and obtaining multiple convolutional neural network models corresponding to each primary label; S43: Select a convolutional neural network model corresponding to the primary label of the transaction flow to be classified output by S3 to complete the prediction of the secondary label of the transaction flow to be classified.

6. The transaction flow processing method based on multi-model fusion according to claim 5 is characterized in that: The convolutional neural network model includes: The input layer is used to convert transaction flow samples into neural network input vectors; A convolutional layer for extracting text features from each neural network input vector; A pooling layer, used to filter out important features from the text features; A fully connected layer is used to connect the important features to the classifier to obtain the probability that the transaction flow to be classified belongs to each secondary label; The prediction layer is used to output the secondary label corresponding to the maximum probability as the prediction result.

7. A transaction flow processing system based on multi-model fusion based on the transaction flow processing method based on multi-model fusion according to claim 1, characterized in that: include: A sample collection module, used to collect transaction flow samples to construct a training set, wherein the samples include transaction flow data and primary labels and secondary labels corresponding to the transaction flow data; The sample processing module is used to pre-process the training set to obtain the input vector of each transaction flow sample; The first-level label prediction module is used to substitute the input vector into the light gradient boosting regression tree, support vector machine and logistic regression model for training, and use the majority voting method to complete the prediction of the first-level label of the transaction flow to be classified based on the output results of the three trained models; The secondary label prediction module uses a convolutional neural network model to predict the secondary labels of the transaction flow to be classified based on the primary labels predicted by S3.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 6 are implemented.