Dynamic Rendering Method, Device, Equipment and Medium for Massive Marine Element Data
By storing ocean data by type, depth, spatial resolution and slices, the problems of communication time growth and page lag in ocean data rendering are solved, and efficient ocean data rendering is achieved.
Patent Information
- Application Number
- CN202211184331.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-09-27
AI Technical Summary
High spatial resolution drawing caused by explosive growth in ocean data leads to problems with communication time growth and page lag.
Ocean data is divided and stored in advance by type, depth, spatial resolution and slices, and the target slice is determined according to the rendering request for rendering, reducing data processing and communication time.
It effectively reduces data processing volume, avoids page reflow and resource loading blockage, and improves the efficiency and fluency of marine data rendering.
Smart Images

Figure CN116028737B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer applications. Specifically, the present invention relates to a method, device, equipment and medium for dynamically rendering massive ocean element data. Background Art
[0002] The dynamic display of ocean data is an important basis for depicting ocean information data and the most intuitive and effective means presented to users. However, the explosive growth of the amount of ocean data has brought many problems to this work. Directly rendering high-spatial-resolution ocean data will lead to an increase in communication time and page freezing problems caused by page reflow and resource loading jams. Therefore, there is an urgent need for a solution that can dynamically render massive ocean element data. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method, device, equipment and medium for dynamically rendering massive ocean element data, aiming to solve at least one of the above technical problems.
[0004] In a first aspect, the technical solution of the present invention to solve the above technical problem is as follows: A method for dynamically rendering massive ocean element data, the method comprising:
[0005] Obtaining a rendering request for the ocean data to be rendered for the current window and the depth corresponding to the ocean data to be rendered, wherein the rendering request includes the display size of the current window, the zoom ratio corresponding to the current window, and the type of the ocean data to be rendered;
[0006] Determining, according to the type of the ocean data to be rendered, the initial ocean data to be rendered corresponding to the type from a database, wherein different slices of ocean data corresponding to different types, different depths, and different spatial resolutions are stored in the database;
[0007] Determining, according to the depth corresponding to the ocean data to be rendered, the ocean data corresponding to the depth from the initial ocean data to be rendered;
[0008] Determining, according to the zoom ratio, the target level corresponding to the zoom ratio from the ocean data corresponding to the depth, each zoom ratio corresponding to a different level, each level corresponding to a different spatial resolution, and the ocean data corresponding to each level including the ocean data corresponding to at least two slices respectively;
[0009] Determining, according to the display size, the display range corresponding to the ocean data to be rendered on the map, and determining the target slice corresponding to the target level within the display range, for each level, the ocean data corresponding to each level including the ocean data corresponding to at least two slices respectively;
[0010] According to the target slice, determine the ocean data to be rendered corresponding to the target slice from the initial ocean data to be rendered, and construct the ocean data logic field of the area to be rendered according to the target slice, and render and display the ocean data to be rendered according to the ocean data logic field.
[0011] The beneficial effects of the present invention are as follows: In the solution of this application, a large amount of ocean data corresponding to different slices of different types, different depths, and different spatial resolutions are pre-stored, that is, one type of ocean data corresponds to multiple depths of ocean data, one depth of ocean data corresponds to multiple spatial resolutions of ocean data, and one spatial resolution of ocean data corresponds to multiple slices of ocean data. In this way, when it is desired to render the ocean data to be rendered, that is, when a rendering request is received, the target slice can be determined according to the rendering request, and then the ocean data to be rendered corresponding to the target slice can be obtained from the database for rendering. This can not only meet the rendering request, but also reduce the amount of data processing, avoid the increase in communication time, and the problems of page reflow and resource loading blockage causing page lags.
[0012] On the basis of the above technical solution, the present invention can also be improved as follows.
[0013] Further, the method further includes:
[0014] Obtain multi-source heterogeneous ocean data, which includes different types of initial ocean data. Each type of initial ocean data corresponds to initial ocean data of different depths, and the display ranges corresponding to the initial ocean data of each depth are the same;
[0015] For the initial ocean data corresponding to each depth of the same type, divide the initial ocean data into multiple levels of first ocean data according to a preset multiple of spatial resolutions, and the spatial resolutions corresponding to the first ocean data of each level are different;
[0016] For the first ocean data of each level, according to the set slice size and the relevant information of the first ocean data, divide the first ocean data of the level into second ocean data corresponding to at least two slices respectively, and determine the slice description information of each slice;
[0017] Among them, the above relevant information includes the type of the first ocean data, the spatial resolution of the first ocean data, the invalid value corresponding to the first ocean data, and the ocean element parameters of the first ocean data. For each slice, the slice description information includes the type of the second ocean data, the spatial resolution of the second ocean data, the invalid value corresponding to the second ocean data, the ocean element parameters of the second ocean data, the starting position of the second ocean data in the display range corresponding to the initial ocean data, and the occupied position;
[0018] Store the second ocean data corresponding to multiple slices and the slice description information in a database.
[0019] The beneficial effect of adopting the above further solution is that for multi-source heterogeneous ocean data, the multi-source heterogeneous ocean data can be divided and stored according to type, depth, level, and slice, reducing the amount of data processing during rendering.
[0020] Further, after obtaining the second ocean data corresponding to at least two slices respectively corresponding to the first ocean data of each level, the method further includes:
[0021] For each slice corresponding to each level, expand the slice size of the slice to obtain an expanded slice, and determine the description information of each expanded slice. There is overlapping data between the third ocean data corresponding to two adjacent expanded slices.
[0022] The above storing the second ocean data corresponding to multiple slices and the slice description information in a database includes:
[0023] Store the third ocean data corresponding to multiple expanded slices and the slice description information in a database.
[0024] The beneficial effect of adopting the above further solution is that each slice is expanded, and there is overlapping data between the third ocean data corresponding to two adjacent expanded slices. In this way, during rendering, it can be ensured that there is no discontinuous data between the third ocean data corresponding to two adjacent expanded slices, improving the rendering effect.
[0025] Further, the above obtaining multi-source heterogeneous ocean data includes: obtaining initial multi-source heterogeneous ocean data; performing normalization processing on the initial multi-source heterogeneous ocean data according to preset data specification requirements to obtain processed ocean data, and using the processed ocean data as multi-source heterogeneous ocean data.
[0026] The beneficial effect of adopting the above further solution is that the initial multi-source heterogeneous ocean data is first normalized according to preset data specification requirements and then subsequent processing is performed, unifying the ocean data in different data formats, which is convenient for subsequent processing.
[0027] Further, for the initial ocean data corresponding to each depth of the same type, the above dividing the initial ocean data into multiple levels of first ocean data according to preset multiple spatial resolutions includes:
[0028] For the initial ocean data corresponding to each depth of the same type, use any one of the multiple spatial resolutions as the target spatial resolution, and convert the initial ocean data into the first ocean data corresponding to the target spatial resolution through interpolation.
[0029] The beneficial effect of adopting the above further solution is that the first ocean data of multiple levels can be constructed by using the bidirectional linear interpolation method, and the algorithm is simple and effective.
[0030] Further, for the first ocean data of each level, the above first ocean data is floating-point data. According to the set slice size and the relevant information of the first ocean data, the first ocean data of the level is divided into second ocean data corresponding to at least two slices, and the slice description information of each slice is determined, including: converting the first ocean data into the fourth ocean data of integer type; according to the set slice size and the relevant information of the first ocean data, dividing the fourth ocean data of the level into second ocean data corresponding to at least two slices, and determining the slice description information of each slice;
[0031] The above method of determining the ocean data to be rendered corresponding to the target slice from the initial ocean data to be rendered according to the target slice, and constructing the ocean data logic field of the area to be rendered according to the target slice, and rendering and displaying the ocean data to be rendered according to the ocean data logic field includes: determining the ocean data to be rendered corresponding to the target slice from the initial ocean data to be rendered according to the target slice, and constructing the ocean data logic field of the area to be rendered according to the target slice; converting the ocean data to be rendered into floating-point ocean data; rendering and displaying the floating-point ocean data according to the ocean data logic field.
[0032] The beneficial effect of adopting the above further solution is that during the process of processing the first ocean data, integer data is convenient for calculation. Therefore, the first ocean data can be first converted into the fourth ocean data of integer type, and subsequent processing can be carried out based on the fourth ocean data. Then, when rendering, the floating-point ocean data to be rendered is converted into floating-point ocean data to restore the real floating-point ocean data and ensure the rendering effect of the ocean data.
[0033] Further, for the fourth ocean data of each level, the above method of dividing the fourth ocean data of the level into second ocean data corresponding to at least two slices according to the set slice size and the relevant information of the first ocean data, and determining the slice description information of each slice includes:
[0034] According to the set slice size and relevant information of the first ocean data, the fourth ocean data of the hierarchy is divided into at least two metadata, and the description information of each metadata is determined. For the metadata, the description information includes the type of the metadata, the spatial resolution of the metadata, the invalid value corresponding to the metadata, the ocean element parameters of the metadata, the starting position and the occupied position of the metadata in the display range corresponding to the initial ocean data. The display range includes the longitude coordinates and latitude coordinates corresponding to the metadata, and the occupied position includes the number of rows and columns corresponding to the metadata in the longitude-latitude grid corresponding to the fourth ocean data. The ocean element parameters include the maximum value and the minimum value;
[0035] For each metadata, store the metadata, the type of the metadata, the spatial resolution of the metadata and the invalid value corresponding to the metadata into the R band of the image, store the longitude coordinates, the number of rows and the maximum value into the G band of the image, and store the dimension coordinates, the number of columns and the minimum value into the B band of the image;
[0036] For each metadata, use the stored image corresponding to the metadata as the slice corresponding to the metadata.
[0037] The beneficial effect of adopting the above further solution is that the fourth ocean data of each hierarchy is stored into the three bands of R, G and B of the image according to the set slice size and relevant information of the first ocean data, and at least two slices corresponding to the fourth ocean data of each hierarchy can obtain the corresponding second ocean data. Through the above method, the accurate division of the fourth ocean data of each hierarchy is realized.
[0038] In a second aspect, the present invention also provides a dynamic rendering device for massive ocean element data to solve the above technical problems. The device includes:
[0039] A rendering request acquisition module, configured to acquire a rendering request for the ocean data to be rendered for the current window and the depth corresponding to the ocean data to be rendered. The rendering request includes the display size of the current window, the zoom ratio corresponding to the current window and the type of the ocean data to be rendered;
[0040] An initial ocean data to be rendered determination module, configured to determine the initial ocean data corresponding to the type from the database according to the type of the ocean data to be rendered. Different slices corresponding to different types, different depths and different spatial resolutions of ocean data are stored in the database;
[0041] An ocean data determination module, configured to determine the ocean data corresponding to the depth from the initial ocean data to be rendered according to the depth corresponding to the ocean data to be rendered;
[0042] A target level determination module, configured to determine a target level corresponding to a scaling ratio from the ocean data corresponding to a depth according to the scaling ratio. Each scaling ratio corresponds to a different level, each level corresponds to a different spatial resolution, and the ocean data corresponding to each level includes the ocean data corresponding to at least two slices respectively;
[0043] A target slice determination module, configured to determine a display range corresponding to the ocean data to be rendered on a map according to a display size, and determine a target slice corresponding to the target level within the display range. For each level, the ocean data corresponding to each level includes the ocean data corresponding to at least two slices respectively;
[0044] A rendering module, configured to determine the ocean data to be rendered corresponding to the target slice from the initial ocean data to be rendered according to the target slice, construct a logical field of the ocean data for the area to be rendered according to the target slice, and perform rendering display on the ocean data to be rendered according to the logical field of the ocean data.
[0045] In a third aspect, the present invention also provides an electronic device to solve the above technical problems. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the dynamic rendering method of the massive ocean feature data of the present application is implemented.
[0046] In a fourth aspect, the present invention also provides a computer-readable storage medium to solve the above technical problems. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the dynamic rendering method of the massive ocean feature data of the present application is implemented.
[0047] Additional aspects and advantages of the present application will be given in part in the following description, and these will become obvious from the following description, or can be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments of the present invention.
[0049] Figure 1 A flowchart of a dynamic rendering method for massive ocean feature data provided by an embodiment of the present invention;
[0050] Figure 2 A schematic diagram of an enlarged slice size provided by an embodiment of the present invention;
[0051] Figure 3 A schematic diagram of the structure of an ocean data rendering framework provided by an embodiment of the present invention;
[0052] Figure 4Flow chart of another dynamic rendering method for massive ocean element data provided by an embodiment of the present invention;
[0053] Figure 5 Structural schematic diagram of a dynamic rendering device for massive ocean element data provided by an embodiment of the present invention;
[0054] Figure 6 Structural schematic diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0055] The principles and features of the present invention are described below. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0056] The technical solution of the present invention and how the technical solution of the present invention solves the above technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other. Concepts or processes that are the same or similar may not be repeated in some embodiments. The embodiments of the present invention will be described below with reference to the accompanying drawings.
[0057] The solution provided by the embodiments of the present invention can be applied to any application scenario that requires rendering and displaying ocean data. The solution provided by the embodiments of the present invention can be executed by any electronic device. For example, it can be the user's terminal device. The above terminal device can be any terminal device that can install an application and access a web page through the application, including at least one of the following: smart phone, tablet computer, notebook computer, desktop computer, smart speaker, smart watch, smart TV, smart vehicle-mounted device.
[0058] The embodiments of the present invention provide a possible implementation manner. As Figure 1 shown, a flow chart of a dynamic rendering method for massive ocean element data is provided. This solution can be executed by any electronic device. For example, it can be a terminal device, or jointly executed by a terminal device and a server. For the convenience of description, the method provided by the embodiments of the present invention will be described below with the terminal device as the execution subject. As Figure 1 shown in the flow chart, the method may include the following steps:
[0059] Step S110, obtain a rendering request for the ocean data to be rendered for the current window and the depth corresponding to the ocean data to be rendered. The rendering request includes the display size of the current window, the zoom ratio corresponding to the current window, and the type of the ocean data to be rendered;
[0060] Step S120: Determine the initial ocean data to be rendered corresponding to the type from the database according to the type of the ocean data to be rendered. Different slices of ocean data corresponding to different types, different depths, and different spatial resolutions are stored in the database.
[0061] Step 130: Determine the ocean data corresponding to the depth from the initial ocean data to be rendered according to the depth corresponding to the ocean data to be rendered.
[0062] Step S140: Determine the target level corresponding to the scaling ratio from the ocean data corresponding to the depth according to the scaling ratio. Each scaling ratio corresponds to a different level, each level corresponds to a different spatial resolution, and the ocean data corresponding to each level includes the ocean data corresponding to at least two slices respectively.
[0063] Step S150: Determine the display range of the ocean data to be rendered on the map according to the display size, and determine the target slices corresponding to the target level within the display range. For each level, the ocean data corresponding to each level includes the ocean data corresponding to at least two slices respectively.
[0064] Step S160: Determine the ocean data to be rendered corresponding to the target slices from the initial ocean data to be rendered according to the target slices, and construct the ocean data logic field of the area to be rendered according to the target slices. Render and display the ocean data to be rendered according to the ocean data logic field.
[0065] Through the method of the present invention, a large amount of ocean data corresponding to different slices of different types, different depths, and different spatial resolutions is pre-stored, that is, one type of ocean data corresponds to multiple depths of ocean data, one depth of ocean data corresponds to multiple spatial resolutions of ocean data, and one spatial resolution of ocean data corresponds to multiple slices of ocean data. In this way, when wanting to render the ocean data to be rendered, that is, when receiving a rendering request, the target slices can be determined according to the rendering request, and then the ocean data to be rendered corresponding to the target slices can be obtained from the database for rendering. This can not only meet the rendering request, but also reduce the amount of data processing, avoid the increase in communication time, and the problems of page lag caused by page reflow and resource loading congestion.
[0066] The following further illustrates the solution of the present invention in combination with the following specific embodiments. In this embodiment, the dynamic rendering method of a large amount of ocean element data may include the following steps:
[0067] Step S110: Obtain the rendering request for the ocean data to be rendered for the current window and the depth corresponding to the ocean data to be rendered. The rendering request includes the display size of the current window, the scaling ratio corresponding to the current window, and the type of the ocean data to be rendered.
[0068] Among them, a rendering request refers to a request for the web content of a target web page that a user wants to view. This request can be a request generated based on a triggering operation by the user on the client interface of the terminal device. The specific form of this triggering operation is configured according to needs. For example, it can be a triggering action at a specific operation location on the interface of an application on the terminal device. In actual use, the triggering operation can be a triggering selection operation for a relevant triggering identifier. Among them, the specific form of the triggering identifier can be configured according to actual needs. For example, it can be a specified virtual button or input box on the client interface. Specifically, for example, it can be a virtual button of "XXX" displayed on the client interface. The operation of the user clicking this virtual button indicates that the user wants to view the ocean data corresponding to "XXX". The above-mentioned ocean data to be rendered can be the ocean data that wants to be displayed and rendered on the web side, and then this rendering request can be a request generated on the web client.
[0069] Among them, the current window refers to the size of the terminal interface that displays the ocean data, and the zoom ratio refers to the size of the area corresponding to the ocean data presented on the page where the current window is located. The larger the zoom ratio, the larger the area, and the fewer the detailed information of the displayed ocean data. The smaller the zoom ratio, the smaller the area, and the more the detailed information of the displayed ocean data.
[0070] Among them, the depth corresponding to the ocean data to be rendered refers to the pressure. Under different pressures, the displayed ocean data is different. Based on the above rendering request, it can be known which range of ocean data in the map the user wants to display. This depth can be specified by the user, that is, included in the rendering request, or it can be the default surface depth.
[0071] Step S120: According to the type of the ocean data to be rendered, determine the initial ocean data to be rendered corresponding to the type from the database. Different slices of ocean data corresponding to different types, different depths, and different spatial resolutions are stored in the database;
[0072] Since different types of ocean data are pre-stored in the database, the initial ocean data to be rendered can be determined based on the type first. The type can include but is not limited to wind, ocean current, and wave. Therefore, ocean data can also be called ocean element data.
[0073] Step 130: According to the depth corresponding to the ocean data to be rendered, determine the ocean data corresponding to the depth from the initial ocean data to be rendered;
[0074] Step S140: According to the zoom ratio, determine the target level corresponding to the zoom ratio from the ocean data corresponding to the above depth. Each zoom ratio corresponds to a different level, each level corresponds to a different spatial resolution, and the ocean data corresponding to each level includes the ocean data corresponding to at least two slices respectively;
[0075] Among them, different depths correspond to different levels of ocean data. For example, for depth A and depth B, depth A corresponds to four levels of ocean data, and depth B also corresponds to four levels of ocean data. Different levels correspond to different spatial resolutions, and the display ratios of the ocean data corresponding to different spatial resolutions are different. Then, based on the scaling ratio, the target level corresponding to the scaling ratio can be determined, that is, it can be determined which level among several levels the spatial resolution corresponding to the scaling ratio corresponds to.
[0076] Step S150: Determine the display range corresponding to the ocean data to be rendered on the map according to the display size, and determine the target slices corresponding to the target level within the display range. For each level, the ocean data corresponding to each level includes the ocean data corresponding to at least two slices respectively.
[0077] Among them, the map can be a map with longitude and latitude markings, and the display range can be represented by longitude and latitude. Determining the display range first can reduce the data processing volume of the ocean data to be rendered read from the database subsequently. Since one level corresponds to at least two slices, according to the display range, the target slices corresponding to the target level can be determined. The target slices can be one slice or multiple slices.
[0078] Step S160: Determine the ocean data to be rendered corresponding to the target slices from the initial ocean data to be rendered according to the target slices, and construct the ocean data logic field of the area to be rendered according to the target slices, that is, determine the ocean data display field according to the size of the rendering window, and render and display the ocean data to be rendered according to the ocean data logic field.
[0079] Among them, the rendering and display of the ocean data to be rendered can be implemented by existing technologies and will not be elaborated here.
[0080] Optionally, the method further includes:
[0081] Obtain multi-source heterogeneous ocean data. The multi-source heterogeneous ocean data includes different types of initial ocean data. Each type of initial ocean data corresponds to the initial ocean data at different depths, and the display ranges corresponding to the initial ocean data at each depth are the same;
[0082] For the initial ocean data corresponding to each depth of the same type, divide the initial ocean data into the first ocean data at multiple levels according to a preset multiple of spatial resolutions. The spatial resolutions corresponding to the first ocean data at each level are different;
[0083] For the first ocean data at each level, divide the first ocean data at the level into the second ocean data corresponding to at least two slices respectively according to the set slice size and the relevant information of the first ocean data, and determine the slice description information of each slice.
[0084] Among them, the relevant information includes the type of the first ocean data, the spatial resolution of the first ocean data, the invalid value corresponding to the first ocean data, and the ocean element parameters of the first ocean data. For each slice, the slice description information includes the type of the second ocean data, the spatial resolution of the second ocean data, the invalid value corresponding to the second ocean data, the ocean element parameters of the second ocean data, the starting position of the second ocean data in the display range corresponding to the initial ocean data, and the occupied position. It can be understood that if the second ocean data is derived from the first ocean data, then the type of the second ocean data obtained corresponds to the same type as the first ocean data.
[0085] Store the second ocean data corresponding to multiple slices and the slice description information in a database.
[0086] Optionally, the above-mentioned acquisition of multi-source heterogeneous ocean data includes: acquiring initial multi-source heterogeneous ocean data; performing normalization processing on the initial multi-source heterogeneous ocean data according to preset data specification requirements to obtain processed ocean data, and using the processed ocean data as multi-source heterogeneous ocean data.
[0087] Among them, the above-mentioned normalization processing refers to standardizing data names and formats, handling and correcting missing data; unifying data ranges, establishing communication file metadata standards, etc. Performing normalization processing on the initial multi-source heterogeneous ocean data according to data specification requirements to obtain processed ocean data means converting the initial multi-source heterogeneous ocean data into data that conforms to the data specification requirements according to data specification requirements, that is, unifying the expression forms of multi-source heterogeneous ocean data.
[0088] As an example, the data specification requirements can be:
[0089] (Data type)-(Data source)-(YYYYmmDDHHMMSS)-(Depth)
[0090] Taking the sea surface chlorophyll a data (initial multi-source heterogeneous ocean data) at 10 o'clock on July 14, 2022 as an example, its naming form is: chlora-cus-20220714120000-0.json.
[0091] Among them, chlora represents the data type. Different types of ocean data correspond to different expression methods. Chlora can be called the variable name of ocean element data. According to the requirements of ocean data display, 7 ocean elements can be preset, and their naming rules are: of_(abbreviation of ocean element), namely: of_chlora (chlorophyll), of_temp (sea surface temperature), of_salt (sea surface salinity), of_height (sea surface height), of_wind (wind), of_current (ocean current), of_wave (wave).
[0092] The initial ocean data of one type can correspond to the ocean data at multiple depths. The multiple spatial resolutions can include 0.05°, 0.1°, 0.25° and 0.5°, and each spatial resolution corresponds to one level. For the same type, the ocean data corresponding to each level is the same except for the different spatial resolutions. The initial ocean data of different types can adopt the data integration mode of the ETL architecture and be extracted from multiple data sources such as CMEMS and Himawari-8. In the solution of this application, after the initial multi-source heterogeneous ocean data is normalized to obtain the processed ocean data, the processed ocean data can be compressed and stored in the database.
[0093] Optionally, for the initial ocean data corresponding to each depth of the same type, according to the preset multiple spatial resolutions, the initial ocean data is divided into the first ocean data at multiple levels, including:
[0094] For the initial ocean data corresponding to each depth of the same type, any one of the multiple spatial resolutions is used as the target spatial resolution, and through the bilinear interpolation method, the initial ocean data is converted into the first ocean data corresponding to the target spatial resolution.
[0095] If the multiple spatial resolutions can include 0.05°, 0.1°, 0.25° and 0.5°, as an example, for depth A of the same type, the ocean data corresponding to this depth A can be divided into the first ocean data at four levels of 0.05°, 0.1°, 0.25° and 0.5°.
[0096] Optionally, the spatial resolution corresponding to the initial ocean data can be 1°. For each level, the processing principle of determining the first ocean data corresponding to this level by the interpolation method is the same. Then, taking 0.5° as the target spatial resolution, the solution of converting the initial ocean data into the first ocean data corresponding to the target spatial resolution by the interpolation method will be specifically described.
[0097] In the solution of this application, the map corresponding to the initial ocean data is divided into several grids according to equal longitude intervals and equal latitude intervals. For each grid, two adjacent points in the horizontal direction of the grid are used as known points. The abscissas of the two known points (which can be the lower left corner and the upper right corner of the grid) are different, and the ordinates are the same. The coordinate value of one starting point (lower left corner) in the x direction (dimension) is des_x, and the coordinate value in the y direction (longitude) is des_y. The value interval between the two known points in the longitude direction is des_w, and the value interval between the interpolation point and the starting point in the longitude direction is src_w; the value interval between the two known points in the dimension direction is des_h, and the interval between the interpolation point and the starting point in the dimension direction is src_h;
[0098] According to the target spatial resolution of 0.5, interpolation is performed between the two known points in the two horizontal directions, and the abscissa scr_x of the first interpolation point obtained is:
[0099]
[0100] The ordinate of this first interpolation point is des_y;
[0101] Similarly, according to the target spatial resolution of 0.5, interpolation is performed between the two known points in the two vertical directions, and the ordinate scr_y of the second interpolation point obtained is:
[0102]
[0103] The abscissa of this second interpolation point is des_x.
[0104] In the same way as above, using the interpolation method, according to the spatial resolution corresponding to each level, the first ocean data corresponding to the corresponding level is determined.
[0105] Optionally, after obtaining the second ocean data corresponding to at least two slices of the first ocean data corresponding to each level, the method further includes:
[0106] For each slice corresponding to each level, the slice size of the slice is enlarged to obtain an enlarged slice, and the description information of each enlarged slice is determined. There is overlapping data between the third ocean data corresponding to two adjacent enlarged slices;
[0107] The above storing the second ocean data and slice description information corresponding to multiple slices into the database includes:
[0108] Storing the third ocean data and slice description information corresponding to multiple enlarged slices into the database.
[0109] Among them, the slice size can be set according to requirements. The larger the slice size, the fewer the number of slices obtained.
[0110] As an example, the four levels of spatial resolution are 0.5°, 0.25°, 0.1°, and 0.05°, corresponding to levels 0, 1, 2, and 3 respectively. The spatial range of the initial ocean data (ocean data with a spatial resolution of 1°) is: longitude [-180, 180], latitude [-90, 90]. For the 0.5° level, the corresponding spatial range is: longitude [-360, 360], latitude [-180, 180]. According to the principle of equal size, the slice size is designed to be 360×360, that is, the size of each slice is the same. First, according to the slice size and the relevant information of the first ocean data, the first ocean data of the level can be divided into the second ocean data corresponding to at least two slices respectively. Then, for each slice, the slice size of the slice is enlarged to obtain an enlarged slice, and the size of the enlarged slice is 375×370. As Figure 2 shown, the first 5 rows of the enlarged slice are used to record the meta-information (slice description information) of the slice, and the outer 5 rows surrounded by the dotted line are used to record the overlap information (overlap data) of the slices adjacent to the enlarged slice. This range is not considered in the slice range when performing logical slicing, that is, when slicing, slicing is not performed with a slice size of 375×370. Therefore, for an ocean element at level 0 (0.5° spatial resolution), two slices will be generated, and their spatial ranges are: [-180, -90, 0, 90] and [0, -90, 180, 90].
[0111] Optionally, for the first ocean data of each level, the first ocean data is floating-point data. According to the set slice size and the relevant information of the first ocean data, the first ocean data of the level is divided into the second ocean data corresponding to at least two slices respectively, and the slice description information of each slice is determined, including:
[0112] Convert the first ocean data into the fourth ocean data of integer type;
[0113] According to the set slice size and the relevant information of the first ocean data, the fourth ocean data of the level is divided into the second ocean data corresponding to at least two slices respectively, and the slice description information of each slice is determined;
[0114] The above-mentioned method of determining the ocean data to be rendered corresponding to the target slice from the initial ocean data to be rendered according to the target slice, and constructing the ocean data logic field of the area to be rendered according to the target slice, and rendering and displaying the ocean data to be rendered according to the ocean data logic field, includes:
[0115] Determine the ocean data to be rendered corresponding to the target slice from the initial ocean data to be rendered according to the target slice, and construct the ocean data logic field of the area to be rendered according to the target slice;
[0116] Convert the ocean data to be rendered into floating-point ocean data;
[0117] Render and display the floating-point ocean data according to the ocean data logic field.
[0118] Among them, since the data format of the first ocean data is all floating-point type, it is necessary to convert it into the fourth ocean data of integer type (between 0 and 255). The present invention directly converts the real data to between 0 and 255 using a linear transformation method, and the formula is as follows:
[0119]
[0120] Among them, realValue represents the real value of the ocean data, that is, the first ocean data, min and max respectively represent the minimum and maximum values of the ocean data in the current slice, that is, the maximum and minimum values in the first ocean data. If the first ocean data is wind, the maximum and minimum values refer to the maximum wind speed value and the minimum wind speed value of the wind, and encodeValue represents the integer-type ocean data.
[0121] Convert the ocean data to be rendered into floating-point ocean data, which can be specifically determined by the following formula:
[0122]
[0123] Among them, decodeValue represents the floating-point ocean data.
[0124] Optionally, for the fourth ocean data of each level, according to the set slice size and the relevant information of the first ocean data, divide the fourth ocean data of the level into the second ocean data corresponding to at least two slices respectively, and determine the slice description information of each slice, including:
[0125] According to the set slice size and the relevant information of the first ocean data, divide the fourth ocean data of the level into at least two metadata, and determine the description information of each metadata. For the metadata, the description information includes the type of the metadata, the spatial resolution of the metadata, the invalid value corresponding to the metadata, the ocean element parameters of the metadata, the starting position of the display range corresponding to the metadata in the initial ocean data, and the occupied position. The display range includes the longitude coordinates and latitude coordinates corresponding to the metadata, and the occupied position includes the number of rows and columns corresponding to the metadata in the longitude and latitude grid corresponding to the fourth ocean data. The ocean element parameters include the maximum value and the minimum value;
[0126] For each metadata, store the metadata, the type of the metadata, the spatial resolution of the metadata, and the invalid value corresponding to the metadata in the R band of the image, store the longitude coordinates, the number of rows, and the maximum value in the G band of the image, and store the dimension coordinates, the number of columns, and the minimum value in the B band of the image;
[0127] For each metadata, use the stored image corresponding to the metadata as the slice corresponding to the metadata.
[0128] Among them, the description information of the metadata and the corresponding relationship between the R, G, and B bands of the stored image can be seen in Table 1.
[0129] Table 1
[0130] Serial number Meta-information name Writing line number Band 1 Ocean data type First line R 2 Longitude of the upper left corner First line G 3 Latitude of the upper left corner First line B 4 Spatial resolution Second line R 5 Number of sliced rows Second line G 6 Number of sliced columns Second line B 7 Invalid value Third line R 8 Maximum value Third line G 9 Minimum value Third line B
[0131] Among them, the name corresponding to the meta-information name is the name of each description information of the metadata, the ocean data type is the type of ocean data, the longitude of the upper left corner and the latitude of the upper left corner are the starting positions of the display range corresponding to the metadata in the initial ocean data, and the number of slice rows and the number of slice columns are the positions occupied by the display range corresponding to the metadata in the initial ocean data.
[0132] In the solution of this application, the first 5 rows of the slice can be used to store the above description information. Since the ocean data type can be represented by numbers, all the description information of the metadata can be represented by numbers. The text length of the number plus the converted ASCII code is written into the corresponding row and band. When decoding the corresponding information, only need to read the first value of the corresponding row, read the numerical list with the length of the first value, and then decode the ASCII list to complete the reading of the description information.
[0133] Taking the longitude of the upper left corner (-180) as an example, first convert it into characters (the range of characters is between [0-255]). Among them, there are 4 characters (which are '-', '1', '8', '0') respectively. Since this meta-information is the meta-information in the 2nd position, this record will be stored in the G band of the first row. When storing the characters, the length corresponding to the converted characters of this meta-information (here it is 4) will be stored first, and finally the information converted into characters will be stored.
[0134] According to the above data format conversion method, convert the true value of ocean elements (the metadata itself) into an integer value within the range of 0 - 255. For scalar ocean data (ocean data without vector direction), directly store the converted integer value into the R band of the image. If there are symbols corresponding to the description information, record the sign bit (1 for positive, 0 for negative) in the B band. For vector ocean data (such as ocean currents, winds, waves), there are two data values simultaneously, and both data need to be recorded. Taking ocean current data as an example, the true value of ocean current is divided into two values in the u and v directions. u represents the eastward ocean current value, and v represents the northward ocean current value. After conversion according to the above data format conversion method, it becomes u and is recorded in the R band. The G band records the converted v. The B band is used to record the sign bit, and the alpha band is used to record the value of dir = u2 + v2. The recording rule for each pixel (8 - byte bits) in the B band is as follows: The 1st and 2nd byte bits represent the signs of the u and v data. Among them, if the 1st byte bit is 1, it means the sign of u is positive, and if the 2nd byte bit is 1, it means the sign of v is positive. Finally, according to the constructed data - processing LOD model (ocean data with four levels), slice the image (the fourth - level ocean data in integer type) after format conversion, and organize the images according to depth, level, dimension - direction serial number, and longitude - direction serial number. Among them, the dimension - direction serial number and longitude - direction serial number represent the starting positions of the slices in the original map. The format of each slice is PNG format.
[0135] After slicing, in the solution of this application, GeoServer can also be used to publish the services of the image data layer, that is, publish the ocean data corresponding to different slices with different depths, different types, different depths, and different spatial resolutions as the data basis for subsequent rendering.
[0136] After storing the second - level ocean data corresponding to multiple slices and the slice description information into the database, a rendering framework for ocean data based on the map - service framework can be established. According to the design goals and the characteristics of ocean data, the class structures related to rendering are designed. They are the Cell class, Field class, Vector class, ScalarField class, and VectorField class respectively. Among them, the ScalarField class and VectorField class are sub - classes inherited from the members of the Field class, as shown in the appendix Figure 3As shown in the figure. A Cell (cell unit) is the smallest unit of a Field. A Field is a base class and the parent class of scalar fields and vector fields. A ScalarField is a class created by inheriting the members of the Field class for the ocean scalars such as temperature and chlorophyll concentration in ocean data. A VectorField is a class created by inheriting the members of the Field class for the ocean vector data such as ocean current data in ocean data. Based on the above structure, through the existing L.TileLayer class in Leaflet and the creation and inheritance of related classes in the network rendering (Render) technology, the front-end rendering mode design of ocean data is realized.
[0137] See Figure 4 , the rendering process of the ocean data to be rendered is specifically as follows:
[0138] First, convert the display level of the standard map service to the 4 levels of the present invention, that is, corresponding to Figure 4 In the normalization process of multi-source heterogeneous ocean data, a unified ocean grid file is obtained. Then, according to the scheme described above, different slices of ocean data corresponding to different types, different depths, and different spatial resolutions are obtained based on the unified ocean grid file, specifically including Figure 4 In the figure, image slicing is performed according to the resolution (spatial resolution) at different levels. The ocean image data (the first ocean data) is transcoded into PNG images. The transcoding of ocean image data into PNG images includes numerical conversion (converting metadata and its description information into numerical values), writing metadata (storing the description information of metadata into the R, G, and B bands of the image), and writing ocean element numerical values (storing metadata into the R, G, and B bands of the image).
[0139] When a PNG image slice pulling request is obtained, that is, when a rendering request is obtained, according to the rendering request, the corresponding ocean data to be rendered is called from the database for rendering and display. The ocean data to be rendered includes scalar and vector ocean data, that is, corresponding to Figure 4 The Webgbl rendering of scalar and vector ocean data in the figure.
[0140] In the process of calling the corresponding ocean data to be rendered from the database for rendering and display, the target slices (also called slice sets) can be obtained from the database first, and all the calculated slice sets are put into the queue to be loaded. The front-end maintains another cache queue and iterates through the queue to be loaded. If the slice in the queue to be loaded does not exist in the cache queue, calculate the loading URL of the slice and perform the pull operation; if it already exists in the cache queue, ignore the slice. After the slice is loaded, the front-end saves a logical window (WindowFiled), which is consistent with the map view range, and the value of the logical window is obtained by sampling the loaded slice.
[0141] Among them, scalar ocean data represents the rendering of ocean data in the form of a field, mainly to display ocean scalar data such as sea surface temperature and chlorophyll concentration. For scalar ocean data, pull the corresponding target slices according to the previous solution and complete the construction of the logical window. Taking chlorophyll as an example, the WindowFiled of ocean data is pulled through the solution of the present application. Since scalar ocean data expresses the true value with colors, the values in the WindowFiled are spatially transformed here and converted to a preset color ribbon. When the map is zoomed or moved, the re-rendering function is responded to, the WindowFiled is reconstructed, and the pixels in the view are rendered pixel by pixel, so as to realize the rendering of scalar ocean data.
[0142] In the solution of the present application, vector data rendering not only needs to render the values of vector data, but also needs to construct a dynamic particle animation. After pulling the corresponding target slices through the solution of the present application, the logical window is constructed. At this time, the WindowFiled contains three types of data, u, v, and dir data. The rendering of the dir data of vector data is similar to that of scalar ocean data and will not be described again. To construct a dynamic particle animation, each particle needs to contain not only the current position (pos), but also the position of the next point (pos next ), and its calculation formula is as follows.
[0143]
[0144]
[0145] Among them, speed is an adjustable value, u is the horizontal vector, and v is the vertical vector. Set the frame rate of front-end rendering and continuously update the particle position. When the particle is updated to the next position pos next ), calculate the next position coordinates relative to pos next ), so as to realize the dynamic rendering effect of vector data.
[0146] The present invention uses the above technical solutions to design a general ocean data standard, integrates multiple ocean environmental element data extracted from CMEMS, Himawari-8, and RSS data sources based on the data integration mode of the ETL architecture, constructs a more efficient LOD model for processing massive ocean data, and finally maps the movement trajectories of particles and ocean current data under the framework of Leaflet, realizing the dynamic rendering of massive ocean data on the Web side. The present invention makes up for the shortcomings of difficult integration of massive ocean data and slow visualization rendering in some systems, meets the requirement of fast dynamic rendering of ocean element data on the Web side, and has good market promotion value.
[0147] Considering the differences in data sources and workload issues, select suitable data, standardize these massive multi-source heterogeneous ocean data based on the ETL architecture, and after the processing is completed, perform data integration and upload it to the database; based on the LOD model for processing massive ocean data proposed by the present invention, process the data in the database and publish its WMTS map service to improve the rendering efficiency of massive ocean data; based on technologies such as JavaScript, Leaflet, Canvas, Render Layer, etc., and according to the design objectives and the characteristics of ocean data, design the structure for creating and inheriting classes for displaying data; for scalar data and vector data, set and calculate pixel points and vector points according to certain rules and algorithms, thereby completing the rendering of scalar and vector data of ocean data.
[0148] Based on the same principle as the method shown in Figure 1 The embodiment of the present invention also provides a dynamic rendering device 20 for massive ocean element data, as shown in Figure 5 shown, the dynamic rendering device 20 for massive ocean element data may include a rendering request acquisition module 210, an initial ocean data to be rendered determination module 220, an ocean data determination module 230, a target level determination module 240, a target tile determination module 250, and a rendering module 260, where:
[0149] The rendering request acquisition module 210 is used to acquire the rendering request for the ocean data to be rendered for the current window and the depth corresponding to the ocean data to be rendered. The rendering request includes the display size of the current window, the zoom ratio corresponding to the current window, and the type of the ocean data to be rendered;
[0150] The initial ocean data to be rendered determination module 220 is used to determine the initial ocean data to be rendered corresponding to the type from the database according to the type of the ocean data to be rendered. Different slices of ocean data corresponding to different types, different depths, and different spatial resolutions are stored in the database;
[0151] An ocean data determination module 230, configured to determine the ocean data corresponding to the depth from the initial ocean data to be rendered according to the depth corresponding to the ocean data to be rendered.
[0152] A target level determination module 240, configured to determine the target level corresponding to the scaling ratio from the ocean data corresponding to the depth according to the scaling ratio. Each scaling ratio corresponds to a different level, each level corresponds to a different spatial resolution, and the ocean data corresponding to each level includes the ocean data corresponding to at least two slices respectively.
[0153] A target slice determination module 250, configured to determine the display range corresponding to the ocean data to be rendered on the map according to the display size, and determine the target slice corresponding to the target level within the display range. For each level, the ocean data corresponding to each level includes the ocean data corresponding to at least two slices respectively.
[0154] A rendering module 260, configured to determine the ocean data to be rendered corresponding to the target slice from the initial ocean data to be rendered according to the target slice, construct a logical field of the ocean data of the area to be rendered according to the target slice, and perform rendering display on the ocean data to be rendered according to the logical field of the ocean data.
[0155] Optionally, the apparatus further includes:
[0156] A data processing module, configured to obtain multi-source heterogeneous ocean data. The multi-source heterogeneous ocean data includes initial ocean data of different types. Each type of initial ocean data corresponds to initial ocean data of different depths, and the display ranges corresponding to the initial ocean data of each depth are the same. For the initial ocean data corresponding to each depth of the same type, according to a preset plurality of spatial resolutions, the initial ocean data is divided into a plurality of levels of first ocean data, and the spatial resolutions corresponding to the first ocean data of each level are different. For the first ocean data of each level, according to the set slice size and the relevant information of the first ocean data, the first ocean data of the level is divided into second ocean data corresponding to at least two slices respectively, and the slice description information of each slice is determined. The second ocean data corresponding to the plurality of slices and the slice description information are stored in a database, where the relevant information includes the type of the first ocean data, the spatial resolution of the first ocean data, the invalid value corresponding to the first ocean data, and the ocean element parameters of the first ocean data. For each slice, the slice description information includes the type of the second ocean data, the spatial resolution of the second ocean data, the invalid value corresponding to the second ocean data, the ocean element parameters of the second ocean data, the starting position of the second ocean data in the display range corresponding to the initial ocean data, and the occupied position.
[0157] Optionally, after obtaining the second ocean data corresponding to at least two slices respectively corresponding to the first ocean data of each level, the apparatus further includes:
[0158] A slice expansion module, configured to, for each slice corresponding to each level, expand the slice size of the slice to obtain an expanded slice, and determine the description information of each expanded slice, where there is overlapping data between the third ocean data corresponding to two adjacent expanded slices;
[0159] When storing the second ocean data and slice description information corresponding to multiple slices into the database, the above data processing module is specifically configured to:
[0160] Store the third ocean data and slice description information corresponding to multiple expanded slices into the database.
[0161] Optionally, when obtaining multi-source heterogeneous ocean data, the above data processing module is specifically configured to:
[0162] Obtain initial multi-source heterogeneous ocean data;
[0163] According to the preset data specification requirements, perform normalization processing on the initial multi-source heterogeneous ocean data to obtain processed ocean data, and use the processed ocean data as multi-source heterogeneous ocean data.
[0164] Optionally, for the initial ocean data corresponding to each depth of the same type, when the above data processing module divides the initial ocean data into the first ocean data of multiple levels according to multiple preset spatial resolutions, it is specifically configured to:
[0165] For the initial ocean data corresponding to each depth of the same type, use any one of the multiple spatial resolutions as the target spatial resolution, and convert the initial ocean data into the first ocean data corresponding to the target spatial resolution through the bilinear interpolation method.
[0166] Optionally, for the first ocean data of each level, the above first ocean data is floating-point data. When the data processing module divides the first ocean data of the level into the second ocean data corresponding to at least two slices respectively and determines the slice description information of each slice, it is specifically configured to: convert the first ocean data into integer-type fourth ocean data; according to the set slice size and the relevant information of the first ocean data, divide the fourth ocean data of the level into the second ocean data corresponding to at least two slices respectively, and determine the slice description information of each slice;
[0167] When the above-mentioned rendering module 260 determines the ocean data to be rendered corresponding to the target slice from the initial ocean data to be rendered according to the target slice, constructs the ocean data logic field of the area to be rendered according to the target slice, and renders and displays the ocean data to be rendered according to the ocean data logic field, it is specifically used for:
[0168] Determine the ocean data to be rendered corresponding to the target slice from the initial ocean data to be rendered according to the target slice, and construct the ocean data logic field of the area to be rendered according to the target slice;
[0169] Convert the ocean data to be rendered into floating-point ocean data;
[0170] Render and display the floating-point ocean data according to the ocean data logic field.
[0171] Optionally, for the fourth ocean data of each level, when the above data processing module divides the fourth ocean data of the level into the second ocean data corresponding to at least two slices according to the set slice size and the relevant information of the first ocean data, and determines the slice description information of each slice, it is specifically used for:
[0172] According to the set slice size and the relevant information of the first ocean data, divide the fourth ocean data of the level into at least two metadata, and determine the description information of each metadata. For the metadata, the description information includes the type of the metadata, the spatial resolution of the metadata, the invalid value corresponding to the metadata, the ocean element parameters of the metadata, the starting position and the occupied position of the metadata in the display range corresponding to the initial ocean data. The display range includes the longitude coordinates and latitude coordinates corresponding to the metadata, and the occupied position includes the number of rows and columns corresponding to the metadata in the longitude and latitude grid corresponding to the fourth ocean data. The ocean element parameters include the maximum value and the minimum value;
[0173] For each metadata, store the metadata, the type of the metadata, the spatial resolution of the metadata and the invalid value corresponding to the metadata in the R band of the image, store the longitude coordinates, the number of rows and the maximum value in the G band of the image, and store the dimension coordinates, the number of columns and the minimum value in the B band of the image;
[0174] For each metadata, use the stored image corresponding to the metadata as the slice corresponding to the metadata.
[0175] The dynamic rendering device for massive marine element data according to the embodiments of the present invention can execute the dynamic rendering method for massive marine element data provided by the embodiments of the present invention, and their implementation principles are similar. The actions performed by each module and unit in the dynamic rendering device for massive marine element data in each embodiment of the present invention correspond to the steps in the dynamic rendering method for massive marine element data in each embodiment of the present invention. For the detailed function descriptions of each module of the dynamic rendering device for massive marine element data, reference can specifically be made to the descriptions in the corresponding dynamic rendering method for massive marine element data shown above, and details will not be elaborated here.
[0176] Among them, the above-mentioned dynamic rendering device for massive marine element data can be a computer program (including program code) running in a computer device. For example, the dynamic rendering device for massive marine element data is an application software; this device can be used to execute the corresponding steps in the method provided by the embodiments of the present invention.
[0177] In some embodiments, the dynamic rendering device for massive marine element data provided by the embodiments of the present invention can be implemented in a combination of software and hardware. As an example, the dynamic rendering device for massive marine element data provided by the embodiments of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the dynamic rendering method for massive marine element data provided by the embodiments of the present invention. For example, a processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0178] In other embodiments, the dynamic rendering device for massive marine element data provided by the embodiments of the present invention can be implemented in software. Figure 5 Shown is the dynamic rendering device for massive marine element data stored in a memory, which can be software in the form of programs and plugins, etc., and includes a series of modules, including a rendering request acquisition module 210, an initial marine data to be rendered determination module 220, a marine data determination module 230, a target level determination module 240, a target slice determination module 250, and a rendering module 260, for implementing the dynamic rendering method for massive marine element data provided by the embodiments of the present invention.
[0179] The modules involved in the embodiments of the present invention can be implemented in software or in hardware. In some cases, the name of a module does not constitute a limitation on the module itself.
[0180] Based on the same principle as the method shown in the embodiments of the present invention, an electronic device is also provided in the embodiments of the present invention. The electronic device may include, but is not limited to: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the method shown in any embodiment of the present invention by calling the computer program.
[0181] In an alternative embodiment, an electronic device is provided, such as Figure 6 shown Figure 6 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. Among them, the processor 4001 and the memory 4003 are connected, such as connected through a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, and the transceiver 4004 may be used for data interaction between the electronic device and other electronic devices, such as data sending and / or data receiving, etc. It should be noted that in practical applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.
[0182] The processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in connection with the disclosure of the present invention. The processor 4001 may also be a combination that implements computing functions, such as a combination including one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0183] The bus 4002 may include a path for transmitting information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation,Figure 6 It is represented by only one thick line, but it does not mean that there is only one bus or one type of bus.
[0184] The memory 4003 can be a ROM (Read Only Memory), or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory), or other types of dynamic storage devices that can store information and instructions. It can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0185] The memory 4003 is used to store the application program code (computer program) for implementing the solution of the present invention and is controlled by the processor 4001 for execution. The processor 4001 is used to execute the application program code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.
[0186] Among them, the electronic device can also be a terminal device. Figure 6 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.
[0187] The embodiments of the present invention provide a computer-readable storage medium on which a computer program is stored. When it runs on a computer, it enables the computer to execute the corresponding content in the foregoing method embodiments.
[0188] According to another aspect of the present invention, there is also provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, enabling the computer device to execute the methods provided in the above various implementation manners of the embodiments.
[0189] Computer program code for performing the operations of the present invention may be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it may be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0190] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0191] The computer-readable storage medium provided by the embodiments of the present invention may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0192] The above computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to execute the method shown in the above embodiments.
[0193] The above description is only a preferred embodiment of the present invention and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present invention is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present invention.
Claims
1. A dynamic rendering method for massive ocean element data, characterized in that, The method includes the following steps: Obtain a rendering request for the ocean data to be rendered for the current window and the depth corresponding to the ocean data to be rendered. The rendering request includes the display size of the current window, the scaling ratio corresponding to the current window, and the type of the ocean data to be rendered; According to the type of the ocean data to be rendered, determine the initial ocean data to be rendered corresponding to the type from the database. Different slices of ocean data corresponding to different types, different depths, and different spatial resolutions are stored in the database; According to the depth corresponding to the ocean data to be rendered, determine the ocean data corresponding to the depth from the initial ocean data to be rendered; According to the scaling ratio, determine the target level corresponding to the scaling ratio from the ocean data corresponding to the depth. Each scaling ratio corresponds to a different level, each level corresponds to a different spatial resolution, and the ocean data corresponding to each level includes the ocean data corresponding to at least two slices respectively; According to the display size, determine the display range of the ocean data to be rendered on the map, and determine the target slices corresponding to the target level within the display range. For each level, the ocean data corresponding to each level includes the ocean data corresponding to at least two slices respectively; According to the target slices, determine the ocean data to be rendered corresponding to the target slices from the initial ocean data to be rendered, and construct an ocean data logic field for the area to be rendered according to the target slices. Render and display the ocean data to be rendered according to the ocean data logic field.
2. The method according to claim 1, characterized in that, The method further includes: Obtain multi-source heterogeneous ocean data. The multi-source heterogeneous ocean data includes initial ocean data of different types. Each type of initial ocean data corresponds to initial ocean data of different depths, and the display ranges corresponding to the initial ocean data of each depth are the same; For the initial ocean data corresponding to each depth of the same type, divide the initial ocean data into multiple levels of first ocean data according to a preset multiple of spatial resolutions. The spatial resolutions corresponding to the first ocean data of each level are different; For the first ocean data of each level, divide the first ocean data of the level into second ocean data corresponding to at least two slices respectively according to the set slice size and the relevant information of the first ocean data, and determine the slice description information of each slice; Wherein, the relevant information includes the type of the first ocean data, the spatial resolution of the first ocean data, the invalid value corresponding to the first ocean data, and the ocean element parameters of the first ocean data. For each slice, the slice description information includes the type of the second ocean data, the spatial resolution of the second ocean data, the invalid value corresponding to the second ocean data, the ocean element parameters of the second ocean data, the starting position of the second ocean data in the display range corresponding to the initial ocean data, and the occupied position; Store the second ocean data corresponding to multiple slices and the slice description information into the database.
3. The method according to claim 2, characterized in that, After obtaining the second ocean data corresponding to at least two slices respectively corresponding to the first ocean data of each of the levels, the method further includes: For each of the slices corresponding to each of the levels, expanding the slice size of the slice to obtain an expanded slice, and determining the description information of each of the expanded slices, and there is overlapping data between the third ocean data corresponding to two adjacent expanded slices; The storing the second ocean data and the slice description information corresponding to multiple slices into the database includes: Storing the third ocean data and the slice description information corresponding to multiple expanded slices into the database.
4. The method according to claim 2, wherein The obtaining the multi-source heterogeneous ocean data includes: Obtaining the initial multi-source heterogeneous ocean data; According to the preset data specification requirements, performing normalization processing on the initial multi-source heterogeneous ocean data to obtain the processed ocean data, and using the processed ocean data as the multi-source heterogeneous ocean data.
5. The method according to any one of claims 2 to 4, characterized in that, For the initial ocean data corresponding to each of the depths of the same type, the dividing the initial ocean data into multiple levels of first ocean data according to the preset multiple spatial resolutions includes: For the initial ocean data corresponding to each of the depths of the same type, taking any one of the multiple spatial resolutions as the target spatial resolution, and converting the initial ocean data into the first ocean data corresponding to the target spatial resolution by the bilinear interpolation method.
6. The method according to any one of claims 2 to 4, characterized in that For the first ocean data of each of the levels, the first ocean data being floating-point data, the dividing the first ocean data of the level into second ocean data respectively corresponding to at least two slices according to the set slice size and the relevant information of the first ocean data, and determining the slice description information of each of the slices includes: Converting the first ocean data into an integer-type fourth ocean data; According to the set slice size and the relevant information of the first ocean data, dividing the fourth ocean data of the level into second ocean data respectively corresponding to at least two slices, and determining the slice description information of each of the slices; The determining the ocean data to be rendered corresponding to the target slice from the initial ocean data to be rendered according to the target slice, constructing the ocean data logic field of the area to be rendered according to the target slice, and rendering and displaying the ocean data to be rendered according to the ocean data logic field includes: Determining the ocean data to be rendered corresponding to the target slice from the initial ocean data to be rendered according to the target slice, and constructing the ocean data logic field of the area to be rendered according to the target slice; Converting the ocean data to be rendered into floating-point ocean data; Rendering and displaying the floating-point ocean data according to the ocean data logic field.
7. The method according to claim 6, wherein For the fourth ocean data of each of the levels, the dividing the fourth ocean data of the level into second ocean data respectively corresponding to at least two slices according to the set slice size and the relevant information of the first ocean data, and determining the slice description information of each of the slices includes: According to the set slice size and the relevant information of the first ocean data, divide the fourth ocean data of the level into at least two metadata, and determine the description information of each metadata. For the metadata, the description information includes the type of the metadata, the spatial resolution of the metadata, the invalid value corresponding to the metadata, the ocean element parameters of the metadata, the starting position and the occupied position of the metadata in the display range corresponding to the initial ocean data. The display range includes the longitude coordinates and latitude coordinates corresponding to the metadata, and the occupied position includes the number of rows and columns corresponding to the metadata in the longitude and latitude grid corresponding to the fourth ocean data. The ocean element parameters include the maximum value and the minimum value; For each metadata, store the metadata, the type of the metadata, the spatial resolution of the metadata and the invalid value corresponding to the metadata into the R band of the image, store the longitude coordinates, the number of rows and the maximum value into the G band of the image, and store the latitude coordinates, the number of columns and the minimum value into the B band of the image; For each metadata, use the stored image corresponding to the metadata as the slice corresponding to the metadata.
8. A dynamic rendering device for massive marine element data, characterized in that, Comprising: A rendering request acquisition module, configured to acquire a rendering request for the ocean data to be rendered for the current window and the depth corresponding to the ocean data to be rendered. The rendering request includes the display size of the current window, the zoom ratio corresponding to the current window and the type of the ocean data to be rendered; An initial ocean data to be rendered determination module, configured to determine, according to the type of the ocean data to be rendered, the initial ocean data to be rendered corresponding to the type from a database, where the database stores ocean data corresponding to different slices corresponding to different types, different depths and different spatial resolutions; An ocean data determination module, configured to determine, according to the depth corresponding to the ocean data to be rendered, the ocean data corresponding to the depth from the initial ocean data to be rendered; A target level determination module, configured to determine, according to the zoom ratio, the target level corresponding to the zoom ratio from the ocean data corresponding to the depth. Each zoom ratio corresponds to a different level, each level corresponds to a different spatial resolution, and the ocean data corresponding to each level includes ocean data corresponding to at least two slices respectively; A target slice determination module, configured to determine, according to the display size, the display range corresponding to the ocean data to be rendered on the map, and determine the target slice corresponding to the target level within the display range. For each level, the ocean data corresponding to each level includes ocean data corresponding to at least two slices respectively; A rendering module, configured to determine, according to the target slice, the ocean data to be rendered corresponding to the target slice from the initial ocean data to be rendered, construct an ocean data logic field of the area to be rendered according to the target slice, and perform rendering display on the ocean data to be rendered according to the ocean data logic field.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method described in any one of claims 1-7 is implemented.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor, the method described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Visual simulation method for Argo float ocean product
CN106372367A
Spatial data organization method based on global multi-scale grid
CN113515525A