A GeoServer automatic publishing method based on Kylin operating system
By developing GeoServer automatic release method on Kirin operating system, using multi-layer nested loop control parallel tasks, the efficient automatic release of marine environmental data is achieved, the problems of slow release speed and numerous steps in the existing technology are solved, and the data is improved Release quality and release speed.
Patent Information
- Application Number
- CN202411394034.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-10-08
AI Technical Summary
The existing GeoServer automatic release method has not been verified on the Kirin operating system, and the release process is cumbersome and only semi-automated, which is time-consuming and labor-intensive, making it difficult to process large-scale marine environment data.
A GeoServer automatic publishing method based on Kirin operating system was developed. By writing marine environment data publishing applications, using Eclipse to package it into Jar packages, and controlling parallel tasks through multi-layer nested loops, dynamically adjusting the release batch and parallel number. Implement automated data release.
Improves the efficiency of automatic release of marine environment data, reduces the load on data format conversion and release, realizes the automatic release of layer styles, facilitates the custom writing of different types of data, and solves the problems of slow publishing speed and numerous steps in traditional methods. .
Smart Images

Figure CN118885444B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of map data processing technology, and specifically discloses a GeoServer automatic publishing method based on Kylin operating system. Background Art
[0002] Improving the ability to develop marine resources is of great significance to the development of marine economy and the protection of marine ecological environment. With the increasing development of information technology and marine observation methods, the acquired marine environmental data has grown exponentially. We have ushered in the era of big data for the marine environment. In this era of big data, GeoServer, as one of the current mainstream map servers, fully mines, analyzes and uses marine environmental data by utilizing the characteristics of marine environmental data.
[0003] At present, there are some examples of using GeoServer to complete data publishing and organization management, including:
[0004] (1) Automatic publishing of vector map services based on GeoServer REST, which uses GeoServer for automatic publishing. The research is mainly based on Windows system. The main method used is: through GeoServer REST service and GeoServer-Manager API to develop data association, new layer, service publishing and other functions, automatically complete the background data connection, layer creation, service publishing and front-end display;
[0005] That is, first complete the configuration of the data source, read the relevant configuration information and service configuration information of the layer to be published through the client, then call the REST map service publishing interface, complete the conversion and protocol request of REST resources, upload the custom SLD style file, realize the map data service publishing, and call the publishing result through the OpenLayers front-end tool library.
[0006] (2) For example, in the patent application with publication number CN117421283A, the main method used is: exporting the target level file carrying the target identifier in the geographic database to the GeoServer corresponding to the target identifier, and obtaining the first configuration file corresponding to the target level file, including the workspace name, storage name, full path of the target level file, layer name and style name, etc., and publishing the layer corresponding to the target level file according to the first configuration file information to realize batch publishing of data.
[0007] The above GeoServer automatic publishing method has the following shortcomings:
[0008] (1) The experimental environment is a single system and is only applicable to the Windows operating system. It is unknown whether it is applicable to the domestic Kylin operating system;
[0009] (2) The process is cumbersome and the publishing process is semi-automatic. GeoServer publishes data layers using the REST interface. It is still necessary to upload a custom SLD style file to complete the publishing process of the map data service. In addition, the exported target level files carrying target identifiers still need to be confirmed, created, and published one by one according to the configuration file.
[0010] Therefore, the present invention provides a GeoServer automatic publishing method based on Kylin operating system to solve the above problems. Summary of the invention
[0011] The purpose of the present invention is to solve the problem that the traditional GeoServer automatic publishing method of data layers is cumbersome and the publishing process can only be semi-automated.
[0012] In order to achieve the above object, the basic scheme of the present invention provides a GeoServer automatic publishing method based on Kylin operating system, comprising the following steps:
[0013] Step A1: Write GeoServer publishing applications for various types of marine environmental data in NetCDF format, obtain automatic publishing codes respectively applied to various types of marine environmental data, and use Eclipse to package each publishing code into a Jar package;
[0014] Step A2: Get the Jar package obtained in step A1, receive the automatic publishing request and analyze and process the automatic publishing request, start an external process by calling the Runtime.getRuntime().exec() method to execute the obtained Jar package execution command, start the publishing application of various types of data, and complete the most basic data publishing task;
[0015] Step A3: Use Eclipse to package the publishing applications of various types of data in step A2 into a Jar package;
[0016] Step A4: Get the output Jar package of step A3, build a program to directly call the output Jar package of step A3, and use the output result of step A3 as input, cyclically execute the Jar package of step A3, and start a process each time to process the output from step A3;
[0017] Step A5: Use Eclipse to package the program in step A4 into a Jar package;
[0018] Step A6: Get the output Jar package of step A5, use the output result of step A5 as input, and use the runCount, batchCount, and eachCount parameters to dynamically adjust the number of parallel releases and release batches of GeoServer. Through multi-layer nested loop control, multiple batches and multiple parallel tasks are processed simultaneously to complete the automatic release task of GeoServer for marine environment data.
[0019] Furthermore, in the process of implementing step A1, the following sub-steps are also included:
[0020] Step A101: Add data storage, organize and store the marine environment data in different newly created folders according to data type and collection time period as source data storage paths;
[0021] Step A102: Configure GeoServer for all source data storage paths respectively;
[0022] Step A103: extracting, analyzing and converting the marine environment data so that a single file data contains only one type and one time attribute information;
[0023] Step A104: pre-define layer style publishing rules, and define corresponding layer styles according to different layers of different types of marine environment data;
[0024] Step A105: pre-define data layer publishing management content;
[0025] Step A106: Call the GeoServer REST map service publishing interface to publish the layer.
[0026] Furthermore, the marine environment data includes: wave height, ocean temperature, seawater salinity, seawater level, seawater flow rate, sea surface wind speed, rainfall, sea surface air temperature and sea surface humidity.
[0027] Furthermore, in the process of implementing step A102, the configuration of GeoServer is to configure GeoServer URL connection information, including configuring GeoServer access address, GeoServer login user name, GeoServer login password and GeoServer data directory.
[0028] Furthermore, in the process of implementing step A103, the received ocean environment data format is converted into a raster data format, and is layered and split according to the time dimension and the depth dimension, so that the obtained single file data only contains attribute information of one type, one time, and one depth.
[0029] Further, in the process of implementing step A105, the following steps are specifically included:
[0030] Create a workspace, connect to GeoServer, initialize and construct raster data storage, create raster data storage, and publish raster data layers.
[0031] The principle and effect of this scheme are:
[0032] 1. Compared with the prior art, the present invention realizes the automatic publishing function of marine environmental data, and solves the problems of time-consuming and labor-intensive publishing of large quantities of marine environmental data, slow response speed, and numerous steps. And because the complexity and dynamicity of marine environmental data present multidimensional characteristics, based on this, the present invention realizes the multidimensional data splitting of marine environmental data, splits the data from three or four dimensions into two-dimensional data, improves the quality of marine environmental data publishing, reduces the overall marine environmental data format conversion and data publishing load, and solves the problem that the traditional GeoServer automatic publishing method of data layers is cumbersome and the publishing process can only achieve semi-automatic.
[0033] 2. Compared with the prior art, the present invention also realizes the automation of layer style publishing. For different types of marine environmental data, corresponding layer styles can be customized and published to GeoServer, which is convenient for data layer publishing and calling. It solves the problem that the traditional GeoServer automatic publishing method of data layers is cumbersome and the publishing process can only be semi-automated.
[0034] 3. Compared with the prior art, the present invention simultaneously realizes the application of GeoServer automatic publishing technology on the Kylin operating system, improves the publishing speed of GeoServer on the Kylin operating system, and enhances the usability and flexibility of the application of GeoServer automatic publishing technology on the Kylin system. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0036] Figure 1 A flowchart of a GeoServer automatic publishing method based on Kylin operating system proposed in an embodiment of the present application is shown;
[0037] Figure 2 The flowchart of publishing various types of marine environment data in step A1 proposed in the embodiment of the present application is shown;
[0038] Figure 3 A schematic diagram showing splitting multidimensional data into two-dimensional data in step A1 proposed in an embodiment of the present application is shown;
[0039] Figure 4 A flowchart of splitting multidimensional data into two-dimensional data in step A1 proposed in an embodiment of the present application is shown;
[0040] Figure 5 The flowchart of automatic publishing of ocean environment data by GeoServer in step A1 proposed in the embodiment of the present application is shown;
[0041] Figure 6 The overall framework diagram of a GeoServer automatic publishing method based on Kylin operating system proposed in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0042] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation mode, structure, characteristics and effects of the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments.
[0043] A GeoServer automatic publishing method based on Kylin operating system, implementing Figure 1 As shown:
[0044] The steps include:
[0045] Step A1: Write GeoServer publishing applications for various types of marine environmental data, obtain automatic publishing codes respectively applied to various types of marine environmental data, and use Eclipse to package each publishing code into a Jar package;
[0046] In this step, the available ocean environment data types include: wave height waveHeight, ocean temperature oceanTemperature, seawater salinity Salinity, seawater level waterLevel, seawater flow rate oceanCurrent, sea surface wind speed Wind, rainfall Precipitation, sea surface airTemperature, and sea surface humidity Humidity.
[0047] Specifically, the following sub-steps are included:
[0048] Step A101: Add data storage and customize data source;
[0049] The acquired marine environment data in NetCDF format of different types are named in a standardized manner according to the data type and collection time period, and the data are organized and stored in different newly created folders according to their data type and collection time period, and the standardized naming is used as the storage path of the source data. A GeoServer data directory is established in the file to store GeoServer published data files.
[0050] Step A102: Configure GeoServer;
[0051] Specifically, it configures the GeoServer URL connection information, including the GeoServer access address, GeoServer login user name, GeoServer login password, and GeoServer data directory.
[0052] Step A103: predefine the rules for extracting, analyzing and processing marine environmental data in NetCDF format;
[0053] It includes the definition of rules for feature extraction, analysis and conversion of marine environmental data for different types of marine environmental data based on the storage characteristics of NetCDF format data.
[0054] Specifically, according to the data sources of marine environmental data: European Center for Medium-Term Weather Forecasts, Copernicus Data Ocean Service, data types: wave height, ocean temperature, seawater salinity, seawater level, seawater flow rate, sea surface wind speed, rainfall, sea surface temperature, sea surface humidity, respectively formulate their data extraction, analysis and processing procedures. Specifically, data extraction and analysis and processing are mainly for the analysis and processing of data in netcdf format. For example: when processing wave height, VHMO in the netcdf file is directly extracted through code. VHMO is a reference name for wave height. And according to the release requirements, the data is converted into raster data format. Specifically, the steps for converting to raster data are as follows:
[0055] Step B1: Read netcdf data and extract data variables;
[0056] Step B2: Obtaining scaling factors of invalid values and valid values of data;
[0057] Step B3: Calculate the corresponding variable value according to longitude and latitude;
[0058] Step B4: define affine transformation parameters;
[0059] Step B5: Set the output raster file name;
[0060] Step B6: Create a dataset and set its configuration information, including geographic transformation and projection, write data to the band, refresh the cache, and release resources and band resources;
[0061] Step B7: Set resampling options and perform image reprojection;
[0062] Step B8: Finally, refresh the cache and release the reprojected dataset resources to complete the writing of the raster dataset.
[0063] Then, based on the characteristics of marine environmental data, the data is split and converted using the idea of hierarchical storage, and split into layers according to the time dimension and depth dimension, so that the resulting single file data only contains one type of attribute information at one time (one depth), which greatly reduces the time for reading and querying raster data and the length of time it takes to publish data.
[0064] Step A104: predefine layer style publishing rules;
[0065] According to the characteristics of the marine environment data in the NetCDF format and in accordance with the SLD standard, a custom layer style program is written. In the present embodiment, the layer style of each type of data is written according to the template provided by the SLD, and then the rendering rules of the corresponding data type are written. In the SLD editing template, the content is defined by filling in the names of different data types and the data rendering colors.
[0066] The corresponding layer styles are defined according to the different layers of different types of marine environment data.
[0067] Step A105: pre-define data layer publishing management content;
[0068] It mainly includes creating a workspace, connecting to GeoServer, initializing and constructing raster data storage, creating raster data storage, and publishing raster data layers;
[0069] Step A106: call the interface and publish the layer;
[0070] By calling the GeoServer REST map service publishing interface, the prerequisite work of layer publishing in the previous step is completed, and management tasks such as parameter configuration and layer configuration are completed, which makes it convenient for users to realize dynamic scheduling of data from the program, and then publish the layer style, thereby completing the publication of marine environment data.
[0071] Step A2: Get the Jar package obtained in step A1, receive the automatic publishing request and analyze and process the automatic publishing request, start an external process by calling the Runtime.getRuntime().exec() method to execute the Jar package execution command of the obtained code request, and start the publishing application of various types of data to complete the most basic data publishing task;
[0072] Specifically, step A2 is mainly responsible for starting the most basic data publishing task. This step is only used to execute the publishing command of each type of marine environmental data once, and starts an external process by calling the Runtime.getRuntime().exec() method to execute the execution command of the specified Jar package in step A1. When step A2 is completed, the main function associated with the program has been completed.
[0073] Step A3: Use Eclipse to package the publishing applications of various types of data in step A2 into a Jar package;
[0074] Step A4: Get the output Jar package of step A3, build a program to directly call the output Jar package of step A3, and use the output result of step A3 as input, execute the Jar package of step A3 cyclically, and start a process each time to process the output from step A3. This step is used to control the number of parallel operations.
[0075] Step A5: Use Eclipse to package the program in step A4 into a Jar package;
[0076] Step A6: Get the output Jar package of step A5, use the output result of step A5 as the input of step A6, dynamically adjust the number of GeoServer parallel publishing and publishing batches with runCount, batchCount, and eachCount parameters, and process multiple batches and multiple parallel tasks at the same time through multi-layer nested loop control to complete the GeoServer publishing task;
[0077] In this embodiment, there should also be a step A7 to check the published marine environment data. Specifically, step A7 is as follows:
[0078] Execute the procedure completed in step A6 to complete the release of marine environmental data, use OpenLayers to view the released marine environmental data layer, and check the released marine environmental data.
[0079] The present invention realizes the automatic publishing function of marine environment data through the GeoServer REST interface, solving the problems of time-consuming and labor-intensive publishing of large quantities of marine environment data, slow response speed, and numerous steps. And because the complexity and dynamics of marine environment data present multidimensional characteristics, based on this, the present invention realizes multidimensional data splitting of marine environment data, splitting the data from three or four dimensions into two-dimensional data, improving the quality of marine environment data publishing, and reducing the overall marine environment data format conversion and data publishing load.
[0080] At the same time, the present invention also realizes the automation of layer style publishing. For different types of marine environmental data, the corresponding layer styles can be customized according to the SLD standard and published to GeoServer, which is convenient for data layer publishing and calling, and solves the problem of slow speed and numerous steps in batch marine environmental data style definition.
[0081] The following is an example of the actual application of the present invention in the KylinOS operating system:
[0082] Step S1: Write GeoServer publishing applications for various types of marine environmental data and arrange GeoServer environment. The present invention is applicable to various types of marine environmental data in NetCDF format. The flow chart is as follows: Figure 2 As shown, it includes the following sub-steps:
[0083] First, customize the data source. Different types of marine environmental data in NetCDF format are named in a standardized manner according to the data type and collection time period, and the data are organized and stored in different newly created folders according to their data type and collection time period.
[0084] The ocean environment data format obtained in this embodiment is NetCDF, and the data types include wave height waveHeight, ocean temperature oceanTemperature, seawater salinity Salinity, seawater level waterLevel, seawater flow rate oceanCurrent, sea surface wind speed Wind, rainfall Precipitation, sea surface temperature airTemperature, and sea surface humidity Humidity. According to the format of waveheight20240801.nc, the ocean environment data of different data types are organized and stored in different newly created folders.
[0085] And create a GeoServer data directory in the newly created file to store GeoServer published data files, and complete the configuration of the GeoServer data directory. The configuration of the GeoServer data directory specifically configures the GeoServer URL connection information, including the GeoServer access address, GeoServer login user name, GeoServer login password, and the configuration of the GeoServer data directory.
[0086] Predefined rules for extracting, analyzing and processing marine environmental data in NetCDF format: According to the storage characteristics of NetCDF format data, different types of marine environmental data are converted into raster data formats, and the data are split and converted using the idea of hierarchical storage, such as Figure 3 As shown, the data can be split from three dimensions or four dimensions and converted into two-dimensional data. In this embodiment, the hierarchical splitting is mainly based on the time dimension and the depth dimension, so that the obtained single file data only contains attribute information of one type and one time (one depth). The flow chart is as follows Figure 4 As shown, it includes the following sub-steps:
[0087] Step D1: First, obtain the source data: the storage path of the marine environment data;
[0088] Step D2: Read the ocean environment data according to the acquired path and extract the data variables;
[0089] In step D2, the extracted data variables include depth-level variables and time-level variables.
[0090] Step D3: Determine whether the depth level is greater than 1 according to the depth level variable in the extracted data variable. When it is equal to 1, directly enter step D4 to determine the time level; when the depth level is greater than 1, split the data according to the depth level and then enter step D4 to determine the time level;
[0091] Step D4: When the time level is equal to 1, directly go to step D5; when the time level is greater than 1, split the data at the time level again, and then go to step D5;
[0092] Step D5: performing feature extraction, specifically, performing feature extraction on the data of a single depth level and a single time level according to the data after the separation of the depth level and the time level;
[0093] Step D6: writing the data after feature extraction into a raster data format file;
[0094] Step D7: Export the written raster data file.
[0095] Predefined layer style publishing rules: According to the characteristics of marine environmental data in NetCDF format and SLD standards, a custom layer style program is written, and corresponding layer styles are defined according to different layers of each type of data.
[0096] Predefined data layer publishing management content: mainly includes creating a workspace, connecting to GeoServer, initializing and constructing raster data storage, creating raster data storage, and publishing raster data layers.
[0097] Call the interface and publish the layer: Call the GeoServer REST map service publishing interface to complete the management settings of the layer publishing in the previous step, complete the management tasks such as parameter configuration and layer configuration, and facilitate users to realize dynamic scheduling of data from the program, publish layer styles, and then complete the publication of marine environment data. The specific steps are as follows: Figure 5 As shown, it includes the following sub-steps:
[0098] Step E1: Connect to GeoServer;
[0099] Specifically: Complete the GeoServer connection according to the GeoServer access address, GeoServer login user name, and GeoServer login password;
[0100] Step E2: Obtain parameter information, i.e., pre-define data layer publishing management content, including the created workspace and created data storage warehouse information;
[0101] Step E3: judging whether the workspace number exists according to the predefined workspace name, if not, creating the workspace and then proceeding to step E4; if it exists, directly proceeding to step E4;
[0102] Step E4: judging whether the storage warehouse number exists according to the predefined storage warehouse name, if not, creating the storage warehouse and then proceeding to step E5; if it exists, directly proceeding to step E5;
[0103] Step E5: Publish the styles of each data type according to the predefined layer style publishing rules;
[0104] Specifically, during the implementation of step E5, it is also necessary to determine whether the publishing style exists. If so, the layer is published. If not, the style is published first and then the layer is published.
[0105] Step E6: when publishing a layer, determine whether the publishing layer exists. If so, proceed to step E7. If not, publish the layer first and then proceed to step E7.
[0106] Step E7: Determine whether the data has been published. If it is determined that the data has not been published, repeat steps E5 to E6 until the publishing is completed. If it is determined that the data has been published, the layer publishing is terminated directly.
[0107] Package into Jar packages through Eclipse: Package the published applications of waveHeight, oceanTemperature, Salinity, waterLevel, oceanCurrent, Wind, Precipitation, airTemperature, and Humidity into Jar packages respectively, and name them according to the data type, such as waveHeight.jar.
[0108] Step S2: Start the most basic data publishing task, that is, start the publishing application for each type of data. Store all published applications in the form of executing Jar package commands: "'java-jar'+jarDir+'waveHeight.jar'+nowDate+''+publishFilePath+''+pathPrefix+''+isStartDate+''+timeInterval+''+url+''+basicDir" in the commandList table, and start an external process by calling the Runtime.getRuntime().exec() method to execute the Jar package execution command specified by nowJar. When the execution is completed, the main function associated with the program has been completed.
[0109] Step S3: Package the publishing applications of various types of data described in step 2 into a Jar, and name it PublishOneJar.
[0110] Step S4: Introduce parallel processing to speed up the data publishing process. Set oneParallerCount to control the number of parallel operations. Step S4 writes a program to directly call the code of step S3, that is, the output result of step S3 is used as the input of step S4. In this step, the Jar package specified by PublishOneJar is executed cyclically, and a process is started each time to process the output from step S3. This parallel processing method effectively utilizes system resources and speeds up the data publishing process.
[0111] Step S5: Package the application described in step S4 into a Jar and name it PublishTwoJar.
[0112] Step S6: Introduce runCount, batchCount, and eachCount parameters to dynamically adjust the number of parallel publications and the batches published by GeoServer. That is, use PublishTwoJar as the input result, and through multi-layer nested loop control, process multiple batches and multiple parallel tasks at the same time, further improving the efficiency of data publishing and parallel processing capabilities.
[0113] This step further optimizes the parallel processing strategy of GeoServer parallel publishing by introducing a more detailed control mechanism to manage the number and batches of publications.
[0114] Step S7: Package the program in step S6 into a Jar package and name it PublishThreeJar, execute PublishThreeJar, complete the release of the marine environment data, and view the published marine environment data layer through OpenLayers to check the published marine environment data.
[0115] Based on the above example steps, the overall framework of a GeoServer automatic publishing method based on Kylin operating system is shown in the figure below: Figure 6 As shown in the figure, the overall framework mainly includes the following:
[0116] It mainly includes three progressive levels, each of which is responsible for different parallel processing and control.
[0117] The first layer is responsible for executing basic data publishing tasks, executing each publishing command only once, and the program ends after the task is completed;
[0118] It includes: passing in parameters, creating a data publishing list when data exists and adding the data to the Roms data directory and the Wrfs data directory, starting a new process after obtaining the program to be executed, and executing the specified program.
[0119] The second layer: speeds up data publishing through parallel processing. The second layer calls the functions of the first layer and uses multiple processes to handle tasks simultaneously, and uses multiple Jar packages to process the output of the first layer, thereby improving efficiency.
[0120] It includes: receiving the first layer of code packaged by Eclipse, obtaining the first layer of code and passing in parameters, publishing one by one according to the time when the data needs to be published when the area exists, and setting the range of single batch publication quantity. When it meets the set range, the process is started and the first layer of program is executed, and the loop is executed until the end; when it exceeds the setting, the publishing command directory is deleted and the system garbage collection command is executed.
[0121] The third layer: further optimize parallel processing, adopt more detailed control to manage release tasks and batches, and process multiple batches and tasks simultaneously through multi-layer loops to improve the efficiency of data release.
[0122] It includes: receiving the second-layer code packaged by Eclipse, getting the second-layer code and passing in parameters to start, creating a data publishing list when the data exists, renaming the Roms data directory and the Wrfs data directory, setting the number of single batch releases, controlling the number of batch processing, and ensuring that the processing does not exceed the list range, starting the process, executing the second-layer program according to the batch, and finally deleting the executed commands, waiting for 120 seconds for garbage collection to end the task.
[0123] The example of the present invention mainly utilizes the GeoServer REST interface to successfully realize the automatic publication of massive marine environmental data, reduces the publishing load by layering and splitting multi-dimensional data, and customizes the layer style to improve the publishing efficiency, overcoming the limitations of traditional and existing methods in processing large quantities of marine environmental data, such as long time consumption, slow response and complicated steps, and solves the problem of slow publishing speed when GeoServer automatically publishes marine environmental data on the Kylin operating system, and optimizes the publishing process, effectively improving the publishing speed of marine environmental data, and enhancing the ease of use and flexibility of GeoServer automatic publishing technology in the Kylin system.
[0124] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A GeoServer automatic publishing method based on Kylin operating system, characterized in that: The steps include: Step A1: Write GeoServer publishing applications for various types of marine environmental data in NetCDF format, obtain automatic publishing codes respectively applied to various types of marine environmental data, and use Eclipse to package each publishing code into a Jar package; Step A2: Get the Jar package obtained in step A1, receive the automatic publishing request and analyze and process the automatic publishing request, start an external process by calling the Runtime.getRuntime().exec() method to execute the obtained Jar package execution command, start the publishing application of various types of data, and complete the most basic data publishing task; Step A3: Use Eclipse to package the publishing applications of various types of data in step A2 into a Jar package; Step A4: Get the output Jar package of step A3, build a program to directly call the output Jar package of step A3, and use the output result of step A3 as input, cyclically execute the Jar package of step A3, and start a process each time to process the output from step A3; Step A5: Use Eclipse to package the program in step A4 into a Jar package; Step A6: Get the output Jar package of step A5, take the output result of step A5 as input, dynamically adjust the number of parallel releases and release batches of GeoServer by using runCount, batchCount, and eachCount parameters, and process multiple batches and multiple parallel tasks at the same time through multi-layer nested loop control to complete the automatic release task of GeoServer for marine environment data; The process of implementing step A1 also includes the following sub-steps: Step A101: Add data storage, organize and store the marine environment data in different newly created folders according to data type and collection time period as source data storage paths; Step A102: Configure GeoServer for all source data storage paths respectively; Step A103: extracting, analyzing and converting the marine environment data so that a single file data contains only one type and one time attribute information; Step A104: pre-define layer style publishing rules, and define corresponding layer styles according to different layers of different types of marine environment data; Step A105: pre-define data layer publishing management content; Step A106: Call the GeoServer REST map service publishing interface to publish the layer; In the process of implementing step A103, the received ocean environment data format is converted into a raster data format, and is layered and split according to the time dimension and the depth dimension, so that the obtained single file data only contains attribute information of one type, one time, and one depth; The process of implementing step A105 specifically includes the following steps: Create a workspace, connect to GeoServer, initialize and construct raster data storage, create raster data storage, and publish raster data layers.
2. According to the GeoServer automatic publishing method based on Kylin operating system according to claim 1, it is characterized in that: The marine environment data include: wave height, ocean temperature, seawater salinity, seawater level, seawater flow rate, sea surface wind speed, rainfall, sea surface air temperature and sea surface humidity.
3. The GeoServer automatic publishing method based on Kylin operating system according to claim 1 is characterized in that: In the process of implementing step A102, the configuration of GeoServer is to configure the GeoServer URL connection information, including configuring the GeoServer access address, GeoServer login user name, GeoServer login password and GeoServer data directory.
Citation Information
Patent Citations
Layer publishing method and device, equipment and storage medium
CN117421283A
Achieving method for automatically publishing road construction quality information map based on GeoServer
CN107480211A
Application program process derivation method and system based on Kylin mobile operating system and medium
CN111414256A
