Methods and apparatus for predicting air quality levels, electronic devices, storage media

CN117890528BActive Publication Date: 2026-08-14QINGDAO HAIER SMART TECH R & D CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-08
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0005]相关技术虽然能够预测室内空气质量,但没有充分挖掘时间序列之间因果关系,仅仅对比当前采样数据与历史数据,在应用场景发生变化的情况下容易导致预测准确度较差,甚至出现趋势性错误

Benefits of technology

[0019]本公开实施例提供的用于预测空气质量等级的方法及装置、电子设备、存储介质,可以实现以下技术效果:通过获取室内空气质量参数对应的输入数据序列。确定室内空气质量参数对应的第一预测模型和第二预测模型。根据第一预测模型利用输入数据序列进行长时预测,获得第一预测结果,第一预测结果用于表征对第一预设时长内的室内空气质量参数的预测结果。根据第二预测模型利用第一预测结果进行短时预测,获得第二预测结果。第二预测结果用于表征对第二预设时长内的室内空气质量参数的预测结果,第一预设时长大于第二预设时长。将第一预测结果与第二预测结果进行数据融合,获得预测矩阵。将预测矩阵输入到预设的分类模型进行分类,获得空气质量等级。这样,通过将第一预测模型的第一预测结果和第二预测模型的第二预测结果进行数据融合,实现了长时预测与短时预测相结合。这样能够提高预测室内空气质量的准确度,从而在利用预测获得的室内空气质量来预测室内空气质量等级时准确度更高。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117890528B_ABST
    Figure CN117890528B_ABST
Patent Text Reader

Abstract

This application relates to the field of air quality prediction technology, and discloses a method for predicting air quality levels, comprising: acquiring an input data sequence corresponding to indoor air quality parameters; determining a first prediction model and a second prediction model corresponding to the indoor air quality parameters; performing long-term prediction using the input data sequence based on the first prediction model to obtain a first prediction result; performing short-term prediction using the first prediction result based on the second prediction model to obtain a second prediction result; fusing the first prediction result and the second prediction result to obtain a prediction matrix; and inputting the prediction matrix into a preset classification model for classification to obtain an air quality level. This improves the accuracy of indoor air quality prediction, thereby improving the accuracy of predicting indoor air quality levels using the predicted indoor air quality. This application also discloses an apparatus, electronic device, and storage medium for predicting air quality levels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of air quality prediction technology, such as a method and apparatus, electronic device, and storage medium for predicting air quality levels. Background Technology

[0002] Currently, people spend a significant amount of time indoors, making the monitoring and regulation of indoor air quality crucial for their health. Research on air quality prediction began relatively early, initially using indoor pollutant concentrations combined with statistical or numerical analysis models to predict air quality over a future period. The predicted indoor air quality was then used to forecast indoor air quality levels. However, the sources of pollutants affecting indoor air quality are numerous and their formation mechanisms are complex. Predicting indoor air quality using simple mathematical models results in significant errors, limiting its application.

[0003] To address the need for predicting indoor air quality, a method for predicting indoor air quality has been disclosed. This method includes: selecting a historical time-series change model from among many historical time-series change models learned by using a large number of historical time-series measurement results (including those from a detection site or other detection sites) as historical time-series learning values; selecting a historical time-series change model that satisfies preset conditions among a set of multiple time-series detection values ​​of a detection object continuously detected by a sensor unit located in the detection area within a specified time period; and inferring a predicted value for a future period based on the selected historical time-series change model.

[0004] In the process of implementing the embodiments of this disclosure, at least the following problems were found in the related art:

[0005] While related technologies can predict indoor air quality, they do not fully explore the causal relationships between time series data. Simply comparing current sampling data with historical data can easily lead to poor prediction accuracy, or even trend errors, when the application scenario changes. This results in poor prediction accuracy when using indoor air quality to forecast air quality levels.

[0006] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0007] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments, but rather as a prelude to the detailed description that follows.

[0008] This disclosure provides a method, apparatus, electronic device, and storage medium for predicting air quality levels, which can improve the accuracy of air quality level prediction.

[0009] In some embodiments, the method for predicting air quality levels includes: acquiring an input data sequence corresponding to indoor air quality parameters. The input data sequence stores multiple indoor air quality parameters arranged in chronological order. A first prediction model and a second prediction model corresponding to the indoor air quality parameters are determined. A long-term prediction is performed using the input data sequence based on the first prediction model to obtain a first prediction result. The first prediction result characterizes the prediction result for indoor air quality parameters within a first preset time period. A short-term prediction is performed using the first prediction result based on the second prediction model to obtain a second prediction result. The second prediction result characterizes the prediction result for indoor air quality parameters within a second preset time period; the first preset time period is longer than the second preset time period. The first prediction result and the second prediction result are fused to obtain a prediction matrix. The prediction matrix is ​​input into a preset classification model for classification to obtain an air quality level.

[0010] In some embodiments, obtaining the input data sequence corresponding to indoor air quality parameters includes: collecting indoor air quality parameters of various preset types using a preset sensor array; cleaning the indoor air quality parameters of each preset type and storing the cleaned indoor air quality parameters according to each preset type; determining whether the number of data points for each preset type of indoor air quality parameter reaches a preset value; and determining that the input data sequence is obtained if the number of data points for each preset type of indoor air quality parameter reaches the preset value.

[0011] In some embodiments, determining the first prediction model and the second prediction model corresponding to the indoor air quality parameter includes: matching the first prediction model and the second prediction model corresponding to the indoor air quality parameter from a preset prediction model database. The prediction model database stores the correspondence between the indoor air quality parameter, the first prediction model, and the second prediction model.

[0012] In some embodiments, using the input data sequence to perform long-term prediction according to a preset first prediction model to obtain a first prediction result includes: inputting the input data sequence into the first prediction model to perform long-term prediction and obtain a first prediction result.

[0013] In some embodiments, using the first prediction result to perform short-term prediction according to the second prediction model to obtain a second prediction result includes: inputting the input data sequence and the first prediction result into the second prediction model to perform short-term prediction and obtain a second prediction result.

[0014] In some embodiments, fusing the first prediction result and the second prediction result to obtain a prediction matrix includes: sorting the first prediction result and the second prediction result in chronological order to obtain the prediction matrix.

[0015] In some embodiments, the apparatus for predicting air quality levels includes: an acquisition module configured to acquire an input data sequence corresponding to indoor air quality parameters. The input data sequence stores multiple indoor air quality parameters arranged in chronological order. A determination module configured to determine a first prediction model and a second prediction model corresponding to the indoor air quality parameters. A first prediction module configured to perform long-term prediction using the input data sequence based on the first prediction model to obtain a first prediction result. The first prediction result is used to characterize the prediction result of indoor air quality parameters within a first preset time period. A second prediction module configured to perform short-term prediction using the first prediction result based on the second prediction model to obtain a second prediction result. The second prediction result is used to characterize the prediction result of indoor air quality parameters within a second preset time period, where the first preset time period is longer than the second preset time period. A fusion module configured to fuse the first prediction result and the second prediction result to obtain a prediction matrix. A classification module configured to input the prediction matrix into a preset classification model for classification to obtain an air quality level.

[0016] In some embodiments, the apparatus for predicting air quality levels includes a processor and a memory storing program instructions, the processor being configured to execute the method for predicting air quality levels as described above when the program instructions are executed.

[0017] In some embodiments, the electronic device includes: an electronic device body; and the aforementioned device for predicting air quality levels is mounted on the electronic device body.

[0018] In some embodiments, the storage medium stores program instructions that, when executed, perform the method described above for predicting air quality levels.

[0019] The method, apparatus, electronic device, and storage medium for predicting air quality levels provided in this disclosure can achieve the following technical effects: By acquiring an input data sequence corresponding to indoor air quality parameters, a first prediction model and a second prediction model corresponding to the indoor air quality parameters are determined. Long-term prediction is performed using the input data sequence based on the first prediction model to obtain a first prediction result, which characterizes the prediction result for indoor air quality parameters within a first preset time period. Short-term prediction is performed using the first prediction result based on the second prediction model to obtain a second prediction result. The second prediction result characterizes the prediction result for indoor air quality parameters within a second preset time period, where the first preset time period is longer than the second preset time period. The first prediction result and the second prediction result are fused to obtain a prediction matrix. The prediction matrix is ​​input into a preset classification model for classification to obtain the air quality level. Thus, by fusing the first prediction result of the first prediction model and the second prediction result of the second prediction model, a combination of long-term and short-term predictions is achieved. This improves the accuracy of indoor air quality prediction, resulting in higher accuracy when using the predicted indoor air quality to predict indoor air quality levels.

[0020] The above general description and the description below are exemplary and illustrative only and are not intended to limit this application. Attached Figure Description

[0021] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations and drawings do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are shown as similar elements. The drawings are not to be scaled. And wherein:

[0022] Figure 1 This is a schematic diagram of a method for predicting air quality levels provided in an embodiment of this disclosure;

[0023] Figure 2 This is a schematic diagram of another method for predicting air quality levels provided in an embodiment of this disclosure;

[0024] Figure 3 This is a schematic diagram of another method for predicting air quality levels provided in an embodiment of this disclosure;

[0025] Figure 4 This is a schematic diagram of a device for predicting air quality levels provided in an embodiment of this disclosure;

[0026] Figure 5 This is a schematic diagram of another device for predicting air quality levels provided in an embodiment of this disclosure;

[0027] Figure 6This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure.

[0028] Figure label:

[0029] 1: Indoor air conditioner unit; 2: Memory; 3: Central processing unit; 4: Display interface; 5: Communication interface; 6: Sensor array; 7: Display terminal; 8: Home gateway; 100: Electronic device. Detailed Implementation

[0030] To provide a more detailed understanding of the features and technical content of the embodiments of this disclosure, the implementation of the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this disclosure. In the following technical description, for ease of explanation, several details are used to provide a full understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be simplified in their depiction to simplify the drawings.

[0031] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.

[0032] Unless otherwise stated, the term "multiple" means two or more.

[0033] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.

[0034] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.

[0035] The term "correspondence" can refer to an association or binding relationship. The correspondence between A and B means that there is an association or binding relationship between A and B.

[0036] Combination Figure 1 As shown in the embodiments of this disclosure, a method for predicting air quality levels is provided, the method comprising:

[0037] In step S101, the electronic device acquires the input data sequence corresponding to the indoor air quality parameters. The input data sequence stores multiple indoor air quality parameters arranged in chronological order.

[0038] In step S102, the electronic device determines the first prediction model and the second prediction model corresponding to the indoor air quality parameters.

[0039] In step S103, the electronic device performs long-term prediction using the input data sequence based on the first prediction model to obtain a first prediction result. The first prediction result is used to characterize the prediction results of indoor air quality parameters within a first preset time period. Optionally, the first preset time period is 3 minutes, 5 minutes, or 10 minutes.

[0040] In step S104, the electronic device performs a short-term prediction based on the first prediction result using the second prediction model to obtain a second prediction result. The second prediction result is used to characterize the prediction results of indoor air quality parameters within a second preset duration, where the first preset duration is longer than the second preset duration. Optionally, the second preset duration is 1 minute.

[0041] In step S105, the electronic device fuses the first prediction result with the second prediction result to obtain a prediction matrix.

[0042] In step S106, the electronic device inputs the prediction matrix into a preset classification model for classification to obtain the air quality level. The air quality level includes very comfortable, comfortable, fair, uncomfortable, or very uncomfortable.

[0043] The method for predicting air quality levels provided in this disclosure involves acquiring an input data sequence corresponding to indoor air quality parameters. A first prediction model and a second prediction model corresponding to the indoor air quality parameters are determined. Long-term prediction is performed using the input data sequence based on the first prediction model to obtain a first prediction result, which characterizes the prediction result for indoor air quality parameters within a first preset time period. Short-term prediction is performed using the first prediction result based on the second prediction model to obtain a second prediction result, which characterizes the prediction result for indoor air quality parameters within a second preset time period, where the first preset time period is longer than the second preset time period. The first and second prediction results are fused to obtain a prediction matrix. The prediction matrix is ​​then input into a preset classification model for classification to obtain the air quality level. Thus, by fusing the first prediction result of the first prediction model and the second prediction result of the second prediction model, a combination of long-term and short-term predictions is achieved. This improves the accuracy of indoor air quality prediction, thereby enhancing the accuracy of predicting indoor air quality levels using the predicted indoor air quality.

[0044] Furthermore, the electronic device acquires the input data sequence corresponding to the indoor air quality parameters, including: the electronic device uses a preset sensor array to collect indoor air quality parameters of various preset types; the indoor air quality parameters of each preset type are cleaned, and the cleaned indoor air quality parameters are stored separately according to each preset type; it is determined whether the number of data points for each preset type of indoor air quality parameter reaches a preset value; if the number of data points for each preset type of indoor air quality parameter reaches the preset value, the input data sequence is determined to be obtained. In this way, by collecting indoor air quality parameters of various preset types through the sensor array and performing data cleaning, outliers that do not meet the requirements can be deleted, facilitating indoor air quality prediction.

[0045] Optionally, the sensor array includes a temperature and humidity sensor, a CO2 carbon dioxide sensor, a TVOC (Total Volatile Organic Compounds) sensor, and a PM2.5 sensor. The temperature and humidity sensor is used to collect indoor temperature and humidity, the CO2 sensor is used to collect indoor CO2 concentration, the TVOC sensor is used to collect indoor TVOC concentration, and the PM2.5 sensor is used to collect indoor PM2.5 concentration.

[0046] Optionally, the preset indoor air quality parameters include one or more of temperature, humidity, CO2 concentration, TVOC concentration, or PM2.5 concentration.

[0047] Furthermore, the electronic device performs data cleaning on the preset type of indoor air quality parameters, including: the electronic device acquires the parameter threshold corresponding to the preset type of indoor air quality parameters; compares the collected preset type of indoor air quality parameters with the parameter threshold, and deletes indoor air quality parameters that exceed the parameter threshold.

