A method and device for real-time publishing of road conditions based on container orchestration technology
Patent Information
- Application Number
- CN202111247310.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-26
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2041-10-26
AI Technical Summary
[0004]本发明的目的在于提供一种基于容器编排技术的路况实时发布方法及装置,具备实现路况发布系统中多模块的容器化,进行容器的管理与编排,实现快速、大规模容器自动化构建、部署、调度,降低发布成本,减少管理成本,提供容灾、自愈机制以及自动伸缩容机制,提高系统可用性,降低运营维护成本的优点,解决了发布过程完全依赖手动,工作量大,效率低,缺少预设编排模板,管理成本高,没有有效的容灾,没有自动伸缩容机制,导致服务请求突然增加的场景下,系统存在风险的问题
[0025] 1. The present invention automates construction and rapid release to achieve fast, automatic construction, deployment, and release. The preset orchestration template arranges multiple modules to realize automatic management of multiple modules. The one-click rollback mechanism realizes exceptions in the update process and quickly Rollback meets the continuous optimization and update needs of the traffic release system, enables faster system version updates, and reduces manual release costs.
Smart Images

Figure CN113992648B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of real-time road condition publishing, and in particular to a method and device for real-time road condition publishing based on container orchestration technology. Background Art
[0002] At present, the road condition publishing system usually includes a distributed publishing system with multiple modules, such as data receiving module, data filling module, data encoding module, multi-generation differential module, service publishing module, permission management module, and gateway module. The modules are generally jar packages. The construction of the modules relies on Maven for manual construction. The deployment and release of the modules require manual uploading, restarting, and publishing of programs on multiple servers. With the increasing number of service interface requests, it is necessary to manually add the number of server nodes to deploy and release the programs to meet the system concurrency requirements.
[0003] As a multi-module distributed deployment system, the road condition publishing system involves dozens or even hundreds of servers. The system construction, deployment, and release processes are completely dependent on manual work, which is labor-intensive and inefficient. The number of modules in the system varies according to the business characteristics, and components need to collaborate with each other to enable established applications to operate as designed. There is a lack of preset orchestration templates, high management costs, no effective disaster recovery and self-healing mechanisms, high operation and maintenance costs, and no automatic scaling mechanism, which leads to risks in the system when service requests suddenly increase. Summary of the invention
[0004] The purpose of the present invention is to provide a method and device for real-time publishing of road conditions based on container orchestration technology, which has the advantages of realizing containerization of multiple modules in a road condition publishing system, managing and orchestrating containers, realizing fast and large-scale automated construction, deployment and scheduling of containers, reducing publishing costs, reducing management costs, providing disaster recovery, self-healing mechanisms and automatic scaling mechanisms, improving system availability, and reducing operation and maintenance costs. It solves the problem that the publishing process is completely dependent on manual work, with heavy workload, low efficiency, lack of preset orchestration templates, high management costs, no effective disaster recovery, and no automatic scaling mechanisms, resulting in system risks in scenarios where service requests suddenly increase.
[0005] To achieve the above object, the present invention provides the following technical solution: a method for real-time publishing of road conditions based on container orchestration technology, comprising the following steps:
[0006] A: System building and release process: local code and files are submitted to GitLab through git commands, and then the webhook plug-in monitors code changes and automatically triggers Jenkins to build. Jenkins converts the code into a docker image and pushes it to the harbor image repository.
[0007] B: Then, rc and service will be created on k8s-master, and then Pod will be created, and the image will be pulled from the harbor image repository;
[0008] C: k8s reads the yaml configuration file of the image and starts the container according to the configuration information and the image;
[0009] D: Container orchestration technology. The functional module for real-time traffic condition publishing is made into a Docker image and orchestrated and managed through the Kubernetes cluster in the form of containers.
[0010] Preferably, the cluster role, Kubernetes divides the machines in the cluster into a Master node and a group of working nodes Node, cluster management, a group of processes kube-apiserver, kube-controller-manager and kube-scheduler on the Master node implement resource management, Pod scheduling, elastic scaling, security control, system monitoring and error correction management functions of the entire cluster.
[0011] Preferably, the cluster runs, Node is the service node running Pod in the Kubernetes cluster architecture, Node is the unit of Kubernetes cluster operation, used to carry the operation of the assigned Pod, is the host machine where the Pod runs, is associated with the Master management node, has a name and IP, and system resource information, Pod runs on the Node node, is a combination of several related containers, the containers contained in the Pod run on the same host machine, use the same network namespace, IP address and port, a Pod can contain one container or multiple related containers, and select a pod to run a container in the traffic publishing interface.
[0012] Preferably, the external service defines a logical set of Pods and a strategy for accessing the set through a Service, which is an abstraction of a real service, provides a unified service access portal and a service proxy and discovery mechanism, and associates multiple Pods with the same Label.
[0013] A real-time traffic condition publishing device for implementing a real-time traffic condition publishing method based on container orchestration technology, comprising:
[0014] The data access module listens to the path specified by Zookeeper, obtains real-time traffic data update notifications, and starts tasks to access real-time basic traffic data;
[0015] The data filling module, after obtaining the real-time traffic data, compares the location reference data with the real-time traffic data to identify the missing road information, and supplements the traffic conditions by combining reliable feature data, experience data, and smooth traffic data to ensure the integrity of traffic data release and improve the coverage of urban traffic data;
[0016] The data encoding module combines the road condition data based on the road network basic data Link with the basic road network data according to the specified location reference, and realizes encoding according to the location reference, thereby reducing the amount of road condition data released and improving the rationality of road condition expression;
[0017] Multi-generation differential module: In order to meet the business needs of adapting to multiple versions of maps, the latest version of real-time traffic conditions needs to be differentially operated through the differential table. The differential method is to differentiate from the high version to the low version one by one, so as to convert the latest version into real-time traffic data adapted to the low version map;
[0018] Service publishing module: after receiving the notification of traffic condition conversion completion through monitoring, the service publishing module loads the corresponding version of traffic condition data according to the version information released by itself, performs data encapsulation and data compression operations, and provides traffic condition publishing interface services based on Http;
[0019] The gateway module, in the real-time traffic condition publishing device, obtains the request version, request method, user information, and verification code request information by parsing the client request URL and parameters;
[0020] The permission management module provides a visual page to enable user information entry, modification and management.
[0021] Preferably, due to different data usage requirements of customers, the service publishing module implements request services for different dimensions of roads, regions, and cities, and provides requests for data of multiple map versions.
[0022] Preferably, the gateway module, in the real-time traffic condition publishing device, first calls the permission verification interface provided by the permission management module to perform request validity and permission verification. After the verification is passed, the routing rules are parsed according to other request parameters, and the request is forwarded according to the configuration rules, and the request is forwarded to the designated traffic condition publishing service.
[0023] Preferably, the authority management module implements traffic authority management and user authority period management, provides authority expiration reminder function, and provides Http-based user authority verification interface service.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] 1. The present invention automates construction and rapid release, realizes rapid and automatic construction, deployment, and release, and arranges multiple modules using preset arrangement templates to realize automated management of multiple modules. The one-key rollback mechanism realizes rapid rollback when an exception occurs during the update process, meets the continuous optimization and update requirements of the road condition publishing system, realizes faster update of system versions, and reduces manual release costs.
[0026] 2. The present invention provides disaster recovery and self-healing, and provides system disaster recovery and self-healing mechanisms, automatically restarts failed containers, and implements failover when a node is unavailable, replaces and reschedules containers on the node, ensures system availability, and reduces manual operation and maintenance costs. Through container orchestration technology, containerization of multiple modules in the road condition publishing system is realized, and container orchestration technology is used to manage and orchestrate containers. Through preset orchestration templates, fast and large-scale automated construction, deployment, and scheduling of containers are realized, which reduces publishing costs, reduces management costs, provides disaster recovery, self-healing mechanisms, and automatic scaling mechanisms, improves system availability, and reduces operation and maintenance costs.
[0027] 3. The present invention is elastically scalable, and by monitoring the resource usage ratio of each module of the road condition publishing system, when the ratio is too high, the number of containers is automatically increased to ensure system availability.
[0028] 4. The automatic discovery and load balancing of services of the present invention do not require modification of applications to use unfamiliar service discovery mechanisms to provide load balancing.
[0029] 5. The present invention is portable and can quickly build a road condition publishing system in different environments through container mirroring and combined with container orchestration, supporting public cloud, private cloud, bare metal, and virtual machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 Build and publish flow charts for the system of the present invention;
[0031] Figure 2 The module flow of the system of the present invention is Figure 1 ;
[0032] Figure 3 The module flow of the system of the present invention is Figure 2 ;
[0033] Figure 4 Arrange a flow chart for the container of the present invention. DETAILED DESCRIPTION
[0034] See also Figure 1-Figure 4 , a method for publishing traffic conditions in real time based on container orchestration technology, comprising the following steps:
[0035] A: System building and release process: local code and files are submitted to GitLab through git commands, and then the webhook plug-in monitors code changes and automatically triggers Jenkins to build. Jenkins converts the code into a docker image and pushes it to the harbor image repository.
[0036] B: Then, rc and service will be created on k8s-master, and then Pod will be created, and the image will be pulled from the harbor image repository;
[0037] C: k8s reads the yaml configuration file of the image and starts the container according to the configuration information and the image;
[0038] D: Container orchestration technology. The functional module for real-time traffic condition publishing is made into a Docker image and orchestrated and managed through the Kubernetes cluster in the form of containers.
[0039] Cluster role, Kubernetes divides the machines in the cluster into Master nodes and a group of worker nodes. Cluster management, a group of processes kube-apiserver, kube-controller-manager and kube-scheduler on the Master node implement resource management, Pod scheduling, elastic scaling, security control, system monitoring and error correction management functions of the entire cluster.
[0040] Cluster operation, Node is the service node that runs Pod in the Kubernetes cluster architecture. Node is the unit of Kubernetes cluster operation, used to carry the operation of the assigned Pod. It is the host machine where the Pod runs, associated with the Master management node, and has a name, IP, and system resource information. Pod runs on the Node node and is a combination of several related containers. The containers contained in the Pod run on the same host machine and use the same network namespace, IP address, and port. A Pod can contain one container or multiple related containers. Select a pod in the traffic release interface to run a container.
[0041] For external services, the Service defines the logical set of Pods and the strategy for accessing the set. It is an abstraction of the real service, providing a unified service access portal, service proxy, and discovery mechanism, and associating multiple Pods with the same Label.
[0042] A real-time traffic condition publishing device for implementing a real-time traffic condition publishing method based on container orchestration technology, comprising:
[0043] The data access module listens to the path specified by Zookeeper, obtains real-time traffic data update notifications, and starts tasks to access real-time basic traffic data;
[0044] The data filling module, after obtaining the real-time traffic data, compares the location reference data with the real-time traffic data to identify the missing road information, and supplements the traffic conditions by combining reliable feature data, experience data, and smooth traffic data to ensure the integrity of traffic data release and improve the coverage of urban traffic data;
[0045] The data encoding module combines the road condition data based on the road network basic data Link with the basic road network data according to the specified location reference, and realizes encoding according to the location reference, thereby reducing the amount of road condition data released and improving the rationality of road condition expression;
[0046] Multi-generation differential module: In order to meet the business needs of adapting to multiple versions of maps, the latest version of real-time traffic conditions needs to be differentially operated through the differential table. The differential method is to differentiate from the high version to the low version one by one, so as to convert the latest version into real-time traffic data adapted to the low version map;
[0047] Service publishing module: after receiving the notification of traffic condition conversion completion through monitoring, the service publishing module loads the corresponding version of traffic condition data according to the version information released by itself, performs data encapsulation and data compression operations, and provides traffic condition publishing interface services based on Http;
[0048] The gateway module, in the real-time traffic condition publishing device, obtains the request version, request method, user information, and verification code request information by parsing the client request URL and parameters;
[0049] The permission management module provides a visual page to enable user information entry, modification and management.
[0050] Due to different data usage requirements of customers, the service publishing module implements request services for different dimensions of roads, regions, and cities, and provides requests for data from multiple map versions.
[0051] The gateway module, in the real-time traffic condition publishing device, first calls the permission verification interface provided by the permission management module to verify the request validity and permission. After the verification is passed, the routing rules are parsed according to other request parameters, and the request is forwarded according to the configuration rules, and the request is forwarded to the specified traffic condition publishing service.
[0052] The permission management module implements traffic permission management and user permission period management, provides permission expiration reminder function, and provides Http-based user permission verification interface service.
[0053] Embodiment 1:
[0054] A method for publishing traffic conditions in real time based on container orchestration technology comprises the following steps:
[0055] A: System building and release process: local code and files are submitted to GitLab through git commands, and then the webhook plug-in monitors code changes and automatically triggers Jenkins to build. Jenkins converts the code into a docker image and pushes it to the harbor image repository.
[0056] B: Then, rc and service will be created on k8s-master, and then Pod will be created, and the image will be pulled from the harbor image repository;
[0057] C: k8s reads the yaml configuration file of the image and starts the container according to the configuration information and the image;
[0058] D: Container orchestration technology. The functional module for real-time traffic condition publishing is made into a Docker image and orchestrated and managed through the Kubernetes cluster in the form of containers.
[0059] Cluster role, Kubernetes divides the machines in the cluster into Master nodes and a group of worker nodes. Cluster management, a group of processes kube-apiserver, kube-controller-manager and kube-scheduler on the Master node implement resource management, Pod scheduling, elastic scaling, security control, system monitoring and error correction management functions of the entire cluster.
[0060] Cluster operation, Node is the service node that runs Pod in the Kubernetes cluster architecture. Node is the unit of Kubernetes cluster operation, used to carry the operation of the assigned Pod. It is the host machine where the Pod runs, associated with the Master management node, and has a name, IP, and system resource information. Pod runs on the Node node and is a combination of several related containers. The containers contained in the Pod run on the same host machine and use the same network namespace, IP address, and port. A Pod can contain one container or multiple related containers. Select a pod in the traffic release interface to run a container.
[0061] For external services, the Service defines the logical set of Pods and the strategy for accessing the set. It is an abstraction of the real service, providing a unified service access portal, service proxy, and discovery mechanism, and associating multiple Pods with the same Label.
[0062] A real-time traffic condition publishing device for implementing a real-time traffic condition publishing method based on container orchestration technology, comprising:
[0063] The data access module listens to the path specified by Zookeeper, obtains real-time traffic data update notifications, and starts tasks to access real-time basic traffic data;
[0064] The data filling module, after obtaining the real-time traffic data, compares the location reference data with the real-time traffic data to identify the missing road information, and supplements the traffic conditions by combining reliable feature data, experience data, and smooth traffic data to ensure the integrity of traffic data release and improve the coverage of urban traffic data;
[0065] The data encoding module combines the road condition data based on the road network basic data Link with the basic road network data according to the specified location reference, and realizes encoding according to the location reference, thereby reducing the amount of road condition data released and improving the rationality of road condition expression;
[0066] Multi-generation differential module: In order to meet the business needs of adapting to multiple versions of maps, the latest version of real-time traffic conditions needs to be differentially operated through the differential table. The differential method is to differentiate from the high version to the low version one by one, so as to convert the latest version into real-time traffic data adapted to the low version map;
[0067] Service publishing module: after receiving the notification of traffic condition conversion completion through monitoring, the service publishing module loads the corresponding version of traffic condition data according to the version information released by itself, performs data encapsulation and data compression operations, and provides traffic condition publishing interface services based on Http;
[0068] The gateway module, in the real-time traffic condition publishing device, obtains the request version, request method, user information, and verification code request information by parsing the client request URL and parameters;
[0069] The permission management module provides a visual page to enable user information entry, modification and management.
[0070] Due to different data usage requirements of customers, the service publishing module implements request services for different dimensions of roads, regions, and cities, and provides requests for data from multiple map versions.
[0071] Embodiment 2:
[0072] A method for publishing traffic conditions in real time based on container orchestration technology comprises the following steps:
[0073] A: System building and release process: local code and files are submitted to GitLab through git commands, and then the webhook plug-in monitors code changes and automatically triggers Jenkins to build. Jenkins converts the code into a docker image and pushes it to the harbor image repository.
[0074] B: Then, rc and service will be created on k8s-master, and then Pod will be created, and the image will be pulled from the harbor image repository;
[0075] C: k8s reads the yaml configuration file of the image and starts the container according to the configuration information and the image;
[0076] D: Container orchestration technology. The functional module for real-time traffic condition publishing is made into a Docker image and orchestrated and managed through the Kubernetes cluster in the form of containers.
[0077] Cluster role, Kubernetes divides the machines in the cluster into Master nodes and a group of worker nodes. Cluster management, a group of processes kube-apiserver, kube-controller-manager and kube-scheduler on the Master node implement resource management, Pod scheduling, elastic scaling, security control, system monitoring and error correction management functions of the entire cluster.
[0078] Cluster operation, Node is the service node that runs Pod in the Kubernetes cluster architecture. Node is the unit of Kubernetes cluster operation, used to carry the operation of the assigned Pod. It is the host machine where the Pod runs, associated with the Master management node, and has a name, IP, and system resource information. Pod runs on the Node node and is a combination of several related containers. The containers contained in the Pod run on the same host machine and use the same network namespace, IP address, and port. A Pod can contain one container or multiple related containers. Select a pod in the traffic release interface to run a container.
[0079] For external services, the Service defines the logical set of Pods and the strategy for accessing the set. It is an abstraction of the real service, providing a unified service access portal, service proxy, and discovery mechanism, and associating multiple Pods with the same Label.
[0080] A real-time traffic condition publishing device for implementing a real-time traffic condition publishing method based on container orchestration technology, comprising:
[0081] The data access module listens to the path specified by Zookeeper, obtains real-time traffic data update notifications, and starts tasks to access real-time basic traffic data;
[0082] The data filling module, after obtaining the real-time traffic data, compares the location reference data with the real-time traffic data to identify the missing road information, and supplements the traffic conditions by combining reliable feature data, experience data, and smooth traffic data to ensure the integrity of traffic data release and improve the coverage of urban traffic data;
[0083] The data encoding module combines the road condition data based on the road network basic data Link with the basic road network data according to the specified location reference, and realizes encoding according to the location reference, thereby reducing the amount of road condition data released and improving the rationality of road condition expression;
[0084] Multi-generation differential module: In order to meet the business needs of adapting to multiple versions of maps, the latest version of real-time traffic conditions needs to be differentially operated through the differential table. The differential method is to differentiate from the high version to the low version one by one, so as to convert the latest version into real-time traffic data adapted to the low version map;
[0085] Service publishing module: after receiving the notification of traffic condition conversion completion through monitoring, the service publishing module loads the corresponding version of traffic condition data according to the version information released by itself, performs data encapsulation and data compression operations, and provides traffic condition publishing interface services based on Http;
[0086] The gateway module, in the real-time traffic condition publishing device, obtains the request version, request method, user information, and verification code request information by parsing the client request URL and parameters;
[0087] The permission management module provides a visual page to enable user information entry, modification and management.
[0088] In summary: the real-time road condition publishing method and device based on container orchestration technology solves the problem that the publishing process is completely dependent on manual work, with heavy workload, low efficiency, lack of preset orchestration templates, high management costs, no effective disaster recovery, and no automatic scaling mechanism, which leads to system risks in scenarios where service requests suddenly increase.
Claims
1. A method for publishing road conditions in real time based on container orchestration technology, characterized in that: The following steps are involved: A: System building and release process: local code and files are submitted to GitLab through git commands, and then the webhook plug-in monitors code changes and automatically triggers Jenkins to build. Jenkins converts the code into a docker image and pushes it to the harbor image repository. B: Then, rc and service will be created on k8s-master, and then Pod will be created, and the image will be pulled from the harbor image repository; C: k8s reads the yaml configuration file of the image and starts the container according to the configuration information and the image; D: Container orchestration technology. The functional module for real-time traffic condition publishing is made into a Docker image and is orchestrated and managed through a Kubernetes cluster in the form of a container. The functional module for real-time traffic condition publishing includes: data access module, data filling module, data encoding module, multi-generation difference module, service publishing module, gateway module, and permission management module. The data access module listens to the path specified by Zookeeper, obtains real-time traffic data update notifications, and starts tasks to access real-time basic traffic data; The data filling module, after obtaining the real-time traffic data, compares the location reference data with the real-time traffic data to identify the missing road information, and supplements the traffic conditions by combining reliable feature data, experience data, and smooth traffic data to ensure the integrity of traffic data release and improve the coverage of urban traffic data; The data encoding module combines the road condition data based on the road network basic data Link with the basic road network data according to the specified location reference, and realizes encoding according to the location reference, thereby reducing the amount of road condition data released and improving the rationality of road condition expression; Multi-generation differential module: In order to meet the business needs of adapting to multiple versions of maps, the latest version of real-time traffic conditions needs to be differentially operated through the differential table. The differential method is to differentiate from the high version to the low version one by one, so as to convert the latest version into real-time traffic data adapted to the low version map; Service publishing module: after receiving the notification of traffic condition conversion completion through monitoring, the service publishing module loads the corresponding version of traffic condition data according to the version information released by itself, performs data encapsulation and data compression operations, and provides traffic condition publishing interface services based on Http; The gateway module parses the client request URL and parameters to obtain the request version, request method, user information, and verification code request information; The permission management module provides a visual page to enable user information entry, modification and management.
2. According to the method of claim 1, the method is characterized by: Cluster role, Kubernetes divides the machines in the cluster into Master nodes and a group of worker nodes. Cluster management, a group of processes kube-apiserver, kube-controller-manager and kube-scheduler on the Master node implement resource management, Pod scheduling, elastic scaling, security control, system monitoring and error correction management functions of the entire cluster.
3. According to the method of claim 1, the real-time traffic condition publishing method based on container orchestration technology is characterized by: Cluster operation, Node is the service node that runs Pod in the Kubernetes cluster architecture. Node is the unit of Kubernetes cluster operation, used to carry the operation of the assigned Pod. It is the host machine where the Pod runs, associated with the Master management node, and has a name, IP, and system resource information. Pod runs on the Node node and is a combination of several related containers. The containers contained in the Pod run on the same host machine and use the same network namespace, IP address, and port. A Pod can contain one container or multiple related containers. Select a pod in the traffic release interface to run a container.
4. According to the method for real-time publishing of traffic conditions based on container orchestration technology according to claim 1, Features: For external services, the Service defines a logical set of Pods and the strategy for accessing the set. It is an abstraction of real services, providing a unified service access portal, service proxy, and discovery mechanism, and associating multiple Pods with the same Label.
5. According to the method of claim 1, the real-time traffic condition publishing method based on container orchestration technology is characterized by: Due to different data usage requirements of customers, the service publishing module implements request services for different dimensions of roads, regions, and cities, and provides requests for data from multiple map versions.
6. According to the method of claim 1, the real-time traffic condition publishing method based on container orchestration technology is characterized by: The gateway module first calls the permission verification interface provided by the permission management module to verify the validity of the request and the permission. After the verification is passed, the routing rules are parsed according to other request parameters, and the request is forwarded according to the configuration rules to the specified traffic condition publishing service.
7. According to the method of claim 1, the method is characterized by: The authority management module implements traffic authority management and user authority period management, provides authority expiration reminder function, and provides Http-based user authority verification interface service.
