Training method and device of rating model, equipment and storage medium

By using large-scale public data and a small amount of sensitive data to train the risk rating model, the problem of time-consuming data collection and processing in traditional methods and the inability to migrate and apply the model is solved, efficient and accurate risk rating is achieved, and the universality and migration of the model are improved.

CN119599779APending Publication Date: 2025-03-11AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411645012.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the banking system, traditional risk rating methods cause data collection and processing time to be consumed due to data complexity and privacy issues. The trained models are only applicable to current tasks and cannot be easily migrated and applied to other similar tasks, which increases the training degree and time cost.

Method used

By obtaining a large amount of public data and a small amount of sensitive data, pre-trained transfer learning models are used for preliminary training, and then fine-tuning the model based on the sensitive data to generate a customer risk rating model.

Benefits of technology

On the premise of ensuring data privacy, this method reduces the need for a large amount of sensitive data, simplifies the data collection process, protects user privacy, and improves the efficiency and accuracy of risk ratings, and enhances the universality and migratory of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599779A_ABST
    Figure CN119599779A_ABST
Patent Text Reader

Abstract

The invention discloses a rating model training method and device, equipment and a storage medium. When the method provided by the embodiment of the invention is executed, firstly, N pieces of public data and M pieces of sensitive data (wherein M is far smaller than N) are obtained, and are converted into first risk index data and second risk index data; training a transfer learning model by using N pieces of first risk index data to obtain a preliminary rating, and finely adjusting the preliminary rating by using M pieces of second risk index data to obtain a customer risk rating model; according to the method, the pre-training model is trained by fully utilizing large-scale public data, and a small amount of sensitive data is used for fine tuning, so that the requirement on the sensitive data is reduced, the data collection difficulty is simplified, and the user privacy is effectively protected. And efficient parameter adjustment is realized by adopting a transfer learning mode, and the model performance is remarkably improved. Meanwhile, the training mode constructs a basic model for similar tasks, so that applications can be quickly migrated in similar scenes, and the cost and time of repeated training are saved.
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 training method, apparatus, device and storage medium for a rating model. Background Art

[0002] In the banking system, the collection and processing of customer information is crucial. The bank's KYC (know your customer) due diligence system assesses customer risk levels and takes corresponding measures by collecting information from multiple sources, such as customer identity, account and transaction data. The rating system usually combines expert rules and manual review, sets risk indicators, establishes rating models, and ultimately summarizes customer risk levels into low, medium and high risks, and implements corresponding management and control strategies.

[0003] However, as the complexity of financial markets increases and risk indicators increase, traditional processing methods have become cumbersome and time-consuming. In recent years, with the development of artificial intelligence and information technology, intelligent risk rating methods have emerged. These methods use deep learning techniques, such as convolutional neural networks, to handle multi-classification problems in risk rating, reducing the burden of manpower and improving efficiency.

[0004] The intelligent risk rating method also has some defects. First, considering the numerous risk factors, complex data sources and privacy issues, it is necessary to obtain user consent and may involve manual processing, so the collection and processing of data still requires a lot of time and effort. Secondly, directly using convolutional neural network training models requires parameter adjustment and optimization, and the trained model is only applicable to the current task and cannot be easily transferred to similar tasks, which increases the training degree and time cost.

[0005] Therefore, how to improve the efficiency and accuracy of risk rating while ensuring data privacy and reducing human resource consumption, while ensuring that the intelligent model has higher versatility and transferability, is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0006] Based on the above problems, this paper provides a training method, device, equipment and storage medium for a rating model, which can improve the efficiency and accuracy of risk rating while ensuring data privacy and reducing human resource consumption, while ensuring that the intelligent model has higher versatility and portability.

[0007] The embodiments of the present application disclose the following technical solutions:

[0008] A method for training a rating model, the method comprising:

[0009] Obtain N pieces of public data with risk level labels and M pieces of sensitive data with risk level labels, where both N and M are positive integers, and M is much smaller than N;

[0010] Convert the N pieces of public data into N pieces of first risk indicator data, and convert the M pieces of sensitive data into M pieces of second risk indicator data;

[0011] Performing model training on the pre-trained transfer learning model based on the N pieces of first risk indicator data and the risk level labels of the public data to obtain a preliminary rating model;

[0012] The preliminary rating model is fine-tuned based on the M pieces of second risk indicator data and the risk level labels of the sensitive data to obtain a customer risk level rating model.

[0013] In a possible implementation, the pre-trained transfer learning model is trained based on the N pieces of first risk indicator data and the risk level labels of the public data to obtain a preliminary rating model, including:

[0014] Using the first risk indicator data as input of the pre-trained transfer learning model, and predicting a risk level prediction value corresponding to the first risk indicator data through the pre-trained transfer learning model;

[0015] According to the difference between the risk level prediction value and the risk level label of the public data, adjusting the structural parameters of the pre-trained transfer learning model;

[0016] The structural parameters of the pre-training transfer learning model are iteratively adjusted through the N pieces of first risk indicator data until a first training cutoff condition is met, thereby obtaining the preliminary rating model.

[0017] In a possible implementation, adjusting the structural parameters of the pre-trained transfer learning model according to the difference between the risk level prediction value and the risk level label of the public data includes:

[0018] Determine the target loss function;

[0019] Calculate the difference between the risk level prediction value and the risk level label of the public data based on the target loss function to obtain a loss value;

[0020] The loss value is processed using an optimizer, and the gradient of each parameter in the pre-trained transfer learning model is calculated by a back propagation algorithm;

[0021] The weight parameters of each hidden layer in the pre-trained transfer learning model are adjusted according to the gradient of each parameter.

