Atmospheric pollution simulation evaluation method and device based on image processing and electronic equipment

Based on image -based methods to generate and analyze air pollution simulation images, the problem of low air pollution simulation assessment accuracy in existing technologies has been solved, and higher evaluation accuracy is achieved.

CN119380852AActive Publication Date: 2025-01-28INST OF ATMOSPHERIC PHYSICS CHINESE ACADEMY SCI
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411403795.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-01-28
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

The prior art is difficult to accurately evaluate the spatial distribution characteristics of polluted objects in air pollution simulation assessment, resulting in low accuracy of the evaluation results.

Method used

The use of image processing is used to obtain target forecast data and observation data, generate forecast images and observation images, and perform feature extraction to determine the similarity between forecasting characteristics and observation characteristics, and then evaluate the results of air pollution simulation.

Benefits of technology

Through image processing technology, the spatial distribution characteristics of pollution objects can be more accurately evaluated, and the accuracy of air pollution simulation assessment can be improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119380852A_ABST
    Figure CN119380852A_ABST
Patent Text Reader

Abstract

The invention provides an air pollution simulation evaluation method and device based on image processing and electronic equipment. The method comprises the steps that target forecast data and target observation data are acquired; generating a target forecast image based on the target forecast data, and generating a target observation image based on the target observation data, the target forecast image and the target observation image having the same image size; performing feature extraction on the target forecast image to obtain a forecast feature extraction result of the target forecast image, and performing feature extraction on the target observation image to obtain an observation feature extraction result of the target observation image; and determining target similarity judgment information between the target forecast data and the target observation data based on the forecast feature extraction result and the observation feature extraction result. According to the embodiment of the invention, the accuracy of atmospheric pollution simulation evaluation can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of air quality technology, and in particular to an atmospheric pollution simulation assessment method, device and electronic equipment based on image processing. Background Art

[0002] The evaluation and verification of numerical forecasts is an important part of the application of numerical models; however, related technologies usually use objective statistical tests with observation data as the true value to achieve air pollution simulation evaluation, such as absolute measurement methods based on root mean square error, that is, usually through point-to-point verification (such as point-to-point comparison between station data and forecast data) to achieve air pollution simulation evaluation, which makes it difficult to evaluate the spatial distribution characteristics of pollution objects, resulting in low accuracy of air pollution simulation evaluation results. Based on this, there is currently no good solution for how to improve the accuracy of air pollution simulation evaluation. Summary of the invention

[0003] In view of this, the embodiments of the present invention provide an atmospheric pollution simulation and assessment method, device and electronic device based on image processing to solve the problems such as low accuracy of atmospheric pollution simulation and assessment caused by related technologies; that is, the embodiments of the present invention can perform atmospheric pollution simulation and assessment through target forecast images and target observation images, that is, the spatial distribution characteristics of the target pollution object can be assessed through the forecast feature extraction results and the observation feature extraction results, and then the target atmospheric pollution simulation and assessment results with higher accuracy can be determined through the forecast feature extraction results and the observation feature extraction results, which can effectively improve the accuracy of atmospheric pollution simulation and assessment.

[0004] According to one aspect of an embodiment of the present invention, there is provided an atmospheric pollution simulation assessment method based on image processing, the method comprising:

[0005] Acquiring target forecast data and target observation data, wherein the target forecast data includes forecast information of the target pollutant in each grid area in the target area, the target forecast data is forecasted by a target numerical model, and the target observation data includes observation information of the target pollutant in each grid area;

[0006] Generate a target prediction image based on the target prediction data, and generate a target observation image based on the target observation data, wherein the target prediction image and the target observation image have the same image size;

[0007] Performing feature extraction on the target prediction image to obtain a prediction feature extraction result of the target prediction image, and performing feature extraction on the target observation image to obtain an observation feature extraction result of the target observation image;

[0008] Determining target similarity judgment information between the target forecast data and the target observation data based on the forecast feature extraction result and the observation feature extraction result;

[0009] Based on the target similarity judgment information, a target air pollution simulation evaluation result is determined, and the target air pollution simulation evaluation result supports indicating a simulation effect of the target numerical model on the target pollution object.

[0010] According to another aspect of an embodiment of the present invention, there is provided an atmospheric pollution simulation and evaluation device based on image processing, the device comprising:

[0011] an acquisition unit, configured to acquire target forecast data and target observation data, wherein the target forecast data includes forecast information of the target pollutant in each grid area in the target area, the target forecast data is forecasted by a target numerical model, and the target observation data includes observation information of the target pollutant in each grid area;

[0012] a processing unit, configured to generate a target prediction image based on the target prediction data, and to generate a target observation image based on the target observation data, wherein the target prediction image and the target observation image have the same image size;

[0013] The processing unit is further used to perform feature extraction on the target prediction image to obtain a prediction feature extraction result of the target prediction image, and perform feature extraction on the target observation image to obtain an observation feature extraction result of the target observation image;

[0014] The processing unit is further used to determine target similarity judgment information between the target forecast data and the target observation data based on the forecast feature extraction result and the observation feature extraction result;

[0015] The processing unit is further used to determine a target air pollution simulation evaluation result based on the target similarity judgment information, and the target air pollution simulation evaluation result supports indicating a simulation effect of the target numerical model on the target pollution object.

[0016] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising a processor and a memory storing a program, wherein the program comprises instructions, which, when executed by the processor, enable the processor to perform the above-mentioned method.

[0017] According to another aspect of an embodiment of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above-mentioned method.

[0018] The embodiment of the present invention can generate a target forecast image based on the target forecast data and a target observation image based on the target observation data after acquiring the target forecast data and acquiring the target observation data; the target forecast data includes forecast information of the target pollutant in each grid area in the target area, the target forecast data is forecasted by the target numerical model, and the target observation data includes observation information of the target pollutant in each grid area, and the image size of the target forecast image and the target observation image are the same. Then, feature extraction can be performed on the target forecast image to obtain a forecast feature extraction result of the target forecast image, and feature extraction can be performed on the target observation image to obtain an observation feature extraction result of the target observation image. Further, based on the forecast feature extraction result and the observation feature extraction result, target similarity judgment information between the target forecast data and the target observation data can be determined; and based on the target similarity judgment information, a target atmospheric pollution simulation evaluation result can be determined, and the target atmospheric pollution simulation evaluation result supports the simulation effect of indicating the target numerical model on the target pollutant. It can be seen that the embodiments of the present invention can perform atmospheric pollution simulation assessment through target forecast images and target observation images, that is, the spatial distribution characteristics of the target pollution object can be assessed through the forecast feature extraction results and the observation feature extraction results, and then the target atmospheric pollution simulation assessment results with higher accuracy can be determined through the forecast feature extraction results and the observation feature extraction results, which can effectively improve the accuracy of atmospheric pollution simulation assessment. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Further details, features and advantages of the invention are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0020] Figure 1 A schematic flow chart of an atmospheric pollution simulation and evaluation method based on image processing according to an exemplary embodiment of the present invention is shown;

[0021] Figure 2 A schematic flow chart of another method for simulating and evaluating air pollution based on image processing according to an exemplary embodiment of the present invention is shown;

[0022] Figure 3 A schematic flow chart of another method for simulating and evaluating air pollution based on image processing according to an exemplary embodiment of the present invention is shown;

[0023] Figure 4 A schematic block diagram of an atmospheric pollution simulation and evaluation device based on image processing according to an exemplary embodiment of the present invention is shown;

[0024] Figure 5 A block diagram of an exemplary electronic device that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0025] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.

[0026] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0027] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.

[0030] It should be noted that the execution subject of the air pollution simulation assessment method based on image processing provided by the embodiment of the present invention may be one or more electronic devices, and the present invention does not limit this; wherein, the electronic device may be a terminal (i.e., a client) or a server, then when the execution subject includes multiple electronic devices, and the multiple electronic devices include at least one terminal and at least one server, the air pollution simulation assessment method based on image processing provided by the embodiment of the present invention may be jointly executed by the terminal and the server. Accordingly, the terminal mentioned here may include but is not limited to: a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like; the server mentioned here may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing (cloud computing), cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, and the like.

