Loose zone prediction method, system and storage medium based on GA-BP algorithm

By using genetic algorithms to optimize the parameters and hyperparameters of the BP neural network in the loose coil prediction model, the problem of insufficient accuracy and reliability of the loose coil prediction model in the existing technology is solved, and the loose coil range prediction with higher accuracy is achieved, and the data support capability of the mine support design is enhanced.

CN119312682BActive Publication Date: 2025-05-02UNIV OF SCI & TECH BEIJING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411444799.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-05-02
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

The existing loose circle prediction model has shortcomings in terms of accuracy and reliability, mainly due to inconsistent influencing factors, inaccurate data measurement, insufficient model training, and reliance on linear prediction models, resulting in unstable prediction results and large errors.

Method used

A BP neural network (GA-BP) method based on genetic algorithm optimization is adopted to establish a more accurate loose circle prediction model by optimizing the parameters and hyperparameters of the BP neural network. The method includes taking the actual mine measured data as input, performing normalization processing and grouping training, using genetic algorithms to optimize the number of hidden layer nodes and other hyperparameters, and gradually iteratively obtaining the optimal BP neural network model.

Benefits of technology

It improves the accuracy and reliability of the loose coil prediction model, reduces prediction errors, and can predict the loose coil range more accurately, thereby providing more effective data support for mine support design and preventing the occurrence of security incidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312682B_ABST
    Figure CN119312682B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of loose circle range prediction, and more specifically to a loose circle prediction method, system and storage medium based on a GA-BP algorithm. The method comprises: step S1: normalizing the measured data and dividing it into a first group and a second group; step S2: calculating the estimated value of the number of nodes in each hidden layer of the BP neural network, training the BP neural network based on multiple first gene sequences and the measured data of the first group, calculating the fitness and loss difference, and performing crossover and mutation on multiple groups of first gene sequences corresponding to the optimal fitness and the minimum loss difference to obtain the optimal BP neural network; step S3: judging whether the output result of the optimal BP neural network meets the error range; step S4: using the optimal BP neural network that meets the error range as a loose circle prediction model. The present invention solves the problem of inaccurate prediction of the loose circle range in the traditional way, and improves the accuracy of predicting the loose circle range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of loose zone range prediction, and more specifically to a loose zone prediction method, system and storage medium based on a GA-BP algorithm. Background Art

[0002] The surrounding rock loosening zone refers to the range of loosening and cracking of the surrounding rock around the tunnel in underground projects due to the influence of geological structure, ground stress, blasting and other factors. This concept is mainly used in tunnel projects to describe the stability and safety of the surrounding rock. By predicting the surrounding rock loosening zone, the approximate range of the loosening zone can be known in advance, so as to formulate a more reasonable and effective support plan.

[0003] The prediction of the loosening zone range is a key research, which aims to understand the boundaries of the loosening zone range in advance and provide effective data support for mine support design. However, in its development process, there are still some problems and shortcomings, which limit its accuracy and reliability in practical applications. First, in domestic and foreign research and engineering practice, the influencing factors of the loosening zone range are not unified. And the measured data of the loosening zone influencing factors are sometimes not measured accurately enough. The current prediction model is sometimes affected by these factors, resulting in unstable prediction results and large errors. Secondly, the limited observation data is also one of the problems faced by loosening zone prediction. The difficulty and time-consuming underground drilling operations make it difficult to obtain data. The small amount of data will lead to insufficient model training, which will affect the accuracy of the prediction. In order to improve the accuracy and reliability of the prediction, it is necessary to uniformly classify the measured data of the mine and increase the number to make the prediction model more accurate.

[0004] Although there are a large number of loose zone prediction models, most of them are linear prediction models, which have the disadvantage of low accuracy and are often only applicable to individual designated mines. Among the neural network prediction models, the most widely used and effective neural network is the back-propagation (BP) neural network. The BP neural network is one of the mature neural network algorithms in the current research process. It has good self-learning, self-adaptation, robustness and generalization capabilities. In addition, the neural network can approximate any nonlinear function with arbitrary precision. It is widely used in pattern recognition, function approximation, image processing and other fields. However, this model has some disadvantages. First, the convergence speed of the BP neural network model is relatively slow. In deep networks, due to the continuous multiplication of the chain rule, the gradient may decrease rapidly (gradient disappearance) or increase (gradient explosion), making it difficult to train deep networks. This makes it complicated to adjust the network parameters, and some special initialization and optimization techniques may be required. The selection of initial weights has a great influence on the performance of the BP neural network. Inappropriate initial weights may cause the network to fall into a local minimum, and the training process cannot converge to the global minimum. In addition, since the BP neural network is based on the gradient information of the error function, when the problem complexity is high or the gradient information is difficult to obtain, it will cause large errors in the prediction results of the BP neural network. Summary of the invention

[0005] In order to better solve the above problems, the present invention provides a loose circle prediction method based on GA-BP algorithm. The method uses the parameters of BP neural network optimized by genetic algorithm to establish a prediction model for the range of loose circle and complete the prediction of loose circle. The method comprises the following steps:

[0006] Step S1: taking the measured ground stress, tunnel span, excavation cross-sectional area, uniaxial compressive strength and joint development degree of the mine as measured data and using the measured data as input of the BP neural network, normalizing all the measured data, and dividing the measured data into a first group and a second group;

[0007] Step S2: Create a BP neural network, initialize the BP neural network, and calculate an estimated value of the number of nodes in each hidden layer of the BP neural network, select the preset hyperparameters of the BP neural network as population individuals of the genetic algorithm, randomly generate multiple data groups based on the population individuals through a generation unit, encode the data groups to obtain a first gene sequence, train the BP neural network based on multiple first gene sequences and the measured data of the first group, and calculate the fitness and loss difference of the BP neural network, cross and mutate multiple groups of the first gene sequences corresponding to the optimal fitness and multiple groups of the first gene sequences corresponding to the minimum loss difference, and iterate through genetic optimization steps to obtain the optimal BP neural network and the corresponding optimal preset hyperparameters;

[0008] Step S3: saving the optimal BP neural network, and determining whether the output result of the optimal BP neural network after population iteration satisfies the error range;

[0009] Step S4: taking the optimal BP neural network that satisfies the error range as a loose circle prediction model, and predicting the loose range through the loose circle prediction model.

[0010] As a preferred technical solution of the present invention, in step S1, the measured data is normalized, and the expression is:

[0011] Y input =(Y input -Y min ) / (Y max -Y min )

[0012] Where Y input is the measured data to be normalized, Y max is the maximum value of the measured data, Y min is the minimum value of the measured data;

[0013] In step S2, an empirical formula is used to calculate the number of hidden layer nodes, and the expression is:

[0014]

[0015] In the formula, Num hidden is the number of hidden layer nodes, l is the number of input layer nodes, d is the number of output layer nodes, r is the number of hidden layers, and the range of r is [1,10].

[0016] As a preferred technical solution of the present invention, step S2 includes the following steps:

[0017] Step S21: creating and initializing the BP neural network, and selecting preset hyperparameters of the BP neural network as population individuals of the genetic algorithm, wherein the preset hyperparameters include the type of activation function, the number of hidden layers, the number of nodes in each hidden layer, the batch size, the learning rate, the number of iterations, and whether to use a constant term;

[0018] Step S22: Generate multiple data of each individual of the population by the generating unit, and randomly combine the multiple data of the individuals of the population into multiple data groups, perform binary encoding on the data in the data groups to obtain multiple first gene sequences, wherein the number of hidden layers in the first gene sequence is a positive integer greater than or equal to 1 and less than or equal to 10, and the number of nodes in each hidden layer is within a preset range near the estimated value;

[0019] Step S23: Train the BP neural network based on the first gene sequence and the measured data of the first group, calculate the fitness and the loss difference of each first gene sequence corresponding to the BP neural network, and obtain the first gene sequence of group a with the best fitness and the first gene sequence of group b with the smallest loss difference.

[0020] As a preferred technical solution of the present invention, the step S23 further includes a step S24:

[0021] The first gene sequence of group a with the best fitness and the first gene sequence of group b with the smallest loss difference are mutated according to different proportions of mutant individuals within a first preset range to obtain multiple second gene sequences and multiple third gene sequences. When the high position is different, any individual in the second gene sequence is exchanged with the corresponding individual in the third gene sequence. When the high position is the same, the low position is cross-exchanged to obtain a fourth gene sequence. The BP neural network is optimized based on each of the fourth gene sequences, and the BP neural network model with the best fitness and the loss difference both within the second preset range is obtained as the optimal BP neural network.

[0022] As a preferred technical solution of the present invention, in step S2, calculating the fitness of the BP neural network includes:

[0023] The BP neural network has n inputs, m outputs, and p nodes in the hidden layer. The output of the hidden layer is T j , the hidden layer threshold is θ j , the transfer function of the hidden layer is F1, and the threshold of the output layer is θ k , the transfer function of the output layer is F2, and the weight from the output layer to the hidden layer is w ij , the weight from the hidden layer to the output layer is w jk, and get the network output O m , the expected output is V m , the output of the jth neuron in the hidden layer is expressed as:

[0024]

[0025] In the formula, S i Represents input data; i = 1, 2…n; j = 1, 2…p

[0026] Calculate the output O of each output layer neuron k , the expression is:

[0027]

[0028] Where, k = 1, 2…m;

[0029] The error function is obtained by using the obtained prediction results and actual data. The error function formula is:

[0030]

[0031] In the formula, v k It represents the actual data value corresponding to the prediction result, and the error value E of the BP neural network is used as the fitness of the BP neural network.

[0032] As a preferred technical solution of the present invention, step S3 includes:

[0033] Each of the measured data of the second group is input into the optimal BP neural network, and a first prediction result corresponding to the measured data is obtained. According to the difference between the first prediction result and the actual loose range result corresponding to the measured data, a first prediction accuracy of the measured data is obtained. When the first prediction accuracy of less than k measured data is greater than the error range, the optimal BP neural network is used as the loose circle prediction model. When the first prediction accuracy of at least k measured data is greater than the error range, the first number of the measured data of the second group is used as training data to train the optimal BP neural network twice. During the secondary training, the loss difference of the optimal BP neural network is calculated and the weight of the optimal BP neural network is calculated and adjusted in combination with the back propagation algorithm. The second number of the measured data remaining after removing the first number of the measured data from the second group is input into the optimal BP neural network after the secondary training, and the second prediction accuracy of the second number of the measured data is obtained. When the second prediction accuracy of at least t measured data is still greater than the error range, step S2 is repeated to re-acquire the optimal BP neural network. Otherwise, the optimal BP neural network after the secondary training is used as the loose circle prediction model.

[0034] As a preferred technical solution of the present invention, the step S4 further includes: inputting the measured data of the mine into the loosening zone prediction model and obtaining the prediction result, and displaying the prediction result on a display.

[0035] As a preferred technical solution of the present invention, in step S2, the absolute mean error MAE and the root mean square error RMSE are used to evaluate the optimal fitness, and the root mean square error RMSE and the absolute mean error MAE are calculated as follows:

[0036]

[0037] In the formula, RMSE is the root mean square error, MAE is the absolute mean error, and Y real,i For each actual value, Y predict,i is the predicted value corresponding to the actual value, n is the number of points, Y mean is the average value.

[0038] The present invention also provides a loose circle prediction system based on the GA-BP algorithm, the system is used to implement the above method, and the system includes:

[0039] A processing module, used to use the measured ground stress, tunnel span, excavation cross-sectional area, uniaxial compressive strength and joint development degree of the mine as inputs of the neural network, normalize all the measured data, and divide the measured data into a first group and a second group;

[0040] A creation unit, used for creating a BP neural network and initializing the BP neural network;

[0041] A generating unit, configured to randomly generate a plurality of data groups based on individuals of a population, and encode the data groups to obtain a first gene sequence;

[0042] The training unit is configured to: calculate the number of nodes in each hidden layer of the BP neural network, select the preset hyperparameters of the BP neural network as population individuals of the genetic algorithm, train the BP neural network based on the first gene sequences and the measured data of the first group, and calculate the fitness and loss difference of the BP neural network, cross and mutate the multiple groups of the first gene sequences corresponding to the optimal fitness and the multiple groups of the first gene sequences corresponding to the minimum loss difference, and iterate through the genetic optimization steps to obtain the optimal BP neural network and the corresponding optimal preset hyperparameters;

[0043] A detection unit, used to save the optimal BP neural network and determine whether the output result of the optimal BP neural network after population iteration meets the error range;

[0044] The determination unit is used to use the optimal BP neural network that meets the error range as a loose circle prediction model, and predict the loose range through the loose circle prediction model.

[0045] The present invention also provides a computer storage medium, wherein the storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute the above method.

[0046] Compared with the prior art, the beneficial effects of the present invention are at least as follows:

[0047] The present invention creates and initializes the BP neural network through a model creation unit, calculates the number of nodes in the hidden layer through an empirical formula, generates multiple random data within the individual value range of the population through a generation unit, encodes multiple data groups composed of multiple random data to obtain a first gene sequence, trains the BP neural network based on the first gene sequence and the first group measured data, and calculates the fitness and loss difference of the trained BP neural network corresponding to each of the first gene sequences, respectively obtains a group of the first gene sequences corresponding to the optimal fitness and b group of the first gene sequences corresponding to the minimum loss difference, mutates the first gene sequence to obtain multiple groups of the second gene sequences and the third gene sequences, crosses the multiple groups of the second gene sequences with the multiple groups of the third gene sequences to obtain multiple groups of fourth gene sequences, and iterates the BP neural network based on the multiple groups of the fourth gene sequences to obtain the optimal BP neural network and the optimal preset hyperparameters of the optimal BP neural network. The technical solution can obtain the optimal BP neural network corresponding to the optimal fitness and the left and right loss differences, which is a method for obtaining a loose network with higher accuracy. The foundation of the loose circle prediction model is laid, and the above-mentioned optimal BP neural network is tested by each measured data of the second group. When the first prediction accuracy of less than k measured data is greater than the above-mentioned error range, the above-mentioned optimal BP neural network is used as the above-mentioned loose circle prediction model; otherwise, it means that the accuracy of the above-mentioned optimal BP neural network is lower than that of the measured data of the second group inputted, and the above-mentioned optimal BP neural network is trained twice by taking the first number of measured data of the second group as training data, and the above-mentioned optimal BP neural network after the second training is tested by using the above-mentioned second number of measured data, and when the second prediction accuracy of at least t measured data is still greater than the above-mentioned error range, the above-mentioned optimal BP neural network is obtained again by repeating the above-mentioned step S2, otherwise, it is considered that the prediction accuracy of the above-mentioned optimal BP neural network after the second training can meet the above-mentioned error range, and the above-mentioned optimal BP neural network after the second training is used as the above-mentioned loose circle prediction model, and a more accurate loose range prediction is obtained by inputting the measured data of the mine into the above-mentioned loose circle prediction model to prevent the occurrence of safety incidents, and the above-mentioned loose circle prediction model with high accuracy is obtained through the mutual cooperation of the above-mentioned technical solutions. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flow chart of the loose circle prediction method based on GA-BP algorithm of the present invention;

[0049] Figure 2 This is a structural diagram of the loose circle prediction system based on the GA-BP algorithm of the present invention;

[0050] Figure 3 Schematic diagram of a BP neural network according to an embodiment of the present invention;

[0051] Figure 4 A population evolution curve diagram provided by an embodiment of the present invention;

[0052] Figure 5 and Figure 6 This is a comparison chart of the prediction results of the genetically optimized BP neural network and the ordinary neural network provided in the embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0054] The present invention uses a BP neural network (GA-BP) optimized by a genetic algorithm to model the range of the loose circle for the first time. During the modeling process, the genetic algorithm can globally obtain the optimal hyperparameters, thereby further improving the training effect of the BP neural network and ultimately obtaining a more accurate prediction effect.

[0055] The present invention provides a loose circle prediction method based on GA-BP algorithm, such as Figure 1 As shown, the method uses the parameters of the BP neural network optimized by the genetic algorithm to establish a prediction model for the range of the loose circle and complete the prediction of the loose circle. It is characterized in that the method includes the following steps:

[0056] Step S1: taking the measured ground stress, tunnel span, excavation cross-sectional area, uniaxial compressive strength and joint development degree of the mine as measured data and using the measured data as input of the BP neural network, normalizing all the measured data, and dividing the measured data into a first group and a second group;

[0057] Specifically, by normalizing the above-mentioned measured data, it is possible to accelerate training, improve the performance of the above-mentioned BP neural network and avoid overfitting. By dividing the above-mentioned measured data into the above-mentioned first group and the above-mentioned second group, and training and testing the BP neural network through the above-mentioned first group and the above-mentioned second group respectively, the above-mentioned BP neural network with higher accuracy can be obtained.

[0058] Step S2: Create a BP neural network, initialize the BP neural network, and calculate the number of nodes in each hidden layer of the BP neural network, select the preset hyperparameters of the BP neural network as the population individuals of the genetic algorithm, randomly generate multiple data groups based on the population individuals through a generation unit, encode the data groups to obtain a first gene sequence, train the BP neural network based on multiple first gene sequences and the measured data of the first group, and calculate the fitness and loss difference of the BP neural network, cross and mutate multiple groups of the first gene sequences corresponding to the optimal fitness and multiple groups of the first gene sequences corresponding to the minimum loss difference, and iterate through the genetic optimization step to obtain the optimal BP neural network and the corresponding optimal preset hyperparameters;

[0059] Specifically, Figure 3 As shown, the BP neural network is created and initialized by a model creation unit, and the initial parameters of the BP neural network are obtained. The initial parameters include the initial number of hidden layers of the BP neural network, the number of nodes in each of the hidden layers, and the weight of each of the nodes and the initial values ​​of other parameters. The number of nodes in the hidden layer is calculated by an empirical formula. The type of activation function of the BP neural network, the number of hidden layers, the number of nodes in each hidden layer, the batch size, the learning rate, the number of iterations and whether to use a constant term as the preset hyperparameters are selected as the above-mentioned population individuals. A plurality of random data within the value range of the above-mentioned population individuals are generated by the above-mentioned generation unit, and the plurality of random data are combined into a plurality of the above-mentioned data groups. The above-mentioned data groups are also encoded to obtain the above-mentioned first gene sequence. The BP neural network is trained based on each of the above-mentioned first gene sequences and the above-mentioned first group measured data. At the same time, each of the above-mentioned first gene sequences is calculated. The fitness and loss difference of the above-mentioned BP neural network after training corresponding to the column are obtained, and the group a of the above-mentioned first gene sequences corresponding to the optimal fitness and the group b of the above-mentioned first gene sequences corresponding to the minimum loss difference are obtained respectively, and the above-mentioned first gene sequences in group a are mutated to obtain multiple groups of the above-mentioned second gene sequences, and the above-mentioned first gene sequences in group b are mutated to obtain multiple groups of the above-mentioned third gene sequences, and the multiple groups of the above-mentioned second gene sequences are crossed with the multiple groups of the above-mentioned third gene sequences to obtain multiple groups of fourth gene sequences, and the above-mentioned BP neural network is iterated successively based on the multiple groups of the above-mentioned fourth gene sequences to obtain the above-mentioned optimal BP neural network and the optimal preset hyperparameters of the above-mentioned optimal BP neural network. The above-mentioned optimal BP neural network includes at least one group of the above-mentioned BP neural network models corresponding to the above-mentioned fourth gene sequences. The above-mentioned technical scheme can obtain the above-mentioned optimal BP neural network corresponding to the optimal fitness and the left and right loss difference, laying a foundation for obtaining a loose circle prediction model with higher accuracy.

[0060] Step S3: saving the optimal BP neural network, and determining whether the output result of the optimal BP neural network after population iteration satisfies the error range;

[0061] Specifically, by inputting each measured data of the above-mentioned second group into the above-mentioned optimal BP neural network, and based on the difference between the above-mentioned first prediction result output by the above-mentioned optimal BP neural network and the actual loose range result corresponding to the above-mentioned measured data input, the first prediction accuracy of the measured data input into the above-mentioned optimal BP neural network is obtained, and when the first prediction accuracy of less than k of the above-mentioned measured data is greater than the above-mentioned error range, the above-mentioned optimal BP neural network is used as the above-mentioned loose circle prediction model; conversely, when the first prediction accuracy of at least k of the above-mentioned measured data is greater than the above-mentioned error range, it means that the accuracy of the above-mentioned optimal BP neural network relative to the above-mentioned measured data of the second group input is low, which may be due to the inaccuracy of the training data. Balance, therefore, by taking the first number of measured data of the second group as training data, the above-mentioned optimal BP neural network is retrained, and the above-mentioned second number of measured data is used to test the above-mentioned optimal BP neural network after the second training, when there are still at least t measured data with a second prediction accuracy greater than the above-mentioned error range, the above-mentioned optimal BP neural network is re-obtained by repeating the above-mentioned step S2, and if the second prediction accuracy of no more than t measured data is greater than the above-mentioned error range after the second training, it is considered that the prediction accuracy of the above-mentioned optimal BP neural network after the second training can meet the above-mentioned error range, and the above-mentioned optimal BP neural network after the second training is used as the above-mentioned loose circle prediction model.

[0062] Step S4: taking the optimal BP neural network that satisfies the error range as a loose circle prediction model, and predicting the loose range through the loose circle prediction model.

[0063] Specifically, through the above technical solution, it is possible to obtain a more accurate loosening range prediction by inputting the measured data of the mine into the above loosening zone prediction model, thereby preventing the occurrence of safety incidents.

[0064] Furthermore, in step S1, the measured data of the mine is normalized, and the expression is:

[0065] Y input =(Y input -Y min ) / (Y max -Y min )

[0066] Where Y input is the measured data to be normalized, T max is the maximum value of the measured data, Y min is the minimum value of the measured data;

[0067] In step S2, an empirical formula is used to calculate the number of hidden layer nodes, and the expression is:

[0068]

[0069] In the formula, Num hidden is the number of hidden layer nodes, l is the number of input layer nodes, d is the number of output layer nodes, r is the number of hidden layers, and the range of r is [1,10].

[0070] Specifically, through the above technical scheme, the normalized measured data can be obtained, the training can be accelerated, the performance of the BP neural network can be improved and overfitting can be avoided. The estimated value of the number of nodes in the hidden layer can be calculated by the number of hidden layers, the number of input layer nodes and the number of output layer nodes, which provides a basis for obtaining the precise number of hidden layers and improves the convergence speed.

[0071] Furthermore, the step S2 comprises the following steps:

[0072] Step S21: creating and initializing the BP neural network, and selecting preset hyperparameters of the BP neural network as population individuals of the genetic algorithm, wherein the preset hyperparameters include the type of activation function, the number of hidden layers, the number of nodes in each hidden layer, the batch size, the learning rate, the number of iterations, and whether to use a constant term;

[0073] Step S22: Generate multiple data of each individual of the population by the generating unit, and randomly combine the multiple data of the individuals of the population into multiple data groups, perform binary encoding on the data in the data groups to obtain multiple first gene sequences, wherein the number of hidden layers in the first gene sequence is a positive integer greater than or equal to 1 and less than or equal to 10, and the number of nodes in each hidden layer is within a preset range near the estimated value;

[0074] Specifically, Figure 3As shown, the BP neural network after initialization and the initialization parameters are obtained by creating and initializing the BP neural network. In order to obtain a BP neural network with better performance, the parameters of the BP neural network are optimized by a genetic algorithm. First, the preset hyperparameters are selected as the population individuals of the genetic algorithm, and multiple data of the population individuals are generated by a generation unit, and the multiple data of the population individuals are randomly combined into multiple groups of the data groups. The data groups are binary-encoded to obtain the multiple groups of the first gene sequences. The number of hidden layers in the population and the number of nodes in each hidden layer are limited to the range, for example: the difference between the value of each hidden layer in the first gene sequence and the corresponding estimated value is less than or equal to a first threshold, and the value of the first threshold is 4. Through the technical solution, not only the convergence speed of the BP neural network based on the measured data of the first gene sequence and the first group is improved, but also the accuracy of the BP neural network is improved.

[0075] Step S23: Train the BP neural network based on the first gene sequence and the measured data of the first group, calculate the fitness and the loss difference of each first gene sequence corresponding to the BP neural network, and obtain the first gene sequence of group a with the best fitness and the first gene sequence of group b with the smallest loss difference.

[0076] Specifically, since fitness and loss difference are important indicators for evaluating a neural network, when the BP neural network is trained based on the measured data of the first gene sequence and the first group, wherein the measured data also includes the actual loosening range result corresponding to the measured data, the fitness and loss difference of each of the first gene sequences corresponding to the BP neural network are calculated respectively, and the first gene sequence of group a with the best fitness and the first gene sequence of group b with the smallest loss difference are obtained respectively. Since the loss difference of the BP neural network corresponding to the first gene sequence with higher fitness is not necessarily smaller, and conversely, the fitness of the BP neural network corresponding to the first gene sequence with smaller loss difference is not necessarily high, therefore, by obtaining the first gene sequence of group a with the best fitness and the first gene sequence of group b with the smallest loss difference as seeds, the foundation is laid for further obtaining the fourth gene sequence with better fitness and loss difference through mutation crossover of the heritage algorithm, thereby obtaining a more accurate loosening circle prediction model.

[0077] Furthermore, the step S23 further includes a step S24:

[0078] The first gene sequence of group a with the best fitness and the first gene sequence of group b with the smallest loss difference are mutated according to different proportions of mutated individuals within a first preset range to obtain multiple second gene sequences and multiple third gene sequences. When the high position of any individual in the second gene sequence is different from that of the corresponding individual in the third gene sequence, the high position is exchanged, and when the high position is the same, the low position is cross-exchanged to obtain the fourth gene sequence, the BP neural network is optimized based on each of the fourth gene sequences, and the BP neural network model with the best fitness and the loss difference both within the second preset range is obtained as the optimal BP neural network.

[0079] Specifically, the first gene sequences of group a with the best fitness and group b with the smallest loss difference are mutated according to different proportions of mutated individuals, that is, the proportion of mutated individuals in the total number of individuals in the population is different each time, and each of the first gene sequences is mutated within a set range. Since the first gene sequences of group a and group b have good fitness and loss difference under the current values, the values ​​nearby may have good or even better fitness and loss difference. Therefore, the first gene sequences of group a and group b need to mutate within a nearby first preset range and obtain multiple The second gene sequence and multiple groups of the third gene sequences are combined, and since the encoding of each individual in the third gene sequence and the second gene sequence is binary encoding, for example: 1001, the upper two bits can better reflect the size of the data. Therefore, when the corresponding high bits of any individual in any second gene sequence are different from those of the same individual in any third gene sequence, the fourth gene sequence is obtained by cross-changing the high bits, and when the high bits are the same, the fourth gene sequence is obtained by cross-changing the low bits, and the BP neural network is optimized based on the fourth gene sequence, and at least one of the optimal BP neural networks whose optimal fitness and loss difference are within the second preset range is obtained, such as Figure 4 As shown, it is a schematic diagram of the change of fitness according to different numbers of iterations. Through the above technical solution, the above optimal BP neural network with good fitness and loss difference can be obtained, laying the foundation for obtaining an accurate loose circle prediction model.

[0080] Further, calculating the fitness of the BP neural network includes:

[0081] The BP neural network has n inputs, m outputs, and p nodes in the hidden layer. The output of the hidden layer is T j , the hidden layer threshold is θ j , the transfer function of the hidden layer is F1, and the threshold of the output layer is θ k , the transfer function of the output layer is F2, and the weight from the output layer to the hidden layer is w ij, the weight from the hidden layer to the output layer is w jk , and get the network output O m , the expected output is V m , the output of the jth neuron in the hidden layer is expressed as:

[0082]

[0083] In the formula, S i Represents input data; i = 1, 2…n; j = 1, 2…p

[0084] Calculate the output O of each output layer neuron k , the expression is:

[0085]

[0086] Where, k = 1, 2…m;

[0087] The error function is obtained by using the obtained prediction results and actual data. The error function formula is:

[0088]

[0089] In the formula, v k It represents the actual data value corresponding to the prediction result, and the error value E of the BP neural network is used as the fitness of the BP neural network.

[0090] Specifically, through the above technical solution, a fitness calculation method of the above BP neural network can be obtained, and the performance of the above BP neural network can be evaluated by the calculated fitness, providing an evaluation basis for obtaining the above BP neural network with higher accuracy.

[0091] Further, the step S3 includes:

[0092] Each of the measured data of the second group is input into the optimal BP neural network, and a first prediction result corresponding to the measured data is obtained. According to the difference between the first prediction result and the actual loose range result corresponding to the measured data, a first prediction accuracy of the measured data is obtained. When the first prediction accuracy of less than k measured data is greater than the error range, the optimal BP neural network is used as the loose circle prediction model. When the first prediction accuracy of at least k measured data is greater than the error range, the first number of the measured data of the second group is used as training data to train the optimal BP neural network twice. During the secondary training, the loss difference of the optimal BP neural network is calculated and the weight of the optimal BP neural network is calculated and adjusted in combination with the back propagation algorithm. The second number of the measured data remaining after removing the first number of the measured data from the second group is input into the optimal BP neural network after the secondary training, and the second prediction accuracy of the second number of the measured data is obtained. When the second prediction accuracy of at least t measured data is still greater than the error range, step S2 is repeated to re-acquire the optimal BP neural network. Otherwise, the optimal BP neural network after the secondary training is used as the loose circle prediction model.

[0093] Specifically, by inputting each measured data of the above-mentioned second group into the above-mentioned optimal BP neural network, and based on the difference between the above-mentioned first prediction result output by the above-mentioned optimal BP neural network and the actual loose range result corresponding to the input above-mentioned measured data, the first prediction accuracy of the measured data input into the above-mentioned optimal BP neural network is obtained. When the first prediction accuracy of less than k of the above-mentioned measured data is greater than the above-mentioned error range, wherein the value of k can be set according to the accuracy requirement of the above-mentioned optimal BP neural network, the above-mentioned optimal BP neural network is used as the above-mentioned loose circle prediction model; conversely, when the first prediction accuracy of at least k of the above-mentioned measured data is greater than the above-mentioned error range, it means that the accuracy of the above-mentioned optimal BP neural network relative to the above-mentioned input second group of measured data is lower, which may be caused by the imbalance of training data. Therefore, by taking the first number of measured data of the above-mentioned second group as The above-mentioned optimal BP neural network is trained twice with the training data, and the above-mentioned second number of measured data is used to test the above-mentioned optimal BP neural network after the second training. When the second prediction accuracy of at least t measured data is still greater than the above-mentioned error range, it means that the requirement of the above-mentioned error range cannot be met by increasing the above-mentioned first number of training data and adjusting the weights of the above-mentioned optimal BP neural network. At this time, it is possible that the prediction accuracy of the above-mentioned optimal BP neural network cannot meet the requirement of the above-mentioned error range. Therefore, the above-mentioned optimal BP neural network is re-obtained by repeating the above-mentioned step S2. If the second prediction accuracy of no more than t measured data is greater than the above-mentioned error range after the second training, it is considered that the prediction accuracy of the above-mentioned optimal BP neural network after the second training can meet the above-mentioned error range, and the above-mentioned optimal BP neural network after the second training is used as the above-mentioned loose circle prediction model.

[0094] Furthermore, the step S4 also includes: inputting measured data of the mine into the loose zone prediction model to obtain prediction results, and displaying the prediction results on a display.

[0095] Specifically, through the above technical solution, the above prediction results can be viewed more intuitively.

[0096] Further, in step S2, the optimal fitness is evaluated using the absolute mean error MAE and the root mean square error RMSE, and the root mean square error RMSE and the absolute mean error MAE are calculated using the following formulas:

[0097]

[0098] In the formula, RMSE is the root mean square error, MAE is the absolute mean error, and Y real,i For each actual value, Y predict,i is the predicted value corresponding to the actual value, n is the number of points, Y mean is the average value.

[0099] The present invention also provides a loose circle prediction system based on GA-BP algorithm, and the system is used to implement the above method, such as Figure 2 As shown, the system comprises:

[0100] A processing module, used to use the measured ground stress, tunnel span, excavation cross-sectional area, uniaxial compressive strength and joint development degree of the mine as inputs of the neural network, normalize all the measured data, and divide the measured data into a first group and a second group;

[0101] A creation unit, used for creating a BP neural network and initializing the BP neural network;

[0102] A generating unit, configured to randomly generate a plurality of data groups based on individuals of a population, and encode the data groups to obtain a first gene sequence;

[0103] The training unit is configured to: calculate the number of nodes in each hidden layer of the BP neural network, select the preset hyperparameters of the BP neural network as population individuals of the genetic algorithm, train the BP neural network based on the first gene sequences and the measured data of the first group, and calculate the fitness and loss difference of the BP neural network, cross and mutate the multiple groups of the first gene sequences corresponding to the optimal fitness and the multiple groups of the first gene sequences corresponding to the minimum loss difference, and iterate through the genetic optimization steps to obtain the optimal BP neural network and the corresponding optimal preset hyperparameters;

[0104] A detection unit, used to save the optimal BP neural network and determine whether the output result of the optimal BP neural network after population iteration meets the error range;

[0105] The determination unit is used to use the optimal BP neural network that meets the error range as a loose circle prediction model, and predict the loose range through the loose circle prediction model.

[0106] The present invention also provides a computer storage medium, wherein the storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute the above method.

[0107] The loose zone prediction model of BP neural network optimized by genetic algorithm is used to predict the range of loose zone and compare it with the prediction results of traditional BP neural network. Figure 5 and Figure 6 As shown in the figure, they are the actual values ​​of the influencing factors of the loosening zone measured in the mine and the prediction results of the loosening zone model optimized by the genetic algorithm. Figure 5 and Figure 6It can be seen that the prediction results of the present invention are better than those of the traditional prediction model. In addition, the root mean square error and absolute average error of the two models are compared. From the comparison results, it can be seen that the root mean square error and absolute average error of the prediction results obtained by the loose circle range prediction method of the genetic algorithm optimized neural network proposed in the present invention are 0.0996 and 0.0856, respectively, which are much lower than 0.1552 and 0.1447 of the BP neural network. The comparison results show that the proposed new method has better prediction performance.

[0108] In summary, the present invention creates and initializes the above-mentioned BP neural network through a model creation unit, calculates the number of nodes of the above-mentioned hidden layer through an empirical formula, and also generates multiple random data within the value range of the above-mentioned population individuals through a generation unit, and encodes multiple data groups composed of multiple random data to obtain a first gene sequence, and trains the BP neural network based on the above-mentioned first gene sequence and the first group measured data, and also calculates the fitness and loss difference of the above-mentioned BP neural network after training corresponding to each of the above-mentioned first gene sequences, and obtains the group a of the above-mentioned first gene sequences corresponding to the optimal fitness and the group b of the above-mentioned first gene sequences corresponding to the minimum loss difference, respectively, and mutates the above-mentioned first gene sequence to obtain multiple groups of the above-mentioned second gene sequences and the above-mentioned third gene sequences, and crosses the multiple groups of the above-mentioned second gene sequences with the multiple groups of the above-mentioned third gene sequences to obtain multiple groups of fourth gene sequences, and iterates the above-mentioned BP neural network based on the multiple groups of the above-mentioned fourth gene sequences to obtain the above-mentioned optimal BP neural network and the optimal preset hyperparameters of the above-mentioned optimal BP neural network. The above-mentioned technical scheme can obtain the above-mentioned optimal BP neural network corresponding to the optimal fitness and the left and right loss differences, in order to obtain a high-precision The foundation of the loose circle prediction model is laid, and the above-mentioned optimal BP neural network is tested by each measured data of the second group. When the first prediction accuracy of less than k measured data is greater than the above-mentioned error range, the above-mentioned optimal BP neural network is used as the above-mentioned loose circle prediction model; otherwise, it means that the accuracy of the above-mentioned optimal BP neural network relative to the measured data of the second group input is lower, and the above-mentioned optimal BP neural network is trained twice by taking the first number of measured data of the second group as training data, and the above-mentioned optimal BP neural network after the second training is tested by using the above-mentioned second number of measured data. When the second prediction accuracy of at least t measured data is still greater than the above-mentioned error range, the above-mentioned optimal BP neural network is obtained again by repeating the above-mentioned step S2. Otherwise, it is considered that the prediction accuracy of the above-mentioned optimal BP neural network after the second training can meet the above-mentioned error range, and the above-mentioned optimal BP neural network after the second training is used as the above-mentioned loose circle prediction model. By inputting the measured data of the mine into the above-mentioned loose circle prediction model, a more accurate loose range prediction is obtained to prevent the occurrence of safety incidents, and the above-mentioned loose circle prediction model with high accuracy is obtained through the mutual cooperation of the above-mentioned technical solutions.

[0109] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0110] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

[0111] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A loose circle prediction method based on GA-BP algorithm, wherein the method uses the parameters of the BP neural network optimized by the genetic algorithm to establish a prediction model for the range of the loose circle and complete the prediction of the loose circle, and is characterized in that: The method comprises the following steps: Step S1: taking the measured ground stress, tunnel span, excavation cross-sectional area, uniaxial compressive strength and joint development degree of the mine as measured data and using the measured data as input of the BP neural network, normalizing all the measured data, and dividing the measured data into a first group and a second group; Step S2: Create a BP neural network, initialize the BP neural network, and calculate an estimated value of the number of nodes in each hidden layer of the BP neural network, select the preset hyperparameters of the BP neural network as population individuals of the genetic algorithm, randomly generate multiple data groups based on the population individuals through a generation unit, encode the data groups to obtain a first gene sequence, train the BP neural network based on multiple first gene sequences and the measured data of the first group, and calculate the fitness and loss difference of the BP neural network, cross and mutate multiple groups of the first gene sequences corresponding to the optimal fitness and multiple groups of the first gene sequences corresponding to the minimum loss difference, and iterate through genetic optimization steps to obtain the optimal BP neural network and the corresponding optimal preset hyperparameters; Step S3: saving the optimal BP neural network, and determining whether the output result of the optimal BP neural network after population iteration satisfies the error range; Step S4: taking the optimal BP neural network that satisfies the error range as a loose circle prediction model, and predicting the loose range through the loose circle prediction model; Wherein, the step S2 comprises the following steps: Step S21: creating and initializing the BP neural network, and selecting preset hyperparameters of the BP neural network as population individuals of the genetic algorithm, wherein the preset hyperparameters include the type of activation function, the number of hidden layers, the number of nodes in each hidden layer, the batch size, the learning rate, the number of iterations, and whether to use a constant term; Step S22: Generate multiple data of each individual of the population by the generating unit, and randomly combine the multiple data of the individuals of the population into multiple data groups, perform binary encoding on the data in the data groups to obtain multiple first gene sequences, wherein the number of hidden layers in the first gene sequence is a positive integer greater than or equal to 1 and less than or equal to 10, and the number of nodes in each hidden layer is within a preset range near the estimated value; Step S23: training the BP neural network based on the first gene sequence and the measured data of the first group, and calculating the fitness and the loss difference of each first gene sequence corresponding to the BP neural network, and obtaining the first gene sequence of group a with the best fitness and the first gene sequence of group b with the smallest loss difference; The step S23 further includes a step S24: The first gene sequence of group a with the best fitness and the first gene sequence of group b with the smallest loss difference are mutated according to different proportions of mutant individuals within a first preset range to obtain multiple second gene sequences and multiple third gene sequences. When the high position is different, any individual in the second gene sequence is exchanged with the corresponding individual in the third gene sequence. When the high position is the same, the low position is cross-exchanged to obtain a fourth gene sequence. The BP neural network is optimized based on each of the fourth gene sequences, and the BP neural network model with the best fitness and the loss difference both within the second preset range is obtained as the optimal BP neural network.

2. The method according to claim 1, characterized in that In step S1, the measured data is normalized, and the expression is: In the formula, is the measured data to be normalized, is the maximum value of the measured data, is the minimum value of the measured data; In step S2, an empirical formula is used to calculate the number of hidden layer nodes, and the expression is: In the formula, is the number of hidden layer nodes, l is the number of nodes in the input layer, d is the number of nodes in the output layer, r is the number of hidden layers, r The range is [1,10].

3. The method according to claim 1, characterized in that In step S2, the fitness of the BP neural network is calculated. The BP neural network has n inputs, m outputs, and p nodes in the hidden layer. The output of the hidden layer is T j , the hidden layer threshold is , the transfer function of the hidden layer is , the threshold of the output layer is , the transfer function of the output layer is , the weight from the output layer to the hidden layer is , the weight from the hidden layer to the output layer is , and get the network output , the expected output is , the output of the jth neuron in the hidden layer is expressed as: In the formula, Represents input data; =1,2…n;j=1,2…pCalculate the output of each output layer neuron , the expression is: Where, k = 1, 2…m; The error function is obtained by using the obtained prediction results and actual data. The error function formula is: In the formula, It represents the actual data value corresponding to the prediction result, and the error value E of the BP neural network is used as the fitness of the BP neural network.

4. The method according to claim 1, characterized in that The step S3 comprises: Each of the measured data of the second group is input into the optimal BP neural network, and a first prediction result corresponding to the measured data is obtained. According to the difference between the first prediction result and the actual loose range result corresponding to the measured data, a first prediction accuracy of the measured data is obtained. When the first prediction accuracy of less than k measured data is greater than the error range, the optimal BP neural network is used as the loose circle prediction model. When the first prediction accuracy of at least k measured data is greater than the error range, the first number of the measured data of the second group is used as training data to train the optimal BP neural network twice. During the secondary training, the loss difference of the optimal BP neural network is calculated and the weight of the optimal BP neural network is calculated and adjusted in combination with the back propagation algorithm. The second number of the measured data remaining after removing the first number of the measured data from the second group is input into the optimal BP neural network after the secondary training, and the second prediction accuracy of the second number of the measured data is obtained. When the second prediction accuracy of at least t measured data is still greater than the error range, step S2 is repeated to re-acquire the optimal BP neural network. Otherwise, the optimal BP neural network after the secondary training is used as the loose circle prediction model.

5. The method according to claim 1, characterized in that The step S4 also includes: inputting the measured data of the mine into the loose zone prediction model to obtain the prediction result, and displaying the prediction result on the display.

6. The method according to claim 1, characterized in that In step S2, the optimal fitness is evaluated using the absolute mean error (MAE) and the root mean square error (RMSE). The root mean square error (RMSE) and the absolute mean error (MAE) are calculated as follows: In the formula, is the root mean square error, is the absolute mean error, For each actual value, is the predicted value corresponding to the actual value, n is the number of points, is the average value.

7. A loose zone prediction system based on GA-BP algorithm, the system is used to implement the method according to any one of claims 1 to 6, characterized in that: The system comprises: A processing module, used to use the measured ground stress, tunnel span, excavation cross-sectional area, uniaxial compressive strength and joint development degree of the mine as inputs of the neural network, normalize all the measured data, and divide the measured data into a first group and a second group; A creation unit, used for creating a BP neural network and initializing the BP neural network; A generating unit, configured to randomly generate a plurality of data groups based on individuals of a population, and encode the data groups to obtain a first gene sequence; The training unit is configured to: calculate the number of nodes in each hidden layer of the BP neural network, select the preset hyperparameters of the BP neural network as population individuals of the genetic algorithm, train the BP neural network based on the first gene sequences and the measured data of the first group, and calculate the fitness and loss difference of the BP neural network, cross and mutate the multiple groups of the first gene sequences corresponding to the optimal fitness and the multiple groups of the first gene sequences corresponding to the minimum loss difference, and iterate through the genetic optimization steps to obtain the optimal BP neural network and the corresponding optimal preset hyperparameters; A detection unit, used to save the optimal BP neural network and determine whether the output result of the optimal BP neural network after population iteration meets the error range; The determination unit is used to use the optimal BP neural network that meets the error range as a loose circle prediction model, and predict the loose range through the loose circle prediction model.

8. A computer storage medium, characterized in that The storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • GA optimization serial BP network-based cable joint wire temperature prediction method

    CN111598231A

  • Deep coal seam gas content prediction method based on genetic algorithm optimization neural network

    CN117492107A