[0048] Combination Figure 2 As shown in the embodiments of this disclosure, a method for predicting air quality levels is provided, the method comprising:

[0049] In step S201, the electronic device uses a preset sensor array to collect indoor air quality parameters of various preset types.

[0050] In step S202, the electronic device performs data cleaning on the indoor air quality parameters of each preset type.

[0051] In step S203, the electronic device stores the indoor air quality parameters after cleaning according to each preset type.

[0052] In step S204, the electronic device determines whether the number of data points for each preset type of indoor air quality parameter has reached a preset value. If the number of data points for each preset type of indoor air quality parameter has reached the preset value, step S205 is executed; or, if the number of data points for each preset type of indoor air quality parameter has not reached the preset value, step S201 is executed.

[0053] In step S205, the electronic device determines that it has obtained the input data sequence.

[0054] In step S206, the electronic device determines the first prediction model and the second prediction model corresponding to the indoor air quality parameters.

[0055] In step S207, the electronic device performs long-term prediction using the input data sequence based on the first prediction model to obtain a first prediction result. The first prediction result is used to characterize the prediction results of indoor air quality parameters within a first preset time period. Optionally, the first preset time period is 3 minutes, 5 minutes, or 10 minutes.

[0056] In step S208, the electronic device performs a short-term prediction based on the first prediction result using the second prediction model to obtain a second prediction result. The second prediction result is used to characterize the prediction results of indoor air quality parameters within a second preset duration, where the first preset duration is longer than the second preset duration. Optionally, the second preset duration is 1 minute.

[0057] In step S209, the electronic device fuses the first prediction result with the second prediction result to obtain a prediction matrix.

[0058] In step S210, the electronic device inputs the prediction matrix into a preset classification model for classification to obtain the air quality level. The air quality level includes very comfortable, comfortable, fair, uncomfortable, or very uncomfortable.

[0059] The method for predicting air quality levels provided in this disclosure combines long-term and short-term predictions by fusing the first prediction result of a first prediction model and the second prediction result of a second prediction model. This improves the accuracy of indoor air quality prediction, thereby enhancing the accuracy of predicting indoor air quality levels using the predicted indoor air quality. Simultaneously, by collecting various preset types of indoor air quality parameters through a sensor array and performing data cleaning, outliers that do not meet the requirements can be removed, facilitating indoor air quality prediction.

[0060] Furthermore, the electronic device determines the first and second prediction models corresponding to the indoor air quality parameters, including: the electronic device matching the first and second prediction models corresponding to the indoor air quality parameters from a preset prediction model database. The prediction model database stores the correspondence between the indoor air quality parameters, the first prediction model, and the second prediction model. Specifically, long-term prediction is performed using the first prediction model, which is a deep learning-based LSTM (Long Short-Term Memory) model, with prediction durations of 3 minutes, 5 minutes, or 10 minutes. Short-term prediction is performed using the second prediction model, which is a BP (Backpropagation) neural network model, with a prediction duration of 1 minute.

[0061] In some embodiments, the indoor air quality parameter includes temperature. A first prediction model corresponding to the indoor air quality parameter "temperature" is matched from a preset prediction model database. The second prediction model is a first LSTM model.

[0062] In some embodiments, the indoor air quality parameter includes humidity. A first prediction model corresponding to the indoor air quality parameter "humidity" is matched from a preset prediction model database. The second prediction model is a second LSTM model, and the second prediction model is a second BP neural network model.

[0063] In some embodiments, the indoor air quality parameter includes CO2 concentration. The first prediction model matched with the indoor air quality parameter "CO2 concentration" from a preset prediction model database is a third LSTM model, and the second prediction model is a third BP neural network model.

[0064] In some embodiments, the indoor air quality parameter includes TVOC concentration. The first prediction model matched with the indoor air quality parameter "TVOC concentration" from a preset prediction model database is the fourth LSTM model, and the second prediction model is the fourth BP neural network model.

[0065] In some embodiments, the indoor air quality parameter includes PM2.5 concentration. The first prediction model corresponding to the indoor air quality parameter "PM2.5 concentration" is the fifth LSTM model, and the second prediction model is the fifth BP neural network model, which are matched from a preset prediction model database.

[0066] In this way, because the variation patterns of indoor air quality parameters differ, the preset LSTM models are trained using sampling data of different preset types of indoor air quality parameters. Different model parameters are set for each preset type of indoor air quality parameter, resulting in five different first prediction models: the first LSTM model, the second LSTM model, the third LSTM model, the fourth LSTM model, and the fifth LSTM model. This improves the accuracy of indoor air quality prediction.

[0067] Furthermore, the electronic device performs long-term prediction using the input data sequence according to a preset first prediction model to obtain a first prediction result, including: the electronic device inputs the input data sequence into the first prediction model for long-term prediction to obtain a first prediction result.

[0068] Optionally, the first prediction model is obtained by: acquiring a first training data sequence, which includes multiple preset types of indoor air quality parameters; generating a first training input data matrix and first training output data, and determining the first model parameters and a first termination target; training a preset LSTM model using the first training input data matrix and the first training output data to obtain the first prediction model. The first model parameters include the mean squared error or the number of iterations, etc. The first termination target includes a mean squared error less than a preset value or the number of iterations reaching a preset number. In some embodiments, the preset value is 0.0001, and the number of iterations is 10,000.

[0069] In some embodiments, the first model parameter is a user-preset value, and the first ending target is a user-preset value.

[0070] In some embodiments, the first training data sequence includes n CO2 concentrations arranged in chronological order, for example: X0, X1, ..., X... n The first training input data matrix generated is The first training output data is [X] n+1 ,X n+2 ,...,X m+1 After determining the first model parameters and the first termination target, the preset LSTM model is trained using the first training input data matrix and the first training output data to obtain the first prediction model.

[0071] In some embodiments, the electronic device will input a data sequence [X0, X1, ..., X...] n The first prediction model is input for long-term prediction, and the first prediction result is X. n+1 The electronic device will input the data sequence [X1, X2, ..., X...]. n+1 The first prediction model is input for long-term prediction, and the first prediction result is X.n+2 The electronic device will input a data sequence [X] m-n ,X m-n+1 ,...,X m The first prediction model is input for long-term prediction, and the first prediction result is X. m+1 .

[0072] Optionally, after obtaining a first prediction result by performing long-term prediction using the input data sequence based on a preset first prediction model, the electronic device further includes: collecting indoor air quality parameters within a first preset time period to obtain actual data; obtaining an input variable based on the actual data and the first prediction result; and updating the input data sequence using this input variable. The first preset time period is 3 minutes.

[0073] Furthermore, the electronic device obtains input variables based on actual data and the first prediction result, including: the electronic device executes the program statement temp2(i) = α i ×Y(i)+(1-α i )X m+1+i Obtain the input variables. Here, temp2(i) is the input variable, and α... i Let Y(i) be the first prediction result, and X be the preset weight. m+1+i This represents the actual data. i is a positive integer.

[0074] Furthermore, the electronic device uses this input variable to update the input data sequence, including: the electronic device executes the program statement temp1(i++) = (X... m-n+2 +X m-n+3 The input variables are updated using the formula +...+temp2(i)).

[0075] In some embodiments, the electronic device inputs an input data sequence into a first prediction model, initializes the input data sequence, and obtains the initialized input variable temp1(i) = (X... m-n+1 ,X m-n+2 ,...,X m+1 ), set temp1(i) = (X m-n+1 ,X m-n+2 ,...,X m+1 The first prediction result is Y(i) = model(temp1(i)). Indoor air quality parameters are collected over a first preset time period to obtain actual data X. m+1+i The electronic device executes the program statement temp2(i) = α i ×Y(i)+(1-α i )X m+1+i Obtain the input variables. Here, temp2(i) is the input variable, and α...i Let Y(i) be the first prediction result, and X be the preset weight. m+1+i This is actual data. The electronic device executes the program statement temp1(i++) = (X... m-n+2 +X m-n+3 The input variables are updated using the formula +...+temp2(i)).

[0076] Furthermore, the electronic device performs short-term prediction based on the first prediction result using the second prediction model to obtain the second prediction result, including: the electronic device inputs the input data sequence and the first prediction result into the second prediction model to perform short-term prediction and obtain the second prediction result.

[0077] Furthermore, the electronic device inputs the input data sequence and the first prediction result into the second prediction model for short-term prediction to obtain the second prediction result, including: the electronic device determines the last sorted data in the input data sequence and the first prediction result as the input variables of the second prediction model, inputs the input variables into the second prediction model, and obtains the second prediction result.

[0078] In some embodiments, the electronic device will input a data sequence [X0, X1, ..., X...] n ] and the first prediction result X n+1 In the second prediction model, the input data sequence [X0,X1,...,X] is used. n Sort the last data X n And the first prediction result X n+1 The input variable for the second prediction model is determined as temp(i) = (X). n ,X n+1 ). Let temp(i) = (X n ,X n+1 The input is given to the second prediction model, and the second prediction result is Y(i) = net(temp(i)). Optionally, after the first prediction model performs the second prediction, the first prediction result is obtained as X. n+2 The input variables of the second prediction model are updated to obtain temp(i+1) = (X). n+1 ,X n+2 ).

[0079] Optionally, the second prediction model is obtained by: acquiring a second training data sequence, which includes first prediction results from multiple first prediction models; generating a second training input data matrix and second training output data, and determining the second model parameters and a second termination objective; training a preset BP neural network model using the second training input data matrix and the second training output data to obtain the second prediction model. The second model parameters include mean squared error or the number of iterations. The second termination objective includes a mean squared error less than a preset value or the number of iterations reaching a preset number. In some embodiments, the preset value is 0.0001, and the number of iterations is 10,000.

[0080] In some embodiments, the second model parameter is a user-preset value, and the second end target is a user-preset value.

[0081] In some embodiments, the second training data sequence includes several predicted CO2 concentration values ​​arranged in chronological order, such as: Y0, Y1, ..., Y... n The generated second training input data matrix is The second training output data is Among them, Y 01 Y 02 Y 03 For data values ​​greater than Y0 and less than Y1, Y 21 Y 22 Y 23 For data values ​​greater than Y2 and less than Y3, Y (n-1)1 Y (n-1)2 Y (n-1)3 For greater than Y (n-1) And less than Y n The data values ​​between. After determining the second model parameters and the second termination target, the preset BP neural network model is trained using the second training input data matrix and the second training output data to obtain the second prediction model.

[0082] Furthermore, the electronic device fuses the first prediction result and the second prediction result to obtain a prediction matrix, including: the electronic device sorts the first prediction result and the second prediction result in chronological order to obtain the prediction matrix.

[0083] In some embodiments, the first prediction model is used to process the input data sequence [X0,X1,...,X]. n The first prediction result obtained is X. n+1 Using the second prediction model for X n and X n+1 Interpolation is performed between them to obtain the second prediction result Y. 11 Y 12 Y13 The first and second prediction results are sorted according to their chronological order to obtain the prediction matrix [Y]. 11 ,Y 12 ,Y 13 ,X n+1 ].

[0084] Optionally, the electronic device inputs the prediction matrix into a preset classification model for classification to obtain the air quality level. This includes: the electronic device inputs the prediction matrices corresponding to the indoor air quality parameters of each preset type into the preset classification model to obtain the air quality level. The air quality level includes very comfortable, comfortable, moderate, uncomfortable, or very uncomfortable. The preset classification model is a decision tree classification model. Thus, classifying the air quality level using a decision tree classification model can improve classification accuracy.

[0085] Optionally, the preset classification model is obtained by constructing a decision tree, dividing it layer by layer from top to bottom according to the classification attributes of the decision tree. The classification model is obtained when the leaf nodes are reached. The classification attributes of the decision tree are the types of indoor air quality parameters, namely temperature, humidity, CO2 concentration, TVOC concentration, and PM2.5 concentration.

[0086] In some embodiments, multiple experimental data points and their corresponding air quality levels are obtained. The experimental data includes indoor air quality parameters for each preset type. The entropy value corresponding to each preset type is obtained, and the preset type with the smallest entropy value is determined as the root node. Excluding the preset type corresponding to the root node, the entropy values ​​corresponding to the remaining preset types are obtained, and the preset type with the smallest entropy value is determined as the leaf node. Using this leaf node as the root node, the remaining preset types are traversed until all leaf nodes are determined. In this way, since the experimental data is human perception experimental data, the classification results obtained by the trained classification model are consistent with human perception, thus improving classification accuracy.

[0087] In some embodiments, the experimental data and their corresponding air quality levels are shown in Table 1.

[0088]

[0089] Table 1

[0090] In some embodiments, as shown in Table 1, the experimental data in Table 1 are: temperature 10℃, humidity 60%, CO2 concentration 500ppm, TVOC concentration 350ppm, PM2.5 concentration 60ppm, corresponding to an air quality level of "very uncomfortable". The experimental data are: temperature 25℃, humidity 55%, CO2 concentration 380ppm, TVOC concentration 280ppm, PM2.5 concentration 36ppm, corresponding to an air quality level of "comfortable".

[0091] Optionally, the preset classification model is obtained by: acquiring multiple sample training data and corresponding sample labels for each sample training data, whereby the sample labels characterize the air quality level corresponding to the sample training data. The sample training data with sample labels is then input into a preset neural network model for training to obtain the classification model. The sample training data includes indoor air quality parameters for each preset type.

[0092] Combination Figure 3 As shown, this disclosure provides an application diagram for predicting air quality levels. Figure 3 The indoor unit 1 of the air conditioner is equipped with a memory 2, a central processing unit 3, a display interface 4, a communication interface 5, and a sensor array 6. The sensor array 6 collects indoor air quality parameters and sends them to the central processing unit 3. The central processing unit 3 then sends the indoor air quality parameters to the home gateway 8 via the communication interface 5. The home gateway 8 transmits the data to the electronic device 100 for air quality level prediction. After predicting the air quality level, the electronic device 100 feeds the prediction result back to the home gateway 8 and sends it to the central processing unit 3 via the communication interface 5 of the indoor unit 1. The central processing unit 3 then sends the data to the memory 2 for storage and to the display terminal 7 via the display interface 4 for display. Simultaneously, the electronic device 100 stores the prediction result and the received indoor air quality parameters after predicting the air quality level.

