CN117725901A - Transaction analysis report generation method and device and computer equipment - Google Patents

Transaction analysis report generation method and device and computer equipment Download PDF

Info

Publication number
CN117725901A
CN117725901A CN202311599037.6A CN202311599037A CN117725901A CN 117725901 A CN117725901 A CN 117725901A CN 202311599037 A CN202311599037 A CN 202311599037A CN 117725901 A CN117725901 A CN 117725901A
Authority
CN
China
Prior art keywords
model
information
analysis report
initial
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311599037.6A
Other languages
Chinese (zh)
Inventor
陈东航
林博鸿
黄闽粤
林超
王彬彬
张宝贤
宗永洲
李斌
周伟然
黄杏
温舒涵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial Bank Co Ltd
Original Assignee
Industrial Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial Bank Co Ltd filed Critical Industrial Bank Co Ltd
Priority to CN202311599037.6A priority Critical patent/CN117725901A/en
Publication of CN117725901A publication Critical patent/CN117725901A/en
Pending legal-status Critical Current

Links

Landscapes

  • Machine Translation (AREA)

Abstract

The present application relates to a method, apparatus, computer device, storage medium and computer program product for generating transaction analysis reports. The method comprises the following steps: acquiring information of target resource transaction; inputting the information into a preset analysis report generation model, and outputting a transaction analysis report; the preset analysis report generation model is obtained by analyzing and dividing the prediction result of the initial analysis report generation model set, feeding back the prediction result to the initial analysis report generation model set and training; the initial analysis report generation model set is obtained by training a corresponding large language model in the base large model by using a plurality of training methods according to sample information. By adopting the method, the analysis efficiency of the transaction information can be accelerated, and the accuracy of the transaction analysis report is increased.

Description