[0022] In a possible implementation, fine-tuning the preliminary rating model based on the M pieces of second risk indicator data and the risk level labels of the sensitive data to obtain a customer risk level rating model includes:

[0023] Using the second risk indicator data as input to the preliminary rating model, and predicting a risk level prediction value corresponding to the second risk indicator data through the preliminary rating model;

[0024] Calculating the difference between the second risk level prediction value and the risk level label of the public data to obtain a difference value; the second risk level prediction value and the difference value have a one-to-one correspondence;

[0025] Analyze the first risk indicator data causing the difference value by using the transformation enhancement and lifting algorithm TrAdadoost algorithm to obtain the impact indicator data;

[0026] Adjusting weight parameters of each hidden layer in the preliminary rating model based on the impact indicator data and the second risk indicator data;

[0027] The structural parameters of the preliminary rating model are iteratively fine-tuned through the M pieces of second risk indicator data until a second training cutoff condition is met, thereby obtaining the customer risk level rating model.

[0028] In a possible implementation, adjusting the weight parameters of each hidden layer in the preliminary rating model based on the impact indicator data and the second risk indicator data includes:

[0029] If the difference value caused by the influencing indicator data is greater than a first difference threshold, reducing the hidden layer weight parameter corresponding to the influencing indicator data;

[0030] If the difference value corresponding to the second risk indicator data is greater than a second difference threshold, the hidden layer weight parameter corresponding to the impact indicator data is increased.

[0031] In one possible implementation, the pre-trained transfer learning model includes a deep neural network training risk rating pre-model built by the deep learning framework Keras.

[0032] A training device for a rating model, the method comprising:

[0033] A data acquisition unit, used to acquire N pieces of public data with risk level labels and M pieces of sensitive data with risk level labels, where N and M are both positive integers, and M is much smaller than N;

[0034] A data conversion unit, used to convert the N pieces of public data into N pieces of first risk indicator data, and convert the M pieces of sensitive data into M pieces of second risk indicator data;

[0035] A first model training unit is used to perform model training on a pre-trained transfer learning model based on the N pieces of first risk indicator data and the risk level labels of the public data to obtain a preliminary rating model;

[0036] A model fine-tuning unit is used to fine-tune the preliminary rating model based on the M second risk indicator data and the risk level label of the sensitive data to obtain a customer risk level rating model.

[0037] In a possible implementation, the first model training unit specifically includes:

[0038] a first risk level prediction unit, configured to use the first risk indicator data as an input of the pre-trained transfer learning model, and predict a risk level prediction value corresponding to the first risk indicator data through the pre-trained transfer learning model;

[0039] a parameter adjustment unit, configured to adjust the structural parameters of the pre-trained transfer learning model according to the difference between the risk level prediction value and the risk level label of the public data;

[0040] An iterative training unit is used to iteratively adjust the structural parameters of the pre-training transfer learning model through the N first risk indicator data until the first training cutoff condition is met to obtain the preliminary rating model.

[0041] A rating model training device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the rating model training method as described above is implemented.

[0042] A computer-readable storage medium stores instructions, which, when executed on a terminal device, enable the terminal device to execute the rating model training method as described above.

[0043] Compared with the prior art, this application has the following beneficial effects:

[0044] The present application provides a training method, device, equipment and storage medium for a rating model. Specifically, when executing the training method of the rating model provided in the embodiment of the present application, first, by obtaining N public data with risk level labels and M sensitive data with risk level labels (where N and M are both positive integers, and M is much smaller than N), the N public data are converted into N first risk indicator data, and the M sensitive data are converted into M second risk indicator data. Then, based on the risk level labels of the N first risk indicator data and the public data, the pre-trained transfer learning model is trained to obtain a preliminary rating model, and then the preliminary rating model is fine-tuned based on the risk level labels of the M second risk indicator data and sensitive data, and finally a customer risk level rating model is obtained. The present application trains the pre-trained model by using large-scale, easily accessible public data, and uses a small amount of sensitive data for fine-tuning, thereby reducing the need for a large amount of sensitive data, thereby reducing the difficulty of data collection and effectively protecting user privacy. At the same time, the present application adopts a transfer learning method, first training a pre-trained model based on a large amount of public data, and then fine-tuning the model with a small amount of sensitive data. This method not only simplifies the parameter adjustment process, but also improves the performance of the final model. Compared with directly training a convolutional neural network from scratch, this method is more efficient and has better results. In addition, the training method of combining public data and sensitive data for model pre-training and fine-tuning can improve the generalization ability while building a basic model for similar tasks, so as to facilitate rapid migration and application in similar scenarios, thus saving the cost and time of repeated training. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in this embodiment or 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 creative work.

[0046] Figure 1 A method flow chart of a method for training a rating model provided in an embodiment of the present application;

[0047] Figure 2 A method flow chart of a method for training a preliminary rating model provided in an embodiment of the present application;

[0048] Figure 3 A method flow chart of a structural parameter adjustment method provided in an embodiment of the present application;

[0049] Figure 4 A method flow chart of a method for training a customer risk level rating model provided in an embodiment of the present application;

[0050] Figure 5 A schematic diagram of the structure of a rating model training device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] To facilitate understanding of the technical solutions provided by the embodiments of the present application, the background technology involved in the embodiments of the present application will be described below.

[0052] In the banking system, customer information collection and risk rating are crucial links. Traditional methods rely on expert rules and manual review, which has become time-consuming and labor-intensive as the complexity of financial markets increases. In order to improve efficiency, the banking industry has turned to intelligent risk rating methods. However, although the current intelligent methods have potential, they also have some flaws. First, the data sources are complex, privacy issues need to be handled with caution, and data collection and processing are time-consuming and labor-intensive. Second, directly using deep neural networks to train models requires a large amount of data, and the training process is cumbersome; moreover, the trained model is only applicable to the current task and cannot be easily migrated to other similar tasks.

[0053] In order to solve this problem, a training method, device, equipment and storage medium for a rating model are provided in an embodiment of the present application. By obtaining N public data with risk level labels and M sensitive data with risk level labels (where N and M are both positive integers, and M is much smaller than N), the N public data are converted into N first risk indicator data, and the M sensitive data are converted into M second risk indicator data. First, a pre-trained transfer learning model is trained based on the risk level labels of the N first risk indicator data and the public data to obtain a preliminary rating model, and then the preliminary rating model is fine-tuned based on the risk level labels of the M second risk indicator data and sensitive data, and finally a customer risk level rating model is obtained. This application successfully reduces the demand for sensitive data by making full use of large-scale, easily accessible public data to train the pre-trained model, and carefully uses a small amount of sensitive data for fine-tuning, thereby simplifying the data collection process and achieving effective protection of user privacy. The method adopts a transfer learning strategy, first building a pre-trained model based on a large amount of public data, and then fine-tuning it with a small amount of sensitive data, which not only simplifies the parameter adjustment process, but also improves the final model performance. Compared with training convolutional neural networks directly from scratch, this method is more efficient and more effective. The training method of combining public data and sensitive data for model pre-training and fine-tuning not only helps to improve generalization capabilities, but also lays a foundation for similar tasks, facilitating rapid migration and application in similar scenarios, thereby saving the cost and time required for repeated training.

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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] See also Figure 1 , which is a flow chart of a method for training a rating model provided in an embodiment of the present application, such as Figure 1 As shown, the training method of the rating model may include steps S101-S104:

[0056] S101: Obtain N pieces of public data with risk level labels and M pieces of sensitive data with risk level labels.

[0057] Obtain N pieces of public data with risk level labels and M pieces of sensitive data with risk level labels, where N and M are positive integers and M is much smaller than N, in order to establish a comprehensive risk assessment model. Public data usually comes from publicly accessible or shared data sets, such as academic research reports, etc. These data are of great significance for research and model training. Sensitive data usually refers to personal information, financial transaction records, etc., which need to be obtained under the premise of complying with relevant privacy protection laws and regulations. They need to be collected through user authorization, cooperation agencies, etc. to ensure data security and compliance. For public data, it can be obtained through data crawler technology, database query or directly from the data provider; while sensitive data relies more on user authorization or data sharing agreements in specific fields to ensure the legitimacy and privacy protection of the data.

[0058] It should be noted that the sensitive data of users involved in this application (including but not limited to user device information, user personal information and other sensitive data) are all information and data authorized by the users or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0059] S102: Convert the N pieces of public data into N pieces of first risk indicator data, and convert the M pieces of sensitive data into M pieces of second risk indicator data.

[0060] Based on the collection of relatively easy-to-obtain, non-privacy public data, the existing customer data in the banking system can be used for processing and conversion. This part of the data can be converted from raw data to various risk indicator data that meet business needs through regular processing and encoding technology, so as to serve as the input of the transfer learning pre-training model. This process ensures the validity and availability of the data while protecting customer privacy to the greatest extent.

[0061] As for sensitive data that is relatively difficult to obtain or involves privacy, such as customer questionnaire data, negative news information, etc., the sample size of this part of data is smaller and more sensitive. After collection, additional manual review, labeling or special coding processing is required to protect customer privacy and reduce potential risks. This processing method is designed to ensure compliance and privacy protection during data processing, while also improving the credibility and integrity of the data.

[0062] In general, when building a risk assessment model, N pieces of public data are converted into first risk indicator data and M pieces of sensitive data are converted into second risk indicator data in order to maintain data consistency and accuracy and ensure the robustness and generalization of the model. This processing method combines the characteristics of the data and the usage scenarios, aiming to build a comprehensive and accurate risk assessment model to provide reliable support and guidance for decision makers.

[0063] In one possible implementation, the first risk indicator data and the second risk indicator data need to be preprocessed before being put into the model training process. Therefore, the first risk indicator data used in step S103 and the second risk indicator data used in step S104 are both preprocessed risk indicator data.

[0064] In a possible implementation, the preprocessing process of risk indicator data includes but is not limited to:

[0065] (a) For outliers and duplicate records, delete them directly.

[0066] (b) For missing values, the mean filling method is needed to fill them in, processing both numerical and non-numerical attribute data separately. If the missing value is numerical, the missing value is filled in according to the average value of the attribute in all other objects; if the missing value is non-numerical, the missing attribute value is filled in according to the principle of majority in statistics, using the value with the highest number of values ​​of the attribute in all other objects (i.e. the value with the highest frequency of occurrence).

[0067] (c) Since the importance of each feature in the sample cannot be reflected when the dimensions are different, the mean-variance normalization method is used to process the cleaned data.

[0068] (d) Since the number of samples of different categories in the customer risk level data is highly unbalanced, most of the samples are usually low risk or medium-low risk, while the number of high risk samples is small. This application uses the SMOTE algorithm to interpolate minority class samples. Specifically, it first randomly selects a minority class sample as the starting point, then randomly selects a sample from the sample's neighbors as a reference point, and generates a new synthetic sample on the line segment between the two samples to increase the number of samples in the data set.

[0069] S103: Performing model training on the pre-trained transfer learning model based on the N pieces of first risk indicator data and the risk level labels of the public data to obtain a preliminary rating model.

[0070] The pre-trained transfer learning model is trained based on N pieces of first risk indicator data and risk level labels of public data, aiming to build a preliminary rating model to assess the risk level of the customer. This process involves training the machine learning model based on samples of existing risk indicator data and true risk level labels so that the model can learn risk characteristics from the data, associate the impact between different indicators, and ultimately predict the risk level of the customer.

[0071] In this way, the model can learn effective rules and patterns by observing a large number of data samples and based on their characteristics, so that it has better generalization ability. The role of the pre-trained transfer learning model here is to use previously learned knowledge and patterns, combined with new risk indicator data and labels, to further optimize the model performance.

[0072] See also Figure 2 , Figure 2 A method flow chart of a training method for a preliminary rating model provided in an embodiment of the present application. Accordingly, step S103 performs model training on a pre-trained transfer learning model based on the N pieces of first risk indicator data and the risk level labels of the public data to obtain a preliminary rating model, which can be implemented through steps A1-A3:

[0073] A1: Using the first risk indicator data as the input of the pre-trained transfer learning model, and predicting the risk level prediction value corresponding to the first risk indicator data through the pre-trained transfer learning model.

[0074] The first risk indicator data is used as the input of the pre-trained transfer learning model. Through this process, the risk level can be predicted with the help of the pre-trained transfer learning model. This method uses existing data and the existing deep learning model structure, so that the model can learn from the data and predict the corresponding risk level, thereby providing decision support.

[0075] The pre-trained transfer learning model will analyze and learn the first risk indicator data based on existing knowledge and patterns, and then generate the corresponding risk level prediction value. Through learning and training on a large amount of data, the model can capture important features and rules, and improve the accuracy and stability of the risk level.

[0076] In one possible implementation, the pre-trained transfer learning model includes but is not limited to a deep neural network training risk rating pre-model built by the deep learning framework Keras.

[0077] Through this process, we can help build a risk assessment system based on large-scale data and machine learning technology to effectively identify potential risks and provide early warnings. By combining the first risk indicator data with the pre-trained model, we can better understand the signals behind the data and provide reliable support for business decisions.

[0078] A2: According to the difference between the risk level prediction value and the risk level label of the public data, the structural parameters of the pre-trained transfer learning model are adjusted.

[0079] Adjusting the structural parameters of the pre-trained transfer learning model based on the difference between the risk level prediction value and the risk level label of the public data is an important model optimization method. This process aims to improve the performance and accuracy of the model by comparing the deviation between the model's prediction results and the actual observed values.

[0080] See also Figure 3 , Figure 3 A method flow chart of a structural parameter adjustment method provided in an embodiment of the present application. Accordingly, step A2 adjusts the structural parameters of the pre-trained transfer learning model according to the difference between the risk level prediction value and the risk level label of the public data, which can be achieved through steps B1-B4:

[0081] B1: Determine the target loss function.

[0082] Determining the target loss function is an important task in the field of machine learning and deep learning. It is used to measure the gap or error between the model prediction results and the true label. The choice of the target loss function directly affects the effect and performance of model training, so it needs to be reasonably set according to the characteristics of the specific problem.

[0083] The target loss function is a mathematical function that measures the distance between the model output and the real data, usually expressed in numerical form. Different types of problems may require different loss functions. For example, classification problems may use the cross entropy loss function, while regression problems may use the mean square error loss function. The process of determining the target loss function needs to take into account the specific requirements of the problem and the optimization goals of the model. By carefully selecting the loss function, the model can better focus on certain important data features and increase its sensitivity to key information, thereby improving the generalization ability and accuracy of the model. The design of the target loss function can also be affected by factors such as data distribution and sample imbalance. According to different data characteristics, a suitable loss function can be selected to balance the model's ability to handle various situations and improve the robustness of the model.

[0084] In summary, determining the target loss function is a crucial step in deep learning model training, which directly affects the performance and generalization ability of the model. By reasonably selecting the loss function, the model can better understand the data pattern, optimize parameters, and improve prediction accuracy, thereby achieving more effective model training and application.

[0085] B2: Calculate the difference between the risk level prediction value and the risk level label of the public data based on the target loss function to obtain a loss value.

[0086] The difference between the risk level prediction value and the risk level label of the public data is calculated based on the target loss function, aiming to quantify the error or deviation of the model in the prediction process. This step is crucial for evaluating model performance and guiding model optimization and training processes.

[0087] By comparing the output of the model with the true risk level label, the deviation or error between the predicted value and the actual value of each sample can be obtained. This comparison is done through the target loss function, which usually uses mathematical methods to measure the difference between the predicted value and the true value. The calculated difference value represents the size of the error generated by the model when predicting the sample. These error values ​​are accumulated or averaged to obtain the overall loss value, which reflects the performance of the entire model on the training data set. The loss value provides an important indicator for evaluating model performance. A lower loss value indicates that the model prediction is closer to the true value, while a higher loss value may indicate that the model has problems such as underfitting or overfitting and needs to be adjusted and optimized.

[0088] By calculating the loss value, we can better understand the prediction accuracy of the model and provide direction for subsequent model optimization. Optimizing the target loss function and reducing the loss value will help the model predict the risk level more accurately and improve the generalization ability of the model, thereby improving the practicality and reliability of the model. Therefore, calculating the loss value is a crucial step in deep learning model training, which provides key clues for model improvement and performance evaluation.

[0089] B3: Use the optimizer to process the loss value and calculate the gradient of each parameter in the pre-trained transfer learning model through the back propagation algorithm.

[0090] Using an optimizer to process the loss value and calculating the gradient of each parameter in the pre-trained transfer learning model through the back-propagation algorithm is a crucial step in deep learning model training, which aims to continuously adjust the model parameters to minimize the loss function, thereby improving the performance and accuracy of the model.