[0093] Combination Figure 4As shown in the figure, this disclosure provides an apparatus 200 for predicting air quality levels. The apparatus includes: an acquisition module 401, a determination module 402, a first prediction module 403, a second prediction module 404, a fusion module 405, and a classification module 406. The acquisition module 401 is configured to acquire an input data sequence corresponding to indoor air quality parameters and send the input data sequence to the determination module and the first prediction module. The input data sequence stores multiple indoor air quality parameters arranged in chronological order. The determination module 402 is configured to receive the input data sequence sent by the acquisition module, determine a first prediction model and a second prediction model corresponding to the indoor air quality parameters, and send the first prediction model and the second prediction model to the second prediction module. The first prediction module 403 is configured to receive the input data sequence sent by the acquisition module and the first prediction model sent by the determination module. Based on the first prediction model, it performs long-term prediction using the input data sequence to obtain a first prediction result and sends the first prediction result to the second prediction module and the fusion module. The second prediction module 404 is configured to receive the first prediction result sent by the first prediction module, perform a short-term prediction based on the first prediction result using the second prediction model, and obtain a second prediction result. The second prediction result is then sent to the fusion module. The fusion module 405 is configured to receive the first prediction result sent by the first prediction module and the second prediction result sent by the second prediction module. The first and second prediction results are fused to obtain a prediction matrix. The prediction matrix is ​​then sent to the classification module. The classification module 406 is configured to receive the prediction matrix sent by the fusion module and input the prediction matrix into a preset classification model for classification to obtain the air quality level.

[0094] The apparatus for predicting air quality levels provided in this disclosure combines long-term and short-term predictions by fusing the first prediction result of a first prediction model and the second prediction result of a second prediction model. This improves the accuracy of indoor air quality prediction, thereby enhancing the accuracy of indoor air quality level prediction.

[0095] Furthermore, the acquisition module is configured to acquire the input data sequence corresponding to the indoor air quality parameters in the following manner: Collect indoor air quality parameters of various preset types using a preset sensor array; perform data cleaning on the indoor air quality parameters of each preset type, and store the cleaned indoor air quality parameters according to each preset type; determine whether the number of data points for each preset type of indoor air quality parameter reaches a preset value; if the number of data points for each preset type of indoor air quality parameter reaches the preset value, determine that the input data sequence has been obtained.

[0096] Furthermore, the determination module is configured to determine the first and second prediction models corresponding to the indoor air quality parameters by matching the first and second prediction models corresponding to the indoor air quality parameters from a preset prediction model database; the prediction model database stores the correspondence between the indoor air quality parameters, the first prediction model, and the second prediction model.

[0097] Furthermore, the first prediction module is configured to perform long-term prediction using the input data sequence according to a preset first prediction model to obtain a first prediction result: inputting the input data sequence into the first prediction model for long-term prediction to obtain a first prediction result.

[0098] Furthermore, the second prediction module is configured to perform short-term prediction based on the first prediction result using the second prediction model to obtain the second prediction result by inputting the input data sequence and the first prediction result into the second prediction model for short-term prediction.

[0099] Furthermore, the fusion module is configured to fuse the first prediction result and the second prediction result to obtain a prediction matrix by sorting the first prediction result and the second prediction result in chronological order.

[0100] Combination Figure 5 As shown, this disclosure provides an apparatus 300 for predicting air quality levels, including a processor 500 and a memory 501. Optionally, the apparatus 300 for predicting air quality levels may further include a communication interface 502 and a bus 503. The processor 500, communication interface 502, and memory 501 can communicate with each other via the bus 503. The communication interface 502 can be used for information transmission. The processor 500 can call logical instructions in the memory 501 to execute the method for predicting air quality levels described in the above embodiments.

[0101] The apparatus for predicting air quality levels provided in this disclosure combines long-term and short-term predictions by fusing the first prediction result of a first prediction model and the second prediction result of a second prediction model. This improves the accuracy of indoor air quality prediction, thereby enhancing the accuracy of predicting indoor air quality levels using the predicted indoor air quality.

[0102] Furthermore, the logic instructions in the aforementioned memory 501 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0103] The memory 501, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 500 executes functional applications and data processing by running the program instructions / modules stored in the memory 501, thereby implementing the method for predicting air quality levels described in the above embodiments.

[0104] The memory 501 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 501 may include high-speed random access memory and may also include non-volatile memory.