Transaction analysis report generation method and device and computer equipment
Technical Field
The present application relates to the field of artificial intelligence technology, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for generating a transaction analysis report.
Background
Resource transaction refers to the transmission of a resource from a sender to a receiver, however, in some application scenarios, the receiver obtains the resource in some irregular ways and masks the original sender of the resource, resulting in confusion of the resource transaction. In the related technology, transaction data analysis, transaction marking and suspicious transaction analysis report manual writing are carried out manually. However, with the increasing transaction records, the amount of data for manually compiling suspicious transaction analysis reports is too large, and the manual analysis of suspicious transactions is inefficient and has low accuracy.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for generating a transaction analysis report.
In a first aspect, the present application provides a method for generating a transaction analysis report, the method comprising:
acquiring information of target resource transaction;
inputting the information into a preset analysis report generation model, and outputting a transaction analysis report; the preset analysis report generation model is obtained by analyzing and dividing the prediction result of the initial analysis report generation model set, feeding back the prediction result to the initial analysis report generation model set and training; the initial analysis report generation model set is obtained by training a corresponding large language model in the base large model by using a plurality of training methods according to sample information.
In one embodiment, the training manner of the initial analysis report generation model set includes:
dividing sample information into a training set and a testing set according to a preset proportion;
according to the training set, training a plurality of large language models in the base large model by using a plurality of training methods to obtain an initial model set;
Testing the initial model set according to the test set, establishing a multi-factor evaluation system to score the initial model set, and determining the initial model set as an initial analysis report generation model set under the condition that the score of the initial model set is higher than a preset threshold value
In one embodiment, the multi-factor evaluation system scores the initial model set, and at least comprises one of the following: model index, business index, including:
determining information which is predicted by the initial model set and matched with expected information according to a Chinese language model;
determining the matching rate of the initial model according to the information predicted by the initial model set and the matched information, and combining a preset penalty factor to obtain a first model score;
determining a second model score based on the predicted information, the matched information, and the expected information;
determining the model index according to the first model score and the second model score;
determining a first business score according to the text numerical value predicted by the initial model set and the actual text numerical value;
determining a second business score according to the matched information and the expected information;
Determining a third business score according to the information predicted by the initial model set and the matched information;
determining a fourth business score according to the quality of the information predicted by the initial model set;
and determining the business index according to the first business score, the second business score, the third business score and the fourth business score.
In one embodiment, the analysis and division are performed on the prediction result of the initial analysis report generation model set, and the prediction result is fed back to the initial analysis report generation model set and trained to obtain an analysis report generation model; comprising the following steps:
extracting a preset number of sample sets from sample information, and inputting the sample sets into an initial analysis report generation model set to obtain a prediction result set of the initial analysis report generation model set;
sequencing the prediction result set, determining the prediction result with the highest matching degree with the expected analysis information as a positive result, and determining other prediction results in the prediction result set as negative results;
constructing a small pre-training language model as an initial rewarding model;
adding an output layer to the initial reward model for determining a reward distance of the positive outcome and the negative outcome;
Determining a training set of the reward model by calculating the relative similarity of the positive result and the negative result under the condition that the reward distance is at a preset threshold;
freezing the backbone network of the rewarding model, using an optimizer to adjust the self-adaptive learning rate and attenuate the weight, and training the rewarding model according to the training set of the rewarding model to obtain the analysis report generating model.
In one embodiment, the method for obtaining the sample information includes:
constructing a target resource transaction data annotation template; the annotation template comprises a basic information module and an analysis information module of target resource transaction information;
grabbing historical transaction data to obtain sample information to be analyzed and sample user basic information;
analyzing the information to be analyzed of the sample and basic information of a sample user to obtain sample analysis information;
and combining the sample analysis information, the sample information to be analyzed and the sample user basic information to obtain corresponding sample information.
In one embodiment, after outputting the transaction analysis report, the method further includes:
Correcting the analysis report to obtain a target analysis report;
storing the target analysis report and the corresponding target resource transaction information into a high-quality case database;
under the condition that the number of cases in the high-quality case database is larger than a preset threshold value, inputting the cases in the high-quality case database into an analysis report generation model, and performing iterative optimization on the analysis report generation model.
In a second aspect, the present application further provides a device for generating a transaction analysis report, where the device includes:
the acquisition module is used for acquiring information of target resource transaction;
the output module is used for inputting the information into a preset analysis report generation model and outputting a transaction analysis report; the preset analysis report generation model is obtained by analyzing and dividing the prediction result of the initial analysis report generation model set, feeding back the prediction result to the initial analysis report generation model set and training; the initial analysis report generation model set is obtained by training a corresponding large language model in the base large model by using a plurality of training methods according to sample information.
In one embodiment, the output module further includes:
The first dividing sub-module is used for dividing the sample information into a training set and a testing set according to a preset proportion;
the first training sub-module is used for training a plurality of large language models in the base large model by using a plurality of training methods according to the training set to obtain an initial model set;
and the testing sub-module is used for testing the initial model set according to the testing set, establishing a multi-factor evaluation system to score the initial model set, and determining the initial model set as an initial analysis report generation model set under the condition that the score of the initial model set is higher than a preset threshold value.
In one embodiment, the test sub-module further includes:
the information prediction unit is used for determining information which is predicted by the initial model set and matched with expected information according to the Chinese language model;
the first model scoring unit is used for determining the matching rate of the initial model according to the information predicted by the initial model set and the matched information, and obtaining a first model score by combining a preset penalty factor;
a second model scoring unit for determining a second model score based on the predicted information, the matched information, and the expected information;
A model index unit, configured to determine the model index according to the first model score and the second model score;
the first business scoring unit is used for determining a first business score according to the text numerical value predicted by the initial model set and the actual text numerical value;
the second business scoring unit is used for determining a second business score according to the matched information and the expected information;
a third service scoring unit, configured to determine a third service score according to the information predicted by the initial model set and the matched information;
a fourth service scoring unit, configured to determine a fourth service score according to the quality of the information predicted by the initial model set;
and the business index unit is used for determining the business index according to the first business score, the second business score, the third business score and the fourth business score.
In one embodiment, the output module further includes:
the prediction sub-module is used for extracting a preset number of sample sets from the sample information, inputting the sample sets into an initial analysis report generation model set and obtaining a prediction result set of the initial analysis report generation model set;
The second dividing sub-module is used for sequencing the prediction result set, determining the prediction result with the highest matching degree with the expected analysis information as a positive result, and determining other prediction results in the prediction result set as negative results;
the rewarding model sub-module is used for constructing a small pre-training language model as an initial rewarding model;
the rewarding distance ion module is used for adding an output layer for the initial rewarding model and determining rewarding distances between the positive results and the negative results;
the training set sub-module is used for determining a training set of the reward model by calculating the relative similarity of the positive result and the negative result under the condition that the reward distance is at a preset threshold value;
and the second training sub-module is used for freezing the backbone network of the rewarding model, using an optimizer to adjust the self-adaptive learning rate and attenuate the weight, and training the rewarding model according to the training set of the rewarding model to obtain the analysis report generating model.
In one embodiment, the output module further includes:
the template sub-module is used for constructing a target resource transaction data annotation template; the annotation template comprises a basic information module and an analysis information module of target resource transaction information;
The analysis information sub-module is used for capturing historical transaction data to obtain sample information to be analyzed and sample user basic information;
the basic information sub-module is used for analyzing the information to be analyzed of the sample and basic information of a sample user to obtain sample analysis information;
and the sample information sub-module is used for combining the sample analysis information, the sample information to be analyzed and the sample user basic information to obtain corresponding sample information.
In one embodiment, the output module further includes:
the confirmation module is used for correcting the analysis report to obtain a target analysis report;
the storage module is used for storing the target analysis report and the corresponding target resource transaction information into a high-quality case database;
the optimization module is used for inputting the cases in the high-quality case database into the analysis report generation model and performing iterative optimization on the analysis report generation model under the condition that the number of the cases in the high-quality case database is larger than a preset threshold value.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing a method of generating a transaction analysis report according to any of the embodiments of the present disclosure when the computer program is executed.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements a method of generating a transaction analysis report according to any of the embodiments of the present disclosure.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which when executed by a processor implements a method of generating a transaction analysis report according to any of the embodiments of the present disclosure.
The method, the device, the computer equipment, the storage medium and the computer program product for generating the transaction analysis report train a plurality of large language models, analyze and divide the prediction results of the trained models, continuously train the models as a data set, obtain an analysis report generation model, and obtain a corresponding transaction analysis report by inputting the information of target resource transaction into the analysis report generation model. Through training a plurality of models, a more comprehensive and accurate prediction result is obtained, the objectivity and the accuracy of the models are improved, and meanwhile, the robustness of the models is improved. The analysis efficiency of the transaction information is quickened, and the accuracy of the transaction analysis report is increased.
Drawings
FIG. 1 is a flow diagram of a method of generating a transaction analysis report in one embodiment;
FIG. 2 is a flow diagram of training an initial analysis report generation model set in one embodiment;
FIG. 3 is a flow diagram of a multi-factor rating system scoring in one embodiment;
FIG. 4 is a flow diagram of a training analysis report generation model in one embodiment;
FIG. 5 is a flow chart of acquiring sample information according to one embodiment;
FIG. 6 is a flow diagram of an optimization analysis report generation model in one embodiment;
FIG. 7 is a schematic illustration of a label injection molding plate in one embodiment;
FIG. 8 is a flow diagram of data annotation in one embodiment;
FIG. 9 is a flow diagram of generating an analysis report generation model in one embodiment;
FIG. 10 is a flow diagram of a method implementation of generating a transaction analysis report in one embodiment;
FIG. 11 is a block diagram of a transaction analysis report generating device in one embodiment;
fig. 12 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, there is provided a method for generating a transaction analysis report, including the steps of:
step S100, information of target resource transaction is obtained.
In an exemplary embodiment, the information of the target resource transaction may include a main body of the transaction, a manner of the transaction, a time of the transaction, and the like, and for example, in a case that the application scenario is in a bank, the information of the target resource transaction may include an account opening date, an account opening row, an account type, an account opening channel, an electronic banking service, a transaction start-stop time, a credit accumulated count, a debit accumulated count, an upstream primary communication opponent, a downstream primary communication opponent, and the like.
Step S200, inputting the information into a preset analysis report generation model, and outputting a transaction analysis report; the preset analysis report generation model is obtained by analyzing and dividing the prediction result of the initial analysis report generation model set, feeding back the prediction result to the initial analysis report generation model set and training; the initial analysis report generation model set is obtained by training a corresponding large language model in the base large model by using a plurality of training methods according to sample information.
In an exemplary embodiment, the preset analysis report generation model may include inputting information of the resource transaction into the analysis report generation model, and intelligently outputting the transaction analysis report; the transaction analysis report may include, for example, an abnormal feature, a risk event, etc., where the application scenario is a bank, the transaction analysis report may include, for example, an account transaction overall abnormal feature, a transaction opponent, a night transaction, a transaction statement abnormality, a risk-related event, other abnormal features, etc.
In an exemplary embodiment, the analysis report generating model may include predicting the resource transaction analysis report through an initial analysis report generating model set to obtain a plurality of prediction results, marking the plurality of prediction results from good to bad, selecting the best prediction result as a positive result, selecting the best prediction result as a negative result, establishing a small pre-training language model as an initial reward model, adding a full-connection layer header on the basis of the initial reward model, outputting a reward distance for calculating the positive result and the negative result, evaluating the quality of the generated report, determining a data set of the reward model by comparing the sorting order calculation loss of the positive result and the negative result when the quality meets the requirement, freezing a backbone network of the reward model, training the last layer, and performing self-adaptive learning rate adjustment and weight attenuation through an optimizer to obtain the analysis report generating model.
In an exemplary embodiment, the initial analysis report generation model set may be obtained by training a plurality of large language models in the base large model through sample information in a plurality of training manners, for example, the large language models may include Chatglm2-6B, baichung2-13B, qwen-14B, and the like, and the training manners may include Ptuning-V2 fine tuning scheme, lora fine tuning scheme, and the like.
In one exemplary embodiment, the initial analysis report generation model may be obtained by fine tuning Chatglm2-6B using ptning-V2, baichung2-13B using Lora, and Qwen-14B using Lora, according to sample information.
In an exemplary embodiment, the initial analysis report generation model may confirm whether the model is a qualified model or not according to model indexes and business indexes of the model after training, for example, the quality of model generation may be evaluated by measuring the similarity between the text generated by each model and the tag text by BLER-4, ROUGE-1, ROUGE-2 and ROUGE-L.
In an exemplary embodiment, the analysis report generation model may be used for generating a bank anti-money laundering suspicious transaction report, inputting information of the bank suspicious transaction into the analysis report generation model, and generating a suspicious transaction analysis report, wherein the suspicious transaction analysis report may include fast-forward and fast-forward of account funds, night transactions, related risk events, preliminary conclusions, and the like.
In the method for generating the transaction analysis report, a plurality of large language models are trained, the prediction results of the trained models are analyzed and divided, the models are continuously trained as data sets, an analysis report generation model is obtained, and the corresponding transaction analysis report is obtained by inputting information of target resource transaction into the analysis report generation model. Through training a plurality of models, a more comprehensive and accurate prediction result is obtained, the objectivity and the accuracy of the models are improved, and meanwhile, the robustness of the models is improved. The analysis efficiency of the transaction information is quickened, and the accuracy of the transaction analysis report is increased.
In one embodiment, as shown in fig. 2, step S200 includes:
in step S201, the sample information is divided into a training set and a testing set according to a preset ratio.
Step S202, training a plurality of large language models in the base large model by using a plurality of training methods according to the training set to obtain an initial model set.
And step S203, testing the initial model set according to the test set, establishing a multi-factor evaluation system to score the initial model set, and determining the initial model set as an initial analysis report generation model set under the condition that the score of the initial model set is higher than a preset threshold value.
In an exemplary embodiment, the sample information may include basic information of the target resource transaction and analysis information after analysis of the target resource transaction, where the basic information may include a main body of the transaction, a transaction manner, a transaction resource amount, a transaction time, and the like, and the analysis information may include feature information of the transaction, for example, the transaction is performed at night, the transaction resource fast-forwarding and fast-forwarding, a risk event related to the transaction, and the like.
In one exemplary embodiment, the training method may include a Ptning-V2 tuning scheme, a Lora tuning scheme, and the like, the large language model may include Chatglm2-6B, baichung2-13B, qwen-14B, and the like, and the initial model set may be obtained by tuning Chatglm2-6B using Ptning-V2, baichung2-13B using Lora, and Qwen-14B using Lora, based on sample information.
In an exemplary embodiment, the multi-factor evaluation index may include a model index and a business index, and the quality of model generation may be evaluated by measuring the similarity between the text generated by each model and the expected text, such as BLER-4, ROUGE-1, ROUGE-2, ROUGE-L, and the like.
In this embodiment, the sample information is divided into the training set and the testing set, the model is trained according to the training set and various training methods, and the score of the model is determined through the testing set, so that the initial analysis report generation model set is determined, the accuracy of the model can be improved, more reliable prediction can be provided, the decision effect is improved, and the basis and convenience are provided for the subsequent analysis report generation model.
In one embodiment, as shown in fig. 3, step S203 includes:
step S211, determining information which is predicted by the initial model set and is matched with expected information according to the Chinese language model.
Step S212, determining the matching rate of the initial model according to the information predicted by the initial model set and the matched information, and obtaining a first model score by combining a preset penalty factor.
Step S213, determining a second model score according to the predicted information, the matched information and the expected information.
Step S214, determining the model index according to the first model score and the second model score.
Step S215, determining a first business score according to the predicted text value and the actual text value of the initial model set.
Step S216, determining a second business score according to the matched information and the expected information.
Step S217, determining a third service score according to the information predicted by the initial model set and the matched information.
Step S218, determining a fourth business score according to the quality of the information predicted by the initial model set.
Step S219, determining the business index according to the first business score, the second business score, the third business score and the fourth business score.
In an exemplary embodiment, the matching rate of the initial model may be obtained by calculating the exact matching rate of each N-gram, and in particular, the matching rate may be obtained by the following equation:
(1)
wherein,the matching rate of the N-gram expressed as the initial model prediction; />The number of matches of the N-gram expressed as the predicted text; />Expressed as the number of all N-grams in the predicted text; n takes the values of 1, 2, 3 and 4.
In an exemplary embodiment, the penalty factor is a penalty for the case that the generated text is too long, and specifically, the penalty factor can be obtained by the following formula:
(2)
wherein the method comprises the steps ofBP is expressed as penalty factor;expressed as the total number of N-grams in the reference text; / >Expressed as the number of all N-grams in the predicted text; n is 1, 2, 3 and 4;
the BLEU score can be obtained as a first model score of the model through the matching rate and the penalty factor, and the first model score can be obtained specifically through the following formula:
(3)
wherein BLEU is represented as a first model score of the initial model; BP is denoted as a penalty factor,a matching rate of 1-gram expressed as initial model prediction; />A match rate of the 2-gram expressed as an initial model prediction; />The matching rate of the 3-gram expressed as the initial model prediction; />Expressed as the matching rate of the 4-gram predicted by the initial model.
In an exemplary embodiment, the second model score may be calculated by calculating the overlapping amount of 1-gram, 2-gram, LCS in the predicted generated text and the reference text, the recall, and the accuracy, wherein LCS is the longest common subsequence between the predicted text and the reference text, and in particular, the recall may be obtained by the following equation:
(4)
wherein,representing the recall rate of the n-gram predicted by the initial model; />Represented as the number of overlaps of n-grams in the predicted text and the reference text; />Expressed as the total number of n-grams in the reference text; n is 1, 2, LCS, where LCS is expressed as the longest common subsequence between the predicted text and the reference text;
The accuracy can be obtained in particular by the following equation:
(5)
wherein,representing the accuracy of the n-gram predicted by the initial model; />Represented as the number of overlaps of n-grams in the predicted text and the reference text; />Expressed as the number of all n-grams in the predicted text; n is 1, 2, LCS, where LCS is expressed as the longest common subsequence between the predicted text and the reference text;
the second model score may be obtained specifically by the following formula:
(6)
wherein,represented as initialModel predicting a second model score of the n-gram; />Representing the accuracy of the n-gram predicted by the initial model; />Representing the recall rate of the n-gram predicted by the initial model; n is 1, 2, LCS, where LCS is expressed as the longest common subsequence between the predicted text and the reference text;
the model index can be obtained by the following formula:
(7)
wherein,model index expressed as an initial model; BLEU is represented as a first model score of the initial model; />A second model score represented as an initial model predictive 1-gram; />A second model score represented as an initial model predictive 2-gram; />A second model score represented as an initial model predictive LCS; wherein LCS is expressed as the longest common subsequence between the predicted text and the reference text.
In an exemplary embodiment, the first business score may measure the robustness of the report quality generated by the initial model set by matching the predicted text value with the input text value data, for example, may set a score of 1 to 0.1 in a wrong place.
In an exemplary embodiment, the second business score may measure the completeness of the prediction report quality by calculating the overlapping degree of the analysis information of the prediction generation text and the analysis information of the label text, and specifically may obtain the second business index by the following formula:
(8)
wherein,a second business index represented as an initial model; />The number of overlaps of analysis information expressed as predicted text and tag text; />The number of analysis information expressed as label text.
In an exemplary embodiment, the third business score may measure the potential of generating report quality by predicting the number of text and the number of text for non-overlapping, and in particular the third business index may be obtained by:
(9)
wherein,a third business index represented as an initial model; />A non-overlapping number of analysis information expressed as predicted text and tag text; / >The number of analysis information expressed as predicted text.
In an exemplary embodiment, the fourth business score may be derived by scoring the readability of the score report quality, reflecting the end user's satisfaction.
In an exemplary embodiment, the business index score may specifically be obtained by the following formula:
(10)
wherein,a business index expressed as an initial model; />A first business score represented as an initial model;a second business score represented as an initial model; />A third business score represented as an initial model; />A fourth business score, represented as an initial model.
In an exemplary embodiment, the model may be judged to obtain the comprehensive index by judging the model index and the service index, and whether the initial model is qualified or not is determined according to the comprehensive index, specifically, the comprehensive index may be obtained by the following formula:
(11)
wherein,a composite index expressed as an initial model; />Model index expressed as an initial model; />A business index expressed as an initial model; the model may be determined to generate a set of models for the initial analysis report when the composite index is greater than 60%.
In this embodiment, by calculating the model index and the service index of the initial model set, the comprehensive score of the initial model set can be determined, so as to determine the accuracy of the model, thereby providing more reliable prediction and improving the decision effect.
In one embodiment, as shown in fig. 4, step S200 further includes:
step S221, extracting a preset number of sample sets from the sample information, and inputting the sample sets into an initial analysis report generation model set to obtain a prediction result set of the initial analysis report generation model set.
Step S222, sorting the prediction result set, determining the prediction result with the highest matching degree with the expected analysis information as a positive result, and determining other prediction results in the prediction result set as negative results.
Step S223, constructing a small pre-training language model as an initial rewarding model.
Step S224, adding an output layer for the initial rewarding model for determining rewarding distance between the positive result and the negative result;
step S225, under the condition that the rewarding distance is in a preset threshold value, determining a training set of the rewarding model by calculating the relative similarity of the positive result and the negative result.
And step S226, freezing the backbone network of the rewarding model, and training the rewarding model according to the training set of the rewarding model by using the self-adaptive learning rate adjustment and the weight attenuation of the optimizer to obtain the analysis report generation model.
In an exemplary embodiment, the prediction result set of the initial analysis report generation model set may include a plurality of trained prediction result sets of large language models, where one input data may output a prediction result of each large language model, and make a sequence from good to bad on the large language model set, and take the best result as a positive result, and the rest as a negative result.
In one exemplary embodiment, the initial reward model may be obtained by building a small LLM pre-training model, adding a full link layer header to the initial reward model, and converting the model output into a reward distance for calculating positive and negative outcomes, and evaluating the quality of the generated report based on the reward distance.
In an exemplary embodiment, the training of the reward model may be performed by freezing the backbone network in which the model is built, training only the last layer, while the data set is divided into training sets and verification sets according to a 9:1 ratio for training and evaluating the model, respectively, while using adam optimizers, adaptive learning rate adjustment and weight decay.
In this embodiment, the prediction result of the initial analysis report generation model set is used to generate the rewarding model for the initial analysis report, so that the prediction result of the model is more accurate, the backbone network is frozen, the training rate is accelerated, meanwhile, the overfitting is prevented, and an optimizer is used in the model, so that the convergence of the model is also effectively accelerated.
In one embodiment, as shown in fig. 5, step S200 further includes:
step S231, constructing a target resource transaction data annotation template; the annotation template comprises a basic information module and an analysis information module of target resource transaction information.
And S232, capturing historical transaction data to obtain sample information to be analyzed and sample user basic information.
And step S233, analyzing the information to be analyzed of the sample and the basic information of the sample user to obtain sample analysis information.
Step S234, combining the sample analysis information, the sample to-be-analyzed information and the sample user basic information to obtain corresponding sample information.
In an exemplary embodiment, the target resource transaction data labeling template may include the basic information module and the analysis information module, where the basic information module may include a theme of a transaction, a transaction time, a transaction manner, and the analysis information may include a risk event, a transaction statement abnormality, and the like, for example, in a case where the application scenario is a bank, the basic information module may include an account opening date, an account opening, an account type, a transaction amount, a transaction time, a lender accumulated amount, a borrower accumulated amount, and the like, and the analysis information may include that a user funds exhibits a fast-forward and fast-out, a night transaction, involves a risk event, other abnormal features, a preliminary conclusion, and the like.
In an exemplary embodiment, the relationship between the basic information module and the analysis information module may include obtaining the analysis information data from the basic information data, for example, determining whether the amount is large or excessive income of the account through a historical accumulated amount of the bank account, a transfer amount, and the like, determining the fast-in, fast-out, and the like for the account through time of multiple transactions of the bank account.
In an exemplary embodiment, the RPA robot may read the basic file, automatically log in the system, find an excellent target case according to the score, and obtain the sample information to be analyzed and the sample user basic information by performing page crawling on the history report and data stitching; carrying out Python script analysis on the information to be analyzed of the sample and the basic information of the sample to obtain sample analysis information; and combining the sample analysis information, the sample information to be analyzed and the sample user basic information to form sample information.
In this embodiment, the extraction and analysis of the data can be more accurately completed by making the sample data template, and the sample information can be obtained by combining the data of the template, so that a training set of the model can be obtained quickly and accurately, convenience is provided for training of the subsequent model, and meanwhile, the accuracy of model training is improved.
In one embodiment, as shown in fig. 6, step S200 further includes:
and step S300, correcting the analysis report to obtain a target analysis report.
Step S400, storing the target analysis report and the corresponding target resource transaction information into a high-quality case database.
Step S500, under the condition that the number of cases in the high-quality case database is larger than a preset threshold, the cases in the high-quality case database are input into an analysis report generation model, and iterative optimization is carried out on the analysis report generation model.
In an exemplary embodiment, the modifying the analysis report to obtain the target analysis report may include modifying, supplementing, scoring, and outputting the analysis report, wherein the scoring may include scoring the predicted outcome to determine a fourth business score.
In one exemplary embodiment, outputting the target analysis report may include revising the positive results output by the analysis report generation model, and storing the revised report and corresponding transaction information in a high quality case database, and storing negative results generated during the analysis report generation model output in a low quality case database.
In this embodiment, the target analysis report is obtained by correcting the analysis report output by the analysis report generation model, and the analysis report and the corresponding transaction information are stored for iterative optimization of the model, so that the accuracy of determining the target analysis report can be achieved, and meanwhile, the model is more mature and stable by iterative optimization of the model.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
In an exemplary embodiment, the method may be used for generating a report of suspicious transaction analysis of a bank, wherein the labeling template may be as shown in fig. 7, and includes: content and Summary, wherein the Content is basic information of the transaction, and may include account opening date, account number, account opening row, account type, account opening channel, transaction start-stop time, credit accumulated amount, debit accumulated amount, upstream main communication opponent, downstream main opponent, etc., and the Summary is the transaction analysis report, and may include account transaction overall abnormal characteristics, transaction opponents, account funds presenting fast-forward and fast-out, night transaction, transaction appendant abnormality, related risk event, other abnormal characteristics, preliminary conclusion, etc.
In an exemplary embodiment, the generation of the sample information may be automatically noted by the RPA robot, for example, by a bank suspicious transaction analysis report, as shown in fig. 8, including:
reading to obtain a basic file, and logging in a suspicious transaction system;
judging whether the client is the bank client or not, if not, directly exiting the label of the client; if yes, capturing basic information of the client;
According to the basic information, capturing the running water information of the client, and carrying out running water characteristic analysis on the running water information;
and carrying out data processing format on the stream features to finish the marking of the suspicious transaction data set.
In an exemplary embodiment, the training of the model may be performed as shown in fig. 9, including:
the training data set can comprise Content and Summary, wherein the Content is basic information of a transaction, is input of a model, and the Summary is analysis information of the transaction and is output of the model;
the fine tuning training schemes can comprise a Lora and Ptning-V2 fine tuning scheme, and the base model base can comprise ChatGLM2-6B, qwen-14B, baiChuan2-13B and the like;
and performing fine tuning training on the base of the basic model to respectively obtain Aml-GLM, aml-Qwen, aml-BC and the like, wherein the models obtained by training jointly form a multi-model fusion controller, and outputting to obtain a target analysis report.
In an exemplary embodiment, the method may be as in fig. 10 for bank anti-money laundering suspicious analysis reports, comprising:
the bank back money laundering system data uploads customer data, account information, transaction running water and the like to the RPA robot;
The RPA robot performs feature extraction on the transaction information to obtain transaction behavior features;
data cleaning is carried out on the transaction behavior characteristics to obtain suspicious transaction information; wherein the suspicious transaction information may include customer base and customer funds flow;
the RPA robot inputs suspicious prompts into a trained large model Aml-GPTs to analyze suspicious points to form a preliminary suspicious analysis report;
the money backwashing staff supplements, modifies and scores the preliminary suspicious analysis report, stores the modified target suspicious analysis report in a high-quality case library, and stores the analysis report with lower score in a low-quality case library;
the system outputs a target suspicious analysis report.
Based on the same inventive concept, the embodiment of the application also provides a transaction analysis report generation device for realizing the transaction analysis report generation method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiment of the generating device of one or more transaction analysis reports provided below may refer to the limitation of the generating method of the transaction analysis report hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 11, there is provided a transaction analysis report generating apparatus 100, including: an acquisition module 101 and an output module 102, wherein:
and the acquisition module is used for acquiring the information of the target resource transaction.
The output module is used for inputting the information into a preset analysis report generation model and outputting a transaction analysis report; the preset analysis report generation model is obtained by analyzing and dividing the prediction result of the initial analysis report generation model set, feeding back the prediction result to the initial analysis report generation model set and training; the initial analysis report generation model set is obtained by training a corresponding large language model in the base large model by using a plurality of training methods according to sample information.
In one embodiment, the output module includes: the first sub-module of dividing, first training sub-module, test sub-module, wherein:
the first dividing sub-module is used for dividing the sample information into a training set and a testing set according to a preset proportion.
And the first training sub-module is used for training a plurality of large language models in the base large model by using a plurality of training methods according to the training set to obtain an initial model set.
And the testing sub-module is used for testing the initial model set according to the testing set, establishing a multi-factor evaluation system to score the initial model set, and determining the initial model set as an initial analysis report generation model set under the condition that the score of the initial model set is higher than a preset threshold value.
In one embodiment, the test sub-module includes: the system comprises an information prediction unit, a first model scoring unit, a second model scoring unit, a model index unit, a first business scoring unit, a second business scoring unit, a third business scoring unit, a fourth business scoring unit and a business index unit, wherein:
and the information prediction unit is used for determining the information which is predicted by the initial model set and is matched with the expected information according to the Chinese language model.
And the first model scoring unit is used for determining the matching rate of the initial model according to the information predicted by the initial model set and the matched information, and obtaining a first model score by combining a preset penalty factor.
And the second model scoring unit is used for determining a second model score according to the predicted information, the matched information and the expected information.
And the model index unit is used for determining the model index according to the first model score and the second model score.
And the first business scoring unit is used for determining a first business score according to the text numerical value predicted by the initial model set and the actual text numerical value.
And the second business scoring unit is used for determining a second business score according to the matched information and the expected information.
And the third business scoring unit is used for determining a third business score according to the information predicted by the initial model set and the matched information.
And the fourth business scoring unit is used for determining a fourth business score according to the quality of the information predicted by the initial model set.
And the business index unit is used for determining the business index according to the first business score, the second business score, the third business score and the fourth business score.
In one embodiment, the output module includes: the system comprises a prediction submodule, a second scoring submodule, a reward model submodule, a reward distance ion module, a training set submodule and a second training submodule, wherein:
and the prediction sub-module is used for extracting a preset number of sample sets from the sample information, inputting the sample sets into an initial analysis report generation model set and obtaining a prediction result set of the initial analysis report generation model set.
And the second dividing sub-module is used for sequencing the prediction result set, determining the prediction result with the highest matching degree with the expected analysis information as a positive result, and determining other prediction results in the prediction result set as negative results.
And the reward model submodule is used for constructing a small pre-training language model as an initial reward model.
And the rewarding distance ion module is used for adding an output layer for the initial rewarding model and determining the rewarding distance between the positive result and the negative result.
And the training set sub-module is used for determining a training set of the reward model by calculating the relative similarity of the positive result and the negative result under the condition that the reward distance is at a preset threshold value.
And the second training sub-module is used for freezing the backbone network of the rewarding model, using an optimizer to adjust the self-adaptive learning rate and attenuate the weight, and training the rewarding model according to the training set of the rewarding model to obtain the analysis report generating model.
In one embodiment, the output module includes: the system comprises a template sub-module, an analysis information sub-module, a basic information sub-module and a sample information sub-module, wherein:
The template sub-module is used for constructing a target resource transaction data annotation template; the annotation template comprises a basic information module and an analysis information module of target resource transaction information.
And the analysis information sub-module is used for capturing the historical transaction data to obtain sample information to be analyzed and sample user basic information.
And the basic information sub-module is used for analyzing the information to be analyzed of the sample and the basic information of the sample user to obtain sample analysis information.
And the sample information sub-module is used for combining the sample analysis information, the sample information to be analyzed and the sample user basic information to obtain corresponding sample information.
In one embodiment, the output module includes: the device comprises a confirmation module, a storage module and an optimization module, wherein:
and the confirmation module is used for correcting the analysis report to obtain a target analysis report.
And the storage module is used for storing the target analysis report and the corresponding information of the target resource transaction into a high-quality case database.
The optimization module is used for inputting the cases in the high-quality case database into the analysis report generation model and performing iterative optimization on the analysis report generation model under the condition that the number of the cases in the high-quality case database is larger than a preset threshold value.
The respective modules in the above-described transaction analysis report generation device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 12. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of generating a transaction analysis report. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 12 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A method of generating a transaction analysis report, the method comprising:
acquiring information of target resource transaction;
inputting the information into a preset analysis report generation model, and outputting a transaction analysis report; the preset analysis report generation model is obtained by analyzing and dividing the prediction result of the initial analysis report generation model set, feeding back the prediction result to the initial analysis report generation model set and training; the initial analysis report generation model set is obtained by training a corresponding large language model in the base large model by using a plurality of training methods according to sample information.
2. The method of claim 1, wherein the initial analysis report generating model set training patterns comprises:
dividing sample information into a training set and a testing set according to a preset proportion;
according to the training set, training a plurality of large language models in the base large model by using a plurality of training methods to obtain an initial model set;
and testing the initial model set according to the test set, establishing a multi-factor evaluation system to score the initial model set, and determining the initial model set as an initial analysis report generation model set under the condition that the score of the initial model set is higher than a preset threshold value.
3. The method of claim 2, wherein the multi-factor evaluation system scores the initial model set, comprising at least one of: model index, business index, including:
determining information which is predicted by the initial model set and matched with expected information according to a Chinese language model;
determining the matching rate of the initial model according to the information predicted by the initial model set and the matched information, and combining a preset penalty factor to obtain a first model score;
Determining a second model score based on the predicted information, the matched information, and the expected information;
determining the model index according to the first model score and the second model score;
determining a first business score according to the text numerical value predicted by the initial model set and the actual text numerical value;
determining a second business score according to the matched information and the expected information;
determining a third business score according to the information predicted by the initial model set and the matched information;
determining a fourth business score according to the quality of the information predicted by the initial model set;
and determining the business index according to the first business score, the second business score, the third business score and the fourth business score.
4. The method according to claim 1, wherein the predicting result of the initial analysis report generating model set is analyzed and divided, and is fed back to the initial analysis report generating model set and trained to obtain an analysis report generating model; comprising the following steps:
extracting a preset number of sample sets from sample information, and inputting the sample sets into an initial analysis report generation model set to obtain a prediction result set of the initial analysis report generation model set;
Sequencing the prediction result set, determining the prediction result with the highest matching degree with the expected analysis information as a positive result, and determining other prediction results in the prediction result set as negative results;
constructing a small pre-training language model as an initial rewarding model;
adding an output layer to the initial reward model for determining a reward distance of the positive outcome and the negative outcome;
determining a training set of the reward model by calculating the relative similarity of the positive result and the negative result under the condition that the reward distance is at a preset threshold;
freezing the backbone network of the rewarding model, using an optimizer to adjust the self-adaptive learning rate and attenuate the weight, and training the rewarding model according to the training set of the rewarding model to obtain the analysis report generating model.
5. The method according to claim 1, wherein the sample information is obtained by a method comprising:
constructing a target resource transaction data annotation template; the annotation template comprises a basic information module and an analysis information module of target resource transaction information;
grabbing historical transaction data to obtain sample information to be analyzed and sample user basic information;
Analyzing the information to be analyzed of the sample and basic information of a sample user to obtain sample analysis information;
and combining the sample analysis information, the sample information to be analyzed and the sample user basic information to obtain corresponding sample information.
6. The method of claim 1, wherein after outputting the transaction analysis report, further comprising:
correcting the analysis report to obtain a target analysis report;
storing the target analysis report and the corresponding target resource transaction information into a high-quality case database;
under the condition that the number of cases in the high-quality case database is larger than a preset threshold value, inputting the cases in the high-quality case database into an analysis report generation model, and performing iterative optimization on the analysis report generation model.
7. A transaction analysis report generation apparatus, the apparatus comprising:
the acquisition module is used for acquiring information of target resource transaction;
the output module is used for inputting the information into a preset analysis report generation model and outputting a transaction analysis report; the preset analysis report generation model is obtained by analyzing and dividing the prediction result of the initial analysis report generation model set, feeding back the prediction result to the initial analysis report generation model set and training; the initial analysis report generation model set is obtained by training a corresponding large language model in the base large model by using a plurality of training methods according to sample information.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202311599037.6A 2023-11-28 2023-11-28 Transaction analysis report generation method and device and computer equipment Pending CN117725901A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311599037.6A CN117725901A (en) 2023-11-28 2023-11-28 Transaction analysis report generation method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311599037.6A CN117725901A (en) 2023-11-28 2023-11-28 Transaction analysis report generation method and device and computer equipment

