Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
In the description of the present application, "/" means "or" unless otherwise indicated, for example, A/B may mean A or B. "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. Further, "at least one", "a plurality" means two or more. The terms "first," "second," and the like do not limit the number and order of execution, and the terms "first," "second," and the like do not necessarily differ.
Currently, for measurement data (Measurement Result, MR) such as measurement reports during communication, the data volume of the MR data obtained is large, and the positioning method of the data is complex, so that the data cannot be directly analyzed. For the data, a plurality of pieces of MR data can be attributed to one grid through dividing a geographic grid, and then the data is spatially realized through aggregation, average and other modes, so that the dimension reduction of the data is realized on the premise of not changing the distribution characteristics of the data. Currently nationally, there are about 23 hundred million MR effective raster data obtained.
In the related art, the transmission and presentation of such data is typically implemented through grid tile services, data hierarchical thinning element services, and the like. In the grid tile service, the grid tiles refer to panorama rendering by slicing the service end according to the pyramid model in advance, then cutting into pictures corresponding to tile coordinates according to different display grades of the map, and publishing the pictures as slice layer services, such as Web map tile service (Web MAP TILE SERVICE, WMTS). When a user accesses, according to the geographical range corresponding to the current visual field range, mapping the picture index to the tile coordinates, and requesting the picture corresponding to the index from the rear end, rendering and splicing the picture according to a specific sequence after the browser obtains the picture to obtain a complete map. However, since the result returned by the WTMS service is a still picture, when an interactive function such as element query is required, a query request needs to be initiated to the server after an event is triggered, and the server waits for the query result to be returned, a certain time delay exists, so that the user experience is affected, the data in the grid tile service cannot be updated in time, and when the data volume is large and the query event is high, the load capacity of the server is also required to be high.
In the data hierarchical thinning element service, data thinning refers to data merging and data screening of original data according to a certain proportion and algorithm, so that the data quantity is reduced. And publishing the data subjected to data thinning as element service so as to optimize the loading and rendering efficiency of the data. Because the screened data can reduce the accuracy of data display, multi-level data thinning is required according to different display levels, so that the balance between loading efficiency and display accuracy is realized as much as possible. However, the data thinning needs to be processed in advance at the server end, and the multi-level data thinning result is issued as a plurality of Web element services (Web Feature Service, WFS), when the client (display interface) displays, different element map services need to be requested according to different display levels, and the use is complicated.
In a combined scheme of grid tile service and data hierarchical sparse element service, WMTS and WFS are required to be loaded simultaneously, so that a proper map zoom level is searched for as a preset threshold, when the zoom level of a display interface is smaller than the preset threshold, the grid tiles are displayed by calling WMTS, and the WFS is removed; and when the zoom level of the display interface is greater than the preset threshold, selecting to call the WFS, presenting the element service and removing the WMTS. The interactive function of map elements is satisfied while the rendering speed is considered by means of dynamic loading and on-demand loading. However, the preset scaling threshold needs to be continuously adjusted according to different service requirements and data volumes, and the WMTS causes a time delay in the interaction process of the user, when the WFS is adopted, when the data volume is large, the loading of the layer is slower, the user experience is worse, and the client needs to preset WMTS and WFS at the same time, so that the use is more complicated.
The data presentation method provided by the embodiment of the application can be applied to a data presentation system. Fig. 1 shows a schematic diagram of a structure of the data presentation system. As shown in fig. 1, the data presentation system 20 includes: an electronic device 21, a server 22 and a plurality of databases 23. The server 22 is connected to the electronic device 21 and the plurality of databases 23, respectively.
The data presentation system 20 may be used for the internet of things, and the data presentation system 20 may include a plurality of central processing units (central processing unit, CPUs), a plurality of memories, a storage device storing a plurality of operating systems, and so on.
The electronic device 21 may be used for the internet of things, and is used for realizing data display, for example, the electronic device 21 may be a browser, and data display is realized through a display interface.
Specifically, the electronic device 21 may generate a query request based on the current environment, send the query request to the server 22, and draw and present an image according to the query result returned by the server 22.
Illustratively, the electronic device 21 may draw and render a network geographic information system (Web Geographic Information System, webGIS) map by invoking a network graphic library (Web Graphics Library, webGL).
Optionally, the electronic device 21 may also be used to accomplish flexible interactions of the user with the webgimap, such as querying, highlighting, etc. of the elements.
In one design, as shown in FIG. 1, electronic device 21 may include multiple modules of a WebGIS component library, webGL, canvas layer, and the like.
Wherein, the WebGIS component library can comprise OpenLayers, leaflet and other WebGIS components so as to realize the display of the WebGIS map; webGL is used to complete drawing and rendering of a map based on the map layout layer.
Alternatively, the canvas layer may be CANVASLAYER layers.
The server 22 is configured to implement data query and feedback, for example, the server 22 may be configured to receive a query request sent by the electronic device 21, query a result in the database 23 according to the query request, and then return the query result to the electronic device 21.
Alternatively, as shown in fig. 1, the query result returned by the database 23 may be fed back to the electronic device 21 in the form of a point element set.
Alternatively, the server 22 may be an interface server, and receives, through a restful interface, a query request sent by the electronic device 21.
Alternatively, after receiving the query request, the server 22 may generate a query condition according to the current display range and the zoom level based on the query request, and perform a query in the database 23, and return the queried result to the electronic device 21.
The database 23 is configured to provide data information for the electronic device 21, for example, provide required raster data for the electronic device 21, so that the electronic device 21 can complete drawing and presentation of images.
Alternatively, the database 23 may be a column-store database, storing a plurality of raster data, to achieve an efficient data query service.
Alternatively, as shown in fig. 1, due to the large amount of raster data, a plurality of databases 23 may constitute a database cluster, and the data may be updated continuously over time.
Alternatively, the capacity expansion and backup of the database can be realized through the database cluster.
A data presentation method provided by an embodiment of the present application is described below with reference to the accompanying drawings.
As shown in fig. 2, a data presentation method provided by an embodiment of the present application includes S201 to S203:
S201, acquiring a target display range and a target zoom level corresponding to a region to be displayed in a target map.
Optionally, before displaying the map of the area to be displayed through the browser, it is also necessary to initialize the WebGIS component in the electronic device 21 and superimpose a canvas layer for WebGL drawing use.
Alternatively, the target map may be a map corresponding to a preset area, and the preset area may be a preset administrative area (e.g., a map of province a, a map of city a), a preset scene area (e.g., a hospital, a park), or the like.
It is understood that the area to be displayed is a partial area within the target map.
Alternatively, the target display range is a range corresponding to the to-be-displayed area, for example, the target display range may be a corresponding display range of a current display interface of the electronic device 21, that is, a map area where the target map can be displayed on the electronic device (a display page corresponding to the electronic device 21) in the case of the target zoom level.
Alternatively, the target display range may be determined by determining the boundary position of the current display interface of the electronic device 21 and determining the position information of the boundary position within the target map.
S202, determining a plurality of target grids corresponding to the area to be displayed from the grids according to basic information of the grids corresponding to the target map based on the target display range and the target zoom level corresponding to the area to be displayed.
Wherein the base information includes at least one of: grid identification, location information, minimum zoom level.
Optionally, the target display range and the target zoom level corresponding to the to-be-displayed area are used as screening conditions, a plurality of grids corresponding to the target map are screened, and the grids meeting the requirements of the target display range and the target zoom level are determined to be the target grids corresponding to the to-be-displayed area.
Alternatively, the grid identifier may be a number of the grid, such as a universally unique identifier (Universally Unique Identifier, UUID) corresponding to the grid.
Alternatively, the location information may be geographical location information of each grid, for example, the location information may be center longitude information and center latitude information of each grid.
Alternatively, the location information may also be location identification information of each grid, for example, the location information may be a center abscissa and a center ordinate of each grid in the target coordinate system.
Alternatively, the target coordinate system may be determined according to specific use needs.
For example, when the target map is a map of the province a, the northwest vertex of the province a may be used as a coordinate starting point, the coordinates may be marked as (0, 0), and it is determined that the point is in the east direction as the X-axis direction, the X-coordinate is gradually increased, the point is in the south direction as the Y-axis direction, and the Y-coordinate is gradually increased, thereby generating grids of a specific size in sequence, and determining the coordinates corresponding to each grid.
Alternatively, the size of the grid may be adjusted according to the specific use requirements, for example, the grid may be a 50 meter by 50 meter grid, a 50 meter by 100 meter grid.
Optionally, the minimum zoom level may be understood as a minimum visible zoom value, that is, when the target zoom level is greater than the minimum zoom level, the grid corresponding to the minimum zoom level needs to be displayed in the area to be displayed; when the target zoom level is smaller than or equal to the minimum zoom level, the grid corresponding to the minimum zoom level does not need to be displayed in the area to be displayed.
S203, displaying the area to be displayed based on the attribute information and the position information of the target grids.
The attribute information is used for indicating the landform type corresponding to each grid.
Optionally, the attribute information may be a plurality of attribute values corresponding to the grid, each attribute value corresponds to parameter information of one attribute type, and geographic feature information of the corresponding grid may be determined based on the plurality of attribute values corresponding to the plurality of attribute types.
Optionally, the attribute type corresponding to the grid may be changed according to specific usage requirements.
For example, when the geographic information needs to be displayed through the grid, the plurality of attribute values corresponding to the grid may be attribute values (such as altitude, vegetation information, road information, building information, etc.) representing a plurality of geographic feature information; when the network communication state needs to be displayed through the grid, the plurality of attribute values corresponding to the grid may be attribute values (such as uplink signal information, downlink signal information, etc.) representing a plurality of types of communication states.
Optionally, the attribute information may further include an update time, where the update time is used to indicate the acquisition time of the corresponding raster data.
By way of example, the data structure of each grid may be as shown in Table 1:
In the embodiment of the application, firstly, a target display range and a target zoom level corresponding to a region to be displayed in a target map are obtained, and based on the target display range and the target zoom level corresponding to the region to be displayed, a plurality of target grids corresponding to the region to be displayed are determined from a plurality of grids according to basic information including at least one of grid identification, position information and minimum zoom level corresponding to each grid in a plurality of grids corresponding to the target map, and then, based on the basic information and the position information of the plurality of target grids for indicating the landform type corresponding to each grid, the region to be displayed is displayed. According to the method, the multiple target grids corresponding to the region to be displayed can be directly obtained based on the target display range and the target zoom level corresponding to the region to be displayed according to the basic information of the multiple grids corresponding to the target map, and the region to be displayed is displayed through the attribute information and the position information of the multiple target grids. The data processing time delay can be reduced, and the map display speed of the area to be displayed is improved, so that the data presentation efficiency is improved, and the user experience is improved.
TABLE 1
| English name |
Chinese name |
Data type |
| id |
Numbering device |
uuid |
| x |
Center abscissa |
int |
| min_visible_zoom |
Minimum zoom level |
int |
| y |
Center ordinate |
int |
| update_time |
Update time |
datetime |
| property_1 |
Attribute value 1 |
float |
| ... |
... |
... |
| property_n |
Attribute value n |
float |
In one design, as shown in fig. 3, in the data presentation method provided in the embodiment of the present application, before S201, the method further includes S301:
s301, rasterizing the target map to obtain a plurality of grids corresponding to the target map, and determining attribute information and position information of each grid.
Optionally, the target map is rasterized, and after a plurality of grids corresponding to the target map are obtained, all the grids can be stored in the database.
Alternatively, the database may be a columnar storage database, so as to provide a high-speed query capability of data through the columnar storage database, thereby implementing quick determination of the target grid.
It should be noted that, in a specific scenario, unmanned areas such as mountains, rivers, deserts, etc. may not need to be covered, and thus the number of finally stored grids may be smaller than the number of actually generated grids.
In the embodiment of the application, the target map is rasterized to obtain a plurality of grids with specific sizes, and the attribute information and the position information of each grid are determined, so that the region to be displayed is displayed according to the attribute information and the position information of each grid, and the presentation efficiency of the region to be displayed is improved.
In one design, the target map corresponds to a plurality of zoom levels, and different zoom levels correspond to areas displaying different areas, as shown in fig. 4, in the data presentation method provided by the embodiment of the application, S401-S403 are further included:
S401, determining target parameters corresponding to each zoom level in the plurality of zoom levels.
The target parameters are used for displaying different numbers of grids when the area to be displayed corresponds to different zoom levels.
Alternatively, the plurality of zoom levels may be a plurality of zoom levels of a map specified in the related art or in the related standards of the industry.
The larger the zoom level is, the smaller the actual area that can be displayed is within the same display range, and the larger the display size corresponding to each grid is.
Optionally, the target parameter corresponding to each of the plurality of zoom levels may be determined on the premise of fully balancing the display effect and the transmission data amount, where the larger the zoom level is, the larger the corresponding target parameter is.
Alternatively, the target parameter may be a corresponding thinning ratio for each zoom level.
It should be noted that, in the embodiment of the present application, thinning is understood to be that a specific number of grids is extracted from a plurality of grids, and the greater the thinning ratio, the greater the number of extracted grids.
Optionally, when the scaling is equal to or greater than the preset threshold, the thinning ratio is 100% (i.e. all grids are extracted), and all grids are displayed.
Illustratively, when the zoom level is 3 or more, the thinning ratio is 100%, and all grids are displayed.
S402, determining a plurality of first grids from a plurality of grids corresponding to the target map according to the target parameter corresponding to any one of a plurality of zoom levels.
Optionally, a plurality of grids can be selected randomly in turn according to the target parameters corresponding to each zoom level through the database, and the identification corresponding to the current zoom level is added to the selected grids.
Illustratively, as shown in table 1, the data structure of each grid further includes minimum zoom level information corresponding to the grid.
Optionally, when the thinning is performed, a plurality of grids corresponding to the target map may be extracted step by step according to the order from the small scale level to the large scale level.
Optionally, when extracting the grids corresponding to the target map at the current zoom level, the grids extracted from the grids corresponding to the target map at the previous zoom level are retained (i.e., the grids selected by the previous zoom level are still retained when extracting the next zoom level).
Optionally, in the current zoom level, for the grid selected by the previous zoom level, since the identifier corresponding to the zoom level (the minimum zoom level) is already present in the grid at this time, the identifier does not need to be repeatedly added to the grid.
S403, determining any one of the zoom levels as a minimum zoom level corresponding to the plurality of first grids.
Wherein one grid corresponds to one minimum zoom level.
Exemplary, as shown in table 2: the target map corresponds to 10 grids (grid 1-grid 10).
TABLE 2
When the zoom level (zoom) is 0, the corresponding target parameter is 20%, 2 grids (grid 3, grid 8) are determined from the multiple grids corresponding to the target map, and the minimum zoom level corresponding to the grids 3 and 8 is determined to be 0.
When the zoom level is 1, the corresponding target parameter is 40%, at this time, 4 grids need to be determined from the multiple grids corresponding to the target map, that is, 2 grids (grid 1, grid 5) are determined from the remaining grids except for the grid 3 and the grid 8, and the minimum zoom level corresponding to the grid 1 and the grid 5 is 1.
When the zoom level is 2, the corresponding target parameter is 60%, and at this time, 6 grids need to be determined from multiple grids corresponding to the target map, that is, 2 grids (grid 6, grid 10) are determined from the remaining grids except for grid 3, grid 8, grid 1 and grid 5, and the minimum zoom level corresponding to grid 6 and grid 10 is 2.
When the zoom level is 3, the corresponding target parameter is 100%, and at this time, it is necessary to determine that the minimum zoom level corresponding to all the remaining grids (grid 2, grid 4, grid 7, and grid 9) is 3.
When the zoom level is greater than 3, the corresponding target parameter is 100%, and all grids have the corresponding minimum zoom level.
According to the embodiment of the application, the minimum zoom level is set for each grid in the multiple grids, and the grids meeting the display requirements of the target zoom level can be rapidly screened out according to the minimum zoom level corresponding to each grid, so that rapid query and screening of grid data are realized, the data presentation efficiency is improved, and the user experience is further improved.
In one design, as shown in fig. 5, in a data presentation method provided in an embodiment of the present application, S202 includes S501:
S501, determining any grid in a plurality of grids corresponding to the target map as the grid in the plurality of target grids when the minimum zoom level corresponding to the any grid is smaller than or equal to the target zoom level and the position information of the any grid is located in the target display range.
Optionally, the database may query a minimum zoom level corresponding to each grid of the plurality of grids and the location information corresponding to each grid, and determine a target grid having a minimum zoom level less than or equal to the target zoom level and location information within the target display range.
Alternatively, the minimum zoom level being less than or equal to the target zoom level may be understood as the minimum zoom level corresponding to the grid being less than the target zoom level, or the minimum zoom level corresponding to the grid being equal to the target zoom level.
For example, when the target zoom level is 2, the determined plurality of positions belongs to a plurality of grids within the target display range, and the corresponding grids with the minimum zoom level being less than or equal to 2 (e.g., the corresponding minimum zoom level is 2, the corresponding minimum zoom level is 1, and the corresponding minimum zoom level is 0) are target grids.
Optionally, the target display range may be longitude and latitude information corresponding to the area to be displayed.
Optionally, the coordinate information corresponding to the area to be displayed may be determined by the latitude and longitude information corresponding to the area to be displayed, where the coordinate information is the coordinate information of the latitude and longitude information corresponding to the area to be displayed under a preset coordinate system.
Specifically, the target display range may be coordinate information corresponding to four boundary points (such as an upper left boundary of the region to be displayed, a lower left boundary of the region to be displayed, an upper right boundary of the region to be displayed, and a lower right boundary of the region to be displayed) corresponding to the region to be displayed.
Optionally, the preset coordinate system may be a target coordinate system corresponding to the position identification information of the grid.
Optionally, a plurality of grids with the minimum zoom level smaller than or equal to the target zoom level may be determined from a plurality of grids corresponding to the target map, and then a plurality of target grids with the position information located in the target display range may be determined from a plurality of grids with the minimum zoom level smaller than or equal to the target zoom level.
Optionally, a plurality of grids with the position information within the target display range may be determined from a plurality of grids corresponding to the target map, and then a plurality of target grids with the minimum zoom level less than or equal to the target zoom level may be determined from a plurality of grids with the position information within the target display range.
For example, the determining the coordinate information corresponding to the area to be displayed according to the longitude and latitude information corresponding to the area to be displayed may be implemented by the following codes (for example, by the implementation of leaf. Js):
Optionally, the grids corresponding to the target map may be screened through four boundary points corresponding to the area to be displayed, so as to determine a plurality of grids with position information in the target display range.
For example, when the coordinates of the four boundary points corresponding to the area to be displayed are (2, 4), (700,4), (2, 500), (700, 500), respectively, the grids with the central abscissa equal to or greater than 2 and equal to or less than 700 and the central ordinate equal to or greater than 4 and equal to or less than 500 may be selected from the grids corresponding to the target map, and the grids are determined to be the grids with the position information located in the target display range.
In the embodiment of the application, the multiple grids corresponding to the target map are screened through the target display range and the target zoom level, so that the multiple target grids corresponding to the region to be displayed are rapidly determined, the data quantity is prevented from being increased as much as possible, the query speed of the grids is improved, the data presentation efficiency is further improved, and the user experience is improved.
In one design, as shown in fig. 6, in a data presentation method provided in an embodiment of the present application, S203 includes S601-S602:
s601, determining the image size corresponding to each target grid in a plurality of target grids corresponding to the area to be displayed when the area to be displayed corresponds to the target display range and the target zoom level.
For example, when the target grids are grids of 50 meters by 50 meters, the image size (pixel value) corresponding to 50 meters in the current to-be-displayed area, the target display range and the target zoom level, that is, the display size (actual rendering pixel value) of each grid, is calculated.
Alternatively, the longitude and latitude information of the center point of the current display range can be firstly obtained, and the longitude and latitude information of the center point of the current display range can be converted into the coordinate information of the screen; adding one pixel along the abscissa direction of the coordinate, adding one pixel along the ordinate direction, and calculating the distance represented by one pixel in the dimension direction and the distance represented by one pixel in the longitude direction respectively; and further determining the average value of the distance represented by one pixel in the longitudinal direction and the distance represented by one pixel in the latitudinal direction, multiplying the average value by 50 meters (the size of the current grid), and finally determining the image size (pixel value) corresponding to 50 meters in the current area to be displayed under the target display range and the target zoom level.
Illustratively, the display size of each grid within the current region to be displayed is calculated by the following code (exemplified by the implementation by leaf. Js):
s602, drawing a target image corresponding to the area to be displayed through the vertex shader and the fragment shader, and displaying the target image based on the target image layer.
The target layer is used for realizing interaction between a user and the target image.
Alternatively, the grid patterns can be set through the vertex shader and the fragment shader by calling WebGL, and the grid is drawn in a dot drawing mode; further, rendering the drawing result into a canvas layer (such as CANVASLAYER layer), and completing interaction of functions through event requests (such as click, river, etc.) of corresponding users of the drawing layer.
Illustratively, invoking a vertex Shader (e.g., vector loader) can be accomplished by:
Illustratively, invoking the fragment shader (e.g., FRAGMENT SHADER) may be accomplished by:
Exemplary, as shown in fig. 7, in conjunction with fig. 1, in the data presentation method provided by the embodiment of the present application, firstly, an electronic device (browser) initializes a WebGIS component (such as OpenLayers, leaflet component) and superimposes a canvas layer (such as CANVASLAYER layer) for WebGL drawing; further, the browser acquires a target display range zoom and a target zoom level bbox corresponding to the current region to be displayed, takes the zoom and bbox as parameters, and initiates a query request to the server through a restful interface; after the server receives the query request, bbox parameters in the parameters are converted into corresponding grid coordinate frames by an algorithm, namely [ X_ (top-left) ], [ Y_ (top-left) ], [ X_ (bottom-right), Y_ (bottom-right) ], the grid coordinate frames and the zoom parameters are combined into a target query statement, a target grid is queried in a database, and a query result is returned to a browser after the server queries the target grid; after receiving the query result, the browser calculates the longitude and latitude corresponding to the center point of each target grid for drawing the area with the display; after determining the longitudes and latitudes corresponding to the center points of all target grids, the browser calculates the pixel values corresponding to the current longitudes and latitudes of 50 meters, invokes WebGL, sets the grid patterns through the vertex shader and the fragment shader, draws the grids in a point drawing mode, renders the drawing result into a canvas layer CANVASLAYER, and responds to user events (click, river and other events) through the drawing layer to complete interaction logic.
Optionally, each time the map zoom level or the target display range change ends, a query request is initiated to the server.
Illustratively, each time the map zoom ends, the map zoom end triggers zoomEnd an event, each time the target display range changes end triggers moveEnd an event, at which point a query request is re-initiated to the server based on the current target display range and target zoom level.
Optionally, the target query statement formed by combining the grid coordinate frame and the boom parameter may be an SQL query statement.
Illustratively, the target query statement combining the grid coordinate bounding box with the boom parameter may be implemented by the following code:
select*from dbnamewhere x≥Xtop-left and y≥Ytop-left and
The foregoing description of the solution provided by the embodiments of the present application has been mainly presented in terms of a method. To achieve the above functions, it includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application can divide the functional modules of a data presentation device according to the method example, for example, each functional module can be divided corresponding to each function, or two or more functions can be integrated in one processing module. The integrated modules may be implemented in hardware or in software functional modules. Optionally, the division of the modules in the embodiment of the present application is schematic, which is merely a logic function division, and other division manners may be implemented in practice.
Fig. 8 is a schematic structural diagram of a data presentation device according to an embodiment of the present application. As shown in fig. 8, the data presentation device 40 is configured to improve the presentation efficiency of data, and improve the user experience, for example, to perform a data presentation method shown in fig. 2. The data presentation device 40 includes: an acquisition unit 401, a determination unit 402, and a display unit 403.
The obtaining unit 401 is configured to obtain a target display range and a target zoom level corresponding to a region to be displayed in the target map.
A determining unit 402, configured to determine, from a plurality of grids, a plurality of target grids corresponding to the area to be displayed according to basic information of the plurality of grids corresponding to the target map, based on a target display range and a target zoom level corresponding to the area to be displayed, where the basic information includes at least one of: grid identification, location information, minimum zoom level.
A display unit 403 for displaying the area to be displayed based on attribute information and position information of a plurality of target grids, the attribute information indicating a landform type corresponding to each grid.
In one design, the apparatus further comprises: a processing unit 404; and the processing unit 404 is configured to perform rasterization processing on the target map to obtain a plurality of grids corresponding to the target map.
A determining unit 402 for determining attribute information and position information of each grid.
In one design, the target map corresponds to a plurality of zoom levels, different zoom levels corresponding to areas displaying different areas; a determining unit 402, configured to determine a target parameter corresponding to each of the zoom levels, where the target parameter is used to display a different number of grids when the area to be displayed corresponds to a different zoom level.
The determining unit 402 is configured to determine, for any one of the zoom levels, a plurality of first grids from a plurality of grids corresponding to the target map according to a target parameter corresponding to the any one of the zoom levels.
A determining unit 402, configured to determine any one of the zoom levels as a minimum zoom level corresponding to a plurality of first grids, one grid corresponding to each minimum zoom level.
In one design, the determining unit 402 is configured to determine, for any one of a plurality of grids corresponding to the target map, the any one of the grids as a grid of the plurality of target grids when the minimum zoom level corresponding to the any one of the grids is less than or equal to the target zoom level and the position information of the any one of the grids is located in the target display range.
In one design, the determining unit 402 is configured to determine, when the area to be displayed corresponds to the target display range and the target zoom level, an image size corresponding to each of a plurality of target grids corresponding to the area to be displayed.
And the processing unit 404 is used for drawing the target image corresponding to the area to be displayed through the vertex shader and the fragment shader.
A display unit 403 for displaying the target image based on a target layer for realizing interaction between the user and the target image.
In the case of implementing the functions of the integrated modules in the form of hardware, another possible structural schematic diagram of the electronic device involved in the above embodiment is provided in the embodiment of the present application. As shown in fig. 9, an electronic device 70 is configured to improve data presentation efficiency and user experience, for example, to perform a data presentation method shown in fig. 2. The electronic device 70 comprises a processor 701, a memory 702 and a bus 703. The processor 701 and the memory 702 may be connected by a bus 703.
The processor 701 is a control center of the communication device, and may be one processor or a collective term of a plurality of processing elements. For example, the processor 701 may be a general-purpose central processing unit (central processing unit, CPU), or may be another general-purpose processor. Wherein the general purpose processor may be a microprocessor or any conventional processor or the like.
As one example, processor 701 may include one or more CPUs, such as CPU 0 and CPU 1 shown in fig. 9.
The memory 702 may be, but is not limited to, read-only memory (ROM) or other type of static storage device that can store static information and instructions, random access memory (random access memory, RAM) or other type of dynamic storage device that can store information and instructions, or electrically erasable programmable read-only memory (EEPROM), magnetic disk storage or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
As a possible implementation, the memory 702 may exist separately from the processor 701, and the memory 702 may be connected to the processor 701 through the bus 703 for storing instructions or program code. The processor 701, when calling and executing instructions or program code stored in the memory 702, is capable of implementing a data presentation method provided by an embodiment of the present application.
In another possible implementation, the memory 702 may also be integrated with the processor 701.
Bus 703 may be an industry standard architecture (Industry Standard Architecture, ISA) bus, a peripheral component interconnect (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 9, but not only one bus or one type of bus.
It should be noted that the structure shown in fig. 9 does not constitute a limitation of the electronic device 70. The electronic device 70 may include more or fewer components than shown in fig. 9, or may combine certain components or a different arrangement of components.
As an example, in connection with fig. 8, the acquisition unit 401, the determination unit 402, the display unit 403, and the processing unit 404 in the data presentation device 40 realize the same functions as those of the processor 701 in fig. 9.
Optionally, as shown in fig. 9, the electronic device 70 provided by the embodiment of the present application may further include a communication interface 704.
Communication interface 704 for connecting with other devices via a communication network. The communication network may be an ethernet, a radio access network, a wireless local area network (wireless local area networks, WLAN), etc. The communication interface 704 may include a receiving unit for receiving data and a transmitting unit for transmitting data.
In one design, the electronic device provided in the embodiment of the present application may further include a communication interface integrated in the processor.
From the above description of embodiments, it will be apparent to those skilled in the art that the foregoing functional unit divisions are merely illustrative for convenience and brevity of description. In practical applications, the above-mentioned function allocation may be performed by different functional units, i.e. the internal structure of the device is divided into different functional units, as needed, to perform all or part of the functions described above. The specific working processes of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores instructions, when the computer executes the instructions, the computer executes each step in the method flow shown in the method embodiment.
Embodiments of the present application provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform a data presentation method as in the method embodiments described above.
The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: electrical connections having one or more wires, portable computer diskette, hard disk. Random access Memory (Random Access Memory, RAM), read-Only Memory (ROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), registers, hard disk, optical fiber, portable compact disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing, or any other form of computer-readable storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an Application SPECIFIC INTEGRATED Circuit (ASIC). In embodiments of the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Since the electronic device, the computer readable storage medium, and the computer program product in the embodiments of the present application can be applied to the above-mentioned method, the technical effects that can be obtained by the method can also refer to the above-mentioned method embodiments, and the embodiments of the present application are not described herein again.
The present application is not limited to the above embodiments, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application.