CN115512002A - Method, device and system for drawing air quality distribution map - Google Patents
Method, device and system for drawing air quality distribution map Download PDFInfo
- Publication number
- CN115512002A CN115512002A CN202211292241.9A CN202211292241A CN115512002A CN 115512002 A CN115512002 A CN 115512002A CN 202211292241 A CN202211292241 A CN 202211292241A CN 115512002 A CN115512002 A CN 115512002A
- Authority
- CN
- China
- Prior art keywords
- air quality
- target
- data
- quality distribution
- pixel point
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 238000010586 diagram Methods 0.000 claims abstract description 27
- 238000009877 rendering Methods 0.000 claims abstract description 27
- 238000012544 monitoring process Methods 0.000 claims description 11
- 238000013507 mapping Methods 0.000 claims description 9
- 238000007781 pre-processing Methods 0.000 claims description 8
- 230000008569 process Effects 0.000 abstract description 9
- 230000007613 environmental effect Effects 0.000 abstract description 2
- 238000004590 computer program Methods 0.000 description 12
- 238000012545 processing Methods 0.000 description 11
- 238000004891 communication Methods 0.000 description 9
- 238000003915 air pollution Methods 0.000 description 7
- 238000004422 calculation algorithm Methods 0.000 description 5
- 238000011161 development Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- CBENFWSGALASAD-UHFFFAOYSA-N Ozone Chemical compound [O-][O+]=O CBENFWSGALASAD-UHFFFAOYSA-N 0.000 description 2
- RAHZWNYVWXNFOC-UHFFFAOYSA-N Sulphur dioxide Chemical compound O=S=O RAHZWNYVWXNFOC-UHFFFAOYSA-N 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 239000003344 environmental pollutant Substances 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 231100000719 pollutant Toxicity 0.000 description 2
- 239000004576 sand Substances 0.000 description 2
- 239000000809 air pollutant Substances 0.000 description 1
- 231100001243 air pollutant Toxicity 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000010267 cellular communication Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000001932 seasonal effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/206—Drawing of charts or graphs
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention provides a method, a device and a system for drawing an air quality distribution map, and belongs to the field of environmental science. The method comprises the following steps: receiving a drawing request of an air quality distribution map, wherein the drawing request comprises target area information, target time information and picture size information corresponding to the air quality distribution map; according to the target area information and the target time information, determining target grid data corresponding to a target area in target time in pre-stored equal-latitude and longitude grid data; determining pixel point data of the air quality distribution diagram according to the target grid data and the picture size information; and rendering is carried out based on the pixel point data to obtain the air quality distribution diagram. According to the invention, the original meteorological data is preprocessed into the equal longitude and latitude grid data, so that the time consumption in the online drawing process is eliminated, and the rapid drawing of the geographic space distribution map can be realized.
Description
Technical Field
The invention relates to the field of environmental science, in particular to a method, a device and a system for drawing an air quality distribution map.
Background
With the development of science and technology, air pollution has slowly become a non-negligible problem, and therefore, the treatment of air pollution in various countries is also more and more important. The air pollution treatment is carried out on the premise of monitoring and researching the air pollution condition in the area, accurately grasping the air pollution change trend and predicting the air pollution condition in the next time, so that people can take corresponding measures to prevent the air pollution from causing harm to people. The air quality distribution map can visually show the air quality condition of a certain area for a period of time, and is an important tool for analyzing the change of air pollutants.
At present, when a terminal such as a desktop computer, a notebook, or a mobile phone wants to show an air quality situation of a certain area for a period of time, a request for drawing an air quality distribution map is usually sent to a server on a network side, the server on the network side draws the air quality distribution map, and the drawn pollutant distribution map is returned to the terminal side for display.
However, when the heterogeneous data network performs air quality distribution map drawing, the quantity of the air quality data is usually large, the network side server needs to draw the air quality data into the air quality distribution map in real time according to the request of the terminal, the time consumption of the process is high, and the online drawing requirement cannot be met.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method, an apparatus, and a system for drawing an air quality distribution map, where the technical scheme is as follows:
according to an aspect of the present invention, there is provided a method for plotting an air quality distribution map, the method comprising:
receiving a drawing request of an air quality distribution map, wherein the drawing request comprises target area information, target time information and picture size information corresponding to the air quality distribution map;
according to the target area information and the target time information, determining target grid data corresponding to a target area in target time in pre-stored equal-latitude and longitude grid data;
determining pixel point data of the air quality distribution diagram according to the target grid data and the picture size information;
and rendering based on the pixel point data to obtain the air quality distribution map.
Optionally, the determining pixel point data of the air quality distribution map according to the target grid data and the picture size information includes:
constructing a picture object of the air quality distribution map according to the picture size information, wherein the picture object comprises a plurality of pixel points;
determining at least one grid point corresponding to each pixel point in the target grid data based on the position relation of each pixel point in the air quality distribution map;
for each pixel point, acquiring air quality data stored in at least one grid point corresponding to the pixel point, and constructing target pixel point data corresponding to the pixel point based on the acquired air quality data;
and obtaining pixel point data of the air quality distribution map based on the target pixel point data corresponding to each pixel point.
Optionally, the rendering based on the pixel point data to obtain the air quality distribution map includes:
and rendering the pixels of the air quality distribution map one by one based on a target color grading parameter and the pixel point data to obtain the air quality distribution map, wherein the target color grading parameter corresponds to the target region, a target season corresponding to the target time information and/or a target weather event.
Optionally, the target color grading parameter is determined based on the following processing:
determining a target season corresponding to the target time information;
determining a target weather event occurring within the target area in a target time based on the target area information and the target time information;
determining the target color grading parameter among a plurality of pre-stored color grading parameters based on the target area, the target season, and/or the target weather event.
Optionally, before receiving the request for drawing the air quality distribution map, the method further includes:
acquiring original air quality data, wherein the original air quality data comprises mode forecast data and/or monitoring data;
and preprocessing the original air quality data to obtain and store the equal longitude and latitude grid data.
Optionally, the method further includes: and updating the equal-longitude-latitude grid data based on the updated original air quality data every time when the original air quality data is updated.
According to another aspect of the present invention, there is provided an apparatus for mapping an air quality distribution map, the apparatus comprising:
the system comprises a receiving module, a drawing module and a display module, wherein the receiving module is used for receiving a drawing request of an air quality distribution map, and the drawing request comprises target area information, target time information and picture size information corresponding to the air quality distribution map;
the target grid data determining module is used for determining target grid data corresponding to a target area in target time in pre-stored equal-latitude and longitude grid data according to the target area information and the target time information;
the pixel point data determining module is used for determining pixel point data of the air quality distribution map according to the target grid data and the picture size information;
and the rendering module is used for rendering based on the pixel point data to obtain the air quality distribution map.
According to another aspect of the present invention, there is provided a system for drawing an air quality distribution map, the system including a drawing apparatus of an air quality distribution map and a terminal, wherein:
the terminal includes:
the generation module of the air quality distribution map drawing request is used for generating the drawing request of the air quality distribution map, and the drawing request comprises target area information, target time information and picture size information corresponding to the air quality distribution map;
the sending module is used for sending the drawing request to a drawing device of the air quality distribution map;
the drawing device of the air quality distribution diagram comprises:
the receiving module is used for receiving a drawing request of the air quality distribution map;
the target grid data determining module is used for determining target grid data corresponding to a target area in target time in pre-stored equal-latitude and longitude grid data according to the target area information and the target time information;
the pixel point data determining module is used for determining pixel point data of the air quality distribution map according to the target grid data and the picture size information;
the rendering module is used for rendering based on the pixel point data to obtain the air quality distribution map;
and the feedback module is used for feeding back the air quality distribution diagram to the terminal.
According to another aspect of the present invention, there is provided an electronic apparatus including:
a processor; and
a memory for storing a program, wherein the program is stored in the memory,
wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the method of mapping an air mass profile described above.
According to another aspect of the present invention, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the above-described air quality distribution map rendering method.
According to the invention, the original meteorological data is preprocessed into the equal longitude and latitude grid data, so that the time consumption in the online drawing process is reduced, and the rapid drawing of the air quality distribution map is realized.
Drawings
Further details, features and advantages of the invention are disclosed in the following description of exemplary embodiments with reference to the accompanying drawings, in which:
fig. 1 shows a flow chart of a method of mapping an air mass profile provided according to an exemplary embodiment of the invention;
FIG. 2 illustrates a schematic diagram of target mesh data provided in accordance with an exemplary embodiment of the present invention;
fig. 3 shows a schematic block diagram of a mapping apparatus of an air quality profile according to an exemplary embodiment of the present invention;
FIG. 4 illustrates a block diagram of an exemplary electronic device that can be used to implement an embodiment of the invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more complete and thorough understanding of the present invention. It should be understood that the drawings and the embodiments of the present invention are illustrative only and are not intended to limit the scope of the present invention.
It should be understood that the various steps recited in the method embodiments of the present invention may be performed in a different order and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the invention is not limited in this respect.
The term "including" and variations thereof as used herein is intended to be open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description. It should be noted that the terms "first", "second", and the like in the present invention are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a" or "an" or "the" modification(s) in the present invention are intended to be illustrative rather than limiting and that those skilled in the art will understand that reference to "one or more" unless the context clearly indicates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present invention are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Embodiments of the present invention provide a method for mapping an air quality map, which may be performed by a server and/or other processing-capable devices, and is typically performed on a server on the network side. The method provided by the embodiment of the present invention may be performed by any one of the above devices, or may be performed by a plurality of devices, which is not limited in this respect.
Before drawing the air quality distribution map, the required equal longitude and latitude grid data can be constructed, and the specific processing is as follows:
acquiring original air quality data;
and preprocessing the original air quality data to obtain equal longitude and latitude grid data and storing the equal longitude and latitude grid data.
The raw air quality data may include pattern forecast data and/or monitoring data, among others.
In one possible embodiment, for the pattern forecast data, the raw projection grid data is stored on the server, and when the construction of the equal-longitude and latitude grid data is performed, the raw projection grid data can be read and then converted into the equal-longitude and latitude grid data through the lambert projection.
The monitoring data is stored on the server in a discrete point data mode, when the equal longitude and latitude grid data is constructed, the discrete point data can be read, and the discrete point data is converted into the equal longitude and latitude grid data through a discrete point interpolation algorithm to obtain the grid data corresponding to the longitude and latitude range. Alternatively, the above discrete point interpolation algorithm may use an inverse distance weighting algorithm using a power of nearest neighbor search, which is not limited in this embodiment.
The server uniformly preprocesses the original mode forecast data and/or the monitoring data into standard equal latitude and longitude grid data, and can also carry out normalization compression and store the standard equal latitude and longitude grid data as an intermediate file in a memory of the server.
Optionally, when the original air quality data is updated, the peer longitude and latitude grid data may be updated based on the updated original air quality data. For example, whenever the latest pattern prediction data output by the air quality prediction mode is acquired, the pattern prediction data may be preprocessed into new equal longitude and latitude grid data and updated into the memory. For another example, each time the latest monitoring data reported by each monitoring station is received, the monitoring data may be preprocessed into new equal longitude and latitude grid data and updated into the memory.
It should be noted that after the equal-longitude-and-latitude grid data is constructed and obtained and before the original air quality data is updated, the original air quality data is not preprocessed into the equal-longitude-and-latitude grid data, that is, the equal-longitude-and-latitude grid data can be used for multiple times, and the original air quality data is called to occupy more interface resources, so that the interface performance is reduced.
The method will be described with reference to a flow chart of the method of plotting the air mass distribution map shown in fig. 1. As shown in fig. 1, the method may include the following steps 101-105.
Step 101, receiving a drawing request of an air quality distribution map.
The drawing request may include target area information, target time information, and picture size information corresponding to the air quality distribution map.
In one possible embodiment, the server receives a request for drawing an air quality map from a terminal, such as a desktop, a laptop, a mobile phone, or the like, via a receiving device. The terminal can select parameters according to drawing through the web front end, wherein the parameters comprise target area information, target time information and picture size information, and the selected parameters are added into a drawing request of the air quality distribution map and are sent to the network side server. The target area information can be obtained by terminal input or selection and the like, and can also be obtained by a mode that the terminal defines a range on a map; the target time information can be input by a terminal or obtained by selection and the like; the picture size information can be obtained by means of terminal input or selection, and can also be obtained by means of terminal automatic generation according to current display picture.
And 102, determining target grid data corresponding to the target area in the target time from pre-stored equal-latitude and longitude grid data according to the target area information and the target time information.
In a possible implementation manner, after receiving a drawing request of the air quality distribution map sent by the terminal, the server may analyze target area information and target time information in the drawing request, and acquire a target area indicated by the target area information and a target time indicated by the target time information.
If the target time information includes future time, the server can read the equal-longitude-latitude grid data obtained through mode forecast data conversion; if the target time information includes the past time, the server may read the equal latitude and longitude mesh data converted from the monitoring data. After the equal-longitude-latitude grid data corresponding to the target time are found, the equal-longitude-latitude grid data corresponding to the geographic range are found according to the target area, namely the target grid data are determined, and the target grid data of the target area are shown in fig. 2.
And 103, determining pixel point data of the air quality distribution diagram according to the target grid data and the picture size information.
Specifically, the processing of step 103 may be as follows:
constructing a picture object of the air quality distribution diagram according to the picture size information, wherein the picture object comprises a plurality of pixel points;
determining at least one grid point corresponding to each pixel point in the target grid data based on the position relation of each pixel point in the air quality distribution map;
for each pixel point, acquiring air quality data stored in at least one grid point corresponding to the pixel point, and constructing target pixel point data corresponding to the pixel point based on the acquired air quality data;
and obtaining pixel point data of the air quality distribution diagram based on the target pixel point data corresponding to each pixel point.
In a possible implementation manner, after receiving a drawing request of the air quality distribution map sent by the terminal, the server may parse picture size information in the drawing request, obtain a picture size indicated by the picture size information, and construct a picture object based on the picture size and a corresponding picture format.
Then, at least one grid point corresponding to each pixel point in the target grid data may be determined based on a position relationship of each pixel point in the air quality distribution map, where each pixel point may correspond to one grid point or a plurality of grid points in the target grid data.
And for each pixel point, acquiring air quality data stored in one or more grid points corresponding to the pixel point, and constructing target pixel point data corresponding to the pixel point based on the acquired air quality data. When one pixel point corresponds to a plurality of grid points, the air quality data of the plurality of grid points is processed, for example, an average value, a maximum value, a median value, or the like is solved, or a bilinear interpolation algorithm may be adopted to obtain an air quality data value corresponding to the one pixel point, that is, a target pixel point data.
And performing the above processing on each pixel point to obtain target pixel point data corresponding to each pixel point, so as to obtain the pixel point data of the air quality distribution map.
And step 104, rendering is carried out based on the pixel point data to obtain an air quality distribution map.
In a possible implementation manner, since the target pixel point data corresponding to each pixel point is obtained, the target pixel point data may be converted into corresponding pixel values, and the pixel points are rendered one by one to obtain an air quality distribution map. After the drawing of the air quality distribution diagram is completed, the drawn air quality distribution diagram can be fed back to the terminal so as to be displayed by the terminal.
Existing mapping techniques fall into two broad categories: the arcMap, basemap, cartopy and other open source technologies of esi, the graphics of esi are the best. But all have high memory and time consumption and generally cannot meet the online drawing requirement (such as within 300 milliseconds). Meanwhile, the current drawing technology is mainly focused on python language, if java wants to realize distribution diagram drawing, the java only can package the service drawing method based on a bottom layer method, and the development cost is high. The method is realized by adopting a pixel point drawing mode, and does not depend on third party packages such as matplotlib and cardopy, so that the limitations of development languages, the third party packages and the like are reduced, and the drawing efficiency is improved.
Optionally, the conversion of the pixel value may be performed based on the color grading parameter, and the color grading parameter may be dynamically adjusted, and the processing in step 104 may be as follows: and rendering the pixels of the air quality distribution map one by one based on the target color grading parameters and the pixel data to obtain the air quality distribution map.
Wherein the target color grading parameter corresponds to a target region, a target season corresponding to the target time information, and/or a target weather event. The color grading parameters can be dynamically adjusted according to regional, seasonal and special weather events, for example, regional and northern cities have relatively large sand storm and heavy particulate pollution, and the color grading of northern particulate matters can be refined; for the seasonality, the ozone pollution is aggravated in summer, and the color grading of the ozone in summer can be refined; for special weather events, when fireworks and firecrackers are set off in spring festival, the concentrations of particulate matters and sulfur dioxide are suddenly increased, when sand storm occurs, the concentrations of the particulate matters are suddenly increased, and the color grading of corresponding pollutants can be refined when the special weather events occur.
In one possible embodiment, the target color-grading parameter may be used to indicate a correspondence between the target pixel point data and the pixel values, so that the target pixel point data may be converted into corresponding pixel values according to the target color-grading parameter.
The target color grading parameter may be determined as follows:
determining a target season corresponding to the target time information;
determining a target weather event occurring within the target area in the target time based on the target area information and the target time information;
a target color grading parameter is determined among a plurality of color grading parameters stored in advance based on the target area, the target season, and/or the target weather event.
In a possible embodiment, the above-mentioned process of determining the target color grading parameter may be performed on a server or a terminal, and the server or the terminal may store therein the color grading parameters corresponding to each region, each season, and/or each weather event, so as to obtain the target color grading parameters corresponding to the target region, the target season, and/or the target weather event when the air quality distribution map is drawn.
If the process of determining the target color grading parameter is performed on the terminal, the target color grading parameter may be carried in the drawing request and thus transmitted to the server through the terminal. In addition, the terminal can also be provided with an interface for inputting color grading parameters, so that a user can set required target color grading parameters through the interface, and the flexibility of setting color grading is improved.
The embodiment of the invention can achieve the following beneficial effects:
(1) By preprocessing the original meteorological data into equal longitude and latitude grid data, the time consumption in the online drawing process is reduced, and the air quality distribution map is drawn quickly.
(2) Compared with a method for drawing an air quality distribution map in advance, the data size of the longitude and latitude grid data is smaller than that of the picture data, and the occupied storage space is small. Moreover, the color grading of the method for pre-drawing the air quality distribution map is fixed, and re-drawing is needed if the air quality distribution map is adjusted.
(3) The method is realized by adopting a pixel point drawing mode, and does not depend on third party packages such as matplotlib and cartopy, so that the limitations of development languages, the third party packages and the like are reduced, and the drawing efficiency is improved.
The embodiment of the invention provides a device for drawing an air quality distribution map, which is used for realizing the method for drawing the air quality distribution map. As shown in the schematic block diagram of fig. 3, the apparatus 300 for plotting an air quality distribution map includes: a receiving module 301, a target grid data determining module 302, a pixel point data determining module 303, a rendering module 304.
A receiving module 301, configured to receive a drawing request of an air quality distribution map, where the drawing request includes target area information, target time information, and picture size information corresponding to the air quality distribution map;
a target grid data determining module 302, configured to determine, according to the target area information and the target time information, target grid data corresponding to a target area in target time from pre-stored equal-latitude and longitude grid data;
a pixel point data determining module 303, configured to determine pixel point data of the air quality distribution map according to the target grid data and the picture size information;
and the rendering module 304 is configured to perform rendering based on the pixel point data to obtain the air quality distribution map.
Optionally, the pixel point data determining module 303 is configured to:
constructing a picture object of the air quality distribution map according to the picture size information, wherein the picture object comprises a plurality of pixel points;
determining at least one grid point corresponding to each pixel point in the target grid data based on the position relation of each pixel point in the air quality distribution map;
for each pixel point, acquiring air quality data stored in at least one grid point corresponding to the pixel point, and constructing target pixel point data corresponding to the pixel point based on the acquired air quality data;
and obtaining pixel point data of the air quality distribution diagram based on the target pixel point data corresponding to each pixel point.
Optionally, the rendering module 304 is configured to:
and rendering the pixel points of the air quality distribution map one by one based on a target color grading parameter and the pixel point data to obtain the air quality distribution map, wherein the target color grading parameter corresponds to the target region, a target season corresponding to the target time information and/or a target weather event.
Optionally, the rendering module 304 is configured to:
determining a target season corresponding to the target time information;
determining a target weather event occurring within the target area in a target time based on the target area information and the target time information;
determining the target color grading parameter among a plurality of pre-stored color grading parameters based on the target area, the target season, and/or the target weather event.
Optionally, the apparatus further comprises a preprocessing module, where the preprocessing module is configured to:
acquiring original air quality data, wherein the original air quality data comprises mode forecast data and/or monitoring data;
and preprocessing the original air quality data to obtain the equal longitude and latitude grid data and storing the equal longitude and latitude grid data.
Optionally, the preprocessing module is further configured to:
and updating the equal-longitude-latitude grid data based on the updated original air quality data every time when the original air quality data is updated.
In the embodiment of the invention, the original meteorological data is preprocessed into the equal longitude and latitude grid data, so that the time consumption in the online drawing process is reduced, and the rapid drawing of the air quality distribution map is realized.
The embodiment of the invention provides a system for drawing an air quality distribution map, which comprises a device for drawing the air quality distribution map and a terminal, wherein the device comprises:
the terminal includes:
the generation module of the air quality distribution map drawing request is used for generating the drawing request of the air quality distribution map, and the drawing request comprises target area information, target time information and picture size information corresponding to the air quality distribution map;
the sending module is used for sending the drawing request to a drawing device of the air quality distribution map;
the drawing device of the air quality distribution diagram comprises:
the receiving module is used for receiving a drawing request of the air quality distribution map;
the target grid data determining module is used for determining target grid data corresponding to a target area in target time in pre-stored equal-latitude and longitude grid data according to the target area information and the target time information;
the pixel point data determining module is used for determining pixel point data of the air quality distribution map according to the target grid data and the picture size information;
the rendering module is used for rendering based on the pixel point data to obtain the air quality distribution map;
and the feedback module is used for feeding back the air quality distribution diagram to the terminal.
In the embodiment of the invention, the original meteorological data is preprocessed into the equal longitude and latitude grid data, so that the time consumption in the online drawing process is reduced, and the rapid drawing of the air quality distribution map is realized.
An exemplary embodiment of the present invention also provides an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program, when executed by the at least one processor, is operative to cause the electronic device to perform a method according to an embodiment of the present invention.
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 operable to cause the computer to perform a method according to an embodiment of the present invention.
The exemplary embodiments of the invention also provide a computer program product comprising a computer program, wherein the computer program, when being executed by a processor of a computer, is adapted to cause the computer to carry out the method according to the embodiments of the invention.
Referring to fig. 4, a block diagram of a structure of an electronic device 400, which may be a server or a client of the present invention, which is an example of a hardware device that may be applied to aspects of the present invention, will now be described. Electronic device is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may 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 meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 400 includes a computing unit 401 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 402 or a computer program loaded from a storage unit 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The calculation unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
A number of components in the electronic device 400 are connected to the I/O interface 405, including: an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. The input unit 406 may be any type of device capable of inputting information to the electronic device 400, and the input unit 406 may receive input numeric or character information and generate key signal inputs related to user settings and/or function control of the electronic device. Output unit 407 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, a video/audio output terminal, a vibrator, and/or a printer. Storage unit 408 may include, but is not limited to, magnetic or optical disks. The communication unit 409 allows the electronic device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
Program code for implementing the methods of the present invention may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program code, when executed by the processor or controller, causes the functions/acts specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The 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, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide 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 used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here 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 a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
Claims (10)
1. A method for mapping an air quality profile, the method comprising:
receiving a drawing request of an air quality distribution diagram, wherein the drawing request comprises target area information, target time information and picture size information corresponding to the air quality distribution diagram;
according to the target area information and the target time information, determining target grid data corresponding to a target area in target time in pre-stored equal-latitude and longitude grid data;
determining pixel point data of the air quality distribution diagram according to the target grid data and the picture size information;
and rendering is carried out based on the pixel point data to obtain the air quality distribution diagram.
2. The method of claim 1, wherein said determining pixel point data for the air quality profile from the target grid data and the picture size information comprises:
constructing a picture object of the air quality distribution map according to the picture size information, wherein the picture object comprises a plurality of pixel points;
determining at least one grid point corresponding to each pixel point in the target grid data based on the position relation of each pixel point in the air quality distribution map;
for each pixel point, acquiring air quality data stored in at least one grid point corresponding to the pixel point, and constructing target pixel point data corresponding to the pixel point based on the acquired air quality data;
and obtaining pixel point data of the air quality distribution diagram based on the target pixel point data corresponding to each pixel point.
3. The method of claim 1, wherein the rendering based on the pixel point data to obtain the air quality distribution map comprises:
and rendering the pixels of the air quality distribution map one by one based on a target color grading parameter and the pixel point data to obtain the air quality distribution map, wherein the target color grading parameter corresponds to the target region, a target season corresponding to the target time information and/or a target weather event.
4. The method of claim 3, wherein the target color grading parameter is determined based on:
determining a target season corresponding to the target time information;
determining a target weather event occurring within the target area in a target time based on the target area information and the target time information;
determining the target color grading parameter among a plurality of pre-stored color grading parameters based on the target area, the target season, and/or the target weather event.
5. The method of claim 1, wherein prior to receiving the request for the air quality profile, further comprising:
acquiring original air quality data, wherein the original air quality data comprises mode forecast data and/or monitoring data;
and preprocessing the original air quality data to obtain the equal longitude and latitude grid data and storing the equal longitude and latitude grid data.
6. The method of claim 5, further comprising:
and updating the equal-longitude-latitude grid data based on the updated original air quality data every time when the original air quality data is updated.
7. An apparatus for mapping an air quality profile, the apparatus comprising:
the system comprises a receiving module, a drawing module and a display module, wherein the receiving module is used for receiving a drawing request of an air quality distribution map, and the drawing request comprises target area information, target time information and picture size information corresponding to the air quality distribution map;
the target grid data determining module is used for determining target grid data corresponding to a target area in target time in pre-stored equal-latitude and longitude grid data according to the target area information and the target time information;
the pixel point data determining module is used for determining pixel point data of the air quality distribution map according to the target grid data and the picture size information;
and the rendering module is used for rendering based on the pixel point data to obtain the air quality distribution map.
8. A system for drawing an air quality distribution map, the system comprising a device for drawing an air quality distribution map and a terminal, wherein:
the terminal includes:
the generation module of the drawing request of the air quality distribution map is used for generating the drawing request of the air quality distribution map, and the drawing request comprises target area information, target time information and picture size information corresponding to the air quality distribution map;
the sending module is used for sending the drawing request to a drawing device of the air quality distribution map;
the drawing device of the air quality distribution diagram comprises:
the receiving module is used for receiving a drawing request of the air quality distribution map;
the target grid data determining module is used for determining target grid data corresponding to a target area in target time in pre-stored equal-latitude and longitude grid data according to the target area information and the target time information;
the pixel point data determining module is used for determining pixel point data of the air quality distribution map according to the target grid data and the picture size information;
the rendering module is used for rendering based on the pixel point data to obtain the air quality distribution map;
and the feedback module is used for feeding back the air quality distribution diagram to the terminal.
9. An electronic device, comprising:
a processor; and
a memory for storing a program, wherein the program is stored in the memory,
wherein the program comprises instructions which, when executed by the processor, cause the processor to carry out the method according to any one of claims 1-6.
10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211292241.9A CN115512002A (en) | 2022-10-21 | 2022-10-21 | Method, device and system for drawing air quality distribution map |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211292241.9A CN115512002A (en) | 2022-10-21 | 2022-10-21 | Method, device and system for drawing air quality distribution map |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115512002A true CN115512002A (en) | 2022-12-23 |
Family
ID=84510243
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211292241.9A Pending CN115512002A (en) | 2022-10-21 | 2022-10-21 | Method, device and system for drawing air quality distribution map |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115512002A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150019185A1 (en) * | 2013-02-08 | 2015-01-15 | University Of Alaska Fairbanks | Validating And Calibrating A Forecast Model |
CN112102432A (en) * | 2020-09-17 | 2020-12-18 | 中科三清科技有限公司 | Method and device for drawing air quality vertical distribution diagram and storage medium |
CN112102433A (en) * | 2020-09-17 | 2020-12-18 | 中科三清科技有限公司 | Method and device for drawing vertical distribution map of air pollutants and storage medium |
CN113436308A (en) * | 2021-08-27 | 2021-09-24 | 江苏及象生态环境研究院有限公司 | Three-dimensional environment air quality dynamic rendering method |
CN114138868A (en) * | 2021-12-03 | 2022-03-04 | 中科三清科技有限公司 | Method and device for drawing air quality statistical distribution map |
CN114443787A (en) * | 2021-11-05 | 2022-05-06 | 中科三清科技有限公司 | Atmospheric pollution feature identification method and device |
-
2022
- 2022-10-21 CN CN202211292241.9A patent/CN115512002A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150019185A1 (en) * | 2013-02-08 | 2015-01-15 | University Of Alaska Fairbanks | Validating And Calibrating A Forecast Model |
CN112102432A (en) * | 2020-09-17 | 2020-12-18 | 中科三清科技有限公司 | Method and device for drawing air quality vertical distribution diagram and storage medium |
CN112102433A (en) * | 2020-09-17 | 2020-12-18 | 中科三清科技有限公司 | Method and device for drawing vertical distribution map of air pollutants and storage medium |
CN113436308A (en) * | 2021-08-27 | 2021-09-24 | 江苏及象生态环境研究院有限公司 | Three-dimensional environment air quality dynamic rendering method |
CN114443787A (en) * | 2021-11-05 | 2022-05-06 | 中科三清科技有限公司 | Atmospheric pollution feature identification method and device |
CN114138868A (en) * | 2021-12-03 | 2022-03-04 | 中科三清科技有限公司 | Method and device for drawing air quality statistical distribution map |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20240184975A1 (en) | Adaptive content delivery | |
EP4141797A1 (en) | Method and apparatus of processing information, method and apparatus of rendering image, and electronic device | |
CN114157701B (en) | Task testing method, device, equipment and storage medium | |
CN103402089A (en) | Virtual desktop image compressing method based on macro block technology | |
CN110874172B (en) | Method, device, medium and electronic equipment for amplifying APP interface | |
CN111311014B (en) | Service data processing method, device, computer equipment and storage medium | |
CN112597361A (en) | Sorting processing method and device, electronic equipment and storage medium | |
CN114138868B (en) | Method and device for drawing air quality statistical distribution map | |
CN106572131A (en) | Media data sharing method and system in Internet of things | |
CN109409947A (en) | A kind of client-based resident trip survey method | |
CN116739388A (en) | Emission reduction measure evaluation method, device and storage medium | |
CN115512002A (en) | Method, device and system for drawing air quality distribution map | |
US8687011B2 (en) | Techniques for efficient sampling for image effects | |
EP4149111A1 (en) | Method for determining video coding test sequence, related apparatus and computer program product | |
CN111857515A (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN115731319A (en) | Graph drawing method, device, equipment and storage medium | |
CN112905814B (en) | Picture processing method and device, storage medium and electronic equipment | |
CN114679602A (en) | Data processing method and device, electronic equipment and storage medium | |
CN110956686A (en) | Rendering bidding method and system | |
CN113918002B (en) | Frequency modulation method, frequency modulation device, storage medium and electronic equipment | |
CN113779098B (en) | Data processing method, device, electronic equipment and storage medium | |
US20230206756A1 (en) | Method and system of controlling traffic lighting apparatus, electronic device and storage medium | |
CN115103321B (en) | Short message sending method and device, computer equipment and storage medium | |
CN112824999B (en) | Temperature control method and related product | |
CN107800618B (en) | Picture recommendation method and device, terminal and computer-readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20221223 |