Air pollutant early warning model construction method, early warning method and terminal
By obtaining pollutant concentration data of national-controlled stations and related prediction stations under the wind direction, standardizing and principal component analysis, eliminating collinearity, establishing linear regression equations to build an early warning model, solving the multi-collinearity problem in air pollutant monitoring, and improving the Monitoring accuracy.
Patent Information
- Application Number
- CN202411473337.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-14
AI Technical Summary
The existing air pollutant concentration prediction methods have multiple collinearity problems, resulting in poor monitoring accuracy and difficulty in effectively analyzing and managing air quality.
By obtaining the target pollutant concentration data of the national-controlled station under each wind direction and the prediction station with a correlation higher than the correlation threshold, standardizing the processing and extracting the principal components, eliminating the collinearity between the prediction stations, and establishing a linear regression equation Build an early warning model.
The correlation between the pollutant concentration data of the national control station and the prediction station has been improved. The selected pollutant concentration data is more in line with the actual situation, eliminates multicollinearity, and improves the accuracy of air pollutant monitoring.
Smart Images

Figure CN119442172A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of air pollutant monitoring, and in particular to an air pollutant early warning model construction method, an early warning method and a terminal. Background Art
[0002] Air is a substance that all living things on Earth rely on for survival, and it has an important impact on human survival and production. In recent years, due to social progress and rapid industrial development, a large number of air pollution problems have occurred, which directly endanger people's health. Especially in the autumn and winter seasons, when meteorological diffusion conditions are poor, air pollution generated by human activities will accumulate and spread, forming large-scale pollution events in large areas, which not only affects the public's health but also affects the completion of the annual assessment targets of urban air quality. Therefore, it is particularly important to accurately predict air quality.
[0003] With the continuous improvement of the air quality pollutant monitoring network, in addition to the standard monitoring network such as national control stations, provincial control stations, and municipal control stations, there are also many micro-forecasting stations. Most of the micro-forecasting stations are located where pollution sources may exist. Taking Tangshan City as an example, there are more than 1,000 air quality monitoring stations of various types. Through the monitoring data of historical pollutants (not easy to react and transform and relatively stable, such as particulate matter, CO, etc.), the relationship between national control stations and forecasting stations is explored, and a database is established. Then, the pollutant concentration of national control stations in the future is calculated through existing monitoring data, and national control stations that exceed the pollutant concentration threshold are warned, possible sources of pollutants are discovered, and relevant departments are assisted in control.
[0004] At present, the regional scope of research on air pollutant concentration prediction is mainly urban scale. Based on the least squares method, the concentration of another pollutant is predicted by the concentration of five or several other pollutants. This method requires a lot of data and is not conducive to regional analysis and management. For the same air pollutant concentration at different air quality monitoring points, there is multicollinearity. In the general least squares air pollution concentration regression modeling, it is usually subject to many limitations, the most typical of which is the multicollinearity between the independent variable and the dependent variable and between the independent variables, which will seriously interfere with parameter selection, increase model errors, make the model stability worse, and affect the accuracy of air pollutant monitoring. Summary of the invention
[0005] The embodiment of the present invention provides an air pollutant early warning model construction method, an early warning method and a terminal to solve the problems of multicollinearity and accuracy of air pollutant monitoring.
[0006] In a first aspect, an embodiment of the present invention provides a method for constructing an air pollutant early warning model, comprising:
[0007] Obtain target pollutant concentration data for each national control station in each wind direction and the forecast station with correlation higher than the correlation threshold;
[0008] Standardize the target pollutant concentration data of the national control station under each wind direction and the forecast station with correlation higher than the correlation threshold, respectively form a standardized matrix of the target pollutant concentration data of the national control station and a standardized matrix of the target pollutant concentration data of the forecast station, and extract the principal component from the standardized matrix of the target pollutant concentration data of the forecast station; wherein the principal component is part of the forecast stations among the forecast stations with correlation higher than the correlation threshold;
[0009] The satisfaction value is analyzed by cross-validation. When the satisfactory conditions are met, the extracted components are determined. A linear regression equation is established based on the standardized matrix of the target pollutant concentration data of the national control station and the principal components. The regression coefficient of the principal component is solved by the least squares method to form an early warning model. Among them, the early warning model takes the pollutant concentration data of the prediction station as input and the predicted pollutant concentration of the national control station as output.
[0010] In a possible implementation, obtaining target pollutant concentration data of a national control station in each wind direction and a forecast station with a correlation higher than a correlation threshold includes:
[0011] Obtain pollutant concentration data and meteorological data from national control stations and all forecast stations; meteorological data includes wind direction;
[0012] Perform high-value dynamic identification on the pollutant concentration data of the national control station and all forecast stations, and obtain the pollutant concentration data of the high-value period of the national control station and the high-value period of the forecast station;
[0013] For each wind direction, the pollutant concentration data of the high value period of the national control station are correlated with the air pollutant concentration data of the high value period of the forecast station located upwind of the national control station in the previous set time period according to the set time period. According to the correlation calculation results, the target pollutant concentration data of the forecast station whose correlation with the national control station is higher than the correlation threshold are selected.
[0014] In a possible implementation, the high-value dynamic identification of pollutant concentration data of the national control station and all forecast stations includes:
[0015] Based on the window function, the pollutant concentration data of the national control station and all forecast stations are slid to divide the pollutant concentration data into several areas;
[0016] Calculate the arithmetic mean of the pollutant concentration data in the current area, calculate the standard deviation based on the arithmetic mean, and calculate the fluctuation based on the standard deviation;
[0017] According to the arithmetic mean of the pollutant concentration data in the current area, the absolute value of the difference between the arithmetic mean of the pollutant concentration data outside the current area and the pollutant concentration data in the current area is calculated;
[0018] The signal value of the pollutant concentration data outside the current area is set according to the absolute value of the difference between the pollutant concentration data outside the current area and the arithmetic mean value of the pollutant concentration data within the current area, the fluctuation amount, and the standard deviation;
[0019] The pollutant concentration data sequence is determined according to the signal value of the pollutant concentration data outside the current area.
[0020] In a possible implementation, the signal value of the pollutant concentration data outside the current area is set according to the absolute value of the difference between the pollutant concentration data outside the current area and the arithmetic mean value of the pollutant concentration data within the current area, the fluctuation amount, and the standard deviation, including:
[0021] If the absolute value of the difference between the arithmetic mean of the pollutant concentration data outside the current area and the pollutant concentration data within the current area is greater than the fluctuation amount of the pollutant concentration data within the current area, and the pollutant concentration data is greater than the arithmetic mean of the pollutant concentration data within the current area, then the signal value of the pollutant concentration data is set to a high value signal;
[0022] If the absolute value of the difference between the arithmetic mean of the pollutant concentration data outside the current area and the pollutant concentration data within the current area is greater than the fluctuation amount of the pollutant concentration data within the current area, and the pollutant concentration data is less than the arithmetic mean of the pollutant concentration data within the current area, then the signal value of the pollutant concentration data is set to a low value signal;
[0023] If the absolute value of the difference between the arithmetic mean values of the pollutant concentration data outside the current area and the pollutant concentration data within the current area is smaller than the fluctuation amount of the pollutant concentration data within the current area, the signal value of the pollutant concentration data is set to be a flat signal.
[0024] In a possible implementation, determining the pollutant concentration data sequence according to the signal value of the pollutant concentration data outside the current area includes:
[0025] When the pollutant concentration data outside the current area is a high value signal or a low value signal, the pollutant concentration data sequence outside the current area is:
[0026] filteredY(n+i)=influence*y(n+1)+(1-influence)*filteredY(n),…influence*y(n+i)+(1-influence)*filteredY(n);
[0027] When the pollutant concentration data outside the current area is a flat signal, the pollutant concentration data sequence outside the current area is:
[0028] filteredY(n+i)=y(n+1),...y(n+i);
[0029] Circularly calculate the signal value of the pollutant concentration data of the next area;
[0030] In the formula, filteredY(n+i) is the pollutant concentration data sequence outside the current area, influence is the influence parameter, y(n+i) is the pollutant concentration data outside the current area, and filteredY(n) is the pollutant concentration data sequence within the current area.
[0031] In a possible implementation, before obtaining the pollutant concentration data and meteorological data of the national control station and all forecast stations, the pollutant concentration data and meteorological data are cleaned:
[0032] Eliminate null values, zero values, and negative values in pollutant concentration data and meteorological data;
[0033] Remove pollutant concentration data and meteorological data that are insufficiently effective;
[0034] Stinterp is used to interpolate pollutant concentration data and meteorological data that are not aligned in time, and to extract pollutant concentration data in the correct time series;
[0035] The pollutant concentration data and meteorological data of the national control station and all forecast stations are averaged over one hour.
[0036] In a second aspect, an embodiment of the present invention provides an air pollutant early warning method based on an early warning model constructed by the above-mentioned air pollutant early warning model construction method, comprising:
[0037] Obtain current wind direction and pollutant concentration data for each forecast station;
[0038] Determine the corresponding target forecast station according to the current wind direction, and obtain the corresponding warning model according to the target forecast station;
[0039] The pollutant concentration data of the target prediction station is input into the early warning model, and the predicted pollutant concentration of the national control station is output. When the predicted pollutant concentration exceeds the pollutant concentration threshold, a high pollutant concentration warning is issued.
[0040] In a possible implementation, the pollutants include particulate matter and gaseous pollutants.
[0041] In a third aspect, an embodiment of the present invention provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the first aspect, the second aspect, or any possible implementation of the first aspect or the second aspect are implemented.
[0042] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect, the second aspect, or any possible implementation of the first aspect or the second aspect are implemented.
[0043] The embodiment of the present invention provides a method for constructing an air pollutant early warning model, an early warning method and a terminal. By obtaining the target pollutant concentration data of the national control station under each wind direction and the prediction station whose correlation is higher than the correlation threshold, the correlation between the pollutant concentration data of the national control station and the prediction station is higher, and the selected pollutant concentration data is more in line with the actual situation. The standardized matrix of the target pollutant concentration data of the prediction station is subjected to principal component analysis to eliminate the collinearity between the prediction stations and make the prediction model more accurate. The linear regression equation is established using the standardized matrix of the target pollutant concentration data of the national control station and the principal component, and the regression coefficient of the principal component is solved by the least squares method to form an early warning model, so that the prediction of pollutants is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0045] Figure 1 is a flow chart of a method for constructing an air pollutant early warning model provided by an embodiment of the present invention;
[0046] Figure 2 is a flow chart of an air pollutant early warning method provided by an embodiment of the present invention;
[0047] Figure 3 It is a structural schematic diagram of an air pollutant early warning model building device provided by an embodiment of the present invention;
[0048] Figure 4 is a structural schematic diagram of an air pollutant early warning device provided by an embodiment of the present invention;
[0049] Figure 5 is a schematic diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0051] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0052] Figure 1 Flow chart of the method for constructing an air pollutant early warning model provided by an embodiment of the present invention. Figure 1 As shown, the details are as follows:
[0053] Step 101: Obtain target pollutant concentration data of the national control station in each wind direction and the forecast station with correlation higher than the correlation threshold.
[0054] Before obtaining the target pollutant concentration data of the national control station in each wind direction and the forecast station whose correlation is higher than the correlation threshold, the following preparations need to be made first.
[0055] In a possible implementation, before obtaining the pollutant concentration data and meteorological data of the national control station and all forecast stations, the pollutant concentration data and meteorological data are cleaned:
[0056] Eliminate null values, zero values, and negative values in pollutant concentration data and meteorological data;
[0057] Remove pollutant concentration data and meteorological data that are insufficiently effective;
[0058] Stinterp is used to interpolate pollutant concentration data and meteorological data that are not aligned in time, and to extract pollutant concentration data in the correct time series;
[0059] The pollutant concentration data and meteorological data of the national control station and all forecast stations are averaged over one hour.
[0060] The pollutant concentration data and meteorological data of the national control station and all forecast stations are averaged for one hour to reduce the impact of random fluctuations and extract the correct time series pollutant concentration data, remove the day and night periodicity of the data, and facilitate finding the period when pollution occurs.
[0061] In a possible implementation, target pollutant concentration data of the national control station in each wind direction and the forecast station with correlation higher than the correlation threshold are obtained, including:
[0062] Obtain pollutant concentration data and meteorological data from national control stations and all forecast stations; meteorological data includes wind direction;
[0063] Perform high-value dynamic identification on the pollutant concentration data of the national control station and all forecast stations, and obtain the pollutant concentration data of the high-value period of the national control station and the high-value period of the forecast station;
[0064] For each wind direction, the pollutant concentration data of the high value period of the national control station are correlated with the air pollutant concentration data of the high value period of the forecast station located upwind of the national control station in the previous set time period according to the set time period. According to the correlation calculation results, the target pollutant concentration data of the forecast station whose correlation with the national control station is higher than the correlation threshold are selected.
[0065] Since there is a certain spatial distance between the national control station and the prediction station, the high concentration time of the national control station lags behind that of the prediction station. Therefore, a correlation analysis is conducted between the pollutant concentrations during the high value period of the national control station and the high value period of all prediction stations in the previous 0-3 hours, and the pollutant concentration data of the prediction station that is located upwind of the national control station under each wind direction and has a strong correlation with the national control station (for example, the correlation calculation result R>0.8) is screened out.
[0066] For example, the Pearson correlation coefficient or the maximum information coefficient is used to evaluate the correlation between the national control station and the forecast station.
[0067] The pollutant concentration data of the prediction stations with high correlation with the national control stations are selected to make the early warning model more accurate and the predicted pollutant concentrations of the national control stations more accurate.
[0068] Through the above steps, the pollutant concentration data and meteorological data from national control stations and forecasting stations can be effectively acquired, cleaned, processed and analyzed, providing a scientific basis for air quality monitoring and forecasting.
[0069] In one possible implementation, high-value dynamic identification is performed on pollutant concentration data from national control stations and all forecast stations, including:
[0070] Based on the window function, the pollutant concentration data of the national control station and all forecast stations are slid to divide the pollutant concentration data into several areas;
[0071] Calculate the arithmetic mean of the pollutant concentration data in the current area, calculate the standard deviation based on the arithmetic mean, and calculate the fluctuation based on the standard deviation;
[0072] According to the arithmetic mean of the pollutant concentration data in the current area, the absolute value of the difference between the arithmetic mean of the pollutant concentration data outside the current area and the pollutant concentration data in the current area is calculated;
[0073] The signal value of the pollutant concentration data outside the current area is set according to the absolute value of the difference between the pollutant concentration data outside the current area and the arithmetic mean value of the pollutant concentration data within the current area, the fluctuation amount, and the standard deviation;
[0074] The pollutant concentration data sequence is determined according to the signal value of the pollutant concentration data outside the current area.
[0075] Slide a window function such as a Hanning window over the pollutant concentration data to cover various regions of the data. This can divide the data into several regions, each of which is equal to the length of the Hanning window. The current region refers to the data segment covered by the Hanning window. As the Hanning window slides, the current region will change accordingly.
[0076] Input the pollutant concentration data sequence into the current region one by one: set the initial region size to n (the region size setting needs to match the characteristics of the pollutant concentration data sequence), set the signal vector signals = 0, ..., 0 (the length is the pollutant concentration data sequence length L). The pollutant concentration data sequence in the current region is filteredY = y(1), ...y(n).
[0077] The arithmetic mean of the pollutant concentration data in the current area is:
[0078]
[0079] Where y(n) is the pollutant concentration data in the previous area.
[0080] The standard deviation of the pollutant concentration data in the current area is:
[0081]
[0082] The absolute value of the difference between the arithmetic mean of the pollutant concentration data y(n+i) outside the current area and the pollutant concentration data within the current area is:
[0083] diff(n+i)=|y(n+i)-avgFilter(n)|
[0084] In the formula, i=1,...,Ln.
[0085] The fluctuation of pollutant concentration data vector in the current area is:
[0086] fluctuate(n)=threshold*stdFilter(n)
[0087] Where threshold is the fluctuation parameter.
[0088] In a possible implementation, setting the signal value of the pollutant concentration data outside the current area according to the absolute value of the difference, the fluctuation amount, and the standard deviation between the pollutant concentration data outside the current area and the arithmetic mean of the pollutant concentration data inside the current area includes:
[0089] If the absolute value of the difference between the pollutant concentration data outside the current area and the arithmetic mean of the pollutant concentration data inside the current area is greater than the fluctuation amount of the pollutant concentration data inside the current area, and the pollutant concentration data is greater than the arithmetic mean of the pollutant concentration data inside the current area, then set the signal value of the pollutant concentration data to a high-value signal;
[0090] If the absolute value of the difference between the pollutant concentration data outside the current area and the arithmetic mean of the pollutant concentration data inside the current area is greater than the fluctuation amount of the pollutant concentration data inside the current area, and the pollutant concentration data is less than the arithmetic mean of the pollutant concentration data inside the current area, then set the signal value of the pollutant concentration data to a low-value signal;
[0091] If the absolute value of the difference between the pollutant concentration data outside the current area and the arithmetic mean of the pollutant concentration data inside the current area is less than the fluctuation amount of the pollutant concentration data inside the current area, then set the signal value of the pollutant concentration data to a flat-value signal.
[0092] That is, when diff(n + i)> fluctuate(n) and y(n + i)> avgFilter(n), set the signal value of the (n + i)-th data outside the current area to a high-value signal 1;
[0093] When diff(n + i)> fluctuate(n) and y(n + i)< avgFilter(n), set the signal value of the (n + i)-th data outside the current area to a low-value signal -1;
[0094] When diff(n + i)< fluctuate(n), set the signal value of the (n + i)-th data outside the current area to a flat-value signal 0.
[0095] The algorithm of this application adjusts the size of the Hanning window and the fluctuation parameters according to the actual data characteristics. This process can help identify abnormal high and low values in the pollutant concentration data, thereby providing a basis for further analysis and decision-making.
[0096] In a possible implementation, determining the pollutant concentration data sequence according to the signal value of the pollutant concentration data outside the current area includes:
[0097] When the pollutant concentration data outside the current area is a high-value signal or a low-value signal, the pollutant concentration data sequence outside the current area is:
[0098] filteredY(n+i)=influence*y(n+1)+(1-influence)*filteredY(n),…influence
[0099] *y(n+i)+(1-influence)*filteredY(n);
[0100] When the pollutant concentration data outside the current area is a flat signal, the pollutant concentration data sequence outside the current area is:
[0101] filteredY(n+i)=y(n+1),...y(n+i);
[0102] Circularly calculate the signal value of the pollutant concentration data of the next area;
[0103] In the formula, filteredY(n+i) is the pollutant concentration data sequence outside the current area, influence is the influence parameter, y(n+i) is the pollutant concentration data outside the current area, and filteredY(n) is the pollutant concentration data sequence within the current area.
[0104] Move the area back by one unit time data, and calculate the arithmetic mean, standard deviation, and fluctuation of the new area. Calculate the signal value of the pollutant concentration data outside the new area based on the arithmetic mean, standard deviation, and fluctuation of the new area, and obtain the signal value of the next pollutant concentration data until the pollutant concentration data sequence of length L is calculated and the final signal vector signals is obtained. This process can smooth the pollutant concentration data.
[0105] At this point, the pollutant concentration data of the national control station and each forecast station are dynamically identified for high values, and the pollutant concentration data of the national control station and each forecast station during the high value period are obtained.
[0106] Step 102: Standardize the target pollutant concentration data of the national control station under each wind direction and the prediction stations with correlation higher than the correlation threshold, respectively forming a standardized matrix of the target pollutant concentration data of the national control station and a standardized matrix of the target pollutant concentration data of the prediction station, and extract the principal component from the standardized matrix of the target pollutant concentration data of the prediction station; wherein the principal component is part of the prediction stations among the prediction stations with correlation higher than the correlation threshold.
[0107] The target pollutant concentration data matrix of the prediction station is the independent variable matrix X, and the target pollutant concentration data matrix of the national control station is the dependent variable matrix Y. The independent variable matrix X and the dependent variable matrix Y are standardized. E0 is the standardized matrix of the independent variable matrix X, and F0 is the standardized matrix of the dependent variable matrix Y:
[0108]
[0109] In the formula, x ij is the target pollutant concentration of the prediction station, is the average concentration of target pollutants at the jth prediction station, is the standard deviation of the pollutant concentration data of the jth prediction station, yi is the pollutant concentration of the national control station, is the average pollutant concentration of the national monitoring station, s y is the standard deviation of pollutant concentration data at the national monitoring station.
[0110] Extract a component t1 from E0, t1=E0ω1, ω1 is the first axis of E0, ||ω1||=1.
[0111] A component u1 is extracted from F0, u1=F0c1, ||c1||=1. Since only one pollutant concentration of the national control station is involved, F0 is just a variable, so c1=1, therefore, u1=F0.
[0112] Next, solve the matrix E0F0 to obtain its maximum eigenvalue vector ω1, which is obtained from F0 T E0E0 T F0=θ1 2 c1, where θ1 is F0 T E0E0 T F0 is the largest eigenvalue, from which we can deduce θ1 2 =||E0 T F0|| 2 , we can get ω1=E0 T F0 / ||E0 T F0||, substitute into t1=E0ω1, and we can get t1.
[0113] Make regression equations of E0 and F0 with respect to t1 respectively:
[0114] E0=t1p1 T +E1
[0115] F0=t1r1+F1
[0116] In the formula, p1 and r1 are regression coefficients, that is:
[0117] p1=E0 T t1 / ||t1|| 2
[0118] r1=F0 T t1 / ||t1|| 2
[0119] E1 and F1 are residual matrices:
[0120] E1 = E0 - t1p1 T = (E 11 , E 12 , …E 1p )
[0121] F1 = F0 - t1r1
[0122] The principal components after principal component analysis transformation are orthogonal, that is, linearly independent, which helps to eliminate the problem of multicollinearity in the original data.
[0123] Step 103: Use cross-validation to analyze the satisfaction value. When the satisfaction condition is met, determine the extracted components, establish a linear regression equation based on the standardized matrix of the target pollutant concentration data of the national control station and the principal components, and solve the regression coefficients of the principal components by the least squares method to form an early warning model; among them, the early warning model takes the pollutant concentration data of the prediction station as the input and the predicted pollutant concentration of the national control station as the output.
[0124] Use cross-validation for analysis. If the satisfaction condition is met, proceed to the next step; if not, replace E0 and F0 with E1 and F1, and repeat the extraction of new components from the residual matrix. When extracting the h (h < A, A is the rank of X)th component, the satisfaction condition of cross-validation is met, determine to extract h components, and perform the regression of F0 on h principal components t1, t2, t3…t h :
[0125] F0 = r1t1 + r2t2 + r3t3 + … + r p t p + F h
[0126] In the formula, r1, r2, …r h are the regression coefficients, and F h is the residual.
[0127] The form of the linear regression equation is as follows:
[0128] y = A1x1 + A2x2 + A3x3 + … + A p x p
[0129] In the formula, y is the pollutant concentration of the national control station, x1…x p is the pollutant concentration of the prediction station, and A1…A p are the regression coefficients of the prediction station.
[0130] Since the extracted components t1, t2, t3…t h are linear combinations of the standardized matrix E0, substituting t1 = E0ω1, the regression of the principal components t1, t2, t3…t h into the regression equation, we can get:
[0131] F0=r1E0ω1 * +r2E0ω2 * +r3E0ω3 * +…+r h E0ω h * +F h
[0132] =E0(r1ω1 * +…r h ω h * )+F h
[0133] In the formula, I is the identity matrix, and after combining similar items, we can get y with respect to x1…x p Standardized regression equation:
[0134] y * =a1x1 * +a2x2 * +…+a p x p *
[0135] On this basis, the inverse process of standardization can be performed to obtain the original regression equation:
[0136]
[0137] In the formula, E(y), E(x i ) are the average values of pollutant concentration data of national monitoring stations and forecast stations, respectively. y , are the standard deviation of pollutant concentration data of national monitoring stations and forecast stations, respectively, a1,…,a p is the standardized regression coefficient.
[0138] Among them, the regression coefficients of the prediction stations were tested for significance, and those that passed the significance test (P<0.05) were retained.
[0139] Since the dependent variable of the study, the pollutant concentration at the national control station, is a single variable, the solution is obtained using the single dependent variable partial least squares method.
[0140] A regression equation is established based on the prediction stations with high correlation with the national control stations, and the prediction stations with a large impact on the pollutant concentration of the national control stations are screened out, so that the established early warning model can make more accurate predictions for the national control stations.
[0141] The embodiment of the present invention obtains the target pollutant concentration data of the national control station under each wind direction and the prediction station whose correlation is higher than the correlation threshold, so that the correlation between the pollutant concentration data of the national control station and the prediction station is higher, and the selected pollutant concentration data is more in line with the actual situation. The standardized matrix of the target pollutant concentration data of the prediction station is subjected to principal component analysis to eliminate the collinearity between the prediction stations and make the prediction model more accurate. The linear regression equation is established using the standardized matrix of the target pollutant concentration data of the national control station and the principal component, and the regression coefficient of the principal component is solved by the least squares method to form an early warning model, so that the prediction of pollutants is more accurate.
[0142] In other possible ways, the partial least squares method can be used in other ways. This application mainly uses the partial least squares method as an example for explanation.
[0143] In other possible implementations, the weight coefficient of the prediction station is determined according to the distance between each prediction station and the national control station, and the early warning model is determined according to each prediction station, the regression coefficient and the weight coefficient. The specific formula is as follows:
[0144]
[0145] In the formula, E(y), E(x i ) are the average values of pollutant concentration data of national monitoring stations and forecast stations, respectively. y , are the standard deviation of pollutant concentration data of national monitoring stations and forecast stations, respectively, a1,…,a p are standardized regression coefficients, b1,…,b p is the weight coefficient of the prediction station.
[0146] See also Figure 2 , which shows a flow chart of an air pollutant early warning method provided by an embodiment of the present invention, and is described in detail as follows:
[0147] Step 201: Obtain the current wind direction and pollutant concentration data of each forecast station.
[0148] Specifically, pollutant concentration data of national control stations and prediction stations in the target city can be collected on the FTP server side.
[0149] Step 202: Determine the corresponding target prediction station according to the current wind direction, and obtain the corresponding warning model according to the target prediction station.
[0150] The early warning model is determined based on the target prediction station. The pollutant concentrations of the national control station and the target prediction station have a higher correlation. The prediction stations that have a great impact on the pollutant concentrations of the national control station are screened out. The early warning model can effectively use wind direction data to guide the prediction and early warning of pollutant concentrations, thereby improving the scientificity and foresight of environmental management.
[0151] Step 203: Input the pollutant concentration data of the target prediction station into the early warning model, output the predicted pollutant concentration of the national control station, and issue a high-value pollutant concentration warning when the predicted pollutant concentration exceeds the pollutant concentration threshold.
[0152] The pollutant concentration data of the target prediction station is input into the early warning model, and the predicted pollutant concentration of the national control station is output. The early warning model can accurately predict the pollutant concentration of the national control station and issue a warning in time when the pollutant concentration exceeds the safety threshold, thereby protecting public health and environmental safety.
[0153] The embodiment of the present invention determines the corresponding target prediction station according to the current wind direction, determines the early warning model according to the target prediction station, and the correlation between the pollutant concentrations of the national control station and the target prediction station is higher. The prediction station with a large impact on the pollutant concentration of the national control station is screened out, making the early warning model more accurate, thereby making the monitoring of pollutants more accurate. The pollutant concentration data of the target prediction station is input into the early warning model, and the predicted pollutant concentration of the national control station is output. It is determined whether an early warning is needed based on the predicted pollutant concentration of the national control station, which facilitates the monitoring of pollutants at the national control station.
[0154] In a possible implementation, the pollutants include particulate matter and gaseous pollutants.
[0155] Air pollutants refer to substances in the atmosphere that have adverse effects on human health, ecosystems, and climate. Common air pollutants include particulate matter (such as PM10, PM2.5), gaseous pollutants (such as sulfur dioxide, carbon monoxide, nitrogen dioxide, ozone, and hydrocarbons, etc.). These pollutants can affect human health and the environment to varying degrees, either alone or in combination, so it is necessary to monitor whether they exceed the standard to protect human health and the environment.
[0156] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0157] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.
[0158] Figure 3 The schematic diagram of the structure of the air pollutant early warning model building device provided by the embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0159] like Figure 3 As shown, the air pollutant early warning model building device 3 includes:
[0160] The target pollutant concentration data acquisition module 31 is used to acquire the target pollutant concentration data of the national control station in each wind direction and the forecast station with a correlation higher than the correlation threshold;
[0161] The principal component extraction module 32 is used to standardize the target pollutant concentration data of the national control station and the prediction station whose correlation is higher than the correlation threshold under each wind direction, respectively form a standardized matrix of the target pollutant concentration data of the national control station and a standardized matrix of the target pollutant concentration data of the prediction station, and extract the principal component from the standardized matrix of the target pollutant concentration data of the prediction station; wherein the principal component is part of the prediction stations among the prediction stations whose correlation is higher than the correlation threshold;
[0162] The early warning model constitutes a module 33, which is used to utilize the cross-validation analysis satisfaction value. When the satisfaction condition is reached, the extracted components are determined, a linear regression equation is established based on the standardized matrix of the target pollutant concentration data of the national control station and the principal component, and the regression coefficient of the principal component is solved by the least squares method to form an early warning model; wherein the early warning model takes the pollutant concentration data of the prediction station as input and the predicted pollutant concentration of the national control station as output.
[0163] The embodiment of the present invention obtains the target pollutant concentration data of the national control station under each wind direction and the prediction station whose correlation is higher than the correlation threshold, so that the correlation between the pollutant concentration data of the national control station and the prediction station is higher, and the selected pollutant concentration data is more in line with the actual situation. The standardized matrix of the target pollutant concentration data of the prediction station is subjected to principal component analysis to eliminate the collinearity between the prediction stations and make the prediction model more accurate. The linear regression equation is established using the standardized matrix of the target pollutant concentration data of the national control station and the principal component, and the regression coefficient of the principal component is solved by the least squares method to form an early warning model, so that the prediction of pollutants is more accurate.
[0164] Figure 4 The schematic diagram of the structure of the air pollutant early warning model building device provided by the embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0165] like Figure 4 As shown, the air pollutant warning device 4 includes:
[0166] The pollutant concentration data acquisition module 41 is used to obtain the current wind direction and the pollutant concentration data of each forecast station;
[0167] The early warning model acquisition module 42 is used to determine the corresponding target prediction station according to the current wind direction, and acquire the corresponding early warning model according to the target prediction station;
[0168] The pollutant concentration high value warning module 43 is used to input the pollutant concentration data of the target prediction station into the warning model, output the predicted pollutant concentration of the national control station, and issue a pollutant concentration high value warning when the predicted pollutant concentration exceeds the pollutant concentration threshold.
[0169] The embodiment of the present invention determines the corresponding target prediction station according to the current wind direction, determines the early warning model according to the target prediction station, and the correlation between the pollutant concentrations of the national control station and the target prediction station is higher. The prediction station with a large impact on the pollutant concentration of the national control station is screened out, making the early warning model more accurate, thereby making the monitoring of pollutants more accurate. The pollutant concentration data of the target prediction station is input into the early warning model, and the predicted pollutant concentration of the national control station is output. It is determined whether an early warning is needed based on the predicted pollutant concentration of the national control station, which facilitates the monitoring of pollutants at the national control station.
[0170] Figure 5 is a schematic diagram of a terminal provided by an embodiment of the present invention. Figure 5 As shown, the terminal 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50. When the processor 50 executes the computer program 52, the steps in the above-mentioned air pollutant early warning model construction method and early warning method embodiments are implemented, such as Figure 1 , Figure 2 Alternatively, when the processor 50 executes the computer program 52, the functions of the modules in the above-mentioned device embodiments are realized, for example Figure 3 , Figure 4 The functions of each module are shown.
[0171] Exemplarily, the computer program 52 may be divided into one or more modules, which are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 52 in the terminal 5. For example, the computer program 52 may be divided into Figure 3 , Figure 4 The modules shown.
[0172] The terminal 5 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 It is only an example of terminal 5 and does not constitute a limitation on terminal 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
[0173] The processor 50 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 any conventional processor, etc.
[0174] The memory 51 may be an internal storage unit of the terminal 5, such as a hard disk or memory of the terminal 5. The memory 51 may also be an external storage device of the terminal 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal 5. Further, the memory 51 may also include both an internal storage unit of the terminal 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the terminal. The memory 51 may also be used to temporarily store data that has been output or is to be output.
[0175] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0176] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0177] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are 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 be beyond the scope of the present invention.
[0178] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0179] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0180] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0181] If the integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned air pollutant early warning model construction method and early warning method embodiment can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable media does not include electrical carrier signals and telecommunication signals.
[0182] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those 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. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for constructing an air pollutant early warning model, characterized in that: include: Obtain target pollutant concentration data for each national control station in each wind direction and the forecast station with correlation higher than the correlation threshold; Standardize the target pollutant concentration data of the national control station under each wind direction and the forecast station with correlation higher than the correlation threshold, respectively form a standardized matrix of the target pollutant concentration data of the national control station and a standardized matrix of the target pollutant concentration data of the forecast station, and extract the principal component from the standardized matrix of the target pollutant concentration data of the forecast station; wherein the principal component is part of the forecast stations among the forecast stations with correlation higher than the correlation threshold; The satisfaction value is analyzed by cross-validation. When the satisfactory conditions are met, the extracted components are determined. A linear regression equation is established based on the standardized matrix of the target pollutant concentration data of the national control station and the principal components. The regression coefficient of the principal component is solved by the least squares method to form an early warning model. Among them, the early warning model takes the pollutant concentration data of the prediction station as input and the predicted pollutant concentration of the national control station as output.
2. The method for constructing an air pollutant early warning model according to claim 1, characterized in that: The target pollutant concentration data of the national control station and the forecast station with correlation higher than the correlation threshold under each wind direction are obtained, including: Obtain pollutant concentration data and meteorological data from national control stations and all forecast stations; meteorological data includes wind direction; Perform high-value dynamic identification on the pollutant concentration data of the national control station and all forecast stations, and obtain the pollutant concentration data of the high-value period of the national control station and the high-value period of the forecast station; For each wind direction, the pollutant concentration data of the high value period of the national control station are correlated with the air pollutant concentration data of the high value period of the forecast station located upwind of the national control station in the previous set time period according to the set time period. According to the correlation calculation results, the target pollutant concentration data of the forecast station whose correlation with the national control station is higher than the correlation threshold are selected.
3. The method for constructing an air pollutant early warning model according to claim 2, characterized in that: The high-value dynamic identification of pollutant concentration data of national control stations and all forecast stations includes: Based on the window function, the pollutant concentration data of the national control station and all forecast stations are slid to divide the pollutant concentration data into several areas; Calculate the arithmetic mean of the pollutant concentration data in the current area, calculate the standard deviation based on the arithmetic mean, and calculate the fluctuation based on the standard deviation; According to the arithmetic mean of the pollutant concentration data in the current area, the absolute value of the difference between the arithmetic mean of the pollutant concentration data outside the current area and the pollutant concentration data in the current area is calculated; The signal value of the pollutant concentration data outside the current area is set according to the absolute value of the difference between the pollutant concentration data outside the current area and the arithmetic mean value of the pollutant concentration data within the current area, the fluctuation amount, and the standard deviation; The pollutant concentration data sequence is determined according to the signal value of the pollutant concentration data outside the current area.
4. The method for constructing an air pollutant early warning model according to claim 3, characterized in that: The step of setting the signal value of the pollutant concentration data outside the current area according to the absolute value of the difference between the pollutant concentration data outside the current area and the arithmetic mean value of the pollutant concentration data within the current area, the fluctuation amount, and the standard deviation includes: If the absolute value of the difference between the arithmetic mean of the pollutant concentration data outside the current area and the pollutant concentration data within the current area is greater than the fluctuation amount of the pollutant concentration data within the current area, and the pollutant concentration data is greater than the arithmetic mean of the pollutant concentration data within the current area, then the signal value of the pollutant concentration data is set to a high value signal; If the absolute value of the difference between the arithmetic mean of the pollutant concentration data outside the current area and the pollutant concentration data within the current area is greater than the fluctuation amount of the pollutant concentration data within the current area, and the pollutant concentration data is less than the arithmetic mean of the pollutant concentration data within the current area, then the signal value of the pollutant concentration data is set to a low value signal; If the absolute value of the difference between the arithmetic mean values of the pollutant concentration data outside the current area and the pollutant concentration data within the current area is smaller than the fluctuation amount of the pollutant concentration data within the current area, the signal value of the pollutant concentration data is set to be a flat signal.
5. The method for constructing an air pollutant early warning model according to claim 3, characterized in that: The step of determining the pollutant concentration data sequence according to the signal value of the pollutant concentration data outside the current area includes: When the pollutant concentration data outside the current area is a high value signal or a low value signal, the pollutant concentration data sequence outside the current area is: filteredY(n+i)=influence*y(n+1)+(1-influence)*filteredY(n),…influence*y(n+i)+(1-influence)*filteredY(n); When the pollutant concentration data outside the current area is a flat signal, the pollutant concentration data sequence outside the current area is: filteredY(n+i)=y(n+1),...y(n+i); Circularly calculate the signal value of the pollutant concentration data of the next area; In the formula, filteredY(n+i) is the pollutant concentration data sequence outside the current area, influence is the influence parameter, y(n+i) is the pollutant concentration data outside the current area, and filteredY(n) is the pollutant concentration data sequence within the current area.
6. The method for constructing an air pollutant early warning model according to claim 2, characterized in that: Before obtaining the pollutant concentration data and meteorological data of the national control station and all forecast stations, the pollutant concentration data and meteorological data are cleaned: Eliminate null values, zero values, and negative values in pollutant concentration data and meteorological data; Remove pollutant concentration data and meteorological data that are insufficiently effective; Stinterp is used to interpolate pollutant concentration data and meteorological data that are not aligned in time, and to extract pollutant concentration data in the correct time series; The pollutant concentration data and meteorological data of the national control station and all forecast stations are averaged over one hour.
7. An air pollutant early warning method based on the early warning model constructed by the air pollutant early warning model construction method according to any one of claims 1 to 6, characterized in that: include: Obtain current wind direction and pollutant concentration data for each forecast station; Determine the corresponding target forecast station according to the current wind direction, and obtain the corresponding warning model according to the target forecast station; The pollutant concentration data of the target prediction station is input into the early warning model, and the predicted pollutant concentration of the national control station is output. When the predicted pollutant concentration exceeds the pollutant concentration threshold, a high pollutant concentration warning is issued.
8. The air pollutant early warning method according to claim 7, characterized in that: Pollutants include particulate matter and gaseous pollutants.
9. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method as claimed in any one of claims 1 to 8 are implemented.