Credit risk detection method and device, storage medium and electronic equipment

Through the federal learning method, credit risk detection is used in the field of supply chain finance, transaction data and business models are used to solve the problem of insufficient risk identification caused by the scarcity of sample characteristics in the existing technology, and efficient and accurate risk classification results are achieved, which improves the risk control capabilities of financial institutions.

CN119539942APending Publication Date: 2025-02-28AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411769867.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-02-28

Smart Images

  • Figure CN119539942A_ABST
    Figure CN119539942A_ABST
Patent Text Reader

Abstract

The invention provides a credit risk detection method and apparatus, a storage medium and an electronic device, the method is applied to a first participant of federal learning, and the method comprises the steps of obtaining transaction data and a service mode of a to-be-detected object in response to a risk detection instruction; inputting the transaction data into a pre-trained credit risk prediction model to obtain a credit risk level prediction result corresponding to the to-be-detected object; and determining a risk classification result of the to-be-detected object according to the credit risk level prediction result, the business mode and a preset risk classification matrix. By applying the method provided by the embodiment of the invention, the risk classification result can be efficiently and accurately obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a credit risk detection method, device, storage medium and electronic device. Background Art

[0002] In the current supply chain finance field, risk classification is a key link to ensure fund security, optimize credit decisions and improve overall operational efficiency. Traditional risk classification methods mainly rely on analyzing the characteristics of customer samples of a single supply chain finance company. However, this method faces a significant problem: due to the limited number of customer samples of a single company, its characteristic data is often scarce, making it difficult to fully reflect the customer's credit status and risk level.

[0003] Specifically, the existing risk classification model is limited by the lack of sample characteristics when it is constructed, resulting in the model being not comprehensive in terms of judgment dimensions. This limitation not only affects the accuracy of the model's classification of known samples, but also makes it difficult to effectively identify and predict potential risks. In practical applications, this inaccuracy may lead to errors in credit decisions, increase the bad debt risk of financial institutions, and is also not conducive to the stable development of supply chain finance. Summary of the invention

[0004] The technical problem to be solved by this application is to provide a credit risk detection method, device, storage medium and electronic device, which can efficiently and accurately obtain risk classification results. The specific solution is as follows:

[0005] A credit risk detection method, applied to a first party of federated learning, comprising:

[0006] In response to the risk detection instruction, obtaining transaction data and business model of the object to be detected;

[0007] Inputting the transaction data into a pre-trained credit risk prediction model to obtain a credit risk level prediction result corresponding to the object to be detected;

[0008] The risk classification result of the object to be detected is determined according to the credit risk level prediction result, the business model and a preset risk classification matrix.

[0009] The training process of the credit risk prediction model includes:

[0010] Acquire a first credit risk prediction model and first sample data; the first sample data includes at least one of historical transaction data and credit risk classification label data;

[0011] Generate a first intermediate result according to the first credit risk prediction model and the first sample data;

[0012] Generate a first encrypted gradient of the first credit risk prediction model according to the first intermediate result and the received second encrypted intermediate result; the second encrypted intermediate result is obtained by the second participant of the federated learning system by encrypting the second intermediate result; the second intermediate result is generated by the second participant according to the second credit risk prediction model and the second sample data; the second sample data is the local data of the second participant;

[0013] Sending the first encrypted gradient to an intermediary of the federated learning system, so that the intermediary of the federated learning system decrypts the first encrypted gradient to obtain a first gradient;

[0014] updating the model parameters of the first credit risk prediction model according to the first gradient decrypted by the intermediary, and determining whether the updated first credit risk prediction model meets a preset training completion condition;

[0015] When the updated first credit risk prediction model meets the preset training completion condition, the first credit risk prediction model that meets the training completion condition is determined as the trained credit risk prediction model.

[0016] In the above method, optionally, the process of obtaining the first sample data includes:

[0017] Get the original sample data;

[0018] The original sample data is preprocessed to obtain first sample data.

[0019] The above method, optionally, after generating the first intermediate result according to the first credit risk prediction model and the first sample data, further comprises:

[0020] Encrypting the first intermediate result according to the key issued by the intermediate party to obtain a first encrypted intermediate result;

