CN117421283A - Layer publishing method, device, equipment and storage medium - Google Patents

Layer publishing method, device, equipment and storage medium Download PDF

Info

Publication number
CN117421283A
CN117421283A CN202311444302.3A CN202311444302A CN117421283A CN 117421283 A CN117421283 A CN 117421283A CN 202311444302 A CN202311444302 A CN 202311444302A CN 117421283 A CN117421283 A CN 117421283A
Authority
CN
China
Prior art keywords
file
layer
geoserver
target level
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311444302.3A
Other languages
Chinese (zh)
Inventor
周大创
李鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Hede Aerospace Technology Co ltd
Original Assignee
Beijing Hede Aerospace Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Hede Aerospace Technology Co ltd filed Critical Beijing Hede Aerospace Technology Co ltd
Priority to CN202311444302.3A priority Critical patent/CN117421283A/en
Publication of CN117421283A publication Critical patent/CN117421283A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Abstract

The invention discloses a layer publishing method, device, equipment and storage medium. The method comprises the following steps: deriving a target level file in a geographic database, wherein the target level file carries a target identifier; the target level file is sent to a GeoServer corresponding to the target identifier; acquiring a first configuration file corresponding to the target level file; releasing a layer corresponding to the target level file according to a first configuration file, wherein the first configuration file comprises: workspace names, storage names, target hierarchy file full path, layer names, and style names. According to the technical scheme, batch release of national forestry class data is realized, the safety risk of exposing ports to the outside of the platform is avoided, a large number of repeated page operations taking counties as units in the country are omitted, the online time of the platform is greatly shortened, and the release efficiency is improved.

Description

Layer publishing method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computer information processing, in particular to a layer publishing method, device, equipment and storage medium.
Background
At present, a refined management platform for pine wood nematode disease, which is built by the national forestry bureau, needs to release and manage nine tens of millions of forestry class data on one map of the national forestry, and generally uses a java-based and open-source GeoServer (System software for rapidly sharing space and geographic information) which complies with the open standard of the open geographic space information alliance (Open Geospatial Consortium, OGC) as a map server. According to project hardware planning, four independent servers are used for deployment of the GeoServer.
The prior art can issue map resources through a web management page of a GeoServer, but the following problems may exist: 1. the construction of the fine management platform for the pine wood nematode disease has higher safety requirement, and the GeoServer internal management port which is irrelevant to platform business is inconvenient to be released outwards, so that the GeoServer management page cannot be remotely accessed to carry out small-class data deployment; 2. the provincial level and county small shifts are not uniform in quantity, and if the provincial level original gdbtable file is too large, the provincial level and county small shifts cannot be directly issued, and the provincial level and county small shifts are required to be issued. Manual distribution to GeoServer will result in huge work on the distribution layer.
Disclosure of Invention
The embodiment of the invention provides a layer publishing method, device, equipment and storage medium, which are used for realizing batch publishing of national forestry class data, avoiding the safety risk of externally exposed ports of a platform, omitting a large number of repeated page operations taking counties as units in most countries, greatly shortening the online time of the platform and improving the publishing efficiency.
In a first aspect, an embodiment of the present invention provides a layer publishing method, including:
exporting a target level file in a geographic database, wherein the target level file carries a target identifier;
the target level file is sent to a GeoServer corresponding to the target identifier;
acquiring a first configuration file corresponding to the target level file;
releasing a layer corresponding to the target level file according to a first configuration file, wherein the first configuration file comprises: workspace names, storage names, target hierarchy file full path, layer names, and style names.
Optionally, issuing the layer corresponding to the target level file according to the first configuration file includes:
creating a workspace according to the workspace name;
creating a data storage according to the storage name and the full path of the target level file;
determining a release style according to the style name;
and if the layer corresponding to the layer name does not exist in the working space, releasing the layer corresponding to the target level file according to the working space, the data storage and the release style.
Optionally, after publishing the layer corresponding to the target level file according to the first configuration file, the method further includes:
obtaining a second configuration file, wherein the second configuration file comprises: geoServer address, initial element mark, element length, geoServer port, layer name, configuration information of service database and table name;
calling WFS service according to the GeoServer address, geoServer port, layer name, initial element mark and element length to obtain data to be extracted;
and inserting the data to be extracted into a table corresponding to the table name in the service database according to the configuration information and the table name of the service database.
Optionally, the sending the target level file to the GeoServer corresponding to the target identifier includes:
converting the target level file into a shapefile format target level file;
and sending the target level file in the shapefile format to the GeoServer corresponding to the target identifier.
Optionally, after generating the release layer corresponding to the target level file according to the first configuration file and the target level file, the method further includes:
receiving a data extraction request sent by a first GeoServer, wherein the data extraction request comprises: a first GeoServer address, a first GeoServer port, a layer name, a starting element mark and an element length;
updating the second configuration file according to the first GeoServer address, the first GeoServer port, the layer name, the initial element mark and the element length;
calling WFS service according to the first GeoServer address, the first GeoServer port, the layer name, the initial element mark and the element length to obtain data to be extracted;
and inserting the data to be extracted into a table corresponding to the table name in the service database according to the configuration information and the table name of the service database.
Optionally, the target identifier is a province identifier.
In a second aspect, an embodiment of the present invention provides a layer publishing device, including:
the export module is used for exporting a target level file in the geographic database, wherein the target level file carries a target identifier;
the sending module is used for sending the target level file to the GeoServer corresponding to the target identifier;
the first acquisition module is used for acquiring a first configuration file corresponding to the target level file;
the publishing module is used for publishing the layer corresponding to the target level file according to a first configuration file, wherein the first configuration file comprises: workspace names, storage names, target hierarchy file full path, layer names, and style names.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the layer publishing method of any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, where computer instructions are stored, where the computer instructions are configured to cause a processor to implement a layer publishing method according to any embodiment of the present invention.
The embodiment of the invention derives the target level file in the geographic database, wherein the target level file carries the target mark; the target level file is sent to a GeoServer corresponding to the target identifier; acquiring a first configuration file corresponding to the target level file; releasing a layer corresponding to the target level file according to a first configuration file, wherein the first configuration file comprises: the method solves the problem of huge workload of issuing layout layers caused by manual issuing to a GeoServer in the prior art, realizes batch issuing of national forestry class data, avoids the safety risk of exposing ports to the outside of a platform, omits a large number of repeated page operations taking counties as units in the country, greatly shortens the online time of the platform, and improves the issuing efficiency.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a layer publishing method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a layer publishing method according to a second embodiment of the present invention;
figure 3 is a flowchart of a program for automatically publishing forestry class data according to a second embodiment of the present invention;
fig. 4 is a flowchart of a batch extraction and storage program for basic element data of a class according to a second embodiment of the present invention;
FIG. 5 is a flowchart of overall processing of layer publishing according to a second embodiment of the present invention;
fig. 6 is a schematic structural diagram of a layer publishing device according to a third embodiment of the present invention;
fig. 7 shows a schematic diagram of an electronic device that may be used to implement an embodiment of the invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
Example 1
Fig. 1 is a flowchart of a layer publishing method provided in a first embodiment of the present invention, where the embodiment is applicable to a situation of performing data publishing of a national forestry class, the method may be performed by a layer publishing device in the embodiment of the present invention, and the device may be implemented in a software and/or hardware manner, as shown in fig. 1, and the method specifically includes the following steps:
s110, a target level file in a geographic database is exported, wherein the target level file carries a target identifier.
The geographic database can refer to a file geographic database of forestry classes in each province; the target level file may refer to a file corresponding to GeoServer that is derived from a geographic database; the target identifier may refer to an identifier that can correspond to a GeoServer. Specifically, a plurality of forestry class data of each province stored in a form of a table are stored in a geographic database, and a user can sequentially export a plurality of table files; wherein, the table contains an attribute column which can include province, city and county; the export can be performed according to province first, but due to the limitation of file size, the export can be performed according to city and the export can be performed according to county.
In this embodiment, the user may open the file geographic database of the forestry classes of each province through ArcGis software, may export according to province, may not export according to city, may not export according to county, and may export the target level file for subsequent processing; the export target level file carries a province identifier of a province.
And S120, the target level file is sent to the GeoServer corresponding to the target identifier.
The GeoServers may be divided according to provinces, and different provinces of shift data may be respectively published on different GeoServers, and in addition, the number of GeoServers may be manually set, for example, 4 GeoServers may be manually planned, and corresponding provinces of shift data may be respectively published on 4 GeoServers.
In this embodiment, the target hierarchy file may be sent to a GeoServer corresponding to the target identifier according to the target identifier carried by the target hierarchy file.
S130, acquiring a first configuration file corresponding to the target level file.
The first configuration file may include a plurality of program parameters for modification before the program is executed, and the program may be a program capable of automatically publishing national forestry class data. Specifically, the program for writing and automatically publishing national forestry class data may include: the maven project of java is established, a GeoServer-Manager component is imported, and the storage, the layer and the style of forestry class data shp files in urban areas of various provinces are released by utilizing the package of the component pair GeoServer RestAPI.
In this embodiment, the program parameters of the program for automatically publishing the national forestry class data may be stored in the first configuration file for modification before the program is executed.
S140, releasing a layer corresponding to the target level file according to a first configuration file, wherein the first configuration file comprises: workspace names, storage names, target hierarchy file full path, layer names, and style names.
Wherein, the layer can be a film containing text or graphics and other elements; the workspace name may be understood as the name of the folder; the storage name may be understood as the name of the subfolder under the folder; the full path of the target level file may refer to the logical position of the file or folder in the hard disk, and includes the file name of the target level file; the style name may refer to the name of the release style. Layer names may refer to the names of layers.
In this embodiment, the target level files of the derived forestry teams in different provinces and counties are uploaded to the corresponding geoservers, programs for automatically publishing national forestry teams data are respectively deployed on the corresponding geoservers, and scripts for starting the programs are written; and modifying parameters on the corresponding GeoServer according to the first configuration file, then executing a script starting program, and automatically publishing national forestry class data to the GeoServer server.
According to the technical scheme, the target level file in the geographic database is exported, wherein the target level file carries the target identifier; the target level file is sent to a GeoServer corresponding to the target identifier; acquiring a first configuration file corresponding to the target level file; releasing a layer corresponding to the target level file according to a first configuration file, wherein the first configuration file comprises: the method solves the problem of huge workload of issuing layout layers caused by manual issuing to a GeoServer in the prior art, realizes batch issuing of national forestry class data, avoids the safety risk of exposing ports to the outside of a platform, omits a large number of repeated page operations taking counties as units in the country, greatly shortens the online time of the platform, and improves the issuing efficiency.
Optionally, the sending the target level file to the GeoServer corresponding to the target identifier includes:
converting the target level file into a shapefile format target level file;
and sending the target level file in the shapefile format to the GeoServer corresponding to the target identifier.
The shapefile format may refer to a format of a non-topological entity vector data structure describing geometric and attribute features of spatial data, among other things.
In this embodiment, the target hierarchy file may be converted into a shapefile format target hierarchy file; and then, the target level file in the shapefile format is sent to the GeoServer corresponding to the target identifier, so that the format conversion is simpler and more convenient, and the efficiency of completing the release of the national forestry class data is further improved.
Optionally, the target level identifier is a provincial identifier.
Wherein, the province mark can refer to the mark corresponding to each province,
in this embodiment, the target level file may be sent to the GeoServer corresponding to the provincial identifier according to the provincial identifier carried by the target level file, so as to ensure accurate publishing of national forestry class data.
Example two
Fig. 2 is a flowchart of a layer publishing method according to a second embodiment of the present invention, where the technical solution of this embodiment is further refined on the basis of the foregoing embodiment. As shown in fig. 2, the method includes:
s210, a target level file in a geographic database is exported, wherein the target level file carries a target level identifier.
And S220, sending the target level file to the GeoServer corresponding to the target level identifier.
S230, acquiring a first configuration file corresponding to the target level file, wherein the first configuration file comprises: workspace names, storage names, target hierarchy file full path, layer names, and style names.
S240, creating a working space according to the name of the working space.
In this embodiment, fig. 3 is a flowchart of a procedure for automatically publishing forestry class data provided in the second embodiment of the present invention, as shown in fig. 3, after a first configuration file is read, it is required to determine whether there is any shape to be published (i.e. a shape-formatted target level file), if not, it is directly ended; if so, searching and judging whether a working space exists, if so, creating no more, and carrying out next step of judging data storage; if not, a workspace may be created from the name of the GeoServer's workspace in the first configuration file. Specifically, whether the workspace exists or not may be determined according to the name of the workspace.
S250, creating data storage according to the storage name and the full path of the target level file.
Where data storage may refer to a collection of data that is persistently stored and managed by a repository, e.g., may store simple files, etc.
In this embodiment, as shown in fig. 3, after the workspace is created, it is required to determine whether a data store exists, if so, it is no longer created, and then it is determined whether a pattern (layer release pattern) exists; if not, a store is created in the workspace according to the store name and the full path of the target hierarchy file. Specifically, whether the data storage exists or not can be judged according to the storage name.
S260, determining the release style according to the style name.
In this embodiment, as shown in fig. 3, after creating the data storage, it is necessary to determine whether a pattern exists, if so, it is no longer created, and then it is determined whether a layer exists; if not, the layer release style can be determined according to the style name. Specifically, whether a style exists or not may be determined according to the style name.
And S270, if the layer corresponding to the layer name does not exist in the working space, releasing the layer corresponding to the target level file according to the working space, the data storage and the release pattern.
Specifically, as shown in fig. 3, after determining the layer release pattern, whether the layer exists or not needs to be judged, and if so, release is directly performed; if the target hierarchical file does not exist, the layer corresponding to the target hierarchical file can be published according to the working space, the data storage and the publishing style. Specifically, whether the layer exists or not can be judged according to the layer name.
In this embodiment, the workspace may be created according to the name of the workspace of the GeoServer in the first configuration file; creating storage in a working space according to the storage name and the full path of the target level file, and storing the exported target level file into a data storage to obtain a storage path; determining a storage path of the exported target level file in the working space according to the storage name; determining a release style according to the style name; querying a working space according to the layer name; if the corresponding layers do not exist in the working space, the layers corresponding to the target level files are released based on the working space, the data storage path and the release patterns, and release of the national forestry class data is efficiently completed by remote deployment of automatic release programs, modification of program configuration parameters and execution of batch scripts, so that the online time of the platform is greatly shortened, and meanwhile, the safety risk of exposing ports to the outside of the platform is avoided.
Optionally, after publishing the layer corresponding to the target level file according to the first configuration file, the method further includes:
obtaining a second configuration file, wherein the second configuration file comprises: geoServer address, initial element mark, element length, geoServer port, layer name, configuration information of service database and table name;
calling WFS service according to the GeoServer address, geoServer port, layer name, initial element mark and element length to obtain data to be extracted;
and inserting the data to be extracted into a table corresponding to the table name in the service database according to the configuration information and the table name of the service database.
The second configuration file may include a plurality of program parameters for modification before executing the program, where the program may be a program for implementing batch extraction and warehousing of the class basic element data. The GeoServer address may refer to an IP address of the GeoServer; the start element mark may refer to a mark of start element data; the element length may refer to the length of element data; the GeoServer port may refer to a GeoServer management port; the configuration information of the service database may be assigned information of the service database, which is fixed; table names may be understood as being stored in that table of the service database, fixed) corresponding province names; WFS services may refer to Web element services; the data to be extracted can refer to basic element data of a class; specifically, writing the basic element data batch extraction and storage program of the class can comprise the following steps: the batch call GeoServer supports Restful Api provided by Web element service (WebFeatureService, WFS) specification, analyzes returned basic element data of the forestry class in json format and stores the basic element data in a warehouse.
Specifically, fig. 4 is a flowchart of a batch extraction and storage program for basic element data of a class provided in a second embodiment of the present invention, and as shown in fig. 4, a configuration file (a second configuration file) is read, and a GeoServer address, a starting element mark, an element length, a GeoServer port, a layer name, configuration information of a service database, and a table name in the second configuration file are obtained. And a batch extraction and warehousing program is deployed in the GeoServer. The WFS service of the GeoServer can be called in batches according to the GeoServer address, geoServer port, layer name, initial element mark and element length, and the Restful Api provided by the specification; and analyzing the returned forestry class basic element data (data to be extracted) in the json format. And inserting the data to be extracted into a table corresponding to the table name in the service database according to the configuration information and the table name of the service database.
In the embodiment, the warehouse entry operation of the basic element data of the class is efficiently completed by the modes of extracting the warehouse entry program in batches, modifying the program configuration parameters and executing the batch scripts, so that the online time of the platform is greatly shortened, and the deployment efficiency of the platform is improved.
Optionally, after generating the release layer corresponding to the target level file according to the first configuration file and the target level file, the method further includes:
receiving a data extraction request sent by a first GeoServer, wherein the data extraction request comprises: a first GeoServer address, a first GeoServer port, a layer name, a starting element mark and an element length;
updating the second configuration file according to the first GeoServer address, the first GeoServer port, the layer name, the initial element mark and the element length;
calling WFS service according to the first GeoServer address, the first GeoServer port, the layer name, the initial element mark and the element length to obtain data to be extracted;
and inserting the data to be extracted into a table corresponding to the table name in the service database according to the configuration information and the table name of the service database.
The first GeoServer may refer to a GeoServer that is not deployed with a batch extraction and warehousing program.
Specifically, if the batch extraction and storage program is not deployed in the first GeoServer, sending a data extraction request to the GeoServer deployed with the batch extraction and storage program, where the GeoServer deployed with the batch extraction and storage program receives the data extraction request, where the data extraction request includes: a first GeoServer address, a first GeoServer port, a layer name, a starting element mark and an element length; updating the second configuration file according to the first GeoServer address, the first GeoServer port, the layer name, the initial element mark and the element length; according to the first GeoServer address, the first GeoServer port, the layer name, the initial element mark and the element length included in the updated second configuration file, the WFS service of GeoServer is called in batches, and the provided Restful Api is standardized; and analyzing the returned forestry class basic element data (data to be extracted) in the json format. And inserting the data to be extracted into a table corresponding to the table name in the service database according to the configuration information and the table name of the service database.
In this embodiment, if the GeoServer is not deployed with a batch extraction and storage program, the second configuration file is updated by sending a data extraction request, and the data to be extracted is extracted according to the updated configuration file, so that batch extraction and storage operation of the basic element data of the class is ensured, the deployment efficiency of the platform is improved, and meanwhile, the security risk of exposing the port to the outside of the platform is avoided.
Exemplary, fig. 5 is an overall process flow diagram of layer publishing according to the second embodiment of the present invention. As shown in fig. 5, a specific process flow may be:
1. and planning the corresponding relation between the release data (namely forestry class data) of each province and the GeoServer.
2. The ArcGis software is used for opening a file geographic database (namely a geographic database) of forestry classes in each province, and the file is converted and exported into a shapefile format file (namely a target level file in the shapefile format) for subsequent processing according to province, city and district (due to the limitation of file size, the file can be exported according to province, the file cannot be exported according to city, the file cannot be exported according to county of district, and the file name can be named according to administrative codes).
3. The method comprises the following steps of compiling a program for automatically publishing national forestry class data: the maven project of java is established, a GeoServer-Manager component is imported, and the storage, the layer and the style of forestry class data shp files in urban areas of various provinces are released by utilizing the package of the component pair GeoServer RestAPI.
4. Uploading Shapefile of forestry teams in different provinces and counties to corresponding GeoServers according to the planning, respectively deploying programs for automatically publishing national forestry teams data on 4 servers, and writing scripts for starting the programs. And modifying parameters on the 4 servers, then executing a starting script of a program for automatically publishing the national forestry class data, and automatically publishing the national forestry class data to the GeoServer server.
5. Writing forestry class basic element data, extracting and warehousing the forestry class basic element data in batch, calling a Restful Api provided by a GeoServer support WFS (Web element service) specification in batch, analyzing the returned forestry class basic element data in json format, and warehousing the forestry class basic element data.
6. And deploying forestry class basic element data on one GeoServer, extracting and warehousing programs in batches, and writing a script of a starting program. And modifying parameters, then executing a starting script of the forest class basic element data batch extraction and storage program, and carrying out batch extraction and integration of the national forest class basic element data into a service database.
Referring to fig. 5, in this embodiment, by remote deployment, a program for automatically publishing national forestry class data and a program for extracting and warehousing the forestry class basic element data in batches, modifying program configuration parameters, and executing batch scripts, the publishing of the national forestry class data is efficiently completed, and a large number of repeated page operations in county units in most countries are omitted; and the warehousing operation of the basic element data of the forestry class greatly shortens the online time of the platform, improves the deployment efficiency of the platform, and avoids the safety risk of exposing the port to the outside of the platform.
Example III
Fig. 6 is a schematic structural diagram of a layer publishing device according to a third embodiment of the present invention. As shown in fig. 6, the apparatus includes:
an export module 310, configured to export a target hierarchy file in a geographic database, where the target hierarchy file carries a target hierarchy identifier;
a sending module 320, configured to send the target level file to a GeoServer corresponding to the target level identifier;
a first obtaining module 330, configured to obtain a first configuration file corresponding to the target level file;
the publishing module 340 is configured to publish, according to a first configuration file, a layer corresponding to the target level file, where the first configuration file includes: workspace names, storage names, target hierarchy file full path, layer names, and style names.
Optionally, the publishing module 340 is specifically configured to:
creating a workspace according to the workspace name;
creating a data storage according to the storage name and the full path of the target level file;
determining a release style according to the style name;
and if the layer corresponding to the layer name does not exist in the working space, releasing the layer corresponding to the target level file according to the working space, the data storage and the release style.
Optionally, the layer publishing device further includes:
the second obtaining module is configured to obtain a second configuration file, where the second configuration file includes: geoServer address, initial element mark, element length, geoServer port, layer name, configuration information of service database and table name;
the first extraction module is used for calling WFS service according to the GeoServer address, geoServer port, layer name, initial element mark and element length to obtain data to be extracted;
the first inserting module is used for inserting the data to be extracted into a table corresponding to the table name in the service database according to the configuration information and the table name of the service database.
Optionally, the sending module 320 is specifically configured to:
converting the target level file into a shapefile format target level file;
and sending the target level file in the shapefile format to the GeoServer corresponding to the target identifier.
Optionally, the layer publishing device further includes:
the receiving module is configured to receive a data extraction request sent by the first GeoServer, where the data extraction request includes: a first GeoServer address, a first GeoServer port, a layer name, a starting element mark and an element length;
the updating module is used for updating the second configuration file according to the first GeoServer address, the first GeoServer port, the layer name, the initial element mark and the element length;
the second extraction module is used for calling WFS service according to the first GeoServer address, the first GeoServer port, the layer name, the initial element mark and the element length to obtain data to be extracted;
and the second inserting module is used for inserting the data to be extracted into a table corresponding to the table name in the service database according to the configuration information and the table name of the service database.
Optionally, the target identifier is a province identifier.
The layer publishing device provided by the embodiment of the invention can execute the layer publishing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method
Example IV
Fig. 7 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 7, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the layer publishing method.
In some embodiments, the layer publishing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. One or more of the steps of the layer distribution method described above may be performed when the computer program is loaded into RAM 13 and executed by processor 11. Alternatively, in other embodiments, the processor 11 may be configured to perform the layer publishing method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. The layer publishing method is characterized by comprising the following steps of:
deriving a target level file in a geographic database, wherein the target level file carries a target identifier;
the target level file is sent to a GeoServer corresponding to the target identifier;
acquiring a first configuration file corresponding to the target level file;
releasing a layer corresponding to the target level file according to a first configuration file, wherein the first configuration file comprises: workspace names, storage names, target hierarchy file full path, layer names, and style names.
2. The method of claim 1, wherein publishing the layer corresponding to the target level file according to the first configuration file comprises:
creating a workspace according to the workspace name;
creating a data storage according to the storage name and the full path of the target level file;
determining a release style according to the style name;
and if the layer corresponding to the layer name does not exist in the working space, releasing the layer corresponding to the target level file according to the working space, the data storage and the release style.
3. The method of claim 1, further comprising, after publishing the layer corresponding to the target level file according to the first configuration file:
obtaining a second configuration file, wherein the second configuration file comprises: geoServer address, initial element mark, element length, geoServer port, layer name, configuration information of service database and table name;
calling WFS service according to the GeoServer address, geoServer port, layer name, initial element mark and element length to obtain data to be extracted;
and inserting the data to be extracted into a table corresponding to the table name in the service database according to the configuration information and the table name of the service database.
4. The method of claim 1, wherein sending the target hierarchy file to a GeoServer corresponding to the target identifier comprises:
converting the target level file into a shapefile format target level file;
and sending the target level file in the shapefile format to the GeoServer corresponding to the target identifier.
5. The method of claim 1, further comprising, after generating the release layer corresponding to the target hierarchy file from the first configuration file and the target hierarchy file:
receiving a data extraction request sent by a first GeoServer, wherein the data extraction request comprises: a first GeoServer address, a first GeoServer port, a layer name, a starting element mark and an element length;
updating the second configuration file according to the first GeoServer address, the first GeoServer port, the layer name, the initial element mark and the element length;
calling WFS service according to the first GeoServer address, the first GeoServer port, the layer name, the initial element mark and the element length to obtain data to be extracted;
and inserting the data to be extracted into a table corresponding to the table name in the service database according to the configuration information and the table name of the service database.
6. The method of claim 1, wherein the target identifier is a province identifier.
7. A layer issuing device, characterized by comprising:
the export module is used for exporting a target level file in the geographic database, wherein the target level file carries a target identifier;
the sending module is used for sending the target level file to the GeoServer corresponding to the target identifier;
the first acquisition module is used for acquiring a first configuration file corresponding to the target level file;
the publishing module is used for publishing the layer corresponding to the target level file according to a first configuration file, wherein the first configuration file comprises: workspace names, storage names, target hierarchy file full path, layer names, and style names.
8. The device according to claim 7, wherein the issuing module is specifically configured to:
creating a workspace according to the workspace name;
creating a data storage according to the storage name and the full path of the target level file;
determining a release style according to the style name;
and if the layer corresponding to the layer name does not exist in the working space, releasing the layer corresponding to the target level file according to the working space, the data storage and the release style.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the layer publishing method of any of claims 1-6.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the layer distribution method of any one of claims 1-6 when executed.
CN202311444302.3A 2023-11-01 2023-11-01 Layer publishing method, device, equipment and storage medium Pending CN117421283A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311444302.3A CN117421283A (en) 2023-11-01 2023-11-01 Layer publishing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311444302.3A CN117421283A (en) 2023-11-01 2023-11-01 Layer publishing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117421283A true CN117421283A (en) 2024-01-19

