CN114625992B - Visualization method and system for hundred-megawatt meteorological network data - Google Patents

Visualization method and system for hundred-megawatt meteorological network data Download PDF

Info

Publication number
CN114625992B
CN114625992B CN202210249428.4A CN202210249428A CN114625992B CN 114625992 B CN114625992 B CN 114625992B CN 202210249428 A CN202210249428 A CN 202210249428A CN 114625992 B CN114625992 B CN 114625992B
Authority
CN
China
Prior art keywords
data
image
layer
pixel
visualization
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.)
Active
Application number
CN202210249428.4A
Other languages
Chinese (zh)
Other versions
CN114625992A (en
Inventor
杨和平
姜筱玮
张强
张志强
陈楠
陈京华
冯明农
李默予
杨笛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National Meteorological Information Center Meteorological Data Center Of China Meteorological Administration
Original Assignee
National Meteorological Information Center Meteorological Data Center Of China Meteorological Administration
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by National Meteorological Information Center Meteorological Data Center Of China Meteorological Administration filed Critical National Meteorological Information Center Meteorological Data Center Of China Meteorological Administration
Priority to CN202210249428.4A priority Critical patent/CN114625992B/en
Publication of CN114625992A publication Critical patent/CN114625992A/en
Application granted granted Critical
Publication of CN114625992B publication Critical patent/CN114625992B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • G06F16/538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/587Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/88Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving rearrangement of data among different coding units, e.g. shuffling, interleaving, scrambling or permutation of pixel data or permutation of transform coefficient data among different blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/32Image data format
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Library & Information Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a visualization method and system for hundred-megabyte-level meteorological grid data, and belongs to the field of meteorological data processing. The visualization method comprises the steps of carrying out data analysis on the hundred-megabyte-level meteorological grid data, carrying out high-8-bit and low-8-bit compression storage and storing the data as a PNG (portable network generator) format image; then, the PNG format images are reduced by different multiples by adopting a pyramid model, and all the images are sliced and stored; then, a distributed network is adopted to carry out multi-thread transmission on all slices; the client requests slicing according to visualization requirements, splicing the obtained slices, and performing grid conversion and visualization rendering on the spliced images to complete visualization of the hundred-megabyte meteorological grid data. The method and the device realize the rapid visualization of the hundred-megabyte-level meteorological grid data, can efficiently support the efficient rendering of large data files of various spatial grid points, improve the visualization efficiency, avoid the loss of characteristic values caused by sparse rendering, and reduce the pressure of a server side.

Description

Visualization method and system for hundred-megametric meteorological network data
Technical Field
The invention belongs to the field of meteorological data processing, and particularly relates to a hundred-megametric meteorological grid data visualization method and a system.
Background
With the development of information collection and storage technology, various industries around the world enter a big data era, and the data volume is continuously increased. Among them, weather data plays an important role in various aspects such as environment, natural resources, economy, and life as one of daily necessary data information. The meteorological data is usually stored in a grid mode, and the storage and expression modes comprise grib and nc formats.
The meteorological grid data has strong specialization, and can be used after being decompressed, analyzed and processed by a specialized tool, and the data expression and service forms comprise point-based meteorological element value extraction, regional meteorological element value domain rendering and the like. However, meteorological grid data is used not only to serve professionals, but also to serve the public of society. Professional personnel generally use meteorological grid data through professional software or development kit, for example, the American NASA (network platform integration) based on JAVA, publishes client side Panoply software for meteorological grid data display, supports grid files in Grib2 and NC formats, and publishes geographic science popularization software World Wind at the same time, and displays the meteorological data through images and data provided by various large service providers through a three-dimensional earth model; in China, desktop software such as MeteoInfo, traps and the like provides tools such as visual analysis and the like for gridding data such as NetCDF, GRIB and the like; the applications are all localized applications, and a data transmission process is omitted by directly reading the local disk file, so that the visualization efficiency is improved. However, the above-mentioned specialized development kit or local installation process of software has certain requirements for the environment of computer, and is not suitable for services facing the public.
Page-side applications based on B/S structures are gradually being developed for the social public to also use weather grid data. Through comprehensive application of rich browser application designs such as WebGIS and HTML5, non-installation visual application of meteorological grid data is achieved. The implementation mode comprises the steps that the background carries out image processing on the grids, the GEOServer technology is utilized, the dynamic slices are published, and the front end of the page is directly calculated and displayed. For example, rainViewer has the largest coverage of weather radar on the market, covers a single image of more than 1000 doppler radars of 90 countries, forms an image file with a resolution of 8000 × 4000 and a data size of about 1M, and performs 18-layer slicing on the image, wherein the resolution of a single slice is 256 × 256 and the size is about 10 k. In the mode of displaying the images in an overlapping mode, the size of the original lattice point file is not considered, the original lattice point file is directly converted into a proper image, but the requirements of real-time interaction such as changing the color system range, filtering according to values and the like cannot be met; when the amplified resolution exceeds the maximum resolution of the image, layer blurring can occur, so that the user experience is poor; in the practical application of some special cases, the meteorological grid data are converted into transparent pictures which are directly superposed on a map, but the resolution effect is poor after the meteorological grid data are amplified; or thinning layer by layer into a sparse grid, which can cause loss of characteristic values (maximum value, minimum value and the like) and influence the real rendering result of the front end. In addition, page rendering based on a B/S architecture is mainly used for directly processing data, and processing technologies such as Geojson or Topjson, binary, gray-scale map and the like are mainly adopted at present: geojson or Topjson, the data volume is multiplied after processing, and when the file is large, the transmission efficiency is low; after binary and gray-scale image processing, certain amount of compression is carried out on data, and the method is suitable for ten-megabyte-level file compression processing and transmission, but has low compression and transmission efficiency for hundred-megabyte-level files. Therefore, the page rendering based on the B/S framework cannot give consideration to both efficiency and accuracy.
Meanwhile, although the meteorological grid data is quickly visualized at the webpage end, the meteorological grid data still has the problem of incompatibility at the mobile end along with the application of platform technologies such as the mobile end, weChat, wap and the like. For example, the global visualization display system nullshool.net in the united states is a base map of a coastline profile with a resolution of 50km or 110km in a json format, and is difficult to be used for refined service application in service, and cannot be applied to platforms such as a mobile terminal, weChat, and Wap.
Disclosure of Invention
In view of the above defects or shortcomings in the prior art, the present invention aims to provide a method and a system for visualizing hundred-megabyte-level meteorological grid data, which implement efficient compression of data in the background, can be applied to the Wap, APP, etc. of the PC end Web and the mobile terminal at the same time, and improve the transmission efficiency of data, improve the user experience, and improve the public service efficiency on the premise of guaranteeing the content accuracy.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides a method for visualizing hundred-megametric weather grid data, including the following steps:
s1, after data analysis is carried out on the hundred-megametric meteorological grid data, high 8-bit and low 8-bit compression storage is carried out on the data, and the data are stored as PNG format images;
s2, reducing the PNG format image by different multiples by adopting a pyramid model to obtain the PNG format image and each reduced image;
s3, slicing and storing the PNG format image and each reduced image;
s4, carrying out multi-thread transmission on all slices by adopting a distributed network;
and S5, requesting slices according to visualization requirements by the client, splicing the acquired slices, and performing grid conversion and visualization rendering on the spliced images to complete visualization of the hundred-megabyte meteorological grid data.
As a preferred embodiment of the present invention, the compressing and storing the data with the upper 8 bits and the lower 8 bits as the PNG format image includes:
setting original data as O, setting legend precision of the visual effect graph as N, multiplying the original data by the reciprocal of the legend precision, and then rounding to obtain conversion data C, as shown in formula (1):
Figure BDA0003546338230000031
and performing high 8-bit value storage on the conversion data C into RGB G data, performing low 8-bit value storage into RGB B data, wherein the formula (2) is a high 8-bit value formula, the formula (3) is a low 8-bit value formula, and the formulas (4) - (6) are storage formulas:
Figure BDA0003546338230000032
D=C%256 (3)
G_N[:][:][:,:,1]=U (4)
G_N[:][:][:,:,2]=D (5)
Figure BDA0003546338230000033
and D is the intermediate value after the value of the lower 8 bits, and G _ N is a newly-built PNG image used for storing a corresponding compression value.
As a preferred embodiment of the present invention, the legend accuracy N is 0.1.
As a preferred embodiment of the present invention, in step S2, the reducing of the PNG format image by different multiples using the pyramid model is performed to obtain the PNG format image and each reduced image, including:
taking the PNG format image as the 0 th layer of the pyramid, and carrying out reduction by 2 times, 4 times, 8 times and 16 times by utilizing bicubic difference values to obtain the 1 st layer image, the 2 nd layer image, the 3 rd layer image and the 4 th layer image;
for any pixel point P in the layer 1 image, corresponding to a pixel point P' in the layer 0 image; assuming that the size of the 0 th layer image G is M × N, the size of the reduced 1 st layer target image G is M × N, (x, y) is the position coordinates of the point P, and (x ', y ') is the coordinates of the corresponding point P ' of P on G in the image G; wherein the content of the first and second substances,
Figure BDA0003546338230000041
selecting 16 sampling points P00-P33 closest to P' in the layer 0 image; assume the P11 position is (x) 11 ,y 11 ) The position of P' can be represented as (x) 11 +u,y 11 + v), u, v represent the difference between P' and P11 abscissa, respectively; taking the pixel point distance as 1, and the distance between the pixel point P' and the known sampling pixel point P00 as (1 + u,1+ v); respectively taking the abscissa and ordinate differences as independent variables, calculating the pixel value weighting coefficients in the respective directions by a polynomial interpolation function to obtain the abscissa weight of P00 to P
Figure BDA0003546338230000042
Weight of ordinate of
Figure BDA0003546338230000043
The pixel contribution of P00 to P' is Pix 00 xW (1 +u). Times W (1 +v), wherein Pix 00 A pixel value representing a P00 point; similarly, the pixel weight of 16 points to the point P ', i.e. the weighting coefficient, is obtained through an interpolation function, the pixel value of P' is obtained through calculation according to the weighting coefficient and the pixel values of 16 pixels, and finally the pixel value is mapped to the pixel point P in the zoomed image g.
As a preferred embodiment of the present invention, 16 images are selected according to the weighting factorCalculating the pixel value of the pixel point to obtain the pixel value Pix of P (x',y') The specific steps are as in formula (8):
Figure BDA0003546338230000044
wherein, pix ij Representing the pixel values of the closest 16 sample points Pij,
Figure BDA0003546338230000045
representing the weight of the abscissa direction of the corresponding sample point,
Figure BDA0003546338230000046
representing the weight of the ordinate direction of the corresponding sample point.
As a preferred embodiment of the present invention, the polynomial interpolation function selects a BiCubic basis function, which is shown in equation (9):
Figure BDA0003546338230000047
wherein, a is-0.5.
As a preferred embodiment of the present invention, in the slicing operation in step S3, the pixel point of the 4 th layer image is used as the pixel size of a single slice, and other four-layer data is sliced, and the storage directory is in the following format: filename > number of levels > number of rows > number of columns PNG.
As a preferred embodiment of the present invention, the step S5, the client requesting the slice according to the visualization requirement further includes:
s51, the client acquires the enlarged size ZS of a display map locally used for displaying meteorological grid data;
step S52, requesting and acquiring a slice group CN from a server side according to ZS;
step S53, acquiring the projection size (lon) of the visible size of the local screen on the map according to the ZS s ,lat s )-(lon e ,lat e );
Step S54, according to the slice group CN and the projection size (lon) s ,lat s )-(lon e ,lat e ) And the client requests the server through the browser and acquires the index of the slice to be displayed.
As a preferred embodiment of the present invention, the requesting and obtaining the index of the slice to be displayed in step S54 further includes:
according to the projection size (lon) s ,lat s )-(lon e ,lat e ) The corresponding screen distance is found by equation (11):
Screen D=Distance((lon 1 ,lat 1 ),(lon 2 ,lat 2 ))*scale (11)
determining a scaling layer of the selected slice according to the diagonal length of each layer of the pyramid picture; the scaled layer is determined using equation (12), as follows:
Figure BDA0003546338230000051
in equation (12), orgSZ represents the diagonal picture size of the compressed resource file; the division results of "orgSZ" and "screen D" are how many times the visible range on the screen is than that of the compressed original file;
after the layer scaling is determined, the latitude and longitude range of the acquired screen, namely the upper left corner (lu) x ,lu y ) And the lower right corner (rd) x ,rd y ) The slice index is obtained according to equation (13):
disx=tile x -lu x
if disx>0 col start =ceil(disx/interval);
else col start =0;
col end =col start +ceil((rd x -lu x )/interval) (13)
in the formula (13), tile x Is the upper left corner of the data in the x-direction, disx is the distance between the upper left corner of the screen and the upper left corner of the data in the x-direction, col start Is a starting sliceColumn index, col end To terminate the slice column index, interval is the slice length and width, ceil denotes the divisor rounded up.
As a preferred embodiment of the present invention, the longitude and latitude distances of two points determined on the screen in step S53 are calculated as follows:
Distance((lon s ,lat s ),(lon e ,lat e ))
=R*cos -1 [cos(lat s )*cos(lat e )*cos(lon s -lon e )+sin(lat s )*sin(lat e )] (10)
wherein, R is approximately equal to 6371.0km and is the radius of the earth.
In a second aspect, an embodiment of the present invention further provides a system for visualizing hundred-megametric weather grid data, where the system includes: the system comprises an analysis compression module, a pyramid processing module, a slicing module, a transmission module and a splicing rendering module; wherein the content of the first and second substances,
the analysis compression module is provided with an input port for receiving data, is connected with the pyramid processing module and is used for carrying out data analysis on the received hundred-megametric meteorological grid data, then carrying out high 8-bit and low 8-bit compression storage on the data, storing the data into a PNG format image and sending the image to the pyramid processing module;
the pyramid processing module is used for reducing the PNG format image by different times by adopting a pyramid model to obtain the PNG format image and each reduced image, and sending the PNG format image and each reduced image to the slicing module;
the slicing module is used for slicing and storing the PNG format image and each reduced image and sending the sliced and stored PNG format image and each reduced image to the transmission module;
the transmission module is used for carrying out multi-thread transmission on all the slices by adopting a distributed network and uploading the slices to a cloud or a server;
the splicing rendering module is arranged at the client and used for requesting slices to the cloud or the server according to the visualization demand under the request of the client, splicing the obtained slices, and performing grid conversion and visualization rendering on the spliced image to complete visualization of the hundred-megametric meteorological grid data.
The invention has the following beneficial effects:
according to the method and the system for visualizing the hundred-megabyte-level meteorological network data, provided by the embodiment of the invention, links such as data processing, compression, rendering and the like are respectively specifically processed, a multi-terminal rendering framework is constructed, the rapid visualization of the hundred-megabyte-level grid point data is realized, the WebGIS efficient rendering of various spatial grid point big data files can be efficiently supported, a solution is provided for the rapid visualization of industrial data and fused spatial big data, and the installation-free visualization efficiency of the grid point big data based on a browser is further improved; the method has the advantages that the loss of characteristic values caused by rarefaction rendering is avoided to the greatest extent by adopting the separation of figures, meanwhile, the rendering capability of the browser end and the advantages of the cloud + end are fully played based on the WebGL technical framework in the rendering process, and the pressure of the server end is relieved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for visualizing meteorological grid data in an embodiment of the present invention;
FIG. 2 is a schematic diagram of a bicubic difference principle in an embodiment of the invention;
FIG. 3 is a flowchart illustrating the process of stitching and visually rendering slice images according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a screen visible map range and slice layers in an embodiment of the invention;
FIG. 5 is a comparison of compression before and after compressing slices in an embodiment of the present invention.
Detailed Description
After finding out the problems, the inventor of the application carries out deep research on the existing meteorological grid data visualization method, and finds that the development of the vector slicing technology provides a feasible solution for transmitting large-scale vector data to a client for rendering under the condition of limited bandwidth, and also provides possibility for real-time interaction of the front end. For example, the mapper supports the release of grid images and vector image slices, converts geographic data into slices compatible with Google Maps and Earth, can be directly uploaded to any WEB server or cloud storage device (such as Amazon S3) for release, and provides dynamic visual display of elements such as wind, cloud, temperature and ocean waves in the aspect of meteorological support. With the development of the WebGIS technology, the NOAA develops the NWS Geographic Information Services based on pictures, vector map cutting and publishing Services provided by the ArcGIS StoryMaps platform, and comprehensively and visually displays various weather data such as weather radar, monitoring and alarming. However, since meteorological data is data with a relatively strong frequency of temporal-spatial dynamic change, the dynamic vector slicing scheme involves steps such as data preparation, dynamic vector slicing service, front-end visualization, and the like, and dynamic vector slicing has a high requirement on performance of a server where a spatial database (PostGIS) is located.
For example, a global visualization display system (nullshoof. Net) is designed for ECMWF forecast data in the united states, a base map is obtained by converting a map in Natural Earth into a TopoJSON format, meteorological grid data is compressed and transmitted in an epak format, and node. Js is used for realizing rapid rendering and display of a foreground; tokoyo Wind Map is developed by Tokyo weather bureau and the like based on a global visual display system framework. Although the software plays the advantage of quick visualization at the webpage end, the mobile end still has the problem of incompatibility, and the map is a base map of a 50km or 110km resolution coastline profile of a json format, so that the software is difficult to be used for refined service application. The China weather bureau releases 1km of weather live grid data in 2021, the data covers east Asia regions, the grid size is 7000x 4500, and the data volume reaches 106M. For the hundred-megabyte-level meteorological grid data, the page rendering based on the B/S framework is difficult to guarantee both the efficiency and the data accuracy.
It should be noted that the above prior art solutions have defects which are the results of practical and careful study by the inventors, and therefore, the discovery process of the above problems and the solutions proposed by the following embodiments of the present invention to the above problems should be the contribution of the inventors to the present invention in the course of the present invention.
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely a few embodiments of the invention, and not all embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. It should be noted that the embodiments and features of the embodiments of the present invention may be combined with each other without conflict.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. In the description of the present invention, the terms "first," "second," "third," "fourth," and the like are used merely to distinguish one description from another, and are not to be construed as merely or implying relative importance.
After the above deep analysis, the embodiment of the application provides a method for visualizing hundred-megametric meteorological grid data, which solves the following problems: in the process of visualizing the front end of hundred-megametric grid data, the background compression processing cannot realize high-efficiency compression, so that the transmission efficiency is low, the response of a user to the data visualization operation is slow, and the user experience is poor; in the whole visualization process, if the precision requirement of file data is high in the compression process, the file compression efficiency is low, the file compression efficiency requirement is high, and the loss of the content precision of the file is severe. The hundred million-level weather grid data here is in the geographic range of 70-140E, 15-60N, and includes 7000 latitude points and 4500 longitude points, with a single file containing over 3 hundred million points, e.g., a single file of precipitation fusion products per hour is 101.3M.
The method for visualizing the hundred-megabyte-level meteorological grid data is applied to clients such as a personal computer browser, a mobile terminal browser, wap, a wechat applet or a mobile terminal APP, and the like, is based on a MapBox open source WebGIS service platform, comprehensively considers links such as compression, slicing and display, constructs a hundred-megabyte-level meteorological grid data fast transmission and fast viewing process, provides a middle platform support mode for meteorological grid data visualization service, and releases the hundred-megabyte-level meteorological grid data at meteorological visualization columns, a mobile phone APP and a WeChat client of a China meteorological data network. The method provides a quick and convenient solution for quick visual rendering of other grid data, and simultaneously provides reference for grid data visualization application in other industries.
As shown in fig. 1, the visualization method of the hundred megametric weather grid data includes the following steps:
and S1, after data analysis is carried out on the hundred-megabyte-level meteorological grid data, carrying out high-8-bit and low-8-bit compression storage on the data, and storing the data as a PNG (portable network generator) format image so as to furthest store data precision in a transmission process.
In this step, data analysis and compression are performed, the meteorological data after data analysis is generally floating point type data, and the floating point type data is used as original data for compression. Setting original data as O, setting legend precision of the visual effect graph as N, multiplying the original data by the reciprocal of the legend precision, and then rounding to obtain conversion data C, as shown in formula (1):
Figure BDA0003546338230000091
and carrying out high 8-bit value storage on the conversion data C in G data of RGB, carrying out low 8-bit value storage in B data of RGB, wherein the formula (2) is a high 8-bit value formula, the formula (3) is a low 8-bit value formula, and the formulas (4) - (6) are storage formulas:
Figure BDA0003546338230000092
D=C%256 (3)
G_N[:][:][:,:,1]=U (4)
G_N[:][:][:,:,2]=D (5)
Figure BDA0003546338230000101
and D is the intermediate value after the value of the lower 8 bits, and G _ N is a newly-built PNG image used for storing a corresponding compression value. The high-low 8-bit compressed storage can meet the requirement of visual display of the accumulated value of the meteorological time periods such as year, month and day.
In this step, the legend precision is the precision of three parameters in RGB, and N in this embodiment is preferably 0.1.
The algorithm of this embodiment is applicable to a larger-scale accumulated value and a higher image precision requirement, for example, the visualization precision of three significant digits after the decimal point is retained, which affects the calculation and transmission speed, and belongs to a normal rule. Of course, the method of this embodiment may also be applied to the case of small-scale accumulated values, but it is not obvious or necessary to increase the calculation and transmission speed.
Using hourly rainfall grid data as an example, the legend accuracy is set to 0.1. The maximum rainfall is below 250mm (rainstorm when the daily rainfall reaches 250 mm), and the value range of the grid data is [ -32768-32767 ]. And after the network data are analyzed, multiplying the network data by 10, rounding to obtain conversion data C, performing high-8-bit value storage on C as G, performing low-8-bit value storage as B, setting R as 0, and storing the conversion data C as a PNG format image in an RGB compression storage mode. The PNG image compresses the file based on the LZ77 derivation algorithm, the generated file volume is small, the compression ratio is high, and data is not lost.
Preferably, the mesh data is parsed in this step based on python3.6 and calling the gribpy packet.
And S2, reducing the PNG format image by different multiples by adopting a pyramid model to obtain the PNG format image and each reduced image.
In this step, in order to improve the transmission efficiency, the data is processed according to the image pyramid model. And the compressed PNG file is reduced according to the image pyramid through bicubic interpolation. the tilemap pyramid model is a multi-resolution hierarchical model, and the resolution is reduced from the bottom to the top of the tiled pyramid, but the represented geographic range remains unchanged, i.e., the image is scaled and the squares are refilled. And performing downscaling scaling processing on the image pyramid on the compressed PNG file by using the bicubic difference value. The 7000x 4500 image is zoomed first, and then the zoomed image is square-filled according to the slice pyramid model.
And taking the PNG format image as the 0 th layer of the pyramid, and carrying out 2-time, 4-time, 8-time and 16-time reduction by utilizing the bicubic difference value to obtain the 1 st layer, 2 nd layer, 3 rd layer and 4 th layer images. In the pyramid model, the layer 1 image is calculated according to the layer 0 image, the layer 2 image is calculated according to the layer 1 image, the layer 3 image is calculated according to the layer 2 image, the layer 4 image is calculated according to the layer 3 image, and the logic process of calculation of each layer of image is the same.
The logic process of scaling the image of the pyramid model will be described below by taking the example of computing the layer 1 image from the layer 0 image.
For any pixel point P in the layer 1 image, it corresponds to the pixel point P' in the layer 0 image. Assuming that the size of the 0-th layer image G is M × N, the size of the reduced 1-th layer target image G is M × N, (x, y) is the position coordinate of the point P, and (x ', y ') is the coordinate of the corresponding point P ' of the point P on G in the image G. Wherein the content of the first and second substances,
Figure BDA0003546338230000111
as shown in fig. 2, in the layer 0 image, 16 sampling points P00-P33 closest to P 'are selected, and the 16 sampling points have different weighting coefficients for the pixel influence of P', and the weighting coefficients are obtained through a position relationship and an interpolation function.
Assume the P11 position is (x) 11 ,y 11 ) The position of P' can be represented as (x) 11 +u,y 11 + v), u, v represent the difference between P' and P11 abscissa, respectively. By pixelThe dot spacing is 1, and the distance between the pixel point P' and the known sampling pixel point P00 is (1 + u,1+ v). Respectively taking the horizontal and vertical coordinate difference as independent variables, calculating the pixel value weighting coefficients in the respective directions by a polynomial interpolation function to obtain the horizontal coordinate weight of P00 to P
Figure BDA0003546338230000112
Weight on ordinate of
Figure BDA0003546338230000113
The pixel contribution of P00 to P' is Pix 00 xW (1 +u). Times W (1 +v), wherein Pix 00 Indicating the pixel value of point P00. Similarly, the pixel weight of 16 points to the point P ', i.e. the weighting coefficient, is obtained through an interpolation function, the pixel value of P' is obtained through calculation according to the weighting coefficient and the pixel values of 16 pixels, and finally the pixel value is mapped to the pixel point P in the zoomed image g. In this step, the pixel value Pix of P' is calculated according to the weighting coefficient and the pixel values of 16 pixels (x',y') The specific steps are as formula (8):
Figure BDA0003546338230000114
wherein, pix ij Representing the pixel values of the closest 16 sample points Pij,
Figure BDA0003546338230000115
representing the weight of the abscissa direction of the corresponding sample point,
Figure BDA0003546338230000116
representing the weight of the ordinate direction of the corresponding sample point.
Preferably, in this embodiment, the polynomial interpolation function selects a BiCubic basis function as shown in formula (9).
Figure BDA0003546338230000121
Wherein, a is-0.5.
And S3, slicing and storing the PNG format image and each reduced image.
In this step, during slicing operation, the pixel point of the 4 th layer image is taken as the pixel size of a single slice, and other four-layer data is sliced, and the storage directory is in the following format: filename > number of layers > number of rows > number of columns PNG.
And S4, carrying out multi-thread transmission on all the slices by adopting a distributed network.
In the step, when multi-thread transmission is carried out, the number of concurrent requests of the browser is limited for the same domain name, and the commonly used browsers such as Chrome, firefox, IE11 and the like are all 6, so that the concurrent multi-request to the slice in the page rendering process is limited, and the request queuing or overtime is caused. In the embodiment, the concurrency number is increased by newly adding the domain dashes of the second-level domain names, and the DNS resolution burden is increased by considering excessive domain names, so that the concurrency of each second-level domain name is controlled to be 2-4.
Meanwhile, the slices uploaded in multiple threads can be stored in the cloud, the cloud serves as a server, when the browser needs, a request is sent to the cloud, the required slices are directly downloaded and obtained, and all the slices do not need to be downloaded.
The embodiment is based on a B/S service framework, adopts a Nginx server for proxy, and Nginx is a lightweight Web server/reverse proxy server and an electronic mail (IMAP/POP 3) proxy server, is issued under a BSD-like protocol, and has the advantages of less memory occupation and strong concurrency. In addition, the Nginx can start a Gzip compression function, so that css, js, xml and html files of the website can be compressed during transmission, the access speed is increased, and the performance of the Nginx is optimized.
And S5, requesting slices according to visualization requirements by the client, splicing the acquired slices, and performing grid conversion and visualization rendering on the spliced images to complete visualization of the hundred-megabyte meteorological grid data.
In the step, the client requests slicing according to the visualization requirement, and the optimal number of slicing layers is adopted by comprehensively considering different screen resolutions and map magnification factors. And completing the conversion of the map coordinate and the screen coordinate through the conversion of the longitude and latitude coordinates of the map and the screen coordinate. By solving the problem of a scale, the space information of the original grib2 file on the earth corresponding to the longitude and latitude range is changed into a screen range, and finally the best rendered pyramid slice is confirmed according to the size of each layer of the image pyramid of the grib2 file.
As shown in fig. 3 and 4, the client requesting slicing according to visualization requirements further includes:
step S51, the client acquires the display map enlarged size ZS locally used for displaying the meteorological grid data.
And S52, requesting and acquiring the slice group CN from the server side according to ZS.
Step S53, acquiring the projection size (lon) of the visible size of the local screen on the map according to the ZS s ,lat s )-(lon e ,lat e )。
In this step, the longitude and latitude distances of two points determined on the screen are calculated as follows:
Distance((lon s ,lat s ),(lon e ,lat e ))
=R*cos -1 [cos(lat s )*cos(lat e )*cos(lon s -lon e )+sin(lat s )*sin(lat e )] (10)
wherein, R is approximately equal to 6371.0km and is the radius of the earth.
Step S54, according to the slice group CN and the projection size (lon) s ,lat s )-(lon e ,lat e ) And the client requests the server through the browser and acquires the index of the slice to be displayed.
In this step, the projection size (lon) is determined s ,lat s )-(lon e ,lat e ) And calculating the corresponding screen distance according to the formula (11) by a mapbox scale scarle.
Screen D=Distance((lon 1 ,lat 1 ),(lon 2 ,lat 2 ))*scale (11)
And finally, determining the scaling layer of the selected slice according to the diagonal length of each layer of the pyramid picture. The scaling layer is obtained by using equation (12), as follows:
Figure BDA0003546338230000131
in equation (12), orgSZ represents the diagonal picture size of the compressed resource file; the division result of "orgSZ" and "screen D" is how many times the visible range on the screen is than the compressed file (layer 0). Since the sizes of adjacent layers differ by a factor of two, invoking the indication layer will round up.
After the layer scaling is determined, the latitude and longitude range of the acquired screen, namely the upper left corner (lu) x ,lu y ) And the lower right corner (rd) x ,rd y ) The slice index is obtained according to equation (13):
disx=tile x -lu x
if disx>0 col start =ceil(disx/interval);
else col start =0;
col end = col start +ceil((rd x -lu x )/interval) (13)
in formula (13), tile x Is the upper left corner of the data in the x-direction, and disx is the distance between the upper left corner of the screen and the upper left corner of the data in the x-direction, col start For starting slice column index, col end To terminate the slice column index, interval is the slice length and width, ceil means the divisor rounded up.
The same may be done to obtain the row index of the starting and ending slices.
The coordinate range of the slices must be larger than the coordinate range of the screen, so some offset is made for all slices. And taking the upper left corner of the screen coordinate as an original point, and calculating the difference value of the pixel coordinate of the upper left corner point of each slice and the pixel coordinate of the slice of the upper left corner point of the screen to obtain the deviation value on the page map.
After the slicing request is finished, the following steps are executed:
step S55, the client requests the browser to dynamically splice the slices according to the indexes to form a required visual image;
and S56, decompressing the visual image into a display map, and finishing rendering.
In the rendering process of the step, the space-time attribute of meteorological data and the requirement of high-speed rendering are comprehensively considered based on a Vue development framework, the mapbox is used as the service support of geographic information, and the front-end visual development of the system is completed by combining the WebGL high-performance front-end rendering technology. Vue is a progressive and high-performance front-end javascript framework of the page, and mainly takes view layer rendering as a core, and utilizes a component mechanism, a routing mechanism, state management and the like to quickly realize front-end high-frequency operation and realize efficient interaction on the page.
Preferably, the embodiment adopts nodejs service, and the fast construction of the framework is realized by installing vue-cli (vue scaffold) through npm. The Mapbox is a high-efficiency WEB GIS development framework aiming at GIS engines with responses of different platforms. In the embodiment, development of the web-side Html5 is realized by adopting a Mapbox GL JS (Mapbox-GL component), wherein the Mapbox-GL is a JavaScript library which can render a large number of map elements and has smooth interaction and animation effects.
By adopting the visualization method of the hundred-megabyte-level meteorological grid data, 16-day 9, 23 and 2020-day-00 time-lapse rainfall fusion data with the resolution of 1km × 1km is visualized, the time-lapse rainfall fusion data comprises 7000 latitude points and 4500 longitude points, a single file contains more than 3 hundred million points, and the size of the single file of a rainfall fusion product per hour is about 100M.
After analyzing the time-by-time precipitation fusion data, performing high-low 8-bit compression and storing the data as a PNG format image; and then, carrying out reduction on the PNG format image by different multiples by adopting a pyramid model to generate 2-fold reduced G1 (3500 x 2250), 4-fold reduced G2 (1750 x 1125), 8-fold reduced G3 (875 x 562) and 16-fold reduced G4 (437 x 281), and constructing 5-layer pyramid data including the original image. And (3) supplementing a square to the image file of each layer, taking the maximum length or width as the side length of the square, newly building a square canvas, overlapping the upper left corner of the original drawing and the upper left corner of the square, and filling the rest part with white. After the processing, the data of each layer of the pyramid is as follows: the 5-layer pyramid determines the degree of the pixel interval corresponding to each scaling ratio according to the scaling factor, and the degree is shown in table 1, wherein the degree is G _ N _0 (7000 x 7000), G _ N _1 (3500 x 3500), G _ N _2 (1750 x 1750), G _ N _3 (875 x 875) and G _ N _4 (437 x 437) are layers 1, 1 and 2, and G _ N _2 (1750 x 1750) and G _ N _3 (875 x 875) are layers 3. During slicing operation, G _ N _4 is used as the pixel size of a single slice to slice other four layers of data, and a storage directory is prepared for a page request according to a file name, a layer number, a row number and a column number.
TABLE 1 slice compression information
Figure BDA0003546338230000151
Through the visualization process of the hundred-megabyte weather grid data in the embodiment, as shown in fig. 5, the time for compressing all slices in the original file (layer 0) to complete the transmission progress from the server to the browser is 1000 times faster than the time for opening the original slices when 256 concurrent channels are opened; the maximum number of browser requests includes slices of maps and data, with the actual maximum request amount in this embodiment being less than 60, since the visual slices are determined from the map range; 64 concurrent channels are opened for requests, containing 8 subzones.
In this embodiment, an hour precipitation lattice point file with a size of 120M is processed by using the methods of geoJSON processing, binary compression, grayscale map conversion, and the like commonly used in the webGIS, and the processing result is shown in table 2. As shown in table 2, the high-low eight-bit compression algorithm used in this embodiment is lossless, and compresses data to the maximum extent.
Table 2 background processing results during various webGIS rendering
Figure BDA0003546338230000152
According to the technical scheme, the visualization method of the hundred-megabyte-level meteorological network data is based on a VUE framework of HTML5, browsers such as a PC and a mobile terminal are used as carriers, links such as data processing, compression and rendering are respectively specifically processed, a multi-terminal rendering framework is constructed, the rapid visualization of the hundred-megabyte-level lattice point data is realized, the WebGIS efficient rendering of various spatial lattice point big data files can be efficiently supported, a solution is provided for the rapid visualization of industrial data and fused spatial big data, and the installation-free visualization efficiency of the lattice point big data based on the browsers is further improved; the method of replacing original data with compressed images avoids loss of characteristic values caused by sparse rendering to a great extent, and meanwhile, based on a WebGL technical framework, rendering capability of a browser end and the advantages of a cloud end are fully played, and pressure of a server end is relieved.
Based on the same idea, an embodiment of the present invention further provides a system for visualizing hundred-megabyte-level meteorological grid data, where the system includes: the system comprises an analysis compression module, a pyramid processing module, a slicing module, a transmission module and a splicing rendering module;
the analysis compression module is provided with an input port for receiving data, is connected with the pyramid processing module, and is used for performing data analysis on the received hundred-megametric meteorological grid data, then performing high-8-bit and low-8-bit compression storage on the data, storing the data as a PNG format image and sending the image to the pyramid processing module;
the pyramid processing module is used for reducing the PNG format image by different times by adopting a pyramid model to obtain the PNG format image and each reduced image, and sending the PNG format image and each reduced image to the slicing module;
the slicing module is used for slicing and storing the PNG format image and each reduced image and simultaneously sending the PNG format image and each reduced image to the transmission module;
the transmission module is used for carrying out multi-thread transmission on all slices by adopting a distributed network, wherein the transmission module is a process of uploading the slices to a cloud or a server;
the splicing rendering module is arranged at the client and used for requesting slices to the cloud or the server according to the visualization demand under the request of the client, splicing the obtained slices, and performing grid conversion and visualization rendering on the spliced image to complete visualization of the hundred-megametric meteorological grid data.
In the embodiment, each module is realized by a processor, and when the storage is needed, the storage is added appropriately. The Processor may be, but is not limited to, a microprocessor MPU, a Central Processing Unit (CPU), a Network Processor (NP), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components, and the like. The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
The visualization system of the hundred-megabyte-scale meteorological grid data of the embodiment corresponds to the visualization method of the hundred-megabyte-scale meteorological grid data, and the description of the method is also applicable to the system, and is not repeated herein.
The foregoing description is only exemplary of the preferred embodiments of the invention and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features and (but not limited to) features having similar functions disclosed in the present invention are mutually replaced to form the technical solution.

