A plug-in method and apparatus for loading network digital earth data
By classifying data, writing plugins, and uploading them to the server within the network digital earth system, the problem of users being unable to write and use custom data plugins has been solved, achieving greater flexibility and breadth in data loading methods.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2026-03-06
AI Technical Summary
The existing online digital earth system cannot support the writing and use of user-defined data plugins, resulting in inflexible data loading methods, limited data types supported by the system, and a large workload for user data processing.
This paper provides a plug-in-based method for loading network digital earth data. By acquiring network digital earth data and user data, classifying them into default data types, writing default data plugins and custom data plugins, uploading them to the server, dynamically loading the data, and supporting user-defined data types.
It improves the flexibility and breadth of data loading methods, meets the needs of users for custom data plugins, and realizes the expansion and flexible loading of data types.
Smart Images

Figure CN115129399B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a plug-in-based method and apparatus for loading network digital earth data. Background Technology
[0002] In today's era of advanced computer technology and information science, the data formats supported by each software system are usually fixed. Users can only load data types that the system supports. For data types that the system does not support or user-defined data types, users can only process them into data formats supported by the system before loading them. This results in problems such as limited data types supported by the system, inflexible data loading methods, and a large workload for users in data processing. Under these circumstances, the ability to extend data formats through plug-ins becomes particularly important.
[0003] In existing technologies, plug-in-based data format extensions can meet users' needs for loading custom data by allowing them to write and upload custom data plugins. While desktop 3D systems and digital earth systems already have concepts related to data plugins, such as OpenSceneGraph and osgEarth, these only support the writing and use of user-defined data plugins during the system development phase; once the system is released, this support is no longer available.
[0004] There are currently no data plugins in the network digital earth system. Therefore, how to provide a solution to the above-mentioned technical problems is an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0005] In view of this, this application provides a plug-in network digital earth data loading method and apparatus to meet the data type expansion supported by the system and user-defined data loading, which is forward-looking, novel, practical and necessary.
[0006] In a first aspect, embodiments of this application provide a plug-in-based method for loading digital earth data onto a web browser. The method includes:
[0007] Acquire digital earth data and user data from the network;
[0008] The network digital earth data is classified to obtain the default data type;
[0009] Write a default data plugin for the default data type according to the pre-defined data plugin writing specifications;
[0010] Determine the custom data type based on the user data;
[0011] Write custom data plugins for the custom data types according to the pre-defined data plugin writing specifications;
[0012] The default data plugin and the custom data plugin are uploaded to the server so that the server adds the default data plugin and the custom data plugin to the data plugin list.
[0013] Preferably, the method further includes:
[0014] Based on the pre-defined data layer configuration specifications, edit the layer configuration information of the default data plugin and the layer configuration information of the custom data plugin to generate a data layer;
[0015] The data layer is uploaded to the server so that the server adds the data layer to the layer list.
[0016] Preferably, the default data type includes at least one of the following:
[0017] Tile map service TMSLayer, tile map network service WMTSLayer, network map service WMSLayer, ArcGIS layer service ArcGISLayer, Uniform Resource Identifier image layer service UrlImageLayer, 3D data in 3dTiles format ThreeDTiles, 3D model file Model, TIF image data with geographic coordinates, VectorFieldFromImage image data VectorFieldFromImage image data ScalarFieldFromImage image data CloudFieldFromImage image data CloudFieldFromImage image data TimeSeries, and Network Digital Earth System functional components.
[0018] Preferably, the method further includes:
[0019] When a user sends a request to load layers, the layer list is obtained from the server.
[0020] Determine whether there is a layer in the layer list that corresponds to the layer loading request;
[0021] If there is a layer to be loaded in the layer list that corresponds to the layer loading request, then the data type of the layer to be loaded is determined;
[0022] Based on the data type of the layer to be loaded, obtain the first data plugin corresponding to the data type of the layer to be loaded from the data plugin list on the server side;
[0023] Use the first data plugin to load the data corresponding to the layer to be loaded.
[0024] Preferably, the method further includes:
[0025] If there is no layer to be loaded corresponding to the loading layer request in the layer list, then obtain the target user data corresponding to the loading layer request;
[0026] Determine the target custom data type corresponding to the target user data;
[0027] Determine whether a second data plugin corresponding to the target custom data type exists in the server-side data plugin list;
[0028] If a second data plugin corresponding to the target custom data type exists in the server-side data plugin list, then the layer configuration information of the second data plugin is edited according to the predefined data layer configuration specification to generate the target data layer;
[0029] The target data layer is uploaded to the server so that the server adds the target data layer to the layer list.
[0030] Preferably, the method further includes:
[0031] If there is no second data plugin corresponding to the target custom data type in the data plugin list, then a target custom data plugin is written for the target custom data type according to the pre-defined data plugin writing specifications;
[0032] The target custom data plugin is uploaded to the server so that the server adds the target custom data plugin to the data plugin list.
[0033] Preferably, the pre-defined data plugin writing specification specifically includes: a JavaScript file, which includes: functions for writing the data plugin to be written, thereby obtaining a class.
[0034] Secondly, embodiments of this application provide a plug-in network digital earth data loading device, comprising:
[0035] The acquisition module is used to acquire network digital earth data and user data;
[0036] The classification module is used to classify the network digital earth data to obtain the default data type;
[0037] The first writing module is used to write default data plugins for the default data type according to the predefined data plugin writing specifications.
[0038] The determination module is used to determine the custom data type based on the user data;
[0039] The second writing module is used to write custom data plugins for the custom data type according to the pre-defined data plugin writing specifications.
[0040] The first upload module is used to upload the default data plugin and the custom data plugin to the server, so that the server adds the default data plugin and the custom data plugin to the data plugin list.
[0041] Preferably, the device further includes:
[0042] The editing and layer generation module is used to edit the layer configuration information of the default data plugin and the layer configuration information of the custom data plugin according to the predefined data layer configuration specifications, and generate data layers.
[0043] The second upload module is used to upload the data layer to the server so that the server can add the data layer to the layer list.
[0044] Preferably, the device further includes:
[0045] The layer list retrieval module is used to retrieve the layer list from the server when a user sends a request to load layers.
[0046] The judgment module is used to determine whether there is a layer to be loaded in the layer list that corresponds to the layer loading request;
[0047] The data type determination module is used to determine the data type of the layer to be loaded if there is a layer to be loaded in the layer list that corresponds to the layer loading request.
[0048] The data plugin acquisition module is used to obtain the corresponding first data plugin from the data plugin list on the server side according to the data type of the layer to be loaded;
[0049] The loading module is used to load the data corresponding to the layer to be loaded using the first data plugin.
[0050] Thirdly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described in the first aspect above.
[0051] Fourthly, embodiments of this application provide a plug-in network digital earth data loading system, the system comprising: a processor and a memory; the memory being used to store instructions; the processor being used to execute the instructions in the memory, causing the system to perform the method as described in any one of the preceding first aspects.
[0052] Fifthly, embodiments of this application provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the method described in the first aspect above.
[0053] Compared with the prior art, this application has the following advantages:
[0054] This application discloses a plug-in-based method for loading web digital earth data. The method is applied to a browser and includes: acquiring web digital earth data and user data; classifying the web digital earth data to obtain default data types; writing default data plugins for the default data types according to pre-defined data plugin writing specifications; determining custom data types based on the user data; writing custom data plugins for the custom data types according to the pre-defined data plugin writing specifications; and uploading the default data plugins and custom data plugins to a server, so that the server adds the default data plugins and custom data plugins to a data plugin list. This application classifies common web digital earth data and obtains the corresponding data types for user data. It writes data plugins corresponding to the data types based on data plugin writing specifications, and uses a data plugin mechanism to dynamically load data in the web digital earth system. This meets the needs of users for custom data plugins and improves the flexibility and breadth of data loading methods. Attached Figure Description
[0055] Figure 1 This is a flowchart illustrating a plug-in-based network digital earth data loading method in an embodiment of this application.
[0056] Figure 2 This is a schematic diagram of the overall process of the plug-in network digital earth data loading method in the embodiments of this application;
[0057] Figure 3 This is a schematic diagram of the layer loading workflow in the embodiments of this application;
[0058] Figure 4 This is a schematic diagram of the workflow for uploading layers in an embodiment of this application;
[0059] Figure 5 This is a schematic diagram illustrating the workflow of the custom data plugin in the embodiments of this application;
[0060] Figure 6This is a structural block diagram of a plug-in network digital earth data loading device according to an embodiment of this application. Detailed Implementation
[0061] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0062] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0063] See Figure 1 The figure is a flowchart illustrating a plug-in-based method for loading digital earth data on the web, provided in an embodiment of this application. This method is applied to a browser and includes the following steps S101 to S106:
[0064] S101: Acquire network digital earth data and user data.
[0065] In this application embodiment, network digital earth data can be obtained from the server side of the network digital earth system or from a storage database outside the system; for user data, user-uploaded data can be obtained directly; the above are only examples of the methods of obtaining network digital earth data and user data in this application, and different data acquisition methods can be determined according to the actual situation, which are not limited in this application.
[0066] S102: Classify the network digital earth data to obtain the default data type.
[0067] In this embodiment, after acquiring common data from the Network Digital Earth System, the network digital earth data is classified into 13 default data types, specifically including: Tile Map Service (TMSLayer), Tile Map Network Service (WMTSLayer), Network Map Service (WMSLayer), ArcGIS Layer Service (ArcGISLayer), Uniform Resource Identifier (UrlImageLayer) image layer service, 3D data in 3D Tiles format (ThreeDTiles), 3D model files (Model), TIF image data with geographic coordinates (TIF), Vector Field From Image (VectorFieldFromImage), Scalar Field From Image (ScalarFieldFromImage), Cloud Field From Image (CloudFieldFromImage), Time Series data, and Network Digital Earth System functional components. Simultaneously with data classification, the parameter configuration items required for loading each type can be organized, merging the data types and parameter configuration items into a single table, as detailed in Table 1 below.
[0068]
[0069]
[0070]
[0071]
[0072]
[0073] Table 1 Default data types and their parameter configuration items
[0074] Examples of parameter configurations for each data type in this application embodiment are as follows:
[0075] 1. TMS Layer
[0076] The TMS layer service, and the corresponding options configuration example are as follows:
[0077]
[0078] 2. WMTSLayer
[0079] The WMTS layer service, and the corresponding options configuration example are as follows:
[0080]
[0081]
[0082] 3. WMSLayer
[0083] The following is an example of the options configuration for the WMS layer service:
[0084]
[0085] 4. ArcGISLayer
[0086] The ArcGIS Layers service, and the corresponding options configuration example are as follows:
[0087] const opt_arcgis={
[0088] url:"",
[0089] }
[0090] 5. UrlImageLayer
[0091] The UrlImage layer service, and the corresponding options configuration example are as follows:
[0092]
[0093]
[0094] 6. ThreeDTiles
[0095] Example of option configuration for 3D data (model / point cloud / BIM, etc.) in 3D Tiles format:
[0096]
[0097] 7. Model
[0098] 3D model files, supporting formats such as glTF and glb. Example of option configuration for the Model type:
[0099]
[0100]
[0101] 8. Tif
[0102] TIFF imagery data with geographic coordinates. Example of option configuration for the TIFF type:
[0103] let opt_tif = {
[0104] url:"tif path", / / required
[0105] nodata:[0,0,0] / / optional, the RGB value corresponding to nodata
[0106] 9. VectorFieldFromImage
[0107] Vector field data in image format. Example of option configuration for the VectorFieldFromImage type:
[0108]
[0109] 10. ScalarFieldFromImage
[0110] Scalar field data in image format. Example of option configuration for the ScalarFieldFromImage type:
[0111]
[0112]
[0113] 11. CloudFieldFromImage
[0114] Cloud image data in image format. Example of option configuration for the CloudFieldFromImage type:
[0115]
[0116] 12. TimeSeries
[0117] Time-series data in KML format. Example of option configuration for the TimeSeries type:
[0118]
[0119]
[0120] 13. Component
[0121] Loading data via components requires pre-defining the component's configuration in the system configuration file and placing the component ID in the option configuration. Example of option configuration for the Component type:
[0122] let opt_component = {
[0123] "id":"OAP_HuaiAn" / / Component ID in the system configuration file
[0124] }
[0125] Commonly used data in the network digital earth system are classified into the above 13 default data types, and corresponding default data plugins can be designed for the default data types.
[0126] S103: Write a default data plugin for the default data type according to the pre-defined data plugin writing specifications.
[0127] In this embodiment of the application, according to the pre-defined data plugin writing specifications, a corresponding default data plugin is written for each default data type. By designing 13 default data plugins for loading network digital earth data, the common network digital earth data loading needs can be basically met.
[0128] Preferably, the pre-defined data plugin writing specifications may include: a JavaScript file, which includes: writing plugin functions for the data plugin to be written, thereby obtaining a class. Functions for the data plugin are pre-built; the data plugin to be written is then written as a class based on these functions. In this embodiment, the data plugin is a separate JavaScript file with the .js extension, following ES6 rules. The data plugin is written as a class based on its functions and exported. Multiple classes can be written in the same js file, and multiple classes can be exported simultaneously. However, when uploading the data plugin, the file needs to be uploaded multiple times, and different classes need to be imported separately. The core part of writing the data plugin lies in the function constructor, get method, and remove method. The constructor includes passing in the viewer and layer parameters, i.e.:
[0129] constructor(viewer, options){
[0130] }
[0131] The `viewer` parameter is used for loading and removing data within the plugin, while `options` contains various configuration settings for data retrieval. When configuring layers using this plugin, the `options` parameter in the layer configuration corresponds to this parameter. The `get` method can return layer objects, which are used by the layer management module to retrieve and manage layer objects, such as visibility and opacity. The `remove` method removes layers.
[0132] S104: Determine the custom data type based on the user data.
[0133] In this embodiment of the application, in addition to the 13 default data types obtained from the above-mentioned common data classification, there are other types of data, namely custom data types determined according to user data.
[0134] S105: Write a custom data plugin for the custom data type according to the pre-defined data plugin writing specifications.
[0135] In this embodiment, when writing a custom data plugin for a custom data type, the pre-defined data plugin writing specifications may include optional attributes, including `params` and `supportFlyTo`. The optional attributes are determined based on the specific data category, primarily depending on the user-defined data type. The configuration items for the 13 default data types listed in Table 1 do not include the `params` and `supportFlyTo` attributes. Users can use these two attributes as needed when writing their own custom data plugins according to the data plugin writing rules.
[0136] The `params` property is a static attribute. It automatically generates a parameter selection interface based on the parameters specified in the `params` property and sets the layer's attributes according to the user's input. If the `params` property is not specified, it defaults to `undefined`. `params` is an array that can contain one or more elements, each with four attributes: `name`, `title`, `type`, and `value`. An example of `params` is shown below:
[0137]
[0138] The four properties of params are explained in detail in the table below, as shown in Table 2.
[0139]
[0140]
[0141] Table 2 Attributes of parameter elements inside params
[0142] In this embodiment, the six parameter element types are further described in detail in the form of a table, as shown in Table 3.
[0143]
[0144]
[0145] Table 3. Params Parameter Element Types
[0146] In this embodiment, `supportFlyTo` is a static property and should be used with caution. It defines whether the layers in the data plugin support the viewer's `flyTo()` method. When the layer's destination parameter is not defined, it determines whether the viewer can automatically locate the layer. The default value for `supportFlyTo` is `undefined` if it is not specified.
[0147] S106: Upload the default data plugin and the custom data plugin to the server so that the server adds the default data plugin and the custom data plugin to the data plugin list.
[0148] In this embodiment of the application, after writing corresponding default data plugins and custom data plugins for 13 default data types and custom data types according to the data plugin writing rules, the default data plugins and custom data plugins are added to the data plugin list on the server side. The TMS Layer data plugin is used as an example as follows:
[0149]
[0150] This application provides data plugin writing specifications and an upload mechanism to meet the needs of plug-in-based dynamic data loading and custom data type extension. A default data plugin is written for each default data type and uploaded to the server as the default supported data type. Simultaneously, users can also write custom data plugins for custom data types according to their own needs, following the data plugin writing specifications, and upload them to the server to meet the needs of user-defined data type extensions and their loading and visualization in the online digital earth. For example, if a user wants to read their own Excel file, they can write a plugin called MyExcelReader.js to read their file, specifically as follows:
[0151]
[0152]
[0153] For example, if a user defines a custom AQI data loading method, a plugin called AQIHeatMap.js can be written to read AQI data based on a user-defined time and support automatic scaling to that layer. Specifically:
[0154]
[0155]
[0156] As illustrated by the foregoing embodiments, this application discloses a plug-in-based method for loading web digital earth data. The method is applied to a browser and includes: acquiring web digital earth data and user data; classifying the web digital earth data to obtain default data types; writing default data plugins for the default data types according to pre-defined data plugin writing specifications; determining custom data types based on the user data; writing custom data plugins for the custom data types according to the pre-defined data plugin writing specifications; and uploading the default data plugins and custom data plugins to a server, so that the server adds the default data plugins and custom data plugins to a data plugin list. This application classifies common web digital earth data and obtains the data types corresponding to user data. It writes data plugins corresponding to the data types based on data plugin writing specifications. Using a data plugin mechanism to dynamically load data in the web digital earth system can meet the needs of users for custom data plugins, improving the flexibility and breadth of data loading methods.
[0157] Optionally, in another embodiment of this application, the method further includes steps S107 to S108:
[0158] S107: Based on the pre-defined data layer configuration specifications, edit the layer configuration information of the default data plugin and the layer configuration information of the custom data plugin to generate a data layer.
[0159] In this embodiment, a data layer configuration specification based on data plugins is established. Users can upload their own data to the server according to this specification (both default and user-defined data types are acceptable), thereby achieving dynamic loading of plugin-based data layers. Based on the layer configuration specification, the layer configuration information of the data plugins is edited. Data plugins can include default data plugins and custom data plugins. The resulting data layers include a default layer generated by editing the layer configuration information of the default data plugin and a custom layer generated by editing the layer configuration information of the custom data plugin.
[0160] A complete layer configuration can include eight pieces of information: title, type, options, thumbnail, description, tags, legend, and destination. The information of the layer configuration is described in a table, see Table 4 for details.
[0161]
[0162]
[0163] Table 4 Layer Information Configuration Instructions
[0164] The following details the configuration rules for legend and destination:
[0165] 1. Legend configuration rules
[0166] This application supports two legend configuration methods: ImageLegend and ColorBar. The detailed configuration methods for these two legend configuration methods are shown below, see Tables 5 and 6.
[0167] Configuration items type illustrate Example href sting Image URL height number Legend Height width number Legend width force Boolean
[0168] Table 5. ImageLegend Configuration Instructions
[0169] Configuration items type illustrate Example Type sting Type (ColorBar) Colors string Interpolated color #040ED8,#2050FF Title string header Global surface temperature Max number Maximum value 10 Min number Minimum value 0 Unit string unit ℃ Height number high 300 Width number width 150
[0170] Table 6. Configuration Instructions for the Fixed ColorBar
[0171] 2. Destination configuration rules
[0172] Destination can quickly locate the layer. Some layer types natively support location, while others require configuring destination to achieve fast location.
[0173] There are two positioning methods: rectangle and position. Both can be combined with orientation (heading, pitch, roll) to control the angle, specifically:
[0174] rectangle:[west,south,east,north]
[0175] position:[lon,lat,alt]
[0176] S108: Upload the data layer to the server so that the server adds the data layer to the layer list.
[0177] In this embodiment, the server stores not only a list of data plugins but also a list of layers. During data loading, the data layers are the primary objects of user interaction. The user reads the layer list stored on the server, and when the user needs to view a specific layer, the corresponding data plugin is used to read and load that layer based on its type.
[0178] In another embodiment of this application, the general flow of a plug-in-based network digital earth data loading method is disclosed, see [link to relevant documentation]. Figure 2The plug-in-based network digital earth data loading method workflow includes a server-side, a browser-side, and a user-side. The server-side stores the entire layer list and data plugin list, including 13 default data plugins and user-defined custom data plugins. The browser-side is the network digital earth runtime environment, supporting users in viewing the layer list, loading data, uploading their own data layers, and writing and uploading their own data plugins, fulfilling user needs for custom plugins, layer uploads, and layer loading. When a user needs to load a layer, the layer loading workflow is executed; see [link to documentation]. Figure 3 The layer loading workflow includes the following steps S201 to S205:
[0179] S201: When a user sends a request to load layers, obtain the layer list from the server.
[0180] In this embodiment of the application, when a user sends a request to load a layer, a layer list is obtained from the server. When the user triggers a layer loading request, the request contains the layers that the user needs to view. Based on the layers displayed in the obtained layer list, it can be determined whether the layer to be loaded exists in the layer list.
[0181] In one possible implementation, a user's request to view a layer list can be received, and the layer list can be obtained from the server based on the request. The user can directly select the layer to be loaded from the layer list, and in response to the user's selection of the layer to be loaded, the step of determining the data type of the layer to be loaded is performed.
[0182] S202: Determine whether there is a layer to be loaded in the layer list that corresponds to the layer loading request.
[0183] The obtained layer list is a list of currently existing data layers. It is then determined whether the layer to be loaded by the user exists in this list. In one possible implementation, the data layer has a unique identifier, which is used to determine whether the layer to be loaded exists in the layer list. This embodiment does not specifically limit the determination process; it can be selected according to actual needs.
[0184] S203: If there is a layer to be loaded in the layer list that corresponds to the layer loading request, then determine the data type of the layer to be loaded.
[0185] In this embodiment of the application, if there is a layer to be loaded in the layer list that corresponds to the layer loading request, then the data type of the layer to be loaded is determined.
[0186] If the layer to be loaded does not exist in the layer list corresponding to the layer loading request, then the layer needs to be uploaded. The workflow for uploading layers is as follows: Figure 4 Specifically, the process involves: obtaining the target user data corresponding to the layer loading request; determining the target custom data type corresponding to the target user data; determining whether a second data plugin corresponding to the target custom data type exists in the server-side data plugin list; if a second data plugin corresponding to the target custom data type exists in the server-side data plugin list, then editing the layer configuration information of the second data plugin according to the pre-defined data layer configuration specifications to generate a target data layer; previewing the target data layer, and then uploading the target data layer to the server so that the server adds the target data layer to the layer list.
[0187] If no second data plugin corresponding to the target custom data type exists in the data plugin list, a custom data plugin needs to be created. The workflow for creating a custom data plugin is described below. Figure 5 Specifically, the process involves: writing a target custom data plugin for the target custom data type according to the pre-defined data plugin writing specifications; if the target custom data plugin does not exist in the data plugin list, the target custom data plugin will be successfully uploaded to the server, so that the server will add the target custom data plugin to the data plugin list; if the target custom data plugin exists in the data plugin list, the upload will fail.
[0188] S204: Based on the data type of the layer to be loaded, obtain the first data plugin corresponding to the data type of the layer to be loaded from the data plugin list on the server side.
[0189] In this embodiment, if a layer to be loaded exists in the layer list, the data type of the layer to be loaded is determined, and the first data plugin corresponding to the data type can be obtained based on the data type. When writing the data plugin, the plugin is first written according to the data type, and then a corresponding data layer is configured for each data plugin. That is, there is a correspondence between the data type, the data plugin, and the data layer. The first data plugin used to load the layer to be loaded can be obtained based on this correspondence. The first data plugin can be obtained by dynamically loading the data plugin onto the browser.
[0190] It should be noted that the embodiments of this application do not limit the order of the data upload plugin process, the layer information editing process, and the layer information loading process; these processes can be executed simultaneously. In the case of parallel operation, the data upload plugin process, the layer information editing process, and the layer information loading process are executed independently of each other. The above description only illustrates a possible situation during the layer information loading process.
[0191] In one possible implementation, users can directly write the required data plugins and then upload the corresponding layer configuration information to the data plugins according to predefined data layer configuration specifications. If a pre-written data plugin already exists, the corresponding layer configuration information can be uploaded to the data plugin according to predefined data layer configuration specifications. If layer information for a pre-written data plugin already exists, the user can directly load that layer information using the data plugin. This application does not limit the specific execution flow in its embodiments.
[0192] S205: Use the first data plugin to load the data corresponding to the layer to be loaded.
[0193] In this embodiment, by classifying data in the Network Digital Earth, establishing data plugin specifications and data layer configuration specifications, and designing a data loading method and process based on data plugins, layers are loaded using data plugins corresponding to data types. This fills the gap in the Network Digital Earth system for dynamically loading data using a plugin mechanism, making data loading in the Network Digital Earth system more flexible and supporting a wider range of data types. While achieving plug-in-based dynamic data loading, it can also meet the needs of user-defined data type expansion and its loading and visualization in the Network Digital Earth, making data loading in the Network Digital Earth system more flexible, supporting a wider range of data types, and making it more convenient for users to load their own data using the Network Digital Earth system.
[0194] The foregoing embodiments of this application provide a plug-in-based network digital earth data loading method based on the above description. Next, a plug-in-based network digital earth data loading device is also provided in the embodiments of this application, which performs the aforementioned... Figure 1 The method shown below will be followed by a description of the function of the plug-in network digital earth data loading device. The structural block diagram of the plug-in network digital earth data loading device is shown below. Figure 6 As shown, it includes:
[0195] Module 601 is used to acquire network digital earth data and user data;
[0196] The classification module 602 is used to classify the network digital earth data to obtain a default data type;
[0197] The first writing module 603 is used to write a default data plugin for the default data type according to a predefined data plugin writing specification.
[0198] The determination module 604 is used to determine the custom data type based on the user data;
[0199] The second writing module 605 is used to write custom data plugins for the custom data type according to the pre-defined data plugin writing specifications.
[0200] The first upload module 606 is used to upload the default data plugin and the custom data plugin to the server, so that the server adds the default data plugin and the custom data plugin to the data plugin list.
[0201] Preferably, the device further includes:
[0202] The editing and layer generation module is used to edit the layer configuration information of the default data plugin and the layer configuration information of the custom data plugin according to the predefined data layer configuration specifications, and generate data layers.
[0203] The second upload module is used to upload the data layer to the server so that the server can add the data layer to the layer list.
[0204] Preferably, the device further includes:
[0205] The layer list retrieval module is used to retrieve the layer list from the server when a user sends a request to load layers.
[0206] The judgment module is used to determine whether there is a layer to be loaded in the layer list that corresponds to the layer loading request;
[0207] The data type determination module is used to determine the data type of the layer to be loaded if there is a layer to be loaded in the layer list that corresponds to the layer loading request.
[0208] The data plugin acquisition module is used to obtain the corresponding first data plugin from the data plugin list on the server side according to the data type of the layer to be loaded;
[0209] The loading module is used to load the data corresponding to the layer to be loaded using the first data plugin.
[0210] This application discloses a plug-in-type network digital earth data loading device, comprising: an acquisition module, a classification module, a first writing module, a determination module, a second writing module, and a first upload module. The acquisition module acquires network digital earth data and user data; the classification module classifies the network digital earth data to obtain default data types; the first writing module writes default data plugins for the default data types according to pre-defined data plugin writing specifications; the determination module determines custom data types based on the user data; the second writing module writes custom data plugins for the custom data types according to the pre-defined data plugin writing specifications; and the first upload module uploads the default data plugins and the custom data plugins to a server, so that the server adds the default data plugins and the custom data plugins to a data plugin list. This application classifies common network digital earth data and acquires the corresponding data types for user data, writes data plugins corresponding to data types based on data plugin writing specifications, and uses a data plugin mechanism to dynamically load data in the network digital earth system, which can meet the needs of users to customize data plugins and improve the flexibility and breadth of data loading methods.
[0211] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0212] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0213] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0214] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A plug-in type network digital earth data loading method, characterized in that, The method is applied to a browser end, and the method comprises: obtaining network digital earth data and user data; classifying the network digital earth data to obtain a default data type; writing a default data plug-in for the default data type according to a pre-prepared data plug-in writing specification; determining a custom data type according to the user data; writing a custom data plug-in for the custom data type according to the pre-prepared data plug-in writing specification; uploading the default data plug-in and the custom data plug-in to a server end, so that the server end adds the default data plug-in and the custom data plug-in to a data plug-in list; the method further comprises: editing layer configuration information of the default data plug-in and layer configuration information of the custom data plug-in according to a pre-prepared data layer configuration specification, to generate a data layer; uploading the data layer to the server end, so that the server end adds the data layer to a layer list.
2. The method of claim 1, wherein, The default data type comprises at least one of the following: a tile map service (TMS) layer, a web map tile service (WMTS) layer, a web map service (WMS) layer, an ArcGIS layer service (ArcGISLayer), a uniform resource identifier (URI) picture form layer service (UrlImageLayer), three-dimensional (3D) data in a 3D Tiles format (ThreeDTiles), a 3D model file (Model), Tif image data with geographic coordinates (TIF), a picture format vector field data (VectorFieldFromImage), a picture format scalar field data (ScalarFieldFromImage), a picture format cloud field data (CloudFieldFromImage), time series data (TimeSeries), and a network digital earth system component (Component).
3. The method of claim 1, wherein, The method further comprises: when a user sends a layer loading request, obtaining a layer list from the server end; determining whether there is a to-be-loaded layer corresponding to the layer loading request in the layer list; if there is a to-be-loaded layer corresponding to the layer loading request in the layer list, determining a data type of the to-be-loaded layer; according to the data type of the to-be-loaded layer, obtaining a first data plug-in corresponding to the data type of the to-be-loaded layer from a data plug-in list of the server end; loading data corresponding to the to-be-loaded layer by using the first data plug-in.
4. The method of claim 3, wherein, The method further comprises: if there is no to-be-loaded layer corresponding to the layer loading request in the layer list, obtaining target user data corresponding to the layer loading request; determining a target custom data type corresponding to the target user data; determining whether there is a second data plug-in corresponding to the target custom data type in a data plug-in list of the server end; If the second data plug-in corresponding to the target custom data type exists in the server-side data plug-in list, edit layer configuration information of the second data plug-in according to the pre-prepared data layer configuration specification, and generate a target data layer; Upload the target data layer to the server side, so that the server side adds the target data layer to a layer list.
5. The method of claim 4, wherein, The method further comprises: If the second data plug-in corresponding to the target custom data type does not exist in the data plug-in list, write a target custom data plug-in for the target custom data type according to the pre-prepared data plug-in writing specification; Upload the target custom data plug-in to the server side, so that the server side adds the target custom data plug-in to the data plug-in list.
6. The method of claim 1, wherein, The pre-prepared data plug-in writing specification specifically comprises a JavaScript file, and the JavaScript file comprises plug-in writing of a function of a data plug-in to be written, thereby obtaining a class.
7. A plug-in network digital earth data loading device, characterized in that, Comprise: An acquisition module is configured to acquire network digital earth data and user data; A classification module is configured to classify the network digital earth data to obtain a default data type; A first writing module is configured to write a default data plug-in for the default data type according to a pre-prepared data plug-in writing specification; A determination module is configured to determine a custom data type according to the user data; A second writing module is configured to write a custom data plug-in for the custom data type according to the pre-prepared data plug-in writing specification; A first uploading module is configured to upload the default data plug-in and the custom data plug-in to a server side, so that the server side adds the default data plug-in and the custom data plug-in to a data plug-in list; The device further comprises: An editing and layer generation module is configured to edit layer configuration information of the default data plug-in and layer configuration information of the custom data plug-in according to a pre-prepared data layer configuration specification, and generate a data layer; A second uploading module is configured to upload the data layer to the server side, so that the server side adds the data layer to a layer list.
8. The apparatus of claim 7, wherein, The device further comprises: A layer list acquisition module is configured to acquire a layer list from the server side when receiving a layer loading request sent by a user; A judgment module is configured to judge whether a to-be-loaded layer corresponding to the layer loading request exists in the layer list; A data type determination module is configured to determine a data type of the to-be-loaded layer if the to-be-loaded layer corresponding to the layer loading request exists in the layer list; A data plug-in acquisition module is configured to acquire a corresponding first data plug-in from a data plug-in list of the server side according to the data type of the to-be-loaded layer; A loading module is configured to load data corresponding to the to-be-loaded layer by using the first data plug-in.
Citation Information
Patent Citations
Automatic component classification method
CN101446903A
Method and device for converting client application software into webpage software
CN106445530A