[0021] Send the first encrypted intermediate result to the second participant.

[0022] In the above method, optionally, the step of determining whether the updated first credit risk prediction model meets a preset training completion condition includes:

[0023] When the loss function of the updated first credit risk prediction model has converged, determining that the updated first credit risk prediction model meets the training completion condition;

[0024] When the loss function of the updated first credit risk prediction model has not converged, it is determined that the updated first credit risk prediction model does not meet the training completion condition.

[0025] The above method, optionally, after determining the risk classification result of the object to be detected, further includes:

[0026] When it is determined that the object to be detected has an abnormal risk according to the risk classification result of the object to be detected, risk warning information of the object to be detected is output.

[0027] A credit risk detection device, applied to a first participant in federated learning, comprising:

[0028] An acquisition unit, configured to acquire transaction data and business model of an object to be detected in response to a risk detection instruction;

[0029] The prediction unit inputs the transaction data into a pre-trained credit risk prediction model to obtain a prediction result of the credit risk level corresponding to the object to be detected;

[0030] A determination unit is used to determine the risk classification result of the object to be detected according to the credit risk level prediction result, the business model and a preset risk classification matrix.

[0031] The training process of the credit risk prediction model includes:

[0032] Acquire a first credit risk prediction model and first sample data; the first sample data includes at least one of historical transaction data and credit risk classification label data;

[0033] Generate a first intermediate result according to the first credit risk prediction model and the first sample data;

[0034] Generate a first encrypted gradient of the first credit risk prediction model according to the first intermediate result and the received second encrypted intermediate result; the second encrypted intermediate result is obtained by the second participant of the federated learning system by encrypting the second intermediate result; the second intermediate result is generated by the second participant according to the second credit risk prediction model and the second sample data; the second sample data is the local data of the second participant;

[0035] Sending the first encrypted gradient to an intermediary of the federated learning system, so that the intermediary of the federated learning system decrypts the first encrypted gradient to obtain a first gradient;

[0036] updating the model parameters of the first credit risk prediction model according to the first gradient decrypted by the intermediary, and determining whether the updated first credit risk prediction model meets a preset training completion condition;

[0037] When the updated first credit risk prediction model meets the preset training completion condition, the first credit risk prediction model that meets the training completion condition is determined as the trained credit risk prediction model.

[0038] In the above device, optionally, the prediction unit includes:

[0039] An acquisition subunit, used to acquire original sample data;

[0040] The preprocessing subunit is used to preprocess the original sample data to obtain first sample data.

[0041] The above device may optionally further include:

[0042] The output unit is used to output risk warning information of the object to be detected when it is determined that the object to be detected has abnormal risk according to the risk classification result of the object to be detected.

[0043] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the credit risk detection method as described above.

[0044] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to execute the credit risk detection method as described above.

[0045] Based on the above-mentioned implementation of the present application, a credit risk detection method, device, storage medium and electronic device are provided, the method includes: a first participant applied to federated learning, the method includes: in response to a risk detection instruction, obtaining transaction data and business model of the object to be detected; inputting the transaction data into a pre-trained credit risk prediction model to obtain a credit risk level prediction result corresponding to the object to be detected; according to the credit risk level prediction result, the business model and a preset risk classification matrix, determining the risk classification result of the object to be detected; wherein the training process of the credit risk prediction model includes: obtaining a first credit risk prediction model and first sample data; the first sample data includes at least one of historical transaction data and credit risk classification label data; generating a first intermediate result according to the first credit risk prediction model and the first sample data; according to the first intermediate result and the received second encrypted intermediate result, Generate a first encrypted gradient of the first credit risk prediction model; the second encrypted intermediate result is obtained by the second participant of the federated learning system encrypting the second intermediate result; the second intermediate result is generated by the second participant according to the second credit risk prediction model and the second sample data; the second sample data is the local data of the second participant; send the first encrypted gradient to the intermediary of the federated learning system, so that the intermediary of the federated learning system decrypts the first encrypted gradient to obtain the first gradient; update the model parameters of the first credit risk prediction model according to the first gradient decrypted by the intermediary, and determine whether the updated first credit risk prediction model meets the preset training completion condition; if the updated first credit risk prediction model meets the preset training completion condition, determine the first credit risk prediction model that meets the training completion condition as the trained credit risk prediction model. Applying the method provided in the embodiment of the present application, the risk classification result can be obtained efficiently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] 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 embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0047] Figure 1 A method flow chart of a credit risk detection method provided for this application;

[0048] Figure 2 A flowchart of a process for obtaining first sample data provided by the present application;

[0049] Figure 3 A credit risk detection flow chart provided for this application;

[0050] Figure 4 A flowchart of the process of processing data by a federated learning model provided for this application;

[0051] Figure 5 An example diagram of the training process of a longitudinal federated learning model provided for this application;

[0052] Figure 6 A schematic diagram of the structure of a credit risk detection device provided in this application;

[0053] Figure 7 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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.

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

[0056] The embodiment of the present invention provides a product recommendation method, which can be applied to an electronic device. The electronic device can be the first participant in the federated learning system. The first participant can be one of the core enterprises, financing enterprises and logistics companies in the business circle relationship network. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:

[0057] S101: In response to a risk detection instruction, obtain transaction data and business model of an object to be detected.

[0058] In this embodiment, the transaction data includes one or more information such as the time, amount, participants, products or services, operating status, profitability, income and transaction method of corporate transactions on the supply chain finance chain.

[0059] Optionally, the business model may include at least one of a credit model, a guarantee model, a mortgage model and a pledge model.

[0060] S102: Inputting the transaction data into a pre-trained credit risk prediction model to obtain a credit risk level prediction result corresponding to the object to be detected.

[0061] In this embodiment, the credit risk level prediction result may include the credit level of the object to be detected.

[0062] S103: Determine the risk classification result of the object to be detected according to the credit risk level prediction result, the business model and a preset risk classification matrix.

[0063] In this embodiment, the risk classification result of the object to be detected may represent the risk level of the object to be detected.

[0064] Alternatively, the risk classification matrix can be as shown in Table 1:

[0065] Table 1

[0066] Credit rating Credit Model Guarantee Mode Mortgage Model Staking Mode ... SAAA+ Normal level Normal level Normal level Normal level ... AAA+ Normal Level 2 Normal Level 2 Normal Level 2 Normal Level 2 AAA Normal level three Normal level three Normal level three Normal level three BBB Focus on the first level Focus on Level 1 Focus on the first level Focus on the first level C Focus on Level 2 Focus on Level 2 Focus on Level 2 Focus on Level 2 D Secondary Level Secondary Level Secondary Level Secondary Level ...

[0067] In this embodiment, the training process of the credit risk prediction model includes:

[0068] Acquire a first credit risk prediction model and first sample data; the first sample data includes at least one of historical product information, historical online user information, and credit risk classification label data;

[0069] Generate a first intermediate result according to the first credit risk prediction model and the first sample data;

[0070] Generate a first encrypted gradient of the first credit risk prediction model according to the first intermediate result and the received second encrypted intermediate result; the second encrypted intermediate result is obtained by the second participant of the federated learning system by encrypting the second intermediate result; the second intermediate result is generated by the second participant according to the second credit risk prediction model and the second sample data; the second sample data is the local data of the second participant;

[0071] Sending the first encrypted gradient to an intermediary of the federated learning system, so that the intermediary of the federated learning system decrypts the first encrypted gradient to obtain a first gradient;

[0072] updating the model parameters of the first credit risk prediction model according to the first gradient decrypted by the intermediary, and determining whether the updated first credit risk prediction model meets a preset training completion condition;

[0073] When the updated first credit risk prediction model meets the preset training completion condition, the first credit risk prediction model that meets the training completion condition is determined as the trained credit risk prediction model.

[0074] In this embodiment, the first intermediate result may be the characteristic weight of the first credit risk prediction model, and the second intermediate result may be the characteristic weight of the second credit risk prediction model. The intermediary party may decrypt the first encrypted gradient according to a preset decryption key to obtain the first gradient, and then send the first gradient to the first participant.

[0075] By applying the method provided in the embodiments of the present application, risk classification results can be obtained efficiently and accurately.

[0076] In an embodiment provided by the present invention, based on the above implementation process, optionally, the process of obtaining the first sample data is as follows: Figure 2 As shown, including:

[0077] S201: Obtain original sample data.

[0078] In this embodiment, original sample data can be obtained from a database.

[0079] S202: Preprocess the original sample data to obtain first sample data.

[0080] Optionally, the original sample data may be cleaned and the cleaned data may be vectorized to obtain first sample data, and the first sample data may be stored in a heterogeneous data access layer.

[0081] In an embodiment provided by the present invention, based on the above implementation process, optionally, after generating the first intermediate result according to the first credit risk prediction model and the first sample data, the method further includes:

[0082] Encrypting the first intermediate result according to the key issued by the intermediate party to obtain a first encrypted intermediate result;

[0083] Send the first encrypted intermediate result to the second participant.

[0084] In this embodiment, the first encrypted intermediate result is sent to the second participant, so that the second participant can generate a second encrypted gradient of the second model based on the second intermediate result and the first encrypted intermediate result; the second encrypted gradient is sent to the intermediary, and the intermediary decrypts the second encrypted gradient to obtain the second gradient, and the second participant updates the model parameters of the second model based on the second gradient.

[0085] In an embodiment provided by the present invention, based on the above implementation process, optionally, the step of determining whether the updated first credit risk prediction model meets a preset training completion condition includes:

[0086] When the loss function of the updated first credit risk prediction model has converged, determining that the updated first credit risk prediction model meets the training completion condition;

[0087] When the loss function of the updated first credit risk prediction model has not converged, it is determined that the updated first credit risk prediction model does not meet the training completion condition.

[0088] In this embodiment, the training completion condition may be that the loss function of the first model converges, or the number of training times of the first model is greater than a preset training times threshold, or the accuracy of the first model meets a preset accuracy requirement.

[0089] join Figure 3 , which is a credit risk detection flow chart provided in an embodiment of the present application, wherein, for multiple participating entities such as core enterprises, financing enterprises, logistics companies, etc. in the multi-business network of supply chain finance, the multi-dimensional data such as business operation data, credit data, tax data, and transaction data of the participating entities in the supply chain ecosystem can be used as source data, and federated learning can be introduced to train corporate credit models and predict corporate credit ratings, establish a supply chain product business risk classification matrix, calculate the corresponding risk classification according to the predicted credit rating type, and conduct real-time dynamic warnings based on the final risk classification results.

[0090] Optionally, the process of processing data by the federated learning model involved in the embodiment of the present application is as follows: Figure 4 As shown in the figure, the federated learning model is divided into five layers from bottom to top:

[0091] (1) Preprocessing layer: The purpose of this layer is to vectorize the data so that the data stored in the heterogeneous data access layer is "available out of the box". If the heterogeneous data access layer and this layer are exchanged, the user needs to take out the non-standard data from the medium each time training is performed, and repeatedly preprocess the data, resulting in the consumption of enterprise computing resources. Among them, the sample features used in this patent include: time, amount, participants, products or services, operating status, profitability, income, transaction methods and other information of enterprise transactions on the supply chain finance chain;

[0092] (2) Data access layer: In supply chain finance companies, different products have different dimensions of business data.

[0093] (3) Sample alignment layer: In vertical federated learning in the context of supply chain finance, the user groups of participants Company A and Company B are different. The premise for participating in vertical federated learning is that the training samples of A and B need to be consistent. In this field, the user groups of different companies A and B must not be exactly the same. Therefore, a method is needed to align the data between the participants without exposing their original data, confirm the same training samples of multiple parties, and achieve the purpose of expanding the characteristics of the sample set.

[0094] (4) Federated learning layer: After the data of the participants have been processed in the data preprocessing layer, the data of each party has been converted into features that can be directly input into the model; after the sample alignment layer, the samples of the data of each party have been aligned. The model training process of vertical federated learning includes the communication between the participants and the central server, local training, gradient upload, gradient aggregation and gradient download process;

[0095] (5) Online detection layer: The trained model is opened and deployed on the server. After model classification and risk matrix classification, it provides risk warning function.

[0096] See also Figure 5 , which is an example diagram of the training process of a vertical federated learning model provided by this application, wherein the data of enterprises on the supply chain finance chain has been converted into features that can be directly input into the model after the data preprocessing layer, such as the time, amount, participants, products or services, operating status, profitability, income, transaction methods and other information of the transaction; after passing through the sample alignment layer, the samples of the data of each party have been aligned. The different features of transaction data in the model training process of vertical federated learning include communication between the participants and the central server, local training, gradient upload, gradient aggregation and gradient download processes. The final trained common model effectively detects abnormal historical transaction data.

[0097] Specifically, the LR model is selected as the joint training model of federated learning. Assume that the data of the two participants have been sample aligned. The participants are responsible for local training models, gradient uploads and local model updates, and the central server is responsible for gradient aggregation and gradient distribution. The specific training process has the following steps. Under the premise that connections have been established between the participants and the central server, it is assumed that the participants c1, c2∈C, their respective data sets are Mc1, Mc2, the shared model θ, the central server is denoted as S, and the learning rate is denoted as α:

[0098] Step 1: The participants calculate the intermediate results of the features locally and exchange the intermediate results with each other, where the intermediate results are used to help calculate the gradient and loss value;

[0099] Step 2: Participant C calculates the local model gradient vector gi and uploads the gradient to the central server S respectively;

[0100] Step 3: The central server S aggregates the gradient vectors of all users using the additive aggregation method, i.e. gs=g1+g2 in this example;

[0101] Step 4: The central server S returns the aggregation results to participants c1 and c2;

[0102] Step 5: Calculate the mean of c1 and c2 and update the local model parameters.

[0103] The above five steps will continue to iterate until the upper limit of the allowed number of iterations is reached or the loss function converges or the training time is allowed. This architecture is independent of specific machine learning algorithms such as logistic regression and deep neural networks, and all participants will share the final model parameters.

[0104] During gradient uploading and downloading, each enterprise can deploy on its own server and implement detection of single or batch data, ultimately providing supply chain financing enterprises with multi-business district, multi-subject, and multi-dimensional risk classification method predictions. After risk matrix classification, online dynamic risk warnings can be achieved to enhance risk prevention and control capabilities in supply chain financing.

[0105] The embodiments of the present application include the following key points:

[0106] (1) The business operation data, credit data, tax data, and transaction data of the core enterprises, financing enterprises, logistics companies and other participants in the supply chain ecosystem can be used as data sources.

[0107] (2) Vertical federated learning is introduced into the construction of credit models. On the basis of ensuring data privacy, the accuracy of the risk classification model is improved by expanding the features of the same sample set, providing a new idea for the research on credit assessment construction.

[0108] (3) Construct a supply chain product business risk classification matrix. Based on the predicted credit rating type and combined with supply chain credit, mortgage, pledge and other business models, calculate the corresponding risk classification, and provide a solution to dynamically adjust the risk classification according to different business scenarios.

[0109] By applying the method provided in the embodiment of the present application, when multiple participants conduct joint modeling, since there are great security risks in the circulation of data in the network, the participants do not want to bear the risk of data being leaked during transmission in the network, thus solving the problem of data security sharing.

[0110] and Figure 1 Corresponding to the method described above, the embodiment of the present application also provides a credit risk detection device for Figure 1 The specific implementation of the method is shown in the following diagram: Figure 6 As shown, specifically including:

[0111] The acquisition unit 601 is used to acquire the transaction data and business model of the object to be detected in response to the risk detection instruction;

[0112] The prediction unit 602 inputs the transaction data into a pre-trained credit risk prediction model to obtain a credit risk level prediction result corresponding to the object to be detected;

[0113] The determination unit 603 is used to determine the risk classification result of the object to be detected according to the credit risk level prediction result, the business model and a preset risk classification matrix.

[0114] The training process of the credit risk prediction model includes:

[0115] Acquire a first credit risk prediction model and first sample data; the first sample data includes at least one of historical transaction data and credit risk classification label data;

