A method and system for sharing geoscientific data based on kubernetes platform
By building a geoscience algorithm sharing system on the Kubernetes platform, we solve the problem of geoscience data processing algorithm sharing, achieve zero-threshold data preprocessing services, improve algorithm resource quality and service stability, simplify user operations, and reduce costs.
Patent Information
- Application Number
- CN202210742364.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-27
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-06-27
AI Technical Summary
Existing technology makes it difficult to share geoscience data processing algorithms, causing users to continuously learn and adapt to new data and algorithms, increasing usage costs, and affecting the promotion and application of geoscience and remote sensing data.
A geoscience algorithm sharing system is built based on the Kubernetes platform. Through the management page and worker system, the upload, review, packaging, execution and monitoring of algorithms are implemented, zero-threshold data preprocessing services are provided, and container orchestration technology is used to manage and share geoscience algorithms.
It improves the quality of algorithm resources, realizes algorithm reproduction and second-level service startup capabilities, improves service stability and resource utilization, simplifies user operations, and reduces the cost of geoscience data processing.
Smart Images

Figure CN114968495B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of geoscience algorithm sharing, and in particular to a method and system for implementing geoscience data sharing based on a Kubernetes platform. Background Art
[0002] With the development of geographic information technology, the application of geospatial information and remote sensing has expanded to various industries such as land, environment, meteorology, mining, etc., and has generated huge economic benefits in various fields. However, while generating huge economic benefits, various geospatial data and remote sensing satellite data are also growing exponentially.
[0003] There are many types of geoscience and remote sensing satellite data, and the data sources and formats are also different. Therefore, these heterogeneous data from multiple sources usually need to use different algorithms or scripts for format conversion, preprocessing, reprocessing, etc. before they can be applied to various industries. However, it is very demanding to require every user to learn how to implement these data processing algorithms, and with the emergence of new data and algorithms, continuous learning is still required, which will also increase the cost of users using these geoscience and remote sensing data, affecting the promotion and application of geoscience and remote sensing data. In summary, how to implement and share geoscience data processing algorithms and provide zero-threshold data preprocessing services for users from all walks of life has become a huge difficulty and challenge in sharing geoscience and remote sensing data.
[0004] Therefore, this patent considers using Kubernetes technology to build a geological algorithm sharing system, which can enable users to process and process geological data with zero threshold, thereby realizing the sharing of geological algorithms and promoting the application of geological and remote sensing data in various industries. Summary of the invention
[0005] 1. Technical issues to be solved
[0006] In view of the deficiencies in the prior art, the present invention provides a method and system for realizing geoscientific data sharing based on the Kubernetes platform, which solves the problems existing in the above-mentioned background technology.
[0007] (II) Technical solution
[0008] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a system for sharing geoscientific data based on the kubernetes platform, comprising a management end page, a management end system and multiple worker end systems. After the management end system starts a task, it will automatically generate a worker end based on the algorithm image and related driver data, which is executed in the form of a Pod in Kubernetes;
[0009] The management page mainly provides users with system functions on the web, and manages functions such as algorithm sharing and operation;
[0010] The management end system includes an authentication module, a configuration management module, an algorithm management module, an image management module, a data set module and a task module, wherein:
[0011] Authentication module: mainly includes registration, account review, login and other functions, and authentication of user permissions;
[0012] Configuration management module: mainly includes the configuration of various parameters in the system;
[0013] Algorithm management module: mainly includes functions such as uploading, viewing, updating, and deleting geoscience algorithms. The uploaded algorithms are in pending review status by default. After the administrator reviews them, the status is changed to shareable or prohibited. Ordinary users can only view algorithms in shareable status and algorithms uploaded by themselves.
[0014] Image management module: Algorithms can only be executable if they are packaged as images and pushed to the image repository, so that users can generate tasks for execution. Therefore, the image sources include two categories: images packaged as images for uploading or images uploaded directly by users;
[0015] Dataset module: used to drive datasets for geoscientific algorithms, including dataset upload, viewing, and deletion functions. The uploaded datasets are mainly stored in Ceph distributed file storage;
[0016] Task module: Only algorithms packaged as images can be in an executable state, including: task start, task view, task interruption, task deletion and other functions;
[0017] The Worker-side system includes modules such as task execution, log reporting, and progress monitoring, among which:
[0018] Task execution: the complete life cycle of task execution;
[0019] Log reporting: The tasks on the Worker side output logs in the specified format. The log module collects the Worker logs and stores them in the ES file system for persistence.
[0020] Progress monitoring: An independent process continuously monitors the life cycle of the Pod started by the Worker and sends the task status to the message queue. The management consumes the task status message and updates the task status.
[0021] The management end system and each Worker end system exchange data through message queues.
[0022] Preferably, the system further includes a storage module (Ceph), a distributed file storage database (MongoDB), a configuration and service discovery system (ETCD), and a log module (ELK);
[0023] The storage module is used to mount the driver data of the shared algorithm on the node;
[0024] The distributed file storage database is used to store the basic metadata of the system;
[0025] Configuration storage and service discovery This system is used for RPC communication between nodes;
[0026] The log module is used to format, store, and query the system's logs. The logs contain a lot of valuable information that is irregularly and unstructured and hidden in scattered data nodes. Operation and maintenance managers use logs to analyze and diagnose problems, monitor key indicators and services. The log module is responsible for centralized log collection, formatting and filtering, index generation, and fast log query. Based on the ELK tool set, log formatting, collection, and query are implemented, and visualization tasks are ultimately achieved.
[0027] A method for sharing geoscience data based on a kubernetes platform includes the following steps:
[0028] S110, the user logs in to the registered account at the front end and sends a request to the backend management end system;
[0029] S120, upload the algorithm to be shared through the front-end page, and enter the description and other information. The back-end management end receives the algorithm compression package through the interface sharding, and creates a new algorithm record in the algorithm Document table of MongoDB. The initial state of the algorithm is pending review. At this time, the algorithm can only be retrieved by the sharer and the administrator;
[0030] S130, the administrator logs in to the system and carefully reviews the algorithm, including features such as algorithm integrity, security, and consistency with the description. If the algorithm passes, the algorithm is marked as reviewed, otherwise it returns to step S120 and the sharer re-modifies and uploads it. The review algorithm sharer needs to enter the mirror module of the front-end page to package the algorithm into a mirror;
[0031] S140, after the backend management end completes the packaging, it will be automatically pushed to the Harbor image repository;
[0032] S150, the sharer uploads the algorithm's driving data and configuration files to the backend on the front-end data management page;
[0033] S160. After all the above operations are completed, the sharer needs to set the algorithm status to executable status, and the algorithm sharing is now completed;
[0034] S170, after the algorithm user logs into the system, he or she searches or browses to the algorithm shared above through the front-end page;
[0035] S180: The algorithm user starts the algorithm execution and selects the geoscientific driving data that comes with the algorithm or the geoscientific data uploaded by the user, adjusts the corresponding parameters, drives the algorithm execution, and the management end receives the command to generate a Worker end Pod;
[0036] S190. After the task is executed, the execution result is output to the directory specified by the user, and the processed result can be used by downloading.
[0037] Preferably, the step S180 is specifically as follows:
[0038] S210, upon receiving the algorithm execution command, driver data, and parameter configuration initiated by the user, the management end generates a new task record in the task table of the MongoDB database, with the initial status being Created, and simultaneously pulls the image of the algorithm from Harbor;
[0039] S220, after the management end pulls the image, the image is driven to execute, and the task status is marked as Starting;
[0040] S230, Kubernetes starts to start the Pod and executes the Pod life cycle process. The independent status monitoring process regularly pulls the information of each Pod through the Kubernetes API interface, and sends a message to RabbitMQ when the status change is detected. In this step, the Pod status is first monitored as Pending. After the management end monitors the status change message, it marks the task status as Pending.
[0041] S240, after the monitoring process detects that the Pod status changes to Running, it sends a message to RabbitMQ. After the management end detects the status change message, it marks the task status as Running.
[0042] S250: At this point, the Pod is fully ready, and the containers in it begin to run the established tasks and steps of the algorithm normally. The algorithm outputs logs according to the specified format, and modules such as ELK continuously monitor the log output and persist it in the ES system.
[0043] S260, the task is executed, and the algorithm in the Worker side outputs the execution result to the directory specified by the user. After the monitoring process hears that the Pod status changes to Succeded or Failed, it sends a message to RabbitMQ. After the management side hears the status change message, it marks the task status as the corresponding status.
[0044] (III) Beneficial effects
[0045] The present invention provides a method and system for realizing geoscientific data sharing based on the Kubernetes platform, which has the following beneficial effects:
[0046] The present invention adopts Kubernetes-based container orchestration technology to realize the management and sharing functions of geoscience algorithms. Algorithm owners can upload their own algorithm resources for submission. The submitted algorithms need to undergo technical and security review before they can be released and shared externally, which improves the resource quality of the algorithm. In addition, the present invention can achieve algorithm reproduction and second-level service startup capabilities, improve service cluster resource utilization, and ensure algorithm reproduction accuracy and service stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is the application architecture diagram of the system;
[0048] Figure 2 It is the flow chart of the management side;
[0049] Figure 3 This is the Worker-side flow chart. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] Example 1
[0052] like Figure 1 As shown in the figure, a system for sharing geoscience data based on the kubernetes platform includes a management end page, a management end system and multiple worker end systems. The management end page request is forwarded to the management end backend system through the nginx server load balancing. After the management end system starts the task, it will automatically generate a worker end based on the algorithm image and related driver data, which is executed in the form of Pod in Kubernetes.
[0053] The management page mainly provides users with system functions on the web, and manages functions such as algorithm sharing and operation;
[0054] The management system includes authentication module, configuration management module, algorithm management module, image management module, data set module and task module, among which:
[0055] Authentication module: mainly includes registration, account review, login and other functions, and authentication of user permissions;
[0056] Configuration management module: mainly includes the configuration of various parameters in the system;
[0057] Algorithm management module: mainly includes functions such as uploading, viewing, updating, and deleting geoscience algorithms. The uploaded algorithms are in pending review status by default. After the administrator reviews them, the status is changed to shareable or prohibited. Ordinary users can only view algorithms in shareable status and algorithms uploaded by themselves.
[0058] Image management module: Algorithms can only be executable if they are packaged as images and pushed to the image repository, so that users can generate tasks for execution. Therefore, the image sources include two categories: images packaged as images for uploading or images uploaded directly by users;
[0059] Dataset module: used to drive datasets for geoscientific algorithms, including dataset upload, viewing, and deletion functions. The uploaded datasets are mainly stored in Ceph distributed file storage;
[0060] Task module: Only algorithms packaged as images can be in an executable state, including: task start, task view, task interruption, task deletion and other functions;
[0061] The Worker system includes modules such as task execution, log reporting, and progress monitoring.
[0062] Task execution: the complete life cycle of task execution;
[0063] Log reporting: The tasks on the Worker side output logs in the specified format. The log module collects the Worker logs and stores them in the ES file system for persistence.
[0064] Progress monitoring: An independent process continuously monitors the life cycle of the Pod started by the Worker and sends the task status to the message queue. The management consumes the task status message and updates the task status.
[0065] The management system and each Worker system exchange data through the message queue RabbitMQ.
[0066] The system also includes a storage module (Ceph), a distributed file storage database (MongoDB), a configuration and service discovery system (ETCD), and a logging module (ELK);
[0067] The storage module is used to mount the driver data of the shared algorithm on the node;
[0068] The distributed file storage database is used to store the basic metadata of the system;
[0069] Configuration storage and service discovery This system is used for RPC communication between nodes;
[0070] The log module is used to format, store, and query the system's logs. The logs contain a lot of valuable information that is irregularly and unstructured and hidden in scattered data nodes. Operation and maintenance managers use logs to analyze and diagnose problems, monitor key indicators and services. The log module is responsible for centralized log collection, formatting and filtering, index generation, and fast log query. Based on the ELK tool set, log formatting, collection, and query are implemented, and visualization tasks are ultimately achieved.
[0071] Example 2
[0072] like Figure 2 As shown, a method for sharing geoscience data based on the Kubernetes platform includes the following steps:
[0073] S110, the user logs in to the registered account at the front end and sends a request to the backend management end system;
[0074] S120, upload the algorithm to be shared through the front-end page, and enter the description and other information. The back-end management end receives the algorithm compression package through the interface sharding, and creates a new algorithm record in the algorithm Document table of MongoDB. The initial state of the algorithm is pending review. At this time, the algorithm can only be retrieved by the sharer and the administrator;
[0075] S130, the administrator logs in to the system and carefully reviews the algorithm, including features such as algorithm integrity, security, and consistency with the description. If the algorithm passes, the algorithm is marked as reviewed, otherwise it returns to step S120 and the sharer re-modifies and uploads it. The review algorithm sharer needs to enter the mirror module of the front-end page to package the algorithm into a mirror;
[0076] S140, after the backend management end completes the packaging, it will be automatically pushed to the Harbor image repository;
[0077] S150, the sharer uploads the algorithm's driving data and configuration files to the backend on the front-end data management page;
[0078] S160. After all the above operations are completed, the sharer needs to set the algorithm status to executable status, and the algorithm sharing is now completed;
[0079] S170, after the algorithm user logs into the system, he or she searches or browses to the algorithm shared above through the front-end page;
[0080] S180: The algorithm user starts the algorithm execution and selects the geoscientific driving data that comes with the algorithm or the geoscientific data uploaded by the algorithm, adjusts the corresponding parameters, drives the algorithm execution, and the management end receives the command to generate a Worker end Pod, specifically (such as Figure 3 shown):
[0081] S210, upon receiving the algorithm execution command, driver data, and parameter configuration initiated by the user, the management end generates a new task record in the task table of the MongoDB database, with the initial status being Created, and simultaneously pulls the image of the algorithm from Harbor;
[0082] S220, after the management end pulls the image, the image is driven to execute, and the task status is marked as Starting;
[0083] S230, Kubernetes starts to start the Pod and executes the Pod life cycle process. The independent status monitoring process regularly pulls the information of each Pod through the Kubernetes API interface, and sends a message to RabbitMQ when the status change is detected. In this step, the Pod status is first monitored as Pending. After the management end monitors the status change message, it marks the task status as Pending.
[0084] S240, after the monitoring process detects that the Pod status changes to Running, it sends a message to RabbitMQ. After the management end detects the status change message, it marks the task status as Running.
[0085] S250: At this point, the Pod is fully ready, and the containers in it begin to run the established tasks and steps of the algorithm normally. The algorithm outputs logs according to the specified format, and modules such as ELK continuously monitor the log output and persist it in the ES system.
[0086] S260, when the task is executed, the algorithm in the Worker side outputs the execution result to the directory specified by the user. After the monitoring process detects that the Pod status changes to Succeded or Failed, it sends a message to RabbitMQ. After the management side detects the status change message, it marks the task status as the corresponding status.
[0087] S190. After the task is executed, the execution result is output to the directory specified by the user, and the processed result can be used by downloading.
[0088] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0089] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A system for sharing geoscience data based on the Kubernetes platform, characterized by: Including management page, One management system and multiple worker systems. After the management system starts a task, it will automatically generate a worker based on the algorithm image and related driver data, which is executed in the form of a Pod in Kubernetes. The management page mainly provides users with system functions on the web, and manages algorithm sharing and operation functions; The management end system includes an authentication module, a configuration management module, an algorithm management module, an image management module, a data set module and a task module, wherein: Authentication module: mainly includes registration, account review, login functions, and authentication of user permissions; Configuration management module: mainly includes the configuration of various parameters in the system; Algorithm management module: mainly includes the functions of uploading, viewing, updating and deleting geoscience algorithms. The uploaded algorithms are in pending review status by default. After the administrator reviews them, the status is changed to shareable or prohibited. Ordinary users can only view algorithms in shareable status and algorithms uploaded by themselves. Image management module: Algorithms can only be executable if they are packaged as images and pushed to the image repository, so that users can generate tasks for execution. Therefore, the image sources include two categories: images packaged as images for uploading or images uploaded directly by users; Dataset module: used to drive datasets for geoscientific algorithms, including dataset upload, view, and delete functions. The uploaded datasets are mainly stored in Ceph distributed file storage; Task module: Only algorithms packaged as images can be in an executable state, including: task start, task view, task interruption, and task deletion functions; The Worker-side system includes task execution, log reporting, and progress monitoring modules, among which: Task execution: the complete life cycle of task execution; Log reporting: The tasks on the Worker side output logs in the specified format. The log module collects the Worker logs and stores them in the ES file system for persistence. Progress monitoring: An independent process continuously monitors the life cycle of the Pod started by the Worker and sends the task status to the message queue. The management consumes the task status message and updates the task status. The management end system and each Worker end system exchange data through message queues.
2. According to claim 1, a system for sharing geoscientific data based on the Kubernetes platform is characterized by: The system also includes a storage module (Ceph), a distributed file storage database (MongoDB), a configuration and service discovery system (ETCD), and a log module (ELK); The storage module is used to mount the driver data of the shared algorithm on the node; The distributed file storage database is used to store the basic metadata of the system; the configuration storage and service discovery system is used for RPC communication between nodes; The log module is used to implement system log formatting, storage, and query. The log contains a large amount of valuable information, which is irregularly and unstructured and hidden in scattered data nodes. Operation and maintenance managers use logs to analyze and diagnose problems, monitor key indicators and businesses. The log module is responsible for centralized log collection, formatting and filtering, index generation, and fast log query. Based on the ELK tool set, log formatting, collection, and query are implemented, and finally visualization tasks are realized.
3. A method for realizing geoscientific data sharing based on a kubernetes platform, applied to a system for realizing geoscientific data sharing based on a kubernetes platform as claimed in any one of claims 1 to 2, characterized in that: The steps include: S110, the user logs in to the registered account at the front end and sends a request to the backend management end system; S120, upload the algorithm to be shared through the front-end page and enter the description information. The back-end management end receives the algorithm compression package through the interface sharding and creates a new algorithm record in the algorithm Document table of MongoDB. The initial state of the algorithm is pending review. At this time, the algorithm can only be retrieved by the sharer and the administrator; S130, the administrator logs in to the system and carefully reviews the algorithm, including the algorithm integrity, security, and description consistency features. If it passes, the algorithm is marked as reviewed, otherwise it returns to step S120 and the sharer re-modifies and uploads it. The review algorithm sharer needs to enter the mirror module of the front-end page to package the algorithm into a mirror; S140, after the backend management end completes the packaging, it will be automatically pushed to the Harbor image repository; S150, the sharer uploads the algorithm's driving data and configuration files to the backend on the front-end data management page; S160. After all the above operations are completed, the sharer needs to set the algorithm status to executable status, and the algorithm sharing is now completed; S170, after the algorithm user logs into the system, he or she searches or browses to the algorithm shared above through the front-end page; S180: The algorithm user starts the algorithm execution and selects the geoscientific driving data that comes with the algorithm or the geoscientific data uploaded by the user, adjusts the corresponding parameters, drives the algorithm execution, and the management end receives the command to generate a Worker end Pod; S190. After the task is executed, the execution result is output to the directory specified by the user, and the processed result can be used by downloading.
4. The method for sharing geoscience data based on the kubernetes platform according to claim 3 is characterized by: The step S180 is specifically as follows: S210, upon receiving the algorithm execution command, driver data, and parameter configuration initiated by the user, the management end generates a new task record in the task table of the MongoDB database, with the initial status being Created, and simultaneously pulls the image of the algorithm from Harbor; S220, after the management end pulls the image, the image is driven to execute, and the task status is marked as Starting; S230, Kubernetes starts to start the Pod and executes the Pod life cycle process. The independent status monitoring process regularly pulls the information of each Pod through the Kubernetes API interface, and sends a message to RabbitMQ when the status change is detected. In this step, the Pod status is first monitored as Pending. After the management end monitors the status change message, it marks the task status as Pending. S240, after the monitoring process detects that the Pod status changes to Running, it sends a message to RabbitMQ. After the management end detects the status change message, it marks the task status as Running. S250: At this point, the Pod is fully ready, and the containers in it begin to run the established tasks and steps of the algorithm normally. The algorithm outputs logs according to the specified format, and the ELK module continuously monitors the log output and persists it in the ES system. S260, the task is executed, and the algorithm in the Worker side outputs the execution result to the directory specified by the user. After the monitoring process hears that the Pod status changes to Succeded or Failed, it sends a message to RabbitMQ. After the management side hears the status change message, it marks the task status as the corresponding status.