Claims (7)

1. A visualization method for hundred-megametric meteorological grid data is characterized by comprising the following steps:
s1, after data analysis is carried out on the hundred-megabyte-level meteorological grid data, high-8-bit and low-8-bit compression storage is carried out on the data, and the data are stored as PNG format images;
s2, reducing the PNG format image by different multiples by adopting a pyramid model to obtain a PNG format image and each reduced image; the method specifically comprises the following steps:
taking the PNG format image as the 0 th layer of the pyramid, and carrying out reduction by 2 times, 4 times, 8 times and 16 times by utilizing bicubic difference values to obtain the 1 st layer image, the 2 nd layer image, the 3 rd layer image and the 4 th layer image;
for any pixel point P in the layer 1 image, corresponding to a pixel point P' in the layer 0 image; assuming that the size of the 0-th layer image G is M x N, the size of the reduced 1-th layer target image G is M x N, (x, y) is the position coordinate of the point P, and (x ', y ') is the coordinate of the corresponding point P ' of the point P on G in the image G; wherein the content of the first and second substances,
Figure FDA0003889151200000011
selecting 16 sampling points P00-P33 closest to P' from the layer 0 image; assume the P11 position is (x) 11 ,y 11 ) The position of P' can be represented as (x) 11 +u,y 11 + v), u, v represent P' and P11 sit crosswise respectivelyMarking difference; taking the pixel point distance as 1, and the distance between the pixel point P' and the known sampling pixel point P00 as (1 + u,1+ v); respectively taking the horizontal and vertical coordinate difference as independent variables, calculating the pixel value weighting coefficients in the respective directions by a polynomial interpolation function to obtain the horizontal coordinate weight of P00 to P
Figure FDA0003889151200000012
Weight on ordinate of
Figure FDA0003889151200000013
The pixel contribution of P00 to P' is Pix 00 xW (1 +u). Times W (1 +v), wherein Pix 00 A pixel value representing a P00 point; similarly, the pixel weight of 16 points to the point P ', namely a weighting coefficient, is calculated through an interpolation function, the pixel value of P' is obtained through calculation according to the weighting coefficient and the pixel values of 16 pixel points, and the pixel values are mapped to the pixel point P in the zoomed image g; wherein the W () represents a polynomial interpolation function;
s3, slicing and storing the PNG format image and each reduced image;
s4, carrying out multi-thread transmission on all slices by adopting a distributed network;
s5, the client requests for slicing according to visualization requirements, splicing the acquired slices, and performing grid conversion and visualization rendering on the spliced images to complete visualization of the hundred-megabyte meteorological grid data;
in step S5, the client requesting slicing according to visualization requirements further includes:
s51, the client acquires the display map enlarged size ZS locally used for displaying meteorological grid data;
step S52, requesting and acquiring a slice group CN from a server side according to ZS;
step S53, acquiring the projection size (lon) of the visible size of the local screen on the map according to the ZS s ,lat s )-(lon e ,lat e );
Step S54, according to the slice group CN and the projection size (lon) s ,lat s )-(lon e ,lat e ) The client requests the server through the browser and obtains the index of the slice to be displayed; the requesting and obtaining an index of a slice to be presented further comprises:
according to the projection size (lon) s ,lat s )-(lon e ,lat e ) The corresponding screen distance is found by equation (11):
Screen D=Distance((lon 1 ,lat 1 ),(lon 2 ,lat 2 ))*scale (11)
determining a scaling layer of the selected slice according to the diagonal length of each layer of the pyramid picture; the scaled layer is determined using equation (12), as follows:
Figure FDA0003889151200000021
in equation (12), orgSZ represents a diagonal picture size of the compressed resource file; the division result of "orgSZ" and "S creeend" is how many times the visible range on the screen is than that of the compressed original file;
after the layer scaling is determined, the latitude and longitude range of the acquired screen, namely the upper left corner (lu) x ,lu y ) And the lower right corner (rd) x ,rd y ) The slice index is obtained according to equation (13):
disx=tile x -lu x
if disx>0 col start =ceil(disx/interval);
else col start =0;
col end =col start +ceil((rd x -lu x )/interval) (13)
in the formula (13), tile x Is the upper left corner of the data in the x-direction, and disx is the distance between the upper left corner of the screen and the upper left corner of the data in the x-direction, col start For initial slice column indexing, col end To terminate the slice column index, interval is the slice length and width, ceil denotes the divisor rounded up.
2. The method for visualizing the hundred megametric weather grid data as claimed in claim 1, wherein the compressed storing of the upper 8 bits and the lower 8 bits of the data as the PNG format image comprises:
setting the original data as O, the legend precision of the visual effect graph as N, multiplying the original data by the reciprocal of the legend precision, and then rounding to obtain conversion data C, as shown in formula (1):
Figure FDA0003889151200000031
and performing high 8-bit value storage on the conversion data C into RGB G data, performing low 8-bit value storage into RGB B data, wherein the formula (2) is a high 8-bit value formula, the formula (3) is a low 8-bit value formula, and the formulas (4) - (6) are storage formulas:
Figure FDA0003889151200000032
D=C%256 (3)
G_N[:][:][:,:,1]=U (4)
G_N[:][:][:,:,2]=D (5)
Figure FDA0003889151200000033
wherein, U is an intermediate value after being valued at the 8 higher bits, D is an intermediate value after being valued at the 8 lower bits, and G _ N is a newly-built PNG image used for storing a corresponding compression value.
3. The method for visualizing the hundred megametric weather grid data of claim 2, wherein the legend accuracy N is 0.1.
4. Visualization of hundred megametric weather grid data as claimed in claim 1The method is characterized in that the pixel value Pix of P' is calculated according to the weighting coefficient and the pixel values of 16 pixels (x′,y′) The specific steps are as in formula (8):
Figure FDA0003889151200000034
wherein, p ix ij Representing the pixel values of the closest 16 sample points Pij,
Figure FDA0003889151200000035
representing the weight of the abscissa direction of the corresponding sample point,
Figure FDA0003889151200000036
representing the weight of the ordinate direction of the corresponding sample point.
5. The method for visualizing hundred megametric weather grid data as claimed in claim 1 or 4, wherein the polynomial interpolation function selects BiCubic basis functions, biCubic basis functions are represented by formula (9):
Figure FDA0003889151200000037
wherein, a is-0.5.
6. The visualization method for the hundred megametric weather grid data according to claim 1, wherein in the slicing operation of step S3, the pixel points of the layer 4 image are taken as the pixel size of a single slice, and the other four layers of data are sliced, and the storage directory is in the following format: filename > number of layers > number of rows > number of columns PNG.
7. A system for visualizing hundred megametric weather grid data, the system comprising: the system comprises an analysis compression module, a pyramid processing module, a slicing module, a transmission module and a splicing rendering module; wherein the content of the first and second substances,
the analysis compression module is provided with an input port for receiving data, is connected with the pyramid processing module, and is used for carrying out data analysis on the received hundred-megametric meteorological grid data, then carrying out high-8-bit and low-8-bit compression storage on the data, storing the data as a PNG format image and sending the image to the pyramid processing module;
the pyramid processing module is used for reducing the PNG format image by different times by adopting a pyramid model to obtain the PNG format image and each reduced image, and sending the PNG format image and each reduced image to the slicing module; and is specifically used for:
taking the PNG format image as the 0 th layer of the pyramid, and carrying out reduction by 2 times, 4 times, 8 times and 16 times by utilizing bicubic difference values to obtain the 1 st layer image, the 2 nd layer image, the 3 rd layer image and the 4 th layer image;
for any pixel point P in the layer 1 image, corresponding to a pixel point P' in the layer 0 image; assuming that the size of the 0-th layer image G is M x N, the size of the reduced 1-th layer target image G is M x N, (x, y) is the position coordinate of the point P, and (x ', y ') is the coordinate of the corresponding point P ' of the point P on G in the image G; wherein, the first and the second end of the pipe are connected with each other,
Figure FDA0003889151200000041
selecting 16 sampling points P00-P33 closest to P' from the layer 0 image; suppose the P11 position is (x) 11 ,y 11 ) The position of P' can be represented as (x) 11 +u,y 11 + v), u, v represent the difference between P' and P11 abscissa, respectively; taking the pixel point distance as 1, and the distance between the pixel point P' and the known sampling pixel point P00 as (1 + u,1+ v); respectively taking the horizontal and vertical coordinate difference as independent variables, calculating the pixel value weighting coefficients in the respective directions by a polynomial interpolation function to obtain the horizontal coordinate weight of P00 to P
Figure FDA0003889151200000042
Weight on ordinate of
Figure FDA0003889151200000043
The pixel contribution of P00 to P' is Pix 00 XW (1 +u) XW (1 +v), wherein Pix 00 A pixel value representing a P00 point; similarly, the pixel weight of 16 points to the point P ', namely a weighting coefficient, is calculated through an interpolation function, the pixel value of P' is obtained through calculation according to the weighting coefficient and the pixel values of 16 pixel points, and the pixel values are mapped to the pixel point P in the zoomed image g; wherein the W () represents a polynomial interpolation function;
the slicing module is used for slicing and storing the PNG format image and each reduced image and sending the sliced and stored PNG format image and each reduced image to the transmission module;
the transmission module is used for carrying out multi-thread transmission on all the slices by adopting a distributed network and uploading the slices to a cloud or a server;
the splicing rendering module is used for requesting slices to a cloud end or a server according to visualization requirements under the request of a client, splicing the obtained slices, and performing grid conversion and visualization rendering on the spliced images to complete visualization of the hundred-megabyte meteorological grid data; and the client requesting slicing according to the visualization requirements further comprises:
s51, the client acquires the display map enlarged size ZS locally used for displaying meteorological grid data;
step S52, requesting and acquiring a slice group CN from the server side according to ZS;
step S53, acquiring the projection size (lon) of the visible size of the local screen on the map according to the ZS s ,lat s )-(lon e ,lat e );
Step S54, according to the slice group CN and the projection size (lon) s ,lat s )-(lon e ,lat e ) The client requests the server through the browser and obtains the index of the slice to be displayed; the requesting and obtaining an index of a slice to be presented further comprises:
according to the projection size (lon) s ,lat s )-(lon e ,lat e ) The corresponding screen distance is found by equation (11):
Screen D=Distance((lon 1 ,lat 1 ),(lon 2 ,lat 2 ))*scale (11)
determining a scaling layer of the selected slice according to the diagonal length of each layer of the pyramid picture; the scaling layer is determined by using equation (12), which is as follows:
Figure FDA0003889151200000051
in equation (12), orgSZ represents a diagonal picture size of the compressed resource file; the division result of "orgSZ" and "S creeend" is how many times the visible range on the screen is than that of the compressed original file;
after the zoom layer is determined, the latitude and longitude range of the acquired screen is the upper left corner (lu) x ,lu y ) And the lower right corner (rd) x ,rd y ) The slice index is obtained according to equation (13):
disx=tile x -lu x
if disx>0 col start =ceil(disx/interval);
else col start =0;
col end =col start +ceil((rd x -lu x )/interval) (13)
in formula (13), tile x Is the upper left corner of the data in the x-direction, disx is the distance between the upper left corner of the screen and the upper left corner of the data in the x-direction, col start For initial slice column indexing, col end To terminate the slice column index, interval is the slice length and width, ceil denotes the divisor rounded up.
CN202210249428.4A 2022-03-14 2022-03-14 Visualization method and system for hundred-megawatt meteorological network data Active CN114625992B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210249428.4A CN114625992B (en) 2022-03-14 2022-03-14 Visualization method and system for hundred-megawatt meteorological network data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210249428.4A CN114625992B (en) 2022-03-14 2022-03-14 Visualization method and system for hundred-megawatt meteorological network data

Publications (2)

Publication Number Publication Date
CN114625992A CN114625992A (en) 2022-06-14
CN114625992B true CN114625992B (en) 2022-11-22

Family

ID=81902436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210249428.4A Active CN114625992B (en) 2022-03-14 2022-03-14 Visualization method and system for hundred-megawatt meteorological network data

Country Status (1)

Country Link
CN (1) CN114625992B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115964037B (en) * 2023-01-05 2023-08-29 三峡高科信息技术有限责任公司 Engineering data visualization low-code configuration method and system
CN117351163B (en) * 2023-10-24 2024-05-03 中国科学院华南植物园 Ecological pattern analysis visualization method, system, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744997A (en) * 2014-01-23 2014-04-23 广东中科遥感技术有限公司 Network map service publication method and system
CN106383965A (en) * 2016-10-13 2017-02-08 国家卫星气象中心 Three-dimensional numerical atmospheric visual support system
CN108256127A (en) * 2018-03-06 2018-07-06 北京工业大学 A kind of weather-map system of customizable pattern

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455624B (en) * 2013-09-16 2017-07-25 湖北文理学院 A kind of global multidimensional remote sensing image Map Service of Network implementation method of lightweight

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744997A (en) * 2014-01-23 2014-04-23 广东中科遥感技术有限公司 Network map service publication method and system
CN106383965A (en) * 2016-10-13 2017-02-08 国家卫星气象中心 Three-dimensional numerical atmospheric visual support system
CN108256127A (en) * 2018-03-06 2018-07-06 北京工业大学 A kind of weather-map system of customizable pattern

