Soil monitoring data analysis method, device and equipment for mine ecological restoration
By analyzing soil monitoring data and updating parameters in the local model, and data augmentation combined with the generative adversarial network of variable Bayes sparse matrix decomposition, the problems of inefficient data privacy, security and processing in traditional soil monitoring methods are solved. A safe and efficient soil monitoring data analysis is achieved.
Patent Information
- Application Number
- CN202411366744.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-09-29
AI Technical Summary
Traditional soil monitoring methods face difficulties in data collection, data privacy and security issues, and inefficient data processing, especially in multi-site soil monitoring, where centralized and transmission of data increases the risk of data breaches.
By performing model training and parameter updates on each local model, the centralized and transmission of data is avoided, and a generative adversarial network based on variable Bayes sparse matrix decomposition is used for data augmentation to ensure data privacy and security.
It effectively reduces the risk of data leakage, reduces the cost of data transmission and storage, ensures the full utilization of data, and improves the analysis efficiency of soil monitoring data.
Smart Images

Figure CN118885818B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a soil monitoring data analysis method, device and equipment for mine ecological restoration. Background Art
[0002] Mining activities often have serious impacts on the environment, leading to soil degradation, pollution, and ecosystem damage. In order to effectively carry out ecological restoration, the affected soil needs to be monitored and evaluated in order to formulate appropriate restoration strategies. However, traditional soil monitoring methods face challenges such as data collection difficulties, data privacy and security issues, and inefficient data processing. In addition, due to the complexity and diversity of soil conditions, efficient data analysis methods are needed to process and analyze large amounts of soil monitoring data to ensure the scientificity and effectiveness of restoration measures.
[0003] In related technologies, soil monitoring data from multiple locations usually need to be processed centrally, which not only increases the cost of data transmission and storage, but also brings risks to data privacy and security. The lack of effective data privacy protection measures limits the comprehensive utilization of data. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a soil monitoring data analysis method, device and equipment for mine ecological restoration, which solves the problems of data privacy and data security when conducting soil monitoring in multiple locations, reduces the cost of data transmission and storage, and avoids centralization and transmission of data by performing model training and parameter updating in each local model, effectively reducing the risk of data leakage and ensuring the comprehensive utilization of data.
[0005] In a first aspect, an embodiment of the present invention provides a soil monitoring data analysis method for mine ecological restoration, the method comprising: obtaining soil monitoring data; inputting the soil monitoring data into a pre-trained soil monitoring data analysis model, and outputting soil monitoring data analysis results; the pre-trained soil monitoring data analysis model is trained in the following manner: training multiple local models based on a training data set to obtain respective model parameters; updating parameters based on the model parameters of the multiple local models using a global model of a central server to obtain target model parameters; sending the target model parameters to multiple local models for global iteration until training converges, to obtain pre-trained soil monitoring data. According to the analysis model; the training data set is obtained by labeling, data expansion and feature extraction of multiple soil sample data collected; wherein, the method of data expansion is: using a generative adversarial network based on variational Bayesian sparse matrix decomposition to generate samples to achieve data expansion; the generative adversarial network based on variational Bayesian sparse matrix decomposition includes: a generator and a discriminator; the method of using a generative adversarial network based on variational Bayesian sparse matrix decomposition to generate samples is: initializing the network parameters of the generator and the discriminator; using the self-attention layer to make corresponding adjustments; optimizing the sparse matrix parameters in the generator through the variational Bayesian method, assuming that the sparse matrix of the generator is , the update rule of the sparse matrix is as follows: ;in, is the sparse matrix of the updated generator, is the sparsity adjustment parameter; is the learning rate of the sparse matrix; is the loss function of the generative adversarial network; is the loss function of the generative adversarial network. The gradient of is the generator function; after completing the sparse matrix learning, the adversarial training of the generator and the discriminator is performed; wherein, during the training process of the generator, the sample generation process of the generator is enhanced by the parameters of the updated self-attention layer and optimized by the updated sparse matrix of the generator, which is expressed as the following formula: ;in, represents the bias of the generator; From the prior distribution Random noise extracted from is the Sigmoid activation function.
[0006] In a preferred embodiment of the present invention, the local model is trained as follows: labeling multiple soil sample data collected to obtain a first training data set; performing data expansion on the first training data set to obtain a second training data set; performing feature extraction on the second training data set to obtain a third training data set; and training the local model based on the third training data set.
[0007] In a preferred embodiment of the present invention, the above-mentioned labeling of the collected multiple soil sample data to obtain the first training data set includes: labeling the multiple soil sample data based on pre-set data categories to obtain the first training data set; wherein the data categories include: suitable for remediation, needing further improvement and seriously polluted.
[0008] In a preferred embodiment of the present invention, the data expansion of the first training data set to obtain the second training data set includes: based on the first training data set, using a generative adversarial network based on variational Bayesian sparse matrix decomposition to generate samples to achieve data expansion to obtain the second training data set; the loss function of the generator and the discriminator is expressed by the following formula: ;
[0009] in, Indicates that the input is and When , the loss function of the generated adversarial network Under the constraint of , the generator minimizes the loss function and the discriminator maximizes the loss function; Indicates compliance with a specific distribution; represents the real data sample, Represents the prior distribution Random noise extracted from Represents the prior distribution of real data samples; represents the prior distribution of random noise; express expectations; represents the discriminator function, Represents a generator function.
[0010] In a preferred embodiment of the present invention, the feature extraction of the second training data set to obtain the third training data set includes: extracting features based on the second training data set using a self-evolving genetic algorithm to obtain the third training data set; the training method based on the self-evolving genetic algorithm includes: randomly generating a group of neural network populations; wherein each neural network has randomly initialized weights and structural parameters; performing adaptability evaluation on each neural network, and selecting a neural network that meets pre-set standards based on the result of the adaptability evaluation; performing crossover and mutation operations on the selected neural network to generate a new neural network population; dynamically adjusting the parameters of the activation function of the new neural network based on the feature distribution of the current data to achieve feature extraction to obtain the third training data set; wherein the mutation operation is achieved by adding a small random perturbation, which is expressed as the following formula: , ;in, is the weight of the mutated neural network, is the mutated neural network bias, is the mutation rate, is the variance of the disturbance.
[0011] In a preferred embodiment of the present invention, the feature extraction of the second training data set to obtain the third training data set includes: extracting features based on the second training data set using an autoencoder algorithm based on deep feature reshaping to obtain the third training data set; the training method of the autoencoder algorithm based on deep feature reshaping includes: initializing the parameters of the autoencoder; the autoencoder includes an encoder and a decoder; during the encoder training process, the input data is compressed into a low-dimensional feature representation through forward propagation, and the neural network extracts the corresponding feature information by abstracting and transforming the input data layer by layer; during the decoder training process, the decoder receives the output of the encoder and reconstructs the original input; and the error feedback of the encoder and the decoder is used for collaborative optimization; wherein the forward propagation process is expressed as the following formula: ;in, is the activation function of the autoencoder; is the input high-dimensional data vector; is the encoded low-dimensional feature vector; Represents a normal distribution with a mean of 0 and a covariance matrix of the identity matrix, which is used to generate noise; is the noise intensity; the activation function of the autoencoder adapts to the characteristic changes of the training data by dynamic adjustment. Let the input of the activation function be for , the activation function calculation method of the autoencoder is expressed as the following formula: , ;in, It is a coefficient that is dynamically adjusted according to the variance of the data; is the parameter to adjust the sensitivity; is the variance of the input data; is the variance threshold; is the ReLU activation function, is the Sigmoid activation function.
[0012] In a preferred embodiment of the present invention, the local model is trained based on the third training data set, including: based on the third training data set, the local model is trained using a conflict-driven quantum state deep neural decision tree algorithm; the training method of the conflict-driven quantum state deep neural decision tree algorithm includes: initializing all decision nodes of the neural decision tree to quantum states; starting from the root node of the neural decision tree, gradually adding decision nodes; evaluating each decision node to obtain multiple segmentation conditions, and selecting the segmentation condition that maximizes the information gain; at each decision node of the neural decision tree, adjusting the quantum state of the decision node according to the path of the data through the decision node; in the process of constructing the neural decision tree, detecting classification conflicts, and resolving classification conflicts by adjusting the quantum states of relevant decision nodes; pruning the constructed neural decision tree, and completing the training of the local model after pruning is completed.
[0013] In a preferred embodiment of the present invention, the objective function of the pre-trained soil monitoring data analysis model is expressed by the following formula: , ;in, is the objective function of the pre-trained soil monitoring data analysis model, are model parameters, is the model parameter For The loss prediction of sample data is is the training loss, For the The sample characteristics of the sample data are No. The labels of sample data; the objective function of the local model is expressed by the following formula: ;in, For the The number of samples of the local model, For the The objective function of the local model is For the The data distribution of each node.
[0014] In a second aspect, an embodiment of the present invention further provides a soil monitoring data analysis device for mine ecological restoration, comprising: a soil monitoring data acquisition module for acquiring soil monitoring data; a soil monitoring data analysis module for inputting soil monitoring data into a pre-trained soil monitoring data analysis model and outputting soil monitoring data analysis results; the pre-trained soil monitoring data analysis model is trained in the following manner: training multiple local models based on training data sets to obtain respective model parameters; updating parameters based on the model parameters of the multiple local models using the global model of the central server to obtain target model parameters; sending the target model parameters to multiple local models for global iteration until the training converges. A pre-trained soil monitoring data analysis model is obtained; the training data set is obtained by labeling, data expansion and feature extraction of multiple soil sample data collected; wherein, the method of data expansion is: using a generative adversarial network based on variational Bayesian sparse matrix decomposition to generate samples to achieve data expansion; the generative adversarial network based on variational Bayesian sparse matrix decomposition includes: a generator and a discriminator; the method of using a generative adversarial network based on variational Bayesian sparse matrix decomposition to generate samples is: initializing and setting the network parameters of the generator and the discriminator; using the self-attention layer to make corresponding adjustments; optimizing the sparse matrix parameters in the generator through the variational Bayesian method, assuming that the sparse matrix of the generator is , the update rule of the sparse matrix is as follows: ;in, is the sparse matrix of the updated generator, is the sparsity adjustment parameter; is the learning rate of the sparse matrix; is the loss function of the generative adversarial network; is the loss function of the generative adversarial network. The gradient of is the generator function; after completing the sparse matrix learning, the adversarial training of the generator and the discriminator is performed; wherein, during the training process of the generator, the sample generation process of the generator is enhanced by the parameters of the updated self-attention layer and optimized by the updated sparse matrix of the generator, which is expressed as the following formula: ;in, represents the bias of the generator; From the prior distribution Random noise extracted from is the Sigmoid activation function.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the soil monitoring data analysis method for mine ecological restoration of the first aspect.
[0016] The embodiments of the present invention bring the following beneficial effects:
[0017] The embodiment of the present invention provides a soil monitoring data analysis method, device and equipment for mine ecological restoration. By acquiring soil monitoring data, the soil monitoring data is input into a pre-trained soil monitoring data analysis model, and the soil monitoring data analysis result is output. Among them, the training method of the pre-trained soil monitoring data analysis model is: by training multiple local models based on training data sets to obtain respective model parameters; based on the model parameters of each of the multiple local models, the global model of the central server is used to update the parameters to obtain the target model parameters; the target model parameters are sent to multiple local models for global iteration until the training converges, and the pre-trained soil monitoring data analysis model is obtained. The training data set is obtained after labeling, data expansion and feature extraction of multiple soil sample data collected; wherein, the method of data expansion is: using a generative adversarial network based on variational Bayesian sparse matrix decomposition to generate samples to achieve data expansion. In this method, the problems of data privacy and data security when soil monitoring is carried out at multiple locations are solved, the cost of data transmission and storage is reduced, and the centralization and transmission of data are avoided by performing model training and parameter update in each local model, effectively reducing the risk of data leakage and ensuring the comprehensive utilization of data.
[0018] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.
[0019] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1A flow chart of a soil monitoring data analysis method for mine ecological restoration provided by an embodiment of the present invention;
[0022] Figure 2 A model training architecture for distributed federated learning provided by an embodiment of the present invention;
[0023] Figure 3 A flow chart of another soil monitoring data analysis method for mine ecological restoration provided by an embodiment of the present invention;
[0024] Figure 4 A schematic diagram of the structure of a soil monitoring data analysis device for mine ecological restoration provided by an embodiment of the present invention;
[0025] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] Mining activities often have serious impacts on the environment, leading to soil degradation, pollution, and ecosystem damage. In order to effectively carry out ecological restoration, the affected soil needs to be monitored and evaluated in order to formulate appropriate restoration strategies. However, traditional soil monitoring methods face challenges such as data collection difficulties, data privacy and security issues, and inefficient data processing. In addition, due to the complexity and diversity of soil conditions, efficient data analysis methods are needed to process and analyze large amounts of soil monitoring data to ensure the scientificity and effectiveness of restoration measures.
[0028] In related technologies, soil monitoring data from multiple locations usually need to be processed centrally, which not only increases the cost of data transmission and storage, but also brings risks to data privacy and security. The lack of effective data privacy protection measures limits the comprehensive utilization of data.
[0029] Based on this, the embodiment of the present invention provides a soil monitoring data analysis method, device and equipment for mine ecological restoration. It can obtain soil monitoring data, input the soil monitoring data into a pre-trained soil monitoring data analysis model, and output the soil monitoring data analysis results. Among them, the training method of the pre-trained soil monitoring data analysis model is: training multiple local models based on the training data set to obtain their respective model parameters; based on the model parameters of each of the multiple local models, the global model of the central server is used to update the parameters to obtain the target model parameters; the target model parameters are sent to the multiple local models for global iteration until the training converges, and the pre-trained soil monitoring data analysis model is obtained. The training data set is obtained after labeling, data expansion and feature extraction of multiple collected soil sample data; wherein, the method of data expansion is: using a generative adversarial network based on variational Bayesian sparse matrix decomposition to generate samples to achieve data expansion. This method solves the problems of data privacy and data security when conducting soil monitoring in multiple locations, reduces the cost of data transmission and storage, and avoids the centralization and transmission of data by performing model training and parameter updates in each local model, effectively reducing the risk of data leakage and ensuring the comprehensive utilization of data.
[0030] To facilitate understanding of this embodiment, a soil monitoring data analysis method for mine ecological restoration disclosed in an embodiment of the present invention is first introduced in detail.
[0031] Example 1
[0032] The embodiment of the present invention provides a soil monitoring data analysis method for mine ecological restoration. Figure 1 The present invention provides a flow chart of a soil monitoring data analysis method for mine ecological restoration. Figure 1 As shown, the soil monitoring data analysis method for mine ecological restoration may include the following steps:
[0033] Step S101, obtaining soil monitoring data.
[0034] Among them, soil monitoring data includes but is not limited to: multi-dimensional information such as soil chemical composition, physical properties, biological activity, for example, soil pH value, soil organic matter content, soil moisture content, soil heavy metal content, soil nitrogen, phosphorus, potassium content, soil density, soil temperature, soil conductivity, total soil bacteria, soil particle size, etc.
[0035] Step S102: input the soil monitoring data into a pre-trained soil monitoring data analysis model, and output the soil monitoring data analysis results.
[0036] Among them, the results of soil monitoring data analysis can be one of the following: suitable for restoration, needs further improvement, and severely polluted.
[0037] Among them, the training method of the pre-trained soil monitoring data analysis model is: training multiple local models based on the training data set to obtain their respective model parameters; using the global model of the central server to update the parameters based on the model parameters of each of the multiple local models to obtain the target model parameters; sending the target model parameters to multiple local models for global iteration until the training converges to obtain the pre-trained soil monitoring data analysis model.
[0038] Among them, the training data set is obtained after labeling, data expansion and feature extraction of multiple soil sample data collected; wherein, the method of data expansion is: using a generative adversarial network based on variational Bayesian sparse matrix decomposition to generate samples to achieve data expansion. The specific data expansion method will be specifically introduced in subsequent embodiments and will not be repeated here.
[0039] Among them, the local model may include: a model for data annotation, a model for data expansion, and a model for feature extraction.
[0040] Among them, the global model can be tested by inputting test data, and global iterations can be performed through a preset number of iterations. After the training converges, the training is completed to obtain the final global model. If it still does not converge after the preset number of iterations, the local model is adjusted to continue the above steps.
[0041] Among them, the pre-trained soil monitoring data analysis model is obtained through federated learning training. Since the soil monitoring data analysis task requires a large amount of effective training data for feature extraction, analysis and learning, the distributed model training and data mining of multi-node joint models are realized by adopting the distributed federated learning model training architecture, breaking the data resource island problem of the traditional centralized training model and aggregating more effective data. At the same time, the distributed federated learning architecture prevents the leakage of local data of each node. The data is used locally and the model is trained locally, which effectively ensures data security.
[0042] In the federated learning framework, each node does not need to share the training data of its local model. Instead, it trains the local model and sends the updated model to the centralized learning unit for aggregation. For ease of understanding, Figure 2 A model training architecture for distributed federated learning provided in an embodiment of the present invention.
[0043] Specifically, for each global iteration, let the number of nodes be The total number of samples is , and the first The number of samples per node is , then the objective function of federated learning can be defined as the following formulas (1-1) and (1-2):
[0044] (1-1)
[0045] (1-2)
[0046] in, is the objective function of the pre-trained soil monitoring data analysis model, are model parameters, is the model parameter For The loss prediction of sample data is is the training loss, For the The sample characteristics of the sample data are No. labels of sample data. Preferably, the training loss The cross entropy loss function is used for calculation.
[0047] Furthermore, for the For a node, the objective function of the node can be defined by the following formula (2):
[0048] (2)
[0049] in, For the The number of samples of nodes, For the The objective function of each node is For the The data distribution of each node.
[0050] In one embodiment, At the iteration, As an example, let the parameter update method of the first node The parameter gradient of each node is , then in The way the model updates parameters at the iteration can be expressed as the following formula (3):
[0051] (3)
[0052] in, For the The model parameters of the iteration, For the The model parameters of the iteration, is the learning rate for the current parameter update, It is The number of samples per node.
[0053] Furthermore, the parameter update method of the global model of the central server can be expressed as the following formula (4):
[0054] (4)
[0055] in, For the Parameters of the global model of the central server at iteration .
[0056] Furthermore, the iterative operation is repeatedly performed, which means that the training of the global model of the central server and the model of each node is completed.
[0057] In one embodiment, the preset condition for stopping iteration is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 5000 times.
[0058] The soil monitoring data analysis method for mine ecological restoration provided by the embodiment of the present invention can obtain soil monitoring data, input the soil monitoring data into a pre-trained soil monitoring data analysis model, and output the soil monitoring data analysis results. Among them, the training method of the pre-trained soil monitoring data analysis model is: by training multiple local models based on the training data set to obtain their respective model parameters; based on the model parameters of each of the multiple local models, the global model of the central server is used to update the parameters to obtain the target model parameters; the target model parameters are sent to multiple local models for global iteration until the training converges, and the pre-trained soil monitoring data analysis model is obtained, and the training data set is obtained after labeling, data expansion and feature extraction of the collected multiple soil sample data; wherein, the method of data expansion is: using a generative adversarial network based on variational Bayesian sparse matrix decomposition to generate samples to achieve data expansion. In this method, the problems of data privacy and data security when soil monitoring is carried out at multiple locations are solved, the cost of data transmission and storage is reduced, and the centralization and transmission of data are avoided by performing model training and parameter update in each local model, effectively reducing the risk of data leakage and ensuring the comprehensive use of data.
[0059] Example 2
[0060] The embodiment of the present invention also provides another soil monitoring data analysis method for mine ecological restoration; this method is implemented on the basis of the method in the above embodiment; this method focuses on describing the specific implementation method of the local model training method.
[0061] Figure 3A flowchart of another soil monitoring data analysis method for mine ecological restoration provided by an embodiment of the present invention. Specifically, the training data set is obtained by labeling, expanding and extracting features of multiple soil sample data collected, such as Figure 3 As shown, the training method of the local model may include the following steps:
[0062] Step S201: annotate the collected multiple soil sample data to obtain a first training data set.
[0063] Specifically, labeling the collected multiple soil sample data to obtain the first training data set may include: labeling the multiple soil sample data based on pre-set data categories to obtain the first training data set; wherein the data categories include: suitable for restoration, needing further improvement, and severely polluted.
[0064] The data is stored in vector form and in JSON format.
[0065] Among them, the attributes of the data may include: a1 represents pH value, reflecting soil acidity and alkalinity; a2 represents organic matter content, expressed in percentage; a3 represents water content, expressed in percentage; a4 represents heavy metal content, such as lead, cadmium, etc., in mg / kg; a5 represents nitrogen, phosphorus and potassium content, expressed in mg / kg; a6 represents soil density, in g / cm³; a7 represents soil temperature, in ℃; a8 represents soil conductivity, in mS / cm; a9 represents total bacteria content, in CFU / g; a10 represents soil particle size, in microns.
[0066] For example, the specific values of one piece of soil sample data may be: a1=7.5, a2=5%, a3=20%, a4=20mg / kg, a5=150mg / kg, a6=1.3g / cm³, a7=22℃, a8=0.5mS / cm, a9=10000CFU / g, a10=200µm.
[0067] It should be noted that this embodiment is only used to illustrate a data format and type of the present invention. In actual applications, the attributes of data are usually more than 10 attributes, and the number of data attributes may reach dozens or even hundreds, and is not limited to the above examples.
[0068] The labeling of the collected soil sample data may be performed manually or by a pre-trained labeling model, which is not limited here. The labeling types may include: suitable for restoration, further improvement required, and serious pollution.
[0069] Step S202: perform data expansion on the first training data set to obtain a second training data set.
[0070] Specifically, performing data expansion on the first training data set to obtain the second training data set may include: generating samples based on the first training data set using a generative adversarial network based on variational Bayesian sparse matrix decomposition to achieve data expansion to obtain the second training data set.
[0071] The generative adversarial network based on variational Bayesian sparse matrix decomposition consists of two parts: a generator and a discriminator. The generator is responsible for generating new data similar to real data, while the discriminator tries to distinguish the generated data from the real data. The self-attention layer is used in the generator and the discriminator to enable the model to better understand the feature dependencies in the data and be more adaptable to the complex interactions between soil properties.
[0072] Specifically, the training process of the generative adversarial network algorithm based on variational Bayesian sparse matrix decomposition may include the following steps:
[0073] Step A1: Initialize the network parameters of the generator and discriminator. Let the generator be , the discriminator is , the weight of the generator is , the weight of the discriminator is , the initialization process adopts a random initialization method based on normal distribution to ensure the diversity of network parameters and initial nonlinear processing capabilities, which can be expressed as the following formulas (5-1) and (5-2):
[0074] (5-1)
[0075] (5-2)
[0076] in, represents the initialization standard deviation; Indicates compliance with a specific distribution; represents a normal distribution, Indicates that the mean is 0 and the standard deviation is the unit matrix Preferably, Set to 0.01.
[0077] Step A2: Use the self-attention layer to make specific adjustments to make it more adaptable to the key dependencies of soil data features and further improve the relevance and accuracy of data generation. Specifically, the parameters of the self-attention layer are set to , the update rule of the parameters of the self-attention layer is as follows (6):
[0078] (6)
[0079] in, are the parameters of the updated self-attention layer, , and are the query matrix, key matrix, and value matrix, respectively, and these matrices are the feature transformations learned from the previous layer of the generator; is the transpose of the key matrix; represents the dimension of the key matrix; is the Softmax function.
[0080] Furthermore, the calculation method of the query matrix, key matrix and value matrix is expressed as the following formulas (7-1), (7-2) and (7-3):
[0081] (7-1)
[0082] (7-2)
[0083] (7-3)
[0084] in, , and are the weight matrices for query, key, and value, respectively; , and are the bias vectors for query, key, and value respectively; is the input feature matrix.
[0085] Step A3, the sparse matrix parameters in the generator are optimized by the variational Bayes method to ensure that the generated data can capture the key minority features while maintaining data sparsity. Specifically, the sparse matrix of the generator is set to , the update rule of the sparse matrix is the following formula (8):
[0086] (8)
[0087] in, is the sparse matrix of the updated generator, is the sparsity adjustment parameter; is the learning rate of the sparse matrix; is the loss function of the generative adversarial network; is the loss function of the generative adversarial network. The gradient of is a generator function. Preferably, Set to 0.3, Set to 0.7.
[0088] Furthermore, the loss function of the generative adversarial network is about The gradient of is calculated by the chain rule, which is expressed as the following formula (9):
[0089] (9)
[0090] in, is the symbol of partial derivative.
[0091] Step A4: After completing sparse matrix learning, conduct adversarial training of the generator and the discriminator. The generator and the discriminator will improve each other's performance through continuous confrontation. The generator learns to create data that is increasingly difficult for the discriminator to recognize, while the discriminator strives to improve its ability to distinguish true and false data.
[0092] During the training of the generator, the sample generation process of the generator is enhanced by the parameters of the updated self-attention layer and optimized by the sparse matrix of the updated generator, which is expressed as the following formula (10):
[0093] (10)
[0094] in, represents the bias of the generator; From the prior distribution Random noise extracted from is the Sigmoid activation function.
[0095] Furthermore, the generator and discriminator are optimized by the loss function corresponding to the following formula (11):
[0096] (11)
[0097] in, Indicates that the input is and When , the loss function of the generated adversarial network Under the constraint of , the generator minimizes the loss function and the discriminator maximizes the loss function; Indicates compliance with a specific distribution; represents the real data sample, From the prior distribution Random noise extracted from Represents the prior distribution of real data samples; represents the prior distribution of random noise; express expectations; represents the discriminator function, Represents a generator function.
[0098] Step A5, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.
[0099] After the data expansion model is trained, the trained data expansion model is used to increase the number of samples. In one embodiment, assuming that the original collected samples are 800, and the data expansion model expands and generates 200 samples, the expanded data set contains 1000 samples.
[0100] Step S203: extract features from the second training data set to obtain a third training data set.
[0101] It should be noted that the local model needs to extract features from the samples. The embodiment of the present application proposes two types of feature extraction models. When the feature dimension is less than 30, a 6-layer fully connected neural network is selected for feature extraction.
[0102] Among them, the feature extraction object is the sample in the expanded data set. In the prior art, some schemes use neural networks for feature extraction. In some neural network structures, gradient vanishing, gradient explosion or falling into the local optimal solution may be encountered, affecting the stability of training and the performance of the model. In the embodiment of the present application, the training method of the local model adopts a 6-layer fully connected neural network training based on self-evolutionary genetic algorithm optimization. On the basis of the traditional genetic algorithm, an adaptive genetic operation is adopted to dynamically adjust the genetic parameters according to the performance of the network in the feature extraction task, thereby accelerating the convergence speed and improving the quality of the solution, so as to maximize the information transmission and nonlinear expression ability in the feature extraction process.
[0103] Specifically, extracting features from the second training data set to obtain the third training data set may include: extracting features from the second training data set using a self-evolving genetic algorithm to obtain the third training data set.
[0104] The training method based on the self-evolution genetic algorithm may include the following steps:
[0105] Step B1, initialize the population according to the genetic algorithm, randomly generate a group of neural network populations, each network has randomly initialized weights and structural parameters, and each neural network is assumed to have The weight is , each neural network The bias is , the initialization method is expressed as formula (12-1) and (12-2):
[0106] (12-1)
[0107] (12-2)
[0108] in, represents the standard deviation of the initialization weights; represents a normal distribution with a mean of 0 and a standard deviation of 1; and They are The weights and biases of a neural network. Preferably, Set to 0.01.
[0109] Step B2, evaluate the adaptability of each neural network, use its feature extraction ability on the soil monitoring dataset as the standard, calculate the fitness score, and define the fitness function as the following formula (13):
[0110] (13)
[0111] in, for neural networks; is the fitness function; Is the real output and network prediction The mean square error between them is , and the true output is determined by the true label corresponding to the input sample, and the network prediction is determined by the features after the neural network output is classified by the preset Softmax function; is the true eigenvalue; It is a neural network Output.
[0112] Step B3, perform the selection operation, select the neural network with better performance to enter the next generation according to the fitness score, and the selection operation uses the roulette method to select the neural network according to the fitness, which is expressed as the following formula (14):
[0113] (14)
[0114] in, It is a neural network Probability of being selected; Calculate the function for the selection probability; For the population A neural network.
[0115] Step B4, perform crossover and mutation operations on the selected neural network to generate a new network population. Specifically, the crossover operation is performed by randomly selecting two neural networks and exchanging some of their weights and biases, which can be expressed as the following formulas (15-1) and (15-2):
[0116] (15-1)
[0117] (15-2)
[0118] in, is the crossover function, is the first neural network weight, is the second neural network weight, is the first neural network bias, is the second neural network bias, is the crossover neural network weight, is the crossover neural network bias.
[0119] Moreover, the mutation operation is achieved by adding small random perturbations, which can be expressed as the following equations (16-1) and (16-2):
[0120] (16-1)
[0121] (16-2)
[0122] in, is the weight of the mutated neural network, is the mutated neural network bias, is the mutation rate, is the variance of the disturbance. Preferably, Set to 0.01.
[0123] In one embodiment, in real-time crossover function, the weights and biases of the parent neural network are disconnected at a certain point, and the parts are exchanged to generate the offspring, which is expressed as the following equation (17):
[0124] (17)
[0125] in, is a randomly selected intersection point; is a random number in the range [0, 1] used to determine the direction of the crossover.
[0126] Step B5, dynamically adjust the parameters of the activation function in the network according to the characteristic distribution of the current data to adapt to the specific characteristics of the data. Suppose the activation function of the neural network is , whose parameters are dynamically adjusted according to network performance, and the adjustment method is expressed as the following formula (18):
[0127] (18)
[0128] in, is the learning rate for adjusting the activation function parameters; is the adjusted activation function parameter; is the partial derivative of the mean square error with respect to the activation function parameters. Preferably, Set to 0.01.
[0129] Step B6, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.
[0130] It should be noted that when the feature dimension is equal to or higher than 30, the autoencoder is selected for feature extraction. The present invention adopts an autoencoder algorithm based on deep feature reshaping, including an encoder part and a decoder part. The encoder is responsible for compressing the high-dimensional input data into a low-dimensional representation, and the decoder attempts to reconstruct the original input data from this low-dimensional representation. The present invention adopts a hierarchical feature extraction mechanism to enhance the feature processing capability of the autoencoder, so that the autoencoder model can capture more complex nonlinear relationships and more abstract data representations.
[0131] Specifically, performing feature extraction on the second training data set to obtain the third training data set may include: performing feature extraction on the second training data set using an autoencoder algorithm based on deep feature reconstruction to obtain the third training data set.
[0132] Among them, the training method of the autoencoder algorithm based on deep feature reshaping can include the following steps:
[0133] Step C1, initialize the parameters of the autoencoder, and set the weight of the autoencoder to , the bias of the autoencoder is , the initialization method is expressed as the following formula (19-1), (19-2):
[0134] (19-1)
[0135] (19-2)
[0136] in, is the standard deviation of weight initialization; represents a normal distribution with a mean of 0 and a standard deviation of 1; Represents the autoencoder Layer to The weight of the layer; Represents the autoencoder Preferably, Set to 0.1.
[0137] Step C2: During the encoder training phase, the input data is compressed into a low-dimensional feature representation through forward propagation. The neural network extracts key feature information by abstracting and transforming the input data layer by layer. Suppose the input high-dimensional data is , the data features converted into low-dimensional feature space are , the process of data forward propagation is expressed as the following formula (20):
[0138] (20)
[0139] in, is the activation function of the autoencoder; is the input high-dimensional data vector; is the encoded low-dimensional feature vector; Represents a normal distribution with a mean of 0 and a covariance matrix of the identity matrix, which is used to generate noise; is the noise intensity.
[0140] Furthermore, the present invention adopts an adaptive noise injection mechanism to enhance the generalization ability of the model and its ability to resist noise interference, and dynamically adjusts the noise intensity according to the performance of the model during the training process, thereby optimizing the training effect and improving the representation quality of the data. Specifically, the noise intensity The adaptive adjustment is made according to the current reconstruction error of the model. The adjustment method is expressed as the following formula (21):
[0141] (twenty one)
[0142] in, is the baseline value of noise intensity; is the adjustment factor, which controls the decay rate of noise as the error decreases; is the reconstruction error of the current model. Preferably, Set to 1.5, Set to 0.2.
[0143] In one embodiment, the activation function of the autoencoder is dynamically adjusted to adapt to the characteristic changes of the training data. Suppose the input of the activation function is for , the activation function calculation method of the autoencoder is expressed as the following formula (22-1) and (22-2):
[0144] (22-1)
[0145] (22-2)
[0146] in, It is a coefficient that is dynamically adjusted according to the variance of the data; is the parameter to adjust the sensitivity; is the variance of the input data; is the variance threshold; is the ReLU activation function, is the Sigmoid activation function. Preferably, Set to 0.3, Set to 1, Set to 0.5.
[0147] Step C3, in the decoder training phase, the decoder receives the output of the encoder and tries to reconstruct the original input. The present invention adjusts the weight and bias of the decoder by minimizing the reconstruction error so that the output is as close to the original input as possible. Suppose the original data reconstructed from the low-dimensional feature space is , the calculation method is expressed as the following formula (23):
[0148] (twenty three)
[0149] in, and are the weight and bias of the decoder respectively, is the reconstruction function of the decoder. Preferably, Set to the transpose of the encoder weights.
[0150] Step C4, using the error feedback of the encoder and decoder for collaborative optimization, by adjusting the weight of the loss function, dynamically balancing the encoding accuracy and reconstruction quality, and optimizing the performance of the entire network. Suppose the loss function of the autoencoder is , the calculation method is expressed as the following formula (24):
[0151] (twenty four)
[0152] in, is the weight of the reconstruction error term; is the L2 norm; is the weight of the regularization term, used to avoid overfitting; Represents the reconstruction error, which represents the square of the Euclidean distance between the original data and the reconstructed data; is the square of the L2 norm of the weight, which serves as a regularization term.
[0153] Step C5, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 8000 times.
[0154] It should also be noted that, if the feature extraction model of each local node is trained, the trained feature extraction model can be used to perform related decision-making tasks.
[0155] Step S204: training the local model based on the third training data set.
[0156] It should be noted that the data after feature extraction is used to train the classifier model. The embodiment of the present application adopts a conflict-driven quantum state deep neural decision tree algorithm as a classification algorithm, and uses the principle of quantum computing to enhance the decision-making ability of the neural decision tree, so that it can provide more accurate classification when facing complex soil monitoring data.
[0157] Specifically, training the local model based on the third training data set may include: training the local model based on the third training data set using a conflict-driven quantum state deep neural decision tree algorithm.
[0158] Among them, the training method of the conflict-driven quantum state deep neural decision tree algorithm can include the following steps:
[0159] Step D1, initialize all decision nodes of the neural decision tree to quantum state, and set the quantum state of each decision node to , which is initialized to a superposition state, expressed as the following formula (25):
[0160] (25)
[0161] in, and Represents the basic state of the quantum bit.
[0162] Step D2, starting from the root node of the neural decision tree, gradually add decision nodes. At each decision point, the algorithm evaluates all possible segmentation conditions and selects the condition that maximizes the information gain. For each node’s quantum state , the quantum measurement operation is used to determine the node splitting strategy. The quantum measurement operation is expressed as the following formula (26):
[0163] (26)
[0164] in, represents a quantum measurement operation; and Indicates that the corresponding The ground state of the characteristic, Characterized as The right arrow of a feature, Characterized as The left arrow of a feature; is the current feature number; Indicates right arrow. Indicates left arrow.
[0165] Step D3, at each node of the neural decision tree, the quantum state of the node is adjusted according to the path of the data through the node. The present invention uses quantum gates to adjust the state to reflect the decision process from the parent node to the current node, which is expressed as the following formula (27):
[0166] (27)
[0167] in, The quantum state of each decision node after the quantum gate is adjusted; Adjust the function for the quantum state; is the Hamiltonian, which represents the total energy of the quantum system and is proportional to the information gain of the node; It is an element multiplication operation; is the iteration interval; is an imaginary unit; and They are rotating gates around the Y and Z axes, which are used to adjust the quantum state according to the input data; and It is the rotation angle calculated dynamically based on the data characteristics.
[0168] In one embodiment, the calculation method of the rotation angle is expressed as the following equations (28-1) and (28-2):
[0169] (28-1)
[0170] (28-2)
[0171] in, is the hyperbolic tangent function; is the reconstruction error, is the standard deviation of the data, used to adjust the rotation amplitude; is the learning rate parameter, and are the actual input and predicted output respectively.
[0172] Step D4, during the tree construction process, classification conflicts are detected and resolved by adjusting the quantum states of the relevant nodes. If there is a classification conflict, that is, samples of the same category are misclassified at different leaf nodes, the conflict is resolved to ensure that each adjustment is made in the direction of reducing the overall classification error. The adjustment method of the quantum state is expressed as the following formula (29):
[0173] (29)
[0174] in, The quantum state of each decision node after classification conflict adjustment; is the quantum gate operation used to resolve conflicts; It is a Pauli-X gate operation, used to flip the quantum state; It is a control NOT gate, used to realize the The qubit and Conditional logic between qubits; It is the Hadamard gate, which is used to create a superposition state and increase the information entropy of the decision node; It is an identity operation, which means that the The state of a quantum bit.
[0175] Step D5: To prevent overfitting, the constructed neural decision tree is pruned to remove nodes that do not contribute much to classification. The loss function of the neural decision tree is calculated and pruned. The loss function of the neural decision tree is assumed to be , which is calculated based on the classification error and the purity of the quantum state to ensure that the model can both correctly classify and maintain the stability of the quantum state. The calculation method is expressed as the following formula (30):
[0176] (30)
[0177] in, is the L2 norm; is the true label; is the label predicted by the model; and is the coefficient that weighs the classification error and the purity of the quantum state; is the Dirac symbol in quantum coding; Representing quantum states In the ground state The projection amplitude of It is a measure of the purity of the quantum state and is used to assess the uniformity and stability of the quantum state. is the entropy weight; is the quantum entropy. Preferably, Set to 0.3, Set to 0.7.
[0178] Furthermore, the present invention adopts a dynamic quantum entropy weight adjustment mechanism to enhance the model's ability to process uncertain information, and optimizes the information gain calculation of decision tree nodes by adjusting the quantum entropy weight, thereby improving the accuracy and robustness of classification. Specifically, the quantum entropy weight is dynamically adjusted according to the diversity and change rate of the data flow passing through the decision tree node by using an adaptive entropy weight regulator based on data flow changes, and the quantum entropy is defined as , the calculation method is expressed as the following formula (31):
[0179] (31)
[0180] in, is the density matrix of the current node; Represents the trace operation, which is used to calculate the trace of a matrix.
[0181] Furthermore, the entropy weight is adjusted based on the rate of change and diversity of the data, and the calculation method is expressed as the following formula (32):
[0182] (32)
[0183] in, is the entropy weight adjustment factor, which is used to balance the sensitivity of weight adjustment; Indicates passing through node The data change rate is calculated as the average difference between the characteristics of the current batch of data and the previous batch of data; is the data diversity, calculated as the variance of the current data; is a small constant. Preferably, Set to 0.001.
[0184] Based on this, during the pruning process, if the value of the loss function of the neural decision tree decreases after pruning the node, the pruning operation is confirmed.
[0185] Step D6, after the model pruning is completed, the model training is completed. After the model training is completed, the trained feature extraction model is used to process new soil monitoring data samples to obtain soil monitoring data after feature extraction. Further, the soil monitoring data after feature extraction is input into the trained classifier to output the final classification result.
[0186] The soil monitoring data analysis method for mine ecological restoration provided by the embodiment of the present invention adopts a distributed federated learning model training architecture to solve the problems of data privacy and data security when soil monitoring is carried out at multiple locations. By performing model training and parameter updating locally at each node, the centralization and transmission of data are avoided, and the risk of data leakage is effectively reduced. A generative adversarial network based on variational Bayesian sparse matrix decomposition is used for data expansion to overcome the problems of insufficient original data volume and sample imbalance. The adversarial process between the generator and the discriminator produces high-quality and diverse synthetic data, which enhances the training effect of the model. A self-evolving genetic algorithm and an autoencoder algorithm are used for feature extraction and dimensionality reduction to improve the ability to understand soil data features and the processing efficiency. In particular, when the feature dimension is high, the autoencoder effectively compresses and reconstructs data through the encoding and decoding process, thereby maintaining key information while reducing computational complexity. A conflict-driven quantum state deep neural decision tree is used for classification to improve the accuracy and efficiency of classification. By using the principle of quantum computing, the decision tree is enhanced in its ability to process complex data when faced with soil monitoring data with multiple categories and complex decision boundaries.
[0187] Example 3
[0188] Corresponding to the above method embodiment, the embodiment of the present invention provides a soil monitoring data analysis device for mine ecological restoration. Figure 4 A schematic diagram of the structure of a soil monitoring data analysis device for mine ecological restoration provided by an embodiment of the present invention, such as Figure 4 As shown, the soil monitoring data analysis device for mine ecological restoration may include:
[0189] The soil monitoring data acquisition module 301 is used to acquire soil monitoring data.
[0190] The soil monitoring data analysis module 302 is used to input the soil monitoring data into a pre-trained soil monitoring data analysis model and output the soil monitoring data analysis results; the pre-trained soil monitoring data analysis model is trained by: training multiple local models based on the training data set to obtain respective model parameters; updating the parameters based on the model parameters of the multiple local models using the global model of the central server to obtain target model parameters; sending the target model parameters to the multiple local models for global iteration until the training converges to obtain the pre-trained soil monitoring data analysis model;
[0191] The training data set is obtained by labeling, expanding and extracting features of a plurality of soil sample data collected; wherein the data expansion is performed by generating samples using a generative adversarial network based on variational Bayesian sparse matrix decomposition to achieve data expansion; the generative adversarial network based on variational Bayesian sparse matrix decomposition comprises: a generator and a discriminator;
[0192] The method of using the generative adversarial network based on variational Bayesian sparse matrix decomposition to generate samples is as follows: initializing and setting the network parameters of the generator and the discriminator; using the self-attention layer to make corresponding adjustments; optimizing the sparse matrix parameters in the generator by the variational Bayesian method, assuming that the sparse matrix of the generator is , the update rule of the sparse matrix is the following formula: ;in, is the sparse matrix of the updated generator, is the sparsity adjustment parameter; is the learning rate of the sparse matrix; is the loss function of the generative adversarial network; is the loss function of the generative adversarial network. The gradient of is the generator function; after completing the sparse matrix learning, the adversarial training of the generator and the discriminator is performed; wherein, during the training process of the generator, the sample generation process of the generator is enhanced by the updated parameters of the self-attention layer and optimized by the updated sparse matrix of the generator, which is expressed as the following formula: ;in, represents the bias of the generator; From the prior distribution Random noise extracted from is the Sigmoid activation function.
[0193] The soil monitoring data analysis device for mine ecological restoration provided by the embodiment of the present invention can obtain soil monitoring data, input the soil monitoring data into a pre-trained soil monitoring data analysis model, and output the soil monitoring data analysis results. Among them, the training method of the pre-trained soil monitoring data analysis model is: by training multiple local models based on the training data set to obtain their respective model parameters; based on the model parameters of each of the multiple local models, the global model of the central server is used to update the parameters to obtain the target model parameters; the target model parameters are sent to multiple local models for global iteration until the training converges, and the pre-trained soil monitoring data analysis model is obtained, and the training data set is obtained after labeling, data expansion and feature extraction of the collected multiple soil sample data; wherein, the method of data expansion is: using a generative adversarial network based on variational Bayesian sparse matrix decomposition to generate samples to achieve data expansion. In this method, the problems of data privacy and data security when soil monitoring is carried out at multiple locations are solved, the cost of data transmission and storage is reduced, and the centralization and transmission of data are avoided by performing model training and parameter update in each local model, effectively reducing the risk of data leakage and ensuring the comprehensive utilization of data.
[0194] In some embodiments, the training data set is obtained based on labeling, data expansion and feature extraction of multiple collected soil sample data. The soil monitoring data analysis module is also used to label the multiple collected soil sample data to obtain a first training data set; perform data expansion on the first training data set to obtain a second training data set; perform feature extraction on the second training data set to obtain a third training data set; and train the local model based on the third training data set.
[0195] In some embodiments, the soil monitoring data analysis module is further used to label multiple soil sample data based on pre-set data categories to obtain a first training data set; wherein the data categories include: suitable for restoration, requiring further improvement, and severely polluted.
[0196] In some embodiments, the soil monitoring data analysis module is further used to generate samples based on the first training data set using a generative adversarial network based on variational Bayesian sparse matrix decomposition to achieve data expansion to obtain a second training data set; the generative adversarial network based on variational Bayesian sparse matrix decomposition includes: a generator and a discriminator; the loss function of the generator and the discriminator is expressed by the following formula: ;in, Indicates that the input is and When , the loss function of the generated adversarial network Under the constraint of , the generator minimizes the loss function and the discriminator maximizes the loss function; Indicates compliance with a specific distribution; represents the real data sample, Represents the prior distribution Random noise extracted from Represents the prior distribution of real data samples; represents the prior distribution of random noise; express expectations; represents the discriminator function, Represents a generator function.
[0197] In some embodiments, the soil monitoring data analysis module is further used to extract features based on the second training data set using a self-evolving genetic algorithm to obtain a third training data set; the training method based on the self-evolving genetic algorithm includes: randomly generating a group of neural network populations; wherein each neural network has randomly initialized weights and structural parameters; performing adaptability evaluation on each neural network, and selecting a neural network that meets the preset standards based on the results of the adaptability evaluation; performing crossover and mutation operations on the selected neural network to generate a new neural network population; dynamically adjusting the parameters of the activation function of the new neural network based on the feature distribution of the current data to achieve feature extraction to obtain the third training data set; wherein the mutation operation is achieved by adding a small random perturbation, which is expressed as the following formula: , ;in, is the weight of the mutated neural network, is the mutated neural network bias, is the mutation rate, is the variance of the disturbance.
[0198] In some embodiments, the soil monitoring data analysis module is further used to extract features based on the second training data set using an autoencoder algorithm based on deep feature reconstruction to obtain a third training data set; the training method of the autoencoder algorithm based on deep feature reconstruction includes: initializing the parameters of the autoencoder; the autoencoder includes an encoder and a decoder; during the encoder training process, the input data is compressed into a low-dimensional feature representation through forward propagation, and the neural network extracts the corresponding feature information by abstracting and transforming the input data layer by layer; during the decoder training process, the decoder receives the output of the encoder and reconstructs the original input; and the error feedback of the encoder and the decoder is used for collaborative optimization;
[0199] Among them, the forward propagation process is expressed as the following formula: ;in, is the activation function of the autoencoder; is the input high-dimensional data vector; is the encoded low-dimensional feature vector; Represents a normal distribution with a mean of 0 and a covariance matrix of the identity matrix, which is used to generate noise; is the noise intensity; wherein the activation function of the autoencoder adapts to the characteristic changes of the training data by dynamic adjustment. Let the input of the activation function be for , the activation function calculation method of the autoencoder is expressed as the following formula: , ;in, It is a coefficient that is dynamically adjusted according to the variance of the data; is the parameter to adjust the sensitivity; is the variance of the input data; is the threshold of variance; is the ReLU activation function, is the Sigmoid activation function.
[0200] In some embodiments, the soil monitoring data analysis module is also used to train the local model based on the third training data set using a conflict-driven quantum state deep neural decision tree algorithm; the training method of the conflict-driven quantum state deep neural decision tree algorithm includes: initializing all decision nodes of the neural decision tree to quantum states; starting from the root node of the neural decision tree, gradually adding decision nodes; obtaining multiple segmentation conditions based on each decision node evaluation, and selecting the segmentation condition that maximizes the information gain; at each decision node of the neural decision tree, adjusting the quantum state of the decision node according to the path of the data through the decision node; in the process of constructing the neural decision tree, detecting classification conflicts, and resolving classification conflicts by adjusting the quantum states of relevant decision nodes; pruning the constructed neural decision tree, and completing the training of the local model after pruning is completed.
[0201] In some embodiments, the objective function of the pre-trained soil monitoring data analysis model is expressed by the following formula: , ;in, is the objective function of the pre-trained soil monitoring data analysis model, are model parameters, is the model parameter For The loss prediction of sample data is is the training loss, For the The sample characteristics of the sample data are No. The labels of sample data; the objective function of the local model is expressed by the following formula: ;in, For the The number of samples of the local model, For the The objective function of the local model is For the The data distribution of each node.
[0202] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0203] Example 4
[0204] The embodiment of the present invention also provides an electronic device for running the above-mentioned soil monitoring data analysis method for mine ecological restoration; see Figure 5 A structural schematic diagram of an electronic device is shown, which includes a memory 400 and a processor 401, wherein the memory 400 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 401 to implement the above-mentioned soil monitoring data analysis method for mine ecological restoration.
[0205] Further, Figure 5 The electronic device shown further includes a bus 402 and a communication interface 403 , and the processor 401 , the communication interface 403 and the memory 400 are connected via the bus 402 .
[0206] The memory 400 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 403 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 402 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0207] The processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 401. The above processor 401 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 400, and the processor 401 reads the information in the memory 400 and completes the steps of the method of the above embodiment in combination with its hardware.
[0208] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned soil monitoring data analysis method for mine ecological restoration. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0209] The computer program product for the soil monitoring data analysis method for mine ecological restoration provided in the embodiment of the present invention includes a computer-readable storage medium storing a non-volatile program code executable by a processor. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0210] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0211] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A soil monitoring data analysis method for mine ecological restoration, characterized in that: The method comprises: Obtain soil monitoring data; Inputting the soil monitoring data into a pre-trained soil monitoring data analysis model, and outputting soil monitoring data analysis results; The training method of the pre-trained soil monitoring data analysis model is as follows: training multiple local models based on the training data set to obtain respective model parameters; updating the parameters using the global model of the central server based on the model parameters of the multiple local models to obtain target model parameters; sending the target model parameters to the multiple local models for global iteration until the training converges to obtain the pre-trained soil monitoring data analysis model; The training data set is obtained by labeling, expanding and extracting features of a plurality of soil sample data collected; wherein the data expansion is performed by generating samples using a generative adversarial network based on variational Bayesian sparse matrix decomposition to achieve data expansion; the generative adversarial network based on variational Bayesian sparse matrix decomposition comprises: a generator and a discriminator; The method of using the generative adversarial network based on variational Bayesian sparse matrix decomposition to generate samples is as follows: initializing and setting the network parameters of the generator and the discriminator; using the self-attention layer to make corresponding adjustments; optimizing the sparse matrix parameters in the generator by the variational Bayesian method, assuming that the sparse matrix of the generator is , the update rule of the sparse matrix is the following formula: ;in, is the sparse matrix of the updated generator, is the sparsity adjustment parameter; is the learning rate of the sparse matrix; is the loss function of the generative adversarial network; is the loss function of the generative adversarial network. The gradient of is the generator function; is the input feature matrix; after completing the sparse matrix learning, the adversarial training of the generator and the discriminator is performed; wherein, during the training process of the generator, the sample generation process of the generator is enhanced by the updated parameters of the self-attention layer and optimized by the updated sparse matrix of the generator, which is expressed as the following formula: ;in, represents the bias of the generator; From the prior distribution Random noise extracted from is the Sigmoid activation function; is the weight of the generator; are the parameters of the updated self-attention layer.
2. The method according to claim 1, characterized in that The training data set is obtained by labeling, expanding and extracting features of multiple soil sample data collected; the training method of the local model is: Annotating the collected soil sample data to obtain a first training data set; Performing data expansion on the first training data set to obtain a second training data set; Performing feature extraction on the second training data set to obtain a third training data set; The local model is trained based on the third training data set.
3. The method according to claim 2, characterized in that The step of labeling the collected soil sample data to obtain a first training data set includes: Labeling the plurality of soil sample data based on a preset data category to obtain the first training data set; Among them, the data categories include: suitable for repair, needs further improvement and seriously polluted.
4. The method according to claim 2, characterized in that: The step of performing data expansion on the first training data set to obtain a second training data set includes: Based on the first training data set, a generative adversarial network based on variational Bayesian sparse matrix decomposition is used to generate samples to achieve data expansion to obtain a second training data set; The loss functions of the generator and the discriminator are expressed by the following formula: ;in, Indicates that the input is and When , the loss function of the generated adversarial network Under the constraint of , the generator minimizes the loss function and the discriminator maximizes the loss function; Indicates compliance with a specific distribution; represents the real data sample, Represents the prior distribution Random noise extracted from Represents the prior distribution of real data samples; represents the prior distribution of random noise; express expectations; represents the discriminator function, Represents a generator function.
5. The method according to claim 2, characterized in that: The step of extracting features from the second training data set to obtain a third training data set includes: Based on the second training data set, feature extraction is performed using a self-evolving genetic algorithm to obtain a third training data set; The training method based on the self-evolution genetic algorithm includes: Randomly generate a population of neural networks; each neural network has randomly initialized weights and structural parameters; Performing an adaptability evaluation on each of the neural networks, and selecting a neural network that meets a preset standard based on the adaptability evaluation result; Performing crossover and mutation operations on the selected neural network to generate a new neural network population; Dynamically adjusting the parameters of the activation function of the new neural network based on the feature distribution of the current data to achieve feature extraction to obtain a third training data set; The mutation operation is achieved by adding small random perturbations, which can be expressed as the following formula: , ; in, is the weight of the mutated neural network, is the mutated neural network bias, is the mutation rate, is the variance of the disturbance; is the weight of the neural network; is the bias of the neural network; Represents a normal distribution.
6. The method according to claim 2, characterized in that The step of extracting features from the second training data set to obtain a third training data set includes: Based on the second training data set, a third training data set is obtained by performing feature extraction using an autoencoder algorithm based on deep feature reshaping; The training method of the autoencoder algorithm based on deep feature reshaping includes: Initializing parameters of an autoencoder; the autoencoder includes an encoder and a decoder; During the encoder training process, the input data is compressed into a low-dimensional feature representation through forward propagation, and the neural network extracts the corresponding feature information by abstracting and transforming the input data layer by layer; During the training of the decoder, the decoder receives the output of the encoder and reconstructs the original input; Utilize error feedback from encoder and decoder for collaborative optimization; Among them, the forward propagation process is expressed as the following formula: ;in, is the activation function of the autoencoder; is the input high-dimensional data vector; is the encoded low-dimensional feature vector; Represents a normal distribution with a mean of 0 and a covariance matrix of the identity matrix, which is used to generate noise; is the noise intensity; is the weight of the autoencoder; is the bias of the autoencoder; The activation function of the autoencoder is dynamically adjusted to adapt to the characteristic changes of the training data. Suppose the input of the activation function is for , the activation function calculation method of the autoencoder is expressed as the following formula: , ;in, It is a coefficient that is dynamically adjusted according to the variance of the data; is the parameter to adjust the sensitivity; is the variance of the input data; is the threshold of variance; is the ReLU activation function, is the Sigmoid activation function.
7. The method according to claim 2, characterized in that The training of the local model based on the third training data set includes: Based on the third training data set, the local model is trained using a conflict-driven quantum state deep neural decision tree algorithm; The training method of the conflict-driven quantum state deep neural decision tree algorithm includes: Initialize all decision nodes of the neural decision tree to quantum state; Starting from the root node of the neural decision tree, gradually adding decision nodes; Evaluate each decision node to obtain multiple segmentation conditions, and select a segmentation condition that maximizes information gain; At each of the decision nodes in the neural decision tree, adjusting the quantum state of the decision node according to a path of data passing through the decision node; During the construction of the neural decision tree, classification conflicts are detected and resolved by adjusting the quantum states of relevant decision nodes; The constructed neural decision tree is pruned, and after the pruning is completed, the training of the local model is completed.
8. The method according to claim 1, characterized in that The objective function of the pre-trained soil monitoring data analysis model is expressed by the following formula: , ; in, is the objective function of the pre-trained soil monitoring data analysis model, are model parameters, is the model parameter For The loss prediction of sample data is is the training loss, For the The sample characteristics of the sample data are No. The labels of sample data; represents the total number of samples; The objective function of the local model is expressed by the following formula: ; in, For the The number of samples of the local model, For the The objective function of the local model is For the The data distribution of each node.
9. A soil monitoring data analysis device for mine ecological restoration, characterized in that: The device comprises: A soil monitoring data acquisition module is used to acquire soil monitoring data; A soil monitoring data analysis module is used to input the soil monitoring data into a pre-trained soil monitoring data analysis model and output the soil monitoring data analysis results; the pre-trained soil monitoring data analysis model is trained by: training multiple local models based on a training data set to obtain respective model parameters; updating parameters based on the model parameters of the multiple local models using the global model of the central server to obtain target model parameters; sending the target model parameters to the multiple local models for global iteration until the training converges to obtain the pre-trained soil monitoring data analysis model; The training data set is obtained by labeling, expanding and extracting features of a plurality of soil sample data collected; wherein the data expansion is performed by generating samples using a generative adversarial network based on variational Bayesian sparse matrix decomposition to achieve data expansion; the generative adversarial network based on variational Bayesian sparse matrix decomposition comprises: a generator and a discriminator; The method of using the generative adversarial network based on variational Bayesian sparse matrix decomposition to generate samples is as follows: initializing and setting the network parameters of the generator and the discriminator; using the self-attention layer to make corresponding adjustments; optimizing the sparse matrix parameters in the generator by the variational Bayesian method, assuming that the sparse matrix of the generator is , the update rule of the sparse matrix is the following formula: ;in, is the sparse matrix of the updated generator, is the sparsity adjustment parameter; is the learning rate of the sparse matrix; is the loss function of the generative adversarial network; is the loss function of the generative adversarial network. The gradient of is the generator function; is the input feature matrix; after completing the sparse matrix learning, the adversarial training of the generator and the discriminator is performed; wherein, during the training process of the generator, the sample generation process of the generator is enhanced by the updated parameters of the self-attention layer and optimized by the updated sparse matrix of the generator, which is expressed as the following formula: ;in, represents the bias of the generator; From the prior distribution Random noise extracted from is the Sigmoid activation function; is the weight of the generator; are the parameters of the updated self-attention layer.
10. An electronic device, characterized in that: It includes a processor and a memory, the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the soil monitoring data analysis method for mine ecological restoration as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Prognosis prediction and early warning model training method, system and equipment based on super network and federated learning
CN116992980A
Internet of Things equipment safety protection method and device based on distributed AI
CN117336071A