[0105] Combination Figure 6 As shown, this disclosure provides an electronic device 100, including: an electronic device body, and the aforementioned device 200 (300) for predicting air quality levels, wherein the device 200 (300) for predicting air quality levels is mounted on the electronic device body. The mounting relationship described herein is not limited to placement within the product, but also includes mounting connections with other components of the product, including but not limited to physical connections, electrical connections, or signal transmission connections. Those skilled in the art will understand that the device 200 (300) for predicting air quality levels can be adapted to feasible product bodies to achieve other feasible embodiments.

[0106] This disclosure provides a storage medium storing program instructions that, when executed, perform the method described above for predicting air quality levels.

[0107] This disclosure provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform the above-described method for predicting air quality levels.

[0108] The aforementioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0109] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned storage medium can be a non-transitory storage medium, including: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code; it can also be a transient storage medium.

[0110] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used in this application means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.

[0111] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0112] The methods and products (including but not limited to devices and equipment) disclosed in the embodiments herein can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units may be merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to implement this embodiment according to actual needs. Furthermore, the functional units in the embodiments of this disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0113] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

Claims

1. A method for predicting air quality levels, characterized in that, include: Obtain the input data sequence corresponding to the indoor air quality parameters; the input data sequence stores multiple indoor air quality parameters arranged in chronological order; Determine the first and second prediction models corresponding to the indoor air quality parameters; Based on the first prediction model, a long-term prediction is performed using the input data sequence to obtain a first prediction result; The first prediction result is used to characterize the prediction result of indoor air quality parameters within a first preset time period; The input data sequence and the first prediction result are input into the second prediction model for short-term prediction to obtain the second prediction result; The second prediction result is used to characterize the prediction results of indoor air quality parameters within a second preset time period; The first preset duration is greater than the second preset duration; The first prediction result and the second prediction result are fused to obtain a prediction matrix; The prediction matrix is ​​input into a preset classification model for classification to obtain the air quality level.

2. The method according to claim 1, characterized in that, Obtain the input data sequence corresponding to the indoor air quality parameters, including: Indoor air quality parameters of various preset types are collected using a preset sensor array; The indoor air quality parameters of each preset type are cleaned separately, and the cleaned indoor air quality parameters are stored separately according to each preset type. Determine whether the number of data points for each of the preset types of indoor air quality parameters reaches the preset value; When the number of data points for each of the preset types of indoor air quality parameters reaches a preset value, the input data sequence is determined.

3. The method according to claim 1, characterized in that, Determining the first and second prediction models corresponding to the indoor air quality parameters includes: The system matches the indoor air quality parameters with a first prediction model and a second prediction model from a preset prediction model database. The prediction model database stores the correspondence between the indoor air quality parameters, the first prediction model, and the second prediction model.

4. The method according to claim 1, characterized in that, Based on a preset first prediction model, long-term prediction is performed using the input data sequence to obtain a first prediction result, including: The input data sequence is input into the first prediction model for long-term prediction to obtain the first prediction result.

5. The method according to claim 1, characterized in that, The first prediction result and the second prediction result are fused to obtain a prediction matrix, including: The first and second prediction results are sorted in chronological order to obtain the prediction matrix.

6. A device for predicting air quality levels, characterized in that, include: The acquisition module is configured to acquire the input data sequence corresponding to indoor air quality parameters; The input data sequence stores multiple indoor air quality parameters arranged in chronological order. The determination module is configured to determine the first prediction model and the second prediction model corresponding to the indoor air quality parameters; The first prediction module is configured to perform long-term prediction using the input data sequence based on the first prediction model to obtain a first prediction result; the first prediction result is used to characterize the prediction result of indoor air quality parameters within a first preset time period. The second prediction module is configured to input the input data sequence and the first prediction result into the second prediction model for short-term prediction to obtain the second prediction result. The second prediction result is used to characterize the prediction results of indoor air quality parameters within a second preset time period; The first preset duration is greater than the second preset duration; The fusion module is configured to fuse the first prediction result with the second prediction result to obtain a prediction matrix; The classification module is configured to input the prediction matrix into a preset classification model for classification to obtain the air quality level.

7. A device for predicting air quality levels, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to, when running the program instructions, perform the method for predicting air quality levels as described in any one of claims 1 to 5.

8. An electronic device, characterized in that, include: The electronic device itself; The device for predicting air quality levels as described in claim 6 or 7 is mounted on the electronic device body.

9. A storage medium storing program instructions, characterized in that, When the program instructions are executed, they perform the method for predicting air quality levels as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • PM2.5 prediction method based on long and short term memory network

    CN113177672A

  • Classroom air quality prediction method based on BO-EMD-LSTM deep learning algorithm

    CN113762642A