Publications (1)

Publication Number Publication Date
CN117725901A true CN117725901A (en) 2024-03-19

Family

ID=90202522

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311599037.6A Pending CN117725901A (en) 2023-11-28 2023-11-28 Transaction analysis report generation method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN117725901A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118505390A (en) * 2024-07-18 2024-08-16 宁波银行股份有限公司 Trade analysis report generation method, apparatus, electronic device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118505390A (en) * 2024-07-18 2024-08-16 宁波银行股份有限公司 Trade analysis report generation method, apparatus, electronic device and storage medium

Similar Documents

Publication Publication Date Title
TWI788529B (en) Credit risk prediction method and device based on LSTM model
US10460320B1 (en) Fraud detection in heterogeneous information networks
WO2017067153A1 (en) Credit risk assessment method and device based on text analysis, and storage medium
US7904397B2 (en) System and method for scalable cost-sensitive learning
US10867245B1 (en) System and method for facilitating prediction model training
Ma et al. A credit risk assessment model of borrowers in P2P lending based on BP neural network
US11113609B2 (en) Machine-learning system and method for identifying same person in genealogical databases
CN117725901A (en) Transaction analysis report generation method and device and computer equipment
US20230105547A1 (en) Machine learning model fairness and explainability
CN112365007A (en) Model parameter determination method, device, equipment and storage medium
CN114330837A (en) Object processing method and device, computer equipment and storage medium
CN117472431A (en) Code annotation generation method, device, computer equipment, storage medium and product
US20230252387A1 (en) Apparatus, method and recording medium storing commands for providing artificial-intelligence-based risk management solution in credit exposure business of financial institution
CN111310931A (en) Parameter generation method and device, computer equipment and storage medium
CN110766465A (en) Financial product evaluation method and verification method and device thereof
Zhou Deep learning algorithms in enterprise accounting management analysis
Grover et al. Using supervised learning to select audit targets in performance-based financing in health: An example from Zambia
US20240202631A1 (en) Machine Learning Systems and Methods for Validating Workflows
CN118411249A (en) Merchant anomaly detection method, device, computer equipment and storage medium
CN118568202A (en) Query statement generation model processing method and device and computer equipment
CN116484280A (en) Training method of object classification model, object classification method and device
CN116452308A (en) Risk assessment method, apparatus, computer device, storage medium, and program product
CN115659599A (en) Data processing method and device
CN116975664A (en) Learning style analysis method, learning style analysis device, computer equipment and storage medium
CN117788139A (en) Training method and device for information output model, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination