Active Air Quality Sampling Method Based on Compressive Sensing Adaptive Measurement Matrix
By constructing an active air quality sampling method with an adaptive measurement matrix, the problem of insufficient sampling position selection in air quality monitoring is solved, high-precision data speculation and real-time update are achieved, and the efficiency and accuracy of air quality monitoring are improved.
Patent Information
- Application Number
- CN202310176321.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2043-02-28
AI Technical Summary
The existing air quality monitoring methods lack initiative in sampling location selection, resulting in insufficient data speculation accuracy and the existing compression sensing measurement matrix cannot effectively guide sampling.
Using a method based on compression-sensing adaptive measurement matrix, the sparse basis and measurement matrix are constructed by constructing training compression matrix, using Gaussian random matrix and dictionary learning technology, to realize active sampling and data inference, and to update the training set online.
High-precision inference of air quality data at low sampling rates is realized, and the training set can be updated in real time to adapt to multiple sampling, avoiding the shortcomings of multiple models, and improving the overall efficiency of sampling and speculation.
Smart Images

Figure CN116205066B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of air quality monitoring, and particularly relates to an active air quality sampling method based on a compressive sensing adaptive measurement matrix. Background Art
[0002] Air quality is one of the issues that humans need to pay attention to in the face of environmental deterioration. Due to the serious urban air pollution, the service demand for air quality monitoring is continuously increasing. At present, many environment-centered application platforms have been developed based on the mobile crowd sensing paradigm, and the air quality in cities can also be collected through the platform to issue tasks. In such platforms, how to balance the quality and cost of sensed data is crucial. In order to obtain high-quality sensing results at multiple locations within a given time range, the most widely used method is to only select a few locations for data collection, and then infer the data at the remaining locations through machine learning methods.
[0003] Currently, the research work on data inference algorithms is relatively mature, such as the inference algorithm based on compressive sensing. Although this algorithm can achieve high inference accuracy under a high missing rate, it does not involve the selection of sampling locations. In fact, according to the idea of active learning, which data to sample will also affect the inference accuracy. Compressive sensing uses its measurement matrix to collect data. In the construction method of the compressive sensing measurement matrix, the existing methods can be roughly divided into two categories. One category is based on random generation, such as a Gaussian random matrix with a mean of 0 and a variance of (m is the number of rows of the matrix), a Toeplitz matrix with elements following an independent distribution, and a random Bernoulli matrix with elements independent and uncorrelated and following a Bernoulli distribution. These random matrices are mainly applied to the compressed storage of data. Although they have good performance in reconstructing data, if used to guide sampling, only random sampling can be achieved. The other category is constructed based on learning methods, such as using an autoencoder in deep learning to design the measurement matrix, and seeking the best restricted isometry property to construct the measurement matrix through training data, etc. This data-driven method has better performance than random matrices in reconstruction, but still cannot guide active sampling. Summary of the Invention
[0004] The purpose of the present invention is to provide an active air quality sampling method based on a compressive sensing adaptive measurement matrix, which can use the compressive sensing model to integrate sampling and inference, and can update the training set in real time to adapt to multiple samplings.
[0005] To achieve the above purpose, the technical solution adopted by the present invention is: an active air quality sampling method based on a compressive sensing adaptive measurement matrix, including the following steps:
[0006] Step S1: Normalize the historical air quality data, and then arrange it column by column to form a complete training matrix
[0007] Step S2: Randomly sample m sampling values for each column in to obtain a training compressed matrix
[0008] Step S3: Assume there are r pieces of test data. First, perform normalization processing; then let i start from 1, and repeat steps S4 to S7 for r times to achieve multi-round active sampling;
[0009] Step S4: Construct an initial dictionary using a Gaussian random matrix, and use dictionary learning technology to solve the over-complete dictionary D and sparse coefficient matrix of
[0010] Step S5: Construct a sparse basis ψ that conforms to the time-varying characteristics of air quality. After multiplying the obtained over-complete dictionary D and the inverse of the sparse basis ψ -1 , perform a column subset selection operation to obtain the most important m columns;
[0011] Step S6: Use the m columns obtained in step S5 to construct a measurement matrix Φ i Perform active sampling on the i-th test data to obtain Y i , 1 ≤ i ≤ r. Use Y i and the sensing matrix A i = Φ i ψ to solve the sparse vector Then use to obtain the estimated value of the unsampled points of the i-th test data;
[0012] Step S7: Add Y i to the training compressed matrix At the same time, delete the oldest training data in to ensure that the size of the training set remains fixed.
[0013] Furthermore, step S1 specifically includes:
[0014] Step S11: Assume there are t pieces of historical data, and arrange them column by column in chronological order to form a matrix That is The collection time of represents a real number matrix with n rows and t columns;
[0015] Step S12: Perform maximum-minimum normalization processing on the historical data; each piece of historical data All are n-dimensional vectors (p = 1, 2, …, t), and after normalizing them, vectors The normalization method is as shown in formula (1):
[0016]
[0017] where, is the q-th value in vector and is the value after min-max normalization. MinValue is the minimum value of all elements in t historical data, and MaxValue is the maximum value of all elements in t historical data;
[0018] Step S13: Arrange the normalized vectors column by column to form a complete training matrix
[0019] Furthermore, the specific steps of step S2 include:
[0020] Step S21: Randomly extract m sampling values from each vector in to obtain a vector where p = 1, 2, …, t and m < n, and respectively represent real number vectors with n rows and m rows;
[0021] Step S22: Perform L2-norm normalization on each vector to obtain a vector The normalization method is as shown in formula (2):
[0022]
[0023] where, is the h-th value in vector and is the value after L2-norm normalization;
[0024] Step S23: Arrange all column by column to form a compressed training matrix
[0025] Furthermore, the specific steps of step S3 include:
[0026] Step S31: Assume that there are r test data occurring after the last training data, and arrange them in columns in chronological order to form a matrix represents a real number matrix with n rows and r columns;
[0027] Step S32: Perform min-max normalization on the test data; each test data X' i =[x' i1 ,…,x' iq ,…,x' in T is an n-dimensional vector (i = 1, 2, …, r), and its normalization can obtain the vector X i =[x i1 ,…,x iq ,…,x in T ; The normalization method is shown in formula (3):
[0028]
[0029] where x' iq is the q-th value in the vector X' i , and x iq is the value after min-max normalization of x' iq ; The definitions of MinValue and MaxValue are shown in detail in Step S12;
[0030] Step S33: Let i = 1, and execute Steps S4 to S7;
[0031] Step S34: Let i = i + 1. If i ≤ r, where r is the data volume of the training set, then execute Steps S4 to S7; otherwise, the loop ends.
[0032] Furthermore, the specific content of Step S4 includes:
[0033] Step S41: Construct an initial dictionary represents a real number matrix with m rows and n columns; D0 is an independent and identically distributed Gaussian random matrix, and the element values of each column satisfy the normal distribution with a mean of 0 and a variance of ;
[0034] Step S42: Solve the sparse vector of each column in
[0035]
[0036] Among them, represents the square of the Frobenius norm of the matrix, which is the sum of the squares of all elements of the matrix; ||.||0 represents the number of non-zero elements in the vector, and k is a positive integer greater than 1;
[0037] Step S43: Optimize the initial dictionary using dictionary learning technology according to formula (5):
[0038]
[0039] Step S44: The over-complete dictionary is obtained after optimization Arrange the optimized column by column to form a sparse coefficient matrix
[0040] Furthermore, the specific steps of step S5 include:
[0041] Step S51: Since the air quality data has the characteristic of time smoothing, a sparse basis that conforms to the time-varying characteristics of air quality is constructed represents a real number matrix with both the number of rows and columns being n; using ψ -1 Convert a non-sparse vector into a sparse vector The conversion method is as shown in formula (6):
[0042]
[0043] Step S52: Multiply the optimized over-complete dictionary D obtained in step S4 by the inverse of the sparse basis ψ -1 to obtain the matrix Perform singular value decomposition on the matrix M according to formula (7):
[0044] M = Dψ -1 = U m Σ m V m T (7)
[0045] Among them, is an m-order orthogonal matrix; the non-negative matrix has all elements equal to 0 except for the diagonal elements, and the diagonal elements are arranged in descending order; is an n×m matrix;
[0046] Step S53: Calculate the probability distribution P = {p1,..., p q ,..., p n}, p q ≥0,
[0047]
[0048] Among them, and respectively represent the q-th row and the j-th row of matrix V m ;
[0049] Step S54: Initialize the active sampling subscript set Γ as an empty set; take the first m columns with the largest probabilities in the probability distribution P, and add their column subscripts to the set Γ in sequence;
[0050] Step S55: Generate a mask vector using the set Γ The element value in the vector mask is either 0 or 1. If q belongs to the set Γ and 1 ≤ q ≤ n, then the q-th element mask[q] in mask = 1; otherwise mask[q] = 0.
[0051] Furthermore, the specific steps of step S6 include:
[0052] Step S61: Generate a measurement matrix according to the mask vector mask obtained in step S5 The generation method is as follows: First, initialize Φ i as a matrix of all zeros; then, take out the m non-zero elements in mask in sequence. Assume that the subscript of the a-th non-zero element is b, where 1 ≤ a ≤ m and 1 ≤ b ≤ n, then set the element value Φ i at the a-th row and b-th column in Φ i [a, b] to 1;
[0053] Step S62: Perform active sampling on the i-th test data X i =[x i , x i1 … x i2 … x in T to obtain The active sampling method is as follows: If the element value Φ i at the a-th row and b-th column in Φ i [a, b] = 1, then the a-th element value y' i in Y' ia is the b-th element value x i in X ib ;
[0054] Step S63: Normalize the vector Y' i by L2 norm to obtain the vector
[0055] Step S64: Use and the sensing matrix Solve the sparse vector according to formula (10).
[0056]
[0057] Step S65: Use to obtain the i-th test data X i =[x i1 ,…,x iq ,…,x in T The estimated value of the un-sampled point is as follows: If q does not belong to the active sampling subscript set Γ, then x iq is estimated by , where 1 ≤ q ≤ n; otherwise x iq is the true sampling value.
[0058] Furthermore, step S7 specifically includes:
[0059] Step S71: Add Y i to the training compression matrix That is, let
[0060] Step S72: Delete the oldest training data in to ensure that the size of the training set remains fixed.
[0061] Compared with the prior art, the present invention has the following beneficial effects: The experimental results on the real air quality data set show that the method of the present invention can use a single model to achieve sampling and speculation, avoiding the deficiencies of using multiple models; it can achieve a relatively high-precision speculation of the complete sequence at a low sampling rate; the training set can be updated online to be applicable to multiple samplings and ensure the speculation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 is the schematic diagram of the implementation of the embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0063] The present invention will be further described below with reference to the drawings and embodiments.
[0064] It should be noted that the following detailed description is exemplary and is intended to provide further illustration of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs.
[0065] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they specify the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0066] As Figure 1 shown, this embodiment provides an active air quality sampling method based on a compressive sensing adaptive measurement matrix, including the following steps:
[0067] Step S1: Normalize a small amount of complete air quality historical data, such as PM2.5, and then arrange them in columns to form a training complete matrix
[0068] In this embodiment, step S1 specifically includes:
[0069] Step S11: Assume there are t pieces of historical data, arrange them in columns in chronological order to form a matrix That is The collection time of represents a real number matrix with n rows and t columns.
[0070] Step S12: Perform maximum-minimum normalization on the historical data. Each piece of historical data is an n-dimensional vector (p = 1, 2,..., t), and perform normalization on it to obtain the vector The normalization method is as shown in formula (1):
[0071]
[0072] Among them, is the q-th value in the vector , is the value after maximum-minimum normalization, MinValue is the minimum value of all elements in t pieces of historical data, and MaxValue is the maximum value of all elements in t pieces of historical data.
[0073] Step S13: Arrange the normalized vectors in columns to form a training complete matrix
[0074] Step S2: Randomly sample m sampling values for each column in to obtain a training compressed matrix
[0075] In this embodiment, step S2 specifically includes:
[0076] Step S21: Randomly extract m sampling values (m < n) from each vector to obtain a vector where and respectively represent real number vectors with n rows and m rows.
[0077] Step S22: Perform L2 norm normalization on each vector to obtain a vector The normalization method is shown in formula (2):
[0078]
[0079] where is the h-th value in the vector , and is the value after L2 norm normalization.
[0080] Step S23: Arrange all by columns to form a training compression matrix represents a real number matrix with m rows and t columns.
[0081] Step S3: Assume there are r pieces of test data. First, perform normalization processing. Then, let i start from 1, and repeat steps S4 to S7 a total of r times to achieve multiple rounds of active sampling.
[0082] In this embodiment, step S3 specifically includes:
[0083] Step S31: Assume there are r pieces of test data that occur after the last piece of training data. Arrange them by columns in chronological order to form a matrix represents a real number matrix with n rows and r columns.
[0084] Step S32: Perform maximum-minimum normalization processing on the test data. Each piece of test data X' i = [x' i1 , …, x' iq , …, x' in T is an n-dimensional vector (i = 1, 2, …, r) for each of them, and normalizing it can obtain a vector Xi = [x i1 , …, x iq , …, x in T . The normalization method is as shown in formula (3):
[0085]
[0086] where x' iq is the q-th value in the vector X' i , and x iq is the value after min-max normalization of x' iq . For the definitions of MinValue and MaxValue, see step S12 in detail.
[0087] Step S33: Let i = 1, and execute steps S4 to S7.
[0088] Step S34: Let i = i + 1. If i ≤ r (r is the data volume of the training set), then execute steps S4 to S7; otherwise, the loop ends.
[0089] Step S4: Construct an initial dictionary by using a Gaussian random matrix, and use dictionary learning technology to solve the over-complete dictionary D and the sparse coefficient matrix of
[0090] In this embodiment, step S4 specifically includes:
[0091] Step S41: Construct an initial dictionary represents a real number matrix with m rows and n columns. D0 is an independent and identically distributed Gaussian random matrix, and the element values of each column satisfy a normal distribution with a mean of 0 and a variance of .
[0092] Step S42: For each column in , solve its sparse vector according to formula (4)
[0093]
[0094] where represents the square of the Frobenius norm of the matrix, which is the sum of the squares of all elements of the matrix. ||.||0 represents the number of non-zero elements in the vector, also known as the "sparsity", and k is a positive integer greater than 1. Formula (4) can be solved by using the existing Orthogonal Matching Pursuit (OMP) algorithm.
[0095] Step S43: Optimize the initial dictionary using dictionary learning technology according to formula (5):
[0096]
[0097] Formula (5) can be solved using the existing K-SVD algorithm.
[0098] Step S44: The over-complete dictionary obtained after optimization is called Arrange the optimized in columns to form a sparse coefficient matrix
[0099] Step S5: Construct a sparse basis ψ that conforms to the time-varying characteristics of air quality. After multiplying the obtained over-complete dictionary D by the inverse of the sparse basis ψ -1 and performing a column subset selection operation, the most important m columns are obtained.
[0100] In this embodiment, step S5 specifically includes:[[]]END]]
[0101] Step S51: Since air quality data has the characteristic of time smoothing, that is, the sampling value at a certain moment generally has a small difference from the sampling values at its two adjacent moments before and after, a sparse basis that conforms to the time-varying characteristics of air quality is constructed represents a real number matrix with both the number of rows and columns being n. Using ψ -1 a non-sparse vector can be converted into a sparse vector The conversion method is as shown in formula (6):
[0102]
[0103] Step S52: Multiply the optimized over-complete dictionary D obtained in step S4 by the inverse of the sparse basis ψ -1 to obtain a matrix Perform a singular value decomposition on matrix M according to formula (7):
[0104] M = Dψ -1 = U m Σ m V m T (7)
[0105] where is an m-order orthogonal matrix. The non-negative matrix has all elements equal to 0 except for the diagonal elements, and the diagonal elements are arranged in descending order. is an n×m matrix.
[0106] Step S53: Calculate the probability distribution P = {p1, …, p q , …, p n}, p q ≥0,
[0107]
[0108] wherein, and respectively represent the q-th row and the j-th row of the matrix V m .
[0109] Step S54: Initialize the active sampling subscript set Γ as an empty set. Take the first m columns with the largest probabilities in the probability distribution P, and add their column subscripts to the set Γ in sequence.
[0110] Step S55: Generate a mask vector using the set Γ. The element values in the vector mask are either 0 or 1. If q (1 ≤ q ≤ n) belongs to the set Γ, then the q-th element mask[q] in mask = 1; otherwise, mask[q] = 0.
[0111] Step S6: Construct a measurement matrix Φ i using the m columns obtained in Step S5. For the i-th test data (1 ≤ i ≤ r), perform active sampling to obtain Y i , and use Y i and the sensing matrix A i = Φ i ψ to solve the sparse vector Then use to obtain the estimated value of the unsampled points of the i-th test data.
[0112] In this embodiment, the specific steps of Step S6 include:
[0113] Step S61: Generate a measurement matrix according to the mask vector mask obtained in Step S5. The generation method is as follows: First, initialize Φ i as a matrix of all zeros. Then, take out the m non-zero elements in mask in sequence. Assume that the subscript of the a-th non-zero element (1 ≤ a ≤ m) is b (1 ≤ b ≤ n), then set the element value Φ i at the a-th row and the b-th column in Φ i [a, b] to 1. For example: If mask = [0, 1, 1, 0, 1, 0] T , then the generated measurement matrix is as shown in formula (9):
[0114]
[0115] Step S62: Use Φi For the i-th test data X i =[x i1 ,x i2 …x in T perform active sampling to obtain Y' i = The active sampling method is as follows: If the element value Φ i at the a-th row and b-th column in Φ i [a, b]=1, then the a-th element value y' i of Y' ia is the b-th element value x i of X ib . Taking formula (9) as an example, y' i1 =x i2 , y' i2 =x i3 , y' i3 =x i5 .
[0116] Step S63: Perform L2-norm normalization on the vector Y' i to obtain the vector The normalization method is the same as that in Step S22.
[0117] Step S64: Use and the sensing matrix to solve for the sparse vector
[0118]
[0119] Formula (10) is the same as formula (4), and the existing Orthogonal Matching Pursuit (OMP) algorithm can be used to solve it.
[0120] Step S65: Use to obtain the i-th test data X i =[x i1 ,…,x iq ,…,x in T The estimated value of the un-sampled point, the method is as follows: If q does not belong to the active sampling subscript set Γ, then x iq is estimated using (1 ≤ q ≤ n); otherwise x iq is the true sampling value.
[0121] Step S7: Add Y i to the training compression matrix At the same time, add Delete the oldest training data to ensure that the size of the training set remains fixed.
[0122] In this embodiment, step S7 specifically includes:
[0123] Step S71: Add Y i to the training compression matrix That is, let
[0124] Step S72: Delete the oldest training data in to ensure that the size of the training set remains fixed.
[0125] The present invention provides an active air quality sampling method based on a compressive sensing adaptive measurement matrix. This method first preprocesses the complete historical data to obtain a training compression matrix Then, construct an initial dictionary by using a Gaussian random matrix, and use dictionary learning technology to obtain an optimized target dictionary D; then construct a sparse basis ψ, and perform a column subset selection operation on the matrix M = Dψ -1 to obtain the most important m columns; then, construct a measurement matrix Φ by using the obtained m columns and perform active sampling to obtain a new data Y, and use a compressive sensing recovery algorithm to infer the remaining unsampled values; finally, add Y to replace the training data with the earliest time. Repeat the above to implement multiple rounds of active sampling. Compared with the current active sampling field, the model under this framework in the present invention can not only be used for the selection of sampling positions, but also for the inference of unsampled data, and the inference accuracy is relatively high.
[0126] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0127] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate for implementation in the process Figure 1one or more processes and / or blocks Figure 1 means for the functions specified in one or more blocks
[0128] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction means that implements the processes Figure 1 one or more processes and / or blocks Figure 1 the functions specified in one or more blocks
[0129] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus, such that a series of operational steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in the processes Figure 1 one or more processes and / or blocks Figure 1 the functions specified in one or more blocks
[0130] As described above, it is only the preferred embodiments of the present invention, and is not a limitation of the present invention in other forms. Any person skilled in the art may use the disclosed technical content to make changes or modifications into equivalent embodiments with equivalent changes. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the technical solution content of the present invention still fall within the protection scope of the technical solution of the present invention.
Claims
1. An active air quality sampling method based on a compressive sensing adaptive measurement matrix, characterized in that Including the following steps: Step S1: Perform data normalization on the historical air quality data, and then arrange it column by column to form a complete training matrix Step S2: For each column in , randomly sample m sampling values to obtain a training compression matrix Step S3: Assume there are r pieces of test data. First, perform normalization processing; then let i start from 1, and repeat steps S4 to S7 for a total of r times to achieve multiple rounds of active sampling; Step S4: Construct an initial dictionary by using a Gaussian random matrix, and use dictionary learning technology to solve the over-complete dictionary D and sparse coefficient matrix of Step S5: Construct a sparse basis ψ that conforms to the time-varying characteristics of air quality. After multiplying the obtained over-complete dictionary D by the inverse of the sparse basis ψ -1 and performing a column subset selection operation, the most important m columns are obtained; Step S6: Construct the measurement matrix Φ using the m columns obtained in Step S5 i Perform active sampling on the i-th test data to obtain Y i , 1 ≤ i ≤ r, and use Y i and the sensing matrix A i = Φ i ψ to solve for the sparse vector Then use to obtain the estimated values of the unsampled points of the i-th test data; Step S7: Add Y i to the training compression matrix At the same time, delete the oldest training data in it to ensure that the size of the training set remains fixed; The specific content of step S5 includes: Step S51: Since air quality data has the characteristic of temporal smoothness, a sparse basis that conforms to the time-varying characteristics of air quality is constructed. denotes a real matrix with both the number of rows and columns being n; using ψ -1 to convert a non-sparse vector into a sparse vector The conversion method is as shown in formula (6): Step S52: Multiply the optimized over-complete dictionary D obtained in step S4 by the inverse ψ of the sparse basis -1 to obtain a matrix Perform singular value decomposition on matrix M according to formula (7): M = Dψ -1 = U m Σ m V m T (7) Among them, is an orthogonal matrix of order m; the non-negative matrix has non-zero diagonal elements and zero other elements, and the diagonal elements are arranged in descending order; is an n×m matrix; Step S53: Calculate the probability distribution P = {p1, …, p q , …, p n}, p q ≥ 0, Among them, and respectively represent the q-th row and the j-th row of the matrix V m ; Step S54: Initialize the active sampling subscript set Γ as an empty set; take the first m columns with the largest probabilities in the probability distribution P, and add their column subscripts to the set Γ in sequence; Step S55: Generate a mask vector using the set Γ The element values in the vector mask are either 0 or 1. If q belongs to the set Γ and 1 ≤ q ≤ n, then the q-th element mask[q] in mask = 1; otherwise, mask[q] = 0. The specific content of step S6 includes: Step S61: Generate a measurement matrix according to the mask vector mask obtained in step S5 The generation method is as follows: First, initialize Φ i to a matrix of all zeros; then sequentially take out m non-zero elements in mask. Suppose the subscript of the a-th non-zero element is b, where 1 ≤ a ≤ m and 1 ≤ b ≤ n. Then set the element value Φ i at the a-th row and b-th column in Φ i [a, b] to 1; Step S62: Using Φ i for the i-th test data X i = [x i1 , x i2 … x in T perform active sampling to obtain The active sampling method is as follows: If the element value Φ i [a, b] in the a-th row and b-th column of Φ i is 1, then the a-th element value y′ i of Y′ ia is the b-th element value x i of X ib ; Step S63: Perform L2 norm normalization on vector Y' i to obtain a vector Step S64: Use and the sensing matrix to solve the sparse vector according to formula (10) Step S65: Use to obtain the i-th test data X i = [x i1 , …, x iq , …, x in T The estimated value of the unsampled point is obtained as follows: If q does not belong to the active sampling subscript set Γ, then x iq is estimated using , where 1 ≤ q ≤ n; otherwise, x iq is the true sampling value. 2. The active air quality sampling method based on a compressive sensing adaptive measurement matrix according to claim 1, characterized in that The specific content of step S1 includes: Step S11: Assume there are t pieces of historical data, arrange them in columns in chronological order to form a matrix That is The collection time of represents a real number matrix with n rows and t columns; Step S12: Perform maximum-minimum normalization on historical data; each piece of historical data is an n-dimensional vector (p = 1, 2, …, t), and perform normalization on it to obtain a vector The normalization method is as shown in formula (1): Among them, is the q-th value in the vector , and is the value after maximum-minimum normalization. MinValue is the minimum value of all elements in t historical data, and MaxValue is the maximum value of all elements in t historical data; Step S13: Arrange the normalized vectors column by column to form a complete training matrix 3. The active air quality sampling method based on a compressive sensing adaptive measurement matrix according to claim 1, characterized in that, The specific content of step S2 includes: Step S21: Among each vector of , randomly extract m sampling values to obtain vector where p = 1, 2, …, t, m < n, and respectively represent real number vectors with n rows and m rows; Step S22: For each vector perform L2 norm normalization to obtain a vector The normalization method is as shown in formula (2): Among them, is the vector the h-th value in and is the value after L2 norm normalization; Step S23: Arrange all in columns to form a training compression matrix represents a real number matrix with m rows and t columns.
4. The active air quality sampling method based on a compressive sensing adaptive measurement matrix according to claim 1, wherein The specific content of step S3 includes: Step S31: Assume that there are r test data occurring after the last training data, and arrange them in columns in chronological order to form a matrix represents a real number matrix with n rows and r columns; Step S32: Perform maximum-minimum normalization on the test data; each piece of test data X′ i = [x′ i1 , …, x′ iq , …, x′ in T is an n-dimensional vector (i = 1, 2, …, r), and after performing normalization on it, the vector X i = [x i1 , …, x iq , …, x in T can be obtained; the normalization method is shown in formula (3): where x′ iq is the q-th value in vector X′ i , x iq is the value of x′ iq after min-max normalization. For the definitions of MinValue and MaxValue, see step S12; Step S33: Let i = 1, and execute steps S4 to S7; Step S34: Let i = i + 1. If o ≤ r, where r is the data volume of the training set, then execute steps S4 to S7; otherwise, the loop ends.
5. The active air quality sampling method based on a compressive sensing adaptive measurement matrix according to claim 1, wherein The specific content of step S4 includes: Step S41: Construct an initial dictionary represents a real number matrix with m rows and n columns; D0 is an independent and identically distributed Gaussian random matrix, and the element values of each column satisfy a normal distribution with a mean of 0 and a variance of ; Step S42: For each column in , solve its sparse vector according to formula (4) wherein, represents the square of the Frobenius norm of a matrix, which is the sum of the squares of all elements of the matrix; ||.||0 represents the number of non-zero elements in a vector, and k is a positive integer greater than 1; Step S43: Optimize the initial dictionary using dictionary learning technology according to formula (5): Step S44: An overcomplete dictionary is obtained after optimization The optimized are arranged column by column to form a sparse coefficient matrix 6. The active air quality sampling method based on a compressive sensing adaptive measurement matrix according to claim 1, wherein The specific content of step S7 includes: Step S71: Add Y i to the training compression matrix That is, let Step S72: Delete the oldest training data in to ensure that the size of the training set remains fixed.
Citation Information
Patent Citations
K-SVD-dictionary-learning-based data reconstruction method of seawater temperature field
CN108830167A
Image signal sparse representation method based on polyatomic dictionary
CN108846430A