E-commerce financial risk prediction method based on improved BP neural network
By improving the BP neural network model and learning rate adjustment, the existing financial risk prediction methods are solved, and the problem of insufficient update capabilities when facing new risk factors is achieved is achieved, higher prediction accuracy and faster risk capture are achieved, providing e-commerce companies with more timely and accurate risk prediction.
Patent Information
- Application Number
- CN202510116803.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-09
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When existing financial risk prediction methods face new and unknown financial risk factors, it is difficult to quickly adapt and make accurate predictions, and the model update ability is insufficient, resulting in lagging and inaccurate prediction results.
The e-commerce financial risk prediction method based on improved BP neural network is adopted, and risk prediction is achieved by selecting e-commerce financial risk indicator data, data preprocessing, establishing an improved BP neural network model and adjusting the learning rate.
The prediction accuracy and model convergence speed are improved, allowing enterprises to more accurately identify potential financial risks and quickly capture changes in financial risks, providing e-commerce companies with timely and accurate prediction results.
Smart Images

Figure CN119963355A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of prediction methods, and in particular relates to an e-commerce financial risk prediction method based on an improved BP neural network. Background Art
[0002] In the process of e-commerce development, enterprises are facing more and more financial risks. In order to effectively deal with these risks and ensure the stable operation of e-commerce enterprises, intelligent prediction methods have emerged. In existing research, by introducing a denoising mechanism, the robustness and generalization ability of the model are effectively improved, thus achieving relatively ideal results in financial risk prediction tasks. However, although the SDAE network has a strong ability to deal with nonlinear problems, its prediction and update capabilities are still somewhat insufficient. This is mainly reflected in the difficulty of the model to quickly adapt and make accurate predictions when faced with new and unknown financial risk factors.
[0003] In addition, there is another financial risk prediction method, which uses the intuitive time fuzzy series theory to combine fuzzy mathematics with time series analysis to quantitatively evaluate financial risks. This method has unique advantages in dealing with uncertainty and ambiguity, and can more accurately capture the changing trend of financial risks. However, the intuitive time fuzzy series model also has limitations in its ability to update predictions. When the market environment or the company's financial situation changes significantly, the model takes a long time to relearn and adapt to the new data pattern, which may lead to delayed and inaccurate prediction results.
[0004] The financial data of e-commerce companies usually involves a large number of transactions and complex business logic. The collection, cleaning and organization of data requires a lot of time and manpower, resulting in a low frequency of data updates, which limits the accuracy of the financial risk prediction model. Summary of the invention
[0005] The purpose of the present invention is to address the above technical problems and propose an e-commerce financial risk prediction method based on an improved BP neural network.
[0006] In order to achieve the above-mentioned purpose, the present invention adopts the following technical solutions:
[0007] An e-commerce financial risk prediction method based on an improved BP neural network includes the following steps: S1: selecting e-commerce financial risk indicator data; S2: preprocessing the e-commerce financial risk indicator data; S3: establishing an improved BP neural network e-commerce financial risk prediction model; S4: adjusting the model learning rate to achieve risk prediction.
[0008] Further as a preferred technical solution of the present invention, S2 specifically includes the following steps:
[0009] S2.1: When the dimensions of various indicators are not uniform and there are missing and abnormal data, first normalize the data, fill in the missing values and remove the abnormal values; when there are a large number of missing data in the indicators, use the KNN interpolation method to process the missing values to maximize the preservation of the original information; for features with missing values, find the K samples closest to the sample in the feature space, whose values on other features are known, and then use the corresponding feature values of these K nearest neighbor samples to estimate or interpolate the missing values;
[0010] For each sample x with missing values i , calculate the distance with other samples on its non-missing features and find the distance x i The most recent K samples, denoted as For x i For each missing value x ij ,use The value of the corresponding feature in is interpolated, and the calculation formula is shown in (1):
[0011]
[0012] Among them, x ikj Represents the value of the kth nearest neighbor sample at the jth index;
[0013] S2.2: Replace missing values in the original data set with interpolated values to obtain an updated data set; outliers are observations in the data set that are significantly different from other data and are caused by data entry errors, measurement errors, or true abnormal events; use the statistical method IQR interquartile range rule to identify outliers;
[0014] S2.3: To facilitate the comparison between indicators of the same type, the data is standardized. The expression is as follows:
[0015]
[0016] Among them, x min Indicates the minimum value of the financial indicator input to the model, x max Indicates the maximum value of the input financial indicator.
[0017] Further, as a preferred technical solution of the present invention, S3 specifically includes the following steps:
[0018] S3.1: It is necessary to determine the structural parameters of the network based on the input and output characteristics of e-commerce financial risks, including the number of input layer nodes n, which corresponds to the characteristic dimension of the input sequence A; the number of hidden layer nodes l, which determines the ability of the network to process complex information; and the number of output layer nodes m, which corresponds to the dimension of the output sequence C;
[0019] S3.2: Let the input neuron set be A = {a 1 ,a 2 ,…,a n}, the output neuron set is C = {c 1 ,c 2 ,…,c m}, the hidden layer neuron set is B = {b 1 ,b 2 ,…,b l};
[0020] S3.3: Calculate the connection weight between each input neuron and the hidden layer neuron. For the i-th input neuron, the weighted sum between it and the k-th hidden layer neuron is expressed as:
[0021]
[0022] Among them, w ki represents the weight from the i-th input node to the k-th hidden layer node; b k Represents the bias term of k neurons in the hidden layer;
[0023] S3.4: Use the activation function f(.) to calculate the actual predicted output of the hidden layer neuron. For the kth hidden layer neuron, its output is expressed as:
[0024] o k =f(S k )(4)
[0025] Among them, f(.) selects the Sigmoid function to ensure that the neural network can capture the nonlinear relationship in the data;
[0026] S3.5: Calculate the weighted input sum of the output layer neurons and the final output value; for the j-th output neuron, its weighted input sum is expressed as:
[0027]
[0028] Among them, v jk represents the connection weight between the jth output neuron and the kth hidden layer neuron, b j represents the bias term of the jth output neuron; the output value of the output layer neuron is the predicted value of the e-commerce financial risk.
[0029] Further, as a preferred technical solution of the present invention, the S4 specifically includes the following steps:
[0030] S4.1. In BP neural network, the value range of learning rate α is between (0,1];
[0031] S4.2. The calculation formula for changing the learning rate is shown in (6):
[0032]
[0033] Where: α max represents the maximum learning rate, α min represents the minimum learning rate, n max represents the maximum number of iterations, and n represents the current number of iterations;
[0034] S4.3. In the early stage of training, use a larger learning rate to accelerate the update of weights; as the training progresses, gradually reduce the learning rate to ensure that the weights can stably converge to the optimal solution.
[0035] The e-commerce financial risk prediction method based on the improved BP neural network described in the present invention has the following technical effects compared with the prior art by using the above technical solution:
[0036] (1) The present invention determines that the improved BP neural network has achieved remarkable results in the intelligent prediction of e-commerce financial risks, which not only improves the prediction accuracy but also accelerates the convergence speed, enabling enterprises to more accurately identify potential financial risks and take preventive measures in advance.
[0037] (2) The method of the present invention can more quickly capture changes in financial risks and provide e-commerce companies with more timely and accurate forecast results. In the context of rapid changes in the e-commerce industry, this efficient update capability is of great significance to the risk management of enterprises. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is a schematic diagram of a flow chart of an embodiment of the present invention;
[0039] Figure 2 Schematic diagram of e-commerce financial risk indicators according to an embodiment of the present invention. DETAILED DESCRIPTION
[0040] The present invention is further explained below in detail with reference to the accompanying drawings so that those skilled in the art can more deeply understand the present invention and be able to implement it. However, the following reference examples are only used to explain the present invention and are not intended to limit the present invention.
[0041] like Figure 1 As shown, an e-commerce financial risk prediction method based on an improved BP neural network includes the following steps:
[0042] S1: Select e-commerce financial risk indicator data;
[0043] Before building an e-commerce financial risk prediction model, the first task is to select appropriate financial risk indicators. These indicators should be able to fully reflect the financial status and risk level of e-commerce companies. By deeply studying the characteristics and market environment of the e-commerce industry, key indicators closely related to financial risks can be identified, providing a basis for subsequent data processing and model building.
[0044] When selecting e-commerce financial risk indicators, we should not only consider the comprehensiveness and representativeness of the indicators, but also pay attention to the availability and quality of the data. This is because model training needs to be based on a large amount of historical data, and the accuracy and completeness of the data will directly affect the prediction effect of the model. Based on the actual financial status of domestic listed companies and a comprehensive consideration of the availability of relevant data, we construct an e-commerce financial risk indicator system such as Figure 2 shown.
[0045] Figure 2 The e-commerce financial risk indicators selected by the present invention are shown. In the selection process, special attention is paid to excluding data indicators with different data forms caused by changes in the company's financial report disclosure requirements to ensure the accuracy and consistency of the data.
[0046] By analyzing and evaluating these key e-commerce financial risk indicators, we can fully understand the financial status and risk status of e-commerce companies, and provide strong support for the company's strategic decision-making and risk management. At the same time, these indicator data will also serve as input to improve the BP neural network model, and through model training and optimization, further improve the accuracy and efficiency of financial risk prediction.
[0047] S2: Data preprocessing of e-commerce financial risk indicators;
[0048] After the e-commerce financial risk indicators are selected, the collected indicator data needs to be preprocessed. Data preprocessing is an important step to ensure the accuracy of the model. Preprocessing can eliminate noise and errors in the data, improve the quality of the data, and lay a solid foundation for the training and application of subsequent models. Due to the non-uniform dimensions of the various indicators and the presence of missing and abnormal data, it is necessary to first normalize the data, fill in the missing values, and remove outliers. When there is a large number of missing data in the indicators, the present invention uses the KNN interpolation method to process the missing values to maximize the retention of the original information. For features with missing values, find the K samples closest to the sample in the feature space (the values of these samples on other features are known), and then use the corresponding feature values of these K nearest neighbor samples to estimate or interpolate the missing values. For each sample x containing missing values i , calculate the distance with other samples on its non-missing features (such as Euclidean distance), and find the distance x i The most recent K samples, denoted as For x i For each missing value x ij ,use The value of the corresponding feature in is interpolated. The calculation formula is shown in (1):
[0049]
[0050] Among them, x ikj Represents the value of the kth nearest neighbor sample on the jth indicator. The interpolated value replaces the missing values in the original data set to obtain an updated data set. An outlier usually refers to an observation value that is significantly different from other data in a data set, which may be caused by data entry errors, measurement errors, or real abnormal events. The presence of outliers may have a negative impact on the training of the model, resulting in inaccurate prediction results or decreased model performance. Therefore, a suitable method must be adopted to identify and process these outliers. In the present invention, the statistical method IQR (interquartile range) rule is selected to identify outliers. The IQR rule is a method based on data distribution, which determines a reasonable range by calculating the difference between the upper quartile (Q3) and the lower quartile (Q1) of the data, and then treats values outside this range as outliers. Once the outliers are identified, they are processed. A common processing method is to directly delete these outliers, because in most cases they do not provide useful information, but may interfere with the training of the model. Then, in order to facilitate comparison between indicators of the same type, the data is standardized, and its expression is as follows:
[0051]
[0052] Among them, x min Indicates the minimum value of the financial indicator input to the model, x max Represents the maximum value of the input financial indicator. After the above preprocessing steps, the data will become neater, more complete and consistent, providing a high-quality data foundation for subsequent model training and application.
[0053] S3: Establish an improved BP neural network e-commerce financial risk prediction model;
[0054] After completing the index data preprocessing, the e-commerce financial risk prediction model needs to be established. Considering the advantages of BP neural network in processing nonlinear problems, the present invention chooses to construct the prediction model based on the improved BP neural network.
[0055] First, it is necessary to determine the structural parameters of the network based on the input and output characteristics of e-commerce financial risks. This includes determining the number of input layer nodes n, which corresponds to the characteristic dimension of the input sequence A; the number of hidden layer nodes l, which determines the ability of the network to process complex information; and the number of output layer nodes m, which corresponds to the dimension of the output sequence C. Therefore, when constructing an improved BP (back propagation) neural network for predicting e-commerce financial risks, it is necessary to carefully design the network architecture, especially the neuron configuration of the input layer, hidden layer, and output layer. Let the input neuron set be A = {a 1 ,a 2 ,…,a n}, the output neuron set is C = {c 1 ,c 2 ,…,c m}. The hidden layer neuron set is B = {b 1 ,b 2 ,…,b l}.
[0056] To determine the number of hidden layer neurons, consider the relationship between input neurons and hidden layer neurons, as well as the specific needs of the business problem. Calculate the connection weight between each input neuron and the hidden layer neuron. For the i-th input neuron, the weighted sum between it and the k-th hidden layer neuron can be expressed as:
[0057]
[0058] Among them, w ki represents the weight from the i-th input node to the k-th hidden layer node; b k represents the bias term of k neurons in the hidden layer. Next, the present invention uses the activation function f(.) to calculate the actual predicted output of the hidden layer neurons.
[0059] For the kth hidden layer neuron, its output can be expressed as:
[0060] o k =f(S k )(4)
[0061] Here, f(.) usually selects the Sigmoid function or other suitable nonlinear functions to ensure that the neural network can capture the nonlinear relationship in the data. Finally, the weighted input sum of the output layer neurons and the final output value are calculated.
[0062] For the jth output neuron, its weighted input sum can be expressed as:
[0063]
[0064] Among them, v jkrepresents the connection weight between the jth output neuron and the kth hidden layer neuron, b j represents the bias term of the jth output neuron.
[0065] Finally, the output value of the output layer neuron is the predicted value of the e-commerce financial risk. By continuously adjusting the network parameters (such as connection weights and bias terms), the prediction results of the neural network are made more accurate. By establishing an improved BP neural network e-commerce financial risk prediction model, enterprises can more accurately predict and evaluate their own financial risk levels. This will help enterprises formulate more reasonable risk management strategies and improve risk response capabilities, thereby ensuring the steady development of enterprises.
[0066] S4: Adjust the model learning rate to achieve risk prediction.
[0067] After establishing the improved BP neural network e-commerce financial risk prediction model, the learning rate of the model needs to be adjusted. The learning rate is an important parameter in the model training process, which determines the step size of the model weight update. It is necessary to find a suitable learning rate through multiple experiments and adjustments to achieve efficient model training and accurate prediction. Finally, through the trained model, the financial risks of e-commerce companies are predicted and evaluated, providing a scientific basis for corporate decision-making.
[0068] In BP neural network, the learning rate (usually expressed as α) usually ranges from (0,1]. This parameter determines the magnitude of the network's weight adjustment in each iteration. When the prediction model learning rate is large, the weight adjustment in each iteration will also be relatively large, which can speed up the network training. However, too large a learning rate may cause the weight update to be too large, resulting in oscillation during the training process and affecting the stability of the model. On the contrary, if the learning rate is set to a small value, although it can avoid oscillation, it will also cause the network to converge more slowly and may even fall into a local optimal solution. Therefore, the calculation formula for changing the learning rate is shown in (6):
[0069]
[0070] Where: α max represents the maximum learning rate, α min represents the minimum learning rate, n max represents the maximum number of iterations, and n represents the current number of iterations.
[0071] In the early stages of training, a larger learning rate can be used to accelerate the update of weights; as training progresses, the learning rate is gradually reduced to ensure that the weights can stably converge to the optimal solution. The calculation formula for changing the learning rate can be adjusted according to specific tasks and data sets to achieve the best training effect.
[0072] When building an e-commerce financial risk prediction model, adjusting the learning rate is one of the important means to optimize model performance. By selecting an appropriate learning rate adjustment strategy and setting the initial learning rate reasonably, the model's training efficiency and prediction performance can be improved. It should be noted that the adjustment of the learning rate needs to be adjusted and experimented according to the specific task and data set to find the optimal learning rate setting.
[0073] Experiment of the method of the present invention:
[0074] Based on the data of the same industry and the same period, the present invention uses whether there is "financial anomaly" and ST (special treatment) as the criterion for judging whether it is in financial risk. It is planned to take an e-commerce company in a certain city as the research object in the past two years to study its performance forecast before the financial crisis.
[0075] In order to ensure the credibility and foresight of the prediction results, the present invention selects the enterprise data of listed companies in my country from T to 3 years. In this way, the prediction can be made at an earlier stage before the enterprise falls into financial crisis, providing the possibility for the enterprise to take measures to deal with the crisis in advance.
[0076] After strict sample screening and data cleaning, we finally obtained 346 sample companies, including 173 positive and negative samples (i.e. ST and non-ST companies). In terms of data sample division, in order to ensure the effectiveness of model training and the accuracy of testing, we randomly selected the training set (containing 242 samples) and the test set (containing 104 samples) in a ratio of 7:3.
[0077] Table 1 Software and hardware environment settings
[0078]
[0079]
[0080] In addition, to ensure the smooth progress of the experiment, the following preparations need to be ensured: Model training: Use the training set data to train the model and adjust the model parameters to achieve better prediction performance. Model verification: Use the test set data to verify the trained model and evaluate the generalization ability and prediction accuracy of the model. Through the above preparations and experimental processes, an e-commerce financial risk prediction model based on the improved BP neural network is constructed, and experimental verification and performance evaluation are performed on it.
[0081] By building an e-commerce financial risk prediction model based on an improved BP neural network and training and testing it in the selected software and hardware environment, the following experimental results were obtained.
[0082] Table 2 Update frequency record
[0083]
[0084] After a series of experimental comparisons, the e-commerce financial risk prediction method proposed in the present invention performs well in updating ability. It can be seen from the experimental data that the prediction methods in the prior art 1: Tang Ying. Financial risk prediction algorithm based on improved SDAE network [J]. Microcomputer Applications, 2022, 38(02): 202-204+208. and prior art 2: Liu Huilian. Research on accurate prediction of financial risks based on intuitive time fuzzy sequences [J]. Automation Technology and Applications, 2023, 42(03): 184-186. have a certain update frequency and success rate, but in comparison, the update frequency of the method of the present invention is higher, the average update time is shorter, and the update success rate is higher. Specifically, the method of the present invention achieves a high frequency of updating every 2 minutes, the average update time is only about 1 second, and the update success rate is stable at more than 99%, and some experiments even reach 100%.
[0085] This significant update capability advantage enables the method of the present invention to capture changes in financial risks more quickly and provide e-commerce companies with more timely and accurate prediction results. In the context of rapid changes in the e-commerce industry, this efficient update capability is of great significance to the risk management of enterprises. Therefore, it can be concluded that the e-commerce financial risk prediction method proposed in the present invention performs well in terms of update capability and provides a new solution for the financial risk prediction of e-commerce companies.
[0086] The specific implementation scheme described above further describes in detail the purpose, technical scheme and beneficial effects of the present invention. It should be understood that the above is only a specific implementation scheme of the present invention and is not intended to limit the scope of the present invention. Any equivalent changes and modifications made by any technician in the field without departing from the concept and principle of the present invention should fall within the scope of protection of the present invention.
Claims
1. An e-commerce financial risk prediction method based on improved BP neural network, characterized in that: The following steps are involved: S1: Select e-commerce financial risk indicator data; S2: Data preprocessing of e-commerce financial risk indicators; S3: Establish an improved BP neural network e-commerce financial risk prediction model; S4: Adjust the model learning rate to achieve risk prediction.
2. The e-commerce financial risk prediction method based on improved BP neural network according to claim 1 is characterized in that: The S2 specifically includes the following steps: S2.1: When the dimensions of various indicators are not uniform and there are missing and abnormal data, first normalize the data, fill in the missing values and remove the abnormal values; when there are a large number of missing data in the indicators, use the KNN interpolation method to process the missing values to maximize the preservation of the original information; for features with missing values, find the K samples closest to the sample in the feature space, whose values on other features are known, and then use the corresponding feature values of these K nearest neighbor samples to estimate or interpolate the missing values; For each sample x with missing values i , calculate the distance with other samples on its non-missing features and find the distance x i The most recent K samples, denoted as For x i For each missing value x ij ,use The value of the corresponding feature in is interpolated, and the calculation formula is shown in (1): Among them, x ikj Represents the value of the kth nearest neighbor sample at the jth index; S2.2: Replace missing values in the original data set with interpolated values to obtain an updated data set; outliers are observations in the data set that are significantly different from other data and are caused by data entry errors, measurement errors, or true abnormal events; use the statistical method IQR interquartile range rule to identify outliers; S2.3: To facilitate the comparison between indicators of the same type, the data is standardized. The expression is as follows: Among them, x min Indicates the minimum value of the financial indicator input to the model, x max Indicates the maximum value of the input financial indicator.
3. The e-commerce financial risk prediction method based on improved BP neural network according to claim 2 is characterized in that: The S3 specifically includes the following steps: S3.1: It is necessary to determine the structural parameters of the network based on the input and output characteristics of e-commerce financial risks, including the number of input layer nodes n, which corresponds to the characteristic dimension of the input sequence A; the number of hidden layer nodes l, which determines the ability of the network to process complex information; and the number of output layer nodes m, which corresponds to the dimension of the output sequence C; S3.2: Let the input neuron set be A = {a1, a2, ..., a n }, the output neuron set is C = {c1, c2, ..., c m }, the hidden layer neuron set is B = {b1, b2, ..., b l }; S3.3: Calculate the connection weight between each input neuron and the hidden layer neuron. For the i-th input neuron, the weighted sum between it and the k-th hidden layer neuron is expressed as: Among them, w ki represents the weight from the i-th input node to the k-th hidden layer node; b k Represents the bias term of k neurons in the hidden layer; S3.4: Use the activation function f(.) to calculate the actual predicted output of the hidden layer neuron. For the kth hidden layer neuron, its output is expressed as: o k =f(S k )(4) Among them, f(.) selects the Sigmoid function to ensure that the neural network can capture the nonlinear relationship in the data; S3.5: Calculate the weighted input sum of the output layer neurons and the final output value; for the j-th output neuron, its weighted input sum is expressed as: Among them, v jk represents the connection weight between the jth output neuron and the kth hidden layer neuron, b j represents the bias term of the jth output neuron; the output value of the output layer neuron is the predicted value of the e-commerce financial risk.
4. The e-commerce financial risk prediction method based on improved BP neural network according to claim 3 is characterized in that: The S4 specifically comprises the following steps: S4.
1. In BP neural network, the value range of learning rate α is between (0,1]; S4.
2. The calculation formula for changing the learning rate is shown in (6): Where: α max represents the maximum learning rate, α min represents the minimum learning rate, n max represents the maximum number of iterations, and n represents the current number of iterations; S4.
3. In the early stage of training, use a larger learning rate to accelerate the update of weights; as the training progresses, gradually reduce the learning rate to ensure that the weights can stably converge to the optimal solution.