A continuous acquisition and data model building system and method for intelligent sensors
By using a continuous data acquisition and data model building system based on intelligent sensors, the problem of discrepancies between sensor training data and actual applications has been solved, achieving efficient data acquisition and model training, and improving the sensor's recognition capabilities in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-16
- Publication Date
- 2026-03-31
AI Technical Summary
The training data acquisition of existing chemical sensors does not match the actual application, the data acquisition efficiency is low, the effective data is insufficient, and the components of complex samples cannot be accurately identified.
The system employs continuous acquisition and data model building using intelligent sensors. By continuously acquiring response signal data, it provides samples with continuously changing concentrations during the training phase and samples with real-time environmental concentrations during the prediction phase. It combines state calibration and compensation units for correction, dynamically detects sensor states, and calls appropriate models for prediction.
It significantly reduces training time, improves model accuracy, conforms to the signal and concentration change process in actual applications, and enhances the sensor's recognition ability in complex environments.
Smart Images

Figure CN116720078B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sensor technology, and in particular to a system and method for continuous data acquisition and data model construction of an intelligent sensor. Background Technology
[0002] Sensors are one of the three pillars of modern information technology and the foundation of intelligent systems, making the development of new intelligent sensing technologies an urgent need. Chemical sensors are instruments that detect various chemical substances by converting their concentration into electrical signals, such as gas sensors, ion sensors, and biosensors. With the rapid development of technologies such as the Internet of Things (IoT), the combination of chemical sensors and mobile terminals has led to a wider and deeper demand than ever before in numerous fields, including safety alarms, health analysis, medical diagnosis, food quality testing, environmental monitoring, and smart packaging.
[0003] Most commonly used chemical sensors rely on contact or reaction between the sensitive material and the analyte, making them susceptible to significant kinetic influences. For example, the adsorption-desorption reaction of gases on sensitive materials is lengthy and highly nonlinear. This means that the response of a chemical sensor to the analyte is not only related to its concentration but also to its dynamic characteristics, such as whether it is in a concentration increase or decrease phase. For chemical sensors with poor reversibility, such as the inexpensive and easily manufactured semiconductor sensors widely used in industry, their performance in tasks such as real-time monitoring is poor. Similarly, for complex ion sensors and macromolecular biosensors, this leads to decreased accuracy or requires more time to return to equilibrium.
[0004] Traditional sensing algorithms typically assume that the sensor operates in an equilibrium state, independent of previous states. However, in practical applications, the concentration of sample components and other environmental parameters are constantly changing, often existing in different dynamic stages. Due to the nonlinear response and recovery characteristics of most chemical sensors, even when reaching the same state, the sensor's response signal will still differ depending on the dynamic stage. Currently, for these chemical sensors with poor reversibility, a discrete data acquisition mode is commonly used to ensure reproducible measurements and ease of training. This means that for each sample concentration within a concentration range, a relatively long recovery time is required to return to the background concentration after reaching that concentration. However, this data acquisition method leads to a mismatch between training data and actual application scenarios, resulting in low prediction accuracy. Simultaneously, the acquisition process becomes lengthy and inefficient, not only due to the long sensor recovery time but also because each response signal rises from the background concentration to the measured concentration, resulting in a prolonged response process, especially at high concentrations. Based on this data acquisition method, it is difficult to obtain sufficient data to train complex models such as deep neural networks, hindering large-scale applications.
[0005] Current chemical sensors typically only measure a single target, while the actual components of the sample being measured are often complex and unknown, making it impossible for a single sensor to accurately identify and detect them. Summary of the Invention
[0006] This invention primarily addresses the problems of discrepancies between existing chemical sensor training data acquisition and practical applications, low data acquisition efficiency, and insufficient effective data. It provides a system and method for continuous data acquisition and data model construction using intelligent sensors, improving upon the shortcomings of existing methods that only consider state information during training and prediction without taking into account the dynamic changes in sample composition. The system simultaneously models different dynamic stages during training and dynamically calls appropriate models based on sensor signals during prediction.
[0007] The above-mentioned technical problems of the present invention are mainly solved by the following technical solutions:
[0008] A system for continuous data acquisition and data model building using intelligent sensors, comprising:
[0009] The input module provides the sensor unit with samples of continuously varying concentrations during the training phase and continuously acquires response signal data; during the prediction phase, it provides the sensor unit with the sample concentration in the real-time environment and acquires response signal data in real time.
[0010] The state calibration unit processes the collected response signal data and inputs it into the prediction model for training or concentration prediction.
[0011] The compensation unit, after obtaining the temperature and humidity information from the temperature and humidity unit and the drift signal from the state calibration unit, corrects the temperature and humidity and the instrument drift respectively, and then transmits the corrected data to the state calibration unit for reprocessing.
[0012] Predictive models are used to train models or predict concentrations based on data processed from state calibration units.
[0013] Using a continuous data sampling method, without a recovery process, and reaching equilibrium in a shorter time greatly reduces training time; continuously collecting data during the response and recovery phases ensures that the training data conforms to the signal and concentration change process in actual applications; dynamically detecting the sensor's state and calling different models during the prediction process improves model accuracy.
[0014] Preferably, during the training phase, the input acquisition module includes:
[0015] Concentration control unit to adjust the concentration of different samples;
[0016] The sample testing unit provides the sensor unit with a controlled and adjustable sample concentration environment.
[0017] During the prediction phase, the input acquisition module includes:
[0018] The sample input unit provides the sensor unit with a real-time sample concentration environment.
[0019] As a preferred method, during the training process for multi-component samples, each component is labeled from smallest to largest.
[0020] Initially, the concentrations of all components are at their lowest values or zero within their respective set ranges;
[0021] In the process of sensing a mixed sample, the concentrations of other sample components are fixed in sequence while the concentration of a certain sample component is continuously changed from a low concentration gradient to a high concentration gradient and then from a high concentration gradient to a low concentration gradient.
[0022] This allows the model to cover the actual concentration change process and reach equilibrium in a shorter time.
[0023] Preferably, the state calibration unit includes:
[0024] The signal input unit receives response data sent by the sensor unit, concentration data during the training phase, and correction signals calculated based on historical data sent by the compensation unit.
[0025] The state recognition unit obtains the corrected data based on the response data and correction signal received by the signal input unit, and sends the response data at the current moment and the concentration data during the training phase to the compensation unit.
[0026] The data output unit integrates the corrected data and the concentration data from the training phase and sends them to the prediction model.
[0027] Preferably, the prediction model includes an input layer, a hidden layer, and an output layer, wherein the input layer receives sensor response signals and environmental state data, the output layer outputs the sample concentration prediction results, and the hidden layer contains model parameters;
[0028] The prediction model is trained and used for prediction based on one or more of the following: multilayer perceptron, support vector machine, decision tree, random forest, convolutional neural network, hidden Markov model, recurrent neural network, LSTM, and Transformer model.
[0029] A method for continuous data acquisition and data model construction using an intelligent sensor, wherein the data model construction includes a training phase and a prediction phase;
[0030] The training phase includes:
[0031] A1: The sensor unit is placed in the sample testing unit, and the concentration of different sample components is adjusted by the concentration control unit to continuously acquire data; the rate and magnitude of concentration change meet certain specified ranges to ensure that the sensor is in the normal operating range.
[0032] A2: Transmit the response data from the sensor unit and the sample concentration data from the concentration control unit to the state calibration unit to process the collected data.
[0033] A3: After receiving the temperature and humidity information from the temperature and humidity unit and the drift signal from the state calibration unit, the compensation unit corrects the temperature and drift respectively and then transmits the corrected data back to the state calibration unit.
[0034] A4: The state calibration unit reorganizes the data at this moment and inputs it into the training model to modify the model parameters;
[0035] The prediction phase includes:
[0036] B1: Place the sensor unit in the sample input unit;
[0037] B2: After the sensor unit acquires the real-time response signal, it transmits it to the status calibration unit;
[0038] B3: After receiving the temperature and humidity information from the temperature and humidity unit and the drift signal from the state calibration unit, the compensation unit corrects the temperature and drift respectively and then transmits the corrected data back to the state calibration unit.
[0039] B4: The corrected data is input into the concentration prediction model. The concentration prediction model dynamically detects the state of the sensor and outputs the predicted sample concentration.
[0040] Using a continuous data sampling method, without a recovery process, and reaching equilibrium in a shorter time greatly reduces training time; continuously collecting data during the response and recovery phases ensures that the training data conforms to the signal and concentration change process in actual applications.
[0041] Preferably, after obtaining training data through continuous data acquisition, one of the following three model training methods is used for processing:
[0042] Method 1: Construct one or more arbitrary models based on the following: multilayer perceptron, support vector machine, decision tree, random forest, convolutional neural network, hidden Markov model, recurrent neural network, LSTM, and Transformer model, using data on the changes in concentration of each component of the sample from low to high concentration gradients and data on the changes in concentration of the sample from high to low concentration gradients. These models may or may not share hidden layer parameters; the same model may be used, or different models may be used.
[0043] Method 2: Add state features to the data of sample concentration changes from low to high concentration gradient and the data of sample concentration changes from high to low concentration gradient respectively, and then input them into one or more arbitrary models based on multilayer perceptron, support vector machine, decision tree, random forest, convolutional neural network, hidden Markov model, recurrent neural network, LSTM, and Transformer model.
[0044] Method 3: Directly input sample data into one of the following models: Hidden Markov Model, Recurrent Neural Network, LSTM, or Transformer Model. These models must be capable of processing time-series data. This method requires that at each time step, the model processes at least the sensor response and concentration data from the current and previous time steps.
[0045] As a preferred approach, after obtaining prediction data through continuous data acquisition, the state of the sensor is dynamically detected, and different models are invoked or different modes or states of the model are used to give prediction results.
[0046] If the training data is processed using methods one and two as described above, the dynamic detection process depends on a dynamic detection model. The dynamic detection model uses one of the classification models such as logistic regression, support vector machine, decision tree, and random forest. During the training phase of the dynamic detection model, the response signal of each data point is subtracted from the response signal of the previous data point to obtain the response change, which is then input into the classification model along with the state features. During the prediction phase, the response change is calculated and input into the dynamic detection model to obtain the state features.
[0047] If the training data is processed using Method 1, then based on the state characteristics, the corresponding model is retrieved and used for prediction.
[0048] If the training data is processed using Method 2, then the prediction data is fed into the model after adding the corresponding state features;
[0049] If the training data is processed using method three, then the time step used during prediction should be the same as that used during training.
[0050] Preferably, the optimization method for the prediction model includes one or two of the following methods;
[0051] Method 1: Utilize model hyperparameter optimization methods, including genetic algorithms or deep Q-learning networks;
[0052] Method 2: Model fusion technology, which combines the results of multiple prediction models; the fused result o equals n. c Sub-model results {o i , i∈{1,...,n c The linear combination of}} or the output of the expert model.
[0053] Preferably, the linear combination includes weight w i Then the weights are the reciprocals of the training loss values of the sub-models, w. i =1 / l i ;
[0054]
[0055] The expert model employs one of the following classification models: logistic regression, support vector machine, decision tree, and random forest.
[0056] After training, the sub-model o is obtained. i In the j-th training sample {x j y j Loss on} ij ;
[0057] Set the model label ml, where ml j =argmin i l ij Thus, training data for {x} is obtained. j ml j} j ;
[0058] Input it into the expert model for training;
[0059] During prediction, an expert model is first used to select a sub-model for prediction, and then the sub-model outputs the prediction results.
[0060] Preferably, the genetic algorithm needs to perform the following steps:
[0061] Step 1: Discretize and encode all hyperparameters to be optimized. Let the hyperparameter list be {hp1, hp2, ..., hp}. n}, where each hyperparameter hp i ∈{1,...,m i}, hp i The value of the hyperparameter corresponds one-to-one with the discretized state of the hyperparameter.
[0062] Step 2: Initialize a population P = {c1, c2, ..., cq} containing q individuals. q}, the individual c i Maintain a set of randomly initialized discrete coding hyperparameters.
[0063] Step 3: Apply probability p to the individuals in this population. mut Extract and perform mutation operations, pairing every two individuals in the population with probability p. crossThe extraction process involves a crossover operation. The mutation operation first randomly generates a mutation site, then overwrites the hyperparameters stored at that site with randomly generated values within that hyperparameter range. The crossover operation first randomly generates a start and end point, then swaps the hyperparameters of the two individuals from the start to the end point.
[0064] Step 4: Input the obtained hyperparameters into the model and train it. The negative value of the resulting loss function is used as the fitness. Sort all individuals in the population according to their fitness, select e (e < q) individuals to enter the next population, and at the same time, randomly select two individuals from the remaining individuals each time, and add the individuals with higher fitness to the population, until the population size reaches q.
[0065] Step 5: Repeat steps 3 and 4 a certain number of times, then terminate. Return the list of hyperparameters maintained by the individual with the highest fitness in the population and decode it. This list is the optimized hyperparameters.
[0066] Preferably, the deep Q-learning network performs the following steps:
[0067] Step 1: Discretize and encode all hyperparameters to be optimized;
[0068] Step 2: Randomly initialize the state vector S0 = s. The state vector maintains an encoded hyperparameter list, i.e., s = {hp1, hp2, ..., hp}. n}. For any given state vector s, the process of giving a certain action with a certain probability is the behavioral policy: π(a|s)=P[A t =a|S t =s).
[0069] Step 3: Given random actions in action space A with probability ∈, and given the optimal action a predicted by the model in the current state with probability 1-∈. opt =argmax a∈A Q(s, a), where the value of Q(s, a) is calculated by the deep Q-learning network based on the current state s for all actions in the action space A: Q(s, a) = E s′ [π[R t+1 +γE a′~π(·|s) [Q(s′,a′]|S t =s,A t =a]], where R t Let γ be the reward after step t, and γ be the discount factor. Applying the obtained action to the state vector s yields a new state vector s′. Inputting this into the model and training it, the negative value of the model's loss function can be used as the reward R. t+1 And a deep Q-learning network is trained using the following loss function: L t (θ t)=E[(R t+1 +γmax a′ Q(s′,a′)-Q(s,a)) 2 ], where θ t These are the parameters of the deep Q-learning network after step t.
[0070] Step 4: Repeat Step 3 until a certain number of times or the loss function L decreases to a specified value. Then return the list of hyperparameters maintained by the state vector at this time and decode it, which is the optimized hyperparameters.
[0071] The beneficial effects of this invention are:
[0072] 1. By using a continuous data sampling method, without a recovery process, and reaching equilibrium in a shorter time, training time is greatly reduced;
[0073] 2. Continuously collect data during the response and recovery phases to ensure that the training data conforms to the signal and concentration change process in actual applications.
[0074] 3. During the prediction process, dynamically detect the state of the sensors and call different models to improve model accuracy. Attached Figure Description
[0075] Figure 1 This is a connection block diagram of the system training phase of the present invention.
[0076] Figure 2 This is a connection block diagram of the system prediction stage of the present invention.
[0077] Figure 3 This is a schematic diagram of a model training iterative application process according to the present invention.
[0078] Figure 4 This is an internal schematic diagram of a state calibration unit according to the present invention.
[0079] Figure 5 This is an internal schematic diagram of a compensation unit according to the present invention.
[0080] Figure 6 This is a schematic diagram of a continuous data acquisition process according to the present invention.
[0081] Figure 7 This is the response curve of a sensor under continuously varying concentration conditions according to the present invention.
[0082] Figure 8 This is the output diagram of a concentration prediction model for a given concentration sample according to the present invention.
[0083] In the diagram: 1. Concentration control unit, 2. Sample testing unit, 3. Sensor unit, 4. State calibration unit, 5. Compensation unit, 6. Temperature and humidity unit, 7. Training model, 8. Sample input unit, 9. Concentration prediction model, 41. Signal input unit, 42. State recognition unit, 43. Data output unit, 51. Data input unit, 52. Compensation model, 53. Compensation output unit. Detailed Implementation
[0084] The technical solution of the present invention will be further described in detail below through embodiments and in conjunction with the accompanying drawings.
[0085] Example 1:
[0086] This embodiment presents a continuous data acquisition and data model building system for intelligent sensors, primarily used for long-term concentration monitoring of mixed gases, such as... Figure 1 and Figure 2 As shown, it includes a concentration control unit 1, a sample testing unit 2, a sample input unit 8, a sensor unit 3, a state calibration unit 4, a compensation unit 5, a temperature and humidity unit 6, a training model 7, and a concentration prediction model 9.
[0087] Sensor unit 3 provides a gas response signal, which in this embodiment is specifically an array containing 8 gas sensors.
[0088] The sample testing unit 2 is used to contain the gas during the training phase; the sample input unit 8 is used to contain the gas during the prediction phase. In this embodiment, both are the same type of gas testing chamber.
[0089] The concentration control unit 1 controls the concentration composition of the gas, specifically multiple high-precision gas flow meters.
[0090] Temperature and humidity unit 6 is used to measure ambient temperature and humidity, specifically a temperature and humidity sensor soldered into the sensor array board.
[0091] The state calibration unit 4 is used to integrate the response signals of the sensor unit.
[0092] The compensation unit 5 is used to compensate for the drift of the sensing material and environmental parameters such as temperature and humidity.
[0093] The training model 7 and the concentration prediction model 9 operate in the training and prediction phases, respectively. Both modules are located in the embedded processor and are loaded into memory at runtime.
[0094] A method for continuous data acquisition and data model construction using an intelligent sensor, comprising a training process and a prediction process.
[0095] The training process includes the following steps:
[0096] Step 1: Place the sensor array in the gas testing chamber and adjust the flow rate of different gases using a high-precision gas flow meter to achieve the set concentration of each gas.
[0097] Step 2: During the training process, for the three mixed gases, after determining the test range for each gas, the gases are labeled as 1 to 3 respectively. Figure 6 The continuous data acquisition process was demonstrated.
[0098] Initially, all gases except the background gas were set to their lowest concentration. During testing, the concentrations of smaller-labeled gases were fixed sequentially, while the concentrations of larger-labeled gases were set to change from low to high and then from high to low.
[0099] Step 3: The sensor array is exposed to the gas test chamber and generates a response, which, together with the sample concentration signal obtained from the concentration control unit, is transmitted to the state calibration unit.
[0100] Step 4: The state calibration unit integrates the data obtained in Step 3 and inputs the data at that moment into the compensation unit for correction. After receiving signals from the temperature and humidity unit and the state calibration unit, the compensation unit provides temperature and drift corrections. Subsequently, the state calibration unit uses the compensation signal state returned by the compensation unit for calibration and inputs the corrected data into the training model to modify the model parameters. This data is then transmitted back to the state calibration unit.
[0101] Step 5: Repeat the above process until model training is complete. It's important to note that the model used during training is an initial model, designed to fit the relationship between the sensor's dynamic response and concentration.
[0102] like Figure 7 As shown, a typical response curve of the sensor is illustrated in a specific embodiment, where continuous data acquisition occurs from low concentration to high concentration and then back to low concentration. The methane concentration is fixed at 2 liters per hour, and the hydrogen concentration changes from 10 milliliters per hour to 50 milliliters per hour and then back to 10 milliliters per hour.
[0103] The prediction process includes the following steps:
[0104] Step 1: Place the sensor array in the gas testing chamber.
[0105] Step 2: After the sensor array receives the response signal, it transmits it to the state calibration unit.
[0106] Step 3: After correcting for temperature, humidity, and instrument drift using the same correction process as the training process, input the corrections into the concentration prediction model.
[0107] Step 4: Dynamically detect the state of the sensor and call different models to obtain the sample concentration output based on the sensor state.
[0108] Figure 8 This illustrates, in a specific embodiment, the intelligent sensing system constructed according to the method of the present invention, predicts the concentration of a methane and hydrogen mixture. The output of the gas concentration prediction model for a given concentration is shown, where the horizontal axis represents the methane concentration, the vertical axis represents the hydrogen concentration, the cross marks the actual concentration, and the solid circle represents the predicted concentration.
[0109] In this embodiment, the relationship between the initialization model, the training model, and the concentration prediction model is as follows: Figure 3 As shown.
[0110] The calibration process of the aforementioned state calibration unit 4 includes one or more of the following: temperature correction, humidity correction, and drift correction. For example... Figure 4 As shown, the internal structure of the state calibration unit 4 includes a signal input unit 41, a state recognition unit 42, and a data output unit 43.
[0111] The signal input unit 41 receives response data sent by the sensor unit 3, concentration data sent by the concentration control unit during training, and correction signals calculated based on historical data sent by the compensation unit 4.
[0112] The state recognition unit 42 obtains the corrected data based on the response data and correction signal received by the signal input unit 41, and simultaneously sends the response data and concentration data at the current moment to the compensation unit.
[0113] The data output unit 43 integrates the corrected data and concentration data and sends them to the training model or concentration prediction model.
[0114] like Figure 5 As shown, the compensation unit 4 includes a data input unit 51 connected in one step, a compensation model 52, and a compensation output unit 53. Drift correction is achieved by modeling the changing trend of the sensor unit response data. In this embodiment, linear correction is performed by comparing the responses of two sensors with the same low concentration during the continuous acquisition process during training, and the linear correction coefficients processed by the exponential moving average algorithm are saved for correction in the prediction stage. The temperature correction and humidity correction are performed using the sensor's temperature and humidity characteristic curves.
[0115] The model used in this embodiment is LSTM, with an input data dimension of 9, including 8 sensor responses and 1 state feature. Hyperparameters such as hidden layer dimension, number of RNN layers, and time steps are obtained using model optimization methods.
[0116] In this embodiment, the training process provides state features based on a set concentration change process. Simultaneously, the response signal of each data point is subtracted from the response signal of the previous data point to obtain the response change. This response change, along with the state features, is then input into a decision tree model to predict the state features. The prediction process first calculates the response change and inputs it into the dynamic detection model to obtain the state features. Finally, the sensor response and state features are input into an LSTM model to predict the output concentration.
[0117] In this embodiment, the hyperparameter optimization method uses a genetic algorithm, which specifically includes the following steps:
[0118] Step 1: Discretize and encode the hidden layer dimension, number of RNN layers, time steps, and other hyperparameters to be optimized. Let the hyperparameter list be {hp1, hp2, ..., hp}. n}, where each hyperparameter hp i ∈{1,...,m i}, hp i The value of the hyperparameter corresponds one-to-one with the discretized state of the hyperparameter.
[0119] Step 2: Initialize a population P = {c1, c2, ..., cq} containing q individuals. q}, the individual c i Maintain a set of randomly initialized discrete coding hyperparameters.
[0120] Step 3: Apply probability p to the individuals in this population. mut Extract and perform mutation operations, pairing every two individuals in the population with probability p. cross Extract and perform cross-operation.
[0121] The mutation operation first randomly generates a mutation site, then overwrites the hyperparameters stored by that individual with randomly generated values within that hyperparameter range. The crossover operation first randomly generates a crossover start point and an end point, then swaps the hyperparameters of the two individuals from the start point to the end point.
[0122] Step 4: Input the obtained hyperparameters into the model as described in Technical Feature 1, and train the model using the above training method. The negative value of the resulting loss function is used as the fitness. Sort all individuals in the population according to their fitness, select e (e < q) individuals to enter the next population, and randomly select two individuals from the remaining individuals each time, adding the individuals with higher fitness to the population, until the population size reaches q.
[0123] Step 5: Repeat steps 3 and 4 a certain number of times, then terminate. Return the list of hyperparameters maintained by the individual with the highest fitness in the population and decode it. This list is the optimized hyperparameters.
[0124] Example 2:
[0125] This embodiment presents a continuous data acquisition and data model construction system and method for intelligent sensors, primarily used for long-term concentration monitoring of various biomarkers. The system includes a concentration control unit 1, a sample testing unit 2, a sample input unit 8, a sensor unit 3, a state calibration unit 4, a compensation unit 5, a temperature unit 6, a training model 7, and a concentration prediction model 9.
[0126] The method in this embodiment includes the following steps:
[0127] Step 1: Place the sensor array in sample testing unit 2 and adjust the concentration of different biomarkers to the set value using a self-service sample injection device with feedback.
[0128] Step 2: During training, for N mixed biomarkers, after determining the test range for each biomarker, label the biomarkers from 1 to N. Initially, only a buffer solution containing no analyte is available. During testing, the concentration of the smaller-labeled biomarkers is fixed sequentially, while the concentration of the larger-labeled biomarkers is set to change from low to high and then from high to low.
[0129] Step 3: The sensor array is exposed to the sample testing unit and generates a response, which, together with the sample concentration signal obtained from the concentration control unit 1, is transmitted to the state calibration unit 4.
[0130] Step 4: After integrating the data obtained in Step 3, the state calibration unit 4 inputs the data at that moment into the compensation unit 5 for correction. The compensation unit 5 receives signals from the temperature and humidity unit 6 and the state calibration unit 4, and provides temperature and drift corrections. Subsequently, the state calibration unit 4 uses the compensation signal state returned by the compensation unit 5 for calibration, and inputs the corrected data into the training model 7 to modify the model parameters. This data is then transmitted back to the state calibration unit 4.
[0131] Step 5: Repeat the above process until model training is complete. It's important to note that the model used during training is an initial model, designed to fit the relationship between the sensor's dynamic response and concentration.
[0132] Step 6: Prediction process. The sensor array is placed in the sample input unit. After obtaining the response signal, it is transmitted to the state calibration unit 4. After undergoing the same correction process as the training process, it is input into the concentration prediction model 9.
[0133] Step 7: Dynamically detect the state of the sensor, and call different models according to the sensor state to obtain the sample concentration output, thereby improving the accuracy of the model.
[0134] Furthermore, in the state calibration unit 4, the sensor unit 3 is placed in the sample testing unit 2, exposed to the test sample to generate a response, and the response signal and concentration signal are transmitted to the state calibration unit 4. At the same time, the state calibration unit 4 is electrically connected to the compensation unit 5. After receiving the signals from the temperature and humidity unit 6 and the state calibration unit 4, the compensation unit 5 provides temperature and drift correction, and transmits the corrected signal back to the state calibration unit 4.
[0135] Furthermore, during model training, the state-calibrated and compensated response signal and environmental state data are input into the training model to modify the model parameters. During training, the concentration control unit continuously changes its signal without explicit recovery.
[0136] In this embodiment, drift is linearly corrected by comparing the responses of two identical low-concentration sensors during the continuous acquisition process in training, and the linear correction coefficients processed by the exponential moving average algorithm are saved for drift correction in the prediction stage. Since the measurement temperature of the biomarker to be tested has been controlled at room temperature and measured in solution, no temperature correction or humidity correction is performed.
[0137] The model used in this embodiment is a multilayer perceptron, and hyperparameters such as the number of hidden layers, the number of nodes in each hidden layer, and the activation function are obtained using model optimization methods.
[0138] In this embodiment, the training process generates state features based on a set concentration change process. Simultaneously, the response signal of each data point is subtracted from the response signal of the previous data point to obtain the response change. This response change, along with the state features, is then input into a decision tree model to predict the state features. During training, different multilayer perceptrons are trained according to the different state features. Hidden layers are shared between different models. In the prediction process, the response change is first calculated and then input into the dynamic detection model to obtain the state features. These state features are then used to obtain the corresponding model, which is then input into the sensor response to predict the output concentration.
[0139] In this embodiment, the hyperparameter optimization method uses a deep Q-learning network algorithm, which specifically includes the following steps:
[0140] Step 1: Discretize and encode the number of hidden layers, the number of nodes in each hidden layer, the activation function, and other hyperparameters to be optimized.
[0141] Step 2: Randomly initialize the state vector S0 = s. The state vector maintains an encoded hyperparameter list, i.e., s = {hp1, hp2, ..., hp}. n}. For any given state vector s, the process of giving a certain action with a certain probability is the behavioral policy: π(a|s)=P[A t =a|S t =s).
[0142] Step 3: Given random actions in action space A with probability ∈, and given the optimal action a predicted by the model in the current state with probability 1-∈. opt =argmax a∈A Q(s, a), where the value of Q(s, a) is calculated by the deep Q-learning network for all actions in the action space A based on the current state S:
[0143] Q(s, a) = E s′ [π[R t+1 +γE a′~π(·|s) [Q(s′,a′]|S t =s,A t =a]]
[0144] Among them, R t Let γ be the return after step t, and γ be the discount factor.
[0145] The obtained action is applied to the state vector s to obtain a new state vector s′. This new state vector s′ is then input into the model, and after training, the negative value of the model's loss function can be used as the reward R. t+1 And a deep Q-learning network is trained using the following loss function: L t (θ t )=E[(R t+1 +γmax a′ Q(s′,a′)-Q(s,a)) 2 ], where θ t These are the parameters of the deep Q-learning network after step t.
[0146] Step 4: Repeat Step 3 until a certain number of times or the loss function L decreases to a specified value. Then return the list of hyperparameters maintained by the state vector at this time and decode it, which is the optimized hyperparameters.
[0147] This embodiment uses a different hyperparameter optimization method; other aspects are the same as in Embodiment 1.
[0148] Example 3:
[0149] This embodiment presents a continuous data acquisition and data model construction system and method for intelligent sensors, primarily used for long-term concentration monitoring of various biomarkers. The system includes a concentration control unit 1, a sample testing unit 2, a sample input unit 8, a sensor unit 3, a state calibration unit 4, a compensation unit 5, a temperature unit 6, a training model 7, and a concentration prediction model 9.
[0150] The method in this embodiment includes the following steps:
[0151] Step 1: Place the sensor array in sample testing unit 2 and adjust the concentration of different biomarkers to the set value using a self-service sample injection device with feedback.
[0152] Step 2: During training, for N mixed biomarkers, after determining the test range for each biomarker, label the biomarkers from 1 to N. Initially, only a buffer solution containing no analyte is available. During testing, the concentration of the smaller-labeled biomarkers is fixed sequentially, while the concentration of the larger-labeled biomarkers is set to change from low to high and then from high to low.
[0153] Step 3: The sensor array is exposed to the sample testing unit and generates a response, which, together with the sample concentration signal obtained from the concentration control unit 1, is transmitted to the state calibration unit 4.
[0154] Step 4: After integrating the data obtained in Step 3, the state calibration unit 4 inputs the data at that moment into the compensation unit 5 for correction. The compensation unit 5 receives signals from the temperature and humidity unit 6 and the state calibration unit 4, and provides temperature and drift corrections. Subsequently, the state calibration unit 4 uses the compensation signal state returned by the compensation unit 5 for calibration, and inputs the corrected data into the training model 7 to modify the model parameters. This data is then transmitted back to the state calibration unit 4.
[0155] Step 5: Repeat the above process until model training is complete. It's important to note that the model used during training is an initial model, designed to fit the relationship between the sensor's dynamic response and concentration.
[0156] Step 6: Prediction process. The sensor array is placed in the sample input unit. After obtaining the response signal, it is transmitted to the state calibration unit 4. After undergoing the same correction process as the training process, it is input into the concentration prediction model 9.
[0157] Step 7: Dynamically detect the state of the sensor, and call different models according to the sensor state to obtain the sample concentration output, thereby improving the accuracy of the model.
[0158] The model used in this embodiment is a support vector machine regression model. Depending on the different hyperparameters, multiple models are generated simultaneously for training.
[0159] In this embodiment, the training process provides state features based on the set concentration change process, and at the same time, the response signal of each data point is subtracted from the response signal of the previous data point to obtain the response change. This result is then input into the decision tree model along with the state features to predict the state features.
[0160] During training, different multilayer perceptrons are trained based on different state features. Hidden layers are shared between different models.
[0161] The prediction process involves first calculating the response change and then inputting it into the dynamic detection model to obtain state characteristics. These state characteristics are then used to derive the corresponding model, which is then fed back into the sensor response to predict the output concentration.
[0162] This embodiment uses model fusion technology:
[0163] During training, multiple models participate in training simultaneously for each state feature, and the inverse w of the model training loss value is used. i =1 / l i For model weights;
[0164] During prediction, the results from multiple models are weighted and averaged to obtain the result o = ∑ i o i ×w i / ∑ i w i .
[0165] The expert model employs one of the following classification models: logistic regression, support vector machine, decision tree, and random forest; after training, a sub-model is obtained. i In the j-th training sample {x j y j Loss on} ij Set the model label ml, where ml j =argmin i l ij Thus, training data for {x} is obtained. j ml j} j The model is then input into an expert model for training. During prediction, the expert model is used to select a sub-model for prediction, and then the sub-model outputs the prediction result.
[0166] This embodiment uses a different model optimization method; other aspects are the same as in Embodiment 1.
[0167] This embodiment uses an intelligent sensing system to acquire dynamic response data of the sensor under continuous changes, which aligns with practical application scenarios. The sensor model developed based on this data theoretically possesses higher accuracy and robustness. When acquiring data using this method, unlike traditional methods that require an explicit and lengthy recovery process for each measurement, continuous data sampling allows for only one implicit recovery to a low concentration while maintaining the concentration of other components. Without an explicit recovery process, and given the continuous change in concentration gradient, the system can reach dynamic equilibrium in a shorter time. Therefore, this method offers high overall acquisition efficiency and short time, enabling the acquisition of more data within a given timeframe. Furthermore, a data model that simultaneously considers the sensor's response signal and dynamic characteristics is constructed to process the continuously acquired data. For chemical sensors with complex response relationships, obtaining sufficient calibration experimental data through an efficient continuous acquisition method and inputting it into a deep learning model can effectively improve the modeling accuracy of chemical sensors.
[0168] It should be understood that the embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.
Claims
1. A continuous acquisition and data model building system for smart sensors, characterized by, The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device.
2. A continuous acquisition and data model construction system for a smart sensor according to claim 1, wherein, The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device.
3. The continuous acquisition and data model building system of an intelligent sensor according to claim 1 or 2, characterized in that, The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device.
4. The continuous acquisition and data model building system of a smart sensor according to claim 1 or 2, characterized in that, The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device.
5. The continuous acquisition and data model building system of claim 1, wherein, The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration and concentration prediction method and device. The application relates to a sensor state calibration The prediction model is based on one or more of multilayer perceptron, support vector machine, decision tree, random forest, convolutional neural network, hidden Markov model, recurrent neural network, LSTM, and Transformer model for model training and prediction.
6. A method for continuous acquisition and data model construction of an intelligent sensor, using the system for continuous acquisition and data model construction of an intelligent sensor according to any one of claims 1 to 5, characterized in that, The data model construction includes a training phase and a prediction phase; The training phase includes: A1: Place the sensor unit in the sample test unit, and adjust the concentration of different sample components through the concentration control unit, and continuously collect data; A2: The response data of the sensor unit and the sample concentration data at the concentration control unit are transmitted to the state calibration unit, and the collected data is arranged; A3: After receiving the temperature and humidity information from the temperature and humidity unit and the drift signal from the state calibration unit, the compensation unit corrects the temperature and drift respectively, and transmits the corrected data back to the state calibration unit; A4: The state calibration unit reorganizes the current time data, gives the state characteristics according to the set concentration change process, calculates the response change, and inputs the dynamic detection model to predict the state characteristics. According to the different state characteristics, different multilayer perceptrons are trained, the hidden layers of different models are shared, and each state characteristic has multiple models participating in training at the same time. The reciprocal of the model training loss value is used as the model weight; The prediction phase includes: B1: Place the sensor unit in the sample input unit; B2: After the sensor unit collects real-time response signals, it is transmitted to the state calibration unit; B3: After receiving the temperature and humidity information from the temperature and humidity unit and the drift signal from the state calibration unit, the compensation unit corrects the temperature and drift respectively, and transmits the corrected data back to the state calibration unit; B4: The corrected data is input into the concentration prediction model, the state of the sensor is dynamically detected according to the concentration prediction model, different models are called to output the predicted sample concentration, and the results of multiple models are weighted and averaged to obtain the result.
7. The method of claim 6, wherein, After obtaining the training data through continuous data collection, one of the following three model training methods is used for processing: Method one: The data of sample component concentration changing from low concentration gradient to high concentration gradient and the data of sample concentration changing from high concentration to low concentration gradient are respectively constructed into one or more arbitrary models based on multilayer perceptron, support vector machine, decision tree, random forest, convolutional neural network, hidden Markov model, recurrent neural network, LSTM, and Transformer model; Method two: The data of sample concentration changing from low concentration gradient to high concentration gradient and the data of sample concentration changing from high concentration to low concentration gradient are respectively added with state characteristics and input into one or more arbitrary models based on multilayer perceptron, support vector machine, decision tree, random forest, convolutional neural network, hidden Markov model, recurrent neural network, LSTM, and Transformer model; Method three: The sample data is directly input into one of the hidden Markov model, recurrent neural network, LSTM, and Transformer model.
8. The method of claim 7, wherein the method further comprises: After obtaining the prediction data through continuous data collection, the state of the sensor is dynamically detected and different models are called or the prediction results are given by using different modes or states of the model.
9. The method of continuous acquisition and data model building of an intelligent sensor according to claim 6 or 7 or 8, characterized in that, The optimization method of the prediction model comprises one or two of the following methods; Method one: using a model hyperparameter optimization method, including a genetic algorithm or a deep Q learning network; Method two: model fusion technology, fuse multiple prediction model results; the fused results o equal to n c linear combination of the results of the sub-models o i , i ∈{1,… n c}} or the output results of the expert model.
10. The method of continuous acquisition and data model building of an intelligent sensor according to claim 9, wherein, The linear combination includes weights w i The weights take the inverse of the sub-model training loss value w i =1 / l i ; o= ∑ i o i × w i / ∑ i w i The expert model adopts one of classification models such as a logistic regression, a support vector machine, a decision tree and a random forest; After training, the sub-models are obtained o i In the first j training sample x j , y j loss l ij on the first Setting model labels ml wherein ml j = argmin i l ij , thereby obtaining a training data pair x j , ml j j ; It is input into the expert model for training; During prediction, the sub-model for prediction is selected by using the expert model, and then the prediction result is output by the sub-model.
Citation Information
Patent Citations
Cable burning smell continuous detection method based on inspection robot
CN114047303A
Atmospheric gaseous pollutant detection method and device and electronic equipment
CN114814091A