Credit risk determination method and device, equipment, storage medium and program product
By using genetic algorithms and whale optimization algorithms to reconstruct features and optimize hyperparameters in the GRU model, the problems of low data processing efficiency and low accuracy in credit risk determination are solved, and efficient and accurate credit risk prediction is achieved.
Patent Information
- Application Number
- CN202411894589.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2026-01-13
AI Technical Summary
Existing technologies for credit risk determination suffer from low efficiency in processing massive amounts of data and unreasonable model parameter settings, resulting in low work efficiency and low accuracy.
Genetic algorithms are used to reconstruct features from the dataset, and the GRU model is used for training. The optimal hyperparameter configuration of the GRU model is explored through the whale optimization algorithm to improve the prediction accuracy of the model.
It enables stable and efficient determination of credit risk, improving prediction accuracy and model performance.
Smart Images

Figure CN121329602A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of financial technology and artificial intelligence, and in particular to a method, apparatus, device, storage medium and program product for determining credit risk. Background Technology
[0002] Commercial banks are a crucial component of the financial system, and their credit risk management capabilities not only affect their own operations and the interests of the public but also the healthy functioning of the economy and society. Personal credit risk is one of the major risks faced by commercial banks in my country. Enhancing commercial banks' ability to identify risks among personal loan customers is a vital step in mitigating bad debts and preventing systemic financial risks.
[0003] Existing technologies use traditional data classification methods and machine learning models to process user data and generate predictive models for credit risk determination. However, the generated predictive models suffer from problems such as low efficiency in processing massive amounts of data and unreasonable model parameter settings, resulting in low efficiency and low accuracy in the credit risk determination methods. Summary of the Invention
[0004] This application provides a method, apparatus, device, storage medium, and program product for determining credit risk, in order to solve the technical problems of low efficiency and low accuracy in methods for determining credit risk.
[0005] Firstly, this application provides a method for determining credit risk, including:
[0006] Obtain user information for at least one user to be predicted;
[0007] For each user to be predicted, the user information of the user to be predicted is preprocessed to obtain the processed user information corresponding to the user to be predicted.
[0008] The processed user information corresponding to the user to be predicted is input into a pre-trained credit risk prediction model for processing to obtain the risk prediction result corresponding to the user to be predicted. The credit risk prediction model is obtained by training a gated recurrent unit (GRU) model based on a predetermined dataset and a whale optimization algorithm. The dataset is obtained by reconstructing the feature information based on the feature information of multiple users through a genetic algorithm.
[0009] In one possible implementation, the method further includes:
[0010] The original dataset is reconstructed using the genetic algorithm and the GRU model to obtain the dataset.
[0011] Based on the dataset, the GRU model is trained using the whale optimization algorithm to obtain the credit risk prediction model.
[0012] In one possible implementation, the step of using the genetic algorithm and the GRU model to reconstruct features from the original dataset to obtain the dataset includes:
[0013] The parameters of the genetic algorithm are initialized to obtain initialization parameters, which include population size, number of first iterations, selection probability, crossover probability, and mutation probability.
[0014] Based on the initialization parameters, multiple chromosomes in the population are randomly generated;
[0015] Construct a feature set corresponding to each chromosome based on each chromosome;
[0016] Each feature set is input into the GRU model, and the accuracy corresponding to each feature set is calculated.
[0017] Based on the accuracy corresponding to each feature set, the first iteration number, the selection probability, the crossover probability, and the mutation probability, each chromosome is updated until the algorithm iteration termination condition is met;
[0018] The feature set corresponding to the chromosome with the highest accuracy is determined as the optimal feature set;
[0019] The dataset is determined based on the pre-determined original dataset and the optimal feature set.
[0020] In one possible implementation, the credit risk prediction model is obtained by training the GRU model using the whale optimization algorithm based on the dataset, including:
[0021] Initialize the parameters of the whale optimization algorithm, which include the second iteration number, the number of whales, the learning rate, and the hyperparameter range;
[0022] The locations of whale pods are randomly generated, and each whale location in the whale pod corresponds to a set of hyperparameters of the GRU model;
[0023] The dataset is input into the GRU model, and the fitness of each whale position is calculated based on each whale position in the whale pod.
[0024] Based on the fitness of each whale's location and the second iteration number, the location is iteratively updated until the algorithm's iteration termination condition is met;
[0025] The hyperparameter corresponding to the position of the whale with the highest fitness is determined as the target hyperparameter.
[0026] The target hyperparameters are configured in the GRU model to obtain the credit risk prediction model.
[0027] In one possible implementation, the method further includes:
[0028] The pre-acquired set of user feature information is preprocessed to obtain a processed set of user feature information, which includes feature information of multiple users.
[0029] The original dataset is constructed based on the processed set of user feature information.
[0030] In one possible implementation, the preprocessing of the pre-acquired user feature information set to obtain a processed user feature information set includes:
[0031] The user feature information set is subjected to feature encoding to obtain the encoded user feature information set;
[0032] The encoded user feature information set is processed for missing values to obtain a user feature information set with missing values processed.
[0033] The user feature information set after the missing values are processed is normalized to obtain the normalized user feature information set.
[0034] In one possible implementation, the feature encoding of the initial user feature information set includes:
[0035] For the numerical feature information in the initial user feature information set, floating-point encoding is performed;
[0036] For the non-numeric feature information in the initial user feature information set, integer encoding is performed.
[0037] Secondly, this application provides a credit risk determination device, comprising:
[0038] The acquisition module is used to acquire user information for at least one user to be predicted.
[0039] The processing module is used to preprocess the user information of each user to be predicted, so as to obtain the processed user information corresponding to the user to be predicted.
[0040] The determination module is used to input the processed user information corresponding to the user to be predicted into a pre-trained credit risk prediction model for processing, so as to obtain the risk prediction result corresponding to the user to be predicted. The credit risk prediction model is obtained by training the GRU model based on a pre-determined dataset and the whale optimization algorithm. The dataset is obtained by reconstructing the feature information based on the feature information of multiple users through a genetic algorithm.
[0041] In one possible implementation, the processing module is further configured to:
[0042] The original dataset is reconstructed using the genetic algorithm and the GRU model to obtain the dataset.
[0043] Based on the dataset, the GRU model is trained using the whale optimization algorithm to obtain the credit risk prediction model.
[0044] In one possible implementation, the processing module uses the genetic algorithm and the GRU model to reconstruct features from the original dataset to obtain the dataset, specifically for:
[0045] The parameters of the genetic algorithm are initialized to obtain initialization parameters, which include population size, number of first iterations, selection probability, crossover probability, and mutation probability.
[0046] Based on the initialization parameters, multiple chromosomes in the population are randomly generated;
[0047] Construct a feature set corresponding to each chromosome based on each chromosome;
[0048] Each feature set is input into the GRU model, and the accuracy corresponding to each feature set is calculated.
[0049] Based on the accuracy corresponding to each feature set, the first iteration number, the selection probability, the crossover probability, and the mutation probability, each chromosome is updated until the algorithm iteration termination condition is met;
[0050] The feature set corresponding to the chromosome with the highest accuracy is determined as the optimal feature set;
[0051] The dataset is determined based on the pre-determined original dataset and the optimal feature set.
[0052] In one possible implementation, based on the dataset, the GRU model is trained using the whale optimization algorithm to obtain the credit risk prediction model, and the processing module is specifically used for:
[0053] Initialize the parameters of the whale optimization algorithm, which include the second iteration number, the number of whales, the learning rate, and the hyperparameter range;
[0054] The locations of whale pods are randomly generated, and each whale location in the whale pod corresponds to a set of hyperparameters of the GRU model;
[0055] The dataset is input into the GRU model, and the fitness of each whale position is calculated based on each whale position in the whale pod.
[0056] Based on the fitness of each whale's location and the second iteration number, the location is iteratively updated until the algorithm's iteration termination condition is met;
[0057] The hyperparameter corresponding to the position of the whale with the highest fitness is determined as the target hyperparameter.
[0058] The target hyperparameters are configured in the GRU model to obtain the credit risk prediction model.
[0059] In one possible implementation, the processing module is further configured to:
[0060] The pre-acquired set of user feature information is preprocessed to obtain a processed set of user feature information, which includes feature information of multiple users.
[0061] The original dataset is constructed based on the processed set of user feature information.
[0062] In one possible implementation, the processing module preprocesses the pre-acquired set of user feature information to obtain a processed set of user feature information, specifically for:
[0063] The user feature information set is subjected to feature encoding to obtain the encoded user feature information set;
[0064] The encoded user feature information set is processed for missing values to obtain a user feature information set with missing values processed.
[0065] The user feature information set after the missing values are processed is normalized to obtain the normalized user feature information set.
[0066] In one possible implementation, the processing module performs feature encoding on the initial user feature information set, specifically for:
[0067] For the numerical feature information in the initial user feature information set, floating-point encoding is performed;
[0068] For the non-numeric feature information in the initial user feature information set, integer encoding is performed.
[0069] Thirdly, embodiments of this application provide an apparatus, including: a memory and a processor;
[0070] The memory stores computer-executed instructions;
[0071] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0072] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0073] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0074] The credit risk determination method, apparatus, device, storage medium, and program product provided in this application embodiment first obtains user information of at least one user to be predicted. For each user to be predicted, the user information is preprocessed to obtain processed user information corresponding to the user to be predicted. Finally, the processed user information corresponding to the user to be predicted is input into a pre-trained credit risk prediction model for processing to obtain the risk prediction result corresponding to the user to be predicted. This scheme inputs user information into the credit risk prediction model to obtain the risk prediction result. The credit risk prediction model is obtained by using a genetic algorithm to reconstruct information features to obtain the optimal feature set, and the dataset corresponding to the optimal feature set is input into the GRU model for training. At the same time, the whale optimization algorithm is used to explore the optimal hyperparameters of the model to improve the prediction accuracy, achieving the technical effect of stable and efficient determination of credit risk. Attached Figure Description
[0075] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0076] Figure 1 Schematic flowchart of the credit risk determination method provided in the embodiments of this application Figure 1 ;
[0077] Figure 2 Schematic flowchart of the credit risk determination method provided in the embodiments of this application Figure 2 ;
[0078] Figure 3 A flowchart of the genetic algorithm for reconstructing features is provided in the embodiments of this application;
[0079] Figure 4 This is a schematic diagram of the structure of the GRU unit provided in an embodiment of this application;
[0080] Figure 5 A flowchart illustrating the training of the GRU model using the whale optimization algorithm provided in this embodiment of the application;
[0081] Figure 6 Schematic flowchart of the credit risk determination method provided in the embodiments of this application Figure 3 ;
[0082] Figure 7 Schematic flowchart of the credit risk determination method provided in the embodiments of this application Figure 4 ;
[0083] Figure 8 A schematic diagram of the structure of the credit risk determination device provided in the embodiments of this application;
[0084] Figure 9 This is a schematic diagram of the device provided in an embodiment of this application.
[0085] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0086] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0087] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse.
[0088] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0089] It should be noted that the credit risk determination methods, devices, equipment, storage media, and program products provided in this application can be used in the fields of fintech and artificial intelligence, as well as in any other field. The application fields of the credit risk determination methods, devices, equipment, storage media, and program products in this application are not limited.
[0090] Before introducing the embodiments of this application, the application background of the embodiments of this application will be explained first:
[0091] Commercial banks are a crucial component of the financial system, and their credit risk management capabilities not only affect their own operations and the interests of the public but also the healthy functioning of the economy and society. Personal credit risk is one of the major risks faced by commercial banks in my country. Enhancing commercial banks' ability to identify risks among personal loan customers is a vital step in mitigating bad debts and preventing systemic financial risks.
[0092] To assess the risk identification capabilities of individual loan customers, existing technologies employ dynamic desensitization techniques for data anonymization, the Local Outlier Factor (LOF) test to detect outliers, and random forest methods to supplement missing data. Then, a logistic regression-based scoring model processes user indicators to output a personal credit score. Finally, a backpropagation (BP) neural network model is constructed for verification. Another existing technology utilizes a combined model of support vector classifier and particle swarm optimization, and has been practically applied in credit rating calculations at commercial banks.
[0093] Existing technologies use traditional data classification methods and machine learning models to process user data and generate predictive models for credit risk determination. However, the generated predictive models suffer from problems such as low efficiency in processing massive amounts of data and unreasonable model parameter settings, resulting in low efficiency and low accuracy in the credit risk determination methods.
[0094] To address the technical problems existing in the prior art, the inventors of this application propose the following approach: The user information of the user to be predicted is preprocessed, and then the processed user information is input into a pre-trained personal credit default prediction model to obtain the risk prediction result corresponding to the user. Specifically, to address the problem of low efficiency in processing massive amounts of data in the prior art, this application employs a genetic algorithm to preprocess the data and extract important features to prepare data for subsequent training of the Gated Recurrent Unit (GRU) model. A personal credit default identification model is constructed using a GRU neural network. To address the deficiency of existing technologies where unreasonable model parameter settings make it difficult to form a stable and accurate personal credit default identification model, this application utilizes the Whale Optimization Algorithm (WOA) to optimize the hyperparameters of the GRU model, exploring the optimal hyperparameter configuration to determine the personal credit default prediction model. This further improves the classification accuracy of the personal credit default identification model.
[0095] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0096] Figure 1 Schematic flowchart of the credit risk determination method provided in the embodiments of this application Figure 1 ,like Figure 1 As shown, the method includes:
[0097] S101. Obtain user information for at least one user to be predicted;
[0098] In this step, user information for at least one user to be predicted is obtained from the data source.
[0099] The data source can be a database, and the user information of the user to be predicted includes multiple characteristics such as the user's basic personal information, age, education level, real estate information, industry, years of work experience, marital status, annual income, debt-to-income ratio, credit-to-debt ratio, and number of historical defaults.
[0100] For example, the user information to be predicted is as follows: age 25, education level: undergraduate, no real estate information, industry: accounting, years of work experience: 1 year, marital status: single, annual income: 100,000.
[0101] S102. For each user to be predicted, preprocess the user information of the user to be predicted to obtain the processed user information corresponding to the user to be predicted.
[0102] In this step, the user information of each user to be predicted is preprocessed to obtain the processed user information corresponding to the user to be predicted. The user information data is converted into a uniform magnitude or range so that it can be input into the prediction model for the determination of credit risk.
[0103] Preprocessing is a crucial step before data analysis and model training. Its purpose is to clean, transform, and normalize the raw data to improve data quality and model performance. For credit risk prediction, preprocessing may include handling missing values, outlier detection and correction, and data standardization or normalization.
[0104] For example, the user information to be predicted is: age 25, education level: undergraduate, no property ownership, industry: accounting, years of work experience: 1 year, marital status: single, annual income: 100,000. The processed user information to be predicted can be {0.32, 0.3, 0, 0.4, 0.1, 0, 0.2}.
[0105] S103. Input the processed user information corresponding to the user to be predicted into the pre-trained credit risk prediction model for processing, and obtain the risk prediction result corresponding to the user to be predicted.
[0106] The credit risk prediction model is based on a pre-determined dataset and a whale optimization algorithm to train the GRU model. The dataset is based on the feature information of multiple users and is reconstructed through a genetic algorithm.
[0107] In this step, the preprocessed user information of the user to be predicted is passed as input data to the pre-trained credit risk prediction model. The model calculates and outputs the credit risk prediction result based on the input data.
[0108] The credit risk prediction result can be 1 (indicating that the user has credit risk) or 0 (indicating that the user does not have credit risk).
[0109] For example, the processed user information of the user to be predicted is {0.32, 0.3, 0, 0.4, 0.1, 0, 0.2}, and the output credit risk prediction result is 0, indicating that the user to be predicted does not have credit risk.
[0110] The credit risk determination method provided in this application first obtains user information of at least one user to be predicted. For each user to be predicted, the user information is preprocessed to obtain processed user information. Finally, the processed user information is input into a pre-trained credit risk prediction model for further processing to obtain the risk prediction result for the user. This scheme inputs user information into the credit risk prediction model to obtain the risk prediction result. The credit risk prediction model uses a genetic algorithm to reconstruct information features to obtain an optimal feature set, and then inputs the dataset corresponding to the optimal feature set into a GRU model for training. Simultaneously, a whale optimization algorithm is used to explore the optimal hyperparameters of the model, improving prediction accuracy and achieving a stable and efficient technical effect for determining credit risk.
[0111] Based on the above embodiments, Figure 2 Schematic flowchart of the credit risk determination method provided in the embodiments of this application Figure 2 ,like Figure 2 As shown, the methods for determining this credit risk include:
[0112] S201. Use a genetic algorithm and a GRU model to reconstruct the features of the original dataset to obtain the dataset;
[0113] In this step, the original dataset is reconstructed using a genetic algorithm and a GRU model. The resulting dataset is the combination of the most valuable features that the algorithm automatically searches for and reconstructs, enabling the prediction model to learn the patterns of feature data information in the dataset more efficiently.
[0114] Optionally, step S201 can also be implemented as follows:
[0115] The parameters of the genetic algorithm are initialized to obtain the initialization parameters.
[0116] The initialization parameters include population size, number of first iterations, selection probability, crossover probability, and mutation probability.
[0117] In this implementation, the population size determines the number of candidate solutions in each generation. A population that is too small may result in an insufficient search space, making it easy to get trapped in local optima, while a population that is too large will increase computational complexity. The population size is generally between 50 and 200, with the specific value adjusted based on the complexity of the problem and computational resources. The first iteration count refers to the number of iterations performed by the genetic algorithm. To a certain extent, the number of iterations affects the algorithm's search time and convergence ability, generally ranging from 100 to 1000. The selection probability controls the likelihood of an individual being selected. Individuals with higher fitness should have a higher selection probability; roulette wheel selection or tournament selection methods are generally used, and the selection probability is usually proportional to the fitness. The crossover probability determines the probability that two individuals will cross and produce offspring. If the crossover probability is too low, population diversity decreases, making it easy to get trapped in local optima; if it is too high, it may lead to a decrease in solution diversity, preventing sufficient exploration of the search space. The crossover probability is generally between 0.6 and 0.9. The mutation probability determines the likelihood of changes in an individual's genes. Mutation operations can help the algorithm escape local optima. If the mutation probability is too low, the search range may be too narrow, and the algorithm may not be able to explore sufficiently. If the mutation probability is too high, the search process may become too random and fail to converge stably. The general value range is between 0.01 and 0.1.
[0118] It should be noted that the values of the above parameters are merely illustrative examples and can be adapted to the actual application scenario. This application does not impose any specific limitations on the embodiments.
[0119] For example, the population size is 100, the first iteration number is 40, the crossover probability is 0.8, and the mutation probability is 0.05.
[0120] Based on the initialization parameters, multiple chromosomes in the population are randomly generated.
[0121] In this implementation, after setting the initialization parameters of the genetic algorithm, multiple chromosomes are generated according to the population size, and the gene values of each chromosome are randomly generated.
[0122] The gene value can only be 0 or 1. A gene value of 0 indicates that the feature corresponding to the current position has not been selected, while a gene value of 1 indicates that the feature corresponding to the current position has been selected.
[0123] Construct a feature set corresponding to each chromosome based on each chromosome;
[0124] In this implementation, a feature set consisting of the selected features corresponding to each chromosome is constructed based on the encoding of each chromosome.
[0125] The feature sets corresponding to different chromosomes include 70% training feature sets and 30% test feature sets. In this embodiment, the feature sets refer to the training feature sets.
[0126] It should be noted that the above-mentioned ratio of training feature set to test feature set is merely an example and can be flexibly adjusted. This application does not impose any specific limitations on the embodiments.
[0127] For example, if the chromosome code is 010000, it means that the second feature corresponding to the chromosome code is selected, and the final feature set is composed of the second feature in the original dataset.
[0128] Each feature set is input into the GRU model, and the accuracy corresponding to each feature set is calculated.
[0129] In this implementation, the feature set corresponding to each chromosome is used as input data and fed into the GRU model for training, and the accuracy corresponding to each feature set is calculated.
[0130] Based on the accuracy, first iteration number, selection probability, crossover probability, and mutation probability corresponding to each feature set, each chromosome is updated until the algorithm iteration termination condition is met;
[0131] In this implementation, each chromosome is updated using selection, crossover, and mutation operations based on the accuracy (i.e., fitness) of each feature set, the number of the first iteration, and the initialization parameters. The algorithm iterates until the iteration termination condition is met.
[0132] The selection operation uses roulette wheel selection, tournament selection, or other selection strategies based on the fitness (accuracy) of each chromosome to select the parent chromosome. The crossover operation selects two chromosomes for crossover to generate new offspring. Common crossover methods include single-point crossover, multi-point crossover, and uniform crossover. The mutation operation randomly mutates chromosomes with a certain mutation probability (e.g., changing a gene from 0 to 1 or from 1 to 0) to increase population diversity and prevent premature convergence. The algorithm's iteration termination condition can be reaching a preset first iteration number or reaching a target fitness level.
[0133] In one possible implementation, parent chromosome 1 is 11001, parent chromosome 2 is 01110, and the crossover point after the crossover operation is at position 3. Then, the new chromosome 1 generated after the crossover operation is 11110, and chromosome 1 is 01001.
[0134] In one possible implementation, the parent chromosome is 11001. If a certain bit is mutated, such as the 4th bit, the chromosome becomes 11011 after the mutation operation.
[0135] The feature set corresponding to the chromosome with the highest accuracy is determined as the optimal feature set;
[0136] In this implementation, after multiple rounds of chromosome selection, crossover, and mutation operations, a chromosome with the highest accuracy is finally obtained. The feature set corresponding to this chromosome is considered the optimal feature set.
[0137] The dataset is determined based on the pre-defined original dataset and the optimal feature set.
[0138] In this implementation, based on the optimal feature set, corresponding data is extracted from the original dataset as the final dataset for further model training or analysis.
[0139] The original dataset is a dataset determined based on a set of user feature information.
[0140] In one possible implementation, the dataset can be
[0141] The above implementation employs a genetic algorithm to optimize feature selection. In each generation of chromosomes, selection, crossover, and mutation operations progressively improve the accuracy of the chromosomes, ultimately determining the optimal feature set. This achieves the technical effect of effectively searching the feature space and finding the dataset corresponding to the feature set that best improves model performance.
[0142] In one possible implementation, Figure 3 The flowchart of the genetic algorithm for reconstructing features provided in the embodiments of this application, combined with Figure 3 A detailed introduction to the feature reconstruction process using genetic algorithms:
[0143] Step 301, Begin.
[0144] Step 302: Parameter initialization.
[0145] In this step, the parameters of the genetic algorithm are initialized.
[0146] Step 303: Population initialization.
[0147] In this step, the population is initialized according to the initialization parameters. The population size is 100, and 100 chromosomes are randomly generated.
[0148] Step 304: Calculate fitness.
[0149] In this step, the fitness of each chromosome is calculated.
[0150] Step 305: The termination condition is met.
[0151] In this step, if the algorithm termination condition is met (reaching the preset maximum number of iterations or reaching the target fitness), then step 309 is executed; otherwise, step 306 is executed.
[0152] Step 306: Select an operation.
[0153] In this step, a selection operation is performed on each chromosome, and the chromosome with higher fitness is selected as the parent chromosome.
[0154] Step 307: Cross operation.
[0155] In this step, a crossover operation is performed on the selected parent chromosomes to obtain the crossover chromosomes.
[0156] Step 308, mutation operation.
[0157] In this step, a mutation operation is performed on the chromosome after the crossover operation to obtain an updated chromosome, and then step 304 is executed.
[0158] Step 309, End.
[0159] S202. Based on the dataset, the GRU model is trained using the whale optimization algorithm to obtain a credit risk prediction model.
[0160] In this step, based on the dataset corresponding to the optimal feature set, the GRU model is trained using the whale optimization algorithm to optimize the hyperparameters of the GRU model. Using the optimized hyperparameter configuration, the dataset is input into the GRU model for training, and finally, a credit risk prediction model is obtained.
[0161] Following this step, a test feature set can be used to evaluate the predictive performance of the credit risk prediction model. The parameters evaluated are accuracy, precision, recall, and F1 score, with the following formulas:
[0162]
[0163]
[0164]
[0165]
[0166] In this context, TP represents a positive sample where the actual value is also a positive sample; FN represents a positive sample where the actual value is also a positive sample; FP represents a negative sample where the actual value is also a negative sample and the prediction result is also a positive sample; and TN represents a negative sample where the actual value is also a negative sample and the prediction result is also a negative sample.
[0167] In one possible implementation, Table 1 compares the performance of the credit risk prediction model provided in this application embodiment with that of a traditional prediction model. As shown in Table 1:
[0168] Table 1
[0169]
[0170]
[0171] As can be seen from Table 1, the prediction model used in this application embodiment has better performance than other algorithm models in the table in terms of precision, accuracy, recall, and F1 score. Therefore, the prediction model used in this application embodiment has better performance than traditional prediction models.
[0172] In one possible implementation, Figure 4 This is a schematic diagram of the structure of the GRU unit provided in the embodiments of this application, combined with... Figure 4 A detailed description of the GRU structure is provided below:
[0173] Each GRU unit accepts the current input x. t and the hidden state h from the previous moment t-1 Then, two gating mechanisms (reset gate and update gate) are used to control the flow of information. GRU avoids long-term dependency problems and gradient vanishing problems through these gating mechanisms. The following explains in detail how each formula and gating mechanism works:
[0174] 1. The reset gate is mainly used to control the input data x at the current moment. t and the hidden state h from the previous moment t-1 The reset gate calculates the degree of information dependency between states, outputting a value between 0 and 1, indicating how much information from the previous time step should be retained. It determines how the current input is combined with the hidden state from the previous time step. The reset gate calculation formula is as follows:
[0175] R t =σ(W r ×[h t-1 ,x t ])
[0176] In the formula, R t The output of the reset gate is σ, which is the sigmoid activation function, and W is the output of the reset gate. r It is a parameter matrix, [h t-1 ,x t This indicates that the hidden state from the previous moment is concatenated with the current input.
[0177] 2. The update gate is mainly used to determine whether the current hidden state should be updated by a weighted average of the previous hidden state and the current candidate hidden state. The output of the update gate determines how much information comes from the previous hidden state (h). t-1The update gate's output is also a value between 0 and 1, controlling how much of the previous hidden state is retained. The higher the retention rate, the closer the update gate's value is to 1. The update gate's calculation formula is as follows:
[0178] z t =σ(W z ×[h t-1 ,x t ])
[0179] In the formula, Z t It is the output of the update gate, σ is the sigmoid activation function, and W is the output of the update gate. z It is a parameter matrix.
[0180] 3. The candidate hidden state is obtained by weighting the input at the current time step and the hidden state at the previous time step, after being controlled by the reset gate. The formula for calculating the candidate hidden state is as follows:
[0181]
[0182] In the formula, tanh is the tanh activation function. This indicates element-wise multiplication.
[0183] 4. Final hidden state (i.e., the hidden state h of the current feature) t The hidden state is calculated by updating the gate pair and taking a weighted average of the previous hidden state and the candidate hidden states. The final hidden state is calculated using the following formula:
[0184]
[0185] In the formula, (1-Z t Z controls the degree to which the hidden state from the previous time step is retained. t Control the degree to which candidate hidden states are retained at the current moment. Figure 3 The parameters and symbols in the formula correspond one-to-one with those in the formula, where Figure 3 The ⊕ sign in the formula represents the addition of the hidden state at the previous time step and the candidate hidden state at the current time step.
[0186] By using a genetic algorithm to determine the feature set corresponding to the chromosome with the highest accuracy as the optimal feature set, the final dataset is determined. This method can automatically select the features that have the greatest impact on model performance from a large number of features to form the dataset, so that subsequent prediction model training can better utilize the features in the dataset.
[0187] Optionally, step 202 can also be implemented as follows:
[0188] Initialize the parameters of the whale optimization algorithm.
[0189] The parameters of the whale algorithm include the number of second iterations, the number of whales, the learning rate, and the range of hyperparameters.
[0190] In this implementation, the initialization parameters of the whale optimization algorithm are set.
[0191] Here, the second iteration number represents the maximum number of iterations the algorithm can perform. In each iteration, the whale pod updates its position until the algorithm's iteration termination condition is met. The number of whales is the total number of whales in the pod. Each whale represents a solution, i.e., a combination of hyperparameters in the GRU model. The learning rate controls the step size for updating whale positions, typically decreasing gradually with increasing iteration count to ensure a progressively narrowing search range. The hyperparameter range is the range of hyperparameters of the GRU model to be optimized.
[0192] The locations of whale pods are randomly generated, and each whale location in the pod corresponds to a set of hyperparameters for a GRU model.
[0193] In this implementation, the whale positions of the whale pod are randomly generated based on the initialization parameters of the whale optimization algorithm, and each whale position corresponds to a set of hyperparameters of the GRU model. Each hyperparameter is randomly generated within its predefined range.
[0194] The hyperparameters can be the number of hidden layers and the number of hidden layer nodes.
[0195] The dataset is input into the GRU model, and the fitness of each whale position is calculated based on each whale position in the whale pod.
[0196] In this implementation, the dataset is input into the GRU model. Each sample in the dataset contains input features (such as a feature matrix). These features are processed by the GRU model. The GRU model is trained at each whale location, and fitness is calculated for each whale location.
[0197] Fitness is typically measured using performance metrics such as accuracy, F1 score, and AUC.
[0198] Based on the fitness and second iteration number corresponding to each whale position, the position is iteratively updated until the algorithm iteration termination condition is met.
[0199] In this implementation, the positions of all whales are updated iteratively based on the fitness corresponding to each whale position and the number of the second iteration. Then, the hyperparameter configuration corresponding to the current whale position is used to train the GRU model and calculate the fitness of the new position, so that individuals with higher fitness gradually approach the optimal solution until the algorithm iteration termination condition is met.
[0200] The algorithm iteration termination condition can be reaching a preset second iteration number or reaching the target fitness, etc.
[0201] In one possible implementation, the second iteration number is 100.
[0202] In one possible implementation, the target fitness is 0.97.
[0203] The hyperparameter corresponding to the position of the whale with the highest fitness is determined as the target hyperparameter.
[0204] Under this implementation, the hyperparameter combination corresponding to the whale position with the highest fitness has the best performance in GRU model training, and the hyperparameter corresponding to the whale position with the highest fitness is determined as the target hyperparameter.
[0205] By configuring the target hyperparameters in the GRU model, a credit risk prediction model is obtained.
[0206] In this implementation, the target hyperparameters are configured in the GRU model to obtain a credit risk prediction model, ensuring that the prediction model can obtain the optimal prediction results in practical applications.
[0207] Among them, the credit risk prediction model is also the GRU model configured with target hyperparameters.
[0208] By using the whale optimization algorithm to train the GRU model, the optimal hyperparameters are obtained, thus obtaining a credit risk prediction model, achieving the technical effect of improving the performance and accuracy of the credit risk prediction model.
[0209] In one possible implementation, Figure 5 This is a flowchart illustrating the training of the GRU model using the whale optimization algorithm provided in this application embodiment, combined with... Figure 5 The training process will be described in detail below:
[0210] Step 501, Begin.
[0211] Step 502: Parameter initialization.
[0212] In this step, the parameters in the whale optimization algorithm are initialized.
[0213] Step 503: Initialize the whale population.
[0214] In this step, the whale population is initialized, which means randomly generating the position of each whale in the whale population.
[0215] Step 504: Calculate fitness.
[0216] In this step, the GRU model is trained at each whale location, and the fitness corresponding to each whale location is calculated.
[0217] Step 505: Update the positions of all whales in the whale pod.
[0218] Step 506: Update the fitness of the whale pod.
[0219] Step 507: The termination condition is met.
[0220] In this step, if the termination condition is met (i.e., the preset second iteration number is reached or the target fitness is reached), then step 508 is executed; otherwise, step 505 is executed.
[0221] Step 508: Output the optimal solution.
[0222] In this step, the optimal solution is output (that is, the hyperparameters corresponding to the position of the whale with the highest fitness).
[0223] Step 509, End.
[0224] The credit risk determination method provided in this embodiment first uses a genetic algorithm and a GRU model to reconstruct features from the original dataset, obtaining a new dataset. Then, based on this dataset, the GRU model is trained using a whale optimization algorithm to obtain a credit risk prediction model. This technical solution utilizes a genetic algorithm to obtain the dataset corresponding to the optimal feature set, ensuring the quality of the model's input data. The dataset is then input into the GRU model for training, while the whale optimization algorithm is used to obtain the optimal hyperparameters, effectively avoiding the uncertainties caused by manual parameter tuning and ensuring high performance of the model in practical applications. Finally, the optimal hyperparameters are configured into the GRU model to obtain the credit risk prediction model, achieving the technical effect of effectively improving the accuracy and reliability of the credit risk prediction model.
[0225] Based on the above embodiments, Figure 6 Schematic flowchart of the credit risk determination method provided in the embodiments of this application Figure 3 ,like Figure 6 As shown, the methods for determining this credit risk include:
[0226] S601. Preprocess the pre-acquired set of user feature information to obtain a processed set of user feature information, which includes feature information of multiple users.
[0227] In this step, the pre-acquired user feature information set is comprehensively preprocessed to ensure the quality and consistency of the information data. The processed user feature information set includes various feature information of multiple users, providing high-quality data support for subsequent analysis or model training.
[0228] In one possible implementation, Table 2 is a set of user feature information from an embodiment of this application, as shown in Table 2:
[0229] Table 2
[0230] age Education level Years of service Marital status Annual income (in ten thousand) 30 high school Married 20 42 Undergraduate 18 Married 40 24 Undergraduate 1 unmarried 6
[0231] In one possible implementation, Table 3 is a set of preprocessed user feature information from an embodiment of this application, as shown in Table 3:
[0232] Table 3
[0233] age Education level Years of service Marital status Annual income (in ten thousand) 0.3 0.2 0.2 0.2 0.02 0.42 0.3 0.18 0.2 0.04 0.24 0.3 0.1 0.1 0.006
[0234] Optionally, step S301 can be implemented as follows:
[0235] The user feature information set is feature-encoded to obtain the encoded user feature information set.
[0236] In this implementation, an appropriate encoding method is selected based on the type characteristics of the user feature information, and then feature encoding is performed. The encoded data set is then updated to a new set of user feature information (i.e., the encoded user feature information set).
[0237] The encoded user feature information set is processed to remove missing values, resulting in a user feature information set with missing values removed.
[0238] In this implementation, missing values in the encoded user feature information set are processed. If the proportion of missing values is small, deletion can be used. If there are many missing values and deletion is not possible, imputation can be used to complete the set, ensuring that the processed user feature information no longer contains missing values. Reasonable handling of missing values can improve the stability and accuracy of subsequent prediction models.
[0239] If all features for some users are missing, consider using the deletion method to remove those rows. If most of the data for a feature is missing and cannot be recovered, the deletion method can be used to remove that column. For numerical features, missing values can be filled with the mean or median of all users for that feature. For categorical features, the mode (the most frequent value) of all users for that feature can be used to fill in missing values. For time series data, missing values can be filled with valid values from the previous or next user's data. For numerical data, linear interpolation or other methods can be used for completion.
[0240] In one possible implementation, missing values are filled with the median of all user data.
[0241] The user feature information set after handling missing values is normalized to obtain the normalized user feature information set.
[0242] In this implementation, features that need to be normalized are identified in the user feature information set after missing value processing. An appropriate normalization method is selected according to the data distribution to normalize the user feature information set, ensuring that the values of all features can be processed to a uniform scale.
[0243] Normalization refers to transforming numerical features to a uniform scale, eliminating the influence of different dimensions between feature variables. Normalization methods include min-max normalization, Z-score standardization, or Robust Scaling.
[0244] In one possible implementation, min-max normalization is used to process the user feature information set. The min-max normalization formula is as follows:
[0245]
[0246] Where max(d) and min(d) represent the maximum and minimum eigenvalues of user d, respectively. i Let y represent the i-th feature. i It is the result after normalization.
[0247] The user feature information set is processed through three steps: feature encoding, missing value handling, and normalization. This process gradually improves the quality of the user feature information set, making the data more suitable for subsequent model training. Each step lays the foundation for ensuring the consistency, completeness, and usability of the final dataset, thereby improving the model's training performance and prediction accuracy.
[0248] Optionally, step S301 can also be implemented as follows:
[0249] For the numerical feature information in the initial user feature information set, floating-point encoding is performed;
[0250] In this implementation, if the numeric type in the initial user feature information set (i.e., the pre-acquired user feature information set) is integer, it can be converted to floating-point number through a simple type conversion. Floating-point data can provide higher accuracy during the model training process.
[0251] In one possible implementation, the age feature set in the initial user feature information set is {25,30,28,22}, and the age feature set after floating-point encoding can be {25.0,30.0,28.0,22.0}.
[0252] For non-numeric feature information in the initial user feature information set, integer encoding is performed.
[0253] In this implementation, each data point in the non-numeric feature information of the initial user feature information set is mapped to an integer value (e.g., mapping "male" to 0 and "female" to 1 for the "gender" variable), and all non-numeric feature information is encoded in a similar manner.
[0254] In one possible implementation, the set of occupational features in the initial set of user feature information is {engineer, designer, teacher, programmer}, and the set of occupational features after integer encoding can be {2,3,1,0}.
[0255] By using floating-point encoding and integer encoding, the technical effect of ensuring that the data format meets the requirements of model training is achieved, thereby improving the efficiency and performance of model training.
[0256] S602. Construct the original dataset based on the processed user feature information set.
[0257] In this step, the original dataset is constructed based on the set of user feature information after feature encoding, missing value handling, and normalization.
[0258] In one possible implementation, the original dataset constructed from the processed user feature information set in Table 3 is as follows:
[0259]
[0260] The credit risk determination method provided in this embodiment first preprocesses a pre-acquired set of user feature information to obtain a processed set of user feature information, which includes feature information of multiple users. Then, an original dataset is constructed based on the processed set of user feature information. This approach optimizes data quality and consistency by preprocessing the pre-acquired user feature information set before constructing the original dataset, thereby providing high-quality input data and a more reliable original dataset for subsequent model training.
[0261] In one possible implementation, Figure 7 Schematic flowchart of the credit risk determination method provided in the embodiments of this application Figure 4 , combined Figure 7 The methodology and process for determining credit risk are described in detail below:
[0262] Step 701: Collect user characteristic information.
[0263] Step 702, Feature Encoding.
[0264] In this step, the collected user feature information is encoded.
[0265] Step 703: Handling missing values.
[0266] In this step, missing values are processed for the user feature information after feature encoding.
[0267] Step 704: Data normalization.
[0268] In this step, the user feature information after handling missing values is normalized. Then, the original dataset is constructed based on the processed user feature information.
[0269] Step 705: Reconstruct features using a genetic algorithm.
[0270] In this step, a genetic algorithm is used to obtain the optimal feature set, and then the target dataset is determined based on the features in the optimal feature set combined with the original dataset.
[0271] Step 706: Construct the GRU personal credit risk prediction model.
[0272] Step 707: Optimize the GRU model using the WOA algorithm.
[0273] In this step, the target dataset is input into the GRU model for training. At the same time, the optimal hyperparameters of the GRU model are obtained by combining the WOA algorithm. The optimal hyperparameters are then configured into the GRU model to obtain the optimized GRU model (i.e., the credit risk prediction model).
[0274] Step 708: Input the user information to be tested into the optimized GRU model.
[0275] In this step, the user information to be tested is processed by feature encoding, missing value handling, and data normalization, and then input into the optimized GRU model for personal credit risk prediction.
[0276] Step 709: Output the prediction results.
[0277] Based on the above embodiments, Figure 8 A schematic diagram of the structure of the credit risk determination device provided in the embodiments of this application is shown below. Figure 8 As shown, the credit risk determination device includes:
[0278] The acquisition module 801 is used to acquire user information of at least one user to be predicted.
[0279] The processing module 802 is used to preprocess the user information of each user to be predicted, so as to obtain the processed user information corresponding to the user to be predicted.
[0280] The determination module 803 is used to input the processed user information corresponding to the user to be predicted into the pre-trained credit risk prediction model for processing, and to obtain the risk prediction result corresponding to the user to be predicted. The credit risk prediction model is obtained by training the GRU model based on a pre-determined dataset and the whale optimization algorithm. The dataset is obtained by reconstructing the feature information based on the feature information of multiple users through a genetic algorithm.
[0281] In one possible implementation, the processing module 802 is further configured to:
[0282] The original dataset was reconstructed using a genetic algorithm and a GRU model to obtain the final dataset.
[0283] Based on the dataset, the GRU model was trained using the whale optimization algorithm to obtain a credit risk prediction model.
[0284] In one possible implementation, the processing module 802 uses a genetic algorithm and a GRU model to reconstruct features from the original dataset to obtain a dataset, specifically used for:
[0285] The parameters of the genetic algorithm are initialized to obtain the initialization parameters, which include the population size, the number of first iterations, the selection probability, the crossover probability, and the mutation probability.
[0286] Based on the initialization parameters, multiple chromosomes in the population are randomly generated.
[0287] Construct a feature set corresponding to each chromosome based on each chromosome;
[0288] Each feature set is input into the GRU model, and the accuracy corresponding to each feature set is calculated.
[0289] Based on the accuracy, first iteration number, selection probability, crossover probability, and mutation probability corresponding to each feature set, each chromosome is updated until the algorithm iteration termination condition is met;
[0290] The feature set corresponding to the chromosome with the highest accuracy is determined as the optimal feature set;
[0291] The dataset is determined based on the pre-defined original dataset and the optimal feature set.
[0292] In one possible implementation, based on the dataset, the GRU model is trained using the whale optimization algorithm to obtain a credit risk prediction model. The processing module 802 is specifically used for:
[0293] Initialize the parameters of the whale optimization algorithm, which include the second iteration number, the number of whales, the learning rate, and the hyperparameter range.
[0294] The locations of whale pods are randomly generated, and each whale location in the pod corresponds to a set of hyperparameters for a GRU model.
[0295] The dataset is input into the GRU model, and the fitness of each whale position is calculated based on each whale position in the whale pod.
[0296] Based on the fitness and second iteration number corresponding to each whale position, the position is iteratively updated until the algorithm iteration termination condition is met.
[0297] The hyperparameter corresponding to the position of the whale with the highest fitness is determined as the target hyperparameter.
[0298] By configuring the target hyperparameters in the GRU model, a credit risk prediction model is obtained.
[0299] In one possible implementation, the processing module 802 is further configured to:
[0300] The pre-acquired set of user feature information is preprocessed to obtain a processed set of user feature information, which includes feature information of multiple users.
[0301] The original dataset is constructed based on the processed set of user feature information.
[0302] In one possible implementation, the processing module 802 preprocesses the pre-acquired user feature information set to obtain a processed user feature information set, specifically for:
[0303] The user feature information set is feature-encoded to obtain the encoded user feature information set.
[0304] The encoded user feature information set is processed to remove missing values, resulting in a user feature information set with missing values removed.
[0305] The user feature information set after handling missing values is normalized to obtain the normalized user feature information set.
[0306] In one possible implementation, the processing module 802 performs feature encoding on the initial user feature information set, specifically for:
[0307] For the numerical feature information in the initial user feature information set, floating-point encoding is performed;
[0308] For non-numeric feature information in the initial user feature information set, integer encoding is performed.
[0309] Based on the above embodiments, Figure 9 This is a schematic diagram of the device provided in an embodiment of this application. Figure 9As shown, the device 90 provided in this embodiment includes at least one processor 901 and a memory 902. Optionally, the device 90 further includes a communication component 903. The processor 901, memory 902, and communication component 903 are connected via a bus 904.
[0310] In a specific implementation, at least one processor 901 executes computer execution instructions stored in memory 902, causing at least one processor 901 to perform the above-described method.
[0311] The specific implementation process of processor 901 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0312] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0313] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0314] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0315] This application also provides a computer program product comprising a computer program stored in a computer-readable storage medium, wherein at least one processor can read the computer program from the computer-readable storage medium, and the at least one processor can implement the above-described method when executing the computer program.
[0316] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0317] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0318] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0319] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0320] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0321] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0322] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0323] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0324] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and the at least one processor can implement the above-described method when executing the computer program.
[0325] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0326] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0327] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for determining credit risk, characterized in that, include: Obtain user information for at least one user to be predicted; For each user to be predicted, the user information of the user to be predicted is preprocessed to obtain the processed user information corresponding to the user to be predicted. The processed user information corresponding to the user to be predicted is input into a pre-trained credit risk prediction model for processing to obtain the risk prediction result corresponding to the user to be predicted. The credit risk prediction model is obtained by training a gated recurrent unit (GRU) model based on a predetermined dataset and a whale optimization algorithm. The dataset is obtained by reconstructing the feature information based on the feature information of multiple users through a genetic algorithm.
2. The method according to claim 1, characterized in that, The method further includes: The original dataset is reconstructed using the genetic algorithm and the GRU model to obtain the dataset. Based on the dataset, the GRU model is trained using the whale optimization algorithm to obtain the credit risk prediction model.
3. The method according to claim 2, characterized in that, The dataset is obtained by reconstructing features from the original dataset using the genetic algorithm and the GRU model, including: The parameters of the genetic algorithm are initialized to obtain initialization parameters, which include population size, number of first iterations, selection probability, crossover probability, and mutation probability. Based on the initialization parameters, multiple chromosomes in the population are randomly generated; Construct a feature set corresponding to each chromosome based on each chromosome; Each feature set is input into the GRU model, and the accuracy corresponding to each feature set is calculated. Based on the accuracy corresponding to each feature set, the first iteration number, the selection probability, the crossover probability, and the mutation probability, each chromosome is updated until the algorithm iteration termination condition is met; The feature set corresponding to the chromosome with the highest accuracy is determined as the optimal feature set; The dataset is determined based on the pre-determined original dataset and the optimal feature set.
4. The method according to claim 2, characterized in that, Based on the dataset, the GRU model is trained using the whale optimization algorithm to obtain the credit risk prediction model, including: Initialize the parameters of the whale optimization algorithm, which include the second iteration number, the number of whales, the learning rate, and the hyperparameter range; The locations of whale pods are randomly generated, and each whale location in the whale pod corresponds to a set of hyperparameters of the GRU model; The dataset is input into the GRU model, and the fitness of each whale position is calculated based on each whale position in the whale pod. Based on the fitness of each whale's location and the second iteration number, the location is iteratively updated until the algorithm's iteration termination condition is met; The hyperparameter corresponding to the position of the whale with the highest fitness is determined as the target hyperparameter. The target hyperparameters are configured in the GRU model to obtain the credit risk prediction model.
5. The method according to claim 2, characterized in that, The method further includes: The pre-acquired set of user feature information is preprocessed to obtain a processed set of user feature information, which includes feature information of multiple users. The original dataset is constructed based on the processed set of user feature information.
6. The method according to claim 5, characterized in that, The preprocessing of the pre-acquired user feature information set to obtain the processed user feature information set includes: The user feature information set is subjected to feature encoding to obtain the encoded user feature information set; The encoded user feature information set is processed for missing values to obtain a user feature information set with missing values processed. The user feature information set after the missing values are processed is normalized to obtain the normalized user feature information set.
7. The method according to claim 6, characterized in that, The feature encoding of the initial user feature information set includes: For the numerical feature information in the initial user feature information set, floating-point encoding is performed; For the non-numeric feature information in the initial user feature information set, integer encoding is performed.
8. A credit risk determination device, comprising: The acquisition module is used to acquire user information for at least one user to be predicted. The processing module is used to preprocess the user information of each user to be predicted, so as to obtain the processed user information corresponding to the user to be predicted. The determination module is used to input the processed user information corresponding to the user to be predicted into a pre-trained credit risk prediction model for processing, so as to obtain the risk prediction result corresponding to the user to be predicted. The credit risk prediction model is obtained by training the GRU model based on a pre-determined dataset and the whale optimization algorithm. The dataset is obtained by reconstructing the feature information based on the feature information of multiple users through a genetic algorithm.
9. A device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 7.
11. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.