[0091] The loss value represents the difference between the model's prediction and the actual value, and it measures the size of the model's error under the current parameter settings. The optimizer will use this loss value and update the model parameters according to its size and direction, so that the model gradually converges to a better state during training. Through the back-propagation algorithm, the system will propagate the derivatives layer by layer from the output to the input according to the loss value, and calculate the contribution of each parameter to the loss function, that is, the gradient. These gradients indicate in which direction the parameters should be updated in the parameter space to reduce the value of the loss function. Based on the calculated gradient information, the optimizer will use different optimization strategies (such as stochastic gradient descent, Adam, etc.) to update the model's weights and bias parameters to minimize the loss function. This process is an iterative optimization process, and the parameters are continuously optimized in each round of iteration so that the model gradually converges to the global or local optimal solution.

[0092] In this way, the model will continue to learn and improve, and the gap between the model prediction results and the true value will gradually narrow, thereby achieving a more accurate risk level prediction. Therefore, using the optimizer to process the loss value and calculate the parameter gradient is a core step in deep learning model optimization, providing an effective mathematical foundation and methodological support for model learning and improvement.

[0093] B4: Adjust the weight parameters of each hidden layer in the pre-trained transfer learning model according to the gradient of each parameter.

[0094] Adjusting the weight parameters of each hidden layer in the pre-trained transfer learning model according to the gradient of each parameter is a key step in the deep learning model training process. It aims to continuously update the model weights through gradient descent so that the model can better fit the data and improve performance. This step is crucial for optimizing the model parameters and improving the model's generalization ability.

[0095] The gradient represents the rate of change of the loss function relative to each parameter. A positive gradient indicates that increasing the parameter value will increase the loss function value, while a negative gradient indicates that decreasing the parameter value will decrease the loss function value. Therefore, based on the direction and magnitude of the gradient value, it is possible to determine how to update the parameters to reduce the loss function. Adjusting the weight parameters of each hidden layer in the pre-trained transfer learning model means fine-tuning the weights along the gradient direction so that the model can better learn the characteristics and patterns of the data. As training progresses, the model gradually improves the prediction results and improves the performance and generalization ability of the model by continuously adjusting the weight parameters. By using the calculated gradient information, the parameters of the model can be updated in a targeted manner, so that the prediction effect of the model on the training set is gradually optimized while avoiding overfitting. Over multiple iterations, the model will learn the characteristics of the data and gradually adjust the weight parameters so that the model can more accurately reflect the relationship between the data.

[0096] Through this process, the model can continuously optimize its own structure and improve its ability to understand and process data, thereby achieving more accurate risk level prediction. Therefore, adjusting the weight parameters of the hidden layer according to the parameter gradient is an essential step in the deep learning model training process, which directly affects the performance of the model and lays the foundation for further improvement of the model.

[0097] A3: Iteratively adjust the structural parameters of the pre-training transfer learning model through the N first risk indicator data until the first training cutoff condition is met to obtain the preliminary rating model.

[0098] Iteratively adjusting the structural parameters of the pre-trained transfer learning model through N first risk indicator data until the first training cutoff condition is met means that when training the preliminary rating model, multiple rounds of iterative optimization of the model structure and parameters are performed according to the selected risk indicator data to achieve the goal of meeting the established training stop condition.

[0099] Through N pieces of first risk indicator data, the model can obtain information about specific risks, which are used to train and optimize the model. In each round of iteration, the model will adjust the structural parameters based on these data to better adapt to and understand the risk characteristics and improve the performance of the model. Iterative adjustment of the structural parameters of the pre-trained transfer learning model means that through multiple training iterations, the model's structure, weights, biases and other parameters are continuously optimized in each round of iteration so that the model gradually converges to a more appropriate state. This process involves fine-tuning and optimizing the model architecture so that the model can more effectively capture the patterns and characteristics of the data. When the set first training cutoff condition is met, that is, the model training has met the established requirements, the preliminary rating model obtained at this time can be used as a baseline model for evaluation and subsequent improvement. The model is obtained after multiple rounds of iterative optimization, which can reflect the model performance and accuracy under the limited risk indicator data.

[0100] Through the above steps, the structure and parameters of the model can be gradually improved to make it more in line with the characteristics and requirements of the actual data, and to improve the performance and generalization ability of the model. Therefore, the structural parameters of the pre-training transfer learning model are iteratively adjusted through N first risk indicator data until the first training cutoff condition is met, in order to establish an initial rating model and lay the foundation for subsequent model improvement and optimization.

[0101] In a possible implementation, the first training cutoff condition may include but is not limited to the following:

[0102] ①Specified number of iterations: You can set a fixed number of iterations and stop training when the model training reaches this number.

[0103] ②Model performance indicators: You can set an error threshold, for example, stop training when the mean square error between the predicted value and the true value is less than a certain value.

[0104] ③Training time: You can set a maximum training time and stop training after reaching that time.

[0105] S104: Fine-tune the preliminary rating model based on the M pieces of second risk indicator data and the risk level labels of the sensitive data to obtain a customer risk level rating model.

[0106] The preliminary rating model is fine-tuned based on the M second risk indicator data and the risk level labels of the sensitive data to obtain a customer risk level rating model, which means that the existing preliminary rating model is further trained and optimized by using a specific set of data (i.e., the M second risk indicator data) and corresponding risk level labels (including sensitive data), and finally a more accurate customer risk level rating model that is more suitable for practical applications is generated.

[0107] See also Figure 4 , Figure 4 A method flow chart of a training method for a customer risk level rating model provided in an embodiment of the present application. Accordingly, step S104 fine-tunes the preliminary rating model based on the M pieces of second risk indicator data and the risk level label of the sensitive data to obtain a customer risk level rating model, which can be implemented through steps C1-C5:

[0108] C1: Using the second risk indicator data as the input of the preliminary rating model, and predicting the risk level prediction value corresponding to the second risk indicator data through the preliminary rating model.

