Atmospheric pollutant sensor data calibration method suitable for being deployed at embedded terminal
The hyperparameters are optimized through the distillation method of the teacher-student model and the Ivy algorithm, combined with the model deployment in ONNX format and the online update of the HTTP protocol, the problem of low calibration efficiency of atmospheric pollutant sensor data on embedded devices is solved, and high-precision data calibration and visual display are achieved.
Patent Information
- Application Number
- CN202411660097.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-18
AI Technical Summary
Existing atmospheric pollutant sensor data calibration methods are inefficient in operating on embedded devices and are difficult to achieve high-precision data calibration and visual presentation in resource-constrained environments.
The teacher-student model is used to optimize the hyperparameters by using the random forest algorithm as the teacher model and the gradient hoist algorithm as the student model. The hyperparameters are optimized by combining the Ivy algorithm to realize data calibration and model compression. At the same time, the model is converted into C language code using ONNX format, deployed on STM32 embedded devices, and the model is updated online through the HTTP protocol.
Efficient data calibration and visual presentation are realized on resource-constrained embedded devices, improving detection accuracy and system response speed, and suitable for atmospheric pollution monitoring in static or dynamic environments.
Smart Images

Figure CN119643787A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of environmental monitoring, and specifically relates to a method and system for calibrating atmospheric pollutant sensor data suitable for deployment on an embedded end. The method and system can be directly deployed and visualized on the embedded end, measure and calibrate the concentrations of various atmospheric pollutants in real time, and display the detection results on a data visualization interface. The method is suitable for atmospheric pollution monitoring in static or dynamic environments. Background Art
[0002] With the acceleration of industrialization and urbanization, the problem of air pollution has become increasingly serious, seriously affecting human health and quality of life. Traditional air pollution monitoring methods usually rely on fixed monitoring stations. Although these monitoring stations can provide high-precision data, their coverage is limited and they cannot reflect the pollution situation in a large area in real time. Traditional monitoring equipment has the problems of large size, high cost, and is not suitable for mobile monitoring and large-scale deployment. In recent years, with the development of sensor technology and embedded systems, portable and mobile air pollution monitoring equipment has gradually become a research hotspot. These devices usually integrate a variety of sensors and can collect concentration data of air pollutants in real time. However, the measurement accuracy of sensors and the distribution of pollutants are easily affected by environmental factors such as temperature, humidity and air pressure, resulting in insufficient accuracy and reliability of data.
[0003] In the prior art, although some studies have proposed sensor data calibration methods based on machine learning and deep learning, these methods are usually computationally complex and difficult to run efficiently on embedded devices. Due to the limited computing and storage resources of embedded devices, the addition of calibration models will bring a huge burden to the MCU, resulting in low resource utilization and slow system response speed. In addition, with the development of data visualization technology, how to intuitively display the collected air pollution data to users has also become an important research topic. Traditional monitoring systems often lack a friendly user interface, making it difficult for users to intuitively understand and analyze data.
[0004] For example, the Chinese patent with publication number CN114397404A discloses an atmospheric pollutant detection device and its data calibration method. The device uses NO2 and O3 sensors to measure gas concentrations, and uploads the data collected by the sensors to the cloud platform through the GPRS module. The cloud platform compares the data with the pollutant concentration data of the meteorological base station for calibration. However, on the one hand, the use range of the gas detection device is limited, and the test needs to be close to the meteorological station for online detection. On the other hand, only temperature and humidity are considered without considering the influence of air pressure factors, and the calibration accuracy is not high. The Chinese patent with publication number CN115144229A discloses an atmospheric environmental pollutant detection device and method for rotorcraft. Although the AGRU deep learning model is used to detect multiple gases, the influence of air pressure factors on pollutant measurement is not considered, and the calibration accuracy is not high. It is difficult to deploy on embedded terminal devices in the case of large data sets (each data has more than 8,000 items), and it cannot be directly displayed. Summary of the invention
[0005] The purpose of the present invention is to provide a method and system for calibrating atmospheric pollutant sensor data suitable for deployment on an embedded end, which is used to detect the concentration of various atmospheric pollutants and calibrate the measurement data in real time on the embedded end, and display and save the detection results through a visual interface.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a method for calibrating atmospheric pollutant sensor data suitable for deployment on an embedded terminal, the method comprising the following steps:
[0008] Step 1: Obtain the original response data (S1, S2, S3, S4, S5, S6) of different sensors with different concentrations under different atmospheric environments after temperature compensation, as well as the corresponding temperature (T), humidity (H), air pressure data (P), and sampling time (t); each sensor generates a time series data set; at the same time, collect the actual concentration values (V1, V2, V3, V4, V5, V6) of the corresponding detection objects of different sensors at the corresponding time given by the national control station or provincial control station;
[0009] Step 2: Preprocess the obtained data, including deletion of missing and bad values, data merging, data quantization, and EWMA filtering to obtain the final data set;
[0010] Step 3: Use the random forest algorithm as the teacher model and the gradient boosting algorithm as the student model, and set the hyperparameters of the two algorithms, where
[0011] The hyperparameters of the random forest algorithm include the number of decision trees n_estimators_rf and the maximum depth of the decision tree max_depth_rf, the minimum number of samples of leaf nodes min_samples_leaf_rf, and the minimum number of samples before node splitting min_samples_split_rf;
[0012] The hyperparameters of the gradient boosting algorithm include learning rate learning_rate_gbm, number of weak learners n_estimators_gbm, maximum tree depth max_depth_gbm, minimum number of samples before node splitting min_samples_split_gbm and minimum number of samples of leaf nodes min_samples_leaf_gbm;
[0013] Use the Ivy algorithm to optimize the hyperparameters of the gradient boosting algorithm and the random forest algorithm;
[0014] Step 4: Substitute the optimal hyperparameter solutions found by optimization into the corresponding algorithms, and use these hyperparameter combinations to retrain the teacher model and student model;
[0015] The training process of the teacher model is: select the original response value of the sensor after temperature compensation (S1, S2, S3, S4, S5, S6), temperature (T), humidity (H), and air pressure (P) as input features, and the actual concentration value (V1, V2, V3, V4, V5, V6) of the corresponding detection object of different sensors as the target value, and the output of the teacher model is the concentration value of the corresponding detection object; divide the final data set obtained in step 2 into a training set and a test set, and train the random forest algorithm with the optimal solution of the hyperparameters; after the training is completed, use the trained random forest model to predict the feature data in the training set to generate the corresponding "soft labels", which are used as input data in the next distillation process to train the student model;
[0016] The training process of the student model is: the output of the teacher model As soft labels, the soft labels and the original sensor response values after temperature compensation (S1, S2, S3, S4, S5, S6), temperature (T), humidity (H), and air pressure (P) are used to generate a new training set, and the gradient boosting machine algorithm GBM with the optimal solution of hyperparameters is trained with the new training set.
[0017] With training data Initial prediction value Set to the mean of all labels, that is:
[0018]
[0019] The mean square error (MSE) is used as the loss function of the gradient boosting algorithm. In each round of iteration, the residual error is fitted:
[0020]
[0021] in, is the predicted value of GBM after the tth iteration; N is the number of samples;
[0022] Calculate the residual and train a new weak learner. In each round, GBM calculates the current prediction and the true soft label The difference between
[0023]
[0024] GBM then trains a new weak learner (decision tree) h based on these residuals (t) (X i ) to fit these residuals;
[0025] GBM outputs the current weak learner h (t) (X i ) and the previous predicted value A weighted combination is performed to update the student model, where the learning rate η is used to control the step size of each update, and the update formula is:
[0026]
[0027] GBM gradually builds multiple decision trees and continuously iterates to update the prediction value Get the trained student model;
[0028] Step 5: Deployment of the model on embedded devices:
[0029] Step 5.1. Set the input data type to floating point type, and use the convert_sklearn function in the skl2onnx library to convert the trained student model to ONNX format; save the converted ONNX model as a file for subsequent deployment and use;
[0030] Step 5.2. Select Additional Software in STM32CubeMX, enter the plug-in X-CUBE-AL, select Soft Component Class as Artificial Intelligence in the plug-in, make sure the X-CUBE-AI version is 5.2.0 or above, check Core, and select the project type to be generated as Application template;
[0031] Step 5.3. In the Configuration of X-CUBE-AI, select the model format as ONNX and the compression factor of the model as None. After the configuration is complete, click Analyze. X-CUBE-AI will automatically analyze whether the model can be deployed, as well as the complexity of the model, the size of the Flash memory occupied, and the running time.
[0032] Step 5.4: Then generate the optimized STM32AI Runtime Library through the C-code generator and automatically integrate it into the project file, convert the ONNX format model or TensorFlow format model into C language code, that is, automatically convert the original algorithm model written in Python language to generate .c format files, and then add these .c format files to the Keil5 project project. By calling the API functions in these files in the program to process the collected sensor raw response data, the output of these functions is the calibrated data;
[0033] Step 6: Update Display:
[0034] The sensor response data under the update of environmental temperature, humidity and air pressure data is collected regularly to form a new data set, and the teacher model and the student model of step 4 are trained with the new data set to obtain the updated model parameter file of the student model, and the updated model parameter file is stored in the cloud server. The embedded device obtains the new updated model parameter file from the cloud server through the HTTP protocol and replaces the old model parameters in the file. During the model update process, a fallback mechanism is provided to ensure that the original model parameters can be rolled back when the model parameter update fails. The cloud server is used to store the model parameter file, the measurement data set and the calibration result data, and is connected to the display unit for visual display.
[0035] Furthermore, the process of the Ivy algorithm is:
[0036] Step S1: Input the number of parameters of the Ivy algorithm: I min ,I max ,Iter max,Npop and div. Set Iter = 1; Npop is the population size, that is, the number of ivy individuals in the population, that is, the number of solutions contained in each generation; div is the dimension of the solution, that is, the number of parameters to be optimized, which are: n_estimators_rf, max_depth_rf, min_samples_leaf_rf, min_samples_split_rf of the random forest model and n_estimators_gbm, learning_rate_gbm, max_depth_gbm, min_samples_split_gbm, min_samples_leaf_gbm of GBM;
[0037] Iter max is the maximum number of iterations, I max and I min are the upper and lower bounds of the parameter search space;
[0038] Step S2: Calculate the growth rate ΔGv of the ivy plant using formula (1): i ,Right now:
[0039]
[0040] Among them, I i represents the position vector of the i-th ivy plant. The solution for each ivy plant can be represented as a div-dimensional vector;
[0041] Step S3: Initialization of the ivy population, using the improved Tent chaotic map to generate initial values, and then normalizing the population position to the upper and lower bounds;
[0042] At the beginning, a group of ivy is generated, and the position vector of the i-th ivy is recorded as I i , the i-th population member has I i =(I1, ..., I iD ), where i = 1, 2, ..., N pop , and represents the total population of ivy plants
[0043] The improved Tent chaotic mapping formula is formula (3):
[0044] I i [j] = Tent(x t )+γ·rand(1,div)+λ·ΔG v,i (3)
[0045] Among them, Tent(x t ) is the classic Tent chaos mapping formula; Ii [j] represents the jth parameter value (i.e., the value of the jth dimension) of the i-th individual in the population, that is, the initial value is generated for each dimension of each individual, ran(1,div) represents a vector of uniformly distributed random numbers in the interval [0,1] with a dimension of div=9, γ is the amplitude coefficient of random perturbation, and the range is set to a small value in [0.01,0.05], and λ is a small positive number in the range of [0.01,0.05] based on the amplitude coefficient of growth rate perturbation;
[0046] Then use formula (4) to convert I i [j] Adjust to the upper and lower bounds and perform overall normalization;
[0047] I i =I min +(I max -I min )⊙I i (4)
[0048] Among them, I i Represents the i-th individual in the population, which is a complete vector containing the values of all parameter dimensions. max and I min are the upper and lower bounds of the parameter, respectively, and “⊙” is the Hadamard product of two vectors;
[0049] Step S4: Define the objective function, calculate the objective function values of all members in the initial population, and Sort the members from best to worst, set I Best =I1;
[0050] Define the objective function f(I): For each candidate solution I, first use the random forest model to train to obtain soft labels, then use the gradient boosting model to train with the soft labels as the target, return the test set RMSE, and minimize the RMSE as the objective function value; then calculate the objective function value f(I) of all individuals in the population i ), sort the population from best to worst according to fitness value, and determine the best individual I1;
[0051] Step S5: Enter the main loop, when Iter≤Iter max hour:
[0052] Step S51: For the case where i=1 to Npop (for loop starts), select the nearest neighbor member I by formula (5) ii :
[0053]
[0054] And calculate the distance: d t=||I i -I ii ||;
[0055] Step S52: Calculate the fitness normalization value f by formula (6) norm :
[0056]
[0057] Where f(I min ) is the optimal objective function value (minimum value) of the current population, f(I max ) is the worst objective function value (maximum value) of the current population;
[0058] Step S53: Levy flight formula is:
[0059]
[0060] Among them, u, v ~ N (0, 1) are normally distributed random numbers, β l is the control parameter of the Levy distribution, which is 1.5; d t is the neighbor distance; f norm is the normalized value of fitness; ΔG v,i is the growth rate;
[0061] Step S6: Calculate β = (2 + rand) / 2, where β is the threshold of behavior switching, representing the random parameter of dynamic switching behavior. i )<β·f(I Best ), indicating a preference for local development; otherwise, a preference for global exploration;
[0062] Step S7: If f(I i )<β·f(I Best );
[0063] Step S8: Climbing behavior, individuals use neighboring information (I ii ) gradually approaches the optimal solution and enhances local development capabilities; the climbing behavior formula is:
[0064]
[0065] in is the new position generated for the i-th individual in the current iteration of the algorithm;
[0066] Step S9: Otherwise;
[0067] Step S10: Extended behavior, individuals around the global optimal solution I Best Expand and explore possible better solutions to enhance global exploration capabilities. The expansion behavior formula is:
[0068]
[0069] Step S11: end the judgment;
[0070] Step S12: Update the objective function value and growth rate, and evaluate The fitness of Calculate the new growth rate:
[0071] Step S13: The new solution Joining a new population
[0072] Step S14: end the for loop;
[0073] Step S15: Merge populations and That is, create the list:
[0074] Step S16: Sort by fitness value from small to large Sorted version of and from Select the best member, that is, select the member with the top Npop as the next generation of the Ivy algorithm, while retaining I Best The update logic is, And set the optimal solution I Best =I1;
[0075] Step S17: Iter=Iter+1;
[0076] Step S18: end the loop;
[0077] Step S19: Return the optimal solution I obtained by the TLIVY optimization algorithm Best And the corresponding objective function value f(I Best ).
[0078] In a second aspect, the present invention provides an atmospheric pollutant sensor data calibration system, wherein the system executes the calibration method, including:
[0079] Air pollutant detection device, which is placed in the target area for static detection or placed on a mobile carrier for dynamic inspection, collects various air pollutant concentration data and environmental temperature, humidity, air pressure, longitude and latitude data. The device is equipped with a communication module and a storage module for transmitting and storing data;
[0080] The atmospheric pollutant detection device is embedded with a lightweight model. The lightweight model is a student model that is distilled from the teacher model and implemented using a gradient boosting algorithm. It is used to calibrate the concentration data of each pollutant in real time on the embedded end.
[0081] PC side, used for model training and display;
[0082] A cloud server, which communicates bidirectionally with the air pollutant detection device, is used to obtain data measured by the air pollutant detection device, calibration data, and store model parameter files;
[0083] On the user side, current and historical data can be viewed in real time through a visual interface, and data can be exported to CSV or XLSX format;
[0084] The atmospheric pollutant detection device updates the parameters of the lightweight model online using the model parameter file stored in the cloud server through HTTP communication.
[0085] Furthermore, the air pollutant detection device is placed in the target area for static detection or placed on a mobile carrier such as a drone for dynamic inspection, collecting six types of air pollutant concentration data and environmental temperature, humidity, air pressure, longitude and latitude data, and the device is equipped with a communication module and a storage module for transmitting and storing data;
[0086] The detection device includes four three-electrode electrochemical sensors, an inhalable particle sensor module, a temperature, humidity and air pressure module, a positioning module, a microcontroller, a wireless communication module and a Micro-SD card storage module, and an anti-collision protection housing;
[0087] There are two power supply methods, namely lithium battery pack and type-c interface.
[0088] For safety reasons, a corresponding anti-collision shell is provided. The shell is made of ABS engineering plastic and has a size of 17×10×3.5cm 3 , the shell thickness is 3.5mm.
[0089] Four three-electrode electrochemical sensors are used to detect the concentrations of carbon monoxide (CO), sulfur dioxide (SO2), nitrogen dioxide (NO2) and ozone (O3), respectively, and are connected to the microcontroller after driving the amplifier circuit and the AD conversion circuit; an inhalable particulate matter sensor module (model HPMA115S0) is used to detect the concentrations of inhalable particulate matter PM2.5 and PM10; a temperature, humidity and air pressure module (model BME280) is used to detect the ambient temperature, humidity and air pressure values;
[0090] The 18650 lithium battery is used to form a lithium battery pack. The voltage required by the circuit is obtained through the LDO step-down voltage regulator circuit. The Type-C interface can independently power the detection device and can also charge the lithium battery pack. For safety reasons, a lithium battery overcharge protection circuit and a charging indicator light are set. When the lithium battery voltage reaches the threshold, the indicator light turns on.
[0091] The present invention also protects the visualization interface. The network interconnection part adopts a wireless communication module and realizes data transmission by sending HTTP requests. It includes a back-end server and a front-end web page. The back-end server is responsible for processing the data from the device and storing it in the server database after verification. The front-end web page obtains real-time data and historical data from the Huawei Cloud Elastic Cloud Server based on user needs and displays it through a data visualization tool.
[0092] The main functional modules involved in the backend include: user authentication and information management module, data storage module and data display module; the main functional modules involved in the front end include: user login and management module, real-time data display module, historical data viewing and management module;
[0093] The user authentication and information management module is used to process user identity authentication, registration, login, authority allocation and user information management;
[0094] The data storage module is used to store the original response value of the sensor and the verified calibration data in the back-end database through the ORM function of Django;
[0095] The data display module is used to provide a RESTful API interface, so that the front-end application can request real-time data and historical data from the server and return them in JSON format;
[0096] The user login and management module is used for user identity authentication and authority management, allowing users with different authorities to access different system functions, and providing functions for registering, modifying and deleting user information;
[0097] The real-time data display module is used to communicate with the Huawei Cloud elastic cloud server, obtain device or sensor data in real time, and use visualization tools to display current data, so that users can intuitively monitor the operating status of the device;
[0098] The historical data viewing and management module is used to allow users to query historical data stored in the database by time period or device ID condition, and display it in table or graphical form, and support export to CSV or XLSX format.
[0099] This application also provides a model online update method. The device obtains a new calibration model file from a cloud server through the HTTP protocol. After the new model is trained on the PC side, it can be connected to the cloud server through the communication module, and the new model file can be received online to replace the old model in the embedded device. The back-end server creates a RESTful API interface, and the detection device obtains the new model file through a GET request to complete the model replacement. During the model replacement process, a fallback mechanism is provided to ensure that the old model can be restored when the new model update fails.
[0100] In addition, since the embedded device belongs to a resource-constrained environment and the deployment of the calibration model greatly increases the burden on the main control MCU, a multi-task scheduling management mechanism is adopted to ensure smooth and efficient system operation. The system uses FreeRTOS for task management, assigns functions such as data acquisition, calibration, transmission, storage, and online model replacement to independent tasks, and achieves efficient scheduling through priority management. Specifically:
[0101] Initial priority setting: The initial priority order from high to low is: data collection task, data calibration task, task scheduling task, data transmission task, model update task;
[0102] Dynamic priority adjustment: In task scheduling, the priority of tasks is adjusted according to the system status and resource utilization. If frequent data collection is detected, the priority of data collection and calibration tasks is increased; when network conditions are good, the priority of model update tasks is increased to speed up the model update process;
[0103] Resource management between tasks: Use semaphores and mutexes to protect access to shared resources to prevent data inconsistency and deadlock. When it comes to updating model weights, use mutexes to protect access to model data to ensure that only one task can update or read the model at any time.
[0104] Task Scheduling Strategy: Use a time slice round-robin scheduling strategy to ensure that the system remains stable under high load. For lower priority tasks, use a time slice round-robin mechanism to ensure that each task can be executed within a certain period of time.
[0105] Compared with the prior art, the beneficial effects of this application are:
[0106] Traditionally, the algorithm model deployed on the STM32 embedded terminal is mostly a deep learning model, and under the same amount of training data, the machine learning model is often difficult to deploy and implement due to the large size of the model. For the calibration of atmospheric pollutants, some machine learning models such as random forest models usually have better data calibration effects than deep learning models, but as mentioned above, under the training of the same number of data sets, the random forest model has a high complexity and a large model volume, which is difficult to deploy on embedded devices with limited resources (such as STM32). In response to this problem, the present invention uses the distillation method of the teacher-student model. Specifically, the random forest model is used as a "teacher model" (Teacher Model) to guide the learning of the "student model" (Student Model). Through the distillation process, the student model can simplify and compress the prediction ability of the teacher model by learning the output of the complex model. By trying a variety of student models, the present invention finds that the GBM model significantly reduces the volume of the model while maintaining a high prediction accuracy. Specifically, the size of the random forest model after conversion to the ONNX format is 1280KB, while the GBM model is only 239KB. When the number and depth of the random forest model are further increased (e.g., n_estimators changes from 12 to 24, and max_depth changes from 15 to 30), the random forest model increases to 2302KB, while the GBM model increases by only 1KB (from 239KB to 240KB). 2 The results of the random forest model (and RMSE evaluation) are very close to or even better than the original random forest model, achieving the effect of reducing the model size while ensuring accuracy, and are more suitable for embedded deployment. In addition, during the training of the teacher model and the student model, there are many hyperparameters with high randomness, and different values of these hyperparameters will have a significant impact on the model prediction performance.
[0107] The present invention uses the Ivy algorithm to optimize the hyperparameter combination of these teacher models and student models. Compared with conventional algorithms such as particle swarm optimization algorithm, genetic algorithm and sparrow search algorithm that have been widely used in machine learning model parameter optimization, the present invention uses the Ivy algorithm to find the optimal parameters more quickly, and the final model prediction accuracy is significantly higher than other algorithms. Furthermore, the Ivy (TLIVY) algorithm in the present invention introduces an improved Tent chaos mapping strategy, which adds γ·rand(1,div) and λ·ΔG on the basis of the basic Tent chaos mapping formula and combines the characteristics of the Ivy algorithm. v,iThe two perturbations can randomly adjust the values generated in each iteration, thereby introducing more diversity in the population initialization and iteration process, while avoiding the problem of slow convergence of the algorithm in the later stage. The improved Levy flight strategy is introduced, combining the characteristics of the Ivy algorithm, and adding the neighbor distance d to the classic Levy step formula t The dynamic adjustment term makes the step size related to the relative position of the neighbors. t When d is smaller, the step length becomes shorter and local development is strengthened. t When it is larger, the step length is lengthened to enhance the global exploration ability, and the normalized value f of fitness is added norm (I i ), adjust the step size, when f(I i ) is close to the optimal value f min When the fitness is poor, the step length becomes smaller, and when the fitness is poor, the step length increases to strengthen the exploration; in addition, the growth rate ΔG v,i As the scaling factor of the Levy step length, when ΔG v,i When ΔG is larger, the step size increases and the search range is enhanced. v,i When is smaller, the step size is reduced to enhance the search accuracy. Through the above improvements, the update frequency of the population position, the randomness and exploration of the search are significantly increased, so that the algorithm can more effectively explore the vast search space, so that it can avoid falling into the local optimum when dealing with complex problems, and at the same time improve the accuracy and real-time performance of the training model.
[0108] The device in the present invention communicates with the cloud server and can update the model online, so that the system can dynamically update the calibration model parameters according to environmental changes, ensuring the continuous optimization of the detection results. In addition, the system realizes real-time data transmission and visualization through the wireless communication module, and users can obtain current and historical data at any time, which is convenient for decision-making and management. Finally, comprehensive user management and authority control enhance the security of the system and adapt to the needs of different users, thereby improving the efficiency and reliability of atmospheric pollutant detection. These advantages make the present invention have good practicality in practical applications and provide useful technical support for environmental monitoring.
[0109] Therefore, the atmospheric pollutant detection device of the present invention can operate efficiently in an embedded environment, can detect the concentration of atmospheric pollutants with higher accuracy, and combine with data visualization technology to provide an intuitive user visualization interface, which has certain research value for environmental monitoring and atmospheric pollution control. BRIEF DESCRIPTION OF THE DRAWINGS
[0110] Figure 1 It is the overall flow chart of the present invention.
[0111] Figure 2 This is the hardware structure diagram of the atmospheric pollutant detection device.
[0112] Figure 3 The following are the structural diagrams of the detection device shell: (a) is the overall diagram of the shell, (b) is the upper shell structure diagram, and (c) is the lower shell structure diagram.
[0113] Figure 4 Flowchart for RF-GBM model training.
[0114] Figure 5(a) shows the calibration effect of the RF model and the RF-GBM model (abbreviated as RG) on the same dataset after using TLIVY for hyperparameter optimization. 2 Value comparison chart, the left side shows the value of RF model, and the right side shows the value of RF-GBM model;
[0115] Figure 5(b) is a comparison of the RMSE values of the calibration effects of the RF model and the RF-GBM model on the same data set after both models were optimized for hyperparameters using TLIVY. The left side shows the values of the RF model, and the right side shows the values of the RF-GBM model.
[0116] Figure 5(c) shows the calibration results of the RF-GBM model and three mainstream calibration models on the dataset after using TLIVY for hyperparameter optimization. 2 Value comparison chart;
[0117] Figure 5(d) is a comparison of the RMSE values of the calibration effects of the RF-GBM model and three mainstream calibration models on the data set after hyperparameter optimization using TLIVY;
[0118] Figure 5(e) shows the calibration effect of the RF-GBM model after parameter optimization using the ivy algorithm (TLIVY), genetic algorithm (GA), particle swarm optimization algorithm (PSO) and sparrow search algorithm (SSA) on the same data set. 2 Value comparison chart;
[0119] Figure 5(f) is a comparison of the RMSE values of the calibration effects after optimizing the parameters of the RF-GBM model using the Ivy algorithm (TLIVY), genetic algorithm (GA), particle swarm optimization algorithm (PSO) and sparrow search algorithm (SSA) on the same data set;
[0120] Figure 5(g) is a comparison of the running time of each optimization algorithm for parameter optimization.
[0121] Figure 6 Verify the results for embedded deployment of the calibration model.
[0122] Figure 7 It is a visualization interface display, (a) is the user login interface, and (b) is the real-time data monitoring interface.
[0123] Figure 8 Flowchart of the model online replacement mechanism. DETAILED DESCRIPTION
[0124] The present invention is further explained below in conjunction with the accompanying drawings and embodiments, but this is not intended to limit the scope of protection of the present application.
[0125] Figure 1 This is a structural diagram of an atmospheric pollutant detection system provided in an embodiment of the present application. The system includes an atmospheric pollutant detection device (referred to as the detection device), a PC terminal, a user terminal, and a cloud server. The user terminal and the PC terminal have a data visualization interface. The atmospheric pollutant detection device is provided with a model online replacement and multi-task management mechanism.
[0126] The atmospheric pollutant detection device is placed in the target area for static detection or on a mobile carrier for dynamic inspection, collecting six types of atmospheric pollutant concentration data and environmental temperature, humidity, air pressure, longitude and latitude data. The device is equipped with a communication module and a storage module for data transmission and storage. The atmospheric pollutant detection device has a built-in lightweight model. This lightweight model GBM is used to deploy on the atmospheric pollution detection device to calibrate the concentration data of each pollutant in real time;
[0127] The PC communicates with the cloud server, and uses the updated parameters on the PC to retrain the data calibration model and lightweight model. After the update training is completed, the updated model parameters are uploaded to the cloud server through the communication module. The atmospheric pollutant detection device communicates with the cloud server, dynamically updates the lightweight model parameters through HTTP communication, receives new model parameter files online, and replaces the old model parameters in the atmospheric pollutant detection device; users can view current and historical data in real time through the user-side visual interface, and support exporting data to formats such as CSV or XLSX. Use the embedded real-time operating system to schedule tasks and optimize programs for the atmospheric pollutant detection device. After the model is trained, the detection device can work away from the weather station.
[0128] The hardware structure diagram of the air pollutant detection device in the embodiment of the present application is as follows Figure 2 As shown, 1 is the microcontroller unit, and the STM32H7 series high-performance chip is selected. Since the algorithm model needs to be deployed on the microcontroller, the STM32 series processors that support this operation include the F4 and H7 series. Since the H7 series processor has better performance, larger memory capacity, and stronger floating-point computing capability, the H7 series is more suitable for the needs.
[0129] 2 is an electrochemical sensor array, which contains a total of four three-electrode electrochemical sensors, namely CO sensor (model 4CO-500), NO2 sensor (model 4NO2-20), SO2 sensor (model 4SO2-20) and O3 sensor (model 4O3-10). The four sensors are placed in the center of the device. It should be noted that the electrochemical sensor circuit is an analog circuit and needs to be isolated from the digital circuit to reduce interference. The electrochemical sensor outputs a weak current signal of nA level, so it is necessary to convert the weak current signal into a voltage signal of mV level through a driving amplifier circuit, and then use the AD acquisition module for signal acquisition.
[0130] 3 is the inhalable particle sensor module (model HPMA115S0), which uses laser scattering technology to detect the concentration of inhalable particles in the air, including PM2.5 and PM10, with a detection concentration range of 0μg / m 3 Up to 1,000 μg / m 3 The inhalable particle sensor module 3 communicates with the microcontroller 1 through the UART serial port.
[0131] 4 is a temperature, humidity and pressure module. A high-precision pressure sensor (model BME280) is selected. This sensor can not only measure the ambient air pressure, but also the temperature and humidity values. The temperature, humidity and pressure module communicates with the microcontroller through the IIC protocol or the SPI protocol. Since the temperature, humidity and pressure values as independent variables have a certain influence on the accuracy of the calibration model, it is placed near the electrochemical sensor array to obtain more accurate information about the surrounding environment of the electrochemical sensor.
[0132] 5 is a GPS / BDS positioning module, which is used to obtain the latitude and longitude information of the device's location. The model is S1216F8-BD, which communicates with the microcontroller through the UART or I2C interface, has good compatibility, and is easy to integrate with the embedded system (air pollutant detection device). The S1216F8-BD chip supports GPS and Beidou (BDS) dual-system positioning, with a positioning accuracy of about 2.5 meters, high sensitivity, fast startup speed (cold start time is 35 seconds, hot start time is 1 second), and low power consumption (typical power consumption is about 30mA), which is suitable for battery-powered devices similar to this device.
[0133] 6 is a communication module. The communication module needs to meet the requirements of reliable data transmission capability, support HTTP communication, and be able to adapt to different scenarios of static and dynamic inspections. A 4G module, a narrowband IoT module, or a LoRA module can be selected. In this example, a 4G module is selected, model SIM7600G-4G-LTE, and communicates with the STM32 master (microcontroller 1) through the UART serial port.
[0134] 7 is the data storage module, and the Micro-SD card is selected. Since the STM32 series development board only supports SD specification version 2.0, the SD card model selects SD and SDHC cards (capacity less than 32GB). The storage module here plays an auxiliary and verification function on the one hand, which can be compared with the data stored on the server side. On the other hand, it is also used for the file storage needs during the online model update process.
[0135] 8 and 9 are power modules, where 8 is a battery pack consisting of two 18650 lithium batteries connected in series, which obtains the required voltage of 5V and 3.3V through the LDO voltage regulator and step-down circuit; 9 is a Type-C power supply port, which can be connected to an external power bank or other power supply to power the device, and can also charge the lithium battery pack. For safety considerations, a lithium battery overcharge protection circuit and a charging indicator light are set. When the lithium battery voltage reaches the threshold, the indicator light turns on.
[0136] 10 is the device shell, which is made of ABS engineering plastic, ivory white in color, and measures 17×10×3.5cm 3 The shell thickness is 3.5mm, and it consists of an upper shell and a lower shell. The upper shell is 25mm high. A bayonet is set between the upper and lower shells, and a 2mm wide groove is added to the surface of the upper shell. In order to better fix it, four M2 screw columns are used to connect the upper and lower shells. A reinforcing rib with a width of 2mm and a height of 18mm is added next to the screw column. Figure 3 As shown, the above-mentioned various modules are located in the device housing.
[0137] A flow chart of a method for calibrating atmospheric pollutant sensor data suitable for deployment on an embedded terminal in an embodiment of the present application is as follows: Figure 4 As shown, the specific steps of the method are:
[0138] Step 1: Obtain the original response data (S1, S2, S3, S4, S5, S6) of different sensors with different concentrations under different atmospheric environments after temperature compensation, as well as the corresponding temperature (T), humidity (H), air pressure data (P), and sampling time (t); each sensor generates a time series data set; at the same time, collect the actual concentration values (V1, V2, V3, V4, V5, V6) of the corresponding detection objects of different sensors at the corresponding time given by the national control station or provincial control station;
[0139] Step 2: Preprocess the obtained data, including deletion of missing and bad values, data merging, data quantization, and EWMA filtering to obtain the final data set;
[0140] Step 3: Use the random forest algorithm as the teacher model and the gradient boosting algorithm as the student model, and set the hyperparameters of the two algorithms, where
[0141] The hyperparameters of the random forest algorithm include the number of decision trees n_estimators_rf and the maximum depth of the decision tree max_depth_rf, the minimum number of samples of leaf nodes min_samples_leaf_rf, and the minimum number of samples before node splitting min_samples_split_rf;
[0142] The hyperparameters of the gradient boosting algorithm include learning rate learning_rate_gbm, number of weak learners n_estimators_gbm, maximum tree depth max_depth_gbm, minimum number of samples before node splitting min_samples_split_gbm and minimum number of samples of leaf nodes min_samples_leaf_gbm;
[0143] Use the Ivy algorithm to optimize the hyperparameters of the gradient boosting algorithm and the random forest algorithm;
[0144] Step 4: Substitute the optimal hyperparameter solutions found by optimization into the corresponding algorithms, and use these hyperparameter combinations to retrain the teacher model and student model;
[0145] The training process of the teacher model is: select the original response value of the sensor after temperature compensation (S1, S2, S3, S4, S5, S6), temperature (T), humidity (H), and air pressure (P) as input features, and the actual concentration value (V1, V2, V3, V4, V5, V6) of the corresponding detection object of different sensors as the target value, and the output of the teacher model is the concentration value of the corresponding detection object; divide the final data set obtained in step 2 into a training set and a test set, and train the random forest algorithm with the optimal solution of the hyperparameters; after the training is completed, use the trained random forest model to predict the feature data in the training set to generate the corresponding "soft labels", which are used as input data in the next distillation process to train the student model;
[0146] The training process of the student model is: the output of the teacher model As soft labels, the soft labels and the original sensor response values after temperature compensation (S1, S2, S3, S4, S5, S6), temperature (T), humidity (H), and air pressure (P) are used to generate a new training set, and the gradient boosting machine algorithm GBM with the optimal solution of hyperparameters is trained with the new training set.
[0147] With training data Initial prediction value Set to the mean of all labels, that is:
[0148]
[0149] The mean square error (MSE) is used as the loss function of the gradient boosting algorithm. In each round of iteration, the residual error is fitted:
[0150]
[0151] in, is the predicted value of GBM after the tth iteration; N is the number of samples;
[0152] Calculate the residual and train a new weak learner. In each round, GBM calculates the current prediction and the true soft label The difference between
[0153]
[0154] GBM then trains a new weak learner (decision tree) h based on these residuals (t) (X i ) to fit these residuals;
[0155] GBM outputs the current weak learner h (t) (X i ) and the previous predicted value A weighted combination is performed to update the student model, where the learning rate η is used to control the step size of each update, and the update formula is:
[0156]
[0157] GBM gradually builds multiple decision trees and continuously iterates to update the prediction value Get the trained student model;
[0158] Step 5: Deployment of the model on embedded devices:
[0159] Step 5.1. Set the input data type to floating point type, and use the convert_sklearn function in the skl2onnx library to convert the trained student model to ONNX format; save the converted ONNX model as a file for subsequent deployment and use;
[0160] Step 5.2. Select Additional Software in STM32CubeMX, enter the plug-in X-CUBE-AL, select Soft Component Class as Artificial Intelligence in the plug-in, make sure the X-CUBE-AI version is 5.2.0 or above, check Core, and select the project type to be generated as Application template;
[0161] Step 5.3. In the Configuration of X-CUBE-AI, select the model format as ONNX and the compression factor of the model as None. After the configuration is complete, click Analyze. X-CUBE-AI will automatically analyze whether the model can be deployed, as well as the complexity of the model, the size of the Flash memory occupied, and the running time.
[0162] Step 5.4: Then generate the optimized STM32 AI Runtime Library (i.e. the code library generated by X-CUBE-AI) through the C-code generator and automatically integrate it into the project file. It can convert the model (such as ONNX or TensorFlow format) into C language code, that is, automatically convert the original algorithm model written in Python language to generate .c format files, and then add these .c format files to the Keil5 project project. By calling the API functions in these files in the program to process the collected sensor raw response data, the output of these functions is the calibrated data;
[0163] Step 6: Update Display:
[0164] The sensor response data under the update of environmental temperature, humidity and air pressure data is collected regularly to form a new data set, and the teacher model and the student model of step 4 are trained with the new data set to obtain the updated model parameter file of the student model, and the updated model parameter file is stored in the cloud server. The embedded device obtains the new updated model parameter file from the cloud server through the HTTP protocol and replaces the old model parameters in the file. During the model update process, a fallback mechanism is provided to ensure that the original model parameters can be rolled back when the model parameter update fails. The cloud server is used to store the model parameter file, the measurement data set and the calibration result data, and is connected to the display unit for visual display.
[0165] The specific steps of the Ivy algorithm (TLIVY) in the embodiment of the present application are:
[0166] Step S1: Input the number of parameters of the TLIVY algorithm: I min ,I max ,Iter max,Npop and div. Set Iter = 1; Npop is the population size, that is, the number of ivy individuals in the population, that is, the number of solutions (or individuals) contained in each generation, which is set to 10 in this example; div is the dimension of the solution, that is, the number of parameters to be optimized, which is set to 9 in this example, respectively: n_estimators_rf, max_depth_rf, min_samples_leaf_rf, min_samples_split_rf of the random forest model and n_estimators_gbm, learning_rate_gbm, max_depth_gbm, min_samples_split_gbm, min_samples_leaf_gbm of GBM; that is, each generation of the population contains N = 10 div = 9-dimensional vectors (solutions),
[0167] Iter max is the maximum number of iterations, which is set to 50 in this example, and the initial number is set to 1;
[0168] I max and I min They represent the upper and lower bounds of the search space for optimal parameters. They are an array of size 1×div, indicating the value range of each hyperparameter to be optimized.
[0169] Step S2: Calculate the growth rate ΔGv of the ivy plant using formula (1): i ,Right now:
[0170]
[0171] Among them, I i represents the position vector of the i-th ivy plant. The solution for each ivy plant can be represented as a div-dimensional vector;
[0172] Step S3: Initialization of the ivy population, using the improved Tent chaotic map to generate initial values, and then normalizing the population position to the upper and lower bounds;
[0173] At the beginning, a group of ivy is generated, and the position vector of the i-th ivy is recorded as I i , the i-th population member has I i =(I1, ..., I iD ), where i = 1, 2, ..., N pop , and we denote the total population of ivy plants by The classic Tent chaos mapping formula is:
[0174]
[0175] where x t is the current input value, ranging from [0.1], that is, the formula: x t = rand(0,1); a is a constant parameter, usually between [1,2]; but the classic formula only generates a constant based on the current value x t The new value of may cause the population to fall into local optimality and converge prematurely due to its determinism. Therefore, γ·rand(1,div) and λ·ΔC are added to the basic formula based on the characteristics of the Ivy algorithm. v,i The two perturbations can randomly adjust the values generated in each iteration, thereby introducing more diversity in the population initialization and iteration process. The improved chaotic mapping formula for initialization (Formula (3)) is as follows:
[0176] I i [j] = Tent(x t )+γ·rand(1,div)+λ·ΔG v,i (3)
[0177] I i [j] represents the jth parameter value (i.e., the value of the jth dimension) of the i-th individual in the population, that is, the initial value is generated for each dimension of each individual, rand(1,div) represents a vector of uniformly distributed random numbers in the interval [0,1] with a dimension of div=9, γ is the amplitude coefficient of random perturbation, and the range is set to a small value in [0.01,0.05] to prevent the random perturbation from being too large and destroying the effect of Tent mapping, and λ is a small positive number in the range of [0.01,0.05] based on the amplitude coefficient of growth rate perturbation; then, the generated entire individual vector is adjusted to the upper and lower bounds using formula (4) for overall normalization;
[0178] I i =I min +(I max -I min )⊙I i (4)
[0179] Among them, I i Represents the i-th individual in the population, which is a complete vector containing the values of all parameter dimensions. In this example, I i =[I i [0],I i [1],...,I i [8]], I max and I min are the upper and lower bounds of the parameter, respectively, and “⊙” is the Hadamard product (also called element-wise product) of two vectors;
[0180] Step S4: Define the objective function, calculate the objective function values of all members in the initial population, and evaluate them according to the fitness value (here is the objective function value, the smaller the objective function value, the better the fitness value). Sort them (from best to worst member) and then set I Best =I1;
[0181] Define the objective function f(I): For each candidate solution I, first use the random forest model to train to obtain soft labels, then use the gradient boosting model to train with the soft labels as the target, return the test set RMSE, and minimize the RMSE as the objective function value. Then calculate the objective function value f(I) of all individuals in the population i ), sort the population from best to worst according to fitness value, and determine the best individual I1;
[0182] Step S5: Enter the main loop, when Iter≤Iter max hour:
[0183] Step S51: For the case where i=1 to Npop (for loop starts), select the nearest neighbor member I by formula (5) ii :
[0184]
[0185] And calculate the distance: d t =||I i -I ii ||;
[0186] Step S52: Calculate the fitness normalization value f by formula (6) norm :
[0187]
[0188] Where f(I min ) is the optimal objective function value (minimum value) of the current population, f(I max ) is the worst objective function value (maximum value) of the current population. The constant term 1e-9 is added to avoid zero division errors in numerical calculations, and it is a very small constant (10 -9 ), which will hardly affect the calculation of the results;
[0189] Step S53: Levy flight formula. The classic Levy flight formula is: in is a normally distributed random number, σ u and σ v is the standard deviation of the distribution, β lis the control parameter of the Levy distribution, which is used to determine the tail characteristics of the distribution. However, in the classic Levy formula, the step size is completely controlled by the Levy distribution, which is independent of the current state of the individual and lacks adaptability. This will cause the step size to be still large when the individual is close to the optimal solution, destroying the fine search ability and losing some diversity; and when the individual is far away from the optimal solution, the step size may be smaller, making it difficult to jump out of the local optimum, limiting the global exploration ability, and the algorithm is prone to waste computing resources in a complex search space, unable to effectively explore or develop the solution space. In addition, there is a lack of interaction between individuals, and the search behavior of individuals is isolated. It is also easy to ignore population information, making it difficult to simulate the collaboration and information sharing between individuals in the biologically inspired algorithm, resulting in the population being unable to cooperate effectively and reducing the global optimization ability. In order to overcome these problems of the classic Levy formula, combined with the characteristics of the Ivy algorithm, the following adjustments are introduced:
[0190] In the IVY algorithm, the growth direction of an individual is guided by its neighbors (better solutions), so the neighbor distance d is added to the Levy step formula. t The dynamic adjustment term makes the step size related to the relative position of the neighbors. t When d is smaller, the step length becomes shorter and local development is strengthened. t When it is larger, the step length is lengthened to enhance the global exploration capability;
[0191] In the IVY algorithm, the fitness value f(I i ) determines the quality of the individual, so it is used to adjust the step size by adding the normalized value of fitness f norm (I i ), adjust the step size, when f(I i ) is close to the optimal value f min When , the step size becomes smaller, and when the fitness is poor, the step size increases to strengthen the exploration;
[0192] In the IVY algorithm, the growth rate ΔG v,i The dynamic change of the growth rate ΔG reflects the potential search ability of the individual. v,i As the scaling factor of the Levy step length, when ΔG v,i When ΔG is larger, the step size increases and the search range is enhanced. v,i When it is smaller, the step size is reduced, which enhances the search accuracy;
[0193] Combining the above improvement ideas, the improved Levy flight formula is:
[0194]
[0195] Among them, u, v ~ N (0, 1) (normal distribution random number), β l The value of is 1.5;
[0196] Step S6: Calculate β = (2 + rand) / 2, where β is the threshold of behavior switching, representing the random parameter of dynamic switching behavior, which is the same as β in the improved Levy flight formula. l It does not matter. When f(I i )<β·f(I Best ), indicating a preference for local development; otherwise, a preference for global exploration;
[0197] Step S7: If f(I i )<β·f(I Best );
[0198] Step S8: Climbing behavior, individuals use neighboring information (I ii ) gradually approaches the optimal solution and enhances local development capabilities; the climbing behavior formula is:
[0199]
[0200] in is the new position (solution) generated for the i-th individual in the current iteration of the algorithm;
[0201] Step S9: otherwise (else);
[0202] Step S10: Extended behavior, individuals around the global optimal solution I Best Expand and explore possible better solutions to enhance global exploration capabilities. The expansion behavior formula is:
[0203]
[0204] Step S11: end judgment (end if);
[0205] Step S12: Update the objective function value and growth rate, evaluate The fitness of Calculate the new growth rate:
[0206] Step S13: The new solution Joining a new population
[0207] Step S14: end the for loop (end for);
[0208] Step S15: Merge populations and (That is, create a list: );
[0209] Step S16: Sort by fitness value from small to large (from the best member to the worst member) Sorted version of and from Select the best member (i.e., select the member with the top Npop) as the next generation of the TLIVY algorithm, while retaining I Best The update logic of )) and set the optimal solution I Best =I1);
[0210] Step S17: Iter=Iter+1;
[0211] Step S18: end the loop (end while);
[0212] Step S19: Return the optimal solution I obtained by the TLIVY algorithm Best And the corresponding objective function value f(I Best ).
[0213] The visualization part interface in the embodiment of the present application is as follows Figure 7 As shown in the figure, the main technology stacks used in the front end are: Vue 3, Vite, Pinia, Axios, Vue Router, Element Plus and ECharts. Vue3 is used to build the user interface, providing a component-based development method to improve development efficiency; Vite, as a construction tool, is mainly used for project development and packaging, with fast cold start and hot update features to improve the development experience; Pinia, as a state management tool, facilitates unified management of global states and simplifies data transfer between complex components; Axios is a JavaScript library for sending HTTP requests, suitable for data interaction between the front end and the back end. In the front end of this project, Axios is used to handle all HTTP requests, and through integration with tools such as Vue 3 and Pinia, efficient data transmission and processing are achieved; VueRouter is used to manage front-end routing, realize page jump without refresh, and ensure a smooth user experience in single-page applications; Element Plus is a UI component library that provides a wealth of reusable components, such as tables, buttons, input boxes, etc., to facilitate quick page construction; ECharts is used to achieve data visualization, and displays real-time and historical data of devices through line charts, bar charts and other charts.
[0214] The main technology stacks used in the backend are: Django, Django ORM, MySQL, Openpyxl, and RESTfulAPI. Django is mainly used to build backend logic, implement API interfaces, handle user authentication, data storage, model management, etc. MySQL is used as a database to store user information, sensor data, and calibrated data. Openpyxl is used to generate and export Excel files and provide historical data export functions. Django ORM can simplify database operations and facilitate data storage, query, and update through the mapping between model classes and database tables. RESTfulAPI is based on Django RESTframework, which is used for data interaction between the front and back ends and provides data acquisition and model update functions. The specific steps of this part are:
[0215] Step 1: User login and management module
[0216] Front-end process: When the user visits the specified network address for the first time, Vue Router will navigate the web page to the login page. The user then enters the username and password through the login page. After clicking the "Login" button, the front-end sends an HTTP POST request to the back-end through Axios. The request carries the username and password just entered by the user, and calls Pinia for state management. If the login is successful, the back-end returns the JWT Token, and the front-end saves the Token in the local storage and updates the global state at the same time. After a successful login, the user can access different pages through Vue Router. The system decides which functions to display based on the user role, such as data visualization, historical data viewing, and user management.
[0217] Backend process: When the frontend sends an HTTP POST request to the API interface specified by the backend, the interface will process the user's login request and use Django's built-in user verification module to verify the username and password. If successful, a JWTToken is generated and returned to the frontend. Django will also return the user permission information stored in the database to the frontend through ORM to ensure that different roles can access different functional modules.
[0218] Step 2: Real-time data display module
[0219] Front-end process: The front-end page uses Element Plus and ECharts to display tables and charts. Axios sends an HTTP GET request to the specified interface of the back-end every 5 seconds. After obtaining the real-time data returned by the back-end, Vue 3 passes the real-time data returned by the back-end to the two UI component libraries Element Plus and ECharts. After rendering the data, the two UI component libraries dynamically display the pollutant concentration and environmental parameters (such as temperature, humidity, and air pressure) read by the sensor through line charts. At the same time, Pinia is responsible for managing the status of real-time data, and continuously sends GET requests to the back-end through scheduled tasks to obtain the latest data. When new data is received, the Vue 3 component updates the displayed data through the state management tool Pinia, and Element Plus and ECharts will automatically refresh the chart. Users can intuitively monitor the current pollutant concentration and environmental parameters read by the sensor.
[0220] Backend process: Django provides a real-time data interface through RESTful API, and the frontend obtains sensor data through HTTP GET request. The backend reads the latest sensor response value from the MySQL database and packages the data into JSON format and returns it to the frontend. While the Django framework processes the data, it also performs data verification to ensure that the returned data is correct. For the received data, Django will perform preprocessing (such as filtering out abnormal values, filling missing values, etc.) and return it to the frontend.
[0221] Step 3: Historical data viewing and export module
[0222] Front-end process: Users can query historical data through date selectors, equipment IDs, pollutant concentrations, environmental parameters and other conditions. The front-end passes the user-selected conditions to the API specified by the back-end, and displays the query results through the table component of Element Plus. On the table, users need to first select the format of the file to be exported, where the exported file supports CSV or XLSX format, and then click the "Export" button. The front-end will send a request to the back-end to generate a CSV or XLSX format file containing historical data, and users can directly download the generated file.
[0223] Backend process: After receiving the query request from the frontend, the backend will first pre-process the query conditions returned by the frontend so that fuzzy query operations can be performed in MySQL through Django ORM. After that, Django will return the qualified historical data from MySQL to the frontend through paging through Django ORM. When the user requests to export data, Django uses the Openpyxl library to generate a file in CSV or XLSX format and provide a download link. After the file is generated, the backend returns a file download URL. After the frontend obtains the URL, Vue 3 will directly call the browser's download function and download the file directly to the default storage path.
[0224] Step 4: Data Visualization Analysis Module
[0225] Front-end process: Users can select multiple analysis dimensions and use ECharts to generate line charts, bar charts and other visual charts for different types of sensor data. After the user selects the type of pollutant to be displayed (such as PM2.5, NO2, etc.) through the drop-down menu, the front-end will access the API interface specified by the back-end to obtain the data. After the front-end obtains the data returned by the back-end, it will update the display in real time. When the data changes, Pinia is responsible for updating the status, and ECharts re-renders the chart according to the new status to ensure that users can analyze the latest data trends at any time.
[0226] Backend process: Django provides multi-dimensional data query services through API interfaces. After the user selects the type of pollutant to be displayed, Django extracts the corresponding data from the MySQL database according to different query parameters, aggregates the data by time dimension, and returns it to the front end. Django also provides different statistical analyses, such as maximum, minimum, average, etc., through data aggregation functions to assist users in analyzing data trends.
[0227] Step 5: Model Update and Mission Control Module
[0228] Front-end process: The front-end page provides a control interface for model updates, through which users can upload new calibration model parameter files. After the model is uploaded, the front-end sends the file to the back-end API to trigger the model update mechanism. The front-end displays the progress bar and status prompts of the model update through Element Plus to ensure that users understand the update process. When the new model is successfully deployed, the system will display a success prompt.
[0229] Backend process: After receiving the new model file, Django stores the file on the server and transmits the new model file to the embedded device through the RESTful API.
[0230] Through the implementation of these detailed processes, the entire atmospheric pollutant detection system can achieve a complete closed-loop operation from sensor data acquisition, calibration, storage, visual analysis to model management.
[0231] The model online update mechanism in the embodiment of the present application is as follows Figure 8 As shown in the figure, after the new model training is completed, the new weight parameters are extracted, and the detection device establishes HTTP communication with the server through the built-in 4G module to update the model, and then conducts a feasibility test. If the model fails after the update, it will automatically revert to the old version. The specific steps of this part are:
[0232] Step 1: First, a new model is trained. You can use a new data set to train the model, but try not to change the model's configuration parameters such as depth, activation function, etc.
[0233] Step 2: Convert the newly trained model into an .ONNX format file;
[0234] Step 3: Use STM32CubeMX to convert the .ONNX format file and configure it accordingly. STM32CubeMX will generate three .c files about the new model according to the configuration, namely: newmodel.c, newmodel_data.c and NewModel_data_params.c;
[0235] Step 4: Open the newmodel_data_params.c file, find the weight array s_newmodel_weights_array_u64, open the newmodel.c file, and find the definition of the model version number AI_CNN_GRUT_MODEL_SIGNATURE;
[0236] Step 5: Convert the weight array and model version value in step 4 into a binary file format (here the file is named: paradata.bin)
[0237] Step 6: Download the paradata.bin file to the Micro-SD card of the detection device via the HTTP protocol, including the scheduled update check of the program and the download of the model.
[0238] The detection device periodically sends a GET request to the Huawei Cloud Elastic Cloud Server (ECS) API endpoint to check whether the server has a new model update package available, for example, using a timer to set a check every hour. If there is a new update package, the cloud server response is parsed to obtain the download link, and the latest model update file is downloaded from the cloud server to the Micro-SD card.
[0239] Step 7: Save the weights array and version value of the old model as array s_rf_gbm_weights_array_u64_old as well as AI_RF_GBM_MODEL_SIGNATURE_OLD.
[0240] Step 8: Read the weight data and model version value of the paradata.bin file in the Micro-SD card and replace the values of s_rf_gbm_weights_array_u64 and AI_RF_GBM_MODEL_SIGNATURE;
[0241] Step 9: Perform a simple test on the newly loaded model and observe the data calibration results of the updated model. If the test result exceeds the set fault tolerance value range, the new model update is determined to have failed and the old model parameters are restored immediately. If the test is successful, the old model parameters (i.e., s_rf_gbm_weights_array_u64_old and AI_RF_GBM_MODEL_SIGNATURE_OLD) are deleted.
[0242] The implementation steps of multi-task scheduling management in the embodiment of the present application are as follows:
[0243] Step 1: Create the corresponding task.
[0244] Define the name and function of each task, including:
[0245] Data collection task (DataCollectionTask): responsible for regularly collecting atmospheric pollutant concentrations and environmental parameters.
[0246] Data Calibration Task: Responsible for real-time calibration of collected data using the latest model.
[0247] Model Update Task (ModelUpdateTask): responsible for downloading the new model from the server and updating the old model.
[0248] Data Transmation Task: Responsible for sending collected data and calibration results to the cloud in real time.
[0249] Task SchedulerTask: responsible for coordinating the execution order and time of other tasks.
[0250] In FreeRTOS, these tasks are created using the xTaskCreate() function.
[0251] In the data collection task, sensors are used to read atmospheric pollutant concentrations and environmental parameters regularly. After data collection is completed, the results are stored in a shared buffer, and a semaphore or queue is used to pass new data to the calibration task. In the data calibration task, the collected data is received from the queue and calibrated using the currently loaded calibration model. The calibration results are stored in another shared buffer for use by subsequent tasks. In the model update task, the device periodically checks whether the server has an updated model package available. If a new model is found, the task will execute the relevant content of step 12. In the data transmission task, the original response value measured by the sensor, the calibrated results, and the environmental information are converted into a JSON format data packet and sent to the server via the HTTP protocol. The task scheduling task dynamically adjusts the priority and running order of other tasks. For example, when data collection is frequent, data collection and calibration tasks are scheduled first, and the priority of the model update task is increased when data transmission is idle.
[0252] Step 2: Communication between tasks
[0253] Communication between tasks is achieved through queues and semaphores. Queues are used to transfer data between data acquisition tasks, calibration tasks, and visualization tasks. The data acquisition task sends the read data to a message queue, and the calibration task receives the data from the queue for processing. Semaphores are used to control access to shared resources. When the model update task downloads the model, semaphores are used to prevent other tasks from accessing and using the model data at the same time to avoid data conflicts.
[0254] Step 3: Task Scheduling and Priority Management
[0255] In FreeRTOS, tasks are scheduled based on priority. High-priority tasks will be executed before low-priority tasks when they are ready. In order to effectively manage the priority of tasks, a dynamic adjustment mechanism is used.
[0256] Initial priority setting: Assign a priority to each task based on its importance. The initial priority order from high to low is: data collection task, data calibration task, task scheduling task, data transmission task, model update task.
[0257] Dynamic priority adjustment: In task scheduling, the priority of tasks can be adjusted according to system status and resource utilization. For example, if frequent data collection is detected, the priority of data collection and calibration tasks can be increased; when network conditions are good, the priority of model update tasks can be increased to speed up the model update process.
[0258] Step 4: Resource management between tasks
[0259] Use semaphores and mutexes to protect access to shared resources to prevent data inconsistency and deadlock. When it comes to updating model weights, use mutexes to protect access to model data to ensure that only one task can update or read the model at any time.
[0260] Step 5: Task Scheduling Strategy
[0261] Use a time slice round-robin scheduling strategy to ensure that the system remains stable under high load. For lower priority tasks, use a time slice round-robin mechanism to ensure that each task can be executed within a certain period of time.
[0262] The present invention detects the concentration of environmental pollutants through electrochemical sensors and optical sensors, uses the GBM algorithm model as a calibration model and deploys it to the detection device, so as to achieve efficient and accurate data calibration, so that complex data processing can also be performed in resource-constrained embedded devices. Secondly, the system can dynamically update the calibration model parameters through the online model update mechanism, ensuring the continuous optimization of the detection results. In addition, the system realizes data transmission and visualization through the wireless communication module, and users can obtain current and historical data at any time to facilitate decision-making and management. Finally, comprehensive user management and authority control enhance the security of the system, adapt to the needs of different users, and thus improve the efficiency and reliability of atmospheric pollutant detection. These advantages make the present invention more feasible and practical in practical applications, and provide beneficial technical support for environmental monitoring.
[0263] The embodiments described above are only intended to facilitate the understanding of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0264] Any matters not described in the present invention are applicable to the prior art.
Claims
1. A method for calibrating atmospheric pollutant sensor data suitable for deployment on an embedded terminal, characterized in that: The steps of this method are: Step 1: Obtain the original response data (S1, S2, S3, S4, S5, S6) of different sensors with different concentrations under different atmospheric environments after temperature compensation, as well as the corresponding temperature (T), humidity (H), air pressure data (P), and sampling time (t); each sensor generates a time series data set; at the same time, collect the actual concentration values (V1, V2, V3, V4, V5, V6) of the corresponding detection objects of different sensors at the corresponding time given by the national control station or provincial control station; Step 2: Preprocess the obtained data, including deletion of missing and bad values, data merging, data quantization, and EWMA filtering to obtain the final data set; Step 3: Use the random forest algorithm as the teacher model and the gradient boosting algorithm as the student model, and set the hyperparameters of the two algorithms, where The hyperparameters of the random forest algorithm include the number of decision trees n_estimators_rf and the maximum depth of the decision tree max_depth_rf, the minimum number of samples of leaf nodes min_samples_leaf_rf, and the minimum number of samples before node splitting min_samples_split_rf; The hyperparameters of the gradient boosting algorithm include learning rate learning_rate_gbm, number of weak learners n_estimators_gbm, maximum tree depth max_depth_gbm, minimum number of samples before node splitting min_samples_split_gbm and minimum number of samples of leaf nodes min_samples_leaf_gbm; Use the Ivy algorithm to optimize the hyperparameters of the gradient boosting algorithm and the random forest algorithm; Step 4: Substitute the optimal hyperparameter solutions found by optimization into the corresponding algorithms, and use these hyperparameter combinations to retrain the teacher model and student model; The training process of the teacher model is: select the original response value of the sensor after temperature compensation (S1, S2, S3, S4, S5, S6), temperature (T), humidity (H), and air pressure (P) as input features, and the actual concentration value (V1, V2, V3, V4, V5, V6) of the corresponding detection object of different sensors as the target value, and the output of the teacher model is the concentration value of the corresponding detection object; The final data set obtained in step 2 is divided into a training set and a test set, and the random forest algorithm with the optimal solution of hyperparameters is trained; After the training is completed, the trained random forest model is used to predict the feature data in the training set and generate corresponding "soft labels". These soft labels are used as input data in the next distillation process to train the student model. The training process of the student model is: the output of the teacher model As soft labels, the soft labels and the original sensor response values after temperature compensation (S1, S2, S3, S4, S5, S6), temperature (T), humidity (H), and air pressure (P) are used to generate a new training set, and the gradient boosting machine algorithm GBM with the optimal solution of hyperparameters is trained with the new training set. With training data Initial prediction value Set to the mean of all labels, that is: The mean square error (MSE) is used as the loss function of the gradient boosting algorithm. In each round of iteration, the residual error is fitted: in, is the predicted value of GBM after the tth iteration; N is the number of samples; Calculate the residual and train a new weak learner. In each round, GBM calculates the current prediction and the true soft label The difference between GBM then trains a new weak learner (decision tree) h based on these residuals (t) (X i ) to fit these residuals; GBM outputs the current weak learner h (t) (X i ) and the previous predicted value A weighted combination is performed to update the student model, where the learning rate η is used to control the step size of each update, and the update formula is: GBM gradually builds multiple decision trees and continuously iterates to update the prediction value Get the trained student model; Step 5: Deployment of the model on embedded devices: Step 5.
1. Set the input data type to floating point type, and use the convert_sklearn function in the skl2onnx library to convert the trained student model to ONNX format; save the converted ONNX model as a file for subsequent deployment and use; Step 5.
2. Select AdditionalSoftware in STM32CubeMX, enter the plug-in X-CUBE-AL, select SoftComponentClass as ArtificialIntelligence in the plug-in, make sure the X-CUBE-AI version is 5.2.0 or above, check Core, and select the type of project to be generated as Applicationtemplate; Step 5.
3. In the Configuration of X-CUBE-AI, select the model format as ONNX and the compression factor of the model as None. After the configuration is complete, click Analyze. X-CUBE-AI will automatically analyze whether the model can be deployed, as well as the complexity of the model, the size of the Flash memory occupied, and the running time. Step 5.4: Then generate the optimized STM32AIRuntimeLibrary through C-codegenerator and automatically integrate it into the project file, convert the ONNX format model or TensorFlow format model into C language code, that is, automatically convert the original algorithm model written in Python language to generate .c format files, and then add these .c format files to the Keil5 project project. By calling the API functions in these files in the program to process the collected sensor raw response data, the output of these functions is the calibrated data; Step 6: Update Display: The sensor response data under the update of environmental temperature, humidity and air pressure data is collected regularly to form a new data set, and the teacher model and the student model of step 4 are trained with the new data set to obtain the updated model parameter file of the student model, and the updated model parameter file is stored in the cloud server. The embedded device obtains the new updated model parameter file from the cloud server through the HTTP protocol and replaces the old model parameters in the file. During the model update process, a fallback mechanism is provided to ensure that the original model parameters can be rolled back when the model parameter update fails. The cloud server is used to store the model parameter file, the measurement data set and the calibration result data, and is connected to the display unit for visual display.
2. The method according to claim 1, characterized in that The process of the Ivy algorithm is: Step S1: Input the number of parameters of the Ivy algorithm: I min , I max , Iter max , Npop and div. Set Iter = 1; Npop is the population size, that is, the number of ivy individuals in the population, that is, the number of solutions contained in each generation; div is the dimension of the solution, that is, the number of parameters to be optimized, which are: n_estimators_rf, max_depth_rf, min_samples_leaf_rf, min_samples_split_rf of the random forest model and n_estimators_gbm, learning_rate_gbm, max_depth_gbm, min_samples_split_gbm, min_samples_leaf_gbm of GBM; Iter max is the maximum number of iterations, I max and I min are the upper and lower bounds of the parameter search space; Step S2: Calculate the growth rate ΔGv of the ivy plant using formula (1): i ,Right now: Where I represents the position vector of the i-th ivy plant, and the solution of each ivy plant can be expressed as a div-dimensional vector; Step S3: Initialization of the ivy population, using the improved Tent chaotic map to generate initial values, and then normalizing the population position to the upper and lower bounds; At the beginning, a group of ivy is generated, and the position vector of the i-th ivy is recorded as I i , the i-th population member has I i =(I1, ..., I iD ), where i = 1, 2, ..., N pop , and represents the total population of ivy plants for: The improved Tent chaotic mapping formula is formula (3): I i [j]=Tent(x t )+γ·rand(1,div)+λ·ΔG v,i (3) Among them, Tent(x t ) is the classic Tent chaos mapping formula; I i [j] represents the jth parameter value (i.e., the value of the jth dimension) of the i-th individual in the population, that is, the initial value is generated for each dimension of each individual, rand(1, div) represents a vector of uniformly distributed random numbers in the interval [0, 1] with a dimension of div = 9, γ is the amplitude coefficient of random perturbation, and the range is set to a small value in [0.01, 0.05], and λ is a small positive number in the range of [0.01, 0.05] based on the amplitude coefficient of growth rate perturbation; Then use formula (4) to convert I i [j] Adjust to the upper and lower bounds and perform overall normalization; I i =I min +(I max -I min )⊙I i (4) Among them, I i Represents the i-th individual in the population, which is a complete vector containing the values of all parameter dimensions. max and I min are the upper and lower bounds of the parameter, respectively, and "⊙" is the Hadamard product of two vectors; Step S4: Define the objective function, calculate the objective function values of all members in the initial population, and Sort the members from best to worst, set I Best =I1; Define the objective function f(I): For each candidate solution I, first use the random forest model to train to obtain soft labels, then use the gradient boosting model to train with the soft labels as the target, return the test set RMSE, and minimize the RMSE as the objective function value; then calculate the objective function value f(I) of all individuals in the population i ), sort the population from best to worst according to fitness value, and determine the best individual I1; Step S5: Enter the main loop, when Iter≤Iter max hour: Step S51: For the case where i=1 to Npop (for loop starts), select the nearest neighbor member I by formula (5) ii : And calculate the distance: d t =||I i -I ii ||; Step S52: Calculate the fitness normalization value f by formula (6) norm : Where f(I min ) is the optimal objective function value (minimum value) of the current population, f(I max ) is the worst objective function value (maximum value) of the current population; Step S53: Levy flight formula is: Among them, u, v ~ N (0, 1) are normally distributed random numbers, β l is the control parameter of the Levy distribution, which is 1.5; d t is the neighbor distance; f norm is the normalized value of fitness; ΔG v,i is the growth rate; Step S6: Calculate β = (2 + rand) / 2, where β is the threshold of behavior switching, representing the random parameter of dynamic switching behavior. i )<β·f(I Best ), indicating a preference for local development; otherwise, a preference for global exploration; Step S7: If f(I i )<β·f(I Best ); Step S8: Climbing behavior, individuals use neighboring information (I ii ) gradually approaches the optimal solution and enhances local development capabilities; the climbing behavior formula is: in is the new position generated for the i-th individual in the current iteration of the algorithm; Step S9: Otherwise; Step S10: Extended behavior, individuals around the global optimal solution I Best Expand and explore possible better solutions to enhance global exploration capabilities. The expansion behavior formula is: Step S11: end the judgment; Step S12: Update the objective function value and growth rate, and evaluate The fitness of Calculate the new growth rate: Step S13: The new solution Joining a new population Step S14: end the for loop; Step S15: Merge populations and That is, create the list: Step S16: Sort by fitness value from small to large Sorted version of and from Select the best member, that is, select the member with the top Npop as the next generation of the Ivy algorithm, while retaining I Best The update logic is, And set the optimal solution I Best =I1; Step S17: Iter=Iter+1; Step S18: end the loop; Step S19: Return the optimal solution I obtained by the TLIVY optimization algorithm Best And the corresponding objective function value f(I Best ).
3. The method according to claim 1, characterized in that The parameter values of the random forest algorithm with the optimal solution of hyperparameters are: n_estimators_rf=69, max_depth_rf=7, the minimum number of leaf node samples min_samples_leaf_rf_4, and the minimum number of samples before node splitting min_samples_split_rf_2; the parameter values of the gradient boosting algorithm with the optimal solution of hyperparameters are: the learning rate learning rate is set to 0.15; the number of weak learners n_estimators is set to 69; the maximum tree depth max_depth is set to 4; the minimum number of sample splits min_samples_split is set to 2; and the minimum number of leaf node samples min_samples_leaf is set to 4.
4. An atmospheric pollutant sensor data calibration system, characterized in that: The system performs the calibration method according to any one of claims 1 to 4, including: Air pollutant detection device, which is placed in the target area for static detection or placed on a mobile carrier for dynamic inspection, collects multiple air pollutant concentration data and environmental temperature, humidity, air pressure, longitude and latitude data. The device is equipped with a communication module and a storage module for transmitting and storing data; The atmospheric pollutant detection device is embedded with a lightweight model. The lightweight model is a student model after the teacher model is distilled and implemented using a gradient boosting algorithm. It is used to calibrate the concentration data of each pollutant in real time on the embedded end. PC side, used for model training and display; A cloud server, which communicates bidirectionally with the air pollutant detection device, is used to obtain data measured by the air pollutant detection device, calibration data, and store model parameter files; On the user side, current and historical data can be viewed in real time through a visual interface, and data can be exported to CSV or XLSX format; The atmospheric pollutant detection device updates the parameters of the lightweight model online using the model parameter file stored in the cloud server through HTTP communication.
5. The atmospheric pollutant sensor data calibration system according to claim 4, characterized in that: The atmospheric pollutant detection device comprises: four three-electrode electrochemical sensors, an inhalable particle sensor module, a temperature, humidity and air pressure module, a positioning module, a microcontroller, a wireless communication module and a Micro-SD card storage module, and an anti-collision protection housing; There are two power supply methods, namely a battery pack with two lithium batteries connected in series and a standard type-c interface.
6. The atmospheric pollutant sensor data calibration system according to claim 4, characterized in that: The visualization interface includes a backend server and a frontend web page. The backend server is responsible for processing data from the device and storing it in the server database after verification. The frontend web page obtains real-time and historical data from Huawei Cloud Elastic Cloud Server based on user needs and displays it through data visualization tools. The main functional modules involved in the backend include: user authentication and information management module, data storage module and data display module; the main functional modules involved in the front end include: user login and management module, real-time data display module, historical data viewing and management module; The user authentication and information management module is used to process user identity authentication, registration, login, authority allocation and user information management; The data storage module is used to store the original response value of the sensor and the verified calibration data in the back-end database through the ORM function of Django; The data display module is used to provide a RESTful API interface, so that the front-end application can request real-time data and historical data from the server and return them in JSON format; The user login and management module is used for user identity authentication and authority management, allowing users with different authorities to access different system functions, and providing functions for registering, modifying and deleting user information; The real-time data display module is used to communicate with the Huawei Cloud elastic cloud server, obtain device or sensor data in real time, and use visualization tools to display current data, so that users can intuitively monitor the operating status of the device; The historical data viewing and management module is used to allow users to query historical data stored in the database by time period or device ID condition, and display it in table or graphical form, and support export to CSV or XLSX format.
7. The calibration system according to claim 4, characterized in that: The system uses FreeRTOS for task management, assigns data acquisition, calibration, transmission, storage, and online model replacement functions to independent tasks, and achieves efficient scheduling through priority management, specifically: Initial priority setting: The initial priority order from high to low is: data collection task, data calibration task, task scheduling task, data transmission task, model update task; Dynamic priority adjustment: In task scheduling, the priority of tasks is adjusted according to the system status and resource utilization. If frequent data collection is detected, the priority of data collection and calibration tasks is increased; When the network conditions are good, the priority of the model update task is increased to speed up the model update process; Resource management between tasks: Use semaphores and mutexes to protect access to shared resources to prevent data inconsistency and deadlock. When it comes to updating model weights, use mutexes to protect access to model data to ensure that only one task can update or read the model at any time. Task Scheduling Strategy: Use a time slice round-robin scheduling strategy to ensure that the system remains stable under high load. For lower priority tasks, use a time slice round-robin mechanism to ensure that each task can be executed within a certain period of time.
8. The calibration system according to claim 5, characterized in that Four three-electrode electrochemical sensors, namely: CO sensor model 4CO-500, NO2 sensor model 4NO2-20, SO2 sensor model 4SO2-20 and O3 sensor model 4O3-10; The model of the inhalable particle sensor module is HPMA115S0, which is used to detect the particle concentration of PM2.5 and PM10; the model of the temperature, humidity and air pressure module is BME280; the positioning module is a GPS / BDS positioning module, which is used to obtain the longitude and latitude information of the location of the device, and its model is S1216F8-BD; the communication module is at least one of a 4G module, a narrowband Internet of Things module or a LoRA module; the microcontroller is an STM32 master control.
9. The calibration system according to claim 5, characterized in that: The shell is made of ABS engineering plastic and measures 17×10×3.5cm 3 , the shell thickness is 3.5mm.
Citation Information
Patent Citations
Atmospheric pollutant detection device and data calibration method thereof
CN114397404A
Rotorcraft-mounted atmospheric environmental pollutant detection device and method
CN115144229A
Cited By
Converter intelligent control method and system based on reinforcement learning, medium and equipment
CN120278226A
Intelligent control methods, systems, media, and devices for converters based on reinforcement learning
CN120278226B
Soil remediation effect evaluation method and system based on edge calculation
CN122050616A
A soil remediation effect evaluation method and system based on edge computing
CN122050616B
Multi-parameter monitoring data correction method based on teacher-student model
CN122087265A