Data processing method and device of air purifier

CN122545335APending Publication Date: 2026-08-11GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-02
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0003]然而,在实际使用中,同一型号不同批次或不同型号的空气净化器在相同环境下,传感器监测到的数据常出现显著差异,使监测到的数据难以反映真实的空气质量,影响用户对环境的准确判断

Benefits of technology

本发明实施例公开了一种空气净化器的数据处理方法、装置、设备和介质,空气净化器包括多种类型的传感器,方法包括:获取多种类型的传感器采集的多种传感数据;多种传感数据包括温度、湿度、甲醛值、颗粒物浓度值和挥发性有机化合物浓度值;基于温度和湿度,对甲醛值和颗粒物浓度值进行环境补偿,得到补偿后的甲醛值和补偿后的颗粒物浓度值;对补偿后的甲醛值、补偿后的颗粒物浓度值和挥发性有机化合物浓度值,分别基于对应的预先标定获得的校正系数进行校正处理;分别根据预设时间段内校正后的甲醛值、颗粒物浓度值和挥发性有机化合物浓度值进行漂移校正处理;根据漂移校正处理完成后的甲醛值、颗粒物浓度值和挥发性有机化合物浓度值,确定空气质量。基于各种有机物测量仪,或环境监测专用仪器仪表采集的多种传感数据,包括温度、湿度、甲醛值、颗粒物浓度值,对补偿后的传感数据分别基于预先标定获得的校正系数进行校正处理,消除了因传感器制造公差、光路装配差异等引起的个体偏差,使得空气净化器在相同环境条件下能够输出一致的测量值,为用户提供了可靠环境质量数据。通过分别根据预设时间段内校正后的传感数据进行漂移校正处理,确保设备在长期使用后仍能输出稳定、可信的数据。基于温度和湿度对甲醛值和颗粒物浓度值进行环境补偿,使传感数据能够真实反映实际空气质量,避免了因环境变化导致的测量偏差。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122545335A_ABST
    Figure CN122545335A_ABST
Patent Text Reader

Abstract

This invention discloses a data processing method and apparatus for air purifiers. The method includes: acquiring various sensor data collected by multiple types of sensors; performing environmental compensation on formaldehyde and particulate matter concentrations based on temperature and humidity to obtain compensated formaldehyde and particulate matter concentrations; correcting the compensated formaldehyde, particulate matter, and volatile organic compound (VOC) concentrations based on corresponding pre-calibrated correction coefficients; performing drift correction on the corrected formaldehyde, particulate matter, and VOC concentrations within a preset time period; and determining the air quality based on the drift correction results. This method solves the technical problem of poor data consistency from air purifier sensors and improves the accuracy of air quality monitoring data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a data processing method for an air purifier, a data processing device for an air purifier, an air purifier, and a computer-readable storage medium. Background Technology

[0002] With urbanization and increased health awareness, air purifiers have become essential equipment for indoor environments. Air purifiers now widely integrate various sensors for monitoring air quality, including those for dust, formaldehyde, volatile organic compound concentrations, temperature, and humidity, enabling automatic operation and significantly enhancing their intelligence.

[0003] However, in actual use, air purifiers of the same model but different batches or different models often show significant differences in the data monitored by the sensors under the same environment, making it difficult for the monitored data to reflect the true air quality and affecting the user's accurate judgment of the environment. Summary of the Invention

[0004] In view of the above problems, embodiments of the present invention are proposed to provide a data processing method for an air purifier, a data processing apparatus for an air purifier, an air purifier, and a computer-readable storage medium that overcome or at least partially solve the above problems.

[0005] To address the aforementioned problems, a first aspect of the present invention provides a data processing method for an air purifier, the air purifier including various types of sensors, the method comprising: The system acquires various types of sensor data, including temperature, humidity, formaldehyde level, particulate matter concentration, and volatile organic compound concentration. Based on the temperature and humidity, environmental compensation is performed on the formaldehyde value and the particulate matter concentration value to obtain the compensated formaldehyde value and the compensated particulate matter concentration value. The compensated formaldehyde value, the compensated particulate matter concentration value, and the volatile organic compound concentration value are respectively corrected based on the corresponding pre-calibrated correction coefficients; Drift correction was performed based on the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value within a preset time period, respectively. Air quality is determined based on the formaldehyde, particulate matter, and volatile organic compound concentrations after drift correction.

[0006] Optionally, the correction processing of the compensated formaldehyde value, the compensated particulate matter concentration value, and the volatile organic compound concentration value based on corresponding pre-calibrated correction coefficients includes: Based on the pre-calibrated correction coefficients corresponding to the formaldehyde value and the particulate matter concentration value, respectively, a linear transformation is performed on the compensated formaldehyde value and the compensated particulate matter concentration value.

[0007] Optionally, the step of correcting the compensated formaldehyde value, the compensated particulate matter concentration value, and the volatile organic compound concentration value based on corresponding pre-calibrated correction coefficients further includes: Based on the pre-calibrated correction coefficients corresponding to the volatile organic compound concentration values, multi-segment linear fitting is performed on the volatile organic compound concentration values.

[0008] Optionally, before performing environmental compensation on the formaldehyde value and the particulate matter concentration value, the method further includes: The formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value are smoothed using a moving average window; the length of the moving average window is determined based on the signal-noise characteristics of different sensors. The formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value after smoothing were subjected to jump threshold detection to eliminate abnormal data.

[0009] Optionally, the step of performing environmental compensation on the formaldehyde value and the particulate matter concentration value based on the temperature and the humidity to obtain the compensated formaldehyde value and the compensated particulate matter concentration value includes: Based on the temperature and humidity, a target parameter compensation model is determined from a set of preset parameter compensation models; the set of preset parameter compensation models correspond to different environmental scenarios. The formaldehyde value, particulate matter concentration value, temperature, and humidity are input into the target parameter compensation model, and the compensated formaldehyde value and the compensated particulate matter concentration value are output.

[0010] Optionally, the drift correction processing based on the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value within a preset time period includes: Obtain the zero-point reference values ​​corresponding to the formaldehyde value, the particulate matter concentration value, and the volatile organic compound concentration value; Subtract the corresponding zero-point reference value from the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value, respectively.

[0011] Optionally, the drift correction processing based on the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value within a preset time period further includes: Before subtracting the corresponding zero-point reference value from the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value, it is determined whether there is any sensor data among the formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value that meets the zero-point reference value update conditions. If there is sensor data that meets the conditions for updating the zero-point reference value, then the sensor data and the corresponding zero-point reference value are weighted and fused to obtain the updated zero-point reference value.

[0012] Optionally, determining whether there is sensor data among the formaldehyde value, the particulate matter concentration value, and the volatile organic compound concentration value that satisfies the zero-point reference value update condition includes: The distribution characteristics of the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value, as well as auxiliary environmental parameters, are monitored within a preset time period. Based on the distribution characteristics and the auxiliary environmental parameters, a reliable zero-point interval is constructed corresponding to the formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value. Sensing data that continuously fall within the corresponding trusted zero-point interval and meet the preset duration condition are determined as sensing data that meet the zero-point reference value update condition.

[0013] According to a second aspect of the present invention, a data processing device for an air purifier is provided, the air purifier including various types of sensors, the device comprising: The sensor data acquisition module is used to acquire various sensor data collected by the various types of sensors; the various sensor data include temperature, humidity, formaldehyde value, particulate matter concentration value and volatile organic compound concentration value; The sensor data compensation module is used to perform environmental compensation on the formaldehyde value and the particulate matter concentration value based on the temperature and the humidity, so as to obtain the compensated formaldehyde value and the compensated particulate matter concentration value. The sensor data correction module is used to correct the compensated formaldehyde value, the compensated particulate matter concentration value, and the volatile organic compound concentration value based on the corresponding pre-calibrated correction coefficients. The data drift correction module is used to perform drift correction processing based on the corrected formaldehyde value, particulate matter concentration value and volatile organic compound concentration value within a preset time period; The air quality determination module is used to determine air quality based on the formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value after drift correction processing.

[0014] According to a third aspect of the present invention, an air purifier is provided, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the data processing method of the air purifier as described in any of the preceding embodiments.

[0015] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the data processing method for an air purifier as described in any of the preceding embodiments.

[0016] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This invention discloses a data processing method, apparatus, device, and medium for an air purifier. The air purifier includes multiple types of sensors. The method includes: acquiring multiple sensor data collected by the various types of sensors; the multiple sensor data includes temperature, humidity, formaldehyde value, particulate matter concentration value, and volatile organic compound (VOC) concentration value; performing environmental compensation on the formaldehyde value and particulate matter concentration value based on temperature and humidity to obtain compensated formaldehyde value and compensated particulate matter concentration value; performing correction processing on the compensated formaldehyde value, compensated particulate matter concentration value, and VOC concentration value based on corresponding pre-calibrated correction coefficients; performing drift correction processing on the corrected formaldehyde value, particulate matter concentration value, and VOC concentration value within a preset time period; and determining the air quality based on the formaldehyde value, particulate matter concentration value, and VOC concentration value after drift correction processing. Based on various sensor data collected by organic matter measuring instruments or dedicated environmental monitoring instruments, including temperature, humidity, formaldehyde levels, and particulate matter concentration, the compensated sensor data is corrected using pre-calibrated correction coefficients. This eliminates individual deviations caused by sensor manufacturing tolerances and differences in optical path assembly, ensuring that the air purifier outputs consistent measurement values ​​under the same environmental conditions, providing users with reliable environmental quality data. Drift correction is performed on the calibrated sensor data within preset time periods to ensure that the device continues to output stable and reliable data even after long-term use. Environmental compensation based on temperature and humidity for formaldehyde and particulate matter concentration values ​​ensures that the sensor data accurately reflects actual air quality, avoiding measurement deviations caused by environmental changes. Attached Figure Description

[0017] Figure 1 This is a flowchart of the steps of a data processing method for an air purifier provided in an embodiment of the present invention; Figure 2 This is a flowchart of another data processing method for an air purifier provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the model training process of a data processing method for an air purifier provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the calibration process of a data processing method for an air purifier provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the data processing flow of an air purifier data processing method provided in an embodiment of the present invention; Figure 6 This is a structural block diagram of a data processing device for an air purifier provided in an embodiment of the present invention. Detailed Implementation

[0018] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] In practical use, existing technologies often result in significant differences in the data monitored by sensors from different batches or different models of air purifiers under the same environment. This makes it difficult for the monitored data to reflect the true air quality and affects the user's accurate judgment of the environment.

[0020] One of the core concepts of this invention is that by correcting the compensated sensor data based on pre-calibrated correction coefficients, individual deviations caused by sensor manufacturing tolerances and differences in optical path assembly are eliminated. This ensures that the air purifier can output consistent measurement values ​​under the same environmental conditions, providing users with reliable environmental quality data. By performing drift correction processing on the corrected sensor data within a preset time period, zero-point drift caused by long-term use, material aging, or environmental stress is effectively suppressed, ensuring that the device can still output stable and reliable data after long-term use. Environmental compensation based on temperature and humidity for formaldehyde and particulate matter concentration values ​​ensures that the sensor data accurately reflects the actual air quality, avoiding measurement deviations caused by environmental changes.

[0021] Reference Figure 1 The diagram illustrates a flowchart of a data processing method for an air purifier according to an embodiment of the present invention. The air purifier includes various types of sensors, and the method specifically includes the following steps: Step 101: Acquire various sensor data collected by the various types of sensors; the various sensor data include temperature, humidity, formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value; Under the same environmental conditions, multiple air purifiers of the same model may exhibit significant dispersion in real-time data collection due to individual sensor differences and batch manufacturing deviations, making it difficult to guarantee the reliability and consistency of users' air quality assessments. Furthermore, changes in ambient temperature and humidity, component aging, and long-term operation can cause sensors to experience zero-point drift and sensitivity decay, leading to continuous inaccuracy of raw data over time. This results in the failure of intelligent control strategies, impacting purification performance and user experience.

[0022] This invention improves the consistency of data collected by sensors from different air purifier devices in the same environment by uniformly calibrating the data. This enhances data stability and reliability, providing a more reliable data foundation for intelligent control strategies. The aim is to achieve consistent standard air quality values ​​from different air purifier models in the same environment by performing environmental compensation on various sensor data, individually calibrating sensor data collected by individual sensors, and correcting drift in sensor data collected by aging sensors. This reduces deviations and solves the problem of inconsistent data and user inconvenience caused by existing technologies.

[0023] The air purifier of this invention includes: a dust sensor for real-time acquisition of raw scattering signals of particulate matter in the air, outputting raw particulate matter concentration values ​​(PM values). The raw range and output of different sensor models need to be uniformly processed, requiring normalization of different sensor models to unify dimensions and map all sensor data to the same standard. A formaldehyde sensor for detecting the concentration of gaseous pollutants in the environment, outputting raw formaldehyde values. Formaldehyde and particulate matter concentrations are acquired using various organic matter measuring instruments such as dust sensors and formaldehyde sensors, or dedicated environmental monitoring instruments. A temperature and humidity sensor for acquiring the current ambient temperature and relative humidity, providing multi-source data support for environmental compensation. A microcontroller unit (MCU) embeds the multi-stage data processing program described in this invention embodiment, used to sequentially execute preprocessing, environmental compensation, individual calibration, drift correction, and unified output. Non-volatile flash memory stores the device's unique calibration coefficients, solidified machine learning compensation model parameters, and historical operating data. A display interface presents the standardized air quality values ​​or corresponding air quality levels.

[0024] In this embodiment of the invention, the microcontroller unit (MCU) of the air purifier collects multi-source sensor data from the environment in real time through various connected sensors. Specifically, the dust sensor collects the raw scattering signal of particulate matter in the air in real time based on the principle of light scattering, and outputs the particulate matter concentration value (PM value) in μg / m³. The formaldehyde sensor detects the concentration of gaseous formaldehyde in the environment through the principle of electrochemical analysis and outputs the formaldehyde value in mg / m³. The volatile organic compound (VOC) sensor detects the overall concentration of total volatile organic compounds (TVOCs) in the air based on the principle of metal oxide semiconductors and outputs the VOC concentration value. The temperature and humidity sensor is used to obtain the current ambient temperature and relative humidity, providing multi-source data support for subsequent environmental compensation. The raw data collected by the above sensors is sent to the microcontroller unit as input for subsequent multi-stage data processing.

[0025] To ensure the integrity and continuity of the collected data, when data is missing from a sensor due to airflow disturbances, circuit noise, or momentary failure, interpolation methods are used to compensate for the missing data, ensuring the continuity of the data stream. Furthermore, during data acquisition, the acquisition timestamp and the operating status of each sensor are recorded in real time, providing a complete data foundation for subsequent preprocessing, environmental compensation, individual calibration, and drift correction stages. It can acquire multi-dimensional environmental data including temperature, humidity, formaldehyde, particulate matter, and volatile organic compounds, laying the data foundation for eliminating individual differences between devices, suppressing environmental interference, and mitigating long-term drift.

[0026] Step 102: Based on the temperature and humidity, perform environmental compensation on the formaldehyde value and the particulate matter concentration value to obtain the compensated formaldehyde value and the compensated particulate matter concentration value. The microcontroller unit (MCU) of the air purifier is configured to perform multi-stage sensor data processing, using data from multiple sources such as sensors on the air purifier, including formaldehyde, dust, TVOC (total volatile organic compounds), temperature, and humidity.

[0027] During the environmental compensation phase, the MCU reads the current ambient temperature and relative humidity measured by the temperature and humidity sensors, and then... Temperature and humidity are used as inputs to invoke a pre-installed random forest learning regression model in Flash. This model is trained in the cloud based on calibration data from multiple devices in a standard dust chamber, and can non-linearly eliminate the artificially high formaldehyde and particulate matter concentration values ​​caused by the hygroscopic expansion of particulate matter in high humidity environments. Temperature and humidity are not only used for real-time environmental compensation, but also are core input variables for long-term aging drift correction modeling.

[0028] In this embodiment of the invention, the microcontroller unit (MCU) uses the acquired formaldehyde value, particulate matter concentration value (PM value), and temperature (T) and relative humidity (RH) collected by the temperature and humidity sensor as input features, and calls a parameter compensation model pre-installed in non-volatile memory (Flash) for environmental compensation. This parameter compensation model is a random forest regression model with a "multi-dimensional input-multi-dimensional output" architecture, trained in the cloud based on calibration data from multiple devices in a standard dust chamber and controlled environment. It can non-linearly eliminate the artificially high particulate matter concentration caused by the hygroscopic expansion of particulate matter in high humidity environments, as well as the cross-interference of temperature and humidity on the formaldehyde sensor. Specifically, the MCU inputs the filtered formaldehyde value, particulate matter concentration value, and current temperature and humidity into the model. After inference, the model simultaneously outputs the environmentally compensated standard formaldehyde value and standard particulate matter concentration value, ensuring that the sensor data accurately reflects the actual air quality and avoiding measurement deviations caused by environmental changes.

[0029] The MCU calculates feature vectors within a fixed time window in real time, including the mean and variance of pollutant concentrations, instantaneous peak values, temperature and humidity values, and the correlation of various pollutant trends. First, a rule engine performs rapid judgment: if the temperature and humidity exceed preset high-temperature and high-humidity thresholds, it is directly identified as the corresponding scenario. For complex situations that do not conform to simple rules, the extracted feature vectors are input into a pre-defined small classification model (such as a decision tree) for inference and judgment, automatically identifying typical scenarios such as stable indoor, stable outdoor, kitchen environment, high-temperature and high-humidity, or low-temperature and low-humidity environments. Based on the recognition results, the MCU selects the best-matching target model from multiple parameter compensation sub-models corresponding to different environmental scenarios for inference, thereby achieving adaptive compensation for different operating conditions and ensuring accurate and reliable compensation results in various complex environments.

[0030] Step 103: The compensated formaldehyde value, the compensated particulate matter concentration value, and the volatile organic compound concentration value are corrected based on the corresponding pre-calibrated correction coefficients. The calibration coefficient is a core parameter in the individual calibration stage, used to correct the sensor's output value to eliminate individual deviations caused by manufacturing tolerances, assembly differences, etc. The calibration coefficient refers to a set of parameters obtained through mathematical fitting by comparing the air purifier with a standard reference device. These parameters are used to map the sensor's original or compensated output value to a standardized, consistent measurement value.

[0031] Individual calibration aims to eliminate individual biases caused by sensor manufacturing tolerances, differences in optical path assembly, and batch inconsistencies in sensitive materials, ensuring that different air purifiers output consistent measurement values ​​at the same true concentration. Individual calibration refers to the process of correcting compensated sensor data based on a calibration coefficient uniquely bound to the current device. This process uses mathematical transformations to map the device's sensor output to standardized, consistent measurement values, thereby solving the problem of incomparable data between different batches of the same model or between different models of devices in existing technologies.

[0032] In this embodiment of the invention, the microcontroller unit (MCU) reads the calibration coefficients uniquely bound to the current air purifier from non-volatile memory (Flash) and performs individual deviation correction on the obtained compensated formaldehyde value, compensated particulate matter concentration value, and acquired volatile organic compound concentration value. These calibration coefficients are obtained in a standard laboratory environment at the time of device manufacture: the device to be calibrated and a standard reference device are placed in the same standard gas chamber, multiple sets of output values ​​and standard reference values ​​are simultaneously collected, and linear fitting is performed using the least squares method to generate a set of calibration coefficients specific to that device. This individual calibration mechanism effectively corrects individual deviations caused by sensor manufacturing tolerances, differences in optical path assembly, and batch inconsistencies in sensitive materials, ensuring that different devices output consistent measurement values ​​at the same true concentration, thus solving the problem of incomparable data between different batches of the same model or between different models of devices in the prior art.

[0033] Differentiated calibration strategies are employed to address the varying response characteristics of different sensors. For dust and formaldehyde sensors, their physical principles (light scattering and electrochemistry) ensure good linearity between output and concentration; therefore, linear transformation is used to correct the compensated formaldehyde and particulate matter concentration values. For volatile organic compound (VOC) sensors, based on the metal oxide semiconductor principle, their response curves exhibit non-linear characteristics, with high sensitivity and steep curves in the low-concentration region, gradually saturating and flattening in the high-concentration region. Therefore, multi-segment linear fitting is used to correct the VOC concentration values, dividing the entire concentration measurement range into multiple intervals and performing linear fitting within each interval to form a piecewise function. Furthermore, when a sensor module is replaced, if the device is connected to the network, the MCU connects to the cloud via Wi-Fi or Bluetooth, uploads the new module's serial number, and the cloud matches the module's factory-calibrated exclusive coefficients and sends them to the device's Flash memory. If the device is offline, the pre-built "universal reference coefficient library for the same model of sensor" in the firmware is automatically called as temporary operating parameters, ensuring that the device can still perform individual calibration normally even without a network connection.

[0034] Step 104: Perform drift correction processing based on the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value within the preset time period; During the drift correction phase, a "dynamic baseline tracking algorithm based on multi-dimensional environmental feature constraints" is employed. This algorithm dynamically constructs a "credible zero-point interval" by real-time monitoring of the statistical distribution characteristics of sensor data (such as the minimum value of a long-term window and the rate of change of variance) and auxiliary environmental parameters (such as fan speed, door and window status, and historical air quality records). Only when data falls within this interval and meets a specific duration is it determined to be a true zero point, and a slow baseline update is performed to update the zero-point reference value. The formaldehyde, particulate matter, and volatile organic compound concentrations are then corrected by subtracting this zero-point reference value from the individually calibrated sensor data.

[0035] Drift correction aims to adaptively suppress zero-point drift caused by long-term use, material aging, or environmental stress, eliminating measurement errors accumulated over time and ensuring measurement accuracy throughout the equipment's lifecycle. Drift correction involves dynamically determining a zero-point reference value by real-time monitoring of the statistical distribution characteristics of sensor data over a preset time period, and subtracting this reference value from the individually calibrated sensor data to eliminate data errors caused by the slow change of the sensor's zero point over time.

[0036] In this embodiment of the invention, the microcontroller unit (MCU) performs zero-point drift correction on the calibrated formaldehyde, particulate matter, and volatile organic compound concentration values ​​to suppress zero-point drift caused by long-term use, material aging, or environmental stress. Specifically, the MCU monitors the statistical distribution characteristics of the three types of sensor data after individual calibration within a preset time period (e.g., 30 minutes), including minimum values ​​and variance change rate, while simultaneously collecting auxiliary environmental parameters such as fan speed, door and window status, and historical air quality records. Based on the above monitoring data, the MCU dynamically constructs a reliable zero-point interval, which characterizes the range of values ​​within which sensor readings can be determined to be in a zero-point state under the current environmental conditions. When the calibrated sensor data continuously falls within the reliable zero-point interval for a duration reaching a preset threshold (e.g., continuously for 30 minutes), and the variance within that duration is less than the preset variance threshold, the MCU determines that the current state is a true zero-point state, i.e., confirms a clean air environment; conversely, if any condition is not met, it is determined to be a non-true zero-point state.

[0037] After determining a true zero-point state, the MCU performs a baseline update: acquiring historical zero-point reference values, weighting and fusing the current sensor data with these historical reference values, and using a first-order low-pass filter to achieve a slow update, resulting in an updated zero-point reference value. The updated zero-point reference value is stored in non-volatile memory (Flash). When a non-true zero-point state is determined, the current zero-point reference value remains unchanged. Regardless of whether an update is performed, the MCU performs zero-point compensation: subtracting the current zero-point reference value from the individually calibrated formaldehyde, particulate matter, and volatile organic compound concentration values, respectively, to obtain drift-corrected sensor data. This achieves adaptive suppression of sensor zero-point drift, ensuring that the device can still output stable and accurate measurement values ​​after long-term use.

[0038] Step 105: Determine the air quality based on the formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value after drift correction.

[0039] After the above drift correction process is completed, the problems of incomparable data between devices, sensitivity to environmental interference, and inaccurate original data caused by long-term drift accumulation in the existing technology are solved. It realizes that the output sensor values ​​of air purifier devices are consistent and the trend is accurate under the same environment, and achieves air quality perception with high consistency, high stability and high reliability.

[0040] In this embodiment of the invention, after completing the aforementioned environmental compensation, individual calibration, and drift correction data processing, the microcontroller unit (MCU) converts the drift-corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value into a unified physical quantity unit and outputs them. Specifically, all models of the device use standardized physical quantity units: particulate matter concentration value is in μg / m³, formaldehyde value is in mg / m³, and volatile organic compound concentration value uses a standardized concentration unit. Through the correction of individual differences between devices in the aforementioned individual calibration stage, and the suppression of long-term zero-point drift in the drift correction stage, the output sensor data has eliminated the effects of device manufacturing tolerances, assembly differences, and long-term aging, enabling air purifiers of different models and batches to output consistent, comparable, and stable measurement values ​​under the same environmental conditions.

[0041] After standardizing the output of physical quantity units, the MCU maps the drift-corrected formaldehyde, particulate matter, and volatile organic compound concentrations to the corresponding Air Quality Index (AQI) levels according to national and enterprise standards, and presents this information to the user through the display interface. This mapping strictly adheres to national air quality standards, ensuring that users can intuitively and accurately understand the current indoor air quality. Furthermore, when a sensor (such as a formaldehyde sensor) fails, the display interface displays a fault message. Simultaneously, it uses data collected from other normally functioning sensors (such as dust and TVOC sensors) and combines this data with a multi-sensor correlation model to roughly estimate the pollution trend, clearly labeling it as an "estimated value." This maintains the basic intelligent linkage function of the equipment, ensuring that users can still obtain valuable air quality reference information even in the event of sensor failure. This achieves a complete transformation from raw sensor data to standardized, understandable, and reliable air quality information, providing a reliable data foundation for intelligent purification control strategies.

[0042] Reference Figure 2 The diagram illustrates a flowchart of another data processing method for an air purifier provided by an embodiment of the present invention. The air purifier includes various types of sensors, and the method specifically includes the following steps: Step 201: Acquire various sensor data collected by the various types of sensors; the various sensor data include temperature, humidity, formaldehyde value, particulate matter concentration value and volatile organic compound concentration value; In this embodiment of the invention, the microcontroller unit (MCU) of the air purifier collects multi-source sensor data from the environment in real time through various connected sensors. Specifically, the dust sensor collects the raw scattering signal of particulate matter in the air in real time based on the principle of light scattering, and outputs the particulate matter concentration value (PM value) in μg / m³. The formaldehyde sensor detects the concentration of gaseous formaldehyde in the environment through the principle of electrochemical analysis and outputs the formaldehyde value in mg / m³. The volatile organic compound (VOC) sensor detects the total concentration of VOCs in the air based on the principle of metal oxide semiconductors and outputs the VOC concentration value. The temperature and humidity sensor is used to obtain the current ambient temperature and relative humidity, providing multi-source data support for subsequent environmental compensation.

[0043] Step 202: Smooth the formaldehyde value, the particulate matter concentration value, and the volatile organic compound concentration value using a moving average window; the length of the moving average window is determined based on the signal-noise characteristics of different sensors. In the preprocessing stage, the MCU performs time-domain filtering on the raw particulate matter concentration, raw formaldehyde concentration, and raw volatile organic compound (VOC) concentration values ​​output by the dust sensor. Specifically, a dynamic moving average window is used to smooth the continuous sampled values, and a jump threshold detection is combined to eliminate abnormal pulse interference, resulting in filtered formaldehyde, particulate matter, and VOC concentration values. This effectively suppresses high-frequency fluctuations in the optical sensor caused by airflow disturbances or circuit noise. The length of the moving average window can be dynamically adjusted according to the sensor signal noise characteristics. In the jump threshold detection, the threshold is dynamically adjusted based on physical characteristics, combining absolute and relative variables. The absolute variable prevents interference from minor noise, while the relative rate of change adapts to different concentrations, setting different thresholds for different sensors.

[0044] Smoothing aims to suppress high-frequency random fluctuations in the sensor caused by airflow disturbances or circuit noise, making the data curve smoother and more stable, and providing a high-quality data foundation for subsequent processing. Smoothing refers to the process of applying time-domain filtering to the continuous sampled values ​​of the sensor through a moving average window. That is, for each sampling point, the arithmetic mean of several historical data points before and after it is taken as the smoothed output value at the current moment, thereby reducing high-frequency noise components in the signal.

[0045] In this embodiment of the invention, the microcontroller unit (MCU) performs time-domain filtering on the acquired formaldehyde, particulate matter, and volatile organic compound concentration values. A moving average window is used to suppress high-frequency random fluctuations caused by airflow disturbances or circuit noise, resulting in smoother and more stable data curves. Specifically, the MCU maintains a moving average window for each type of sensor. The window length is not fixed but dynamically adjusted according to the signal-noise characteristics of each sensor. For sensors with high noise levels (such as dust sensors significantly affected by airflow), a longer moving average window (e.g., length 10) is used to enhance the smoothing effect; for sensors with high response speed requirements or low noise levels (such as formaldehyde sensors), a shorter moving average window (e.g., length 3) is used to maintain data response sensitivity. In each sampling period, the MCU calculates the arithmetic mean of the current sampled value and the historical data within the window to obtain the smoothed sensor data.

[0046] Smoothing effectively reduces high-frequency random noise components in sensor output signals, preventing misjudgments caused by instantaneous fluctuations. For example, dust sensors may experience sharp jumps in raw data when fans start or stop or when airflow is disturbed. After moving average filtering, the data curve becomes smoother, eliminating spike interference. Similarly, total volatile organic compound (TVOC) sensors exhibit high-frequency fluctuations in raw data when ambient airflow changes; smoothing more accurately reflects the overall trend of pollutant changes. Furthermore, smoothed data eliminates some high-frequency noise, enabling subsequent jump threshold detection to more accurately identify genuine abnormal pulse interference rather than false triggers caused by normal noise. This preprocessing mechanism effectively improves the stability and reliability of sensor data, providing high-quality data input for subsequent stages such as environmental compensation, individual calibration, and drift correction.

[0047] Step 203: Perform jump threshold detection on the smoothed formaldehyde value, particulate matter concentration value and volatile organic compound concentration value to remove abnormal data.

[0048] Jump threshold detection aims to identify and eliminate abnormal pulse interference in sensor data, preventing instantaneous outliers from affecting the accuracy of subsequent compensation and correction. Jump threshold detection refers to the process of monitoring the amplitude of changes in sensor data, combining the absolute change and the relative rate of change, to determine whether the current sampled value is an abnormal pulse interference, and then eliminating or correcting the data determined to be abnormal.

[0049] In this embodiment of the invention, the microcontroller unit (MCU) performs jump threshold detection on the smoothed formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value to identify and eliminate abnormal pulse interference in the sensor data, preventing instantaneous abnormal values ​​from affecting the accuracy of subsequent compensation and correction. Specifically, the MCU adopts a dual judgment mechanism, simultaneously judging anomalies for each sampling point based on absolute change and relative change rate. Absolute change detects the absolute value of the difference between the current sampling value and the previous sampling value, used to identify amplitude abrupt changes; relative change rate detects the percentage change of the current sampling value relative to the historical benchmark, used to adapt to anomaly identification under different concentration levels. For each sensor, the MCU sets differentiated jump thresholds according to its physical characteristics and signal noise level: dust sensors are easily affected by airflow disturbances, so a relatively lenient absolute change threshold (e.g., ±50 μg / m³) and relative change rate threshold (e.g., 50%) are set; formaldehyde sensors have a stable response, so a relatively strict absolute change threshold (e.g., ±0.05 mg / m³) and relative change rate threshold (e.g., 30%) are set; total volatile organic compound sensors are in between, so a medium threshold level is set.

[0050] When the current sampled value is detected to meet the anomaly judgment conditions (i.e., the absolute change exceeds a preset absolute threshold and the relative change rate exceeds a preset relative threshold), the MCU marks the sampled point as an abnormal pulse interference and corrects it using a substitute value. The substitute value can be obtained by using the previous valid sampled value, the average of valid data within a sliding window, or by estimating based on previous and subsequent valid data points using linear interpolation. For cases where anomalies occur repeatedly, the MCU records the anomaly event and reports it to the cloud for subsequent diagnosis of sensor health. By using jump threshold detection, sudden abnormal data caused by instantaneous airflow impact, electromagnetic interference, poor sensor contact, etc., can be effectively eliminated, ensuring that the data entering subsequent stages such as environmental compensation, individual calibration, and drift correction truly reflects the actual environmental state, avoiding error propagation and cumulative amplification problems caused by single-point anomalies.

[0051] Step 204: Based on the temperature and humidity, perform environmental compensation on the formaldehyde value and the particulate matter concentration value to obtain the compensated formaldehyde value and the compensated particulate matter concentration value. In this embodiment of the invention, the microcontroller unit (MCU) uses the acquired formaldehyde value, particulate matter concentration value (PM value), and temperature (T) and relative humidity (RH) collected by the temperature and humidity sensor as input features, and calls a parameter compensation model pre-installed in non-volatile memory (Flash) for environmental compensation. This parameter compensation model is a random forest regression model with a "multi-dimensional input-multi-dimensional output" architecture, trained in the cloud based on calibration data from multiple devices in a standard dust chamber and controlled environment. It can non-linearly eliminate the artificially high particulate matter concentration caused by the hygroscopic expansion of particulate matter in high humidity environments, as well as the cross-interference of temperature and humidity on the formaldehyde sensor. Specifically, the MCU inputs the filtered formaldehyde value, particulate matter concentration value, and current temperature and humidity into the model. After inference, the model simultaneously outputs the environmentally compensated standard formaldehyde value and standard particulate matter concentration value, ensuring that the sensor data accurately reflects the actual air quality and avoiding measurement deviations caused by environmental changes.

[0052] In some embodiments, step 204 may include the following sub-steps: Sub-step S11: Based on the temperature and humidity, determine the target parameter compensation model from a set of preset parameter compensation models; the set of preset parameter compensation models correspond to different environmental scenarios. In sub-step S12, the formaldehyde value, the particulate matter concentration value, the temperature, and the humidity are input into the target parameter compensation model, and the compensated formaldehyde value and the compensated particulate matter concentration value are output.

[0053] In this embodiment of the invention, feature vectors within a fixed time window are calculated in real time, including the mean concentration, variance, instantaneous peak value, temperature and humidity values, and the correlation of various pollutant change trends. Based on pre-set scene determination rules and the current temperature and humidity, the current environmental scene is determined. Multiple parameter compensation models are random forest regression models trained in the cloud, corresponding to typical environmental scenes such as stable indoor environment, stable outdoor environment, kitchen environment, high temperature and high humidity, and low temperature and low humidity. First, a rule engine performs a rapid determination: if the temperature and humidity exceed a preset high temperature and high humidity threshold (e.g., temperature > 30℃ and humidity > 80%), it is directly determined as a "high temperature and high humidity" scene; if the temperature and humidity are lower than a preset low temperature and low humidity threshold (e.g., temperature < 10℃ and humidity < 30%), it is determined as a "low temperature and low humidity" scene. For complex cases that do not conform to simple rules, the extracted feature vectors are input into a pre-fixed small classification model (e.g., decision tree or micro neural network) for inference and judgment, automatically identifying the current environmental scene. Based on the identification results, the most matching target parameter compensation model is selected from multiple parameter compensation sub-models corresponding to different environmental scenes.

[0054] Preprocessed formaldehyde and particulate matter concentration values, along with current temperature and humidity, are used as input features and fed into a selected target parameter compensation model for inference. The target parameter compensation model employs a joint random forest regression architecture of "multi-dimensional input-multi-dimensional output." This model non-linearly eliminates the artificially inflated particulate matter concentration caused by hygroscopic expansion of particulate matter in high humidity environments, as well as the cross-interference of temperature and humidity changes on the formaldehyde sensor's response characteristics. After inference, the model simultaneously outputs environmentally compensated standard formaldehyde and particulate matter concentration values. For example, in high-temperature and high-humidity environments, dust sensors may cause artificially inflated particulate matter concentration readings due to hygroscopic expansion of particulate matter; after non-linear compensation by this model, the output value accurately reflects the true particulate matter concentration. Similarly, the sensitivity of formaldehyde sensors may increase in high-temperature environments, and the model can adaptively compensate based on temperature and humidity. The sensor data accurately reflects actual air quality, avoiding measurement bias caused by environmental changes.

[0055] Reference Figure 3This diagram illustrates the model training process of a data processing method for an air purifier according to an embodiment of the present invention. The diagram shows the training process of the parameter compensation model. First, data collection and preprocessing are performed. Raw sensor data (including formaldehyde value, particulate matter concentration, temperature, and humidity) and standard values ​​measured by a standard reference instrument are collected from multiple air purifiers in a standard dust chamber and controlled environment. The data undergoes preprocessing operations such as cleaning, filtering, and normalization. Next, features are extracted from the preprocessed data, including statistical features such as the mean, variance, and trend of pollutant concentrations. Deep feature extraction is then performed to uncover nonlinear correlations between multi-source data. The extracted features are used to construct training and testing sets. A random forest regression algorithm is used to train the model on the training set, constructing a joint regression model of "multi-dimensional input-multi-dimensional output." The model is then evaluated and validated using the testing set. Finally, the qualified model is output as the parameter compensation model, solidified, and deployed to the non-volatile memory of the air purifier for real-time environmental compensation by the device.

[0056] Step 205: The compensated formaldehyde value, the compensated particulate matter concentration value, and the volatile organic compound concentration value are corrected based on the corresponding pre-calibrated correction coefficients. In this embodiment of the invention, the microcontroller unit (MCU) reads the calibration coefficient uniquely bound to the current air purifier from non-volatile memory (Flash) and performs individual deviation correction on the obtained compensated formaldehyde value, compensated particulate matter concentration value, and acquired volatile organic compound (VOC) concentration value. This calibration coefficient is obtained under standard laboratory conditions at the time of device manufacture. Differentiated correction strategies are adopted to address the differences in response characteristics of different sensors. For dust and formaldehyde sensors, their physical principles (light scattering and electrochemistry) determine a good linearity between output and concentration; therefore, linear transformation is used to correct the compensated formaldehyde and particulate matter concentration values. For VOC sensors, based on the principle of metal oxide semiconductors, the response curve exhibits non-linear characteristics, with high sensitivity and a steep curve in the low concentration region, and gradually saturating and flattening the curve in the high concentration region. Therefore, multi-segment linear fitting is used to correct the VOC concentration value, that is, the entire concentration measurement range is divided into multiple intervals, and linear fitting is performed in each interval to form a piecewise function.

[0057] In some embodiments, step 205 may include the following sub-steps: Sub-step S21 involves performing a linear transformation on the compensated formaldehyde value and the compensated particulate matter concentration value based on the pre-calibrated correction coefficients corresponding to the formaldehyde value and the particulate matter concentration value, respectively.

[0058] Linear transformation correction is a core correction method used in the individual calibration stage for dust and formaldehyde sensors. It involves linearly mapping the compensated sensor data using two parameters: slope and intercept, eliminating individual deviations caused by sensor manufacturing tolerances, optical path assembly differences, etc. Linear transformation correction refers to performing a linear function transformation on the compensated sensor data based on pre-calibrated slope coefficient 'a' and intercept coefficient 'b', mapping it to standardized, consistent measurement values.

[0059] In this embodiment of the invention, the microcontroller unit (MCU) performs individual deviation correction on the output compensated formaldehyde value and compensated particulate matter concentration value based on the pre-calibrated correction coefficient, eliminating the sensor data deviation caused by sensor manufacturing tolerances, optical path assembly differences, etc., so that different air purifiers output consistent measurement values ​​under the same real concentration.

[0060] The MCU reads the calibration coefficients uniquely bound to the current air purifier from non-volatile memory (Flash), including the calibration coefficients for the formaldehyde sensor and the dust sensor. These calibration coefficients are obtained at the factory under standard laboratory conditions: the device to be calibrated and a standard reference device are placed in the same standard environment, multiple sets of output values ​​and standard reference values ​​are simultaneously collected, and a linear fit is performed using the least squares method to generate a set of calibration coefficients specific to this device. Since the outputs and concentrations of the dust sensor (based on light scattering principle) and the formaldehyde sensor (based on electrochemical principle) have a good linear relationship, linear transformation is used for calibration.

[0061] The linear transformation correction formula is: X2 = a * X1 + b, where X2 is the individual calibrated sensor value (corrected output); X1 is the compensated sensor data value; a is the slope correction coefficient, reflecting the sensor's sensitivity coefficient and correcting the deviation of the response amplitude; and b is the intercept correction coefficient, reflecting the sensor's zero-point offset and correcting static deviation. Through this linear transformation, individual deviations caused by differences in sensor chips, optical path assembly errors, and batch inconsistencies in sensitive materials can be effectively corrected.

[0062] In some embodiments, step 205 may further include the following sub-steps: Sub-step S31: Based on the pre-calibrated correction coefficients corresponding to the volatile organic compound concentration values, perform multi-segment linear fitting on the volatile organic compound concentration values.

[0063] Multisegment linear fitting is a core calibration method used in the individual calibration stage for volatile organic compound (VOC) concentration values. It divides the entire concentration measurement range into multiple intervals and performs linear fitting within each interval. Multisegment linear fitting refers to dividing the measurement range into several continuous intervals based on the nonlinear curve characteristics between sensor output and concentration. Within each interval, a set of linear transformation coefficients is fitted, and the nonlinear VOC concentration values ​​are mapped to a linearized and standardized form through a piecewise linear function.

[0064] In this embodiment of the invention, the microcontroller unit (MCU) performs multi-segment linear fitting correction on the acquired volatile organic compound (VOC) concentration value based on pre-calibrated VOC sensor correction coefficients. Since the VOC sensor operates based on the metal-oxide-semiconductor (MOS) principle, its response characteristics exhibit non-linearity. It has high sensitivity and a steep curve in the low-concentration region, gradually saturating and flattening in the high-concentration region. Therefore, a simple linear transformation cannot effectively correct the VOC concentration value; a multi-segment linear fitting method is required. The MCU reads the VOC sensor correction coefficients uniquely bound to the current air purifier, and the set of segment points {X1, X2, ..., X...} from non-volatile memory. n 1}, the correction coefficients include the slope coefficients {a1, a2, ..., a} corresponding to each interval. n} and intercept coefficients {b1, b2, ..., b n These correction coefficients are obtained in a standard laboratory environment when the equipment leaves the factory: the equipment to be calibrated and the standard reference equipment are placed in a standard environment, the output values ​​of the equipment to be calibrated and the standard reference values ​​are collected simultaneously at multiple concentration points, the segmentation points are determined according to the concentration-response curve, and the linear transformation coefficients are independently fitted using the least squares method in each interval.

[0065] During operation, the MCU performs multi-segment linear fitting correction as follows: First, it acquires the compensated volatile organic compound (VOC) concentration value. Then, it determines the concentration range to which this value belongs. Based on the determined range, the MCU selects the corresponding slope coefficient and intercept coefficient, performs a linear transformation, and outputs the individually calibrated VOC concentration value. For example, in the low concentration range (0~1 mg / m³), the VOC sensor response curve is relatively steep, so a larger slope coefficient is used for compensation; in the high concentration range (1~5 mg / m³), the curve gradually saturates, so a smaller slope coefficient is used for compression correction. Through multi-segment linear fitting, the nonlinear response of the VOC sensor can be accurately mapped to a standardized linear output, ensuring a high degree of consistency with the standard reference device.

[0066] Reference Figure 4This diagram illustrates a calibration process for a data processing method for an air purifier according to an embodiment of the present invention. The diagram shows the factory calibration process for individual calibration coefficients. First, multiple air purifiers to be calibrated are placed in a standard laboratory environment (standard gas chamber or standard dust chamber). The devices collect formaldehyde and particulate matter concentration values, and environmental compensation is applied to the collected data. It is then determined whether this is the first factory calibration: if it is the first calibration, the calibration coefficients (including slope k and intercept b) are calculated using a least-squares linear fitting method by comparing the data collected by the device to be calibrated with the reference values ​​collected by a standard reference device; if it is not the first calibration, historical calibration coefficients are used directly. The calculated calibration coefficients are written to the device's non-volatile memory (Flash) or sent to the device via the cloud. After the coefficients are written, the verification process begins: under the same environmental conditions, the outputs of all devices to be calibrated are verified to ensure consistency in individual calibration results. After successful verification, it is determined whether full-range calibration has been completed, i.e., whether calibration has been performed at all preset concentration points (such as clean air, low concentration, medium concentration, and high concentration). If full-range calibration has not been completed, the process proceeds to the next concentration point for further data acquisition and calibration; if full-range calibration has been completed, the calibration is finished, and the equipment is shipped. This process ensures that each device obtains its own unique calibration coefficient, effectively eliminating individual deviations caused by sensor manufacturing tolerances and assembly differences, and laying a solid foundation for data consistency between subsequent devices.

[0067] Step 206: Perform drift correction processing based on the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value within the preset time period; In this embodiment of the invention, the statistical distribution characteristics of three types of sensor data after individual calibration are monitored in real time within a preset time period (e.g., 30 minutes). Simultaneously, auxiliary environmental parameters are collected to dynamically construct a reliable zero-point interval. When the individual-calibrated sensor data continuously falls within the reliable zero-point interval for a duration reaching a preset threshold (e.g., 30 consecutive minutes), and the variance within that duration is less than a preset variance threshold, the MCU determines that the current state is a true zero-point state, i.e., confirms a clean air environment. After determining a true zero-point state, the MCU performs a baseline update, obtains the current zero-point reference value, and performs a weighted fusion of the current sensor data and the current zero-point reference value to obtain an updated zero-point reference value. The updated zero-point reference value is then subtracted from the individual-calibrated formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value to obtain drift-corrected sensor data. If the current state is not a true zero-point state, the corresponding current zero-point reference value is subtracted from the individual-calibrated formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value to obtain drift-corrected sensor data. It enables drift correction of formaldehyde, particulate matter, and volatile organic compound concentration values, ensuring that these values ​​are accurate measurements.

[0068] In some embodiments, step 206 may include the following sub-steps: Sub-step S41: Obtain the zero-point reference values ​​corresponding to the formaldehyde value, the particulate matter concentration value, and the volatile organic compound concentration value; In this embodiment of the invention, the microcontroller unit (MCU) acquires a zero-point reference value for zero-point drift compensation. This zero-point reference value is stored in non-volatile memory (Flash) and represents the currently recognized zero-point state of the sensor, used to subtract from real-time readings to eliminate zero-point drift errors. First, currently valid zero-point reference values ​​are read from the Flash, including the zero-point reference values ​​for the formaldehyde sensor, dust sensor, and volatile organic compound sensor. These zero-point reference values ​​are dynamically maintained during device operation through a true zero-point state determination mechanism. When the system detects a clean air environment (true zero-point state), the zero-point reference values ​​are slowly updated through a weighted fusion method; when the system does not detect a true zero-point state, the current zero-point reference values ​​remain unchanged.

[0069] The process of acquiring the zero-point reference value is closely related to the determination of the true zero-point state. The MCU monitors in real time the statistical distribution characteristics (including minimum value and variance rate of change) of the formaldehyde, particulate matter, and volatile organic compound concentrations after individual calibration within a preset time period, as well as auxiliary environmental parameters (such as fan speed, door and window status, and historical air quality records), dynamically determining whether the current state is at the true zero point. If the state is determined to be at the true zero point, the MCU acquires historical zero-point reference values, performs weighted fusion of the current sensor data and historical zero-point reference values ​​to obtain an updated zero-point reference value, and writes it to Flash. If the state is determined not to be at the true zero point, the MCU directly acquires the current zero-point reference value as the benchmark for this drift correction. The zero-point reference value can adaptively track the zero-point drift trend caused by long-term use, material aging, or environmental stress of the sensor, ensuring slow updates in clean air environments and stability in polluted environments, thereby providing an accurate and reliable benchmark for subsequent zero-point compensation.

[0070] Sub-step S42 involves subtracting the corresponding zero-point reference value from the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value, respectively.

[0071] In this embodiment of the invention, the microcontroller unit (MCU) performs a zero-point compensation operation, applying the determined zero-point reference value to the individually calibrated sensor data to obtain drift-corrected formaldehyde, particulate matter, and volatile organic compound (VOC) concentration values. The currently valid zero-point reference value (which may be an updated value or a previously stored, unupdated value) is read from non-volatile memory (Flash memory) and subtracted from each of the three sensor data sets. This compensation operation is applicable to formaldehyde, particulate matter, and VOC concentration values, with each sensor independently using its corresponding zero-point reference value for subtraction. Zero-point compensation effectively eliminates zero-point drift errors caused by long-term use, material aging, or environmental stress, ensuring accurate and stable measurement values ​​throughout the device's lifespan and providing a reliable data foundation for subsequent air quality assessment.

[0072] In some embodiments, before performing step S42, step 206 may further include the following sub-steps: Sub-step S51: Determine whether there is any sensor data among the formaldehyde value, the particulate matter concentration value and the volatile organic compound concentration value that meets the zero-point reference value update conditions. In this embodiment of the invention, the microcontroller unit (MCU) performs a true zero-point state determination on the individually calibrated formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value to determine whether there is sensor data that meets the zero-point reference value update conditions. The statistical distribution characteristics of the individually calibrated sensor data are monitored within a preset time window (e.g., 30 minutes), while auxiliary environmental parameters are collected simultaneously. Based on the above monitoring data, the MCU dynamically constructs a reliable zero-point interval, which is dynamically adjusted according to the current environmental conditions (e.g., temperature, humidity, equipment operating status).

[0073] The system evaluates three types of sensor data separately: first, whether the sensor data within a preset time window remains continuously within the reliable zero-point interval; second, whether the duration of continuous data falling within the reliable zero-point interval reaches a preset threshold (e.g., 30 minutes) to eliminate interference from instantaneous fluctuations or brief low values; and third, whether the variance of the sensor data within this duration is less than a preset variance threshold to ensure stable readings and eliminate non-steady-state low values ​​caused by airflow disturbances, sensor noise, etc. When all three sensor data simultaneously meet the above three conditions, the MCU determines that there is sensor data that meets the zero-point reference value update conditions, i.e., the current state is true zero (clean air environment). If any sensor data does not meet any condition, it determines that there is no sensor data that meets the update conditions, and the current state is not true zero. This effectively prevents problems such as being misjudged as clean air in low-concentration pollution environments, being misjudged as a stable zero point during instantaneous interference, and being misjudged as a true zero point during sensor noise fluctuations. It ensures that the zero-point reference value update is only performed under truly clean and stable environmental conditions, providing a reliable and accurate benchmark for subsequent drift correction.

[0074] In some embodiments, step S51 may include the following sub-steps: Sub-step S511: Monitor the distribution characteristics of the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value, as well as auxiliary environmental parameters, within a preset time period; Sub-step S512: Based on the distribution characteristics and the auxiliary environmental parameters, construct a reliable zero-point interval corresponding to the formaldehyde value, particulate matter concentration value and volatile organic compound concentration value; Sub-step S513: Sensing data that continuously fall within the corresponding trusted zero-point interval and meet the preset duration condition are determined as sensing data that meet the zero-point reference value update condition.

[0075] In this embodiment of the invention, the MCU maintains a preset time window (e.g., 30 minutes) for each type of sensor. Within this window, it continuously collects individual calibrated sensor data and calculates its statistical distribution characteristics, including the minimum value, rate of change of variance, mean, and standard deviation. The minimum value is used to determine whether the reading is in a low-value range; the rate of change of variance is used to assess the stability of the data, reflecting the presence of interference factors such as airflow disturbances or sensor noise. Simultaneously, auxiliary environmental parameters are collected, including fan speed (reflecting the equipment's operating status; high speeds easily generate airflow disturbances), door and window status (obtained through door magnetic sensors or user input, reflecting indoor and outdoor air exchange), and historical air quality records (recent air quality change trends stored in Flash memory). For example, when the fan is at high speed, sensor data is easily affected by airflow disturbances, causing fluctuations; even if the reading is low, the system will make a cautious judgment. When doors and windows are open, outdoor air may introduce interference, similarly affecting the accuracy of the judgment.

[0076] Based on the statistical distribution characteristics obtained from monitoring and auxiliary environmental parameters, a reliable zero-point interval is dynamically constructed for each type of sensor. The reliable zero-point interval characterizes the range of sensor readings that can be judged as a zero-point state under the current environmental conditions. The upper threshold of the reliable zero-point interval is dynamically adjusted according to the current environmental conditions. Auxiliary environmental parameters are also used to construct the interval. When the fan speed is high, the system appropriately widens the upper limit of the interval to tolerate minor fluctuations caused by airflow disturbances; when doors and windows are open, the interval construction is more conservative to avoid misjudging outdoor pollution as zero. Through this dynamic construction mechanism, the reliable zero-point interval can adapt to different environmental scenarios, ensuring accurate determination of the true zero-point state in a clean environment while avoiding frequent calibration failures due to an excessively narrow interval in complex environments.

[0077] Based on the constructed reliable zero-point intervals, the continuity and duration of the three types of sensor data are determined to identify whether any sensor data meets the zero-point reference value update conditions. The system monitors whether the calibrated formaldehyde, particulate matter, and volatile organic compound concentrations continuously fall within their respective reliable zero-point intervals; that is, each sampled value within the window is lower than or equal to the upper limit of the sensor's reliable zero-point interval. When data from a particular sensor continuously falls within a reliable zero-point interval, a timer is started to record the duration, and the data variance within that time period is simultaneously monitored. When the duration of continuous fall within the reliable zero-point interval reaches a preset threshold (e.g., 30 minutes), and the data variance within that duration is less than a preset variance threshold (indicating stable data with no abnormal fluctuations), the sensor data is determined to meet the zero-point reference value update conditions. This ensures that zero-point reference value updates are triggered only under truly clean and stable environmental conditions, effectively preventing erroneous updates of the zero-point reference value under non-true zero-point conditions such as low-concentration pollution environments, transient interference, or sensor noise, providing an accurate and reliable benchmark for subsequent drift correction.

[0078] In sub-step S52, if there is sensing data that satisfies the zero-point reference value update condition, the sensing data and the corresponding zero-point reference value are weighted and fused to obtain the updated zero-point reference value.

[0079] In this embodiment of the invention, when it is determined that there is sensor data that meets the conditions for updating the zero-point reference value, the microcontroller unit (MCU) performs a zero-point reference value update operation. The currently stored zero-point reference value, representing the zero-point state identified by the sensor at the current stage, is read from non-volatile memory (Flash). Subsequently, the individual-calibrated sensor data at the current moment (i.e., real-time readings acquired under true zero-point conditions) is weighted and fused with historical zero-point reference values, and a first-order low-pass filter is used to achieve a slow update.

[0080] Through this slow update mechanism, the zero-point reference value can adaptively track the zero-point drift trend caused by long-term use, material aging, or environmental stress. The updated zero-point reference value is written back to non-volatile memory (Flash) to ensure that the latest baseline value can still be used after the device is powered off and restarted. This weighted fusion mechanism ensures both the accuracy and smoothness of the zero-point reference value update, achieving adaptive and highly reliable suppression of sensor zero-point drift.

[0081] Step 207: Determine the air quality based on the formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value after drift correction.

[0082] In this embodiment of the invention, after completing the aforementioned environmental compensation, individual calibration, and drift correction data processing, the microcontroller unit (MCU) converts the drift-corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value into a unified physical quantity unit and outputs them. After completing the standardized output of the physical quantity unit, according to national and enterprise standards, the drift-corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value are mapped to the corresponding air quality index (AQI) level and presented to the user through the display interface.

[0083] Reference Figure 5 This diagram illustrates a data processing flow of an air purifier according to an embodiment of the present invention. The device first collects data from various sensors, including temperature, humidity, formaldehyde level, particulate matter concentration, and volatile organic compound (VOC) concentration. The collected data undergoes a preprocessing stage, where it is smoothed using a moving average window and subjected to jump threshold detection to remove abnormal pulse interference. Subsequently, the preprocessed data is input into a trained parameter compensation model for environmental compensation, outputting the compensated formaldehyde and particulate matter concentrations. After environmental compensation, the device enters an individual calibration stage, where the compensated formaldehyde, particulate matter, and VOC concentrations are corrected based on the device's uniquely bound calibration coefficients to eliminate individual deviations caused by manufacturing tolerances and assembly differences. Next, it determines whether sensor values ​​have drifted: if no drift has occurred, the value is directly output; if drift has occurred, it further determines whether the environment is stable (i.e., whether it is in a true zero-point state). When the environment is stable, drift correction is performed, updating the zero-point reference value and performing zero-point compensation using a dynamic baseline tracking algorithm; when the environment is unstable, delayed correction is performed, waiting for the environment to stabilize before performing drift correction. The final output is standardized sensor data after drift correction, used to determine the air quality index level. This process achieves high consistency, high stability, and high reliability of sensor data output through multi-stage cascaded processing of preprocessing, environmental compensation, individual calibration, and drift correction.

[0084] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0085] Reference Figure 6 The diagram illustrates a structural block diagram of a data processing device for an air purifier according to an embodiment of the present invention. The air purifier includes various types of sensors, and the device specifically includes the following modules: The sensor data acquisition module 301 is used to acquire various sensor data collected by the various types of sensors; the various sensor data include temperature, humidity, formaldehyde value, particulate matter concentration value and volatile organic compound concentration value; The sensor data compensation module 302 is used to perform environmental compensation on the formaldehyde value and the particulate matter concentration value based on the temperature and the humidity, so as to obtain the compensated formaldehyde value and the compensated particulate matter concentration value. The sensor data correction module 303 is used to correct the compensated formaldehyde value, the compensated particulate matter concentration value and the volatile organic compound concentration value based on the corresponding pre-calibrated correction coefficients. The data drift correction module 304 is used to perform drift correction processing based on the corrected formaldehyde value, particulate matter concentration value and volatile organic compound concentration value within a preset time period, respectively. The air quality determination module 305 is used to determine the air quality based on the formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value after drift correction processing.

[0086] In some embodiments, the sensor data correction module 303 includes: The linear data correction submodule is used to perform linear transformation on the compensated formaldehyde value and the compensated particulate matter concentration value based on the pre-calibrated correction coefficients corresponding to the formaldehyde value and the particulate matter concentration value, respectively.

[0087] Optionally, the sensor data correction module 303 further includes: The nonlinear data correction submodule is used to perform multi-segment linear fitting on the volatile organic compound concentration value based on the pre-calibrated correction coefficients corresponding to the volatile organic compound concentration value.

[0088] In some embodiments, the apparatus further includes: The data smoothing module is used to smooth the formaldehyde value, the particulate matter concentration value, and the volatile organic compound concentration value through a moving average window; the length of the moving average window is determined according to the signal-noise characteristics of different sensors. The abnormal data removal module is used to perform jump threshold detection on the smoothed formaldehyde value, particulate matter concentration value and volatile organic compound concentration value in order to remove abnormal data.

[0089] In some embodiments, the sensor data compensation module 302 includes: The target compensation model determination submodule is used to determine a target parameter compensation model from a set of preset parameter compensation models based on the temperature and humidity; the set of preset parameter compensation models correspond to different environmental scenarios. The compensation data determination submodule is used to input the formaldehyde value, the particulate matter concentration value, the temperature and the humidity into the target parameter compensation model, and output the compensated formaldehyde value and the compensated particulate matter concentration value.

[0090] In some embodiments, the data drift correction module 304 includes: The zero-point reference value determination submodule is used to obtain the zero-point reference values ​​corresponding to the formaldehyde value, the particulate matter concentration value, and the volatile organic compound concentration value; The drift correction processing submodule is used to subtract the corresponding zero-point reference value from the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value, respectively.

[0091] In some embodiments, the data drift correction module 304 further includes: The update condition judgment submodule is used to determine whether there is any sensor data that satisfies the zero-point reference value update condition among the formaldehyde value, particulate matter concentration value and volatile organic compound concentration value before subtracting the corresponding zero-point reference value from the corrected formaldehyde value, particulate matter concentration value and volatile organic compound concentration value respectively. The zero-point reference value update submodule is used to perform weighted fusion of the sensor data and the corresponding zero-point reference value if there is sensor data that meets the zero-point reference value update conditions, so as to obtain the updated zero-point reference value.

[0092] In some embodiments, the update condition judgment submodule includes: The feature parameter monitoring unit is used to monitor the distribution characteristics of the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value, as well as auxiliary environmental parameters, within a preset time period. The zero-point interval construction unit is used to construct a reliable zero-point interval corresponding to the formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value based on the distribution characteristics and the auxiliary environmental parameters. The update condition determination unit is used to determine the sensor data that continuously falls within the corresponding trusted zero-point interval and meets the preset duration condition as sensor data that meets the zero-point reference value update condition.

[0093] As the apparatus embodiment is basically similar to the method embodiment, it is described in a relatively simple manner. For relevant details, please refer to the description of the method embodiment.

[0094] This invention also provides an air purifier, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the data processing method embodiment of the air purifier described above and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0095] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the data processing method embodiment of the air purifier described above and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0096] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0097] Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present invention is not limited to performing functions in the order shown or discussed. It may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0099] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

Claims

1. A data processing method for an air purifier, characterized in that, The air purifier includes various types of sensors, and the method includes: The system acquires various types of sensor data, including temperature, humidity, formaldehyde level, particulate matter concentration, and volatile organic compound concentration. Based on the temperature and humidity, environmental compensation is performed on the formaldehyde value and the particulate matter concentration value to obtain the compensated formaldehyde value and the compensated particulate matter concentration value. The compensated formaldehyde value, compensated particulate matter concentration value, and volatile organic compound concentration value are respectively corrected based on the corresponding pre-calibrated correction coefficients; Drift correction was performed based on the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value within a preset time period. Air quality is determined based on the formaldehyde, particulate matter, and volatile organic compound concentrations after drift correction.

2. The data processing method for an air purifier according to claim 1, characterized in that, The compensated formaldehyde value, compensated particulate matter concentration value, and volatile organic compound concentration value are corrected based on corresponding pre-calibrated correction coefficients, including: Based on the pre-calibrated correction coefficients corresponding to the formaldehyde value and the particulate matter concentration value, respectively, a linear transformation is performed on the compensated formaldehyde value and the compensated particulate matter concentration value.

3. The data processing method for an air purifier according to claim 1, characterized in that, The step of correcting the compensated formaldehyde value, the compensated particulate matter concentration value, and the volatile organic compound concentration value based on corresponding pre-calibrated correction coefficients also includes: Based on the pre-calibrated correction coefficients corresponding to the volatile organic compound concentration values, multi-segment linear fitting is performed on the volatile organic compound concentration values.

4. The data processing method for an air purifier according to claim 1, characterized in that, Before performing environmental compensation on the formaldehyde value and the particulate matter concentration value, the method further includes: The formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value are smoothed using a moving average window; the length of the moving average window is determined based on the signal-noise characteristics of different sensors. The formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value after smoothing were subjected to jump threshold detection to eliminate abnormal data.

5. The data processing method for an air purifier according to claim 1, characterized in that, The step of performing environmental compensation on the formaldehyde value and the particulate matter concentration value based on the temperature and humidity to obtain the compensated formaldehyde value and the compensated particulate matter concentration value includes: Based on the temperature and humidity, a target parameter compensation model is determined from a set of preset parameter compensation models; the set of preset parameter compensation models correspond to different environmental scenarios. The formaldehyde value, particulate matter concentration value, temperature, and humidity are input into the target parameter compensation model, and the compensated formaldehyde value and the compensated particulate matter concentration value are output.

6. The data processing method for an air purifier according to claim 1, characterized in that, The drift correction process, which involves adjusting the formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value based on the corrected values ​​within a preset time period, includes: Obtain the zero-point reference values ​​corresponding to the formaldehyde value, the particulate matter concentration value, and the volatile organic compound concentration value; Subtract the corresponding zero-point reference value from the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value, respectively.

7. The data processing method for an air purifier according to claim 6, characterized in that, The drift correction process, which involves adjusting the formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value based on the corrected values ​​within a preset time period, further includes: Before subtracting the corresponding zero-point reference value from the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value, it is determined whether there is any sensor data among the formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value that meets the zero-point reference value update conditions. If there is sensor data that meets the conditions for updating the zero-point reference value, then the sensor data and the corresponding zero-point reference value are weighted and fused to obtain the updated zero-point reference value.

8. The data processing method for an air purifier according to claim 7, characterized in that, The determination of whether there is sensor data among the formaldehyde value, the particulate matter concentration value, and the volatile organic compound concentration value that meets the zero-point reference value update conditions includes: The distribution characteristics of the corrected formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value, as well as auxiliary environmental parameters, are monitored within a preset time period. Based on the distribution characteristics and the auxiliary environmental parameters, a reliable zero-point interval is constructed corresponding to the formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value. Sensing data that continuously fall within the corresponding trusted zero-point interval and meet the preset duration condition are determined as sensing data that meet the zero-point reference value update condition.

9. A data processing device for an air purifier, characterized in that, The air purifier includes various types of sensors, and the device includes: The sensor data acquisition module is used to acquire various sensor data collected by the various types of sensors; the various sensor data include temperature, humidity, formaldehyde value, particulate matter concentration value and volatile organic compound concentration value; The sensor data compensation module is used to perform environmental compensation on the formaldehyde value and the particulate matter concentration value based on the temperature and the humidity, so as to obtain the compensated formaldehyde value and the compensated particulate matter concentration value. The sensor data correction module is used to correct the compensated formaldehyde value, the compensated particulate matter concentration value, and the volatile organic compound concentration value based on the corresponding pre-calibrated correction coefficients. The data drift correction module is used to perform drift correction processing based on the corrected formaldehyde value, particulate matter concentration value and volatile organic compound concentration value within a preset time period; The air quality determination module is used to determine air quality based on the formaldehyde value, particulate matter concentration value, and volatile organic compound concentration value after drift correction processing.

10. An air purifier, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the data processing method for an air purifier as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the data processing method for the air purifier as described in any one of claims 1-8.