Family

ID=89522599

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311444302.3A Pending CN117421283A (en) 2023-11-01 2023-11-01 Layer publishing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117421283A (en)

Similar Documents

Publication Publication Date Title
US10579344B2 (en) Converting visual diagrams into code
CN113778961B (en) Production management method, device and system for CIM model data
CN116992092A (en) Method and device for establishing flow model, storage medium and terminal equipment
CN116451619A (en) Component information processing method, device, medium and equipment
CN116483707A (en) Test method, test device, test apparatus, test program, and test program
CN116185389A (en) Code generation method and device, electronic equipment and medium
CN116303461A (en) Component library creation method and device, electronic equipment and storage medium
CN117421283A (en) Layer publishing method, device, equipment and storage medium
CN112948264A (en) Test task execution method, device, system, storage medium and electronic device
CN115114280A (en) Report generation processing method, device and equipment
CN112540820A (en) User interface updating method and device and electronic equipment
CN110633459A (en) Method and system for automatically generating data report and computer readable storage medium
CN115202538B (en) Menu configuration method and device, electronic equipment and storage medium
CN114650222B (en) Parameter configuration method, device, electronic equipment and storage medium
CN117573561B (en) Automatic test system, method, electronic equipment and storage medium
CN114595231B (en) Database table generation method and device, electronic equipment and storage medium
CN116009847A (en) Code generation method, device, electronic equipment and storage medium
CN115981657A (en) Code generation method and device, electronic equipment and readable medium
CN116400956A (en) Code merging information determining method and device, electronic equipment and storage medium
CN117032756A (en) Software updating method and device, electronic equipment and storage medium
CN116185385A (en) Visual interface management method, system, terminal and storage medium
CN115510838A (en) Template generation method and device, electronic equipment and storage medium
CN117371403A (en) Form component generation method, device, equipment and storage medium
CN117608575A (en) Application development method, system, equipment and storage medium
CN117520092A (en) Log data determining method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination