A Juncao production process environmental traceability tracking system
By using the wolf pack algorithm to optimize the isolated forest algorithm and the dung beetle algorithm in the environmental traceability tracking system for the fungus grass production process, the shortcomings in the traceability and operation efficiency of the existing system are solved, and higher abnormal data detection accuracy and traceability are achieved.
Patent Information
- Application Number
- CN202411621178.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-14
AI Technical Summary
The existing environmental traceability tracking system is difficult to address the quality problems that arise during the planting and processing of mushroom grass. The root causes of traceability and tracking are the problems of poor abnormal data distinction ability, poor traceability and low operating efficiency.
A tracing system for the environmental traceability and tracking process of mushroom grass production process is designed, including a data acquisition module, a data analysis module and a traceability and tracking module. Through the abnormal data analysis model that optimizes the isolated forest algorithm based on the wolf pack algorithm, the abnormal data with problems was analyzed, and the fungus environment data was traced through the SVM-LSTM network model optimized by the dung beetle algorithm.
It improves the accuracy and traceability of abnormal data detection, enhances the system's distinction ability and adaptability, and improves the overall operation efficiency.
Smart Images

Figure CN119168668B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of environmental traceability, and in particular to an environmental traceability tracking system for a Juncao production process. Background Art
[0002] Juncao cultivation and processing face a severe challenge - when there is a problem with the quality of Juncao, it is difficult to find the root cause of the problem. This is not only a crisis about quality, but also a severe test of the Juncao cultivation supervision system and technical capabilities. The Juncao production process environmental traceability tracking system is a system used to monitor and record environmental data at all stages of the Juncao production process. The system is designed to ensure production safety, improve product quality, and enhance transparency and trust.
[0003] The existing environmental traceability tracking system can track the production process of each product by testing and recording the environmental data and quality data of Juncao, setting a unique identifier (such as a QR code or barcode) for Juncao or its products, and consumers can scan to obtain detailed information about the product. When the detected environmental parameters and quality data exceed the set range, the system will send an alarm to help managers take timely measures. However, this simple traceability method can only identify data that exceeds the normal threshold, and cannot trace the quality problems that have occurred. When the cause of the Juncao quality problem cannot be traced, it is difficult to provide targeted improvement measures, which increases the detection cost for the cultivation and processing of Juncao. Summary of the invention
[0004] Based on this, it is necessary to propose an environmental traceability tracking system for the Juncao production process, as the existing environmental traceability tracking system is difficult to trace the root causes of quality problems that occur during the Juncao planting and processing process, and has problems such as poor ability to distinguish abnormal data, poor traceability, and low operating efficiency.
[0005] The present invention is achieved through the following technical solutions: a Juncao production process environmental traceability tracking system includes a data acquisition module, a data analysis module and a traceability tracking module.
[0006] The data collection module is used to collect all environmental data and quality data during the growth, processing and sales stages of Juncao.
[0007] The data analysis module includes an abnormal data analysis unit, an analysis model construction unit, a model optimization unit, and a model training unit. The abnormal data analysis unit is used to analyze abnormal data from the collected environmental data and quality data. The analysis model construction unit is used to build a Juncao source tracing analysis model based on the SVM-LSTM network model. The model optimization unit is used to optimize the Juncao source tracing analysis model using the dung beetle algorithm. The model training unit is used to train the optimized Juncao source tracing analysis model and retain the model parameters with the highest accuracy.
[0008] The traceability module includes a marking unit and an environmental traceability unit. The marking unit is used to mark the Juncao production process and record all information from Juncao planting to sales. The environmental traceability unit is used to determine whether the comprehensive importance of abnormal data is higher than the preset importance threshold. If so, the abnormal data is input into the Juncao traceability analysis model to trace the source of the abnormal data.
[0009] The above-mentioned environmental traceability tracking system collects relevant data during the growth, processing, and sales of Juncao, and uses the abnormal data analysis model based on the wolf pack algorithm to optimize the isolation forest algorithm to analyze the abnormal data with problems, so that the global search capability of the isolation forest algorithm is stronger, and it has better discrimination ability and adaptability when detecting abnormal data, thereby improving the accuracy of abnormal detection. The Juncao environmental data is traced through the SVM-LSTM network model optimized by the dung beetle algorithm. The hyperparameters optimized by the dung beetle algorithm can significantly improve the performance of the SVM-LSTM network model, provide higher prediction accuracy and better generalization ability, and improve the overall operation efficiency.
[0010] Furthermore, the data collection module includes a planting environment detection unit, a planting management data collection unit, a Juncao quality detection unit, a processing data collection unit, and a sales data collection unit. The planting environment detection unit is used to collect Juncao planting environment data. The planting management data collection unit is used to collect management data during the Juncao planting process. The Juncao quality detection unit is used to collect Juncao growth quality data. The processing data collection unit is used to collect Juncao processing data from harvesting to processing into finished products. The sales data collection unit is used to collect sales and customer feedback data of Juncao finished products.
[0011] Furthermore, the specific analysis process of the abnormal data analysis unit is as follows:
[0012] Construct a multivariate dataset.
[0013] Construct an abnormal data analysis model based on the isolation forest algorithm.
[0014] The wolf pack algorithm is used to optimize the abnormal data analysis model.
[0015] The abnormal data analysis model is trained using the pre-acquired training set and test set, and the model parameters that meet the accuracy are retained.
[0016] Run the trained anomaly data analysis model on the multivariate dataset and output the anomaly data.
[0017] Furthermore, the specific process of the wolf pack algorithm to optimize the abnormal data analysis model is as follows:
[0018] Calculation Sample The average path length among all decision trees , the formula is:
[0019] In the formula, n is the number of decision trees.
[0020] Setting anomaly score As fitness, the calculation formula is expressed as:
[0021] Where c is a parameter used to control the anomaly score, which is usually set to the estimated proportion of outliers.
[0022] Initialize the wolf pack: randomly generate N wolf positions.
[0023] The wolf with the highest fitness is taken as the leader, and the position of each wolf is updated. The formula is as follows:
[0024] In the formula, is the position vector of the jth wolf at the tth iteration, A and C are coefficient vectors that are dynamically adjusted according to the parameters of the wolf pack algorithm, and D j is the distance vector between the jth wolf and the current best position, D α and D β are the distance vectors between the jth wolf and the leader and the second-best wolf in the wolf pack, respectively.
[0025] After the wolfpack algorithm iteration is completed, the sample with the highest anomaly score pointed to by the position vector is identified as potential anomaly data.
[0026] Furthermore, the specific process of constructing the Juncao source tracing analysis model by the analysis model construction unit is as follows:
[0027] Build a basic SVM network model.
[0028] The output of SVM is used as the input of the LSTM network to build a basic LSTM network model.
[0029] Furthermore, the specific process of the model optimization unit using the dung beetle algorithm to optimize the Juncao source tracing analysis model is as follows:
[0030] Initialize the population: Randomly generate the position of each dung beetle.
[0031] Define the fitness function.
[0032] Find the dung beetle with the best current fitness as the current optimal one.
[0033] Dung beetles perform local exploration: they update their positions based on the experience of the current dung beetle and the current best one.
[0034] The position of the dung beetle is updated according to the fitness of the dung beetle.
[0035] Repeat the above process until the maximum number of iterations is reached, and select the hyperparameter combination corresponding to the dung beetle position with the best fitness as the optimal hyperparameter of the Juncao origin tracing analysis model.
[0036] Furthermore, in the model optimization unit, the mean square error of the prediction accuracy of the Juncao origin tracing analysis model is used as the fitness , the formula is:
[0037] In the formula, MSE () is the mean square error, is the actual value of the Juncao environmental data, is the predicted value of the LSTM network.
[0038] Furthermore, in the model optimization unit, the formula for the local exploration of the dung beetle is expressed as follows:
[0039] In the formula, is the position of the kth dung beetle at the current moment, α is the step size, and 0<α<1, ζ is the disturbance term, which is used to increase the diversity of solutions.
[0040] The formula for updating according to the fitness of the dung beetle is expressed as:
[0041] Where β is the adjustment factor, and β∈[0,1].
[0042] Furthermore, in the environmental traceability tracking unit, the importance of each environmental data is set according to its impact on the quality of Juncao. for:
[0043] In the formula, S is the set of single features, N is the set of all features, and L is the LSTM network model.
[0044] The corresponding comprehensive importance for:
[0045] In the formula, ω m is the weight of each environmental data.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] The environmental tracing system of the present invention collects relevant data during the growth, processing and sale of Juncao, and analyzes the abnormal data with problems through the abnormal data analysis model based on the wolf pack algorithm to optimize the isolated forest algorithm, so that the global search ability of the isolated forest algorithm is stronger, and it has better distinguishing ability and stronger adaptability when detecting abnormal data, and improves the accuracy of abnormal detection. Especially when the quality data of Juncao or Juncao products is abnormal, the Juncao environmental data can also be traced by the SVM-LSTM network model optimized by the dung beetle algorithm. The hyperparameters optimized by the dung beetle algorithm can significantly improve the performance of the SVM-LSTM network model, provide higher prediction accuracy and better generalization ability, and compared with traditional neural networks, the SVM-LSTM network model optimized by the dung beetle algorithm performs better in processing the time series data of the Juncao growth environment, accelerates the convergence speed of the model, makes the training process more efficient, and improves the overall operation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a schematic diagram of the structure of the environmental traceability tracking system for the Juncao production process in Example 1 of the present invention;
[0049] Figure 2 is a processing flow chart of an abnormal data analysis unit;
[0050] Figure 3 Flowchart for constructing the SVM-LSTM network model for the dung beetle algorithm optimization. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0052] It should be noted that when a component is referred to as being "mounted on" another component, it may be directly on the other component or there may be a central component. When a component is considered to be "set on" another component, it may be directly set on the other component or there may be a central component at the same time. When a component is considered to be "fixed to" another component, it may be directly fixed on the other component or there may be a central component at the same time.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "or / and" used herein includes any and all combinations of one or more of the related listed items.
[0054] Example 1: Please refer to Figure 1 This embodiment provides a Juncao production process environmental traceability tracking system, including: a data acquisition module, a data analysis module and a traceability tracking module.
[0055] The data acquisition module is used to collect all environmental data and quality data in the growth, processing and sales stages of Juncao, including a planting environment detection unit, a planting management data acquisition unit, a Juncao quality detection unit, a processing data acquisition unit, and a sales data acquisition unit. Among them, the planting environment detection unit is used to collect environmental data for Juncao planting, including planting geographic coordinates, soil data, atmospheric data, light data, rainfall data, etc. By collecting planting geographic coordinates, the planting point can be traced when quality problems occur during the growth or processing of Juncao, and then the impact of the planting geographical location on the growth process of Juncao can be analyzed, so that more suitable planting points can be selected when Juncao is planted in the future. Soil data generally includes soil pH value, soil type (such as black soil, loess, sandy land, etc.), nutrient content (such as nitrogen, phosphorus, potassium, etc.), organic matter content, etc. According to the different growth quality of Juncao caused by soil data, the soil data most suitable for Juncao growth can be analyzed, and then the soil quality can be adjusted, such as fertilization, irrigation, etc., so that the planting environment is more suitable for Juncao growth, so as to improve the quality and yield of Juncao growth. The impact of atmospheric data (such as oxygen content, carbon dioxide content, etc.), light data, and rainfall data on Juncao planting can be understood through atmospheric environmental management and weather forecasting, and then adaptive management can be carried out for different weather conditions. For example, when there is sufficient sunlight and low rainfall, the Juncao planting area can be irrigated.
[0056] The planting management data collection unit is used to collect management data during the process of Juncao planting, including sowing data, irrigation data, fertilization data, harvesting data, etc. Among them, the sowing data includes Juncao sowing time and sowing density. The planting time of Juncao is related to the climate. Generally speaking, Juncao can be planted in April each year, and the specific planting density needs to be adjusted according to the soil quality. Irrigation data includes irrigation time and irrigation amount. Fertilization data includes fertilization time, fertilizer type and fertilizer amount. Among them, pesticide spraying for pest control belongs to fertilization data. Harvesting data includes harvesting times, harvesting height and harvesting amount. Since Juncao can be harvested multiple times during the process of Juncao planting, it is necessary to analyze different harvesting times when conducting environmental tracing. Generally speaking, Juncao can grow to a height of about 2m about 2 months after planting, and can even be harvested for the first time. The stubble is about 20cm each time, and Juncao can be harvested 5 to 8 times within a year. Depending on the purpose of the Juncao, it can also be harvested about 4 months after planting, when the Juncao grows to 3.5m or even more than 4m. It can be harvested 3 to 5 times a year.
[0057] The Juncao quality detection unit is used to detect the growth quality of Juncao and collect the growth quality data of Juncao, including the seed quality (or seed node quality) of Juncao and the growth quality (including color, shape, height, weight, etc.) of Juncao at different growth stages. Depending on the type of Juncao, it can be planted by sowing or cutting nodes. The quality of seeds or seed nodes is crucial to the growth of Juncao. At different stages of Juncao growth, such as germination, growth, maturity and dormancy.
[0058] The processing data collection unit is used to collect processing data from the harvesting of Juncao to the processing of Juncao into finished products, including Juncao transfer data, processing technology data, and finished product quality data. Among them, Juncao transfer data includes Juncao transportation method, storage environment, transportation time, etc., processing technology data includes processing equipment information and processing parameters, etc., and finished product quality data includes nutritional index, residue content, etc. In some embodiments, finished product quality data may also include testing agency, testing personnel information, test report number, etc.
[0059] The sales data collection unit is used to collect sales and customer feedback data of Juncao finished products. Among them, sales data includes customer information (such as customer name, contact information, address, etc.) and transaction records. Among them, transaction records include sales date, sales quantity, sales channel (such as online channel and offline channel), sales order number, etc. Customer feedback data includes return and exchange records, customer feedback and evaluation, etc.
[0060] The data analysis module includes an abnormal data analysis unit, an analysis model building unit, a model optimization unit, and a model training unit. The abnormal data analysis unit is used to analyze abnormal data from the collected multi-source data.
[0061] See also Figure 2 ,The specific analysis process of the abnormal data analysis unit is as follows:
[0062] First, construct a multivariate dataset, defined as X={x1, x2, …, x n}, x i ={E i , M i , Q i} (i=1,2,…,n), where E i is the environmental data, M i To manage data, Q i For quality data.
[0063] Secondly, an abnormal data analysis model based on the isolation forest algorithm is constructed. In the isolation forest algorithm, let the sample x i Path length to the nearest leaf node in an isolation forest , sample x i The average path length in all decision trees is and
[0064] In the formula, n is the number of decision trees.
[0065] Setting anomaly score The calculation formula is:
[0066] Where c is a parameter used to control the anomaly score, which is usually set to the estimated proportion of outliers.
[0067] Subsequently, the wolf pack algorithm is used to optimize the abnormal data analysis model to find the sample with the highest abnormal score. The specific steps are as follows:
[0068] Initialize the wolf pack and randomly generate N wolf positions. The position vector of each wolf is recorded as P j , represents an index of a sample in the data set, and its position update formula is as follows:
[0069] In the formula, is the position vector of the jth wolf at the tth iteration, A and C are coefficient vectors that are dynamically adjusted according to the parameters of the wolf pack algorithm, and D j is the distance vector between the jth wolf and the current best position, D α and D β are the distance vectors between the jth wolf and the leader and the second-best wolf in the wolf pack, respectively.
[0070] The distance D can be measured using the Euclidean distance metric, which is calculated as follows:
[0071] Where (x1, y1, …, z1) and (x2, y2, …, z2) are the coordinates of the two position vectors.
[0072] The fitness of each wolf is determined by the anomaly score of the sample corresponding to its position After the wolfpack algorithm iterations, the samples with the highest anomaly scores pointed to by the position vectors are identified as potential anomalies. The indices of these samples correspond to the anomaly data points in the original dataset.
[0073] Use a reserved test set or cross-validation to evaluate the accuracy of anomaly detection and analyze whether the anomaly detection results exceed the preset data threshold range. If so, the analysis is correct. By comprehensively evaluating the prediction accuracy of the model, retain the model parameters with the highest accuracy to further improve the accuracy of abnormal data analysis.
[0074] See also Figure 3 The analysis model construction unit is used to construct a Juncao source tracing analysis model based on the SVM-LSTM network model. The specific construction process is as follows:
[0075] First, a basic SVM-LSTM network model was constructed. Specifically, the quality data of Juncao was normalized, and the formula was expressed as follows:
[0076] In the formula, is the normalized Juncao quality data, X m is the original Juncao quality data, μ is the mean value of Juncao quality data, and σ is the standard deviation of Juncao quality data.
[0077] The goal of setting the SVM basic model is:
[0078] The constraints are:
[0079] In the formula, w is the normal vector of the hyperplane, that is, the weight, b is the intercept of the hyperplane, and y m is the label, C is the penalty parameter, is the slack variable.
[0080] The kernel function of SVM is set as:
[0081] Where Xi and Xj are the feature vectors of two sample points, and γ is the parameter controlling the Gaussian kernel function.
[0082] The importance of each feature is evaluated by the absolute value of the weight vector w:
[0083] In the formula, w mis the weight corresponding to the mth feature.
[0084] The importance of the feature is further confirmed by calculating the correlation coefficient between each feature and the quality data of the Juncao. For example, in this embodiment, the Pearson correlation coefficient r is calculated:
[0085] In the formula, is the average input value, Y i For X i The corresponding SVM output value is, is the average output value of SVM.
[0086] The output of SVM is used as the input of LSTM network to output the traceable environmental data.
[0087] Among them, the LSTM network includes input gate, forget gate and output gate. The formula of input gate is expressed as:
[0088] In the formula, is the activation value of the input gate, sigmoid is the activation function, is the hidden state of the previous time step, x t is the input of the input gate, which is equivalent to the output y of SVM m , W i , B i are the weights and biases of the input gate.
[0089] The formula of the forget gate is expressed as:
[0090] In the formula, F t is the activation value of the forget gate, W f , B f are the weight and bias of the forget gate respectively.
[0091] The formula of the output gate is expressed as:
[0092] In the formula, O t is the activation value of the forget gate, W O , B O are the weight and bias of the forget gate respectively.
[0093] To update the state of the LSTM network, first calculate the candidate memory cells:
[0094] In the formula, is the current cell state, tanh is the activation function, W C , B C are the weight and bias of the candidate memory, respectively.
[0095] Then, the memory cell state is updated, and the formula is expressed as:
[0096] In the formula, C t is the updated current memory cell state, is the last memory unit state after update.
[0097] Finally, update the output hidden state, the formula is expressed as:
[0098] By combining SVM with the LSTM network model, the complex Juncao quality data is converted into concise label data, reducing the computational complexity of the LSTM network and improving the traceability efficiency of Juncao growth environment data.
[0099] The model optimization unit is used to optimize the SVM-LSTM network model using the dung beetle algorithm. The specific process is as follows:
[0100] Initialize the population: Randomly generate the position of each dung beetle, which represents the hyperparameter combination of the SVM-LSTM network model. In this embodiment, the penalty parameter C of the SVM and the slack variable The learning rate, number of hidden layer units, batch size, number of iterations and dropout rate of the LSTM network are combined as hyperparameters. The position of each dung beetle is set to P = {p k1 , p k2 ,…,p kd}, k = 1, 2, …, K, K is the number of dung beetles, and d is the dimension of the mushroom grass quality data.
[0101] Define the fitness function. In this embodiment, the mean square error of the model's prediction accuracy is used as the fitness function. , the formula is:
[0102] In the formula, MSE () is the mean square error, is the actual value of the Juncao environmental data, is the predicted value of the LSTM network.
[0103] Find the dung beetle with the best current fitness as the current optimal one. The formula is:
[0104] In the formula, argmax() is the maximum value.
[0105] The formula for updating the position of a dung beetle is as follows:
[0106] First, the dung beetle conducts local exploration: the position is updated based on the experience of the current dung beetle and the current optimal one. The formula is as follows:
[0107] In the formula, is the position of the kth dung beetle at the current moment, α is the step size, and 0<α<1, ζ is the disturbance term, which is used to increase the diversity of solutions.
[0108] Overall update: Update according to the fitness of the dung beetle, allowing the dung beetle to move in position. If the fitness of a dung beetle is lower than the local optimal one, displacement adjustment can be made. The formula is expressed as:
[0109] Where β is the adjustment factor, and β∈[0,1].
[0110] Repeat the above process until the maximum number of iterations is reached, and select the hyperparameter combination corresponding to the dung beetle position with the best fitness as the optimal hyperparameter of the SVM-LST model.
[0111] The model training unit is used to train the optimized SVM-LSTM network model and retain the model parameters with the highest accuracy.
[0112] The traceability module includes a marking unit and an environmental traceability unit. Among them, the marking unit is used to mark the production process of Juncao and record all information from planting to selling of Juncao. For example, when Juncao is harvested, an independent QR code is set for each batch of Juncao. The QR code records the planting environment data, management data and quality data of Juncao. When Juncao is further processed, Juncao is marked for the second time, and all data of Juncao during the processing process is recorded, including Juncao transfer data, processing technology data, and finished product quality data. During the sales process, the finished Juncao products are supplemented with records based on the QR code information, including the sales and customer feedback data of the finished Juncao products.
[0113] The environmental traceability tracking unit is used to determine whether the comprehensive importance of the abnormal data is higher than the preset importance threshold when the abnormal data analysis unit analyzes the abnormal data. If so, the abnormal data will be input into the Juncao traceability analysis model, the source of the abnormal data will be traced, and the abnormal data and tracking results will be uploaded to the Internet of Things, or sent to the corresponding supervisory personnel.
[0114] In this embodiment, the importance of each environmental data is set according to its impact on the quality of the grass. for:
[0115] In the formula, S is the set of single features, N is the set of all features, and L is the LSTM network model.
[0116] The corresponding comprehensive importance for:
[0117] In the formula, ω m is the weight of each environmental data.
[0118] The environmental tracing system of this embodiment collects relevant data during the growth, processing and sale of the grass, and analyzes the abnormal data with problems through the abnormal data analysis model based on the wolf pack algorithm to optimize the isolated forest algorithm, so that the global search ability of the isolated forest algorithm is stronger, and it has better distinguishing ability and stronger adaptability when detecting abnormal data, thereby improving the accuracy of abnormal detection. Especially when the quality data of the grass or grass product is abnormal, the SVM-LSTM network model optimized by the dung beetle algorithm can also be used to trace the grass environmental data. The hyperparameters optimized by the dung beetle algorithm can significantly improve the performance of the SVM-LSTM network model, provide higher prediction accuracy and better generalization ability, and compared with the traditional neural network, the SVM-LSTM network model optimized by the dung beetle algorithm performs better in processing the time series data of the grass growth environment, speeds up the convergence speed of the model, makes the training process more efficient, and improves the overall operation efficiency.
[0119] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described 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.
[0120] 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 invention patent. 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.
Claims
1. A Juncao production process environmental traceability tracking system, characterized in that: include: Data collection module, used to collect all environmental data and quality data during the growth, processing and sales stages of Juncao; The data analysis module includes an abnormal data analysis unit, an analysis model construction unit, a model optimization unit, and a model training unit; the abnormal data analysis unit is used to analyze abnormal data from the collected environmental data and the quality data; the analysis model construction unit is used to construct a Juncao source tracing analysis model based on the SVM-LSTM network model; the model optimization unit is used to optimize the Juncao source tracing analysis model using a dung beetle algorithm; the model training unit is used to train the optimized Juncao source tracing analysis model and retain the model parameters with the highest accuracy; The specific analysis process of the abnormal data analysis unit is as follows: Construct a multivariate data set; define the multivariate data set as X={x1, x2, …, x n }, x i ={E i , M i , Q i } (i=1,2,…,n), where E i is the environmental data, M i To manage data, Q i For quality data; Construct an abnormal data analysis model based on the isolation forest algorithm; Use wolfpack algorithm to optimize abnormal data analysis model; The abnormal data analysis model is trained using the pre-acquired training set and test set, and the model parameters that meet the accuracy are retained; Running the trained abnormal data analysis model on the multivariate data set to output abnormal data; The specific process of the wolf pack algorithm optimizing the abnormal data analysis model is as follows: Calculate sample x i The average path length L in all decision trees xi , the formula is: Where i=1,2,3,…,n, n is the number of decision trees, For sample x i The path length to the nearest leaf node in an isolation forest; Set the anomaly score S xi As fitness, the calculation formula is expressed as: Where c is a parameter used to control the anomaly score, which is set to the estimated proportion of outliers; Initialize the wolf pack: randomly generate N wolf positions; The wolf with the highest fitness is taken as the leader, and the position of each wolf is updated. The formula is as follows: In the formula, is the position vector of the jth wolf at the tth iteration, A and C are coefficient vectors that are dynamically adjusted according to the parameters of the wolf pack algorithm, and D j is the distance vector between the jth wolf and the current best position, D α and D β are the distance vectors between the jth wolf and the leader and the second-best wolf in the wolf pack, respectively; After the wolfpack algorithm iteration is completed, the sample with the highest anomaly score pointed to by the position vector is identified as potential anomaly data; The specific process of constructing the Juncao origin tracing analysis model by the analysis model construction unit is as follows: Construct a basic SVM network model; Use the output of SVM as the input of LSTM network to build the basic LSTM network model; The traceability module includes a marking unit and an environmental traceability unit; the marking unit is used to mark the Juncao production process and record all information from Juncao planting to sale; the environmental traceability unit is used to determine whether the comprehensive importance of the abnormal data is higher than a preset importance threshold, and if so, input the abnormal quality data into the optimized Juncao traceability analysis model, trace the Juncao environmental data of the abnormal quality data, and obtain the traceable Juncao environmental data.
2. According to claim 1, a Juncao production process environmental tracing system is characterized in that: The data acquisition module includes a planting environment detection unit, a planting management data acquisition unit, a Juncao quality detection unit, a processing data acquisition unit, and a sales data acquisition unit; the planting environment detection unit is used to collect the planting environment data of Juncao; the planting management data acquisition unit is used to collect the management data during the Juncao planting process; the Juncao quality detection unit is used to collect the growth quality data of Juncao; the processing data acquisition unit is used to collect the processing data of Juncao from harvesting to processing into finished products; the sales data acquisition unit is used to collect the sales and customer feedback data of Juncao finished products.
3. According to claim 1, a Juncao production process environmental tracing system is characterized in that: The specific process of the model optimization unit using the dung beetle algorithm to optimize the Juncao source tracing analysis model is as follows: Initialize the population: randomly generate the position of each dung beetle; Define the fitness function; Find the dung beetle with the highest current fitness as the current optimal one; The dung beetle conducts local exploration: it updates its position based on the experience of the current dung beetle and the current best one; The position of the dung beetle is updated according to the fitness of the dung beetle; Repeat the above process until the maximum number of iterations is reached, and select the hyperparameter combination corresponding to the dung beetle position with the best fitness as the optimal hyperparameter of the Juncao origin tracing analysis model.
4. The environmental traceability tracking system for the Juncao production process according to claim 1 is characterized in that: In the model optimization unit, the mean square error of the prediction accuracy of the Juncao origin tracing analysis model is used as the fitness f k , the formula is: In the formula, MSE () is the mean square error, P k is the position of the kth dung beetle, k=1, 2, ..., K, K is the number of dung beetles, Y k is the actual value of the Juncao environmental data, is the predicted value of the LSTM network.
5. The environmental traceability tracking system for the Juncao production process according to claim 1 is characterized in that: In the model optimization unit, the formula for the local exploration of the dung beetle is expressed as follows: In the formula, is the position of the kth dung beetle at the current moment, t d is the number of iterations of the dung beetle position, α is the step size, and 0<α<1, P g is the current optimal position, ζ is the disturbance term used to increase the diversity of solutions; The formula for updating according to the fitness of the dung beetle is expressed as: Where β is the adjustment factor, and β∈[0,1].
Citation Information
Patent Citations
LSTM landslide displacement prediction method based on optimized dung beetle algorithm
CN117932515A
Intelligent tool wear state monitoring method and system based on improved dung beetle algorithm
CN118536391A