Also Published As

Publication number Publication date
CN114625992A (en) 2022-06-14

Similar Documents

Publication Publication Date Title
CN114625992B (en) Visualization method and system for hundred-megawatt meteorological network data
CN111753041B (en) Data aggregation rendering method, device and system, electronic equipment and storage medium
Dahiya et al. A comparative study of various pixel-based image fusion techniques as applied to an urban environment
WO2008031085A2 (en) System and method for web enabled geo-analytics and image processing
CN108700988B (en) Digital image presentation
Ruzinoor et al. A review on 3D terrain visualization of GIS data: techniques and software
CN114491351B (en) Lattice point data visualization method and system adaptable to WebGIS platform
CN112559667A (en) Map editor, map engine, map editing system, map editing method, and storage medium
WO2022057868A1 (en) Image super-resolution method and electronic device
Deibe et al. Supporting multi-resolution out-of-core rendering of massive LiDAR point clouds through non-redundant data structures
Wang et al. Capturing the dance of the earth: PolarGlobe: Real-time scientific visualization of vector field data to support climate science
CN112115226B (en) Map rendering method and map rendering device
CN112700547A (en) Map making method and related equipment
CN115689886A (en) Distributed slicing method and distributed slicing device for framing images
CN114996374A (en) Online data visualization implementation method, system, device and medium
CN111681304B (en) Sea flow field self-adaptive visualization method, device, computer equipment and storage medium
CN112164066B (en) Remote sensing image layered segmentation method, device, terminal and storage medium
Yang et al. Quick compression and transmission of meteorological big data in complicated visualization systems
Kim Web-based geovisualization system of oceanographic information using dynamic particles and html5
CN112785699A (en) Image drawing method and apparatus
US20230273953A1 (en) Digital image presentation
CN116091586B (en) Slotline identification method, device, storage medium and terminal
CN115952244B (en) On-line loading method, device and medium for vector slicing service in drawing software
CN115984119B (en) Meteorological data processing method and device, electronic equipment and storage medium
CN116028737A (en) Dynamic rendering method, device, equipment and medium for massive ocean element data

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
GR01 Patent grant
GR01 Patent grant