Edge computing method for a gas sensor
By using edge devices for data preprocessing and lightweight model recognition, the problems of large data upload volume and insufficient sensor reliability in gas detection systems are solved, enabling reliable diagnosis and timely alarm in complex environments.
Patent Information
- Application Number
- CN202611174629.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-11-06
AI Technical Summary
In existing gas detection systems, the amount of raw data uploaded is large, the reliance on cloud computing is high, and alarms cannot be triggered in a timely manner when communication is abnormal. The reliability of sensor data is insufficient, and the accuracy of diagnostic results decreases, especially in complex environments.
Data preprocessing and feature extraction are performed on edge devices, and a lightweight gas identification model is used for local identification. By using hierarchical storage and event-triggered upload mechanisms, dependence on the cloud is reduced, enabling local alarms and data priority management.
It effectively reduces communication bandwidth usage and cloud processing pressure, improves system reliability and diagnostic accuracy in complex environments, and ensures timely alarms in the event of communication anomalies.
Smart Images

Figure CN123046322A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of power equipment condition monitoring technology, and in particular to a method for edge calculation of a gas sensor. Background Technology
[0002] Gas sensors can respond to changes in the gas components and concentrations in the environment under test, and convert the gas response into electrical signals such as resistance, voltage, current, frequency, or impedance. By acquiring, processing, and identifying the output signals of gas sensors, it is possible to detect gases from the decomposition of insulating media in power equipment, dissolved gases in transformer oil, fault gases in gas-insulated equipment, partial discharge gases in air switchgear, and gases from the overheating and cracking of cable insulation materials.
[0003] Existing gas detection systems typically consist of a sensor acquisition unit, a communication network, and a host computer or cloud-based diagnostic platform. The sensor acquisition unit sends the raw signal to the host computer or cloud, which then performs filtering, temperature and humidity compensation, feature extraction, gas identification, and fault alarm functions. However, in practical applications, gas sensor arrays usually include multiple detection channels, each requiring continuous signal output at a specific sampling frequency. Uploading all raw data in real time can lead to significant bandwidth consumption, high data storage costs, and heavy processing pressure on the cloud. Furthermore, in application environments such as switchgear, cable trenches, substation outdoor equipment, underground cable rooms, and industrial sites, communication networks may experience significant latency, signal instability, or even temporary outages. If the gas detection system relies excessively on cloud or host computer calculations, it may fail to promptly identify faults and issue local alarms in the event of communication anomalies, affecting the reliability of early warning systems for equipment failures.
[0004] Furthermore, the output signal of gas sensors is easily affected by factors such as changes in temperature and humidity, fluctuations in power supply voltage, electromagnetic interference, sensor baseline drift, sensor aging, and changes in background atmosphere. If signal preprocessing is not performed in a timely manner near the sensor, raw noise and environmental interference will be continuously uploaded, leading to a decrease in the accuracy of subsequent diagnostic results. Summary of the Invention
[0005] Based on the above-mentioned situation of the prior art, the purpose of the embodiments of the present invention is to provide an edge computing method for gas sensors to solve the problems of large amount of raw data uploaded by existing gas detection systems, high dependence on cloud computing, inability to promptly alarm when communication is abnormal, and insufficient reliability of sensor data in complex environments.
[0006] To achieve the above objectives, according to one aspect of the present invention, a method for edge calculation of a gas sensor is provided, applied to an edge device, the method comprising: Acquire raw sampling data from the gas sensor array; Calculate gas-sensitive response characteristic parameters based on the original sampling data, and extract gas response characteristic data from the original sampling data; The gas response characteristic data is input into a locally preset lightweight gas identification model to obtain gas identification data, which includes gas category, gas concentration range, fault type and risk level. Based on the risk level or the gas-sensitive response characteristic parameters meeting the preset alarm conditions, output local alarm information; The raw sampling data, gas response feature data, and gas identification data are assigned data priority levels, and the raw gas data, gas response feature data, and gas identification data are uploaded to the cloud server according to the data priority levels.
[0007] Furthermore, the gas-sensitive response characteristic parameters are calculated according to the following formula: in, Indicates the characteristic parameters of the gas-sensitive response. This represents the resistance of the gas sensor in its initial state. This indicates the resistance of the gas sensor under the current condition.
[0008] Furthermore, the raw sampling data includes the raw response curve of the gas sensor array; the gas response characteristic data includes the steady-state response amplitude of the gas sensor, the output 10%-90% rise time, the maximum first derivative of the response curve, the integral area of the response curve, and the time constant of the recovery phase. Extracting gas response feature data from the original sampling data includes performing differentiation and / or integration operations on the original response curve.
[0009] Furthermore, the method also includes: calculating gas sensor state parameters based on the original sampling data; the gas sensor state parameters include sensor baseline drift, sensor noise level, and sensor recovery capability.
[0010] Furthermore, the baseline drift of the sensor is expressed as: in, The baseline resistance represents the current time or the current period. This represents the baseline resistance at the previous moment or in the previous cycle.
[0011] Furthermore, the sensor noise level is expressed as follows: in, Indicates the sensor noise level. This represents the sampled value at the i-th sampling point. This represents the average value of the sampled signal within a preset time window. Indicates the number of sampling points.
[0012] Furthermore, the sensor's recovery capability is expressed as: in, This indicates the resistance value of the gas sensor when it returns to a steady state after the gas to be measured is discharged. This indicates the resistance value of the gas sensor in its initial state.
[0013] Furthermore, the method also includes: When the sensor baseline drift exceeds a preset first threshold, the sensor noise level exceeds a preset second threshold, or the sensor recovery capability is below a preset third threshold, the sensor status is marked as abnormal.
[0014] Furthermore, the data priority levels include first priority data, second priority data, and third priority data; wherein, The first priority data includes alarm information, gas identification results, timestamps of each uploaded data, device number, gas sensor status parameters, lightweight gas identification model version number, and communication status; The second priority data includes gas-sensitive response characteristic parameters and gas response characteristic data; The third priority data includes the original sampled data and the original response curve corresponding to the original sampled data.
[0015] Furthermore, based on the data priority level, the raw gas data, gas response characteristic data, and gas identification data are selected and uploaded to the cloud server, including: Real-time uploading of top-priority data; Upload the second priority data according to the preset cycle; The third priority data for the corresponding time period will be uploaded when any of the following situations occur: local alarm information is output; the model recognition confidence is lower than the preset threshold; the sensor status is abnormal; retransmission is required after communication is restored; the host computer or cloud platform issues a command to retrieve the original data; or model performance verification is required before and after the model update is completed.
[0016] In summary, this invention provides an edge computing method for gas sensors, applied to edge devices. The method includes: acquiring raw sampling data from a gas sensor array; calculating gas-sensitive response characteristic parameters based on the raw sampling data and extracting gas response characteristic data from the raw sampling data; inputting the gas response characteristic data into a locally preset lightweight gas identification model to obtain gas identification data; outputting local alarm information based on the risk level or the gas-sensitive response characteristic parameters meeting preset alarm conditions; classifying the raw sampling data, gas response characteristic data, and gas identification data into data priority levels, and uploading the raw gas data, gas response characteristic data, and gas identification data to a cloud server according to the data priority levels. The technical solution provided by this invention completes data acquisition, signal filtering, temperature and humidity compensation, feature extraction, and model inference at the edge device near the gas sensor, reducing reliance on real-time cloud computing. Simultaneously, the use of hierarchical storage and event-triggered upload mechanisms avoids continuous uploading of large amounts of raw data, effectively reducing communication bandwidth usage and cloud processing pressure. When the communication network is interrupted, experiences significant latency, or is unstable, the edge device can still use the local model to complete gas identification and fault alarm, improving the system's reliability in complex field environments. By assessing the sensor baseline drift, noise level, and recovery capability, abnormal sensor states can be identified, enhancing the reliability of subsequent gas identification results. Through model version verification, model update, and model rollback mechanisms, long-term collaborative operation between the edge device and the host computer or cloud platform can be achieved. Attached Figure Description
[0017] Figure 1 This is the system architecture of the edge computing method for gas sensors provided in the embodiments of the present invention; Figure 2 This is a schematic diagram of the hardware structure of the edge device in an embodiment of the present invention; Figure 3 This is a flowchart of the edge calculation method for the gas sensor provided in the embodiments of the present invention; Figure 4 This is a flowchart of the hierarchical data storage and hierarchical uploading provided by the embodiments of the present invention; Figure 5 This is a comparative diagram showing the alarm delay of Comparative Example 1 and Example 1 under normal network, weak network, and network outage conditions. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0019] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of the present invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in one or more embodiments of the present invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the element or object listed following the word and its equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.
[0020] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings. An embodiment of the present invention provides a method for calculating the edge of a gas sensor. Figure 1 The diagram illustrates a system architecture applicable to the edge computing method for the gas sensor provided in embodiments of the present invention, such as... Figure 1As shown, the system includes a gas sensor array 1, an environmental sensor 2, an edge device 3, an alarm module 4, a display module 5, a communication network 6, and a host computer or cloud platform 7. The gas sensor array 1 is used to detect the gas components and their concentration changes in the environment under test. The gas sensor array 1 can be a semiconductor gas sensor, an electrochemical gas sensor, an optical gas sensor, or other gas sensors capable of outputting electrical signals. The environmental sensor 2 is used to collect environmental parameters such as temperature, humidity, air pressure, internal equipment temperature, gas sensor operating temperature, and power supply voltage. The edge device 3 is located near the gas sensor array 1, or inside a switch cabinet, cable room, substation field testing box, portable testing device, or other testing equipment. The edge device 3 is used for signal acquisition, data preprocessing, feature extraction, local model recognition, local alarm, data caching, and data uploading of the gas sensor array 1. The alarm module 4 includes a buzzer, indicator light, relay, SMS alarm module, wireless alarm module, or other alarm output device. Display module 5 includes an LCD screen, touch screen, digital display module, or other human-machine interface device, used to display gas identification results, concentration range, sensor status, alarm level, communication status, and model version number. Communication network 6 may include RS485 communication network, Ethernet, Wi-Fi, Bluetooth, 4G, 5G, NB-IoT, LoRa, or other wired and wireless communication methods. Host computer or cloud platform 7 is used for historical data storage, model training, model version management, remote parameter configuration, and equipment status analysis.
[0021] In this embodiment of the invention, the edge device refers to a computing processing unit deployed physically close to the gas sensor array in the environment of the gas to be measured. The signal connection between the edge device and the sensor array is a local analog signal link, requiring no transmission through a wide area network or the internet. The edge device possesses local data closed-loop processing capabilities, meaning that it can independently complete analog-to-digital conversion, signal filtering, feature extraction, and fault reasoning and alarm output based on a local model even without the intervention of a host computer or cloud platform. Figure 2 The diagram shows a schematic of the hardware structure of the edge device in an embodiment of the present invention, such as... Figure 2As shown, the edge device 3 includes a power supply module 31, a multi-channel sampling module 32, a signal conditioning module 33, a filtering module 34, a multi-channel analog-to-digital converter module 35, a microcontroller module 36, a local storage module 37, a communication module 38, an alarm control module 39, and a display control module 310. The power supply module 31 supplies power to the various modules within the edge device. The power supply module 31 may include a voltage regulator chip, a filter capacitor, an overvoltage protection circuit, and an electromagnetic compatibility protection circuit. The multi-channel sampling module 32 receives analog signals output from the gas sensor array and environmental sensors. The multi-channel sampling module 32 may include a reference voltage source, a sensor interface, a voltage follower circuit, precision resistors, and sampling capacitors. The signal conditioning module 33 amplifies, impedance-matches, adjusts the bias, or isolates the sensor output signals. The filtering module 34 reduces high-frequency noise, electromagnetic interference, and sampling disturbances. The filtering module 34 may employ a second-order active low-pass filter, an RC filter, a median digital filter, a moving average filter, or a combination thereof. The multi-channel analog-to-digital converter module 35 converts multi-channel analog signals into digital signals. The multi-channel analog-to-digital converter module 35 can employ a multi-channel high-precision analog-to-digital converter. The microcontroller module 36 performs sampling control, data preprocessing, feature extraction, lightweight model inference, alarm judgment, data caching, and communication management. The microcontroller module 36 can be a microcontroller, digital signal processor, embedded processor, field-programmable gate array, or other computing device. The local storage module 37 caches first-priority data, second-priority data, and third-priority data. The local storage module 37 may include Flash memory, SD card, embedded hard disk, or other non-volatile storage devices. The communication module 38 is used for wired or wireless communication with a host computer or cloud platform. The alarm control module 39 controls buzzers, indicator lights, relays, or other external alarm devices. The display control module 310 controls the display screen to show real-time gas identification results, sensor status, and alarm status.
[0022] Figure 3 The flowchart of the edge calculation method provided by the embodiment of the present invention is shown below, such as Figure 3 As shown, this edge calculation method is applied to edge devices and includes the following steps: S202. Acquire the raw sampling data of the gas sensor array. In this embodiment of the invention, the raw sampling data includes at least the gas sensor output voltage, the voltage across the load resistor, and the raw response curve of the gas sensor array. The edge device can acquire the analog signal of the gas sensor array through a multi-channel sampling module. The sampling frequency of the raw sampling data can be set according to the specific application scenario. In the scenario of cable overheating gas detection, the gas concentration changes relatively slowly, so a lower sampling frequency can be used, usually 1Hz or lower; in the scenario of partial discharge detection in air switch cabinet, the fault gas concentration may change rapidly, so the sampling frequency can be appropriately increased, usually 10Hz or higher. According to some optional implementations, a periodic sampling method can be used, acquiring the signal of the multi-channel gas sensor array and the signal of the environmental sensor once every preset sampling period; an interrupted sampling method can also be used, switching from low-frequency sampling mode to high-frequency sampling mode when the detected gas sensor array response change rate exceeds a preset threshold.
[0023] According to certain optional implementations, the edge device simultaneously acquires environmental sampling data from environmental sensors, including temperature, humidity, air pressure, heating voltage, power supply voltage, and internal device temperature. This environmental sampling data can be used to assist in extracting gas response characteristic data.
[0024] According to certain optional implementations, the original sampled data obtained above is an analog signal, which is then converted from analog to digital to obtain a digital signal. The converted digital signal undergoes preprocessing steps such as outlier removal, filtering, and baseline correction. A moving average filtering method can be used to filter the digital signal, and the filtered sampled signal can be expressed as: in, This represents the sampled signal after filtering. This represents the original sampled signal acquired at the current time and its preceding times, where N represents the sliding window length. Furthermore, median filtering can be used first to remove sudden interference points, followed by moving average filtering or low-pass filtering to reduce high-frequency noise.
[0025] S204. Calculate the gas-sensitive response characteristic parameters based on the original sampling data, and extract the gas response characteristic data from the original sampling data. In this embodiment of the invention, the gas response characteristic data includes at least the steady-state response amplitude of the gas sensor, the 10%-90% rise time of the output, the maximum first derivative of the response curve, the integral area of the response curve, and the time constant of the recovery phase. Among the above gas response characteristic data, the steady-state response amplitude of the gas sensor, the 10%-90% rise time of the output, the maximum first derivative of the response curve, and the integral area of the response curve can be obtained by performing differentiation and / or integration operations on the original response curve; the time constant of the recovery phase can be calibrated based on the original response curve and combined with internal temperature data.
[0026] For resistive gas sensors, the initial resistance of the gas sensor can be used as a reference. and the resistance of the gas sensor under the current condition Calculate the gas-sensitive response characteristic parameters using the following formula: in, Indicates the characteristic parameters of the gas-sensitive response. This represents the initial resistance value of the gas sensor. This indicates the resistance value of the gas sensor under the current condition. It can be based on the output voltage of the gas sensor Load resistance and the voltage across the load resistor calculate: When the temperature and humidity in the environmental sampling data from the environmental sensor exceed the predetermined temperature and humidity thresholds, a temperature and humidity compensation model is used to compensate the original gas-sensor response characteristic parameters. The compensated gas-sensor response characteristic parameters are expressed as follows: in, Indicates the characteristic parameters of the gas-sensitive response. This represents the compensated gas-sensitive response characteristic parameters. Indicates temperature. Indicates humidity. This represents the compensation function. The compensation function can be obtained through pre-conducted temperature and humidity calibration experiments. Specifically, the same concentration of target gas is introduced under different temperature and humidity conditions, the gas sensor detection values are collected, and a compensation relationship is established based on the deviation between the gas sensor detection values and the reference values.
[0027] According to certain optional implementations, gas sensor state parameters are calculated based on the raw sampling data. These parameters include sensor baseline drift, sensor noise level, and sensor recovery capability. The sensor baseline drift B can be expressed as: in, The baseline resistance represents the current time or the current period. This represents the baseline resistance at the previous moment or cycle. When the sensor baseline drift exceeds a preset first threshold, it indicates that the gas sensor array may be experiencing aging, contamination, excessive temperature and humidity fluctuations, or other abnormalities. In this case, the edge device can mark the sensor status as abnormal and upload the corresponding response curve and gas sensor status parameters to the host computer or cloud platform. The sensor noise level can be represented by the standard deviation within a preset time window. in, Indicates the sensor noise level. This represents the sampled value at the i-th sampling point. This represents the average value of the sampled signal within a preset time window. This indicates the number of sampling points. When the sensor noise level exceeds a preset second threshold, the sensor state is determined to be abnormal, and the corresponding response curve and gas sensor state parameters are uploaded to the host computer or cloud platform. The sensor's recovery capability (RC) can be expressed as: in, This indicates the resistance value of the gas sensor when it returns to a steady state after the gas to be measured is discharged. This represents the initial resistance value of the gas sensor. When the sensor's recovery capability falls below a preset threshold, the edge device marks the sensor status as abnormal and uploads the corresponding response curve and the corresponding gas sensor status parameters to the host computer or cloud platform.
[0028] S206. Input the gas response feature data into a locally preset lightweight gas identification model to obtain the gas identification result, which includes gas category, gas concentration range, fault type, and risk level. The lightweight gas identification model in this embodiment can be trained by a host computer or cloud platform and converted into a lightweight model suitable for edge device operation through model quantization, parameter pruning, feature dimension compression, rule extraction, table lookup, or knowledge distillation. According to some optional implementations, the lightweight gas identification model is at least one of a lightweight support vector machine, decision tree model, logistic regression model, probabilistic neural network, random forest sub-model, or threshold rule model. According to some optional implementations, the model identification confidence score can also be output. When the model identification confidence score is lower than a preset threshold, the edge device marks the current sample as a low-confidence sample and increases the caching and uploading priority of the original data of that sample.
[0029] According to certain optional implementation methods, a lightweight random forest model is selected to construct a lightweight gas identification model. In the lightweight gas identification model constructed by the lightweight random forest, the gas response feature data obtained in the above steps is used as the input feature vector. For the input feature vector, the inference engine traverses each decision tree: starting from the root node, based on the split feature index and split threshold of the current node, the feature vector is compared with the classification threshold to determine whether to enter the left or right child node; and the above process is repeated until the leaf node is reached. In the lightweight random forest model, each leaf node stores the following information: category vote: the gas category with the highest proportion in the training set for this leaf node; fault type: the fault mode corresponding to this leaf node (e.g., cable overheating, partial discharge, etc.); risk score: the average risk level code of the training samples for this leaf node (low=1, medium=2, high=3); concentration prediction: the average concentration value of the training samples for this leaf node. Thus, the output gas identification result is obtained.
[0030] S208. Based on the risk level or gas-sensitive response characteristic parameters meeting the preset alarm conditions, output local alarm information. When the risk level output by the lightweight gas identification model is high risk, or when the gas-sensitive response characteristic parameters obtained in step S204 exceed the preset alarm threshold, the edge device does not need to wait for confirmation from the host computer or cloud platform and directly outputs local alarm information.
[0031] S210. Prioritize the raw sampling data, gas response characteristic data, and gas identification data, and upload the raw sampling data, gas response characteristic data, and gas identification results to the cloud server according to the data priority level. Figure 4 The diagram illustrates a flowchart of the hierarchical data storage and uploading provided by an embodiment of the present invention, such as... Figure 4As shown, data priority is divided into three levels: first priority data, second priority data, and third priority data. First priority data includes alarm information, gas identification results, timestamps of each uploaded data, device number, gas sensor status parameters, lightweight gas identification model version number, and communication status. First priority data is characterized by its small volume and high importance, and is prioritized for saving and uploading. Second priority data includes gas-sensitive response characteristic parameters and gas response characteristic data. Second priority data can be used for subsequent model training, device status analysis, and fault tracing. Third priority data includes raw sampling data and the corresponding raw response curves. Third priority data is larger in volume and is typically not continuously uploaded in real-time. Under normal communication conditions, first priority data is uploaded in real-time, and second priority data is uploaded according to a preset period. Third priority data for the corresponding time period is uploaded when any of the following occurs: local alarm information is output; model identification confidence is lower than a preset threshold; sensor status is abnormal; retransmission is required after communication is restored; the host computer or cloud platform issues a raw data retrieval command; or model performance verification is required before and after model updates. For example, when the communication link is interrupted, the edge device caches the data in the local storage module and continues to perform local gas identification and local alarm; after the communication link is restored, the edge device retransmits the cached data in chronological or priority order.
[0032] S212. Receive the model update package sent by the host computer or cloud platform and update the lightweight gas recognition model. The host computer or cloud platform trains a new lightweight gas recognition model based on historical data and newly uploaded data, and sends the model update package to the edge device. The model update package includes at least the model version number, model parameters, model checksum, applicable sensor type, applicable gas type, applicable environmental range, and model performance parameters. After receiving the model update package, the edge device first performs integrity verification, checksum verification, and version number verification. If the verification passes, and the model version number is higher than the current model version number, and the updated model is suitable for the sensor type and gas detection task corresponding to the current edge device, the edge device saves the current model as a backup model and sets the updated model as the working model. During the operation of the updated model, if model loading failure, inference anomaly, alarm anomaly increase, recognition confidence continuously decreases, or other abnormal situations occur, the edge device automatically resumes using the backup model and sends model anomaly information to the host computer or cloud platform.
[0033] The method provided in the embodiments of the present invention was tested in a gas-sensitive experimental platform, a switchgear simulation platform, or a cable overheating simulation platform. Comparative Example 1: The raw data from the gas sensor is continuously uploaded to a host computer or cloud platform, where the host computer or cloud platform completes the data processing and alarm.
[0034] Example 1: Using the edge computing method provided in the embodiments of the present invention, filtering, compensation, feature extraction, local identification and alarm are completed on the edge device side, and key data is uploaded according to the data priority level provided in the embodiments of the present invention.
[0035] Record the alarm response latency, average uploaded data volume, alarm success rate during network interruption, average inference time of the local model, power consumption of edge devices, sensor anomaly detection time and data retransmission success rate for Comparative Example 1 and Example 1. Among these, alarm response latency... It can be represented as: in, This indicates the time when the sensor signal reaches the alarm criterion. This indicates the moment when the alarm information is output by the edge device, host computer, or cloud platform. It also indicates the percentage of data compression or data upload reduction. It can be represented as: in, This represents the total amount of data uploaded under all raw data upload methods. This indicates the amount of data uploaded using the edge device hierarchical upload method.
[0036] Figure 5 A comparative schematic diagram showing the alarm latency of Comparative Example 1 and Example 1 under normal network, weak network, and network outage conditions is presented. Figure 5 It can be seen that the edge computing method does not depend on the real-time availability of the communication link and can continue to complete local alarms when network conditions are poor or the network is interrupted.
[0037] In summary, the embodiments of the present invention relate to an edge computing method for gas sensors, applied to edge devices. The method includes: acquiring raw sampling data from a gas sensor array; calculating gas-sensitive response characteristic parameters based on the raw sampling data, and extracting gas response characteristic data from the raw sampling data; inputting the gas response characteristic data into a locally preset lightweight gas identification model to obtain gas identification data; outputting local alarm information based on the risk level or the gas-sensitive response characteristic parameters meeting preset alarm conditions; classifying the raw sampling data, gas response characteristic data, and gas identification data into data priority levels, and uploading the raw gas data, gas response characteristic data, and gas identification data to a cloud server according to the data priority levels. The technical solution provided by the embodiments of the present invention completes data acquisition, signal filtering, temperature and humidity compensation, feature extraction, and model inference at the edge device near the gas sensor, reducing the dependence on real-time cloud computing. Simultaneously, the adoption of hierarchical storage and event-triggered upload mechanisms avoids the continuous uploading of large amounts of raw data, effectively reducing communication bandwidth consumption and cloud processing pressure. When the communication network is interrupted, experiences significant latency, or is unstable, the edge device can still use the local model to complete gas identification and fault alarm, improving the system's reliability in complex field environments. By assessing the sensor baseline drift, noise level, and recovery capability, abnormal sensor states can be identified, enhancing the reliability of subsequent gas identification results. Through model version verification, model update, and model rollback mechanisms, long-term collaborative operation between the edge device and the host computer or cloud platform can be achieved.
[0038] It should be understood that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples; within the framework of the invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the invention as described above, which are not provided in the details for the sake of brevity. The specific embodiments of the invention described above are merely illustrative or explanatory of the principles of the invention and do not constitute a limitation of the invention. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of the invention should be included within the protection scope of the invention. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.
Claims
1. A method of edge computing for a gas sensor, the method comprising: Applied to edge devices, the method includes: Acquire raw sampling data from the gas sensor array; Calculate gas-sensitive response characteristic parameters based on the original sampling data, and extract gas response characteristic data from the original sampling data; The gas response characteristic data is input into a locally preset lightweight gas identification model to obtain gas identification data, which includes gas category, gas concentration range, fault type and risk level. Based on the risk level or the gas-sensitive response characteristic parameters meeting the preset alarm conditions, output local alarm information; The raw sampling data, gas response feature data, and gas identification data are assigned data priority levels, and the raw gas data, gas response feature data, and gas identification data are uploaded to the cloud server according to the data priority levels.
2. The method of claim 1, wherein, The gas-sensitive response characteristic parameters are calculated according to the following formula: in, Indicates the characteristic parameters of the gas-sensitive response. This represents the resistance of the gas sensor in its initial state. This indicates the resistance of the gas sensor under the current condition.
3. The method according to claim 2, characterized in that, The raw sampling data includes the raw response curve of the gas sensor array; the gas response characteristic data includes the steady-state response amplitude of the gas sensor, the 10%-90% rise time of the output, the maximum first derivative of the response curve, the integral area of the response curve, and the time constant of the recovery phase. Extracting gas response feature data from the original sampling data includes performing differentiation and / or integration operations on the original response curve.
4. The method according to claim 3, characterized in that, The method further includes: calculating gas sensor state parameters based on the original sampling data; the gas sensor state parameters include sensor baseline drift, sensor noise level, and sensor recovery capability.
5. The method according to claim 4, characterized in that, The baseline drift of the sensor is expressed as: in, The baseline resistance represents the current time or the current period. This represents the baseline resistance at the previous moment or in the previous cycle.
6. The method according to claim 4, characterized in that, The sensor noise level is expressed as follows: in, Indicates the sensor noise level. This represents the sampled value at the i-th sampling point. This represents the average value of the sampled signal within a preset time window. Indicates the number of sampling points.
7. The method according to claim 4, characterized in that, The sensor's recovery capability is expressed as: in, This indicates the resistance value of the gas sensor when it returns to a steady state after the gas to be measured is discharged. This indicates the resistance value of the gas sensor in its initial state.
8. The method according to any one of claims 4-7, characterized in that, The method further includes: When the sensor baseline drift exceeds a preset first threshold, the sensor noise level exceeds a preset second threshold, or the sensor recovery capability is below a preset third threshold, the sensor status is marked as abnormal.
9. The method according to claim 8, characterized in that, The data priority levels include first-priority data, second-priority data, and third-priority data; wherein... The first priority data includes alarm information, gas identification results, timestamps of each uploaded data, device number, gas sensor status parameters, lightweight gas identification model version number, and communication status; The second priority data includes gas-sensitive response characteristic parameters and gas response characteristic data; The third priority data includes the original sampled data and the original response curve corresponding to the original sampled data.
10. The method according to claim 9, characterized in that, Based on the data priority level, the raw gas data, gas response characteristic data, and gas identification data are selected and uploaded to the cloud server, including: Real-time uploading of top-priority data; Upload the second priority data according to the preset cycle; The third priority data for the corresponding time period will be uploaded when any of the following situations occur: local alarm information is output; the model recognition confidence level is lower than the preset threshold; the sensor status is abnormal; retransmission is required after communication is restored; the host computer or cloud platform issues a command to retrieve the original data; or model performance verification is required before and after the model update is completed.