[0116] Generate a first intermediate result according to the first credit risk prediction model and the first sample data;

[0117] Generate a first encrypted gradient of the first credit risk prediction model according to the first intermediate result and the received second encrypted intermediate result; the second encrypted intermediate result is obtained by the second participant of the federated learning system by encrypting the second intermediate result; the second intermediate result is generated by the second participant according to the second credit risk prediction model and the second sample data; the second sample data is the local data of the second participant;

[0118] Sending the first encrypted gradient to an intermediary of the federated learning system, so that the intermediary of the federated learning system decrypts the first encrypted gradient to obtain a first gradient;

[0119] updating the model parameters of the first credit risk prediction model according to the first gradient decrypted by the intermediary, and determining whether the updated first credit risk prediction model meets a preset training completion condition;

[0120] When the updated first credit risk prediction model meets the preset training completion condition, the first credit risk prediction model that meets the training completion condition is determined as the trained credit risk prediction model.

[0121] In an embodiment provided in the present application, based on the above solution, optionally, the prediction unit includes:

[0122] An acquisition subunit, used to acquire original sample data;

[0123] The preprocessing subunit is used to preprocess the original sample data to obtain first sample data.

[0124] In an embodiment provided in the present application, based on the above solution, optionally, it further includes:

[0125] The output unit is used to output risk warning information of the object to be detected when it is determined that the object to be detected has abnormal risk according to the risk classification result of the object to be detected.

[0126] The specific principles and execution processes of each unit and module in the credit risk detection device disclosed in the above-mentioned embodiment of the present application are the same as those of the credit risk detection method disclosed in the above-mentioned embodiment of the present application. Please refer to the corresponding parts of the credit risk detection method provided in the above-mentioned embodiment of the present application, and will not be repeated here.

[0127] An embodiment of the present application further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned credit risk detection method.

[0128] The present application also provides an electronic device, whose structural diagram is as follows: Figure 7 As shown, it specifically includes a memory 701 and one or more instructions 702, wherein the one or more instructions 702 are stored in the memory 701 and are configured to be executed by one or more processors 703 to perform the following operations:

[0129] In response to the risk detection instruction, obtaining transaction data and business model of the object to be detected;

[0130] Inputting the transaction data into a pre-trained credit risk prediction model to obtain a credit risk level prediction result corresponding to the object to be detected;

[0131] The risk classification result of the object to be detected is determined according to the credit risk level prediction result, the business model and a preset risk classification matrix.

[0132] The training process of the credit risk prediction model includes:

[0133] Acquire a first credit risk prediction model and first sample data; the first sample data includes at least one of historical transaction data and credit risk classification label data;

[0134] Generate a first intermediate result according to the first credit risk prediction model and the first sample data;

[0135] Generate a first encrypted gradient of the first credit risk prediction model according to the first intermediate result and the received second encrypted intermediate result; the second encrypted intermediate result is obtained by the second participant of the federated learning system by encrypting the second intermediate result; the second intermediate result is generated by the second participant according to the second credit risk prediction model and the second sample data; the second sample data is the local data of the second participant;

[0136] Sending the first encrypted gradient to an intermediary of the federated learning system, so that the intermediary of the federated learning system decrypts the first encrypted gradient to obtain a first gradient;

[0137] updating the model parameters of the first credit risk prediction model according to the first gradient decrypted by the intermediary, and determining whether the updated first credit risk prediction model meets a preset training completion condition;

[0138] When the updated first credit risk prediction model meets the preset training completion condition, the first credit risk prediction model that meets the training completion condition is determined as the trained credit risk prediction model.

[0139] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0140] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.

