Risk control method, device, storage medium and electronic equipment
By automatically extracting risk control features from business data through pre-trained LLM, the problem of low efficiency and large errors in manual feature search in existing technologies is solved, and efficient and accurate risk control is achieved.
Patent Information
- Application Number
- CN202510652561.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-05-20
AI Technical Summary
In existing technologies, risk control requires searching for data features based on manual experience of massive business data, which is inefficient and prone to human errors, resulting in reduced risk control accuracy.
A pre-trained large language model (LLM) is used to automatically extract data features corresponding to risk types from business data. By learning historical manual extraction methods through LLM, risk control efficiency is improved and human errors are reduced.
There is no need to manually search for features in massive data. Extracting data features through LLM improves risk control efficiency, avoids human errors, and improves risk control accuracy.
Smart Images

Figure CN120180100B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a risk control method, device, storage medium, and electronic device. Background Art
[0002] With the development of information technology, people are becoming more and more accustomed to conducting business online, and various risks arising from the online environment are also emerging. Therefore, each service provider needs to conduct risk control on the business it provides.
[0003] Risk control needs to be based on certain data features. For example, to prevent account theft, it is necessary to determine the login address of an account within a certain period of time. If the login address of an account changes frequently within this period of time, the account may be at risk of being hacked. In other words, when conducting risk control on account theft risk, the login address of the account within a certain period of time is the data feature of risk control.
[0004] However, in existing technologies, the data features required for risk control of different risks need to be manually searched based on experience in the massive business data of the service provider. This is not only extremely inefficient, but also prone to human errors, resulting in reduced risk control accuracy. Summary of the Invention
[0005] The embodiments of this specification provide a risk control method, device, storage medium, and electronic device to partially solve the problems existing in the above-mentioned prior art.
[0006] The embodiments of this specification adopt the following technical solutions:
[0007] This specification provides a risk control method, which includes:
[0008] Obtain business data from service providers;
[0009] Input the business data and the risk type required for risk control into a pre-trained large language model (LLM); wherein the LLM is pre-trained based on data features corresponding to the risk type that have been determined historically;
[0010] Obtaining data features corresponding to the risk type extracted by the LLM from the business data;
[0011] Risk control is performed on the risk of the risk type based on all data features corresponding to the risk type and the business data.
[0012] This specification provides a wind control device, which includes:
[0013] The acquisition module is used to obtain the business data of the service provider;
[0014] An input module, configured to input the business data and the risk type required for risk control into a pre-trained large language model (LLM); wherein the LLM is pre-trained based on data features corresponding to the risk type that have been historically determined;
[0015] An extraction module, configured to obtain data features corresponding to the risk type extracted by the LLM from the business data;
[0016] The risk control module is used to perform risk control on the risk of the risk type based on all data features corresponding to the risk type and the business data.
[0017] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned risk control method is implemented.
[0018] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the above-mentioned risk control method is implemented.
[0019] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:
[0020] The embodiments of this specification disclose a risk control method that pre-trains an LLM based on data features corresponding to various risk types that have been historically determined. During risk control, the service provider's business data and the risk type to be controlled are input into the pre-trained LLM, and the LLM extracts data features corresponding to the risk type from the business data. Risk control is then performed on the risk corresponding to the risk type based on the risk features and business data corresponding to the risk type. This method eliminates the need to manually search for data features in massive amounts of business data. Instead, the method learns historical methods for extracting data features from business data through the LLM, and uses the LLM to extract data features from business data. This method can effectively improve risk control efficiency without introducing human error. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The exemplary embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation of this specification. In the drawings:
[0022] Figure 1 A flow chart of a risk control method provided in an embodiment of this specification;
[0023] Figure 2 Flowchart of the method for pre-training LLM provided in the embodiments of this specification;
[0024] Figure 3 A schematic diagram of a wind control device provided in an embodiment of this specification;
[0025] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0026] To make the objectives, technical solutions, and advantages of this specification more clear, the following will clearly and completely describe the technical solutions of this specification in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described 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 making any creative efforts are within the scope of protection of this specification.
[0027] The technical solutions provided by the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0028] Figure 1 A flow chart of a risk control method provided in an embodiment of this specification includes the following steps:
[0029] S100: Acquire business data of the service provider.
[0030] In the embodiment of this specification, the Figure 1 The device for performing risk control using the method shown may be a server of a service provider. Specifically, an agent with a large language model (LLM) as its core may be pre-deployed in the server, and risk control may be performed through the agent.
[0031] When performing risk control, the server relies on the service provider's business data. Therefore, the server must first obtain the service provider's business data. Specifically, the server can obtain this business data from a data warehouse that stores the service provider's business data, such as the Open Data Processing Service (ODPS) data warehouse. The service provider's business data stored in this data warehouse may include basic user information (such as name, ID, identification card information, contact information, etc.) and user business behavior information (such as login behavior, the time and location of occurrence, and transaction behavior, the time, location, and amount involved).
[0032] S102: Input the business data and the risk type required for risk control into a pre-trained large language model LLM.
[0033] Since risk control based on business data requires extracting corresponding data features from massive business data, the embodiments of this specification abandon the method of manually finding data features based on experience, and adopt the following method: Figure 1 In the process of steps S100 to S104 shown, data features are extracted from business data using LLM.
[0034] Specifically, the agent deployed on the server can input the business data acquired in step S100 and the required risk type into a pre-trained LLM. The agent can generate prompt information based on the business data and the required risk type. This prompt information is used to enable the LLM to extract data features corresponding to the risk type from the business data, and then input the generated prompt information into the LLM.
[0035] The LLM described in the embodiments of this specification is pre-trained based on historically determined data features corresponding to various risk types. The LLM can learn from historically manual methods for extracting data features corresponding to various risk types from business data. The trained LLM then leverages its reasoning capabilities to automatically extract data features corresponding to the risk types required for risk control from the business data acquired in step S100. The specific method for training the LLM will be described later.
[0036] S104: Acquire data features corresponding to the risk type extracted by the LLM from the business data.
[0037] In the embodiments of this specification, the LLM is a knowledge base-based LLM, such as a Retrieval-Augmented Generation (RAG) LLM, whose knowledge base contains at least data features corresponding to each risk type that has been historically determined. After the intelligent agent obtains the data features corresponding to the risk type required for risk control extracted from the business data by the LLM, it can also determine whether the data features extracted by the LLM already exist in the knowledge base. If so, the data features extracted by the LLM can be directly discarded. If not, it indicates that the data features extracted by the LLM are new data features corresponding to the risk type, and the knowledge base can be updated based on the data features corresponding to the risk type extracted by the LLM, that is, the data features corresponding to the risk type extracted by the LLM can be saved in the knowledge base.
[0038] In addition, the knowledge base on which LLM is based may also include description information of each field in the service provider's business data and / or description information of each risk type. The description information of each field is used to describe the meaning of each field in the business data through natural language, and the description information of each risk type is used to describe the meaning of each risk type through natural language, so that LLM can better understand the business data obtained in step S100 and the risk type required for risk control input in step S102, so that LLM can more accurately extract the data features corresponding to the risk type required for risk control.
[0039] Accordingly, in step S102, in addition to being configured to cause the LLM to extract data features corresponding to the risk types required for risk control from the input business data, the agent can also be configured to cause the LLM to output fields in the business data that the LLM itself does not understand, as well as risk types that the LLM itself does not understand. In step S104, if the LLM outputs fields and / or risk types in the business data that it does not understand, descriptions of the fields and risk types that the LLM does not understand can be added to the aforementioned knowledge base.
[0040] Of course, since the business data obtained by the intelligent agent from the data warehouse through step S100 is very complex, the business data may contain business data with risk labels. If the risk label of the business data is the risk label corresponding to the risk type currently required for risk control, then in step S102, the intelligent agent no longer needs to input the business data corresponding to the risk label corresponding to the risk type into the LLM, but directly uses the business data as the data feature corresponding to the risk type. If the business data does not have a risk label, or the risk label it has is not the risk label corresponding to the risk type currently required for risk control, the intelligent agent can input the business data into the LLM through step S102 to extract the data feature corresponding to the risk type currently required for risk control from the business data through the LLM.
[0041] S106: Perform risk control on the risk type according to all data features corresponding to the risk type and the business data.
[0042] Through the above steps S100~S104, after the intelligent agent obtains the data characteristics corresponding to the risk type required for risk control extracted by LLM from the business data, it can filter out business data with risks of this risk type from the business data obtained in step S100 based on the data characteristics, and perform risk control based on the filtered business data according to the preset risk control rules.
[0043] This method pre-trains an LLM based on historically determined data features corresponding to each risk type. During risk control, the service provider's business data and the risk type being controlled are fed into the pre-trained LLM. The LLM then extracts the data features corresponding to that risk type from the business data. Risk control is then performed on the risk associated with that risk type based on the risk features and the business data. This method eliminates the need to manually search for data features within massive amounts of business data. Instead, the LLM learns historical methods for extracting data features from business data and uses them to extract these features. This effectively improves risk control efficiency and prevents the introduction of human error.
[0044] above Figure 1 The method shown requires pre-training of the LLM so that the LLM learns the historical method of manually extracting data features corresponding to each risk type from business data. Since the LLM is mainly used for large models to process natural language, the embodiment of this specification converts the historical extraction method into natural language to facilitate LLM training, such as Figure 2 shown.
[0045] Figure 2 The flowchart of the method for pre-training LLM provided in the embodiment of this specification specifically includes:
[0046] S200: Determine data features corresponding to the risk types that have been determined historically as historical data features.
[0047] To train an LLM, the agent needs to obtain historical data features corresponding to each risk type as historical data features, and also obtain the LLM to be trained. In the embodiments of this specification, to improve training efficiency, the LLM to be trained can use a pre-trained LLM.
[0048] S202: Query the extraction method for extracting the historical data features from the business data in history.
[0049] In the embodiments of this specification, there are two main methods for manually extracting data features from business data. One is to use data query statements to query data warehouses for data with certain characteristics and use the retrieved data as data features. The other is to use extraction rules set in the risk control system to extract data with certain risks as risk data. Therefore, the method for extracting data features corresponding to each risk type from business data is actually hidden in the aforementioned data query statements and the risk control system's extraction rules.
[0050] Therefore, for data query statements, the agent can query historical data query statements that have been used to extract historical data features from databases storing business data (such as the aforementioned ODPS data warehouse) as a historical extraction method for extracting historical data features. The data query statements include but are not limited to SQL statements. For extraction rules, the agent can query historical extraction rules used to extract the historical data features as a historical extraction method for extracting historical data features.
[0051] S204: Determine the natural language corresponding to the extraction method.
[0052] For data query statements, the intelligent agent can input the data query statements used to extract historical data features into a pre-trained LLM, and obtain the natural language corresponding to the data query statements output by the pre-trained LLM.
[0053] For the extraction rules retrieved from the risk control system, the agent can also input the queried extraction rules into the pre-trained LLM and obtain the descriptive information corresponding to the extraction rules output by the pre-trained LLM. This descriptive information is used to describe the extraction rules in natural language.
[0054] Since the pre-trained LLM already has general natural language processing capabilities, the pre-trained LLM can convert data query statements such as SQL statements or extraction rules set in the risk control model into corresponding natural language descriptions.
[0055] S206: Fine-tune the pre-trained LLM according to the natural language.
[0056] In order to maintain the reasoning and generalization capabilities of the pre-trained LLM while enabling it to learn the extraction method of data features corresponding to each risk type, a low-rank adapter (LoRA) can be added to the pre-trained LLM in the embodiments of this specification.
[0057] When training the LLM, we can first determine several sample question-answer pairs (QA pairs) based on the natural language description of the data query and / or extraction rules obtained in step S204 as training samples. For example, the question might be: What data features indicate a risk of account theft? The answer might be: Frequent changes in login addresses within three days indicate a risk of account theft.
[0058] After determining the training samples, all model parameters in LLM except LoRA can be fixed, and the LoRA model parameters can be fine-tuned based on the above training samples. In other words, all model parameters in LLM except LoRA are kept unchanged, and only the LoRA model parameters are adjusted.
[0059] pass Figure 2 After the LLM is trained by the method shown in Figure 1 Steps S100 to S104 shown in the figure use the trained LLM to extract and mine the data features corresponding to each risk type from the massive business data, and when a risk control request is received, the data features corresponding to each risk type can be extracted and mined by the LLM. Figure 1 In step S106 shown, business data that matches at least one data feature corresponding to the risk type required for risk control in the business data is determined as risk data, and risk control is performed on the risk data.
[0060] The above is a risk control method provided in the embodiment of this specification. Based on the same idea, this specification also provides corresponding devices, storage media and electronic devices.
[0061] Figure 3 A schematic diagram of a wind control device provided in an embodiment of this specification, the device includes:
[0062] Acquisition module 301, used to acquire business data of the service provider;
[0063] Input module 302, configured to input the business data and the risk type required for risk control into a pre-trained large language model (LLM); wherein the LLM is pre-trained based on data features corresponding to the risk type that have been determined historically;
[0064] An extraction module 303 is configured to obtain data features corresponding to the risk type extracted by the LLM from the business data;
[0065] The risk control module 304 is configured to perform risk control on the risk of the risk type according to all data features corresponding to the risk type and the business data.
[0066] Optionally, the device further comprises:
[0067] The training module 305 is used to determine the data features corresponding to the risk types that have been determined in the history as historical data features; query the extraction method for extracting the historical data features from the business data in the history; determine the natural language corresponding to the extraction method; and fine-tune the pre-trained LLM according to the natural language.
[0068] Optionally, the training module 305 is specifically configured to query data query statements that have been used to extract the historical data features from a database storing the business data.
[0069] Optionally, the training module 305 is specifically configured to input the data query statement into a pre-trained LLM to obtain a natural language corresponding to the data query statement output by the pre-trained LLM.
[0070] Optionally, the training module 305 is specifically used to query extraction rules historically used to extract the features of the historical data.
[0071] Optionally, the training module 305 is specifically configured to input the extraction rule into a pre-trained LLM, and obtain description information corresponding to the extraction rule output by the pre-trained LLM.
[0072] Optionally, adding a low-rank adapter LoRA to the pre-trained LLM;
[0073] The training module 305 is specifically used to determine several sample question-answer pairs based on the natural language; fix the model parameters other than the LoRA in the LLM to which the LoRA is added, and fine-tune the model parameters to which the LoRA is added based on the sample question-answer pairs.
[0074] Optionally, the pre-trained LLM is a knowledge base-based LLM;
[0075] The knowledge base contains data features corresponding to various risk types that have been determined historically;
[0076] The extraction module 303, after obtaining the data features corresponding to the risk type extracted by the LLM from the business data, is also used to update the knowledge base according to the data features corresponding to the risk type extracted by the LLM if the data features corresponding to the risk type extracted by the LLM do not exist in the knowledge base.
[0077] This specification also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can be used to execute the risk control method provided above.
[0078] based on Figure 1 The risk control method shown in this specification also provides Figure 4 The structural diagram of the electronic device shown in FIG. Figure 4At the hardware level, the electronic device includes a processor, an internal bus, a network interface, memory, and non-volatile storage, and may also include other hardware required for its operations. The processor reads the corresponding computer program from the non-volatile storage into the memory and then runs it to implement the aforementioned risk control method.
[0079] The foregoing is merely an example of the present invention and is not intended to limit the present invention. Various modifications and variations are possible within the scope of the present invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.
Claims
1. A risk control method, comprising: Obtain business data from service providers; Input the business data and the risk type required for risk control into a pre-trained large language model (LLM); wherein the LLM is pre-trained based on data features corresponding to the risk type that have been determined historically; Obtaining data features corresponding to the risk type extracted by the LLM from the business data; Based on all data features corresponding to the risk type, filter out business data with risks of the risk type from the acquired business data, and perform risk control based on the filtered business data according to preset risk control rules; Pre-training the LLM specifically includes: determining data features corresponding to the risk type that has been determined in the past as historical data features; querying historical extraction methods for extracting the historical data features from the business data; determining the natural language corresponding to the extraction method; and fine-tuning the pre-trained LLM based on the natural language; The pre-trained LLM is a knowledge base-based LLM; The knowledge base contains data features corresponding to various risk types that have been determined historically; After obtaining the data features corresponding to the risk type extracted by the LLM from the business data, the method further includes: If the data feature corresponding to the risk type extracted by the LLM does not exist in the knowledge base, the knowledge base is updated according to the data feature corresponding to the risk type extracted by the LLM.
2. The method according to claim 1, wherein the method for extracting the historical data features from the business data in the query history specifically comprises: The query is to extract historical data features from a database storing the business data.
3. The method according to claim 2, wherein determining the natural language corresponding to the extraction method comprises: The data query statement is input into a pre-trained LLM to obtain a natural language corresponding to the data query statement output by the pre-trained LLM.
4. The method according to claim 1, wherein the method for extracting the historical data features from the business data in the query history specifically comprises: The extraction rules historically used to extract the features of the historical data are queried.
5. The method according to claim 4, wherein determining the natural language corresponding to the extraction method comprises: The extraction rule is input into a pre-trained LLM to obtain description information corresponding to the extraction rule output by the pre-trained LLM.
6. The method of claim 2 or 4, further comprising adding a low-rank adapter LoRA to the pre-trained LLM; According to the natural language, fine-tune the pre-trained LLM, specifically including: Determining a number of sample question-answer pairs based on the natural language; The model parameters other than the LoRA in the LLM to which the LoRA is added are fixed, and the model parameters to which the LoRA is added are fine-tuned and trained based on the sample question-answer pairs.
7. A wind control device, comprising: The acquisition module is used to obtain the business data of the service provider; An input module, configured to input the business data and the risk type required for risk control into a pre-trained large language model (LLM); wherein the LLM is pre-trained based on data features corresponding to the risk type that have been historically determined; An extraction module, configured to obtain data features corresponding to the risk type extracted by the LLM from the business data; a risk control module, configured to screen out business data with risks of the risk type from the acquired business data based on all data features corresponding to the risk type, and perform risk control based on the screened business data according to preset risk control rules; A training module is configured to determine data features corresponding to the risk type that has been determined historically as historical data features; query historical extraction methods for extracting the historical data features from the business data; determine a natural language corresponding to the extraction method; and fine-tune the pre-trained LLM based on the natural language; The pre-trained LLM is a knowledge base-based LLM; The knowledge base contains data features corresponding to various risk types that have been determined historically; The extraction module is also used to, after obtaining the data features corresponding to the risk type extracted by the LLM from the business data, update the knowledge base according to the data features corresponding to the risk type extracted by the LLM if the data features corresponding to the risk type extracted by the LLM do not exist in the knowledge base.
8. A computer-readable storage medium storing a computer program, wherein the computer program implements the method according to any one of claims 1 to 6 when executed by a processor.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 6 when executing the program.
Citation Information
Patent Citations
Model training method and device, storage medium and electronic equipment
CN117593003A
Risk identification method and device, storage medium and electronic equipment
CN117787418A
Railway knowledge question answering method and device based on natural language model
CN119537528A