Risk identification method and device, equipment and storage medium
By combining transaction log information and risk warning information generated by business scenarios in risk identification technology, and using the BERT model for risk identification, the problem of insufficient risk identification accuracy caused by the lack of global context information in the prior art is solved, and a more efficient risk identification effect is achieved.
Patent Information
- Application Number
- CN202411741425.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-21
AI Technical Summary
When existing risk identification technologies process transaction log text data, they lack global context information for specific business scenarios, making it difficult to fully capture the global semantic characteristics of specific entities in text data, resulting in insufficient accuracy of risk identification.
By obtaining transaction log information and its corresponding business scenarios, risk warning information is generated, and transaction log information is spliced with risk warning information to form risk information to be identified. Then, the risk information to be identified is input into the target risk identification model built on the BERT model for risk identification, and the powerful context understanding ability and deep learning ability of the BERT model can be used to fully learn and capture the context information in the risk information to be identified.
By enhancing the context and key risk points of transaction log information, the accuracy of risk identification is improved, false positives and missed reports are reduced, and the overall effect of risk identification is improved.
Smart Images

Figure CN119671706A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a risk identification method, device, equipment and storage medium. Background Art
[0002] With the rapid development of the financial industry, transaction log text data has shown explosive growth, and the demand for risk identification has also increased sharply.
[0003] However, when processing these text data, existing risk identification technologies lack global context information of specific business scenarios and can only rely on the connection between local information for risk identification. This identification method is difficult to fully capture the global semantic features of specific entities in text data, and thus cannot fully utilize risk information to distinguish risks with subtle differences when processing complex and changeable transaction log text data, which ultimately affects the accuracy of risk identification. Therefore, it is urgent to develop a new risk identification method to improve the accuracy of risk identification. Summary of the invention
[0004] Based on the above problems, the present application provides a risk identification method, device, equipment and medium, the purpose of which is to fully utilize risk information and thereby improve the accuracy of risk identification.
[0005] The embodiments of the present application disclose the following technical solutions:
[0006] The first aspect of the present application provides a risk identification method, the method comprising:
[0007] Obtaining transaction log information to be identified;
[0008] Generate risk warning information based on the transaction log information and its corresponding business scenario; the risk warning information describes the risks that may exist in the transaction log information;
[0009] The transaction log information is combined with the risk warning information to obtain risk information to be identified;
[0010] The risk information to be identified is input into the target risk identification model constructed based on the BERT model to perform risk identification and obtain a risk identification result; the risk identification result includes risk type information and risk entity information; the risk entity information includes information of multiple types of risk entities.
[0011] In an optional implementation, the target risk identification model is constructed in a manner including:
[0012] Construct an initial risk identification model; the initial risk identification model includes a semantic encoding layer, a joint learning layer and a prediction output layer; the semantic encoding layer uses the BERT model to encode the risk information to be identified to obtain a global semantic vector, and the global semantic vector is a word vector containing global context information; the joint learning layer includes a risk type identification task and a risk entity mining task, which are used to identify risk types and mine risk entities based on the global semantic vector; the prediction output layer is used to output risk identification results;
[0013] The initial risk identification model is trained using the target training sample set to obtain a target risk identification model.
[0014] In an optional implementation, the target training sample set is constructed in the following manner:
[0015] Obtaining transaction log information generated in various business scenarios and risk type information and risk entity information determined by the transaction log information;
[0016] Generate risk warning information based on the transaction log information and its corresponding business scenario;
[0017] The transaction log information and the risk warning information are concatenated to obtain the risk information to be identified; the risk information to be identified is used as a feature value, and the risk type information and risk entity information determined in the transaction log information are used as labels to construct the target training sample set.
[0018] In an optional implementation, the using the target training sample set to train the initial risk identification model to obtain a target risk identification model includes:
[0019] The target risk identification model is obtained by training the target training sample set based on the joint loss function; the specific formula of the joint loss function is:
[0020] L T =α1L1+α2L2
[0021] Among them, L1 is the loss function of the risk type identification task, L2 is the loss function of the risk entity mining task, and L T is the joint loss function, α1 is the weight of the risk type identification task, and α2 is the weight of the risk entity mining task.
[0022] In an optional implementation, the step of inputting the risk information to be identified into a target risk identification model constructed based on a BERT model to perform risk identification and obtain a risk identification result includes:
[0023] Inputting the risk information to be identified into the target risk identification model;
[0024] Encoding the risk information to be identified to obtain the global semantic vector;
[0025] Based on the global semantic vector, a neural network is used to obtain a text vector containing time sequence information;
[0026] Risk type information and risk entity information are determined based on the global semantic vector and the text vector containing time series information.
[0027] In an optional implementation, the determining the risk type information and the risk entity information based on the global semantic vector and the text vector containing the time series information includes:
[0028] The global semantic vector and the text vector containing temporal information are fused by using an attention mechanism to obtain a risk classification vector;
[0029] determining the risk type information based on the risk classification vector;
[0030] Inputting the text vector containing the timing information into a decoder to obtain a boundary information vector;
[0031] The risk entity information is determined based on the boundary information vector and the global semantic vector.
[0032] In an optional implementation, the determining the risk entity information based on the boundary information vector and the global semantic vector includes:
[0033] Calculate the similarity between the boundary information and the global semantic vector to construct a boundary similarity matching matrix;
[0034] Determining the start boundary and the end boundary matching the multiple types of risk entities based on the similarity matching matrix;
[0035] The risk entity information is determined based on the start boundary and the end boundary that match the multiple types of risk entities.
[0036] A second aspect of the present application provides a risk identification device, the device comprising:
[0037] An acquisition module, used to acquire transaction log information to be identified;
[0038] A warning information generating module, used to generate risk warning information based on the transaction log information and its corresponding business scenario; the risk warning information describes the risks that may exist in the transaction log information;
[0039] A splicing module, used to splice the transaction log information with the risk warning information to obtain risk information to be identified;
[0040] An identification module is used to input the risk information to be identified into a target risk identification model constructed based on a BERT model to perform risk identification and obtain a risk identification result; the risk identification result includes risk type information and risk entity information; the risk entity information includes information on multiple types of risk entities.
[0041] The third aspect of the present application provides a risk identification device, the device comprising: a processor and a memory:
[0042] The memory is used to store program code and transmit the program code to the processor;
[0043] The processor is used to execute the steps of the risk identification method introduced in any implementation manner of the first aspect according to the instructions in the program code.
[0044] The fourth aspect of the present application provides a computer-readable storage medium, characterized in that the computer-readable storage medium is used to store program code, and the program code is used to execute the steps of the risk identification method introduced in any implementation of the first aspect.
[0045] Compared with the prior art, this application has the following beneficial effects:
[0046] In the technical solution of the present application, the transaction log information to be identified is first obtained; then, risk warning information is generated based on the transaction log information and its corresponding business scenario; then, the transaction log information is spliced with the risk warning information to obtain the risk information to be identified; finally, the risk information to be identified is input into the target risk identification model constructed based on the BERT model for risk identification to obtain the risk identification result. The technical solution of the present application generates specific risk warning information for different business scenarios, and combines these risk warning information with the original information in the transaction log, thereby providing additional context and key risk points for the transaction log, and realizing effective information enhancement of the transaction log information. The risk information to be identified that has undergone information enhancement is input into the target risk identification model constructed based on the BERT model. Since the BERT model has powerful context understanding and deep learning capabilities, the target risk identification model can more fully learn and capture the context information in the risk information to be identified, thereby improving the accuracy of risk identification as a whole. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0048] Figure 1 A flow chart of a risk identification method provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of the structure of a target risk identification model provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of the structure of a risk identification device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] As described above, current risk identification technologies still face many challenges when processing transaction log text data. Due to the lack of global contextual information for specific business scenarios, these technologies can only rely on the connection between local information and find it difficult to fully capture the global semantic features of specific entities in text data. This not only makes it impossible to fully utilize risk information when processing complex and changeable transaction log texts, but also makes it difficult for the technology to distinguish risks with subtle differences, thus affecting the accuracy of risk identification.
[0052] After research, the inventor proposed a risk identification method, device, equipment and storage medium.
[0053] First, the transaction log information to be identified is obtained; then, risk warning information is generated based on the transaction log information and its corresponding business scenarios; then, the transaction log information is spliced with the risk warning information to obtain the risk information to be identified; finally, the risk information to be identified is input into the target risk identification model constructed based on the BERT model for risk identification to obtain the risk identification result.
[0054] The technical solution of this application enhances risk information by generating specific risk warning information for different business scenarios, and performs risk identification on the enhanced information through a risk identification model built based on the BERT model, thereby fully capturing risk information and improving the overall accuracy of risk identification.
[0055] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0056] See also Figure 1 , which is a flow chart of a risk identification method provided by an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0057] S101. Obtain transaction log information to be identified.
[0058] Transaction log information refers to a large amount of transaction information recorded in systems such as banking business systems or distributed core systems. This information usually contains detailed transaction data, such as transaction time, transaction system, response time, transaction status, etc., and is an important basis for analyzing the transaction process and troubleshooting transaction risks.
[0059] In the embodiment of the present application, the transaction log information to be identified is first obtained.
[0060] For example, a transaction log information is recorded in the log of a bank's distributed core system: "20240312-10:11:13, A system response time 5323, number of retries 4 times". To identify the risk of this transaction log information, first obtain this transaction log information from the log of the system.
[0061] S102: Generate risk warning information based on the transaction log information and its corresponding business scenarios.
[0062] In the embodiments of the present application, the business scenario refers to the specific environment and background in which the transaction occurs, which determines the specific meaning and potential risks of the transaction log information. Different business scenarios correspond to different risk points and risk types.
[0063] For example, the specific loan transaction scenario of the distributed core system is as follows: in the distributed core system, the customer conducts loan transactions through a debit card or loan account, and the corresponding transaction log information example is: "20240312-10:11:13, A system response time 5323, number of retries 4 times"; the specific credit approval process scenario is as follows: in the credit approval process, the bank reviews and makes decisions on the credit application submitted by the customer, and the corresponding transaction log information example is: "Credit applicant Zhang San, application amount 1 million, application date 20240310, review status failed, reason: insufficient credit score"; the specific inter-bank transfer transaction scenario is as follows: the customer conducts an inter-bank transfer transaction through the bank system to transfer funds from one bank account to another bank account, and the corresponding transaction log information example is: "20240313-14:22:55, inter-bank transfer, transfer out of account A, transfer into account B, transfer amount 5,000 yuan, transaction successful".
[0064] The above three business scenarios are only examples. In practical applications, the technical solution of the present application is not limited to the business scenarios mentioned in the embodiments of the present application.
[0065] Based on the transaction log information obtained in the previous step, risk warning information corresponding to the transaction log information is generated according to its business scenario. The risk warning information describes the possible risks in the transaction log information, such as uneven lending and borrowing, call timeouts, and a large number of incomplete transactions, etc., to provide guidance for subsequent risk identification.
[0066] In an example implementation, for the transaction log information in the above example, the following risk warning information is generated according to its business scenario (such as the loan transaction scenario of the distributed core system): "The system response time is longer than expected". The risk warning information is directly related to the key information in the transaction log information (such as the response time) and describes the potential risk points.
[0067] S103: Combine the transaction log information with the risk warning information to obtain risk information to be identified.
[0068] In the embodiment of the present application, the transaction log information is spliced with the risk warning information generated in the previous step to form a risk information to be identified that contains complete transaction information and potential risk information. The purpose of this step is to combine the original information in the transaction log with the risk warning information to strengthen the information so that the subsequent risk identification model can identify risks more accurately.
[0069] In the embodiment of the present application, the splicing method may be to splice the risk warning information before the transaction log information, or may be to splice the risk warning information after the transaction log information.
[0070] In an example implementation, the transaction log information and risk warning information in the aforementioned example are spliced together, and the spliced risk information to be identified is: "20240312-10:11:13, XX system response time 5323, number of retries 4 times; system response time is longer than expected".
[0071] S104: Input the risk information to be identified into the target risk identification model built based on the BERT model to perform risk identification and obtain risk identification results.
[0072] Optionally, the risk information to be identified can be preprocessed, such as removing irrelevant characters, segmenting words, removing stop words, etc., so that the model can better understand and process it.
[0073] In an embodiment of the present application, the preprocessed risk information to be identified is input into a pre-trained target risk identification model constructed based on the BERT model.
[0074] The BERT model is a pre-trained language representation model based on the Transformer structure that can capture the global context information of the text.
[0075] The target risk identification model uses the BERT model to encode the input text (risk information to be identified) to obtain a global semantic vector, which is a word vector containing global context information. The global semantic vector can reflect the semantic relationship and context information between each word in the risk information to be identified.
[0076] Next, the target risk identification model conducts deep learning and analysis on the global semantic vector and finally outputs the risk identification result, which includes risk type information and risk entity information.
[0077] The risk type information is the possible risk type of the transaction log information to be identified, such as loan imbalance, call timeout, retry count exceeded, etc.
[0078] Risk entity information is an object or attribute directly related to the risk type. Risk entity information includes information of various types of risk entities, such as calling system, occurrence time, response time, etc.
[0079] In an example implementation, the risk information to be identified in the above example is input into the target risk model for risk identification, and the risk identification result is: "Call timeout; Call system: XX system; Occurrence time: 20240312-10:11:13; Response time: 5323". Among them, "Call timeout" is the risk type information, and "Call system: XX system; Occurrence time: 20240312-10:11:13; Response time: 5323" is the risk entity information.
[0080] In the embodiment of the present application, by generating specific risk warning information for different business scenarios and combining these risk warning information with the original information in the transaction log, additional context and key risk points are provided for the transaction log, and effective information enhancement of the transaction log information is achieved. The information-enhanced risk information to be identified is input into the target risk identification model built based on the BERT model. Since the BERT model has strong context understanding and deep learning capabilities, the target risk identification model can more fully learn and capture the context information in the risk information to be identified, thereby improving the overall accuracy of risk identification.
[0081] In the technical solution of this application, a target risk identification model is creatively constructed. The target risk identification model is constructed based on the BERT model. The construction method of the target risk identification model is described below.
[0082] In an embodiment of the present application, an initial risk identification model is first constructed, and the initial risk identification model includes a semantic encoding layer, a joint learning layer, and a prediction output layer.
[0083] Among them, the semantic encoding layer uses the BERT model to encode the risk information to be identified to obtain a global semantic vector, and the global semantic vector is a word vector containing global context information.
[0084] The joint learning layer includes risk type identification tasks and risk entity mining tasks. The joint learning layer mines the correlation between risk type identification tasks and risk entity mining tasks through multi-task learning, and enhances the learning effect of the risk identification model through parameter sharing between tasks. The joint learning layer is used to perform risk type identification and risk entity mining based on the global semantic vector.
[0085] The prediction output layer is used to output risk identification results, which include risk type information and risk entity information.
[0086] Finally, the target training sample set is used to train the initial risk identification model to obtain the target risk identification model.
[0087] Optionally, the process of training the initial risk identification model using the target training sample set to obtain the target risk identification model is specifically as follows:
[0088] Based on the joint loss function, the target risk identification model is obtained by training the target training sample set; the specific formula of the joint loss function is:
[0089] L T =α1L1+α2L2
[0090] Among them, L1 is the loss function of the risk type identification task, L2 is the loss function of the risk entity mining task, and LT is the joint loss function, α1 is the weight of the risk type identification task, and α2 is the weight of the risk entity mining task.
[0091] In the embodiment of the present application, the weight of the risk type identification task and the weight of the risk entity mining task can be first set to 0.5 and 0.5 respectively. The specific weight of the risk type identification task and the weight of the risk entity mining task can be dynamically adjusted according to demand.
[0092] If you want the target risk identification model to focus on the risk type identification task, then increase the weight of the risk type identification task and decrease the weight of the risk entity mining task; if you want the target risk identification model to focus on the risk entity mining task, then increase the weight of the risk entity mining task and decrease the weight of the risk type identification task.
[0093] In an embodiment of the present application, the initial risk identification model is iteratively trained using target training samples until the joint loss function is minimized, and the parameters at this time are used as parameters of the target risk identification model.
[0094] In an optional implementation, the target training sample set is constructed by:
[0095] Step 1: Acquire transaction log information generated in various business scenarios and risk type information and risk entity information determined by the transaction log information.
[0096] In the embodiment of the present application, transaction log information can be collected from various business systems, including but not limited to personal banking (such as deposits, withdrawals, transfers), corporate banking (such as loan applications, payment settlements), foreign exchange business, investment and financial management business, etc. Ensure that the transaction log information in the training sample set can cover all possible business scenarios, and provide a comprehensive data foundation for the subsequent generation of risk warning information and the training of risk identification models.
[0097] In an example implementation, the transaction log information may include the transaction system, transaction time, transaction type, transaction amount, information of both transaction parties (such as customer ID, account information), transaction status, transaction channel, etc.
[0098] In an embodiment of the present application, the risk type information and risk entity information determined by the transaction log information can be marked and confirmed by the bank's risk management department or compliance department based on the transaction log and business processes, and the specific confirmation method is not limited here.
[0099] Risk type information may include response timeout, loan inequality, etc. Risk entity information may include the transaction system involved in the risk, transaction time, transaction account, etc.
[0100] Step 2: Generate risk warning information based on the transaction log information and its corresponding business scenarios.
[0101] Generate risk warning information based on transaction log information and corresponding business scenarios. Risk warning information describes the possible risks in transaction log information and provides guidance for subsequent risk identification.
[0102] Step three: concatenate the transaction log information and the risk warning information to obtain the risk information to be identified; use the risk information to be identified as a feature value, and the risk type information and risk entity information determined in the transaction log information as labels to construct the target training sample set.
[0103] In an embodiment of the present application, the transaction log information is spliced with the generated risk warning information to form a risk information to be identified that includes complete transaction information and potential risk information.
[0104] The splicing method may be to splice the risk warning information before the transaction log information, or to splice the risk warning information after the transaction log information.
[0105] The spliced risk information to be identified is used as the feature value, and the determined risk type information and risk entity information are used as labels.
[0106] Combine feature values and labels into training samples and construct the target training sample set.
[0107] In an optional implementation, the above step S104 includes:
[0108] Step 1: Input the risk information to be identified into the target risk identification model.
[0109] In an embodiment of the present application, the risk information to be identified is pre-processed (such as removing irrelevant characters, segmenting words, removing stop words, etc.) and then input into the target risk identification model.
[0110] Step 2: Encode the risk information to be identified to obtain a global semantic vector.
[0111] In the embodiment of the present application, the risk information to be identified is processed into a series of words or sub-word units (tokens), forming an input sequence S={s1, s1, ..., s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s1 n}, where n represents the length of the input information. These vocabulary or subword units are the basic units that the BERT model can understand and process.
[0112] The input sequence is first input into the semantic encoding layer of the target risk identification model, and then processed by the self-attention mechanism in each layer of the BERT model to generate the embedding state of the layer. These embedding states not only contain the information of the word itself, but also incorporate contextual information from other words. The embedding state of each layer is passed to the next layer until it reaches the last layer of the BERT model. In the last layer of the BERT model, the embedding state of each word is taken as the hidden layer representation. These hidden layer representations contain rich contextual information and the relationship between words.
[0113] Take the embedding state of the last layer of the BERT model as the hidden layer h, and take the output of the Pooler layer of the BERT model as the global semantic vector c, that is,
[0114] h,c=BERT(s1,s2,…s n ).
[0115] Step 3: Use a neural network based on the global semantic vector to obtain a text vector containing temporal information.
[0116] In the embodiment of the present application, the joint learning layer in the target risk identification model inputs the global semantic vector output by the semantic encoding layer into the bidirectional long short-term memory network (Bidirectional Long Short-Term Memory Network, BI-LSTM) to obtain a text vector L containing time series information
[0117] L = Bi - Lstm(h).
[0118] Step 4: Determine the risk type information and risk entity information based on the global semantic vector and the text vector containing time series information.
[0119] In an embodiment of the present application, an attention mechanism is used to fuse the global semantic vector and the text vector containing temporal information to obtain a risk classification vector.
[0120] In an exemplary implementation, the global semantic vector c and the text vector L containing time series information output by BI-LSTM are fused to obtain the risk classification vector F
[0121]
[0122] Specifically,
[0123]
[0124] u(L i ,c)=V T tanh(W e L i +Wc c)(j=1,2,...,k)
[0125] Among them, u(L i , c) is the new word vector that combines the vector L containing temporal information and the global semantic vector c, V T , W e and W y is a learnable parameter of the fully connected network, which is used to learn the correlation between the text vector L containing time series information and the global semantic vector c. tanh is the hyperbolic tangent activation function. α represents the weight of each word in the text vector L containing time series information. i represents the index of a word in the time series, j represents the index of the jth word, and k represents the total number of words in the time series.
[0126] Then, risk type information is determined based on the risk classification vector.
[0127] In an example implementation, a classifier (eg, a softmax classifier) may be used to process the risk classification vector to output risk type information. The specific implementation and training process of the classifier may vary depending on the algorithm and application scenario, and is not specifically limited here.
[0128] The text vector containing timing information is input into the decoder to obtain the boundary information vector.
[0129] In an embodiment of the present application, a text vector containing time series information is input into a long short-term memory (LSTM) decoder to obtain a boundary information vector, which contains information that each position in the text may be a risk entity boundary.
[0130] The risk entity information is determined based on the boundary information vector and the global semantic vector. Optionally, the boundary information vector and the global semantic vector are similarly calculated to construct a boundary similarity matching matrix.
[0131] In the embodiment of the present application, in order to more accurately determine the boundary of the risk entity, the boundary information vector and the global semantic vector are similarly calculated to construct a boundary similarity matching matrix. Each element of the matrix represents the similarity between a certain position in the text and the global semantic vector, thereby helping to identify the start and end boundaries of the risk entity.
[0132] The starting boundary and the ending boundary matching with multiple types of risk entities are determined based on the similarity matching matrix.
[0133] In an embodiment of the present application, the start boundary and the end boundary matching multiple types of risk entities can be determined by finding continuous regions with the highest similarity in the matrix, and these regions correspond to the risk entity information in the text.
[0134] Risk entity information is determined based on start boundaries and end boundaries that match multiple types of risk entities.
[0135] In an embodiment of the present application, corresponding risk entity information is extracted from the text according to the determined start boundary and end boundary, and is used as the output risk entity information.
[0136] Figure 2 This is a schematic diagram of the structure of a target risk identification model provided in an embodiment of the present application. Figure 2 In the embodiment of the present application, the target risk identification model first encodes the input information through the semantic encoding layer to obtain a global semantic vector, and then inputs the global semantic vector into the joint learning layer. The joint learning layer uses BI-LSTM based on the global semantic vector to obtain a text vector containing time series information, and then performs risk type identification tasks and risk entity mining tasks to obtain risk type information and risk entity information. Finally, the risk type information and risk entity information are output through the prediction output layer.
[0137] In an embodiment of the present application, by adding risk warning information, specific risk warning words can be produced for different business scenarios, so as to more accurately capture and identify text information related to risks. The accuracy of risk identification is improved, and false positives and false negatives are reduced. Through the multi-task learning framework of joint learning, the two subtasks of risk type identification and risk entity mining are allowed to share parameters in text information and guide each other. Information interaction and sharing between the two tasks are promoted, and the generalization ability of the model is enhanced. The risk identification model can better adapt to different business scenarios and risk types, thereby improving the overall risk identification effect.
[0138] Based on the risk identification method provided in the aforementioned embodiment, the present application also provides a risk identification device accordingly. Figure 3 This is a schematic diagram of the structure of a risk identification device provided in an embodiment of the present application. Figure 3 As shown, the risk identification device includes:
[0139] The acquisition module 301 is used to acquire transaction log information to be identified.
[0140] The prompt information generating module 302 is used to generate risk prompt information based on the transaction log information and its corresponding business scenario; the risk prompt information describes the risks that may exist in the transaction log information.
[0141] The splicing module 303 is used to splice the transaction log information with the risk warning information to obtain the risk information to be identified.
[0142] The identification module 304 is used to input the risk information to be identified into the target risk identification model constructed based on the BERT model to perform risk identification and obtain a risk identification result; the risk identification result includes risk type information and risk entity information; the risk entity information includes information on multiple types of risk entities.
[0143] In an optional implementation, the risk identification device further includes a first building module.
[0144] The first construction module is used to construct a target risk identification module; specifically, it is used to: construct an initial risk identification model; the initial risk identification model includes a semantic encoding layer, a joint learning layer and a prediction output layer; the semantic encoding layer uses the BERT model to encode the risk information to be identified to obtain a global semantic vector, and the global semantic vector is a word vector containing global context information; the joint learning layer includes a risk type identification task and a risk entity mining task, which are used to identify risk types and mine risk entities based on the global semantic vector; the prediction output layer is used to output risk identification results; the initial risk identification model is trained using a target training sample set to obtain a target risk identification model.
[0145] Optionally, the first construction module is specifically used to: obtain the target risk identification model by training the target training sample set based on a joint loss function; the specific formula of the joint loss function is:
[0146] L T =α1L1+α2L2
[0147] Among them, L1 is the loss function of the risk type identification task, L2 is the loss function of the risk entity mining task, and L T is the joint loss function, α1 is the weight of the risk type identification task, and α2 is the weight of the risk entity mining task.
[0148] In an optional implementation, the risk identification device further includes a second building module.
[0149] The second construction module is used to construct a target training sample set; specifically, it is used to: obtain transaction log information generated under various business scenarios and the risk type information and risk entity information determined by the transaction log information; generate risk warning information based on the transaction log information and its corresponding business scenarios; concatenate the transaction log information and the risk warning information to obtain the risk information to be identified; use the risk information to be identified as a feature value and the risk type information and risk entity information determined by the transaction log information as labels to construct the target training sample set.
[0150] In an optional implementation, the identification module 304 is specifically used to: input the risk information to be identified into the target risk identification model; encode the risk information to be identified to obtain the global semantic vector; obtain a text vector containing time series information based on the global semantic vector using a neural network; determine the risk type information and risk entity information based on the global semantic vector and the text vector containing time series information.
[0151] Optionally, the recognition module 304 is specifically used to: utilize the attention mechanism to fuse the global semantic vector and the text vector containing time series information to obtain a risk classification vector; determine the risk type information based on the risk classification vector; input the text vector containing time series information into the decoder to obtain a boundary information vector; determine the risk entity information based on the boundary information vector and the global semantic vector.
[0152] Optionally, the identification module 304 is specifically used to: calculate the similarity between the boundary information and the global semantic vector to construct a boundary similarity matching matrix; determine the start boundary and the end boundary that match the multiple types of risk entities based on the similarity matching matrix; determine the risk entity information based on the start boundary and the end boundary that match the multiple types of risk entities.
[0153] In addition, an embodiment of the present application also provides a risk identification device, which includes a processor and a memory.
[0154] The memory is used to store program code and transmit the program code to the processor;
[0155] The processor is used to execute the steps of the risk identification method introduced in any of the above method embodiments according to the instructions in the program code.
[0156] In addition, an embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the program is executed by a processor, a risk identification method as described in any of the method embodiments is implemented.
[0157] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and equipment embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0158] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A risk identification method, characterized in that: The method comprises: Obtaining transaction log information to be identified; Generate risk warning information based on the transaction log information and its corresponding business scenario; the risk warning information describes the risks that may exist in the transaction log information; The transaction log information is combined with the risk warning information to obtain risk information to be identified; The risk information to be identified is input into the target risk identification model constructed based on the BERT model to perform risk identification and obtain a risk identification result; the risk identification result includes risk type information and risk entity information; the risk entity information includes information of multiple types of risk entities.
2. The method according to claim 1, characterized in that: The target risk identification model is constructed in the following ways: Construct an initial risk identification model; the initial risk identification model includes a semantic encoding layer, a joint learning layer and a prediction output layer; the semantic encoding layer uses the BERT model to encode the risk information to be identified to obtain a global semantic vector, and the global semantic vector is a word vector containing global context information; the joint learning layer includes a risk type identification task and a risk entity mining task, which are used to identify risk types and mine risk entities based on the global semantic vector; the prediction output layer is used to output risk identification results; The initial risk identification model is trained using the target training sample set to obtain a target risk identification model.
3. The method according to claim 2, characterized in that The target training sample set is constructed in the following manner: Obtaining transaction log information generated in various business scenarios and risk type information and risk entity information determined by the transaction log information; Generate risk warning information based on the transaction log information and its corresponding business scenario; The transaction log information and the risk warning information are concatenated to obtain the risk information to be identified; the risk information to be identified is used as a feature value, and the risk type information and risk entity information determined in the transaction log information are used as labels to construct the target training sample set.
4. The method according to claim 2, characterized in that: The step of training the initial risk identification model using the target training sample set to obtain a target risk identification model includes: The target risk identification model is obtained by training the target training sample set based on the joint loss function; the specific formula of the joint loss function is: L T =α1L1+α2L2 Among them, L1 is the loss function of the risk type identification task, L2 is the loss function of the risk entity mining task, and L T is the joint loss function, α1 is the weight of the risk type identification task, and α2 is the weight of the risk entity mining task.
5. The method according to claim 2, characterized in that: The step of inputting the risk information to be identified into a target risk identification model constructed based on the BERT model to perform risk identification and obtain a risk identification result includes: Inputting the risk information to be identified into the target risk identification model; Encoding the risk information to be identified to obtain the global semantic vector; Based on the global semantic vector, a neural network is used to obtain a text vector containing time sequence information; Risk type information and risk entity information are determined based on the global semantic vector and the text vector containing time series information.
6. The method according to claim 5, characterized in that The determining of risk type information and risk entity information based on the global semantic vector and the text vector containing time series information includes: The global semantic vector and the text vector containing temporal information are fused by using an attention mechanism to obtain a risk classification vector; determining the risk type information based on the risk classification vector; Inputting the text vector containing the timing information into a decoder to obtain a boundary information vector; The risk entity information is determined based on the boundary information vector and the global semantic vector.
7. The method according to claim 6, characterized in that The determining the risk entity information based on the boundary information vector and the global semantic vector includes: Calculate the similarity between the boundary information and the global semantic vector to construct a boundary similarity matching matrix; Determining the start boundary and the end boundary matching the multiple types of risk entities based on the similarity matching matrix; The risk entity information is determined based on the start boundary and the end boundary that match the multiple types of risk entities.
8. A risk identification device, characterized in that: The device comprises: An acquisition module, used to acquire transaction log information to be identified; A warning information generating module, used to generate risk warning information based on the transaction log information and its corresponding business scenario; the risk warning information describes the risks that may exist in the transaction log information; A splicing module, used to splice the transaction log information with the risk warning information to obtain risk information to be identified; An identification module is used to input the risk information to be identified into a target risk identification model constructed based on a BERT model to perform risk identification and obtain a risk identification result; the risk identification result includes risk type information and risk entity information; the risk entity information includes information on multiple types of risk entities.
9. A risk identification device, characterized in that: include: Processor and memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the steps of the risk identification method according to any one of claims 1 to 7 according to the instructions in the program code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the steps of the risk identification method according to any one of claims 1 to 7.