Risk identification method, device and equipment
By using large language models to generate and reinforce learning to optimize financial risk identification rules, the problem of insufficient adaptability and flexibility of traditional rules is solved, and more efficient and accurate risk identification is achieved.
Patent Information
- Application Number
- CN202411584154.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-14
AI Technical Summary
Traditional financial risk identification rules rely on manual design and historical data, resulting in insufficient adaptability and flexibility, making it difficult to quickly respond to business changes and rule updates.
By obtaining user demand information, using large language models to generate risk identification rules, and using reinforcement learning to optimize these rules, optimizing large language models based on business scenarios and optimized rules.
It improves the adaptability and performance of risk identification rules, lowers the threshold for generating rules, and enhances the accuracy and adjustability of rules.
Smart Images

Figure CN119444380A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of financial risk management, and specifically to a risk identification method, device and equipment. Background Art
[0002] Financial risk management is one of the important tasks of financial institutions, which aims to identify, assess and control various risks that may cause losses to financial institutions.
[0003] Traditional financial risk management methods mainly rely on manually formulated risk identification rules, which are based on expert experience and historical data to identify and evaluate various risk situations. However, traditional risk identification rules usually rely on written code or original rule language models and statistical language models, which provide specific business logic and rules. This dependence limits the adaptability and flexibility of risk identification rules and further affects the performance of risk identification rules in practical applications. In addition, once the business process changes or the rules need to be updated, the code or original risk identification rules need to be modified and adjusted, which may take a lot of time and manpower.
[0004] Therefore, how to overcome the limitations of traditional risk identification rules in financial risk management and provide a risk identification method that is highly adaptable, high-performance, flexible and fast is a key issue that needs to be solved urgently. Summary of the invention
[0005] The purpose of the embodiments of this specification is to provide a risk identification method, device and equipment to overcome the limitations of traditional risk identification rules in financial risk management and improve the adaptability and performance of risk identification.
[0006] This specification provides a risk identification method, which includes:
[0007] Acquiring user demand information, wherein the user demand information includes a business scenario and a risk identification requirement under the business scenario;
[0008] Querying first business data matching the risk identification requirement in the business scenario;
[0009] Generate risk identification rules using a large language model based on user demand information and first business data;
[0010] Querying second business data matching the risk identification rule in the business scenario;
[0011] Using the second business data to perform reinforcement learning on the risk identification rule to obtain an optimized risk identification rule;
[0012] Optimizing the large language model according to the business scenario and the optimized risk identification rules;
[0013] The optimized risk identification rules are used to perform risk identification.
[0014] In some embodiments, the method further comprises:
[0015] Extract key information from the risk identification requirements;
[0016] Based on the key information in the risk identification requirement, corresponding first business data is associated in the business database using fuzzy matching.
[0017] In some embodiments, the method further comprises:
[0018] Construct risk identification prompt information based on risk identification needs and first business data;
[0019] Structuring the risk identification prompt information;
[0020] Based on the structured risk identification prompt information, risk identification rules are generated using a pre-trained large language model.
[0021] In some embodiments, the method further comprises:
[0022] Inputting the risk warning information into the pre-trained large language model;
[0023] Obtain risk identification rules generated by the pre-trained large language model.
[0024] Extracting key information from the risk identification rules;
[0025] Based on the key information in the risk identification rule and the key information in the risk identification requirement, fuzzy matching is used to associate matching second business data in the business database.
[0026] In some embodiments, the method further comprises:
[0027] Based on the risk identification rule, generating a risk identification result of the second business data;
[0028] Based on the risk identification result, determining the risk identification accuracy of the risk identification rule;
[0029] If the risk identification accuracy of the risk identification rule is less than a preset risk identification threshold, the risk identification rule is subjected to reinforcement learning using the second business data to obtain an optimized risk identification rule.
[0030] In some embodiments, the method further comprises:
[0031] Based on the risk identification rules and the second business data, scheduling the reinforcement learning optimization engine to build a deep Q learner;
[0032] Based on the deep Q learner, generating a set of action trajectories corresponding to the second business data;
[0033] Building an action enhancement model based on the action trajectory set corresponding to the second business data;
[0034] Based on the action enhancement model, generating an enhanced action trajectory corresponding to the second business data;
[0035] Adjust the risk identification rules based on the reinforcement action trajectory corresponding to the second business data.
[0036] In some embodiments, the method further comprises:
[0037] Constructing risk identification correction information based on the optimized risk identification rules and the structured risk identification prompt information in the business scenario;
[0038] Based on the risk identification and correction information, the large language model is optimized.
[0039] The embodiment of this specification also provides a risk identification device, including:
[0040] An acquisition module, used to acquire user demand information, wherein the user demand information includes a business scenario and a risk identification requirement under the business scenario;
[0041] A first query module, used to query first business data matching the risk identification requirement in the business scenario;
[0042] A generation module, used to generate risk identification rules using a large language model according to user demand information and first business data;
[0043] A second query module, used to query second business data matching the risk identification rule in the business scenario;
[0044] A reinforcement learning module, used to perform reinforcement learning on the risk identification rule using the second business data to obtain an optimized risk identification rule;
[0045] An optimization module, used for optimizing the large language model according to the business scenario and the optimized risk identification rules;
[0046] The risk identification module is used to perform risk identification using the optimized risk identification rules.
[0047] The embodiments of the present specification also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the risk identification method is implemented when the processor executes the computer program.
[0048] The embodiments of the present specification also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the risk identification method described above is implemented.
[0049] The embodiments of this specification also provide a computer program product, which includes the computer program, and when the computer program is executed by the processor, the risk identification method is implemented.
[0050] In the technical solution of the embodiment of this specification, the agent robot obtains user demand information, and the user demand information includes a business scenario and a risk identification requirement under the business scenario; queries the first business data matching the risk identification requirement under the business scenario; and generates risk identification rules using a large language model based on the user demand information and the first business data. In this way, the risk identification rules are generated using a pre-trained large language model without relying on manual design and manual experience, which lowers the threshold for risk identification rule generation and improves the efficiency and quality of risk identification rule generation. The agent robot queries the second business data matching the risk identification rule under the business scenario; uses the second business data to perform reinforcement learning on the risk identification rule to obtain an optimized risk identification rule; optimizes the large language model based on the business scenario and the optimized risk identification rule; and uses the optimized risk identification rule to perform risk identification. In this way, using reinforcement learning to adjust the risk identification rules can make the risk identification rules more accurate and overcome the limitations of poor adaptability and adjustability of manually designed rules. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art description are briefly introduced below.
[0052] Figure 1 is a flow chart of a risk identification method provided by an embodiment of this specification;
[0053] Figure 2 It is an overall logical flow chart of a risk identification method provided by an embodiment of this specification;
[0054] Figure 3 It is a schematic diagram of the structure of a risk identification device provided in an embodiment of this specification;
[0055] Figure 4It is a schematic diagram of the structural composition of a computer device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0057] It should be noted that the user-related information and data involved in the embodiments of this specification are all information and data authorized by the user or fully authorized by relevant parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users or relevant parties to choose to authorize or refuse.
[0058] It should also be noted that in the embodiments of this specification, certain software, components, models and other existing solutions in the industry may be mentioned. They should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0059] Risk identification rules refer to a set of guidelines, principles or strategies developed in the risk management process to reduce and avoid potential risks. These rules are designed to help companies or individuals identify, assess, control and respond to risks. The application of risk identification rules in risk management specifically includes risk identification, risk assessment, risk control and risk financing. By establishing clear risk identification standards and methods, potential risks can be discovered more effectively. After identifying risks, risk identification rules require that risks be evaluated to determine their likelihood and impact. This helps companies or individuals understand the severity of risks and develop corresponding response measures. Risk identification rules emphasize controlling risks by taking preventive measures and emergency measures. Preventive measures include strengthening internal controls, training employees, etc. to reduce the probability of risk; emergency measures are emergency measures taken after the risk occurs to mitigate its impact. For some risks that cannot be completely avoided, risk identification rules recommend transferring or diversifying risks through insurance or other financing methods. This helps companies or individuals maintain financial stability when facing risks.
[0060] This specification embodiment provides a risk identification method. Figure 1 and Figure 2 In specific implementation, the risk identification method of the embodiment of this specification includes the following steps:
[0061] S101: Obtain user demand information, where the user demand information includes business scenarios and risk identification requirements under the business scenarios.
[0062] In some embodiments, the agent robot can obtain risk identification requirements during the interaction with the user. The risk identification requirements include specific application scenarios and the user's expectations for one or more aspects of risk identification, such as accuracy, comprehensiveness, operability, timeliness, transparency, and compliance.
[0063] By obtaining risk identification requirements including specific application scenarios and multi-faceted user expectations, the foundation is laid for the agent robot to match the corresponding first business data based on the risk identification requirements.
[0064] In terms of clarity and accuracy, the specific expectation may be that users hope that risk assessment can provide clear and accurate results so that users can understand the potential risks and their impacts, and that risk identification should be based on reliable data and scientific analysis methods to ensure the accuracy and credibility of the results. In terms of comprehensiveness, the expectation may be that users hope that risk identification can cover all relevant risk areas, including but not limited to market risk, credit risk, operational risk, compliance risk, etc., and that risk assessment should deeply analyze each risk area, identify potential risk points, and provide detailed explanations and instructions. In terms of operability, the expectation may be that users hope that risk identification can provide users with specific action suggestions to help users reduce risks or respond to risk events, and that risk identification should include practical risk management strategies and measures that are operational and targeted. In terms of timeliness, the expectation may be that users hope that risk identification can reflect the current risk status in a timely manner and be updated as the business environment and market environment change, and that risk identification should be conducted regularly and be able to respond to new risk events or changes in a timely manner to provide the latest risk identification results. In terms of transparency, the expectation may be that users hope that the process and results of risk identification can be transparent so that users can understand the basis and methods of risk identification, and that the results of risk identification should have detailed explanations. In terms of compliance, the expectation may be that users hope that risk identification can comply with relevant laws, regulations and regulatory requirements to ensure that the user's business activities are legal and compliant, and that risk identification should fully consider changes in laws, regulations and regulatory requirements to ensure that the identification results meet the latest compliance standards.
[0065] For example, the agent robot interacts with users through questions such as "What is the specific application scenario?", "What is the specific goal?", and "What are the specific expectations in terms of accuracy, comprehensiveness, operability, timeliness, transparency, compliance, etc.". Based on the corresponding answers of the users during the interaction, the agent robot obtains the following risk identification requirements: the specific application scenario is loan risk assessment; key risk factors such as the applicant's credit record, repayment ability, and asset status need to be considered; the maximum allowable default rate does not exceed 5%; the decision logic should be easy to explain and understand, and easy to communicate with regulators; the risk identification rules should be able to adapt to changes in different economic cycles and market environments; for each applicant, the risk identification rules should accurately output the corresponding risk results.
[0066] S102: Query first business data matching the risk identification requirement in the business scenario.
[0067] In some embodiments, the agent robot may extract key information from the risk identification requirement; based on the key information from the risk identification requirement, the agent robot may associate the corresponding first business data in the business database using fuzzy matching.
[0068] Based on the fuzzy matching algorithm, the accuracy and efficiency of the agent robot in matching appropriate business data in the business database for risk identification needs are greatly improved, which in turn helps to construct risk identification prompt information and generate accurate risk identification rules.
[0069] The business database contains business data such as customer information, product information, and order information. The first business data represents the business data in the business database that is related to the current risk identification needs. The agent robot can use key information extraction models such as TF-IDF, PageRank, TextRank, and LDA to extract key information in the risk identification needs. For example, the agent robot can use the LDA model to extract key information in the risk identification needs. The LDA model assumes that each document / text in the document / text collection is composed of a mixture of K potential topics. Each topic is a probability distribution that represents the probability of each word appearing under this topic. The LDA model selects a topic based on the topic distribution of the document / text, and then generates corresponding keywords based on the probability distribution of this topic. By performing statistical analysis on the word count data in the document, using the Bayesian statistical inference method, and using Gibbs sampling or variational inference, the optimal topic distribution and keyword distribution under the topic are estimated. When the LDA model is trained, each topic will be assigned a series of related keywords, which are words with high probability under a given topic. The agent robot can view the topic distribution of the risk identification needs through the trained LDA model, find out the topic of the risk identification needs, and then determine the key information in the risk identification needs. The agent can determine the required business data type based on the key information extracted from the risk identification requirements. The fuzzy matching algorithm can handle uncertain or incomplete query conditions. The powerful text search function of the fuzzy matching algorithm can greatly improve the efficiency of querying relevant business data in the business database. Based on the key information in the risk identification requirements, the agent robot can use the fuzzy matching algorithm to match the business data field of the required business data type in the business database, and then associate the business data corresponding to the matched business data field as the first business data. Specifically, the agent robot can assign a weight to each attribute of the key information in the risk identification requirements based on the fuzzy matching algorithm, and the attributes with high weights have a greater impact on the overall matching score. The agent robot pre-sets a matching score threshold and fuzzily matches the key information in the risk identification requirements with the business data fields in the business database that meet the required business data type. Based on the fuzzy matching results, the agent robot selects the business data fields whose matching scores are higher than the matching score threshold. The agent robot associates the business data corresponding to these business data fields as the first business data.
[0070] For example, in the loan risk assessment scenario, the key information in the risk identification requirements extracted by the agent robot using the LDA model is: loan risk assessment, applicant's credit record, repayment ability, asset status and other key risk factors; maximum default rate; logic that is easy to explain and understand; risk identification rules; adapt to changes in different economic cycles and market environments. Based on the key information of the user's request, the agent robot determines the user's goal. Based on the user's goal, the agent robot determines that the required business data type is the applicant's historical loan application data. The business data fields matched by the agent robot based on the fuzzy matching algorithm based on character similarity measurement are the applicant's age, occupation, income, loan amount, loan term, loan interest rate, etc. Based on the matched business data fields, the agent robot associates the loan application data of the second week of each year in the past five years as the first business data in the database.
[0071] S103: Generate risk identification rules using a large language model according to the user demand information and the first business data.
[0072] In some embodiments, based on the risk identification requirements and the first business data, the agent robot can construct risk identification prompt information and structure the risk identification prompt information; based on the structured risk identification prompt information, the agent robot can use a pre-trained large language model to generate risk identification rules.
[0073] By using risk identification needs and first business data to construct risk identification prompt information, the agent robot can call the pre-trained large language model to generate risk identification rules without relying on manual design and experience, which helps to generate risk identification rules faster and with a lower threshold.
[0074] The risk identification requirements include specific application scenarios and users' specific expectations in many aspects. Therefore, the agent robot can directly use the risk identification requirements as part of the risk identification prompt information. In addition, the agent robot can randomly extract part of the business data from the first business data and place it in the data table of the risk identification prompt information as a data sample in the risk identification prompt information. Based on the risk identification requirements and the first business data, the agent robot can generate a preliminary version of the risk identification prompt information. After generating the preliminary version of the risk identification prompt information, the agent robot adds corresponding data annotation information to the header of the data table, and adds a user target field to the preliminary version of the prompt information according to user expectations. After adding the user target field, the agent robot adds a risk identification rule format example to the preliminary version of the risk identification prompt information and thereby obtains structured risk identification prompt information. The risk identification rule format example includes examples of different indicator calculation rules. Based on the structured risk identification prompt information, the agent robot can use a pre-trained large language model to generate risk identification rules.
[0075] For example, a sample of risk identification prompt information constructed by the agent robot is as follows:
[0076] {###Prompt message example###
[0077] User expectations: The specific application scenario is loan risk assessment; key risk factors such as the applicant's credit record, repayment ability, and asset status need to be considered; the maximum allowable default rate shall not exceed 5%; the decision logic shall be easy to explain and understand, and facilitate communication with regulators; risk identification rules shall be able to adapt to changes in different economic cycles and market environments; for each applicant, the risk identification rules shall accurately output the corresponding risk results.
[0078] Business data: {table header: [age, occupation, income...], data sample: [[50, lawyer, 35...], [25, teacher, 15...], ...]}.
[0079] User goal: Please generate risk identification rules that meet user expectations based on business data.
[0080] Risk identification rule format example:
[0081] "Calculation rules for different indicators":{
[0082] "Indicator 1":[
[0083] {"min_score":750,"score":40},
[0084] {"min_score":600,"score":30},
[0085] {"min_score":550,"score":20},
[0086] {"min_score":0,"score":0}
[0087] ],
[0088] "Indicator 2":[
[0089] {"min_ratio":4,"score":40},
[0090] {"min_ratio":3,"score":30},
[0091] {"min_ratio":2,"score":20},
[0092] {"min_ratio":0,"score":0}
[0093] ],...
[0094] },
[0095] "Total score calculation rules":[
[0096] {"min_total_score":90,"risk_level":"low"},
[0097] {"min_total_score":80,"risk_level":"medium"},
[0098] {"min_total_score":70,"risk_level":"medium_high"},
[0099] {"min_total_score":0,"risk_level":"high"}
[0100] ],
[0101] "Maximum Default Rate": 0.05
[0102] }.
[0103] ###Prompt message example###}
[0104] In some embodiments, the agent robot inputs the risk warning information into the pre-trained large language model; the large language model generates risk identification rules based on the input structured risk identification warning information; the agent robot can obtain the risk identification rules generated by the pre-trained large language model.
[0105] By scheduling the pre-trained large language model to generate risk identification rules, the automation of low-threshold risk identification rule generation is achieved without relying on manual design and experience, and the generated risk identification rules are more adaptable and adjustable.
[0106] The agent robot can pre-train large language models such as Bert and GPT. In terms of natural language understanding, the large language model can understand and process various natural language expressions, including syntactic structures, semantic relationships, etc. The agent robot can schedule the pre-trained large language model and input the structured risk identification prompt information into the large language model. The large language model generates the initial version of the risk identification rules based on the input structured risk identification prompt information.
[0107] For example, in a loan risk assessment scenario, the agent robot constructs risk identification prompt information based on risk identification requirements and first business data and inputs it into the pre-trained GPT. GPT generates a preliminary version of risk identification rules based on the input structured risk identification prompt information. The agent robot obtains the preliminary version of risk identification rules generated by GPT. The preliminary version of risk identification rules obtained by the agent robot is as follows. If the applicant's characteristics meet the following conditions, the agent robot will determine that the applicant is at high risk.
[0108] age(age)>age_threshold(age_threshold=40)
[0109] income <income_threshold(income_threshold=3500)
[0110] credit_score (credit score) <credit_score_threshold(credit_score_threshold=600)
[0111] loan_amount (loan application amount) > loan_amount_limit (loan_amount_limit = 50000)
[0112] S104: Query the second business data matching the risk identification rule in the business scenario.
[0113] In some embodiments, the agent robot can extract key information from the risk identification rules; based on the key information in the risk identification rules and the key information in the risk identification requirements, the agent robot can use fuzzy matching to associate matching second business data in the business database.
[0114] By using the key information in the risk identification rules and the key information in the risk identification requirements, the agent robot can better match the business data related to the risk identification rules. In addition, based on the key information in the risk identification rules that is strongly related to the second business data, the efficiency of fuzzy matching can be effectively improved.
[0115] The agent robot can use key information extraction models such as TF-IDF, PageRank, TextRank, and LDA to extract key information in the risk identification rules. Based on the key information in the risk identification rules and the key information in the risk identification prompt information, the agent robot can use a fuzzy matching algorithm to match the business data field of the required business data type in the business database, and then associate the business data corresponding to the matched business data field as the second business data. Compared with only using the key information in the risk identification prompt information for fuzzy matching, the comprehensive use of the key information in the risk identification rules and the key information in the risk identification prompt information for fuzzy matching can effectively improve the efficiency of fuzzy matching, because the key information in the risk identification rules helps to match more accurate and appropriate first business data. Specifically, the agent robot can use the fuzzy matching algorithm to assign a weight to each attribute in the key information in the risk identification rules and the key information of the user's demands, and the high-weighted attributes have a greater impact on the overall matching score. The agent robot pre-sets a matching score threshold and matches the key information in the risk identification rules and the key information in the risk identification prompt information with the business data fields in the business database that meet the required business data type. Based on the matching results, the agent robot selects only the business data fields whose matching scores are higher than the matching score threshold. The agent robot associates the business data corresponding to these business data fields as the first business data.
[0116] For example, in the loan risk assessment scenario, the agent robot can find the theme of the risk identification rule by viewing the topic distribution of the risk identification rule through the trained LDA model, and then determine the key information in the risk identification rule. Based on the key information in the risk identification rule and the key information in the risk identification prompt information, the agent robot uses a fuzzy matching algorithm based on character similarity measurement to match the business data fields such as the applicant's age, occupation, income, loan amount, loan term, loan interest rate, actual loan default, etc. Based on the matched business data fields, the agent robot associates the loan application data for 12 months of year A in the database as the first business data.
[0117] S105: Perform reinforcement learning on the risk identification rule using the second business data to obtain an optimized risk identification rule.
[0118] In some embodiments, based on the risk identification rules, the agent robot can generate a risk identification result of the second business data; based on the risk identification result, the agent robot can determine the risk identification accuracy of the risk identification rules; if the risk identification accuracy of the risk identification rules is less than a preset risk identification threshold, the agent robot can use the second business data to perform reinforcement learning on the risk identification rules to obtain optimized risk identification rules.
[0119] By using the second business data to perform reinforcement learning on the risk identification rules, the risk identification rules can be made more accurate and overcome the limitations of poor adaptability and adjustability of manually designed rules.
[0120] The agent robot can calculate the risk identification result corresponding to the second business data according to the risk identification rule. Based on the risk identification result of the second business data and the actual risk level, the agent robot can use evaluation indicators such as accuracy, recall rate, and F1 score to calculate the risk identification accuracy of the risk identification rule. The agent robot can set a risk identification threshold. If the risk identification accuracy of the risk identification rule is less than the preset risk identification threshold, the agent robot can schedule the reinforcement learning optimization engine to adjust the risk identification rule. For each process of adjusting the risk identification rule, the agent robot can set an iteration threshold. The agent robot sets the initial number of iterations to 0. The agent robot obtains the current number of iterations before each adjustment. If the current number of iterations is less than the iteration threshold, the agent robot schedules the reinforcement learning optimization engine to adjust the risk identification rule. If the current number of iterations is equal to the iteration threshold, the agent robot uses the second business data again to evaluate the optimized risk identification rule. If the risk identification accuracy of the optimized risk identification rule is less than the preset risk identification threshold, the agent robot resets the current number of iterations to 0 and continues to schedule the reinforcement learning optimization engine to adjust the risk identification rule until the risk identification accuracy of the optimized risk identification rule is greater than or equal to the preset risk identification threshold.
[0121] In some embodiments, based on the risk identification rules and the second business data, the agent robot can schedule the reinforcement learning optimization engine to build a deep Q learner; based on the deep Q learner, the agent robot can generate a set of action trajectories corresponding to the second business data; based on the set of action trajectories corresponding to the second business data, the agent robot can build an action reinforcement model; based on the action reinforcement model, the agent robot can generate reinforced action trajectories corresponding to the second business data; based on the reinforced action trajectories corresponding to the second business data, the agent robot can adjust the risk identification rules.
[0122] By constructing a deep Q learner to generate a set of action trajectories corresponding to the second business data, the action reinforcement model can be used to more finely adjust the risk identification rules, thereby obtaining more accurate and adaptable risk identification rules.
[0123] The initial version of the risk identification rules contains a series of conditions and thresholds, which are used to evaluate the risk level of customers based on the risk influencing factor data of customers. The agent robot can schedule the reinforcement learning optimization engine to build a deep Q learner, and then use the deep Q learner to build a simulation environment, and define the state space, action space and reward function in the simulation environment. The state space includes various characteristics of the customer. For example, in the loan risk assessment scenario, the state space includes various characteristics such as the customer's age, income, credit score, and asset status. Each state in the state space corresponds to a numerical vector that describes the specific situation of the customer. The action space represents the actions that the agent robot can take when adjusting the risk identification rules, including adding new conditional rules, modifying the conditions or outputs of existing rules, etc. These actions correspond to adjusting various parameters of the risk identification rules in order to improve the accuracy of risk assessment. The reward function is used to evaluate the performance of the risk identification rules on the first business data. The agent robot can use the reward function to calculate the action value based on indicators such as the accuracy, recall rate, and F1 score of the risk assessment, and then characterize the performance of the optimized risk identification rules based on the action value. Specifically, the agent robot can use the deep Q learner to calculate the corresponding action value for each action in the action space. If the calculated action value is positive, the agent robot will encourage the occurrence of the corresponding action, that is, it will recognize the adjustment of the risk identification rules. If the calculated action value is negative, the agent robot will oppose the occurrence of the corresponding action, that is, it will not recognize the adjustment of the risk identification rules. The agent robot can use the deep Q learner to preliminarily adjust the initial version of the risk identification rules. However, the deep Q learner is prone to fall into local optimality when adjusting actions, so the agent robot can build an action reinforcement model to further optimize the risk identification rules. The agent robot can combine the deep Q learner to preliminarily adjust the initial version of the risk identification rules in the process of generating action trajectories for multiple actions, and construct an action reinforcement model to obtain a better reinforced action trajectory. Based on the reinforced action trajectory, the agent robot can further adjust the risk identification rules to a better level.
[0124] For example, in the loan risk assessment scenario, the customer's characteristics include: age (age), monthly income (income), credit score (credit_score), and loan application amount (loan_amount). The agent robot schedules the reinforcement learning optimization engine to build a deep Q learner, and then builds a simulation environment through the deep Q learner, and defines the state space, action space, and reward function in the simulation environment. The agent robot combines the characteristics of age (age), monthly income (income), credit score (credit_score), and loan application amount (loan_amount) into the state space $s=[age,income,credit_score,loan_amount]$. The action space $a$ corresponds to adjusting some parameters in the risk identification rules, such as: age threshold (age_threshold), income threshold (income_threshold), credit score threshold (credit_score_threshold), and loan amount limit (loan_amount_limit).
[0125] The initial version of the risk identification rules obtained by the agent robot are as follows: if the customer's characteristics meet the following conditions, the agent robot will judge them as high risk.
[0126] age>age_threshold(age_threshold=40)
[0127] income <income_threshold(income_threshold=3500)
[0128] credit_score <credit_score_threshold(credit_score_threshold=600)
[0129] loan_amount>loan_amount_limit(loan_amount_limit=50000)
[0130] The agent robot initializes the cumulative action value to 0. After each action is selected, the immediate action value is calculated based on the environmental feedback and the action in the action space is updated.
[0131] Assuming that there is a set of sample data as shown in Table 1, the agent robot can create an action trajectory containing 4 actions (corresponding to the number of sample data) in advance in the action trajectory set for the set of sample data in Table 1. Each action in the action trajectory corresponds to adding a new conditional rule or modifying the condition of an existing rule or modifying the output of an existing rule, etc. Each action trajectory in the action trajectory set corresponds to a cumulative action value label.
[0132] Table 1
[0133]
[0134] For the first sample data in Table 1: the state is $s_1=[45,3000,600,50000]$. According to the current rules, the sample is judged as high risk by the agent robot, that is, $a_1=1$. The agent robot calculates the immediate reward $r_1=-1$ for the wrong prediction, updates the action in the action space, and takes this action as the first action in the action trajectory corresponding to the current group of sample data, and updates the cumulative action value corresponding to the action trajectory of the current group of sample data. For the second sample data in Table 1: the state $s_2=[32,4500,720,30000]$. According to the current risk identification rules, the sample is judged as low risk by the agent robot, that is, $a_2=0$. The agent robot calculates the immediate reward $r_2=1$ for the correct prediction, updates the action in the action space, and takes this action as the second action in the action trajectory corresponding to the current group of sample data, and updates the cumulative action value corresponding to the action trajectory of the current group of sample data. By analogy, the agent robot completes the update of the action trajectory and the corresponding cumulative action value of the current group of sample data. The agent robot can use a deep Q learner to perform action updates on all groups of sample data in the second business data, obtain preliminary optimized risk identification rules, and obtain multiple action trajectories and corresponding cumulative action values.
[0135] After the agent robot uses the deep Q learner to perform action updates on all groups of sample data in the second business data, it can obtain the risk identification rules after preliminary optimization. However, the deep Q learner is prone to fall into local optimality when adjusting actions, so the agent robot can build an action reinforcement model to further optimize the risk identification rules. The action reinforcement model can be based on deep generation algorithms such as GAN, Diffusion, and Transformer. Using the action reinforcement model based on the deep generation algorithm, the agent robot can adjust the risk identification rules from the perspective of conditional generation, reducing the complexity of reinforcement algorithms such as deep Q learners when adjusting complex risk identification rules, and greatly reducing the risk of risk identification rules being limited to local optimality. For example, Diffusion can be used to build an action reinforcement model. Based on each action trajectory in the action trajectory set and its corresponding cumulative action value and corresponding constraint conditions, an action trajectory that satisfies a greater cumulative value can be generated. Specifically, the agent robot can use each action trajectory in the action trajectory set as the input of the action reinforcement model, and use the cumulative action value, constraint conditions, and actions contained in each action trajectory as the generation conditions of the action reinforcement model. The action reinforcement model can generate an enhanced action trajectory based on the input work trajectory and the corresponding generation conditions. The generated enhanced action trajectory satisfies the corresponding constraints, and the corresponding cumulative action value is greater than the original cumulative action value label. The agent robot can obtain the enhanced action trajectory generated by the action enhancement model and further adjust the risk identification rules.
[0136] S106: Optimizing the large language model according to the business scenario and the optimized risk identification rules.
[0137] In some embodiments, the agent robot can construct risk identification correction information based on the optimized risk identification rules and the structured risk identification prompt information in the business scenario; based on the risk identification correction information, the agent robot can optimize the large language model.
[0138] By using the optimized risk identification rules to construct risk identification correction information, the large language model can learn how to generate more accurate risk identification rules, effectively improving the performance of the large language model in generating risk identification rules in the same or similar risk scenarios.
[0139] The agent robot can obtain the risk identification result of the risk identification rule before adjustment on the first business data, and the risk identification result of the risk identification rule after optimization on the first business data. The agent robot can construct risk identification correction information based on the structured risk warning information, the risk identification rules before and after adjustment, and the risk identification results corresponding to the risk identification rules before and after adjustment. Specifically, a reward model can be constructed, and the reward model can be used as a risk identification quality comparison model to rank the quality of multiple different output results given for the same risk identification warning information. The reward model can also be based on a binary classification model to judge the pros and cons of the risk identification results corresponding to the two input risk identification rules before and after adjustment. The agent robot adjusts the parameters of the large language model according to the better result of the two calculated by the reward model. According to the task characteristics and model characteristics, the agent robot sets appropriate fine-tuning parameters, such as learning rate, batch size, training rounds, etc. The learning rate controls the weight update speed of the large language model during the fine-tuning process. The learning rate can be set to a fixed value, or a learning rate decay, adaptive learning rate, polynomial learning rate and other strategies can be adopted, which will not be repeated here. The fine-tuning rounds refer to the rounds in which the large language model is fine-tuned based on the risk identification rules to ensure that the large language model can fully learn the characteristics of the risk identification rules. According to the comparison results given by the reward model, the agent robot adjusts the weights and parameters of the large language model to optimize the performance of the large language model in the risk identification rule generation task. The fine-tuning process can be a comprehensive adjustment of all parameters of the large language model (comprehensive fine-tuning) or a local adjustment of some parameters (partial fine-tuning or parameter-efficient fine-tuning). Comprehensive fine-tuning updates all parameters of the pre-trained large language model to meet the requirements of the risk identification rule generation task. Comprehensive fine-tuning can usually achieve good performance improvement, but requires a lot of computing resources and time. Partial fine-tuning only updates some parameters of the pre-trained large language model, usually fine-tuning the last few layers of the large language model or layers related to specific tasks. Partial fine-tuning consumes less computing resources and time, but requires careful selection of fine-tuning layers to ensure model performance. Parameter-efficient fine-tuning fine-tunes the pre-trained large language model by introducing a small number of learnable parameters to reduce the consumption of computing resources and time. Common parameter efficient fine-tuning methods include adapter adjustment and prefix adjustment, etc., which will not be repeated here. For example, in the loan risk assessment scenario, the agent robot uses adaptive learning rate to locally fine-tune the top-level classifier and text predictor of the pre-trained GPT according to the optimized risk identification rules. After optimizing the pre-trained large language model, the agent robot can use model interpretation techniques such as SHAP and LIME to check whether the pre-trained large language model has indeed learned the logic of the risk identification rules and verify whether its output is consistent with expectations. As new data emerges and risk identification rules are further optimized, the agent robot can regularly optimize the large language model to reflect the latest knowledge and rules.
[0140] S107: Perform risk identification using the optimized risk identification rules.
[0141] In some embodiments, the agent robot may use the optimized risk identification rules to perform risk identification.
[0142] The agent robot can obtain the corresponding real-time business data based on the optimized risk identification rules. The agent robot can use the optimized risk identification rules to calculate the risk level prediction results corresponding to the real-time business data. Enterprises or individuals can obtain the risk level prediction results generated by the agent robot and formulate corresponding response measures based on the risk level prediction results to reduce the probability of risk transmission or mitigate the impact of risk occurrence, thereby helping enterprises or individuals to remain stable when facing risks.
[0143] Based on the above risk identification method, this specification also provides an embodiment of a risk identification device. Figure 3 As shown, the risk identification device 300 may specifically include an acquisition module 301 , a first query module 302 , a generation module 303 , a second query module 304 , a reinforcement learning module 305 , an optimization module 306 and a risk identification module 307 .
[0144] The acquisition module 301 may be used to acquire user demand information, wherein the user demand information includes a business scenario and a risk identification requirement under the business scenario;
[0145] The first query module 302 may be used to query first business data matching the risk identification requirement in the business scenario;
[0146] The generation module 303 may be used to generate risk identification rules using a large language model according to the user demand information and the first business data;
[0147] The second query module 304 may be used to query the second business data matching the risk identification rule in the business scenario;
[0148] The reinforcement learning module 305 may be used to perform reinforcement learning on the risk identification rule using the second business data to obtain an optimized risk identification rule;
[0149] The optimization module 306 may be used to optimize the large language model according to the business scenario and the optimized risk identification rules;
[0150] The risk identification module 307 may be used to perform risk identification using the optimized risk identification rules.
[0151] In some embodiments, the first query module 302 may be specifically used to extract key information in the risk identification requirement; based on the key information in the risk identification requirement, the corresponding first business data may be associated in the business database using fuzzy matching.
[0152] In some embodiments, the generation module 303 can be used to construct risk identification prompt information based on risk identification requirements and the first business data; structure the risk identification prompt information; and generate risk identification rules using a pre-trained large language model based on the structured risk identification prompt information. The generation module 303 can also be used to input the risk prompt information into the pre-trained large language model; and obtain the risk identification rules generated by the pre-trained large language model.
[0153] In some embodiments, the second query module 304 can be specifically used to extract key information in the risk identification rules; based on the key information in the risk identification rules and the key information in the risk identification requirements, fuzzy matching is used to associate matching second business data in the business database.
[0154] In some embodiments, the above-mentioned reinforcement learning module 305 can be specifically used to generate a risk identification result of the second business data based on the risk identification rule; based on the risk identification result, determine the risk identification accuracy of the risk identification rule; if the risk identification accuracy of the risk identification rule is less than a preset risk identification threshold, use the second business data to perform reinforcement learning on the risk identification rule to obtain an optimized risk identification rule. In some embodiments, the above-mentioned reinforcement learning module 305 can also be specifically used to schedule a reinforcement learning optimization engine to build a deep Q learner based on the risk identification rule and the second business data; based on the deep Q learner, generate a set of action trajectories corresponding to the second business data; based on the set of action trajectories corresponding to the second business data, build an action reinforcement model; based on the action reinforcement model, generate a reinforced action trajectory corresponding to the second business data; based on the reinforced action trajectory corresponding to the second business data, adjust the risk identification rule.
[0155] In some embodiments, the above-mentioned optimization module 306 can be specifically used to construct risk identification correction information based on the optimized risk identification rules and the structured risk identification prompt information in the business scenario; and optimize the large language model based on the risk identification correction information.
[0156] It should be noted that the units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions divided into various modules. Of course, when implementing this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0157] As can be seen from the above, based on the risk identification device provided in the embodiment of this specification, the corresponding first business data can be matched according to the risk identification requirements, and then based on the risk identification requirements and the first business data, the risk identification rules can be generated using the pre-trained large language model. In this way, the risk identification rules are generated using the pre-trained large language model without relying on manual design and manual experience, which lowers the threshold for risk identification rule generation and improves the efficiency and quality of risk identification rule generation. Based on the risk identification device provided in the embodiment of this specification, based on the generated risk identification rules, second business data matching the risk identification rules can be obtained, and the risk identification rules can be adjusted according to the second business data, and finally the optimized risk identification rules can be used for risk identification. In this way, adjusting the risk identification rules according to the second business data can make the risk identification rules more accurate, overcoming the limitations of poor adaptability and adjustability of manually designed rules.
[0158] In order to complete the above instructions more accurately, refer to Figure 4 As shown, the embodiment of this specification also provides another specific computer device 400, wherein the computer device 400 includes a network communication port 401, a processor 402, and a memory 403. The network communication port 401, the processor 402, and the memory 403 are connected through internal cables so that each structure can perform specific data interaction.
[0159] In the embodiment of this specification, the network communication port 401 can be a virtual port that is bound to different communication protocols to send or receive different data. For example, the network communication port 401 can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. In addition, the network communication port 401 can also be a physical communication interface or communication chip. For example, the network communication port 401 can be a wireless mobile network communication chip, such as GSM, CDMA, etc. The network communication port 401 can also be a Wifi chip and a Bluetooth chip, etc.
[0160] The processor 402 is specifically used to match the corresponding first business data according to the risk identification requirements; generate risk identification rules using a pre-trained large language model based on the risk identification requirements and the first business data; obtain second business data that matches the risk identification rules; adjust the risk identification rules based on the second business data; and use the optimized risk identification rules to perform risk identification.
[0161] In the embodiments of this specification, the processor 402 may be implemented in any appropriate manner. For example, the processor 402 may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. This specification does not limit this.
[0162] The memory 403 is specifically used to store corresponding instruction programs.
[0163] In the embodiment of this specification, the memory 403 includes volatile memory and non-volatile memory. In digital systems, anything that can store binary data can be a memory; in integrated circuits, a circuit with storage function without a physical form is also called a memory, such as RAM, FIFO, etc.; in computer systems, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.
[0164] The embodiments of the present specification also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the risk identification method described above is implemented.
[0165] The embodiments of this specification also provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the risk identification method is implemented.
[0166] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0167] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0168] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0169] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0170] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A risk identification method, characterized in that: include: Acquiring user demand information, wherein the user demand information includes a business scenario and a risk identification requirement under the business scenario; Querying first business data matching the risk identification requirement in the business scenario; Generate risk identification rules using a large language model based on user demand information and first business data; Querying second business data matching the risk identification rule in the business scenario; Using the second business data to perform reinforcement learning on the risk identification rule to obtain an optimized risk identification rule; Optimizing the large language model according to the business scenario and the optimized risk identification rules; The optimized risk identification rules are used to perform risk identification.
2. The method according to claim 1, characterized in that The querying of the first business data matching the risk identification requirement in the business scenario includes: Extract key information from the risk identification requirements; Based on the key information in the risk identification requirement, corresponding first business data is associated in the business database using fuzzy matching.
3. The method according to claim 1, characterized in that The step of generating risk identification rules using a large language model according to the user demand information and the first business data includes: Construct risk identification prompt information based on risk identification needs and first business data; Structuring the risk identification prompt information; Based on the structured risk identification prompt information, risk identification rules are generated using a pre-trained large language model.
4. The method according to claim 3, characterized in that The method of using a pre-trained large language model to generate risk identification rules includes: Inputting the risk warning information into the pre-trained large language model; Obtain risk identification rules generated by the pre-trained large language model.
5. The method according to claim 1, characterized in that The querying of the second business data matching the risk identification rule in the business scenario includes: Extracting key information from the risk identification rules; Based on the key information in the risk identification rule and the key information in the risk identification requirement, fuzzy matching is used to associate matching second business data in the business database.
6. The method according to claim 1, characterized in that The using the second business data to perform reinforcement learning on the risk identification rule to obtain an optimized risk identification rule includes: Based on the risk identification rule, generating a risk identification result of the second business data; Based on the risk identification result, determining the risk identification accuracy of the risk identification rule; If the risk identification accuracy of the risk identification rule is less than a preset risk identification threshold, the risk identification rule is subjected to reinforcement learning using the second business data to obtain an optimized risk identification rule.
7. The method according to claim 6, characterized in that The using the second business data to perform reinforcement learning on the risk identification rule to obtain an optimized risk identification rule includes: Based on the risk identification rules and the second business data, scheduling the reinforcement learning optimization engine to build a deep Q learner; Based on the deep Q learner, generating a set of action trajectories corresponding to the second business data; Building an action enhancement model based on the action trajectory set corresponding to the second business data; Based on the action enhancement model, generating an enhanced action trajectory corresponding to the second business data; Adjust the risk identification rules based on the reinforcement action trajectory corresponding to the second business data.
8. The method according to claim 1, characterized in that The optimizing the large language model according to the business scenario and the optimized risk identification rules includes: Constructing risk identification correction information based on the optimized risk identification rules and the structured risk identification prompt information in the business scenario; Based on the risk identification and correction information, the large language model is optimized.
9. A risk identification device, characterized in that: The device comprises: An acquisition module, used to acquire user demand information, wherein the user demand information includes a business scenario and a risk identification requirement under the business scenario; A first query module, used to query first business data matching the risk identification requirement in the business scenario; A generation module, used to generate risk identification rules using a large language model according to user demand information and first business data; A second query module, used to query second business data matching the risk identification rule in the business scenario; A reinforcement learning module, used to perform reinforcement learning on the risk identification rule using the second business data to obtain an optimized risk identification rule; An optimization module, used for optimizing the large language model according to the business scenario and the optimized risk identification rules; The risk identification module is used to perform risk identification using the optimized risk identification rules.
10. 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 computer program, the method according to any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the instructions are executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.
12. A computer program product, characterized in that The computer program is included, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Intelligent robot dialogue method and system based on offline reinforcement learning
CN113360618A
Risk detection method and device for financing business, computer equipment and storage medium
CN114119213A
Decision engine configuration method and device based on large model, electronic equipment and medium
CN117540803A
Artificial intelligence enterprise customer risk information analysis and evaluation method and system based on large language model
CN117726166A
Risk identification method and device, storage medium and electronic equipment
CN117787418A
Cited By
Risk control method and device, storage medium and electronic equipment
CN120180100A
Logistics full-link risk control method and equipment based on AI large model, and storage medium
CN120278528A
AI-based large-scale logistics full-link risk control method, equipment and storage medium
CN120278528B
Risk discovery and early warning method and system based on large model
CN121436642A