[0031] Based on the above description, an embodiment of the present invention proposes an atmospheric pollution simulation and assessment method based on image processing, which can be executed by the electronic device (terminal or server) mentioned above; or, the atmospheric pollution simulation and assessment method based on image processing can be executed by the terminal and the server together. For the sake of convenience, the following description will be given by taking the electronic device executing the atmospheric pollution simulation and assessment method based on image processing as an example; Figure 1 As shown, the atmospheric pollution simulation assessment method based on image processing may include the following steps S101-S105:

[0032] S101, obtaining target forecast data and target observation data, wherein the target forecast data includes forecast information of target pollutants in each grid area in the target area, the target forecast data is forecasted by a target numerical model, and the target observation data includes observation information of target pollutants in each grid area.

[0033] Optionally, the target pollution object can be any pollutant (such as PM 10 (inhalable particulate matter), PM 2.5 (fine particulate matter), CO (carbon monoxide) or O 3(ozone), etc.), or AQI (Air Quality Index), etc., which is not limited in the embodiment of the present invention. Optionally, the target area can be any area, which is not limited in the embodiment of the present invention; illustratively, the target area can be nationwide, or it can be the area where a province is located, and so on. Optionally, the target forecast data and the target observation data can be data for the target area within a target time range, and the target time range can be any time range, that is, the target forecast data and the target observation data can be data for the target area within the same time range; that is, the target forecast data can be forecast data for the target area within the target time range through a target numerical mode, and the target observation data can be monitoring data (that is, observation data) for the target area within the target time range, and so on; this is not limited in the embodiment of the present invention. Optionally, the target numerical mode can be any numerical mode, that is, it can be any air quality numerical mode, which is not limited in the embodiment of the present invention.

[0034] Optionally, the target area may include multiple grid areas, and each grid area in the target area may be each grid area in the multiple grid areas; optionally, the resolution of the target area (i.e., the grid area division method) may be set according to experience or according to actual needs, and the embodiments of the present invention are not limited to this.

[0035] In the embodiment of the present invention, the target forecast data may be obtained in the following ways, but not limited to:

[0036] The first acquisition method: the electronic device's own storage space may store forecast data for the target area within multiple time ranges. In this case, the electronic device may select the forecast data for the target area within the target time range from the forecast data for the target area within multiple time ranges to use the forecast data for the target area within the target time range as the target forecast data. The multiple time ranges may include the target time range.

[0037] The second acquisition method: the electronic device can obtain a target forecast data download link, and download the target forecast data based on the target forecast data download link to achieve acquisition of the target forecast data, and so on.

[0038] Accordingly, the target observation data may be obtained in the following ways, including but not limited to:

[0039] The first acquisition method: the observation data of the target area within multiple time ranges can be stored in the electronic device's own storage space. In this case, the electronic device can select the observation data of the target area within the target time range from the observation data of the target area within multiple time ranges, and use the observation data of the target area within the target time range as the target observation data.

[0040] The second acquisition method: the electronic device can obtain the target observation data download link, and download the target observation data based on the target observation data download link to achieve the acquisition of the target observation data. Optionally, the electronic device can also obtain the data integration download link, and use the forecast data in the data downloaded based on the data integration download link as the target forecast data, and use the observation data in the data downloaded based on the data integration download link as the target observation data.

[0041] The third acquisition method: the electronic device can obtain the observation site data of the target area within the target time range, and the observation site data includes the observation values ​​of the target pollutant at each of the multiple observation sites included in the target area; based on this, the target observation data can be determined based on the observation site data, that is, the observation site data can be interpolated into spatial data with the same resolution as the target forecast data (also referred to as the target forecast field) through the spatial interpolation method, so as to obtain the target observation data, etc. Exemplarily, for any grid area in the target area, the electronic device can determine the first W observation sites closest to any grid area from the multiple observation sites, and perform weighted summation on the observation values ​​of the target pollutant at each of the first W observation sites, so as to obtain the observation information of the target pollutant in any grid area, so as to obtain the target observation data, W is a positive integer; optionally, the weight of each observation site in the first W observation sites can be the same (such as mean operation, etc.), or can be the inverse of the distance between any grid area, etc., which is not limited in the embodiment of the present invention.

[0042] S102, generating a target prediction image based on the target prediction data, and generating a target observation image based on the target observation data, wherein the target prediction image and the target observation image have the same image size.

[0043] In an embodiment of the present invention, the electronic device may determine the target image size, and determine the mapping pixel points of each grid area according to the target image size; optionally, the target image size may be set according to experience or according to actual needs, and the embodiment of the present invention does not limit this. Based on this, for any grid area in the target area, the electronic device may determine the mapping pixel points of any grid area based on the area position information and the target image size of any grid area; that is, the mapping horizontal coordinate and mapping vertical coordinate of any grid area may be determined, and the pixel point closest to the coordinate point formed by the mapping horizontal coordinate and mapping vertical coordinate of any grid area may be determined from the pixel coordinate system, so as to use the determined pixel point as the mapping pixel point of any grid area. Among them, the target image size may be used to indicate the maximum horizontal coordinate and the maximum vertical coordinate of the image (e.g., when the target image size is 1000×900, the maximum horizontal coordinate of the image may be 1000, and the maximum vertical coordinate of the image may be 900).

[0044] Optionally, when determining the mapping horizontal coordinate and mapping vertical coordinate of any grid area, the mapping horizontal coordinate of any grid area can be calculated based on the horizontal coordinate in the area position information of any grid area, the maximum horizontal coordinate of the image and the maximum horizontal coordinate of the target area; and the mapping vertical coordinate of any grid area can be calculated based on the vertical coordinate in the area position information of any grid area, the maximum vertical coordinate of the image and the maximum vertical coordinate of the target area. Optionally, the regional position information of any grid area can be the coordinates of the center point of any grid area (i.e., the coordinates of the center point in the plane rectangular coordinate system), in which case the regional maximum horizontal coordinate of the target area can be the maximum horizontal coordinate of the center point coordinates of each grid area, and the regional maximum vertical coordinate of the target area can be the maximum vertical coordinate of the center point coordinates of each grid area; or, the regional position information of any grid area can be the grid number (i.e., grid coordinates) of any grid area, such as when any grid area is a grid area of ​​the i-th row and the j-th column, the grid number of any grid area can be (i, j), in which case the horizontal coordinate in the regional position information of any grid area can be i, the vertical coordinate in the regional position information of any grid area can be j, the regional maximum horizontal coordinate of the target area can be I, the regional maximum vertical coordinate of the target area can be J, and so on; the embodiment of the present invention does not limit this. Wherein, I is the number of grid areas of the target area in the horizontal direction, and J is the number of grid areas of the target area in the vertical direction.

[0045] Optionally, when calculating the mapped horizontal coordinate of any grid area based on the horizontal coordinate in the area position information of any grid area, the maximum horizontal coordinate of the image and the maximum horizontal coordinate of the area, the ratio between the maximum horizontal coordinate of the image and the maximum horizontal coordinate of the area can be multiplied with the horizontal coordinate in the area position information of any grid area to obtain the mapped horizontal coordinate of any grid area. Optionally, when the area position information of any grid area is the coordinate of the center point of any grid area, the ratio between the maximum vertical coordinate of the image and the maximum vertical coordinate of the area can be multiplied with the vertical coordinate in the area position information of any grid area to obtain the vertical coordinate multiplication result, and the difference between the maximum vertical coordinate of the image and the vertical coordinate multiplication result is used as the mapped vertical coordinate of any grid area; when the area position information of any grid area is the grid number of any grid area, the ratio between the maximum vertical coordinate of the image and the maximum vertical coordinate of the area can be multiplied with the vertical coordinate in the area position information of any grid area to obtain the mapped vertical coordinate of any grid area (that is, the vertical coordinate multiplication result can be used as the mapped vertical coordinate of any grid area).

