A Real-time Monitoring and Early Warning System for Rural Financial Risks
By optimizing the hyperparameters of XGBoost and LSTM models and combining price and yield to assess farmers' repayment ability, the problem of lagging risk identification in existing technologies has been solved, enabling real-time monitoring and early warning of rural financial risks and reducing farmers' default risk.
Patent Information
- Application Number
- CN202511141032.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-08-15
AI Technical Summary
Existing technologies cannot effectively combine price and yield to assess farmers' repayment ability, resulting in delayed risk identification and failure to promptly alert farmers and managers, which may lead to farmers defaulting and economic losses.
By evaluating the scoring statistics unit, predictive model analysis unit, initial individual screening unit, hyperparameter optimization unit, and risk identification unit, the hyperparameters of the XGBoost model and LSTM model are optimized. Historical price information and yield data are used to assess farmers' repayment ability and identify risk levels in real time.
It has improved the accuracy and speed of rural financial risk monitoring, enabling timely identification of repayment risks, reducing farmer defaults, and ensuring rural financial stability.
Smart Images

Figure CN120634716B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of risk warning technology, specifically a real-time monitoring and early warning system for rural financial risks. Background Technology
[0002] A real-time monitoring and early warning system for rural financial risks is disclosed in patent application number 202311463818.2. This system integrates agricultural product evaluation, price, and yield data to accurately assess farmers' repayment ability, provide real-time risk warnings, and assist management personnel in timely intervention to ensure rural financial stability. The system includes an agricultural credit platform and an external access front-end module connected to a rural land information system and a loan information system. The agricultural credit platform comprises a management module and a back-end module, with the management module connected to the front-end module via the back-end module. The management module includes a system public management module, a loan parameter management module, a loan management module, a report management module, a monitoring management module, and a log management module. The system public management module is used for querying and maintaining public information; the loan parameter management module is used for managing loan product elements; and the loan management module is used for maintaining loan evaluation models, managing land mortgages, managing land mortgage releases, and managing loan repayments. This invention provides efficient and convenient rural financial services.
[0003] The aforementioned existing technologies have solved problems such as the inability to update some archived credit information data in a timely manner due to the lack of information and data on farmers and rural credit. However, during system operation, the impact of online evaluations on agricultural product prices cannot be quantified through evaluation scores. Furthermore, the evaluation data has low reference value and may mislead price judgments because the differences in credibility among different platforms are not considered. At the same time, the model hyperparameters are not optimized, resulting in poor accuracy of the price prediction model. Moreover, the lack of a risk identification mechanism makes it impossible to assess farmers' repayment ability by combining price and yield, making it difficult to detect repayment risks in advance. This means that farmers cannot be reminded in a timely manner, and managers cannot intervene in advance, which may lead to problems such as farmers defaulting and economic losses. Risk response is delayed and passive. Summary of the Invention
[0004] The purpose of this invention is to provide a real-time monitoring and early warning system for rural financial risks, so as to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a real-time monitoring and early warning system for rural financial risks, comprising an evaluation score statistics unit, a prediction model analysis unit, an initial individual screening unit, a hyperparameter optimization unit, a hyperparameter determination unit, and a risk identification unit;
[0006] The initial individual selection unit, after statistically analyzing all the hyperparameters to be optimized in the XGBoost and LSTM models, determines the constraint range of each hyperparameter to be optimized and sets the number of individuals. Based on the constraint range and the number of individuals, it constructs an individual sequence, determines the accuracy of different individuals, filters and deletes individuals according to their accuracy, calculates the corresponding derived individuals using the remaining individuals, and reconstructs a new individual sequence. After statistically analyzing the accuracy of individuals generated by the three different methods, it selects the final initial individuals according to their accuracy.
[0007] The hyperparameter optimization unit, after statistically analyzing the stage factors and transformation coefficients, uses the hyperparameters of the initial individual to calculate the updated individual with and without the addition of the mutation factor, calculates the accuracy of the original individual and the updated individual, and replaces the hyperparameters of the original individual with the hyperparameters of the individual with the higher accuracy.
[0008] The risk identification unit uses XGBoost and LSTM models to analyze historical price information, obtains the daily predicted price of a specified crop within the prediction period, calculates the farmer's daily repayment ability based on the predicted price, and determines the risk level using a preset repayment amount and repayment ability.
[0009] Preferably, the evaluation score statistics unit includes an evaluation data acquisition module, a word segmentation feature extraction module, a tag information determination module, a weight setting module, a comprehensive score calculation module, and an actual score output module. The evaluation data acquisition module uses a web crawler to obtain evaluation data for a specified crop. The evaluation data includes text content, page views, time, and data source platform. Corresponding tag information is added to each comment, with tags categorized into positive and negative evaluations. The word segmentation feature extraction module constructs multiple samples using the evaluation data, extracts the word segmentation features of each sample, and then transmits the word segmentation features and tag information of the samples to a Naive Bayes classification model to determine the model parameters and accuracy. The label information determination module acquires all evaluation data for a specified crop within the same day, extracts the word segmentation features of each evaluation data point, and transmits them to a Naive Bayes classification model for analysis to determine the label information of that evaluation data point. The weight setting module statistically analyzes all official and unofficial data source platforms, sets a corresponding weight coefficient for each platform, and stores it in the database. It reads the source platform for each evaluation data point, queries the database based on the source platform, and if the query is successful, outputs the weight coefficient corresponding to the current platform; if the query fails, the current source platform is determined to be an unknown platform, and the default weight coefficient is used as the weight coefficient for the unknown platform. The comprehensive score calculation module determines the source platform. The number of visits to all reviews with positive review tags. And the number of visits with negative review tags. ,in Indicates platform The number of items with positive review tags Indicates platform The number of negative review tags, based on and Calculate the platform's overall score. ,in The actual score output module calculates the comprehensive score from all source platforms. and the corresponding weighting coefficients Afterwards, according to and Calculate the actual evaluation score for the specified crop. ,in , Indicates parameters, This indicates the total number of source platforms.
[0010] Preferably, the prediction model analysis unit includes a historical price acquisition module and a model generation module. The historical price acquisition module obtains historical price information from the National Agricultural Products Market Price Information Service Platform, reads the historical evaluation scores of a specified crop, performs dimensionality reduction on the historical price information and the attribute representations contained in the evaluation scores, standardizes them, constructs multiple samples using the processed attribute representations, and then categorizes them according to… The proportions are stored in the training set and the test set respectively. The model generation module transmits the sample data in the training set to the XGBoost model and the LSTM model for analysis. After the model training is completed, the accuracy of the XGBoost model and the LSTM model after joint processing is determined by the sample data in the test set. The historical price information includes the daily price, output, temperature, extreme weather impact index, per capita disposable income of residents, transportation cost, food price index, import amount, export amount and e-commerce logistics index of the target agricultural product.
[0011] Preferably, the initial individual screening unit includes a labeling module and an individual generation module. The labeling module statistically analyzes all hyperparameters to be optimized in the XGBoost and LSTM models, sets an update period, and divides the hyperparameters into two categories: high-frequency hyperparameters and low-frequency hyperparameters, labeling them accordingly. High-frequency hyperparameters are labeled as 1, and low-frequency hyperparameters are labeled as 0. The individual generation module determines the constraint range for each type of hyperparameter to be optimized, sets the number of individuals and the maximum number of iterations, and constructs an individual sequence based on the constraint range and the number of individuals. ,in This represents the number of individuals in the initial sequence. , Indicates the first Individual, Indicates the first Within each individual Hyperparameters Indicates the first Within each individual Hyperparameters This indicates the total number of hyperparameters. This represents the individual index number in the initial sequence. , Indicates the first The lower limit of the constraint range corresponding to each hyperparameter. Indicates the first The upper limit of the constraint range corresponding to the hyperparameters is defined. The hyperparameters to be optimized for the XGBoost model include the learning rate, sample sampling ratio, maximum tree depth, feature sampling ratio, and number of trees. The hyperparameters to be optimized for the LSTM model include the number of neurons, learning rate, dropout rate, and number of stacked layers. The joint hyperparameters of the XGBoost and LSTM models include the LSTM output weight ratio. The high-frequency hyperparameters include the learning rate, sample sampling ratio of the XGBoost model, the learning rate, dropout rate, and LSTM output weight ratio of the LSTM model. The low-frequency hyperparameters include the maximum tree depth, feature sampling ratio, number of trees of the XGBoost model, and the number of neurons and number of stacked layers of the LSTM model.
[0012] Preferably, the initial individual screening unit further includes a sorting and screening module and an initial individual determination module. The sorting and screening module sequentially inputs the hyperparameters corresponding to each individual into the XGBoost model and the LSTM model, uses samples from the training and test sets to determine the accuracy of different individuals, sorts the individuals according to their accuracy, calculates the mean accuracy of the current individual sequence, and deletes individuals with accuracy below the mean. The initial individual determination module obtains the current individual sequence. ,in Indicates the first Individual, This represents the index of the individual in the current sequence. This indicates the number of individuals in the current sequence. , Indicates the first Within each individual Hyperparameters Indicates the first Within each individual Hyperparameters, setting spatial coefficients ,according to and Calculate the derived individuals ,in , , Indicates the first Within the first derivative individual Hyperparameters This represents random numbers. The operation is repeated until all individuals in the current sequence have generated derivative individuals, and multiple different individuals are reconstructed according to the constraint range and the number of individuals. ,in , Indicates the first after reconstruction Within each individual Hyperparameters ,statistics , and After determining the corresponding accuracy, sort them according to the accuracy level, and then... One individual is used as the initial individual, and other individuals are deleted.
[0013] Preferably, the hyperparameter optimization unit includes an update cycle determination module, a coefficient calculation module, a coefficient combination module, and an initial update module. The update cycle determination module divides the initial individuals into two groups and stores them in a first set and a second set, respectively. It records the current loop count and determines whether the current loop count is a multiple of the update cycle. If it is not a multiple of the update cycle, it counts all initial individuals. Hyperparameters marked as 1 ,in Indicates the ordinal number; if it is a multiple of the update cycle, then all initial individuals are counted. The hyperparameters are determined by the coefficient calculation module, which calculates the stage factor and transformation coefficients based on the current loop count and the maximum loop count. If the stage factor is less than a first threshold, then the hyperparameters are used to determine the transformation coefficients. and constraint range Calculate the update hyperparameters without adding the mutation factor. Repeat the operation until all hyperparameters have been calculated, where , Represents the first individual selected randomly. The values of the hyperparameters, Indicates in The random number selected from the data. , Indicates the first The lower limit of the constraint range corresponding to each hyperparameter. Indicates the first The upper limit of the constraint range corresponding to each hyperparameter is determined by the coefficient combination module, which determines the weight coefficient corresponding to the current iteration number. After adding the mutation factor, the parameter optimization algorithm is used to combine the mutation factor, weight coefficient, and... By combining these parameters, we can obtain the update hyperparameters when adding the mutation factor. The operation is repeated until all hyperparameters have been calculated. The initial update module calculates the accuracy of the original individual, the updated individual without adding mutation factors, and the updated individual with adding mutation factors. The hyperparameters of the original individual are replaced with the hyperparameters of the individual with the higher accuracy.
[0014] Preferably, the hyperparameter determination unit includes a mean analysis module, an optimal individual selection module, a second-round update module, a parameter fusion module, and an individual output module. The mean analysis module calculates the similarity between each individual and other individuals if the stage factor is greater than or equal to a first threshold and the transformation coefficient is greater than a second threshold. Individuals with similarity greater than a preset value are selected as candidate individuals for the current individual. The accuracy of all candidate individuals is calculated, and candidate individuals with accuracy lower than the current individual are deleted. The mean of each hyperparameter is calculated using the remaining candidate individuals and the current individual, and an updated individual is constructed using the mean. The optimal individual selection module selects the individual with the highest current accuracy as the optimal individual, and then uses a parameter fine-tuning algorithm to adjust the parameters for each individual. The hyperparameters, the hyperparameters of the best individual, and the transformation coefficients are calculated to obtain the updated individual. The second-round update module compares the accuracy of the original individual with that of two different updated individuals, and replaces the hyperparameters of the original individual with the hyperparameters of the individual with higher accuracy. If the stage factor is greater than or equal to the first threshold and the transformation coefficient is less than or equal to the second threshold, the parameter fusion module determines the individual with the highest accuracy in the first set and the second set. The parameter fusion algorithm is used to calculate the hyperparameters of the individual with the highest accuracy in the first set and the second set to obtain new hyperparameters for each individual. The operation is repeated until the loop ends. The individual output module outputs the individual with the highest accuracy and its corresponding hyperparameters are used as the optimal hyperparameters and input into the XGBoost model and the LSTM model.
[0015] Preferably, the risk identification unit includes a daily price generation module, a capacity calculation module, and an early warning execution module. The daily price generation module obtains the highest and lowest daily yields of the designated crop planted by the farmer within the current forecast period, and transmits the historical price information and actual evaluation scores of the designated crop to the XGBoost model and LSTM model for analysis to obtain the daily predicted price of the designated crop within the forecast period. The capacity calculation module uses the highest daily yield, lowest daily yield, and daily predicted price to calculate the farmer's daily repayment capacity for the designated crop. The early warning execution module classifies the risk level into high risk, medium risk, and low risk, reads the farmer's preset daily repayment amount, and if the daily repayment amount is lower than or equal to the daily repayment capacity within the forecast period, the current risk level is determined to be low risk, and no early warning operation is executed. If the number of times the daily repayment amount exceeds the repayment capacity within the forecast period is greater than once but less than four, the current risk level is determined to be medium risk, and an early warning message is issued to the farmer. If the number of times the daily repayment amount exceeds the repayment capacity within the forecast period is greater than four, a manual review mechanism is initiated.
[0016] Compared with the prior art, the beneficial effects of the present invention are:
[0017] This invention obtains evaluation data for a specified crop through an evaluation score statistics unit, and calculates the actual evaluation score of the specified crop based on the number of positive and negative evaluations. This design can fully reflect the impact of online evaluations on agricultural product prices. Furthermore, the credibility of evaluations from different platforms varies, and a corresponding weight coefficient is set for each platform to make the final evaluation score more reasonable and reliable. An initial individual screening unit, a hyperparameter optimization unit, and a hyperparameter determination unit are used to optimize the hyperparameters in the XGBoost and LSTM models, ensuring that the obtained hyperparameters are optimal. Individuals are continuously updated and screened during the analysis process to avoid low-accuracy individuals occupying space for extended periods, further improving the running speed. A risk identification unit is used to obtain the price and yield of the specified crop within the prediction period to assess farmers' repayment ability. If repayment ability is insufficient for several days, farmers are promptly notified of an increased risk level. If repayment ability is severely insufficient, a direct warning is sent to higher management. Manual verification of the actual situation facilitates early intervention by management personnel. Attached Figure Description
[0018] Figure 1 A schematic diagram of the overall system flow is provided for embodiments of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Example:
[0021] Please see Figure 1 The present invention provides a technical solution: a real-time monitoring and early warning system for rural financial risks, including an evaluation score statistics unit, a prediction model analysis unit, an initial individual screening unit, a hyperparameter optimization unit, a hyperparameter determination unit, and a risk identification unit;
[0022] The initial individual selection unit statistically analyzes all hyperparameters to be optimized in the XGBoost and LSTM models, determines the constraint range of each hyperparameter, sets the number of individuals, constructs an individual sequence based on the constraint range and the number of individuals, determines the accuracy of different individuals, filters and deletes individuals according to their accuracy, calculates the corresponding derived individuals using the remaining individuals, and reconstructs a new individual sequence. After statistically analyzing the accuracy of individuals generated by the three methods, the final initial individuals are selected according to their accuracy.
[0023] The hyperparameter optimization unit calculates the stage factors and transformation coefficients using the hyperparameters of the initial individual, and then calculates the updated individuals with and without added mutation factors. The accuracy of the original individual and the updated individual is calculated, and the hyperparameters of the original individual are replaced with the hyperparameters of the individual with higher accuracy.
[0024] The risk identification unit uses XGBoost and LSTM models to analyze historical price information, obtain the daily predicted price of a specified crop within the prediction period, calculate the farmer's daily repayment ability based on the predicted price, and determine the risk level using preset repayment amount and repayment ability.
[0025] The evaluation score statistics unit includes an evaluation data acquisition module, a word segmentation feature extraction module, a tag information determination module, a weight setting module, a comprehensive score calculation module, and an actual score output module. The evaluation data acquisition module uses web crawlers to obtain evaluation data for a specified crop. This evaluation data includes text content, page views, time, and the data source platform. Corresponding tag information is added to each review, with two types: positive and negative reviews. The word segmentation feature extraction module constructs multiple samples using the evaluation data, extracts the word segmentation features of each sample, and then transmits the word segmentation features and tag information to a Naive Bayes classification model to determine the model parameters and accuracy. The information determination module acquires all evaluation data for a specified crop within the same day, extracts the word segmentation features of each evaluation data point, and then transmits them to a Naive Bayes classification model for analysis to determine the label information of that evaluation data point. The weight setting module statistically analyzes all official and non-official data source platforms, sets corresponding weight coefficients for each platform, and stores them in the database. It then reads the source platform for each evaluation data point, queries the database based on the source platform, and outputs the weight coefficient corresponding to the current platform if the query is successful; otherwise, it determines the current source platform as an unknown platform and uses the default weight coefficient as the weight coefficient for the unknown platform. Finally, the comprehensive score calculation module determines the source platform. The number of visits to all reviews with positive review tags. And the number of visits with negative review tags. ,in Indicates platform The number of items with positive review tags Indicates platform The number of negative review tags, based on and Calculate the platform's overall score. ,in The actual score output module calculates the comprehensive score from all source platforms. and the corresponding weighting coefficients Afterwards, according to and Calculate the actual evaluation score for the specified crop. ,in , Indicates parameters, Indicates the total number of source platforms;
[0026] The predictive model analysis unit includes a historical price acquisition module and a model generation module. The historical price acquisition module obtains historical price information from the National Agricultural Products Market Price Information Service Platform, reads the historical evaluation scores of a specified crop, performs dimensionality reduction on the historical price information and the attribute representations contained in the evaluation scores, standardizes the data, constructs multiple samples using the processed attribute representations, and then categorizes them according to… The proportions are stored in the training set and the test set respectively. The model generation module transmits the sample data in the training set to the XGBoost model and the LSTM model for analysis. After the model training is completed, the accuracy of the XGBoost model and the LSTM model after joint processing is determined by the sample data in the test set. Historical price information includes the daily price, output, temperature, extreme weather impact index, per capita disposable income of residents, transportation cost, food price index, import amount, export amount and e-commerce logistics index of the target agricultural products.
[0027] The initial individual selection unit includes a labeling module and an individual generation module. The labeling module statistically analyzes all hyperparameters to be optimized in the XGBoost and LSTM models, sets an update period, and categorizes the hyperparameters into two classes: high-frequency hyperparameters and low-frequency hyperparameters. These hyperparameters are then labeled with a value of 1 (high-frequency hyperparameters) and 0 (low-frequency hyperparameters). The individual generation module determines the constraint range for each type of hyperparameter, sets the number of individuals and the maximum number of iterations, and constructs an individual sequence based on the constraint range and the number of individuals. ,in This represents the number of individuals in the initial sequence. , Indicates the first Individual, Indicates the first Within each individual Hyperparameters Indicates the first Within each individual Hyperparameters This indicates the total number of hyperparameters. This represents the individual index number in the initial sequence. , Indicates the first The lower limit of the constraint range corresponding to each hyperparameter. Indicates the first The upper limit of the constraint range corresponding to the hyperparameters is defined. The hyperparameters to be optimized for the XGBoost model include the learning rate, sample sampling ratio, maximum tree depth, feature sampling ratio, and number of trees. The hyperparameters to be optimized for the LSTM model include the number of neurons, learning rate, dropout rate, and number of stacked layers. The joint hyperparameters of the XGBoost and LSTM models include the LSTM output weight ratio. The high-frequency hyperparameters include the learning rate, sample sampling ratio of the XGBoost model, the learning rate, dropout rate, and LSTM output weight ratio of the LSTM model. The low-frequency hyperparameters include the maximum tree depth, feature sampling ratio, number of trees of the XGBoost model, and the number of neurons and number of stacked layers of the LSTM model.
[0028] The initial individual selection unit also includes a sorting and filtering module and an initial individual determination module. The sorting and filtering module sequentially inputs the hyperparameters corresponding to each individual into the XGBoost model and the LSTM model, uses samples from the training and test sets to determine the accuracy of different individuals, sorts the individuals according to their accuracy, calculates the mean accuracy of the current individual sequence, and deletes individuals with accuracy below the mean. The initial individual determination module obtains the current individual sequence. ,in Indicates the first Individual, This represents the index of the individual in the current sequence. This indicates the number of individuals in the current sequence. , Indicates the first Within each individual Hyperparameters Indicates the first Within each individual Hyperparameters, setting spatial coefficients ,according to and Calculate the derived individuals ,in , , Indicates the first Within the first derivative individual Hyperparameters This represents random numbers. The operation is repeated until all individuals in the current sequence have generated derivative individuals, and multiple different individuals are reconstructed according to the constraint range and the number of individuals. ,in , Indicates the first after reconstruction Within each individual Hyperparameters ,statistics , and After determining the corresponding accuracy, sort them according to the accuracy level, and then... One individual is used as the initial individual, and other individuals are deleted;
[0029] The hyperparameter optimization unit includes an update cycle determination module, a coefficient calculation module, a coefficient combination module, and an initial update module. The update cycle determination module divides the initial individuals into two groups and stores them in the first set and the second set, respectively. It records the current loop count and determines whether the current loop count is a multiple of the update cycle. If it is not a multiple of the update cycle, it counts all initial individuals. Hyperparameters marked as 1 ,in Indicates the ordinal number; if it is a multiple of the update cycle, then all initial individuals are counted. The hyperparameter coefficient calculation module calculates the stage factor and transformation coefficients based on the current loop count and the maximum loop count. If the stage factor is less than the first threshold, then the hyperparameters are used to calculate the transformation coefficients. and constraint range Calculate the update hyperparameters without adding the mutation factor. Repeat the operation until all hyperparameters have been calculated, where , Represents the first individual selected randomly. The values of the hyperparameters, Indicates in The random number selected from the data. , Indicates the first The lower limit of the constraint range corresponding to each hyperparameter. Indicates the first The upper limit of the constraint range corresponding to each hyperparameter, the coefficients combined with the module to determine the weight coefficients corresponding to the current iteration number, after adding the mutation factor, the parameter optimization algorithm is used to combine the mutation factor, weight coefficients, and... By combining these parameters, we can obtain the update hyperparameters when adding the mutation factor. The process is repeated until all hyperparameters have been calculated. The initial update module calculates the accuracy of the original individual, the updated individual without added mutation factors, and the updated individual with added mutation factors. Hyperparameters from the original individual are replaced with those from the individual with the highest accuracy. The parameter optimization algorithm is as follows:
[0030]
[0031] in, This represents the update hyperparameters when adding mutation factors. This represents the value of the hyperparameter within a randomly selected individual. Represents a random number. Indicates the current loop count. Indicates the maximum number of loops. This represents the original hyperparameters. Indicates the weighting coefficient;
[0032] The hyperparameter determination unit includes a mean analysis module, an optimal individual selection module, a two-round update module, a parameter fusion module, and an individual output module. In the mean analysis module, if the stage factor is greater than or equal to the first threshold and the transformation coefficient is greater than the second threshold, it calculates the similarity between each individual and other individuals. Individuals with similarity greater than a preset value are selected as candidate individuals for the current individual. The accuracy of all candidate individuals is calculated, and candidate individuals with accuracy lower than the current individual are deleted. The mean of each hyperparameter is calculated using the remaining candidate individuals and the current individual, and an updated individual is constructed using the mean. The optimal individual selection module selects the individual with the highest current accuracy as the optimal individual. A parameter fine-tuning algorithm is then used to adjust the hyperparameters and optimal individual values for each individual. The hyperparameters and transformation coefficients of the individual are calculated to obtain the updated individual. The second-round update module compares the accuracy of the original individual with that of two different updated individuals, and replaces the hyperparameters of the original individual with the hyperparameters of the individual with higher accuracy. If the stage factor is greater than or equal to the first threshold and the transformation coefficient is less than or equal to the second threshold, the parameter fusion module determines the individual with the highest accuracy in the first set and the second set. The parameter fusion algorithm is used to calculate the new hyperparameters of the individual with the highest accuracy in the first set and the second set. The operation is repeated until the loop ends. The individual output module outputs the individual with the highest accuracy and its corresponding hyperparameters are used as the optimal hyperparameters input into the XGBoost model and the LSTM model. The parameter fine-tuning algorithm is as follows:
[0033]
[0034] in, This indicates that the hyperparameters are being updated. The hyperparameters representing the optimal individual. Represents a random number. Represents the transformation coefficients. This represents the original hyperparameters;
[0035] The parameter fusion algorithm is as follows:
[0036]
[0037] in, This represents the update hyperparameters for individuals within a specified set. This indicates the hyperparameters for the best individual within the specified set. This represents the original hyperparameters. Represents a random number. Represents the fitness coefficient. Indicates stage factor;
[0038] The risk identification unit includes a daily price generation module, a capacity calculation module, and an early warning execution module. The daily price generation module obtains the highest and lowest daily yields of the designated crop planted by the farmer within the current forecast period, and transmits the historical price information and actual evaluation scores of the designated crop to the XGBoost and LSTM models for analysis to obtain the daily predicted price of the designated crop within the forecast period. The capacity calculation module uses the highest and lowest daily yields and the daily predicted prices to calculate the farmer's daily repayment capacity for the designated crop. The early warning execution module classifies the risk level into high, medium, and low risk, reads the farmer's preset daily repayment amount, and if the daily repayment amount is lower than or equal to the daily repayment capacity within the forecast period, the current risk level is determined to be low risk, and no early warning operation is executed. If the number of times the daily repayment amount exceeds the repayment capacity is greater than once but less than four times within the forecast period, the current risk level is determined to be medium risk, and an early warning message is issued to the farmer. If the number of times the daily repayment amount exceeds the repayment capacity is greater than four times within the forecast period, a manual review mechanism is initiated.
[0039] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0040] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A real-time monitoring and early warning system for rural financial risks, comprising an evaluation score statistics unit, a predictive model analysis unit, an initial individual screening unit, a hyperparameter optimization unit, a hyperparameter determination unit, and a risk identification unit, characterized in that: The initial individual selection unit, after statistically analyzing all the hyperparameters to be optimized in the XGBoost and LSTM models, determines the constraint range of each hyperparameter to be optimized and sets the number of individuals. Based on the constraint range and the number of individuals, it constructs an individual sequence, determines the accuracy of different individuals, filters and deletes individuals according to their accuracy, calculates the corresponding derived individuals using the remaining individuals, and reconstructs a new individual sequence. After statistically analyzing the accuracy of individuals generated by the three different methods, it selects the final initial individuals according to their accuracy. The hyperparameter optimization unit includes an update cycle determination module, a coefficient calculation module, a coefficient combination module, and an initial update module. The update cycle determination module divides the initial individuals into two groups, storing them in a first set and a second set respectively. It records the current loop count and determines whether the current loop count is a multiple of the update cycle. If it is not a multiple of the update cycle, it counts all initial individuals. Hyperparameters marked as 1 If it is a multiple of the update cycle, then all initial individuals are counted. The hyperparameters are determined by the coefficient calculation module, which calculates the stage factor and transformation coefficients based on the current loop count and the maximum loop count. If the stage factor is less than a first threshold, then the hyperparameters are used to determine the transformation coefficients. and constraint range Calculate the update hyperparameters without adding the mutation factor. Repeat the operation until all hyperparameters have been calculated, where , Represents the first individual selected randomly. The values of the hyperparameters, Indicates in The random number selected from the data. The coefficient combination module determines the weight coefficient corresponding to the current loop number. After adding the mutation factor, the parameter optimization algorithm is used to combine the mutation factor, weight coefficient, and... By combining these parameters, we can obtain the update hyperparameters when adding the mutation factor. The operation is repeated until all hyperparameters have been calculated. The initial update module calculates the accuracy of the original individual, the updated individual without adding mutation factors, and the updated individual with adding mutation factors. The hyperparameters of the original individual are replaced with the hyperparameters of the individual with high accuracy. The risk identification unit uses XGBoost and LSTM models to analyze historical price information, obtains the daily predicted price of a specified crop within the prediction period, calculates the farmer's daily repayment ability based on the predicted price, and determines the risk level using a preset repayment amount and repayment ability.
2. The rural financial risk real-time monitoring and early warning system according to claim 1, characterized in that: The evaluation score statistics unit includes an evaluation data acquisition module, a word segmentation feature extraction module, a tag information determination module, a weight setting module, a comprehensive score calculation module, and an actual score output module. The evaluation data acquisition module uses a web crawler to obtain evaluation data for a specified crop. This evaluation data includes text content, page views, time, and the data source platform. Corresponding tag information is added to each review, with tags categorized into positive and negative reviews. The word segmentation feature extraction module constructs multiple samples using the evaluation data, extracts the word segmentation features of each sample, and then transmits the word segmentation features and tag information to a Naive Bayes classification model to determine the model parameters and accuracy. The tag information determination module acquires all evaluation data for a specified crop within the same day, extracts the word segmentation features of each evaluation data point, and transmits them to a Naive Bayes classification model for analysis to determine the tag information of that evaluation data point. The weight setting module statistically analyzes all official and unofficial data source platforms, sets a corresponding weight coefficient for each source platform, and stores it in the database. It reads the source platform for each evaluation data point, queries the database based on the source platform, and if the query is successful, outputs the weight coefficient corresponding to the current platform; if the query fails, the current source platform is determined to be an unknown platform, and the default weight coefficient is used as the weight coefficient for the unknown platform. The comprehensive score calculation module determines the source platform. The number of visits to all reviews with positive review tags. And the number of visits with negative review tags. ,in Indicates platform The number of items with positive review tags Indicates platform The number of negative review tags, based on and Calculate the platform's overall score. ,in The actual score output module calculates the comprehensive score from all source platforms. and the corresponding weighting coefficients Afterwards, according to and Calculate the actual evaluation score for the specified crop. ,in , Indicates parameters, This indicates the total number of source platforms.
3. The rural financial risk real-time monitoring and early warning system according to claim 1, characterized in that: The predictive model analysis unit includes a historical price acquisition module and a model generation module. The historical price acquisition module obtains historical price information from the National Agricultural Product Market Price Information Service Platform, reads the historical evaluation scores of a specified crop, performs dimensionality reduction on the attribute representations contained in the historical price information and evaluation scores, standardizes the data, constructs multiple samples using the processed attribute representations, and then categorizes them according to… The proportions are stored in the training set and the test set respectively. The model generation module transmits the sample data from the training set to the XGBoost model and the LSTM model for analysis. After the model training is completed, the accuracy of the combined XGBoost model and the LSTM model is determined by the sample data in the test set.
4. The rural financial risk real-time monitoring and early warning system according to claim 1, characterized in that: The initial individual selection unit includes a labeling module and an individual generation module. The labeling module statistically analyzes all hyperparameters to be optimized in the XGBoost and LSTM models, sets an update period, and categorizes the hyperparameters into two classes: high-frequency hyperparameters and low-frequency hyperparameters. These hyperparameters are then labeled with a value of 1 (high-frequency hyperparameters) and 0 (low-frequency hyperparameters). The individual generation module determines the constraint range for each type of hyperparameter, sets the number of individuals and the maximum number of iterations, and constructs an individual sequence based on the constraint range and the number of individuals. ,in This represents the number of individuals in the initial sequence. , Indicates the first Individual, Indicates the first Within each individual Hyperparameters This indicates the total number of hyperparameters. This represents the individual index number in the initial sequence.
5. The rural financial risk real-time monitoring and early warning system according to claim 4, characterized in that: The initial individual screening unit further includes a sorting and screening module and an initial individual determination module. The sorting and screening module sequentially inputs the hyperparameters corresponding to each individual into the XGBoost model and the LSTM model, uses samples from the training and test sets to determine the accuracy of different individuals, sorts the individuals according to their accuracy, calculates the mean accuracy of the current individual sequence, and deletes individuals with accuracy below the mean. The initial individual determination module obtains the current individual sequence. ,in Indicates the first Individual, This represents the index of the individual in the current sequence. This indicates the number of individuals in the current sequence. Setting space coefficients ,according to and Calculate the derived individuals ,in , , This represents random numbers. The operation is repeated until all individuals in the current sequence have generated derivative individuals, and multiple different individuals are reconstructed according to the constraint range and the number of individuals. ,in ,statistics , and After determining the corresponding accuracy, sort them according to the accuracy level, and then... One individual is used as the initial individual, and other individuals are deleted.
6. The rural financial risk real-time monitoring and early warning system according to claim 1, characterized in that: The hyperparameter determination unit includes a mean analysis module, an optimal individual selection module, a two-round update module, a parameter fusion module, and an individual output module. The mean analysis module calculates the similarity between each individual and other individuals if the stage factor is greater than or equal to a first threshold and the transformation coefficient is greater than a second threshold. Individuals with similarity greater than a preset value are selected as candidate individuals for the current individual. The accuracy of all candidate individuals is calculated, and candidate individuals with accuracy lower than the current individual are deleted. The mean of each hyperparameter is calculated using the remaining candidate individuals and the current individual, and an updated individual is constructed using the mean. The optimal individual selection module selects the individual with the highest current accuracy as the optimal individual, and then fine-tunes the hyperparameters corresponding to each individual using a parameter fine-tuning algorithm. The system calculates the hyperparameters and transformation coefficients of the best individual to obtain the updated individual. The second-round update module compares the accuracy of the original individual with that of two different updated individuals, and replaces the hyperparameters of the original individual with the hyperparameters of the individual with higher accuracy. If the stage factor is greater than or equal to the first threshold and the transformation coefficient is less than or equal to the second threshold, the parameter fusion module determines the individual with the highest accuracy in the first set and the second set. The parameter fusion algorithm is used to calculate the hyperparameters of the individual with the highest accuracy in the first set and the second set to obtain new hyperparameters for each individual. The operation is repeated until the loop ends. The individual output module outputs the individual with the highest accuracy and inputs its corresponding hyperparameters as the optimal hyperparameters into the XGBoost model and the LSTM model.
7. The rural financial risk real-time monitoring and early warning system according to claim 1, characterized in that: The risk identification unit includes a daily price generation module, a capacity calculation module, and an early warning execution module. The daily price generation module obtains the highest and lowest daily yields of the designated crop planted by the farmer within the current forecast period, and transmits the historical price information and actual evaluation scores of the designated crop to the XGBoost and LSTM models for analysis to obtain the daily predicted price of the designated crop within the forecast period. The capacity calculation module uses the highest and lowest daily yields and the daily predicted price to calculate the farmer's daily repayment capacity for the designated crop. The early warning execution module classifies the risk level into high risk, medium risk, and low risk, reads the farmer's preset daily repayment amount, and if the daily repayment amount is lower than or equal to the daily repayment capacity within the forecast period, the current risk level is determined to be low risk, and no early warning operation is executed. If the number of times the daily repayment amount exceeds the repayment capacity within the forecast period is greater than once but less than four, the current risk level is determined to be medium risk, and an early warning message is issued to the farmer. If the number of times the daily repayment amount exceeds the repayment capacity within the forecast period is greater than four, a manual review mechanism is initiated.
Citation Information
Patent Citations
Rural financial service system based on credit basic data
CN117422543A
Method, device and equipment for evaluating repayment capability of loan farmer, medium and product
CN119624628A