Air quality detection method and system

By pre-processing and in-group exchange processing of air quality data, the problem of low accuracy in air quality detection in existing deep learning models is solved, achieving higher analysis accuracy and sensitivity to complex local trends.

CN117633450BActive Publication Date: 2025-04-11湖南工商大学
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311344541.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-17
Publication Date
2025-04-11
Estimated Expiration
2043-10-17

AI Technical Summary

Technical Problem

Existing deep learning models are difficult to effectively learn the complex dependencies within air quality data in air quality detection, resulting in insensitive to complex local trends and data fluctuations, and low accuracy.

Method used

By pre-processing the air quality data sequence, it is divided into the first sub-sequence and the second sub-sequence, and in-group exchange processing is performed, and recombination processing is performed using sequence characteristics to improve the effectiveness and accuracy of the data.

Benefits of technology

It improves the analysis accuracy of air quality data, enhances sensitivity to complex local trends, and improves the accuracy of air quality detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117633450B_ABST
    Figure CN117633450B_ABST
Patent Text Reader

Abstract

The present invention provides an air quality detection method and system, which relates to the field of air quality detection. The method includes: obtaining an air quality data sequence; preprocessing the air quality data sequence to obtain a first subsequence and a second subsequence; performing a first grouping calculation process on the first subsequence to determine a first target subsequence; performing a second grouping calculation process on the second subsequence to determine a second target subsequence; based on the sequence characteristics of the air quality data sequence, recombining the first target subsequence and the second target subsequence to obtain an air quality data result. The present application achieves the effect of improving the accuracy of air quality detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of air quality detection, and in particular to an air quality detection method and system. Background Art

[0002] Air pollution has become a serious and urgent problem due to industrialization or economic development, which not only poses a major threat to human health but also has an adverse impact on economic development and requires timely attention.

[0003] In recent years, researchers have used two main approaches to predict air quality: traditional techniques and deep learning methods. Traditional techniques can be further divided into physical models and statistical models.

[0004] Physical models make predictions based on physical and chemical processes in the atmosphere, and commonly use numerical simulation methods, such as the climate penalty factor calculation method proposed by Hembeck et al.

[0005] Statistical model methods study the statistical relationship between pollutant concentrations and meteorological data to predict air quality. For example, Taheri et al. proposed a machine learning model for CO2 dynamic prediction.

[0006] With the increase in available computing resources, deep learning has gained popularity as a data-driven technique.

[0007] However, in the existing deep learning models applied to air quality detection, air quality data has strong randomness and strong nonlinearity, and the air pollution sources are diverse and have great mutual influence, which makes air quality data have complex local trends and fuzzy internal dependencies, making air quality prediction very difficult. The current deep learning models are not sensitive to context and cannot learn the complex internal dependencies of air quality data well, resulting in the inability to effectively extract complex local trends, which in turn makes them insensitive to large fluctuations and sudden changes in air quality data.

[0008] In view of this, it is necessary to propose an air quality detection method and system to solve or at least alleviate the above defects. Summary of the invention

[0009] The main purpose of the present invention is to provide an air quality detection method and system to solve the problem of low air quality detection accuracy in the prior art.

[0010] To achieve the above object, the present invention provides an air quality detection method, comprising:

[0011] Get air quality data series;

[0012] Preprocessing the air quality data sequence to obtain a first subsequence and a second subsequence, wherein the first subsequence includes a plurality of first sequence groups, and the second subsequence includes a plurality of second sequence groups;

[0013] Performing a first grouping calculation process on the first subsequence to determine a first target subsequence, wherein the first grouping calculation process includes: performing a first intra-group grouping exchange process on a plurality of sequence groups in the first subsequence based on a preset first exchange rule to obtain a first target subsequence;

[0014] Performing a second grouping calculation process on the second subsequence to determine a second target subsequence, wherein the second grouping calculation process includes: performing a second intra-group grouping exchange process on a plurality of sequence groups in the second subsequence based on the preset second exchange rule to obtain a second target subsequence;

[0015] Based on the sequence feature of the air quality data sequence, the first target subsequence and the second target subsequence are recombined to obtain an air quality data result, wherein the sequence feature is obtained by preprocessing the air quality data sequence.

[0016] Preferably, the performing a first intra-group group exchange process on a plurality of sequence groups in the first subsequence based on a preset first exchange rule to obtain a first initial subsequence comprises:

[0017] Based on the sequence features, performing correlation separation processing on multiple sequence groups in the first sequence group to obtain a first sequence group and a second sequence group;

[0018] Performing mapping processing on the first sequence group and the second sequence group to obtain a first hidden sequence group and a second hidden sequence group in a first hidden state;

[0019] Performing a first exponential format conversion process on the first hidden sequence group, and performing a first original sequence convolution calculation on the result of the first exponential format conversion process, so as to obtain a first convolution sequence group; performing a second exponential format conversion process on the second hidden sequence group, and performing a second original sequence convolution calculation on the result of the second exponential format conversion process, so as to obtain a second convolution sequence group;

[0020] A cross calculation is performed on the first convolution sequence group and the second convolution sequence group to obtain the first cross sequence group and the second cross sequence group, and the first cross sequence group and the second cross sequence group are used as the first initial subsequence.

[0021] Preferably, the recombining the first target subsequence and the second target subsequence based on the sequence feature of the air quality data sequence to obtain the air quality data result includes:

[0022] Performing the first grouping calculation process on the first target subsequence to obtain a first grouping subsequence; if the sequence value of the first grouping subsequence does not satisfy the first sequence condition, repeatedly performing the first grouping calculation process on the first grouping subsequence; if the sequence value of the first grouping subsequence satisfies the first sequence condition, using the first grouping subsequence as a first processing subsequence;

[0023] performing the second grouping calculation process on the second target subsequence to obtain a second grouping subsequence; if the sequence value of the second grouping subsequence does not satisfy the second sequence condition, repeatedly performing the second grouping calculation process on the second grouping subsequence; if the sequence value of the second grouping subsequence satisfies the second sequence condition, using the second grouping subsequence as a second processing subsequence;

[0024] Based on the sequence feature, the first processing subsequence and the second processing subsequence are rearranged and calculated to obtain a target sequence, and the target sequence is used as the air quality data result.

[0025] Preferably, preprocessing the air quality data sequence to obtain the first subsequence and the second subsequence comprises:

[0026] Performing feature extraction processing on the air quality data sequence to determine sequence features of the air quality data sequence;

[0027] The air quality data sequence is subjected to correlation segmentation processing based on the sequence feature to obtain the first subsequence and the second subsequence.

[0028] The present invention also provides an air quality detection system, comprising:

[0029] A data acquisition module, used to obtain air quality data series;

[0030] a preprocessing module, configured to preprocess the air quality data sequence to obtain a first subsequence and a second subsequence, wherein the first subsequence includes a plurality of first sequence groups, and the second subsequence includes a plurality of second sequence groups;

[0031] A first grouping calculation module is used to perform a first grouping calculation process on the first subsequence to determine a first target subsequence, wherein the first grouping calculation process includes: performing a first intra-group grouping exchange process on a plurality of sequence groups in the first subsequence based on a preset first exchange rule to obtain a first target subsequence;

[0032] a second grouping calculation module, configured to perform a second grouping calculation process on the second subsequence to determine a second target subsequence, wherein the second grouping calculation process comprises: performing a second intra-group grouping exchange process on a plurality of sequence groups in the second subsequence based on the preset second exchange rule to obtain a second target subsequence;

[0033] A sequence recombination module is used to recombine the first target subsequence and the second target subsequence based on the sequence characteristics of the air quality data sequence to obtain air quality data results, wherein the sequence characteristics are obtained by preprocessing the air quality data sequence.

[0034] In an optional embodiment, the system further includes:

[0035] The performing a first intra-group group exchange process on a plurality of sequence groups in the first subsequence based on a preset first exchange rule to obtain a first initial subsequence includes:

[0036] Based on the sequence features, performing correlation separation processing on multiple sequence groups in the first sequence group to obtain a first sequence group and a second sequence group;

[0037] Performing mapping processing on the first sequence group and the second sequence group to obtain a first hidden sequence group and a second hidden sequence group in a first hidden state;

[0038] Performing a first exponential format conversion process on the first hidden sequence group, and performing a first original sequence convolution calculation on the result of the first exponential format conversion process, so as to obtain a first convolution sequence group; performing a second exponential format conversion process on the second hidden sequence group, and performing a second original sequence convolution calculation on the result of the second exponential format conversion process, so as to obtain a second convolution sequence group;

[0039] A cross calculation is performed on the first convolution sequence group and the second convolution sequence group to obtain the first cross sequence group and the second cross sequence group, and the first cross sequence group and the second cross sequence group are used as the first initial subsequence.

[0040] Preferably, the recombination module comprises:

[0041] a first processing unit, configured to perform the first grouping calculation processing on the first target subsequence to obtain a first grouping subsequence; if a sequence value of the first grouping subsequence does not satisfy a first sequence condition, repeatedly perform the first grouping calculation processing on the first grouping subsequence; if a sequence value of the first grouping subsequence satisfies the first sequence condition, use the first grouping subsequence as a first processing subsequence;

[0042] a second processing unit, configured to perform the second grouping calculation processing on the second target subsequence to obtain a second grouping subsequence; if the sequence value of the second grouping subsequence does not satisfy the second sequence condition, repeatedly perform the second grouping calculation processing on the second grouping subsequence; if the sequence value of the second grouping subsequence satisfies the second sequence condition, use the second grouping subsequence as a second processing subsequence;

[0043] A rearrangement unit is used to rearrange and calculate the first processing subsequence and the second processing subsequence based on the sequence characteristics to obtain a target sequence, and use the target sequence as the air quality data result.

[0044] Preferably, the preprocessing module comprises:

[0045] A feature extraction unit, used to perform feature extraction processing on the air quality data sequence to determine the sequence features of the air quality data sequence;

[0046] A correlation segmentation unit is used to perform correlation segmentation processing on the air quality data sequence based on the sequence feature to obtain the first subsequence and the second subsequence.

[0047] The present invention also provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute any of the methods described above when running.

[0048] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the methods described above.

[0049] Compared with the prior art, the present invention has the following beneficial effects:

[0050] The present invention provides an air quality detection method and system, which can exchange information between subsequences of the air quality data sequence by performing a first intra-group exchange and a second intra-group exchange on the air quality data sequence, thereby improving the validity of the overall data and promoting the accuracy of the air quality results. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A schematic diagram of a flow chart of an air quality detection method in one embodiment of the present invention;

[0052] Figure 2 Schematic diagram of the model calculation principle in one embodiment of the present invention Figure 1 ;

[0053] Figure 3 Schematic diagram of the model calculation principle in one embodiment of the present invention Figure 2 ;

[0054] Figure 4 is a structural block diagram of an air quality detection system in one embodiment of the present invention;

[0055] Figure 5 It is a schematic diagram of a flow chart in a specific embodiment of the present invention;

[0056] Figure 6 It is a schematic diagram of the structure of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0057] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0060] In addition, the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0061] Please see attached Figure 1 The present invention provides an air quality detection method, comprising:

[0062] Step S101, obtaining an air quality data sequence;

[0063] In this embodiment, the air quality data sequence is usually collected by an electronic device installed in an air quality detection station. After the air quality detection station collects the relevant data, the detection data is transmitted to a data analysis center by wired or wireless communication.

[0064] Among them, air quality data series include but are not limited to air quality-related data series such as air temperature and humidity, PM2.5, SO2 concentration, CO concentration, etc.

[0065] Step S102, preprocessing the air quality data sequence to obtain a first subsequence and a second subsequence, wherein the first subsequence includes a plurality of first sequence groups, and the second subsequence includes a plurality of second sequence groups;

[0066] In this embodiment, different air quality data have different effects on air quality. When the amount of data is large, grouping these data can reduce the amount of calculation for data analysis, and also facilitate correlation analysis of different data.

[0067] Among them, preprocessing may include (but not limited to) noise filtering, data expansion, feature extraction, data segmentation and the like.

[0068] It should be noted that the number of sequence groups may be at least two or only one, which is determined according to actual application scenarios.

[0069] Step S103, performing a first grouping calculation process on the first subsequence to determine a first target subsequence, wherein the first grouping calculation process includes: performing a first intra-group grouping exchange process on a plurality of sequence groups in the first subsequence based on a preset first exchange rule to obtain a first target subsequence;

[0070] In this embodiment, the purpose of intra-group exchange is to enable data exchange learning between different sequence groups to compensate for the information loss caused by the grouping operation, improve the model's ability to learn the correlation features between data, and enhance the analysis accuracy of the correlation between data.

[0071] Among them, Figure 2As shown, the first exchange rule includes two adjacent sequence groups randomly exchanging data in their respective sequence groups to generate a new sequence group. The exchanged data can be one of the groups in the sequence groups, or multiple groups in the sequence groups, or a single data in the sequence group, or multiple data in the sequence group. The exchange method can be implemented according to a specific exchange formula. The second exchange rule for the second group calculation processing and the data exchange process are the same.

[0072] It should be noted that the data exchange calculation process of the first group calculation processing and the second group calculation processing can be implemented by a specific data calculation module (such as an integration module, a convolution module, etc.), which will not be repeated here.

[0073] Step S104, performing a second grouping calculation process on the second subsequence to determine a second target subsequence, wherein the second grouping calculation process includes: performing a second intra-group grouping exchange process on a plurality of sequence groups in the second subsequence based on the preset second exchange rule to obtain a second target subsequence;

[0074] Step S105, based on the sequence characteristics of the air quality data sequence, the first target subsequence and the second target subsequence are reorganized to obtain air quality data results, wherein the sequence characteristics are obtained by preprocessing the air quality data sequence.

[0075] In this embodiment, after the intra-group data exchange is performed, in order to ensure the similarity between the data and the original data, the first target subsequence and the second target subsequence need to be reorganized to avoid data analysis errors caused by excessive data gaps.

[0076] Among them, the recombination processing can be determined by specific recombination rules. For example, the minimum sequence is rearranged and output through the connection layer and the recombination layer to make it conform to the order of the original sequence (corresponding to the sequence before the aforementioned grouping). The recombination layer is a new sequence formed by rearranging the minimum subsequence according to the order of the original sequence. The connection layer is used to connect the new sequence to the original sequence through the residual structure to form a sequence. The sequence characteristics include the sorting order and association relationship between each sequence group in the original sequence.

[0077] It should be noted that steps S101-S105 of the present application can be implemented by a binary tree model such as a CRIformer model or a CRINet model.

[0078] The present application performs intra-group exchange and recombinant calculation on data sequences, so that data of different qualities can be fully exchanged, thereby accurately determining the correlation between different data, thereby improving the accuracy of data analysis results.

[0079] In an optional embodiment, performing a first intra-group group exchange process on a plurality of sequence groups in the first subsequence based on a preset first exchange rule to obtain a first initial subsequence includes:

[0080] Step S1031: performing correlation separation processing on multiple sequence groups in the first sequence group based on the sequence features to obtain a first sequence group and a second sequence group;

[0081] In this embodiment, if Figure 2 As shown in part (a), correlation separation can be achieved by dichotomizing the aforementioned sequence features, or by a correlation partitioning algorithm, or by other methods.

[0082] Step S1032, mapping the first sequence group and the second sequence group to obtain a first hidden sequence group and a second hidden sequence group in a first hidden state;

[0083] In this embodiment, if Figure 2 As shown in part (b), the mapping process includes a one-dimensional convolution calculation on the sequence group, and the corresponding calculation result is the first hidden state represented in the form of a matrix.

[0084] Among them, F right is the first sequence group, F left is the second sequence group, φ(F right ) is the first hidden sequence, ψ(F left ) is the second hidden sequence, φ and ψ represent one-dimensional convolution operations with a convolution kernel of 5.

[0085] Step S1033, performing a first exponential format conversion process on the first hidden sequence group, and performing a first original sequence convolution calculation on the result of the first exponential format conversion process, so as to obtain a first convolution sequence group; performing a second exponential format conversion process on the second hidden sequence group, and performing a second original sequence convolution calculation on the result of the second exponential format conversion process, so as to obtain a second convolution sequence group;

[0086] In this embodiment, if Figure 2 As shown in part (b), the calculation process of the first original sequence convolution calculation and the second original sequence convolution calculation is shown in Formula 1 and Formula 2:

[0087]

[0088]

[0089] In the formula, is the first convolution sequence group, is the second convolution sequence group, exp(φ(Fright ) is the result of the first exponential format conversion of the first hidden sequence, exp(ψ(F left ) The second exponential format conversion processing result of the second hidden sequence, Formula 1 is the convolution calculation of the first original sequence, and Formula 2 is the convolution calculation of the second original sequence.

[0090] Step S1034: performing cross calculation on the first convolution sequence group and the second convolution sequence group to obtain the first cross sequence group and the second cross sequence group, and using the first cross sequence group and the second cross sequence group as the first initial subsequence.

[0091] In this embodiment, the cross-calculation process promotes the exchange of subsequence information, enabling the entire system model to more effectively extract target features and learn the complex dependencies existing in the time series in the data sequence.

[0092] like Figure 2 As shown in part (b), the cross calculation formula is shown in Formula 3 and Formula 4:

[0093]

[0094]

[0095] Where ρ and η represent one-dimensional convolution operations with a convolution kernel of 7, and F' right is the first crossover sequence group, F' left is the second crossover sequence group.

[0096] In an optional embodiment, the recombining the first target subsequence and the second target subsequence based on the sequence feature of the air quality data sequence to obtain the air quality data result includes:

[0097] Step S1051, performing the first grouping calculation process on the first target subsequence to obtain a first grouping subsequence; if the sequence value of the first grouping subsequence does not meet the first sequence condition, repeatedly performing the first grouping calculation process on the first grouping subsequence; if the sequence value of the first grouping subsequence meets the first sequence condition, using the first grouping subsequence as a first processing subsequence;

[0098] Step S1052, performing the second grouping calculation process on the second target subsequence to obtain a second grouping subsequence; if the sequence value of the second grouping subsequence does not meet the second sequence condition, repeatedly performing the second grouping calculation process on the second grouping subsequence; if the sequence value of the second grouping subsequence meets the second sequence condition, using the second grouping subsequence as a second processing subsequence;

[0099] Step S1053: Based on the sequence feature, the first processing subsequence and the second processing subsequence are rearranged and calculated to obtain a target sequence, and the target sequence is used as the air quality data result.

[0100] In this embodiment, if Figure 3 As shown in part (b), since the present application adopts the CRI-Block binary tree structure, when the number of layers is too deep, once the time series information in the data sequence passes through the parent node, this structure may cause the problem of subsequence feature information being blocked, resulting in the inability to communicate between subsequences.

[0101] To overcome this problem, this solution designs a Recombination-sort operation, such as Figure 3 As shown in part (b), the subsequences (first target subsequence / second target subsequence) of each layer input are naturally grouped (i.e., first group calculation and second group calculation), and then these groups are further subdivided into subgroups within each channel. Each subgroup interacts with the adjacent subgroups (i.e., cross calculation) and serves as the input of the subsequent subsequence layer. Finally, the minimum sequence with the least sequence groups is rearranged and output through the connection layer and the reorganization layer to make it consistent with the order of the original sequence. In this way, learning can be performed at different resolutions, which is convenient for learning the complex local trend characteristics of air quality data.

[0102] The sequence value includes the number of sequence groups in the subsequence. Correspondingly, the sequence condition is that the sequence value w cannot be divided by 2. L For example, when predicting the air quality for 24 hours, the length of the original input sequence (initial sequence) (the number of sequence groups) is w = 24. When grouping, when the number of sequence groups in the subsequence is L = 3, the sequence value w can be divided by 2 L If the subsequence is divisible by 3, then the subsequence is the minimum sequence, and the grouping stops at this time. That is, when the minimum sequence length = 3, the sequence stops being grouped.

[0103] In an optional embodiment, preprocessing the air quality data sequence to obtain the first subsequence and the second subsequence includes:

[0104] Step S1021, performing feature extraction processing on the air quality data sequence to determine the sequence features of the air quality data sequence;

[0105] Step S1022: performing correlation segmentation processing on the air quality data sequence based on the sequence feature to obtain the first subsequence and the second subsequence.

[0106] In this embodiment, if Figure 2 As shown in part (a), in order to effectively extract the target features, downsampling uses the Correlation-Split strategy for feature extraction, where the Correlation-split strategy calculates the Pearson correlation coefficient between each target variable and the independent variable using formula 5-7:

[0107]

[0108]

[0109]

[0110] Where X and Y represent two different time series, E(X) represents the mathematical expectation of X, r represents the Pearson correlation coefficient between X and Y, and ξ represents the correlation index. The input sequence is sorted in ascending order according to the correlation index, and then the sorted sequence is split by correlation using the binary method to obtain two sorted subsequences.

[0111] In one embodiment, Figure 4 As shown, the present application also provides an air quality detection system, comprising:

[0112] A data acquisition module, used to obtain air quality data series;

[0113] a preprocessing module, configured to preprocess the air quality data sequence to obtain a first subsequence and a second subsequence, wherein the first subsequence includes a plurality of first sequence groups, and the second subsequence includes a plurality of second sequence groups;

[0114] A first grouping calculation module is used to perform a first grouping calculation process on the first subsequence to determine a first target subsequence, wherein the first grouping calculation process includes: performing a first intra-group grouping exchange process on a plurality of sequence groups in the first subsequence based on a preset first exchange rule to obtain a first target subsequence;

[0115] a second grouping calculation module, configured to perform a second grouping calculation process on the second subsequence to determine a second target subsequence, wherein the second grouping calculation process comprises: performing a second intra-group grouping exchange process on a plurality of sequence groups in the second subsequence based on the preset second exchange rule to obtain a second target subsequence;

[0116] A sequence recombination module is used to recombine the first target subsequence and the second target subsequence based on the sequence characteristics of the air quality data sequence to obtain air quality data results, wherein the sequence characteristics are obtained by preprocessing the air quality data sequence.

[0117] In an optional embodiment, performing a first intra-group group exchange process on a plurality of sequence groups in the first subsequence based on a preset first exchange rule to obtain a first initial subsequence includes:

[0118] Based on the sequence features, performing correlation separation processing on multiple sequence groups in the first sequence group to obtain a first sequence group and a second sequence group;

[0119] Performing mapping processing on the first sequence group and the second sequence group to obtain a first hidden sequence group and a second hidden sequence group in a first hidden state;

[0120] Performing a first exponential format conversion process on the first hidden sequence group, and performing a first original sequence convolution calculation on the result of the first exponential format conversion process, so as to obtain a first convolution sequence group; performing a second exponential format conversion process on the second hidden sequence group, and performing a second original sequence convolution calculation on the result of the second exponential format conversion process, so as to obtain a second convolution sequence group;

[0121] A cross calculation is performed on the first convolution sequence group and the second convolution sequence group to obtain the first cross sequence group and the second cross sequence group, and the first cross sequence group and the second cross sequence group are used as the first initial subsequence.

[0122] In an optional embodiment, the recombination module comprises:

[0123] a first processing unit, configured to perform the first grouping calculation processing on the first target subsequence to obtain a first grouping subsequence; if a sequence value of the first grouping subsequence does not satisfy a first sequence condition, repeatedly perform the first grouping calculation processing on the first grouping subsequence; if a sequence value of the first grouping subsequence satisfies the first sequence condition, use the first grouping subsequence as a first processing subsequence;

[0124] a second processing unit, configured to perform the second grouping calculation processing on the second target subsequence to obtain a second grouping subsequence; if the sequence value of the second grouping subsequence does not satisfy the second sequence condition, repeatedly perform the second grouping calculation processing on the second grouping subsequence; if the sequence value of the second grouping subsequence satisfies the second sequence condition, use the second grouping subsequence as a second processing subsequence;

[0125] A rearrangement unit is used to rearrange and calculate the first processing subsequence and the second processing subsequence based on the sequence characteristics to obtain a target sequence, and use the target sequence as the air quality data result.

[0126] In an optional embodiment, the preprocessing module includes:

[0127] A feature extraction unit, used to perform feature extraction processing on the air quality data sequence to determine the sequence features of the air quality data sequence;

[0128] A correlation segmentation unit is used to perform correlation segmentation processing on the air quality data sequence based on the sequence feature to obtain the first subsequence and the second subsequence.

[0129] The present invention is described below by means of specific embodiments.

[0130] Taking the CRIformer model as an example, the CRIformer model consists of two key modules: encoder and decoder. Figure 5 As shown. First, the input sequence data is fed into the encoder, which uses the CRI module to generate queries (Q), keys (K), and values ​​(V). The ProbSparese attention mechanism is then used to enable the model to capture information from adjacent time nodes, thereby improving the contextual matching accuracy. Subsequently, the ProbSparese operation is performed on the Q, K, and V of the CRI module to detect the most important query (Q), and then the multi-head attention mechanism is applied to calculate the result and output it to the decoder module. At the same time, the data to be predicted is also fed into the decoder as an input signal. Subsequently, the output result of the CRI module obtained by convolutional neural network training is combined with the decoder output result using a residual structure. Finally, a fully connected layer is used to produce the final output.

[0131] The CRI module consists of multiple CRI-Blocks, each of which executes a correlation split strategy (Correlation-split) and performs a recombinant sort operation (Recombination-sort) between CRI-Blocks. When the input data is received by the CRI-Block, the correlation split operation is performed by Correlation-split.

[0132] During the operation, the data is segmented into multiple feature subsequences (SSCs) to achieve interactive learning, make up for the information loss in the segmentation process, and then learn data features at different resolutions.

[0133] Then, Recombination-sort reorganizes and sorts the processed data to solve the deep information blocking problem. Finally, the feature subsequences with the lowest resolution are merged and output through the connection layer.

[0134] Specific:

[0135] (1) CRI-Block

[0136] CRI-Block uses interactive learning convolutional neural networks, such as Figure 2 As shown in part (b), the input sequence is separated into Fleft and Fright subsequences by the Correlation-split operation and mapped to the hidden state. The resulting hidden state subsequence is then converted to an exponential format and multiplied by different original subsequences, as shown in the aforementioned formulas (1)-(2).

[0137] Next, the same operation as in equation (1) is performed on Fsleft and Fsright, and they are also mapped to hidden states. Then, Fsleft and Fsright are cross-added or subtracted, as shown in equation (2). This interactive process promotes the exchange of subsequence information, enabling the model to more effectively extract target features and learn the complex dependencies existing in time series.

[0138] (2) Correlation-split

[0139] In order to effectively extract the target features, downsampling adopts the Correlation-Split strategy, such as Figure 3 (a) The Correlation-split strategy calculates the Pearson correlation coefficient between each target variable and the independent variable, as shown in the above formulas (3)-(5).

[0140] The input sequence is sorted in ascending order according to the correlation index, and then the binary search method is used to obtain two sorted subsequences.

[0141] (3) Recombination-sort

[0142] CRI-Block follows a strict and complete binary tree structure. When the number of layers is too deep, once the time series information passes through the parent node, this structure may cause the problem of subsequence feature information being blocked, resulting in the inability to communicate between subsequences.

[0143] To overcome this problem, this scheme designs a Recombination-sort operation. This operation naturally groups the input subsequences at each layer between CRI-Blocks, and then further subdivides these groups into subgroups within each channel, each of which interacts with adjacent subgroups to create the input of the subsequent layer. Finally, the minimum sequence is rearranged and output through the connection layer and the recombination layer to make it conform to the order of the original sequence. This allows learning at different resolutions, which facilitates learning the complex local trend characteristics of air quality data. The detailed sorting process is as follows Figure 3 (a) shown.

[0144] In one embodiment, a computer device is provided. The computer device provided in the embodiment of the present application may be a server or a client: Figure 6 , which is a schematic diagram of the structure of a computer device provided in an embodiment of the present application.

[0145] Processor 1701, memory 1702, bus 1705, interface 1704, processor 1701 is connected to memory 1702 and interface 1704, bus 1705 is respectively connected to processor 1701, memory 1702 and interface 1704, interface 1704 is used to receive or send data, processor 1701 is a single-core or multi-core central processing unit, or a specific integrated circuit, or one or more integrated circuits configured to implement an embodiment of the present invention. Memory 1702 can be a random access memory (RAM) or a non-volatile memory (non-volatile memory), such as at least one hard disk memory. Memory 1702 is used to store computer execution instructions. Specifically, the computer execution instructions may include program 1703.

[0146] In this embodiment, when the processor 1701 calls the program 1703, it can use Figure 6 The management server in performs the air quality detection method operation, and the details are not repeated here.

[0147] It should be understood that the processor provided in the above embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0148] It should also be understood that the number of processors in the computer device in the above embodiments of the present application can be one or more, and can be adjusted according to the actual application scenario. This is only an exemplary description and is not limited. The number of memories in the embodiments of the present application can be one or more, and can be adjusted according to the actual application scenario. This is only an exemplary description and is not limited.

[0149] It should also be noted that when a computer device includes a processor (or processing unit) and a memory, the processor in this application can be integrated with the memory, or the processor and the memory can be connected through an interface. It can be adjusted according to the actual application scenario and is not limited.

[0150] The present application provides a chip system, which includes a processor for supporting a computer device (client or server) to implement the functions of the controller involved in the above method, such as processing the data and / or information involved in the above method. In one possible design, the chip system also includes a memory, which is used to store necessary program instructions and data. The chip system can be composed of a chip or a chip and other discrete devices.

[0151] In another possible design, when the chip system is a chip in a user device or access network, the chip includes: a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit. The processing unit may execute computer-executable instructions stored in the storage unit so that the chip in the client or management server may execute steps S101-S105. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit may also be a storage unit located outside the chip in the client or management server, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0152] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a computer, the controller of the client or management server executes the air quality detection method process in any of the above method embodiments. Correspondingly, the computer can be the above computer device (client or server).

[0153] It should be understood that the controller or processor mentioned in the above embodiments of the present application may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0154] It should also be understood that the number of processors or controllers in the computer device (client or server) or chip system in the above embodiments of the present application can be one or more, and can be adjusted according to the actual application scenario. This is only an exemplary description and is not limited. The number of memories in the embodiments of the present application can be one or more, and can be adjusted according to the actual application scenario. This is only an exemplary description and is not limited.

[0155] It should also be understood that the memory or readable storage medium mentioned in the computer device (client or server) in the above embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0156] Those of ordinary skill in the art will appreciate that the steps of implementing all or part of the above-mentioned embodiments by a computer device (client or server) or a processor can be completed by hardware or a program to instruct the relevant hardware. The program can be stored in a computer-readable storage medium, and the storage medium mentioned above can be a read-only memory, a random access memory, etc. Specifically, for example: the above-mentioned processing unit or processor can be a central processing unit, a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. Whether the above-mentioned functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0157] When software is used for implementation, the above-mentioned embodiment describes that a method for detecting air quality can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integration. Available media can be magnetic media, (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media, etc.

[0158] The terms "first", "second", etc. in the specification, claims and drawings of this application are used to distinguish

[0159] Similar objects, rather than being used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable in appropriate circumstances, which is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0160] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms of "a", "" and "the" used in the embodiments of the present application are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the present application is only a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.

[0161] As used herein, the words “if” or “if” may be interpreted as “at the time of” or “when” or “in response to determining” or “in response to detecting”, depending on the context. Similarly, the phrases “if it is determined” or “if (stated condition or event) is detected” may be interpreted as “when it is determined” or “in response to determining” or “when detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.

[0162] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

[0163] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An air quality detection method, characterized in that: include: Get air quality data series; Preprocessing the air quality data sequence to obtain a first subsequence and a second subsequence, wherein the first subsequence includes a plurality of first sequence groups, and the second subsequence includes a plurality of second sequence groups, and the preprocessing includes at least one of noise filtering, data expansion, feature extraction, and data segmentation; Performing a first grouping calculation process on the first subsequence to determine a first target subsequence, wherein the first grouping calculation process includes: performing a first intra-group grouping exchange process on a plurality of sequence groups in the first subsequence based on a preset first exchange rule to obtain a first target subsequence; Performing a second grouping calculation process on the second subsequence to determine a second target subsequence, wherein the second grouping calculation process includes: performing a second intra-group grouping exchange process on a plurality of sequence groups in the second subsequence based on the preset second exchange rule to obtain a second target subsequence; Based on the sequence characteristics of the air quality data sequence, the first target subsequence and the second target subsequence are reorganized, and the reorganization result is processed through a fully connected layer to generate a final output as the air quality data result, wherein the sequence characteristics are obtained by preprocessing the air quality data sequence, and the sequence characteristics include at least any one of the sorting order and the association relationship between each sequence group in the sequence before grouping; the reorganization processing includes rearranging and outputting the minimum sequence in the first target subsequence and the second target subsequence through a preset connection layer and a reorganization layer, so that the rearranged output minimum sequence meets the sequence characteristics of the sequence between the groups; The first group calculation process, the second group calculation process, and the reorganization process are executed by a CRI-Block in a preset CRI module.

2. The method according to claim 1, characterized in that The performing a first intra-group group exchange process on a plurality of sequence groups in the first subsequence based on a preset first exchange rule to obtain a first initial subsequence includes: Based on the sequence features, performing correlation separation processing on multiple sequence groups in the first sequence group to obtain a first sequence group and a second sequence group; Performing mapping processing on the first sequence group and the second sequence group to obtain a first hidden sequence group and a second hidden sequence group in a first hidden state; Performing a first exponential format conversion process on the first hidden sequence group, and performing a first original sequence convolution calculation on the result of the first exponential format conversion process, so as to obtain a first convolution sequence group; performing a second exponential format conversion process on the second hidden sequence group, and performing a second original sequence convolution calculation on the result of the second exponential format conversion process, so as to obtain a second convolution sequence group; A cross calculation is performed on the first convolution sequence group and the second convolution sequence group to obtain a first cross sequence group and a second cross sequence group, and the first cross sequence group and the second cross sequence group are used as the first initial subsequence.

3. The method according to claim 1, characterized in that The step of recombining the first target subsequence and the second target subsequence based on the sequence feature of the air quality data sequence to obtain an air quality data result includes: Performing the first grouping calculation process on the first target subsequence to obtain a first grouping subsequence; if the sequence value of the first grouping subsequence does not satisfy the first sequence condition, repeatedly performing the first grouping calculation process on the first grouping subsequence; if the sequence value of the first grouping subsequence satisfies the first sequence condition, using the first grouping subsequence as a first processing subsequence; performing the second grouping calculation process on the second target subsequence to obtain a second grouping subsequence; if the sequence value of the second grouping subsequence does not satisfy the second sequence condition, repeatedly performing the second grouping calculation process on the second grouping subsequence; if the sequence value of the second grouping subsequence satisfies the second sequence condition, using the second grouping subsequence as a second processing subsequence; Based on the sequence feature, the first processing subsequence and the second processing subsequence are rearranged and calculated to obtain a target sequence, and the target sequence is used as the air quality data result.

4. The method according to claim 1, characterized in that: The preprocessing of the air quality data sequence to obtain a first subsequence and a second subsequence includes: Performing feature extraction processing on the air quality data sequence to determine sequence features of the air quality data sequence; The air quality data sequence is subjected to correlation segmentation processing based on the sequence feature to obtain the first subsequence and the second subsequence.

5. An air quality detection system, characterized in that: include: A data acquisition module, used to obtain air quality data series; A preprocessing module, configured to preprocess the air quality data sequence to obtain a first subsequence and a second subsequence, wherein the first subsequence includes a plurality of first sequence groups, the second subsequence includes a plurality of second sequence groups, and the preprocessing includes at least one of noise filtering, data expansion, feature extraction, and data segmentation; A first grouping calculation module is used to perform a first grouping calculation process on the first subsequence to determine a first target subsequence, wherein the first grouping calculation process includes: performing a first intra-group grouping exchange process on a plurality of sequence groups in the first subsequence based on a preset first exchange rule to obtain a first target subsequence; a second grouping calculation module, configured to perform a second grouping calculation process on the second subsequence to determine a second target subsequence, wherein the second grouping calculation process comprises: performing a second intra-group grouping exchange process on a plurality of sequence groups in the second subsequence based on the preset second exchange rule to obtain a second target subsequence; A sequence recombination module, for reorganizing the first target subsequence and the second target subsequence based on the sequence characteristics of the air quality data sequence, and processing the reorganization result through a fully connected layer to generate a final output as the air quality data result, wherein the sequence characteristics are obtained by preprocessing the air quality data sequence, and the sequence characteristics include at least any one of the sorting order and the association relationship between the sequence groups in the sequence before grouping; the recombination process includes rearranging and outputting the minimum sequence in the first target subsequence and the second target subsequence through a preset connection layer and a recombination layer, so that the rearranged output minimum sequence meets the sequence characteristics of the sequence before grouping; The first group calculation process, the second group calculation process, and the reorganization process are executed by a CRI-Block in a preset CRI module.

6. The system according to claim 5, characterized in that The performing a first intra-group group exchange process on a plurality of sequence groups in the first subsequence based on a preset first exchange rule to obtain a first initial subsequence includes: Based on the sequence features, performing correlation separation processing on multiple sequence groups in the first sequence group to obtain a first sequence group and a second sequence group; Performing mapping processing on the first sequence group and the second sequence group to obtain a first hidden sequence group and a second hidden sequence group in a first hidden state; Performing a first exponential format conversion process on the first hidden sequence group, and performing a first original sequence convolution calculation on the result of the first exponential format conversion process, so as to obtain a first convolution sequence group; performing a second exponential format conversion process on the second hidden sequence group, and performing a second original sequence convolution calculation on the result of the second exponential format conversion process, so as to obtain a second convolution sequence group; A cross calculation is performed on the first convolution sequence group and the second convolution sequence group to obtain a first cross sequence group and a second cross sequence group, and the first cross sequence group and the second cross sequence group are used as the first initial subsequence.

7. The system according to claim 5, characterized in that The recombination module comprises: a first processing unit, configured to perform the first grouping calculation processing on the first target subsequence to obtain a first grouping subsequence; if a sequence value of the first grouping subsequence does not satisfy a first sequence condition, repeatedly perform the first grouping calculation processing on the first grouping subsequence; if a sequence value of the first grouping subsequence satisfies the first sequence condition, use the first grouping subsequence as a first processing subsequence; a second processing unit, configured to perform the second grouping calculation processing on the second target subsequence to obtain a second grouping subsequence; if the sequence value of the second grouping subsequence does not satisfy the second sequence condition, repeatedly perform the second grouping calculation processing on the second grouping subsequence; if the sequence value of the second grouping subsequence satisfies the second sequence condition, use the second grouping subsequence as a second processing subsequence; A rearrangement unit is used to rearrange and calculate the first processing subsequence and the second processing subsequence based on the sequence characteristics to obtain a target sequence, and use the target sequence as the air quality data result.

8. The system according to claim 5, characterized in that The preprocessing module comprises: A feature extraction unit, used to perform feature extraction processing on the air quality data sequence to determine the sequence features of the air quality data sequence; A correlation segmentation unit is used to perform correlation segmentation processing on the air quality data sequence based on the sequence feature to obtain the first subsequence and the second subsequence.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 4 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Dynamic correlation air quality time sequence-oriented prediction method and system

    CN112906941A

  • CNN-AGU-based air quality index prediction method and device

    CN115099488A