[0046] Further, the electronic device may determine the predicted pixel value of each pixel in the target prediction image based on the mapped pixel points of each grid area and the target prediction data (i.e., determine the predicted pixel value of each pixel among the multiple pixel points indicated by the target image size, so as to use the predicted pixel value of each pixel point as the pixel value of the corresponding pixel point in the target prediction image), so as to realize the generation of the target prediction image; wherein, the predicted pixel value of a pixel point is determined based on the prediction information in each grid area of ​​at least one grid area where the mapped pixel point is the corresponding pixel point. In other words, for any pixel in the target prediction image (i.e., any pixel among the multiple pixel points), the electronic device may determine at least one grid area where the mapped pixel point is any pixel point from the target area based on the mapped pixel points of each grid area, so as to determine the predicted pixel value of any pixel point based on the prediction information in each grid area of ​​at least one grid area where the mapped pixel point is any pixel point. Optionally, the electronic device may use the average value of the forecast information in each grid area of ​​at least one grid area where the mapped pixel point is any pixel point as the forecast pixel value of any pixel point; or, may use the maximum value of the forecast information in each grid area of ​​at least one grid area where the mapped pixel point is any pixel point as the forecast pixel value of any pixel point; or, if the average value of the forecast information in each grid area of ​​at least one grid area where the mapped pixel point is any pixel point is greater than or equal to a preset pollutant concentration threshold, then use the average value of the forecast information in each grid area where the mapped pixel point is any pixel point as the forecast pixel value of any pixel point. value, if the average value between the forecast information in each grid area where the mapped pixel point is any pixel point is less than the preset pollutant concentration threshold, the first preset pixel value is used as the forecast pixel value of any pixel point; or, if the average value between the forecast information in each grid area where the mapped pixel point is any pixel point is greater than or equal to the preset pollutant concentration threshold, the second preset pixel value is used as the forecast pixel value of any pixel point; if the average value between the forecast information in each grid area where the mapped pixel point is any pixel point is less than the preset pollutant concentration threshold, the first preset pixel value is used as the forecast pixel value of any pixel point, and so on; the embodiment of the present invention does not limit this. Optionally, the preset pollutant concentration threshold, the first preset pixel value and the second preset pixel value can all be set according to experience or according to actual needs, and the embodiment of the present invention does not limit this; for example, the first preset pixel value can be 255, and the second preset pixel value can be 0. Among them, the above-mentioned preset pollutant concentration threshold can be the preset pollutant concentration threshold corresponding to the target pollutant; the preset pollutant concentration thresholds corresponding to different pollutants can be the same or different, and the embodiment of the present invention does not limit this.

[0047] Accordingly, the electronic device can determine the observed pixel value of each pixel in the target observation image (i.e., determine the pixel value of each pixel in the target observation image) based on the mapped pixel points and the target observation data of each grid area, so as to realize the generation of the target observation image; wherein the observed pixel value of a pixel is determined based on the observation information in each grid area of ​​at least one grid area where the mapped pixel point is the corresponding pixel point. It should be understood that the method for determining the observed pixel value of each pixel in the target observation image can be the same as the method for determining the predicted pixel value of each pixel in the target prediction image, and the embodiments of the present invention will not be repeated here.

[0048] It should be understood that an image (such as a target prediction image or a target observation image, etc.) may include multiple pixel points, that is, an image may include multiple pixel points indicated by the target image size, that is, each pixel point in the target prediction image and each pixel point in the target observation image may be each pixel point among multiple pixel points, so that the predicted pixel value of each pixel point can be used as the pixel value of the corresponding pixel point in the target prediction image, and the observed pixel value of each pixel point can be used as the pixel value of the corresponding pixel point in the target observation image.

[0049] S103, performing feature extraction on the target prediction image to obtain a prediction feature extraction result of the target prediction image, and performing feature extraction on the target observation image to obtain an observation feature extraction result of the target observation image.

[0050] S104, determining target similarity judgment information between the target forecast data and the target observation data based on the forecast feature extraction result and the observation feature extraction result.

[0051] S105, based on the target similarity judgment information, determining a target air pollution simulation evaluation result, wherein the target air pollution simulation evaluation result supports a simulation effect of a target numerical model on a target pollution object.

[0052] Optionally, if the target similarity judgment information is greater than or equal to a preset similarity judgment threshold, the electronic device may use the first simulation effect indication information as the target air pollution simulation evaluation result; if the target similarity judgment information is less than the preset similarity judgment threshold, the second simulation effect indication information is used as the target air pollution simulation evaluation result; wherein the first simulation effect indication information can be used to indicate that the simulation effect is good (i.e., it can be used to indicate that the similarity between the target forecast data and the target observation data is high), and the second simulation effect indication information can be used to indicate that the simulation effect is poor (i.e., it can be used to indicate that the similarity between the target forecast data and the target observation data is low). Optionally, the preset similarity judgment threshold, the first simulation effect indication information, and the second simulation effect indication information can all be set according to experience or according to actual needs, and the embodiments of the present invention are not limited to this.

[0053] In other embodiments, the electronic device may also use the target similarity judgment information as the target atmospheric pollution simulation evaluation result; for example, the larger the target atmospheric pollution simulation evaluation result, the better the simulation effect, so the quality of the simulation effect can be determined based on the size of the target atmospheric pollution simulation evaluation result, and so on.

[0054] The embodiment of the present invention can generate a target forecast image based on the target forecast data and a target observation image based on the target observation data after acquiring the target forecast data and acquiring the target observation data; the target forecast data includes forecast information of the target pollutant in each grid area in the target area, the target forecast data is forecasted by the target numerical model, and the target observation data includes observation information of the target pollutant in each grid area, and the image size of the target forecast image and the target observation image are the same. Then, feature extraction can be performed on the target forecast image to obtain a forecast feature extraction result of the target forecast image, and feature extraction can be performed on the target observation image to obtain an observation feature extraction result of the target observation image. Further, based on the forecast feature extraction result and the observation feature extraction result, target similarity judgment information between the target forecast data and the target observation data can be determined; and based on the target similarity judgment information, a target atmospheric pollution simulation evaluation result can be determined, and the target atmospheric pollution simulation evaluation result supports the simulation effect of indicating the target numerical model on the target pollutant. It can be seen that the embodiments of the present invention can perform atmospheric pollution simulation assessment through target forecast images and target observation images, that is, the spatial distribution characteristics of the target pollution object can be assessed through the forecast feature extraction results and the observation feature extraction results, and then the target atmospheric pollution simulation assessment results with higher accuracy can be determined through the forecast feature extraction results and the observation feature extraction results, which can effectively improve the accuracy of atmospheric pollution simulation assessment.

[0055] Based on the above description, the embodiment of the present invention also proposes a more specific method for simulating and evaluating air pollution based on image processing. Accordingly, the method for simulating and evaluating air pollution based on image processing can be executed by the electronic device (terminal or server) mentioned above; or, the method for simulating and evaluating air pollution based on image processing can be executed jointly by the terminal and the server. For the sake of convenience, the following description will be given by taking the electronic device executing the method for simulating and evaluating air pollution based on image processing as an example; please refer to Figure 2 The atmospheric pollution simulation assessment method based on image processing may include the following steps S201-S208:

[0056] S201, obtaining target forecast data and target observation data, wherein the target forecast data includes forecast information of the target pollutant in each grid area in the target area, the target forecast data is forecasted by a target numerical model, and the target observation data includes observation information of the target pollutant in each grid area.

[0057] S202, generating a target prediction image based on the target prediction data, and generating a target observation image based on the target observation data, wherein the target prediction image and the target observation image have the same image size.

[0058] S203, performing spot detection on the target prediction image to obtain spot features of each prediction spot in at least one prediction spot.

[0059] Among them, spots usually refer to connected pixels in an image, which have similar attributes (such as color or brightness, etc.), that is, spots usually refer to areas that have color and grayscale differences from the surrounding areas.

[0060] Optionally, the electronic device may perform spot detection on the target prediction image by using a target spot detection algorithm to obtain spot features of each prediction spot in at least one prediction spot, and each prediction spot is a spot in the target prediction image. Optionally, the target spot detection algorithm may be a SimpleBlobDetector algorithm (a spot detection algorithm), or a Laplace of Gaussian (LOG) spot detection algorithm, etc.; this is not limited in the embodiment of the present invention. Exemplarily, the SimpleBlobDetector algorithm is taken as an example to illustrate that the SimpleBlobDetector algorithm is good at detecting spots of various shapes and sizes. The SimpleBlobDetector algorithm can accurately identify spots with clear edges and obvious contrast with the surrounding areas. Among them, when using the SimpleBlobDetector algorithm for spot detection, first, the minimum and maximum thresholds can be set to perform threshold processing on the image, and the image can be converted into multiple binary images. These thresholds are incremented in a certain step size until the maximum threshold is reached. Secondly, in each binary image, the connected areas can be grouped together to form binary spots, and then the binary spot centers are calculated, and spots with closer centers are merged together. Finally, the algorithm performs feature description, calculates and returns the center and radius of the newly merged spots, etc., to achieve spot detection.

[0061] Optionally, the spot features of a spot (also referred to as a spot area) may include but are not limited to at least one of the following: the position (i.e., center), size (i.e., radius), direction, color, area, and standard deviation of pixel values ​​in the coverage area of ​​the corresponding spot, etc.; this is not limited in this embodiment of the present invention.

[0062] S204: Determine a prediction feature extraction result of the target prediction image based on the spot features of each prediction spot.

[0063] In one embodiment, the electronic device can determine the spot indication image of the target prediction image based on the spot features of each predicted spot and the target prediction image; based on this, key point detection can be performed on the spot indication image of the target prediction image to obtain the key point features of each predicted key point in at least one predicted key point in the spot indication image of the target prediction image, and based on the key point features of each predicted key point in the spot indication image of the target prediction image, the prediction feature extraction result of the target prediction image is determined.

[0064] Optionally, when determining the prediction feature extraction result of the target prediction image based on the key point features of each prediction key point in the spot indication image of the target prediction image, the electronic device may further perform key point detection on the target prediction image to obtain the key point features of each prediction key point in at least one prediction key point in the target prediction image, and add the key point features of each prediction key point in the target prediction image and the key point features of each prediction key point in the spot indication image of the target prediction image to the prediction feature extraction result of the target prediction image, so as to determine the prediction feature extraction result. At this time, the feature points of the target prediction image (that is, including each prediction key point in the target prediction image) can be fully extracted. The prediction key points and the spot indication image of the target prediction image are each prediction key point. At this time, the prediction feature extraction result may include the key point features of each prediction key point in the target prediction image and the key point features of each prediction key point in the spot indication image of the target prediction image), thereby further improving the accuracy of the feature extraction result; or, the key point features of each prediction key point in the spot indication image of the target prediction image can also be used as the prediction feature extraction result, that is, the key point features of each prediction key point can be added to the prediction feature extraction result. At this time, the prediction feature extraction result may include the key point features of each prediction key point, and so on; the embodiment of the present invention is not limited to this. Based on this, the approximate location of the target pollution object in the corresponding data (such as the target prediction data) can be represented by the pollution image (such as the target prediction image) and / or the spot indication image, so that the pollution area is carefully represented by key point detection and spot detection to achieve sufficient feature extraction, which can improve the accuracy of feature extraction.

[0065] Optionally, the electronic device may perform key point detection on the spot indication image and / or the target prediction image of the target prediction image through a target key point detection algorithm to obtain key point features of each prediction key point in at least one prediction key point (such as key point features of each prediction key point in the target prediction image and key point features of each prediction key point in the spot indication image of the target prediction image), each prediction key point in the spot indication image of the target prediction image is a key point in the spot indication image of the target prediction image, and each prediction key point in the target prediction image is a key point in the target prediction image. Optionally, the target key point detection algorithm may be a scale-invariant feature transform (SIFT) algorithm, etc., which is not limited in the embodiment of the present invention. Optionally, the key point features of a key point may include but are not limited to at least one of the following: the position, size, direction and descriptor (which may be a representation vector) of the corresponding key point, etc.; the embodiment of the present invention is not limited in this regard. Exemplarily, when the prediction feature extraction result includes key point features of each prediction key point, the key point features of a key point may include the descriptor of the corresponding key point. Among them, the SIFT algorithm can work stably under a variety of different image conditions and is good at extracting key points of corners, edges and repeated textures. The first step of the algorithm is to search for image positions at all scales and identify potential key points that are invariant to scale and rotation through the Gaussian difference function; the second step is to locate the key points. At each candidate position, the position and scale are determined by a finely fitted model. The selection of key points is based on their stability; the third step is to determine the direction of the key points. Based on the local gradient direction of the image, one or more directions are assigned to each key point position. All subsequent operations on the image data are transformed relative to the direction, scale and position of the key points, thereby ensuring invariance to these transformations; the fourth step is to describe the key points. In the neighborhood around each key point, the local gradient of the image is measured at the selected scale; finally, the SIFT algorithm can output the position, scale, direction and descriptor of the key points to achieve key point detection.

[0066] Optionally, the spot feature of a spot includes the center point and radius of the corresponding spot. Then in a specific implementation, when determining the spot indication image of the target prediction image based on the spot features of each predicted spot and the target prediction image, the electronic device may retain the pixel value of each pixel point on each predicted spot in the target prediction image (here, the predicted pixel value) based on the spot features of each predicted spot, and set the pixel value of each pixel point in the target prediction image that is not on any predicted spot to the first preset pixel value, so as to determine the spot indication image of the target prediction image; that is, for any pixel point in the target prediction image (that is, the above-mentioned multiple pixels), In another specific implementation, the electronic device may also determine whether any pixel point is located on any predicted spot of at least one predicted spot. If any pixel point is located on any predicted spot, the pixel value of any pixel point in the target predicted image is used as the pixel value of any pixel point in the spot indication image of the target predicted image. If any pixel point is not located on any predicted spot of at least one predicted spot (that is, any pixel point is not located on each predicted spot), the first preset pixel value is used as the pixel value of any pixel point in the spot indication image of the target predicted image. In another specific implementation, the electronic device may also determine whether any pixel point is located on any predicted spot of at least one predicted spot. If any pixel point is located on any predicted spot, the second preset pixel value (such as 0) is used as the pixel value of any pixel point in the spot indication image of the target predicted image. If any pixel point is not located on any predicted spot of at least one predicted spot, the first preset pixel value is used as the pixel value of any pixel point in the spot indication image of the target predicted image, and so on. Among them, a pixel point located on a spot may mean that the distance between the corresponding pixel point and the center point (i.e., the position) of the corresponding spot is less than or equal to the radius of the corresponding spot, that is, the pixel points located on a spot may include all pixel points among multiple pixel points whose distance from the center point of the corresponding spot is less than or equal to the radius of the corresponding spot; correspondingly, a pixel point not located on a spot may mean that the distance between the corresponding pixel point and the center point of the corresponding spot is greater than the radius of the corresponding spot.

[0067] In another embodiment, the electronic device may also perform key point detection on the target prediction image to obtain key point features of each target prediction key point in at least one target prediction key point, and add the spot features of each prediction spot and the key point features of each target prediction key point to the prediction feature extraction result, so that each prediction spot and each target prediction key point are prediction feature points in the prediction feature extraction result, thereby determining the prediction feature extraction result, and so on. In this case, the prediction feature extraction result may include the spot features of each prediction spot and the key point features of each target prediction key point, and at this time, the features of a feature point may include but are not limited to at least one of the following: the position, size and direction of the corresponding feature point, etc., a feature point is a spot or a key point (that is, spots and key points can be collectively referred to as feature points), and the features of a feature point can be the spot features of a spot or the key point features of a key point, that is, at this time, the spot features of a spot and the key point features of a key point can both include at least one of the following: the corresponding position, size and direction, etc.

[0068] In another embodiment, the electronic device may use the spot features of each prediction spot as the prediction feature extraction result of the target prediction image; that is, the spot features of each prediction spot may be added to the prediction feature extraction result of the target prediction image to determine the prediction feature extraction result of the target prediction image. In this case, the feature of a feature point may include but is not limited to at least one of the following: the position, size, and direction of the corresponding feature point.

[0069] In other embodiments, the electronic device may not perform spot detection on the target prediction image, but only perform key point detection on the target prediction image to obtain the key point features of each predicted key point in at least one predicted key point in the target prediction image, thereby adding the key point features of each predicted key point in the target prediction image to the prediction feature extraction result of the target prediction image to obtain the prediction feature extraction result of the target prediction image.

[0070] Optionally, when all feature points in the feature extraction result are key points, a key point feature may be a descriptor of the corresponding key point, thereby more accurately representing the corresponding key point and further improving the accuracy of the feature extraction result.

[0071] S205, performing spot detection on the target observation image to obtain spot features of each observation spot in at least one observation spot.

[0072] It should be noted that the implementation method of performing spot detection on the target observation image may be the same as the implementation method of performing spot detection on the target prediction image described above, and the embodiments of the present invention will not be described in detail herein.

[0073] S206: Determine an observation feature extraction result of the target observation image based on the spot features of each observation spot.

[0074] It should be noted that the method for determining the observation feature extraction result may be the same as the method for determining the forecast feature extraction result, and the embodiments of the present invention will not be described in detail herein. Exemplarily, the electronic device may determine a spot indication image of the target observation image based on the spot features of each observation spot and the target observation image; thereby performing key point detection on the spot indication image of the target observation image to obtain key point features of each observation key point in at least one observation key point in the spot indication image of the target observation image, and determining the observation feature extraction result of the target observation image based on the key point features of each observation key point in the spot indication image of the target observation image (e.g., key point detection may also be performed on the target observation image to obtain key point features of each observation key point in at least one observation key point in the target observation image, and the key point features of each observation key point in the target observation image and the key point features of each observation key point in the spot indication image of the target observation image are added to the observation feature extraction result of the target observation image), and so on; it should be understood that the specific implementation method of determining the observation feature extraction result of the target observation image based on the key point features of each observation key point in the spot indication image of the target observation image may be the same as the specific implementation method of determining the prediction feature extraction result of the target prediction image based on the key point features of each prediction key point in the spot indication image of the target prediction image, and the embodiments of the present invention are not repeated here.

[0075] S207, determining target similarity judgment information between the target forecast data and the target observation data based on the forecast feature extraction result and the observation feature extraction result.

[0076] In an embodiment of the present invention, the electronic device may perform feature matching on the forecast feature extraction result and the observation feature extraction result to obtain a feature matching result; and based on the feature matching result, determine the target similarity judgment information between the target forecast data and the target observation data.

[0077] In one embodiment, the forecast feature extraction result may include key point features of each forecast key point in the forecast key point set, and the observation feature extraction result may include key point features of each observation key point in the observation key point set, that is, at this time, the forecast feature points in the forecast feature extraction result may include the forecast key point set, and the observation feature points in the observation feature extraction result may include the forecast key point set. Based on this, when feature matching is performed on the forecast feature extraction result and the observation feature extraction result to obtain the feature matching result, the electronic device may feature match the key point features of each forecast key point in the forecast key point set and the key point features of each observation key point in the observation key point set to obtain the feature matching result; accordingly, when determining the target similarity judgment information between the target forecast data and the target observation data based on the feature matching result, at least one matching point in the forecast key point set may be determined based on the feature matching result, and the number of matching points in the at least one matching point may be used to calculate the target similarity judgment information between the target forecast data and the target observation data. Optionally, the prediction key point set may include at least one prediction key point in the target prediction image and at least one prediction key point in the spot indication image of the target prediction image, and the observation key point set may include at least one observation key point in the target observation image and at least one observation key point in the spot indication image of the target observation image; or, the prediction key point set may include at least one prediction key point in the spot indication image of the target prediction image, and the observation key point set may include at least one observation key point in the spot indication image of the target observation image; or, the prediction key point set may include all prediction key points located on any prediction spot in at least one prediction spot included in at least one prediction key point in the target prediction image, and the observation key point set may include all observation key points located on any observation spot in at least one observation spot included in at least one observation key point in the target observation image; or, the prediction key point set may include at least one prediction key point in the target prediction image, and the observation key point set may include at least one observation key point in the target observation image, and so on; the embodiments of the present invention are not limited to this.

[0078] In a specific implementation, when performing feature matching on the key point features of each forecast key point in the forecast key point set and the key point features of each observation key point in the observation key point set to obtain the feature matching result, the electronic device may divide the key point features of each forecast key point in the forecast key point set into at least one forecast feature subset, and divide the key point features of each observation key point in the observation key point set into at least one observation feature subset, one feature subset includes the key point features of each key point in at least one key point, that is, one forecast feature subset may include the key point features of each key point in at least one key point in the forecast key point set. Features, an observation feature subset may include the key point features of each key point in at least one key point in the observation key point set; then, based on at least one observation feature subset, an approximate nearest neighbor search can be performed on each forecast feature subset in at least one forecast feature subset to obtain the nearest neighbor observation feature subset of each forecast feature subset, and the nearest neighbor observation feature subset of a forecast feature subset is an observation feature subset in at least one observation feature subset; based on this, the nearest neighbor observation feature subset of each forecast feature subset can be used as a feature matching result, and at this time, the feature matching result may include the nearest neighbor observation feature subset of each forecast feature subset. Optionally, for any forecast feature subset in at least one forecast feature subset, the electronic device may respectively calculate the distance (also referred to as approximate distance) between any forecast feature subset and each observation feature subset in at least one observation feature subset, and use the observation feature subset with the smallest distance from at least one observation feature subset to any forecast feature subset as the nearest neighbor observation feature subset of any forecast feature subset; optionally, for any observation feature subset in at least one observation feature subset, the mean (i.e., mean vector) between each key point feature in any forecast feature subset and the mean between each key point feature in any observation feature subset may be used to calculate the distance between any forecast feature subset and any observation feature subset, such as the Euclidean distance or Mahalanobis distance between two means.

[0079] Then correspondingly, when determining at least one matching point in the forecast key point set based on the feature matching result, for any forecast key point in the forecast key point set, if the key point feature of the matching observation key point corresponding to any forecast key point exists in the nearest neighbor observation feature subset of the forecast feature subset to which any forecast key point belongs (that is, the forecast feature subset where the key point feature of any forecast key point is located), then any forecast key point can be taken as a matching point; if the key point feature of the matching observation key point corresponding to any forecast key point does not exist in the nearest neighbor observation feature subset of the forecast feature subset to which any forecast key point belongs, then any forecast key point may not be taken as a matching point, and the matching observation point corresponding to any forecast key point may be selected. A measured key point refers to an observed key point whose distance between the key point feature and the key point feature of any forecast key point is less than a preset key point feature threshold; and / or, if the distance between the forecast feature subset to which any forecast key point belongs and the nearest observed feature subset of the forecast feature subset to which any forecast key point belongs is less than a preset feature subset distance threshold, then any forecast key point can be used as a matching point; if the distance between the forecast feature subset to which any forecast key point belongs and the nearest observed feature subset of the forecast feature subset to which any forecast key point belongs is greater than or equal to the preset feature subset distance threshold, then any forecast key point may not be used as a matching point, so as to determine at least one matching point in the forecast key point set, etc. Optionally, both the preset key point feature threshold and the preset feature subset distance threshold can be set according to experience or according to actual needs, and the embodiments of the present invention are not limited to this.

[0080] In another specific implementation, when feature matching is performed on the key point features of each forecast key point in the forecast key point set and the key point features of each observation key point in the observation key point set to obtain the feature matching result, for any forecast key point in the forecast key point set, the electronic device can respectively calculate the distance between the key point features of any forecast key point and the key point features of each observation key point in the observation key point set, and based on the distance between the key point features of any forecast key point and the key point features of each observation key point, determine the nearest neighbor observation key point of any forecast key point from the observation key point set (that is, the observation key point with the smallest distance between the key point feature and the key point feature of any forecast key point), so as to use the nearest neighbor observation key point of each forecast key point as the feature matching result, that is, the feature matching result at this time may include the nearest neighbor observation key point of each forecast key point in the forecast key point set.

[0081] Correspondingly, when determining at least one matching point in the forecast key point set based on the feature matching results, if the distance between the key point feature of any forecast key point and the nearest neighbor observation key point of any forecast key point is less than the preset key point feature threshold, then any forecast key point is taken as a matching point; if the distance between the key point feature of any forecast key point and the nearest neighbor observation key point of any forecast key point is greater than or equal to the preset key point feature threshold, then any forecast key point is not taken as a matching point, so as to determine at least one matching point in the forecast key point set.

[0082] Furthermore, when using the number of matching points in at least one matching point to calculate the target similarity judgment information between the target forecast data and the target observation data, the electronic device may use the ratio between the number of matching points in at least one matching point (i.e., the number of matching points in at least one matching point) and the number of key points in the forecast key point set (i.e., the number of key points in the forecast key point set) as the target similarity judgment information between the target forecast data and the target observation data; or, may use the ratio between the number of matching points in at least one matching point and the number of key points in the observation key point set as the target similarity judgment information between the target forecast data and the target observation data, and so on.

[0083] In another embodiment, the prediction feature extraction result may include the features of each prediction feature point among the multiple prediction feature points, and the observation feature extraction result may include the features of each observation feature point among the multiple observation feature points. Optionally, the multiple prediction feature points may include at least one prediction spot and at least one target prediction key point, the multiple observation feature points may include at least one observation spot and at least one target observation key point, the at least one target observation key point may be obtained by performing key point detection on the target observation image (i.e., at least one observation key point in the target observation image), and the at least one target prediction key point may be obtained by performing key point detection on the target prediction image (i.e., at least one prediction key point in the target prediction image); or, the multiple prediction feature points may include at least one prediction spot, the multiple observation feature points may include at least one observation spot, and so on; this is not limited in the embodiments of the present invention.

[0084] Based on this, when feature matching is performed on the forecast feature extraction results and the observation feature extraction results to obtain the feature matching results, feature matching can be performed on the features of each forecast feature point and the features of each observation feature point to obtain the feature matching results; accordingly, when determining the target similarity judgment information between the target forecast data and the target observation data based on the feature matching results, at least one feature matching point among the multiple forecast feature points can be determined based on the feature matching results, and the number of feature matching points in the at least one feature matching point can be used to calculate the target similarity judgment information between the target forecast data and the target observation data, such as the number of feature matching points of at least one feature matching point and the number of feature points in the multiple forecast feature points can be used to calculate the target similarity judgment information, etc. It should be noted that the specific implementation method of feature matching the features of each forecast feature point and the features of each observation feature point may be the same as the specific implementation method of feature matching the key point features of each forecast key point in the forecast key point set and the key point features of each observation key point in the observation key point set; and the specific implementation method of determining at least one feature matching point among multiple forecast feature points based on the feature matching results may be the same as the above-mentioned specific implementation method of determining at least one matching point in the forecast key point set based on the feature matching results, and the embodiments of the present invention will not be repeated here.

[0085] Optionally, multiple prediction feature points may also be a prediction key point set (i.e., in this case, the multiple prediction feature points may include all prediction key points in the prediction key point set), multiple observation feature points may also be an observation key point set (i.e., in this case, the multiple observation feature points may include all observation key points in the observation key point set), and so on.

[0086] S208, determining a target air pollution simulation evaluation result based on the target similarity judgment information, wherein the target air pollution simulation evaluation result supports a simulation effect of a target numerical model on a target pollution object.

[0087] Optionally, the embodiment of the present invention can implement the atmospheric pollution simulation assessment method based on image processing through Python (a high-level scripting language that combines interpretability, compilation, interactivity and object-oriented) software, and can also implement the atmospheric pollution simulation assessment method based on image processing through C language (a general-purpose, process-oriented computer programming language), and so on; the embodiment of the present invention is not limited to this. Exemplarily, taking python software as an example, the embodiment of the present invention can install python software on an electronic device and import various libraries required for calculation, such as but not limited to at least one of the following: the python version of the OpenCV library (an open source computer vision library) cv2 and the library numpy for numerical calculation (an extension library of the Python language, supporting a large number of dimensional arrays and matrix operations); based on this, after the image (i.e., the target forecast image and the target observation image) is read through the python software, subsequent atmospheric pollution simulation evaluation can be performed, or the target forecast data and the target observation data can be read to perform subsequent atmospheric pollution simulation evaluation after the target forecast data and the target observation data are read, etc., and the embodiment of the present invention is not limited to this; it can be seen that the embodiment of the present invention can use OpenCV to perform corresponding processing on the image, and finally use the image similarity judgment method of OpenCV to perform similarity comparison, so as to evaluate the quality of the simulation effect. Optionally, when the embodiment of the present invention performs air pollution simulation assessment through the OpenCV library, the SimpleBlobDetector algorithm can be used for blob detection, the SIFT algorithm can be used for key point detection, and the FLANN (Fast Library for Approximate Nearest Neighbors) library can be used for feature matching, etc.; wherein the FLANN library is a library for approximate nearest neighbor search.

[0088] In summary, the prediction feature extraction result includes the key point features of each prediction key point in the target prediction image and the key point features of each prediction key point in the spot indication image of the target prediction image, and the observation feature extraction result includes the key point features of each observation key point in the target observation image and the key point features of each observation key point in the spot indication image of the target observation image as an example for explanation. Figure 3As shown, after acquiring the target forecast image and the target observation image, the electronic device can respectively perform image feature point recognition and extraction on the target forecast image and the target observation image (i.e., perform spot detection and key point detection on the target forecast image and the target observation image, respectively, and perform key point detection on the spot indication image of the target forecast image and the spot indication image of the target observation image, respectively) to obtain the forecast feature extraction result and the observation feature extraction result, and then perform feature matching (i.e., similarity feature matching) on ​​the forecast feature extraction result and the observation feature extraction result to determine the target similarity judgment information, thereby using the target similarity judgment information to perform similarity judgment to determine the target atmospheric pollution simulation evaluation result; illustratively, when the preset similarity judgment threshold is 70%, if the target similarity judgment information is greater than or equal to 70%, it can be determined that the target atmospheric pollution simulation evaluation result is used to indicate a good simulation effect, and if the target similarity judgment information is less than 70%, it can be determined that the target atmospheric pollution simulation evaluation result is used to indicate a poor simulation effect, and so on.

[0089] The embodiment of the present invention can generate a target forecast image based on the target forecast data and a target observation image based on the target observation data after acquiring the target forecast data and acquiring the target observation data, and the image size of the target forecast image and the target observation image are the same. Further, the target forecast image can be subjected to spot detection to obtain the spot features of each forecast spot in at least one forecast spot, and the forecast feature extraction result of the target forecast image can be determined based on the spot features of each forecast spot; and the target observation image can be subjected to spot detection to obtain the spot features of each observation spot in at least one observation spot, and the observation feature extraction result of the target observation image can be determined based on the spot features of each observation spot. Based on this, the target similarity judgment information between the target forecast data and the target observation data can be determined based on the forecast feature extraction result and the observation feature extraction result; and the target atmospheric pollution simulation evaluation result can be determined based on the target similarity judgment information, and the target atmospheric pollution simulation evaluation result supports the simulation effect of indicating the target numerical model on the target pollution object. It can be seen that the embodiment of the present invention can realize the evaluation of the spatial distribution characteristics of the target pollution object through the forecast feature extraction results and the observation feature extraction results (that is, the evaluation of the spatial distribution characteristics can be realized through the detection of spots and key points), that is, the atmospheric pollution simulation evaluation method proposed in the embodiment of the present invention can also be called the atmospheric pollution simulation spatial distribution evaluation method, that is, the embodiment of the present invention can screen out the numerical value of the pollution area to be inspected to output the image of the pollution area (such as the target forecast image and the target observation image), so that the shape of the simulated pollution area indicated by the target forecast data and the shape of the observed pollution area indicated by the target observation data can be similarly compared through the forecast feature extraction results and the observation feature extraction results (the shape of the pollution area can be represented by spots and / or key points), so as to effectively evaluate the simulation effect and improve the accuracy of atmospheric pollution simulation evaluation; based on this, the embodiment of the present invention can apply the spatial evaluation method to the field of atmospheric pollution, and can use image recognition to evaluate the atmospheric pollution simulation effect, which can avoid the problems of large subjective uncertainty and unintelligence caused by the need to manually assign spatial attribute weights.

[0090] Based on the description of the relevant embodiments of the above-mentioned method for simulating and evaluating air pollution based on image processing, the embodiment of the present invention further proposes an apparatus for simulating and evaluating air pollution based on image processing, which can be a computer program (including program code) running in an electronic device; Figure 4 As shown, the air pollution simulation and evaluation device based on image processing may include an acquisition unit 401 and a processing unit 402. The air pollution simulation and evaluation device based on image processing may be executed Figure 1 or Figure 2The air pollution simulation and evaluation method based on image processing shown, that is, the air pollution simulation and evaluation device based on image processing can run the above-mentioned units:

[0091] An acquisition unit 401 is used to acquire target forecast data and target observation data, wherein the target forecast data includes forecast information of the target pollutant in each grid area in the target area, the target forecast data is forecasted by a target numerical model, and the target observation data includes observation information of the target pollutant in each grid area;

[0092] A processing unit 402 is configured to generate a target prediction image based on the target prediction data, and generate a target observation image based on the target observation data, wherein the target prediction image and the target observation image have the same image size;

[0093] The processing unit 402 is further configured to perform feature extraction on the target prediction image to obtain a prediction feature extraction result of the target prediction image, and perform feature extraction on the target observation image to obtain an observation feature extraction result of the target observation image;

[0094] The processing unit 402 is further configured to determine target similarity judgment information between the target forecast data and the target observation data based on the forecast feature extraction result and the observation feature extraction result;

[0095] The processing unit 402 is further configured to determine a target air pollution simulation evaluation result based on the target similarity judgment information, wherein the target air pollution simulation evaluation result supports indicating a simulation effect of the target numerical model on the target pollution object.

[0096] In one implementation, when the processing unit 402 performs feature extraction on the target prediction image to obtain the prediction feature extraction result of the target prediction image, it can be specifically used to:

[0097] Performing spot detection on the target prediction image to obtain spot features of each prediction spot in at least one prediction spot;

[0098] Determining a prediction feature extraction result of the target prediction image based on the spot features of each prediction spot;

[0099] When the processing unit 402 extracts features from the target observation image to obtain the observation feature extraction result of the target observation image, it can be specifically used to:

[0100] Performing spot detection on the target observation image to obtain spot features of each observation spot in at least one observation spot;

[0101] Based on the spot features of the respective observation spots, an observation feature extraction result of the target observation image is determined.

[0102] In another implementation manner, when the processing unit 402 determines the prediction feature extraction result of the target prediction image based on the spot features of each prediction spot, it can be specifically used to:

[0103] Determining a spot indication image of the target prediction image based on the spot features of the respective prediction spots and the target prediction image;

[0104] Performing key point detection on the spot indication image of the target prediction image to obtain key point features of each prediction key point in at least one prediction key point in the spot indication image of the target prediction image, and determining a prediction feature extraction result of the target prediction image based on the key point features of each prediction key point in the spot indication image of the target prediction image;

[0105] When determining the observation feature extraction result of the target observation image based on the spot features of each observation spot, the processing unit 402 may be specifically used to:

[0106] Determining a spot indication image of the target observation image based on the spot features of the respective observation spots and the target observation image;

[0107] Key point detection is performed on the spot indication image of the target observation image to obtain key point features of each observation key point in at least one observation key point in the spot indication image of the target observation image, and based on the key point features of each observation key point in the spot indication image of the target observation image, an observation feature extraction result of the target observation image is determined.

[0108] In another implementation manner, when the processing unit 402 determines the target similarity judgment information between the target forecast data and the target observation data based on the forecast feature extraction result and the observation feature extraction result, it can be specifically used to:

[0109] Performing feature matching on the forecast feature extraction result and the observation feature extraction result to obtain a feature matching result;

[0110] Based on the feature matching result, target similarity judgment information between the target forecast data and the target observation data is determined.

[0111] In another implementation manner, the forecast feature extraction result includes key point features of each forecast key point in the forecast key point set, and the observation feature extraction result includes key point features of each observation key point in the observation key point set; when the processing unit 402 performs feature matching on the forecast feature extraction result and the observation feature extraction result to obtain the feature matching result, it can be specifically used to:

[0112] Performing feature matching on the key point features of each forecast key point in the forecast key point set and the key point features of each observation key point in the observation key point set to obtain a feature matching result;

[0113] When the processing unit 402 determines the target similarity judgment information between the target forecast data and the target observation data based on the feature matching result, it can be specifically used to:

[0114] Based on the feature matching result, at least one matching point in the forecast key point set is determined, and the number of matching points in the at least one matching point is used to calculate the target similarity judgment information between the target forecast data and the target observation data.

[0115] In another implementation manner, when the processing unit 402 performs feature matching on the key point features of each forecast key point in the forecast key point set and the key point features of each observation key point in the observation key point set to obtain a feature matching result, it can be specifically used to:

[0116] Dividing the key point features of each prediction key point in the prediction key point set into at least one prediction feature subset, and dividing the key point features of each observation key point in the observation key point set into at least one observation feature subset, wherein one feature subset includes the key point features of each key point in at least one key point;

[0117] Based on the at least one observation feature subset, respectively perform an approximate nearest neighbor search on each forecast feature subset in the at least one forecast feature subset to obtain the nearest neighbor observation feature subset of each forecast feature subset, wherein the nearest neighbor observation feature subset of a forecast feature subset is an observation feature subset in the at least one observation feature subset; and use the nearest neighbor observation feature subset of each forecast feature subset as a feature matching result;

[0118] When the processing unit 402 determines at least one matching point in the prediction key point set based on the feature matching result, it can be specifically used to:

[0119] For any forecast key point in the forecast key point set, if a key point feature of a matching observation key point corresponding to any forecast key point exists in the nearest neighbor observation feature subset of the forecast feature subset to which the any forecast key point belongs, the any forecast key point is taken as a matching point, and the matching observation key point corresponding to the any forecast key point refers to an observation key point whose key point feature has a distance with the key point feature of the any forecast key point less than a preset key point feature threshold; and / or,

[0120] If the distance between the forecast feature subset to which any forecast key point belongs and the nearest observed feature subset of the forecast feature subset to which any forecast key point belongs is less than a preset feature subset distance threshold, then any forecast key point is taken as a matching point to determine at least one matching point in the forecast key point set.

[0121] In another implementation manner, when the processing unit 402 generates the target prediction image based on the target prediction data, it may be specifically configured to:

[0122] Determine the target image size, and determine the mapping pixel points of each grid area according to the target image size;

[0123] Based on the mapped pixels of the respective grid areas and the target prediction data, a predicted pixel value of each pixel in the target prediction image is determined to realize the generation of the target prediction image; wherein the predicted pixel value of a pixel is determined based on the prediction information in each grid area of ​​at least one grid area where the mapped pixel is a corresponding pixel;

[0124] When the processing unit 402 generates the target observation image based on the target observation data, it can be specifically used to:

[0125] Based on the mapped pixel points of each grid area and the target observation data, the observed pixel value of each pixel point in the target observation image is determined to generate the target observation image; wherein the observed pixel value of a pixel point is determined based on the observation information in each grid area of ​​at least one grid area where the mapped pixel point is the corresponding pixel point.

[0126] According to one embodiment of the present invention, Figure 4Each unit in the image processing-based air pollution simulation and evaluation device shown can be separately or completely combined into one or several other units to form, or one (some) of the units can be further divided into multiple functionally smaller units to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above-mentioned units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present invention, any image processing-based air pollution simulation and evaluation device can also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0127] According to another embodiment of the present invention, the program can be executed by running a program on a general electronic device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 1 or Figure 2 A computer program (including program code) for each step involved in the corresponding method shown in Figure 4 The air pollution simulation and evaluation device based on image processing shown in the embodiment of the present invention is used to implement the air pollution simulation and evaluation method based on image processing. The computer program can be recorded on a computer storage medium, for example, and loaded into the above-mentioned electronic device through the computer storage medium and run therein.

[0128] Based on the description of the above method embodiment and device embodiment, the exemplary embodiment of the present invention further provides an electronic device, including: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to enable the electronic device to perform the method according to the embodiment of the present invention when executed by the at least one processor.

[0129] Exemplary embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a method according to an embodiment of the present invention.

[0130] An exemplary embodiment of the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to perform a method according to an embodiment of the present invention.

[0131] refer to Figure 5, a block diagram of an electronic device 500 that can be used as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0132] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0133] A plurality of components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 may be any type of device capable of inputting information to the electronic device 500, and the input unit 506 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 507 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 may include, but is not limited to, a disk, an optical disk. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0134] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the atmospheric pollution simulation assessment method based on image processing may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. In some embodiments, the computing unit 501 may be configured to perform the atmospheric pollution simulation assessment method based on image processing by any other appropriate means (e.g., by means of firmware).

[0135] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0136] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0137] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0138] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0139] Furthermore, it should be understood that what is disclosed above is only a preferred embodiment of the present invention, and certainly cannot be used to limit the scope of rights of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. An atmospheric pollution simulation and assessment method based on image processing, characterized in that: include: Acquiring target forecast data and target observation data, wherein the target forecast data includes forecast information of the target pollutant in each grid area in the target area, the target forecast data is forecasted by a target numerical model, and the target observation data includes observation information of the target pollutant in each grid area; Generate a target prediction image based on the target prediction data, and generate a target observation image based on the target observation data, wherein the target prediction image and the target observation image have the same image size; Performing feature extraction on the target prediction image to obtain a prediction feature extraction result of the target prediction image, and performing feature extraction on the target observation image to obtain an observation feature extraction result of the target observation image; Determining target similarity judgment information between the target forecast data and the target observation data based on the forecast feature extraction result and the observation feature extraction result; Based on the target similarity judgment information, a target air pollution simulation evaluation result is determined, and the target air pollution simulation evaluation result supports indicating a simulation effect of the target numerical model on the target pollution object.

2. The method according to claim 1, characterized in that The step of extracting features from the target prediction image to obtain a prediction feature extraction result of the target prediction image includes: Performing spot detection on the target prediction image to obtain spot features of each prediction spot in at least one prediction spot; Determining a prediction feature extraction result of the target prediction image based on the spot features of each prediction spot; The step of extracting features from the target observation image to obtain an observation feature extraction result of the target observation image includes: Performing spot detection on the target observation image to obtain spot features of each observation spot in at least one observation spot; Based on the spot features of the respective observation spots, an observation feature extraction result of the target observation image is determined.

3. The method according to claim 2, characterized in that The step of determining the prediction feature extraction result of the target prediction image based on the spot features of each prediction spot includes: Determining a spot indication image of the target prediction image based on the spot features of the respective prediction spots and the target prediction image; Performing key point detection on the spot indication image of the target prediction image to obtain key point features of each prediction key point in at least one prediction key point in the spot indication image of the target prediction image, and determining a prediction feature extraction result of the target prediction image based on the key point features of each prediction key point in the spot indication image of the target prediction image; The step of determining the observation feature extraction result of the target observation image based on the spot features of each observation spot includes: Determining a spot indication image of the target observation image based on the spot features of the respective observation spots and the target observation image; Key point detection is performed on the spot indication image of the target observation image to obtain key point features of each observation key point in at least one observation key point in the spot indication image of the target observation image, and based on the key point features of each observation key point in the spot indication image of the target observation image, an observation feature extraction result of the target observation image is determined.

4. The method according to any one of claims 1 to 3, characterized in that: The determining, based on the forecast feature extraction result and the observation feature extraction result, target similarity judgment information between the target forecast data and the target observation data comprises: Performing feature matching on the forecast feature extraction result and the observation feature extraction result to obtain a feature matching result; Based on the feature matching result, target similarity judgment information between the target forecast data and the target observation data is determined.

5. The method according to claim 4, characterized in that The forecast feature extraction result includes key point features of each forecast key point in the forecast key point set, and the observation feature extraction result includes key point features of each observation key point in the observation key point set; the feature matching of the forecast feature extraction result and the observation feature extraction result to obtain the feature matching result includes: Performing feature matching on the key point features of each forecast key point in the forecast key point set and the key point features of each observation key point in the observation key point set to obtain a feature matching result; The determining, based on the feature matching result, target similarity judgment information between the target forecast data and the target observation data comprises: Based on the feature matching result, at least one matching point in the forecast key point set is determined, and the number of matching points in the at least one matching point is used to calculate the target similarity judgment information between the target forecast data and the target observation data.

6. The method according to claim 5, characterized in that The performing feature matching on the key point features of each forecast key point in the forecast key point set and the key point features of each observation key point in the observation key point set to obtain a feature matching result includes: Dividing the key point features of each prediction key point in the prediction key point set into at least one prediction feature subset, and dividing the key point features of each observation key point in the observation key point set into at least one observation feature subset, wherein one feature subset includes the key point features of each key point in at least one key point; Based on the at least one observation feature subset, respectively perform an approximate nearest neighbor search on each forecast feature subset in the at least one forecast feature subset to obtain the nearest neighbor observation feature subset of each forecast feature subset, wherein the nearest neighbor observation feature subset of a forecast feature subset is an observation feature subset in the at least one observation feature subset; and use the nearest neighbor observation feature subset of each forecast feature subset as a feature matching result; The determining, based on the feature matching result, at least one matching point in the set of prediction key points comprises: For any forecast key point in the forecast key point set, if a key point feature of a matching observation key point corresponding to any forecast key point exists in the nearest neighbor observation feature subset of the forecast feature subset to which the any forecast key point belongs, then the any forecast key point is taken as a matching point, and the matching observation key point corresponding to the any forecast key point refers to an observation key point whose key point feature has a distance with the key point feature of the any forecast key point less than a preset key point feature threshold; and / or, If the distance between the forecast feature subset to which any forecast key point belongs and the nearest observed feature subset of the forecast feature subset to which any forecast key point belongs is less than a preset feature subset distance threshold, then any forecast key point is taken as a matching point to determine at least one matching point in the forecast key point set.

7. The method according to any one of claims 1 to 3, characterized in that: The step of generating a target prediction image based on the target prediction data comprises: Determine the target image size, and determine the mapping pixel points of each grid area according to the target image size; Based on the mapped pixels of the respective grid areas and the target prediction data, a predicted pixel value of each pixel in the target prediction image is determined to realize the generation of the target prediction image; wherein the predicted pixel value of a pixel is determined based on the prediction information in each grid area of ​​at least one grid area where the mapped pixel is a corresponding pixel; The step of generating a target observation image based on the target observation data comprises: Based on the mapped pixel points of each grid area and the target observation data, the observed pixel value of each pixel point in the target observation image is determined to generate the target observation image; wherein the observed pixel value of a pixel point is determined based on the observation information in each grid area of ​​at least one grid area where the mapped pixel point is the corresponding pixel point.

8. An atmospheric pollution simulation and assessment device based on image processing, characterized in that: The device comprises: an acquisition unit, configured to acquire target forecast data and target observation data, wherein the target forecast data includes forecast information of the target pollutant in each grid area in the target area, the target forecast data is forecasted by a target numerical model, and the target observation data includes observation information of the target pollutant in each grid area; a processing unit, configured to generate a target prediction image based on the target prediction data, and to generate a target observation image based on the target observation data, wherein the target prediction image and the target observation image have the same image size; The processing unit is further used to perform feature extraction on the target prediction image to obtain a prediction feature extraction result of the target prediction image, and perform feature extraction on the target observation image to obtain an observation feature extraction result of the target observation image; The processing unit is further used to determine target similarity judgment information between the target forecast data and the target observation data based on the forecast feature extraction result and the observation feature extraction result; The processing unit is further used to determine a target air pollution simulation evaluation result based on the target similarity judgment information, and the target air pollution simulation evaluation result supports indicating a simulation effect of the target numerical model on the target pollution object.

9. An electronic device, characterized in that: include: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Air pollution estimation method based on satellite image

    CN109978862A

  • Image processing method and device, electronic equipment and computer readable medium

    CN113313125A

  • Air quality prediction method and device, electronic equipment and storage medium

    CN113627529A

  • Online data visualization implementation method, system, equipment and medium

    CN114996374A

  • Model training method and device for PM2.5 prediction and PM2.5 prediction method and device

    CN117372780A