[0141] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0142] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0143] The above is a detailed introduction to a credit risk detection method provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A credit risk detection method, characterized in that: Applied to a first participant in federated learning, the method includes: In response to the risk detection instruction, obtaining transaction data and business model of the object to be detected; Inputting the transaction data into a pre-trained credit risk prediction model to obtain a credit risk level prediction result corresponding to the object to be detected; Determining the risk classification result of the object to be detected according to the credit risk level prediction result, the business model and a preset risk classification matrix; The training process of the credit risk prediction model includes: Acquire a first credit risk prediction model and first sample data; the first sample data includes at least one of historical transaction data and credit risk classification label data; Generate a first intermediate result according to the first credit risk prediction model and the first sample data; Generate a first encrypted gradient of the first credit risk prediction model according to the first intermediate result and the received second encrypted intermediate result; the second encrypted intermediate result is obtained by the second participant of the federated learning system by encrypting the second intermediate result; the second intermediate result is generated by the second participant according to the second credit risk prediction model and the second sample data; the second sample data is the local data of the second participant; Sending the first encrypted gradient to an intermediary of the federated learning system, so that the intermediary of the federated learning system decrypts the first encrypted gradient to obtain a first gradient; updating the model parameters of the first credit risk prediction model according to the first gradient decrypted by the intermediary, and determining whether the updated first credit risk prediction model meets a preset training completion condition; When the updated first credit risk prediction model meets the preset training completion condition, the first credit risk prediction model that meets the training completion condition is determined as the trained credit risk prediction model.

2. The method according to claim 1, characterized in that: The process of obtaining the first sample data includes: Get the original sample data; The original sample data is preprocessed to obtain first sample data.

3. The method according to claim 1, characterized in that After generating the first intermediate result according to the first credit risk prediction model and the first sample data, the method further includes: Encrypting the first intermediate result according to the key issued by the intermediate party to obtain a first encrypted intermediate result; Send the first encrypted intermediate result to the second participant.

4. The method according to claim 1, characterized in that The determining whether the updated first credit risk prediction model meets a preset training completion condition includes: When the loss function of the updated first credit risk prediction model has converged, determining that the updated first credit risk prediction model meets the training completion condition; When the loss function of the updated first credit risk prediction model has not converged, it is determined that the updated first credit risk prediction model does not meet the training completion condition.

5. The method according to claim 1, characterized in that After determining the risk classification result of the object to be detected, the method further includes: When it is determined that the object to be detected has an abnormal risk according to the risk classification result of the object to be detected, risk warning information of the object to be detected is output.

6. A credit risk detection device, characterized in that: The first participants applied to federated learning include: An acquisition unit, configured to acquire transaction data and business model of an object to be detected in response to a risk detection instruction; The prediction unit inputs the transaction data into a pre-trained credit risk prediction model to obtain a prediction result of the credit risk level corresponding to the object to be detected; A determination unit, configured to determine a risk classification result of the object to be detected according to the credit risk level prediction result, the business model and a preset risk classification matrix; The training process of the credit risk prediction model includes: Acquire a first credit risk prediction model and first sample data; the first sample data includes at least one of historical transaction data and credit risk classification label data; Generate a first intermediate result according to the first credit risk prediction model and the first sample data; Generate a first encrypted gradient of the first credit risk prediction model according to the first intermediate result and the received second encrypted intermediate result; the second encrypted intermediate result is obtained by the second participant of the federated learning system by encrypting the second intermediate result; the second intermediate result is generated by the second participant according to the second credit risk prediction model and the second sample data; the second sample data is the local data of the second participant; Sending the first encrypted gradient to an intermediary of the federated learning system, so that the intermediary of the federated learning system decrypts the first encrypted gradient to obtain a first gradient; updating the model parameters of the first credit risk prediction model according to the first gradient decrypted by the intermediary, and determining whether the updated first credit risk prediction model meets a preset training completion condition; When the updated first credit risk prediction model meets the preset training completion condition, the first credit risk prediction model that meets the training completion condition is determined as the trained credit risk prediction model.

7. The device according to claim 6, characterized in that The prediction unit comprises: An acquisition subunit, used to acquire original sample data; The preprocessing subunit is used to preprocess the original sample data to obtain first sample data.

8. The device according to claim 6, characterized in that Also includes: The output unit is used to output risk warning information of the object to be detected when it is determined that the object to be detected has abnormal risk according to the risk classification result of the object to be detected.

9. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the credit risk detection method according to any one of claims 1 to 5.

10. An electronic device, characterized in that: It comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the credit risk detection method as described in any one of claims 1 to 5.