[0109] Taking the second risk indicator data as the input of the preliminary rating model and predicting the risk level prediction value corresponding to the second risk indicator data through the preliminary rating model refers to using the trained preliminary rating model to evaluate and predict the new risk indicator data (i.e., the second risk indicator data).

[0110] C2: Calculate the difference between the second risk level prediction value and the risk level label of the public data to obtain a difference value.

[0111] The difference value is obtained based on the difference between the second risk level prediction value and the risk level label of the public data, which means that by comparing the risk level predicted by the model and the risk level in the actual public data, the deviation or error degree between the two is determined. The generation of this difference value can quantify the accuracy and effect of the prediction model on the real risk situation. There is a one-to-one correspondence between the second risk level prediction value and its corresponding difference value, which means that each prediction value has a specific difference value corresponding to it. This correspondence helps to understand how the model performs in different risk situations and provides guidance to improve the prediction accuracy and the overall performance of the model.

[0112] C3: Analyze the first risk indicator data causing the difference value using the TrAdadoost algorithm to obtain the impact indicator data.

[0113] The first risk indicator data that leads to the difference value is analyzed using the TrAdaboost algorithm to obtain the influencing indicator data, which means mining the potential factors that lead to prediction errors or difference values ​​through an iterative machine learning method. The algorithm aims to identify key data features or indicators that have a significant impact on model performance and prediction accuracy.

[0114] The TrAdaboost algorithm can effectively handle inter-class imbalance and noisy data. Through multiple rounds of training iterations, the model is gradually adjusted to optimize the prediction results according to the characteristics in the first risk indicator data. It can assist in analyzing those risk indicators that have a significant impact on model performance and help identify potential key data features. By analyzing the first risk indicator data with the TrAdaboost algorithm, the influencing indicator data obtained can reveal the key features or factors related to the difference value. These key indicators may be the main driving factors affecting the accuracy and stability of the model, providing valuable insights and directions for further improving the model and optimizing the prediction process. Using the TrAdaboost algorithm to analyze the influencing indicator data can help to gain a deep understanding of the root causes of model deviations and find out how to improve the model or adjust the data processing process to reduce errors and improve the model's prediction performance. This approach helps to optimize the model's learning ability, so that it can better adapt to complex risk environments, thereby improving the reliability and accuracy of decision-making.

[0115] C4: Adjusting weight parameters of each hidden layer in the preliminary rating model based on the impact indicator data and the second risk indicator data.

[0116] Based on the impact indicator data and the second risk indicator data, the weight parameters of each hidden layer in the preliminary rating model are adjusted, which means optimizing the model to improve the prediction accuracy and model performance according to the key data characteristics and risk indicators discovered. In this process, the weight parameters of the hidden layers in the preliminary rating model are adjusted, specifically including the following two operations:

[0117] First, if the difference value caused by the influencing indicator data exceeds the first difference threshold, it means that these specific indicators have a greater impact on the model's prediction. In this case, the hidden layer weight parameters related to these indicators need to be reduced. By reducing the influence of these indicators, their impact on the overall prediction of the model can be mitigated to improve the stability and robustness of the model.

[0118] Secondly, if the difference value corresponding to the second risk indicator data exceeds the second difference threshold, it indicates that these risk indicators play an important role in model prediction, so it is necessary to increase the hidden layer weight parameters related to these indicators. By increasing the weights of these indicators, their influence in the model output can be strengthened, thereby better capturing important risk-related features and improving the model's ability to identify different risk situations.

[0119] In general, the purpose of adjusting the weight parameters of the hidden layer based on the impact indicator data and the second risk indicator data is to optimize the model's learning process and prediction performance according to the correlation between data characteristics and risk indicators. By dynamically adjusting the weight parameters, the model can more effectively utilize key information, improve the understanding of risk situations and prediction accuracy, and thus enhance the reliability and practicality of the model.

[0120] It should be noted that the present application does not impose any specific restrictions on the sizes of the first difference threshold and the second difference threshold, and the user can adjust the sizes of the first difference threshold and the second difference threshold according to actual conditions.

[0121] C5: Iteratively fine-tune the structural parameters of the preliminary rating model through the M pieces of second risk indicator data until the second training cutoff condition is met to obtain the customer risk level rating model.

[0122] Through the iteration of M pieces of second risk indicator data, the structural parameters of the preliminary rating model are fine-tuned until the second training cutoff condition is reached, and finally the customer risk level rating model is obtained. This process aims to use more risk data to further optimize and improve the model to improve the ability to accurately assess customer risk levels.

[0123] By using M pieces of second risk indicator data and continuously iteratively adjusting the structural parameters of the preliminary rating model, the model can be gradually improved to make it closer to the actual risk situation. This means that by repeatedly training and adjusting the model to better fit the existing data and improve the prediction accuracy, a more reliable and effective customer risk rating model can be obtained. By setting the second training cutoff condition, the end point of the iterative fine-tuning process is ensured. When the model meets a specific accuracy or performance standard, the training stops to avoid overfitting or unnecessary training. The setting of this training cutoff condition helps to control the training process of the model so that it stops after reaching the ideal state, avoiding resource waste and unnecessary training time. After repeated iterations and fine-tuning, the customer risk rating model obtained will be an optimized model with high prediction accuracy and reliability. This model can play an important role in the field of risk management, providing key risk assessment information for institutions or decision makers, helping them to better manage risks, make wise decisions, and ensure the robustness and sustainability of businesses or projects. Therefore, through the above process, an effective customer risk rating model can be established to provide strong support for risk management.

[0124] In a possible implementation, similar to the first training cutoff condition, the second training cutoff condition may also include but is not limited to the following conditions:

[0125] ①Specified number of iterations: You can set a fixed number of iterations and stop training when the model training reaches this number.

[0126] ②Model performance indicators: You can set an error threshold, for example, stop training when the mean square error between the predicted value and the true value is less than a certain value.

[0127] ③Training time: You can set a maximum training time and stop training after reaching that time.

[0128] Based on the contents of S101-S104, it can be known that N pieces of information with risk level labels are first obtained from public data, and M pieces of data with risk level labels are extracted from sensitive data (where M is much smaller than N). Next, the N pieces of public data are converted into the first type of risk indicator data, and the M pieces of sensitive data are converted into the second type of risk indicator data. Subsequently, a pre-trained transfer learning model is trained on the basis of N pieces of first type risk indicator data and public data to form a preliminary rating model. Finally, the preliminary rating model is fine-tuned using the risk level labels of M pieces of second type risk indicator data and sensitive data to generate a customer risk level rating model. This application uses large-scale, easily accessible public data to train the pre-trained model, and uses a small amount of sensitive data for fine-tuning, thereby reducing the need for a large amount of sensitive data, reducing the difficulty of data collection and effectively protecting user privacy. Using the method of transfer learning, a pre-trained model is first trained based on a large amount of public data, and then the model is fine-tuned with a small amount of sensitive data. This method not only simplifies the parameter adjustment process, but also significantly improves the performance of the final model. Compared with directly training from scratch using a convolutional neural network, this method is more efficient and more effective. By combining public data and sensitive data for model pre-training and fine-tuning, we can improve the generalization ability of the model while building a basic model for similar tasks. This allows the model to be quickly migrated and applied in similar scenarios, saving the cost and time of repeated training.

[0129] See also Figure 5 , Figure 5 A schematic diagram of the structure of a training device for a rating model provided in an embodiment of the present application. Figure 5 As shown, the training device of the rating model includes:

[0130] The data acquisition unit 501 is used to acquire N pieces of public data with risk level labels and M pieces of sensitive data with risk level labels, where N and M are both positive integers, and M is much smaller than N;

[0131] A data conversion unit 502, configured to convert the N pieces of public data into N pieces of first risk indicator data, and convert the M pieces of sensitive data into M pieces of second risk indicator data;

[0132] A first model training unit 503 is used to perform model training on a pre-trained transfer learning model based on the N pieces of first risk indicator data and the risk level labels of the public data to obtain a preliminary rating model;

[0133] The model fine-tuning unit 504 is used to fine-tune the preliminary rating model based on the M pieces of second risk indicator data and the risk level labels of the sensitive data to obtain a customer risk level rating model.

[0134] In a possible implementation, the first model training unit 503 specifically includes:

[0135] a first risk level prediction unit, configured to use the first risk indicator data as an input of the pre-trained transfer learning model, and predict a risk level prediction value corresponding to the first risk indicator data through the pre-trained transfer learning model;

[0136] a parameter adjustment unit, configured to adjust the structural parameters of the pre-trained transfer learning model according to the difference between the risk level prediction value and the risk level label of the public data;

[0137] An iterative training unit is used to iteratively adjust the structural parameters of the pre-training transfer learning model through the N first risk indicator data until the first training cutoff condition is met to obtain the preliminary rating model.

[0138] In a possible implementation manner, the parameter adjustment unit specifically includes:

[0139] A determination unit, used to determine the target loss function;

[0140] A first calculation unit, configured to calculate a difference between the risk level prediction value and the risk level label of the public data based on the target loss function to obtain a loss value;

[0141] A back propagation unit, used to process the loss value using an optimizer, and calculate the gradient of each parameter in the pre-trained transfer learning model through a back propagation algorithm;

[0142] The first weight parameter adjustment unit is used to adjust the weight parameters of each hidden layer in the pre-trained transfer learning model according to the gradient of each parameter.

[0143] In a possible implementation, the model fine-tuning unit 504 specifically includes:

[0144] a second risk level prediction unit, configured to use the second risk indicator data as an input of the preliminary rating model, and predict a risk level prediction value corresponding to the second risk indicator data through the preliminary rating model;

[0145] A second calculation unit, configured to calculate a difference between the second risk level prediction value and the risk level label of the public data to obtain a difference value; the second risk level prediction value and the difference value have a one-to-one correspondence;

[0146] An analysis unit, configured to analyze the first risk indicator data causing the difference value by using a transformation enhancement and lifting algorithm TrAdadoost algorithm to obtain impact indicator data;

[0147] A second weight parameter adjustment unit, configured to adjust the weight parameters of each hidden layer in the preliminary rating model based on the impact indicator data and the second risk indicator data;

[0148] An iterative fine-tuning unit is used to iteratively fine-tune the structural parameters of the preliminary rating model through the M second risk indicator data until a second training cutoff condition is met to obtain the customer risk level rating model.

[0149] In a possible implementation manner, the second weight parameter adjustment unit specifically includes:

[0150] a weight parameter reduction unit, configured to reduce a hidden layer weight parameter corresponding to the influencing indicator data if the difference value caused by the influencing indicator data is greater than a first difference threshold;

[0151] The weight parameter increasing unit is used to increase the hidden layer weight parameter corresponding to the impact indicator data if the difference value corresponding to the second risk indicator data is greater than a second difference threshold.

[0152] In one possible implementation, the pre-trained transfer learning model includes a deep neural network training risk rating pre-model built by the deep learning framework Keras.

[0153] In addition, an embodiment of the present application also provides a rating model training device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the rating model training method described above is implemented.

[0154] In addition, an embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the training method of the rating model as described above.

[0155] The embodiment of the present application provides a training device for a rating model, first using a data acquisition unit 501 to acquire N public data with risk level labels and M sensitive data with risk level labels, wherein N and M are both positive integers, and M is much smaller than N, and using a data conversion unit 502 to convert N public data into N first risk indicator data, and convert M sensitive data into M second risk indicator data. Then the first model training unit 503 performs model training on the pre-trained transfer learning model based on the risk level labels of the N first risk indicator data and the public data to obtain a preliminary rating model, so that the model fine-tuning unit 504 can fine-tune the preliminary rating model based on the risk level labels of the M second risk indicator data and the sensitive data to obtain a customer risk level rating model. The present application fully utilizes large-scale public data to train the pre-trained model, and fine-tunes a small amount of sensitive data, thereby reducing the demand for sensitive data, simplifying the difficulty of data collection, and protecting user privacy. At the same time, a transfer learning method is used to achieve efficient parameter adjustment and improve model performance. At the same time, a basic model is constructed for similar tasks, so that applications can be quickly migrated in similar scenarios, saving repeated training costs and time.

[0156] The above is a detailed introduction to the training method, device, equipment and storage medium of a rating model provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can refer to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

[0157] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0158] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including 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, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

Claims

1. A method for training a rating model, characterized in that: The method comprises: Obtain N pieces of public data with risk level labels and M pieces of sensitive data with risk level labels, where both N and M are positive integers, and M is much smaller than N; Convert the N pieces of public data into N pieces of first risk indicator data, and convert the M pieces of sensitive data into M pieces of second risk indicator data; Performing model training on the pre-trained transfer learning model based on the N pieces of first risk indicator data and the risk level labels of the public data to obtain a preliminary rating model; The preliminary rating model is fine-tuned based on the M pieces of second risk indicator data and the risk level labels of the sensitive data to obtain a customer risk level rating model.

2. The method according to claim 1, characterized in that The pre-trained transfer learning model is trained based on the N pieces of first risk indicator data and the risk level labels of the public data to obtain a preliminary rating model, including: Using the first risk indicator data as input of the pre-trained transfer learning model, and predicting a risk level prediction value corresponding to the first risk indicator data through the pre-trained transfer learning model; According to the difference between the risk level prediction value and the risk level label of the public data, adjusting the structural parameters of the pre-trained transfer learning model; The structural parameters of the pre-training transfer learning model are iteratively adjusted through the N pieces of first risk indicator data until a first training cutoff condition is met, thereby obtaining the preliminary rating model.

3. The method according to claim 2, characterized in that The adjusting the structural parameters of the pre-trained transfer learning model according to the difference between the risk level prediction value and the risk level label of the public data includes: Determine the target loss function; Calculate the difference between the risk level prediction value and the risk level label of the public data based on the target loss function to obtain a loss value; The loss value is processed using an optimizer, and the gradient of each parameter in the pre-trained transfer learning model is calculated by a back propagation algorithm; The weight parameters of each hidden layer in the pre-trained transfer learning model are adjusted according to the gradient of each parameter.

4. The method according to claim 1, characterized in that: The fine-tuning of the preliminary rating model based on the M pieces of second risk indicator data and the risk level labels of the sensitive data to obtain a customer risk level rating model includes: Using the second risk indicator data as input to the preliminary rating model, and predicting a risk level prediction value corresponding to the second risk indicator data through the preliminary rating model; Calculating the difference between the second risk level prediction value and the risk level label of the public data to obtain a difference value; the second risk level prediction value and the difference value have a one-to-one correspondence; Analyze the first risk indicator data causing the difference value by using the transformation enhancement and lifting algorithm TrAdadoost algorithm to obtain the impact indicator data; Adjusting weight parameters of each hidden layer in the preliminary rating model based on the impact indicator data and the second risk indicator data; The structural parameters of the preliminary rating model are iteratively fine-tuned through the M pieces of second risk indicator data until a second training cutoff condition is met, thereby obtaining the customer risk level rating model.

5. The method according to claim 1, characterized in that The step of adjusting the weight parameters of each hidden layer in the preliminary rating model based on the impact indicator data and the second risk indicator data includes: If the difference value caused by the influencing indicator data is greater than a first difference threshold, reducing the hidden layer weight parameter corresponding to the influencing indicator data; If the difference value corresponding to the second risk indicator data is greater than a second difference threshold, the hidden layer weight parameter corresponding to the impact indicator data is increased.

6. The method according to claim 1, characterized in that The pre-trained transfer learning model includes a deep neural network training risk rating pre-model built with the deep learning framework Keras.

7. A training device for a rating model, characterized in that: The method comprises: A data acquisition unit, used to acquire N pieces of public data with risk level labels and M pieces of sensitive data with risk level labels, where N and M are both positive integers, and M is much smaller than N; A data conversion unit, used to convert the N pieces of public data into N pieces of first risk indicator data, and convert the M pieces of sensitive data into M pieces of second risk indicator data; A first model training unit is used to perform model training on a pre-trained transfer learning model based on the N pieces of first risk indicator data and the risk level labels of the public data to obtain a preliminary rating model; A model fine-tuning unit is used to fine-tune the preliminary rating model based on the M second risk indicator data and the risk level label of the sensitive data to obtain a customer risk level rating model.

8. The device according to claim 7, characterized in that The first model training unit specifically includes: a first risk level prediction unit, configured to use the first risk indicator data as an input of the pre-trained transfer learning model, and predict a risk level prediction value corresponding to the first risk indicator data through the pre-trained transfer learning model; a parameter adjustment unit, configured to adjust the structural parameters of the pre-trained transfer learning model according to the difference between the risk level prediction value and the risk level label of the public data; An iterative training unit is used to iteratively adjust the structural parameters of the pre-training transfer learning model through the N first risk indicator data until the first training cutoff condition is met to obtain the preliminary rating model.

9. A training device for a rating model, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the training method of the rating model as described in any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the training method of the rating model as described in any one of claims 1-6.