WO2023185136A1 - 一种边缘节点的处理方法、装置及介质 - Google Patents

一种边缘节点的处理方法、装置及介质 Download PDF

Info

Publication number
WO2023185136A1
WO2023185136A1 PCT/CN2022/141658 CN2022141658W WO2023185136A1 WO 2023185136 A1 WO2023185136 A1 WO 2023185136A1 CN 2022141658 W CN2022141658 W CN 2022141658W WO 2023185136 A1 WO2023185136 A1 WO 2023185136A1
Authority
WO
WIPO (PCT)
Prior art keywords
edge node
current edge
cluster
node
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2022/141658
Other languages
English (en)
French (fr)
Inventor
张德波
刘茂扬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Publication of WO2023185136A1 publication Critical patent/WO2023185136A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the technical field of edge computing, and in particular to an edge node processing method, device and medium.
  • FIG. 1 is an application diagram of the connection relationship between the management end and the edge management service. As shown in Figure 1, what runs on the edge node is not the core service of kubernetes, but an edge node service. A database is started on the edge node, and the edge node service After initially obtaining data from the management end, the application data is stored in a local database. In actual application scenarios, due to network delays, fluctuations or disconnections that often occur, the edge nodes lose contact, so the edge nodes have a certain degree of autonomy. .
  • the management of edge nodes adopts a registration mechanism. After the edge node service is started, it actively establishes contact with the edge management service. After passing the authentication, the management end will include the edge node in the cluster node list. The name of the edge node in the cluster node list is the host of the edge node. name. Since the current connection status of the edge node cannot be known, the startup registration operation is performed every time the edge node service is started. For example: when an edge node establishes a connection with one cluster and then establishes a connection with another cluster after executing the task, due to the data of the previous cluster, when the edge node is started, although the management end deletes the edge node, the edge node cannot The corresponding edge node service has not been deleted.
  • the purpose of this application is to provide a processing method, device and medium for edge nodes to avoid blind startup of edge nodes and subsequent repeated registration.
  • an edge node processing method including:
  • connection status If the connection status is to be started, the current edge node will be started and registered;
  • connection status is the main body state to be started, start the main process of the current edge node
  • connection status is pending cleanup, delete the service certificate
  • connection status If the connection status is abnormal, stop using the current edge node.
  • connection status of the current edge node is determined based on the relationship between the host name, service certificate, and cluster node list, including:
  • the cluster node contains a host name, determine that the connection status is the subject state to be started;
  • cluster node does not contain a host name, determine that the connection status is pending cleanup
  • the connection status is determined to be abnormal
  • cluster node list does not contain the host name, determine that the connection status is to be started.
  • the current edge node is started and registered, including:
  • the method further includes:
  • obtaining the cluster node list includes:
  • it also includes:
  • this application also provides an edge node processing device, including:
  • the acquisition module is used to obtain the host name, service certificate and cluster node list corresponding to the current edge node;
  • the determination module is used to determine the connection status of the current edge node based on the relationship between the host name, service certificate and cluster node list. If the connection status is to be started, the registration module is triggered. If the connection status is to be started, the registration module is triggered. Start the main module. If the connection status is to be cleaned, the deletion module is triggered. If the connection status is abnormal, the stop module is triggered;
  • Start-up registration module used to start-up and register the current edge node
  • Stop module used to stop using the current edge node.
  • this application also provides an edge node processing device, including:
  • Memory used to store computer programs
  • the processor is configured to implement the steps of the above-mentioned edge node processing method when executing a computer program.
  • this application also provides a non-volatile readable storage medium.
  • a computer program is stored on the non-volatile readable storage medium.
  • the computer program is executed by the processor, the above-mentioned processing of the edge node is implemented. Method steps.
  • This application provides a method for processing edge nodes, including obtaining the host name, service certificate and cluster node list corresponding to the current edge node; determining the connection status of the current edge node based on the relationship between the host name, service certificate and cluster node list; if If the connection status is to be started, the current edge node will be started and registered; if the connection status is to be started as the main body state, the main process of the current edge node will be started; if the connection status is to be cleaned up, the service certificate will be deleted; if the connection status is to be started, the main process of the current edge node will be started. If it is in an abnormal state, stop using the current edge node.
  • This method determines the connection status of the current edge node by obtaining the host name, service certificate and cluster node list corresponding to the current edge node, and then determines different subsequent processes based on different connection statuses.
  • connection status When the connection status is to be started, start it Registration.
  • connection status When the connection status is the subject state to be started, the subject process is started.
  • the connection status is the state to be cleaned, the service certificate is deleted.
  • connection status is abnormal, the current edge node is stopped.
  • connection status other than the pending state the edge node will not start registration again, but will process it according to the process corresponding to other states, avoiding the existing inability to determine the state of the edge node before connecting to the cluster, and thus This causes the problem of repeated registration after blind startup.
  • this application also provides an edge node processing device and a non-volatile readable storage medium, which have the same beneficial effects as the above edge node processing method.
  • Figure 1 is an application schematic diagram of the connection relationship between the management terminal and the edge management service
  • FIG. 2 is a flow chart of an edge node processing method provided by an embodiment of the present application.
  • FIG. 3 is a structural diagram of an edge node processing device provided by an embodiment of the present application.
  • FIG. 4 is a structural diagram of another edge node processing device provided by an embodiment of the present application.
  • the core of this application is to provide a processing method, device and medium for edge nodes to avoid blind startup of edge nodes and thus repeated registration.
  • edge node processing method is performed before the edge node service is started.
  • the edge node service is in the edge cloud, and the edge node replaces the core service (kubelet) of kubernetes for container management and status.
  • the reporting service interacts directly with the edge management service, determines the relationship between the current edge node and the cluster by obtaining the following information, and starts or processes the edge node in other process states as needed.
  • FIG. 2 is a flow chart of an edge node processing method provided by an embodiment of the present application. As shown in Figure 2, the method includes:
  • S11 Obtain the host name, service certificate and cluster node list corresponding to the current edge node.
  • edge node C needs to connect to cluster B according to the assigned tasks. Before connecting, you need to check the connection status of edge node C to see whether it has established a connection with cluster B in the previous cluster task, and whether there are other clusters that have not been connected yet. Cleaned data so that when edge node C is started in an uncleaned state to connect to cluster B, it will automatically register to other clusters due to the startup mechanism of the edge node.
  • the host name of the current edge node which is the node host name of edge node C on the local side, so as to facilitate comparison of the cluster node list. Determine whether this edge node is included in the node list, and the host name will also be used during the subsequent running of the main process of the edge node.
  • Obtaining the cluster node list refers to obtaining the cluster node list corresponding to the target cluster that needs to establish a connection.
  • the cluster node list can be obtained through the management node deployed in the kubernetes container cluster, or the allocation can be obtained directly through the management terminal. This application does not impose specific restrictions.
  • S12 Determine the connection status of the current edge node based on the relationship between the host name, service certificate and cluster node list.
  • an edge node service certificate exists on the current edge node. If an edge node service certificate exists on the current edge node, it means that the local end still has the service certificate of the target cluster corresponding to the subsequent connection establishment, and the edge node service has not been destroyed.
  • Cluster node list exists for the host name corresponding to the current edge node. If the cluster node list exists for the host name corresponding to the current edge node, it means that the management side has not deleted the current edge node.
  • connection status of the current edge node can be determined. It is understandable that the order of the combination of the two judgments can be reversed. First, it is judged whether the edge node service certificate exists on the current edge node, and then the host corresponding to the current edge node is judged. Whether the name exists in the cluster node list is the same as first determining whether the host name corresponding to the current edge node exists in the cluster node list, and then determining whether the current edge node exists the edge node service certificate. The determination method is not specifically limited in this application and will depend on the actual situation. Depends.
  • connection status determined in step S12 is the waiting state, it means that the current edge node does not have an edge node service certificate, and its host name does not exist in the cluster node list. It is further explained that there is no previous connection between the current edge node and the target cluster, which is the situation before the edge node is registered. Then, the current edge node is initialized and started, the service certificate is obtained, the edge node service is started, the current edge node is registered to the management end, and the main process is started.
  • connection status is the main body state to be started, start the main process of the current edge node.
  • step S12 If the other connection statuses other than waiting to be started determined in step S12 include the main body status to be started, the status to be cleaned, and the abnormal status, it means that the current edge node has been connected to the target cluster before, or its management end, The local side has the startup service program of the current edge node. Due to the combination of the two judgment methods, its process status is different. The current edge node is processed according to different processes.
  • the edge node startup service includes registering and starting the subject process, and the subject process refers to the establishment of the edge management service with the cluster management end. Long connection, regularly reports the status of the edge node and the status of the container on the edge node, and receives instructions and execution programs from the edge management service.
  • the service certificate needs to be deleted to ensure the synchronization of data corresponding to the edge node startup service of the target cluster, and the edge node service must be shut down at the same time.
  • connection status When the connection status is abnormal, it means that the current edge node cannot be used.
  • This application provides a method for processing edge nodes, including obtaining the host name, service certificate and cluster node list corresponding to the current edge node; determining the connection status of the current edge node based on the relationship between the host name, service certificate and cluster node list; if If the connection status is to be started, the current edge node will be started and registered; if the connection status is to be started as the main body state, the main process of the current edge node will be started; if the connection status is to be cleaned up, the service certificate will be deleted; if the connection status is to be started, the main process of the current edge node will be started. If it is in an abnormal state, stop using the current edge node.
  • This method determines the connection status of the current edge node by obtaining the host name, service certificate and cluster node list corresponding to the current edge node, and then determines different subsequent processes based on different connection statuses.
  • connection status When the connection status is to be started, start it Registration.
  • connection status When the connection status is the subject state to be started, the subject process is started.
  • the connection status is the state to be cleaned, the service certificate is deleted.
  • connection status is abnormal, the current edge node is stopped.
  • connection status other than the pending state the edge node will not start registration again, but will process it according to the process corresponding to other states, avoiding the existing inability to determine the state of the edge node before connecting to the cluster, and thus This causes the problem of repeated registration after blind startup.
  • determining the connection status of the current edge node based on the relationship between the host name, service certificate and cluster node list in step S12 includes:
  • cluster node list contains the host name, determine that the connection status is the subject state to be started;
  • cluster node list does not include the host name, determine that the connection status is pending cleanup
  • the connection status is determined to be abnormal
  • cluster node list does not contain the host name, determine that the connection status is to be started.
  • the service certificate exists in the edge node, it means that the local edge node service for the current edge node of the target cluster has not been deleted, and then it is further determined whether the cluster node list contains the host name. If the cluster node list contains the host name, the edge node has been registered with the management side before and the service has been started. It can be noted that starting the service includes two steps, first registering and then starting the main process. The current edge node has been registered and needs to enter the steps of starting the main process.
  • the cluster node list does not contain the host name, it means that the target cluster has previously established a connection with the current edge node, but the management side has deleted the current edge node.
  • the connection status of the current edge node is in the pending state. The local data needs to be cleaned locally, and the edge node service needs to be closed and deleted.
  • the service certificate does not exist in the edge node, it means that the local end has deleted the edge node service for the current edge node of the target cluster, and then further determines whether the cluster node list contains the host name. If the cluster node list contains the host name, the edge node was previously registered to the management side, but the relevant certificate of the edge node service on the local side was deleted, causing the edge node service to fail to start. Therefore, it is determined that the connection status of the current edge node is abnormal and needs to be Staff intervened to make repairs.
  • the cluster node list does not contain the host name, it means that the target cluster has not established any connection with the current edge node, and neither the local end nor the management end has any data about the edge node. Then it is determined that the connection status of the current edge node is in the waiting state. .
  • the method provided by the embodiment of this application determines the connection status of the current edge node based on the relationship between the host name, service certificate and cluster node list. It first detects whether the service certificate exists on the node, and then determines whether the cluster node list contains the host name, and determines accordingly.
  • the connection status of the four current edge nodes is used to determine the different processes of the current edge node based on the different connection status to avoid blind startup of the edge node.
  • the connection relationship determined at this time is in a pending state.
  • the current edge node has a connection with the target cluster before, or has established a connection with other clusters.
  • the management end deletes data, but the data connected by other clusters to the target cluster has not been deleted locally.
  • This embodiment provides that if the connection status is to be cleaned, the service certificate, configuration information corresponding to the current edge node service, database and logs are deleted. Facilitates connection between target clusters and enables remote cleanup control operations.
  • the current edge node is started and registered, specifically including:
  • the pending startup status indicates that the current edge node does not have any connection with the target cluster. It is necessary to generate the service certificate corresponding to the current edge node, start the database, start the registration of the current edge node to the management end, and also include the initialization configuration file, etc.
  • This application provides the initialization of the current edge node, generating the service certificate corresponding to the current edge node, starting the database, and registering the current edge node to the management terminal. Further starting the edge node service solves the problem of blind restart of edge nodes. Registration needs to be started only when the connection status is to be started.
  • the program involved in the edge node processing method provided by this application is an executable file and does not need to be run permanently. Therefore, after determining the connection status, you can delete the driver of the current edge node so that the driver can be installed again to free up memory when the edge node is started next time.
  • the driver corresponding to the current edge node When installing the driver corresponding to the current edge node, it can be used as part of the edge node service dependency, and the installation process is merged into the process of adding nodes.
  • the management side starts the file transfer service (Apache HTTP Server/Apache Hyper Text Transfer Protocol Server, httpd), the dependency files required for the edge node service are released for download.
  • the edge management service generates the deployment command of the edge node service, and the user copies the deployment The command is executed on the edge node, downloads the dependency files required for the edge node service from the httpd service on the management side, and then starts the edge node service.
  • This embodiment provides that after determining the connection status of the current edge node, the driver corresponding to the current edge node is uninstalled so that the driver can be installed when the current edge node is started next time to release the container memory of the edge node.
  • obtaining the cluster node list in step S11 includes:
  • kube-apiserver is one of the core services of kubernetes. It is deployed on the management node of the kubernetes cluster and provides a set of Hyper Text Transfer Protocol/Hyper Text Transfer Protocol Security (Hyper Text Transfer Protocol/Hyper Text Transfer Protocol Secure, HTTP/HTTPS ) interface is for external connection, and its kubernetes belongs to cluster deployment.
  • HTTP/HTTPS Hyper Text Transfer Protocol/Hyper Text Transfer Protocol Secure
  • the core function of kube-apiserver is to provide various resource objects of kubernetes, such as the smallest unit of kubernetes (Pod), the number of managed Pods (Replication Controller, RC), services (Service), etc.
  • HTTP Rest Real State Transfer
  • This application obtains the cluster node list through the kube-apiserver interface only as some preferred embodiments.
  • This embodiment provides a list of cluster nodes through the kube-apiserver interface, provides a complete cluster security mechanism, implements storage operations responsible for cluster status, and provides interaction and communication with other data.
  • connection status when the connection status is abnormal, it means that the current edge node cannot be used, including:
  • a prompt message is output to remind the staff and stop using the current edge node, and start the repair mechanism.
  • prompt information You can set up an alarm device at the edge node to sound a whistle, or set up a fault light. When an abnormal state occurs, the fault light flashes. Since edge nodes are connected remotely, alarm messages can be set on the management side to remind staff to perform inspections and repairs. You can set it according to the actual situation.
  • This embodiment provides that when the connection status is abnormal, prompt information is output to remind the staff to handle it.
  • FIG. 3 shows an edge node processing provided by the embodiment of the present application. Structural diagram of the device. As shown in Figure 3, the processing device of the edge node includes:
  • the acquisition module 11 is used to obtain the host name, service certificate and cluster node list corresponding to the current edge node;
  • the determination module 12 is used to determine the connection status of the current edge node based on the relationship between the host name, service certificate and cluster node list. If the connection status is the waiting state, trigger the startup registration module 13. If the connection status is the waiting main state, Then the main body module 14 is triggered. If the connection status is to be cleaned, the deletion module 15 is triggered. If the connection status is an abnormal status, the stop module 16 is triggered;
  • Start registration module 13 used to start registration of the current edge node
  • Stop module 16 used to stop using the current edge node.
  • An edge node processing device includes obtaining the host name, service certificate and cluster node list corresponding to the current edge node; determining the connection status of the current edge node based on the relationship between the host name, service certificate and cluster node list; if If the connection status is to be started, the current edge node will be started and registered; if the connection status is to be started as the main body state, the main process of the current edge node will be started; if the connection status is to be cleaned up, the service certificate will be deleted; if the connection status is to be started, the main process of the current edge node will be started. If it is in an abnormal state, stop using the current edge node.
  • the device determines the connection status of the current edge node by obtaining the host name, service certificate and cluster node list corresponding to the current edge node, and then determines the subsequent different processes according to different connection statuses.
  • the connection status When the connection status is in the waiting state, it starts Registration.
  • the connection status is the subject state to be started, the subject process is started.
  • the connection status is the state to be cleaned, the service certificate is deleted.
  • the connection status is abnormal, the current edge node is stopped.
  • connection status other than the pending state the edge node will not start registration again, but will process it according to the process corresponding to other states, avoiding the existing inability to determine the state of the edge node before connecting to the cluster, and thus This causes the problem of repeated registration after blind startup.
  • FIG 4 is a structural diagram of another edge node processing device provided by an embodiment of the present application. As shown in Figure 4, the device includes:
  • Memory 21 used to store computer programs
  • the processor 22 is configured to implement the steps of the edge node processing method when executing a computer program.
  • the edge node processing device may include but is not limited to a smart phone, a tablet computer, a notebook computer or a desktop computer.
  • the processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc.
  • the processor 22 can adopt at least one hardware form among a digital signal processor (Digital Signal Processor, DSP), a field-programmable gate array (Field-Programmable Gate Array, FPGA), and a programmable logic array (Programmable Logic Array, PLA). to fulfill.
  • DSP Digital Signal Processor
  • FPGA field-programmable gate array
  • PROgrammable Logic Array PLA
  • the processor 22 may also include a main processor and a co-processor.
  • the main processor is a processor used to process data in the wake-up state, also called a central processing unit (Central Processing Unit, CPU); the co-processor is A low-power processor used to process data in standby mode.
  • CPU Central Processing Unit
  • the processor 22 may be integrated with a graphics processor (Graphics Processing Unit, GPU), and the GPU is responsible for rendering and drawing content that needs to be displayed on the display screen.
  • the processor 22 may also include an artificial intelligence (Artificial Intelligence, AI) processor, which is used to process computing operations related to machine learning.
  • AI Artificial Intelligence
  • Memory 21 may include one or more non-volatile readable storage media, which may be non-transitory.
  • the memory 21 may also include high-speed random access memory, and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices.
  • the memory 21 is at least used to store the following computer program 211. After the computer program is loaded and executed by the processor 22, the relevant steps of the edge node processing method disclosed in any of the foregoing embodiments can be implemented.
  • the resources stored in the memory 21 may also include the operating system 212, data 213, etc., and the storage method may be short-term storage or permanent storage.
  • the operating system 212 may include Windows, Unix, Linux, etc.
  • the data 213 may include but is not limited to data related to the processing method of the edge node, etc.
  • the processing device of the edge node may also include a display screen 23, an input and output interface 24, a communication interface 25, a power supply 26, and a communication bus 27.
  • Figure 4 does not constitute a limitation on the processing device of the edge node, and may include more or fewer components than shown in the figure.
  • the processor 22 implements the edge node processing method provided in any of the above embodiments by calling instructions stored in the memory 21 .
  • An edge node processing device includes obtaining the host name, service certificate and cluster node list corresponding to the current edge node; determining the connection status of the current edge node based on the relationship between the host name, service certificate and cluster node list; if If the connection status is to be started, the current edge node will be started and registered; if the connection status is to be started as the main body state, the main process of the current edge node will be started; if the connection status is to be cleaned up, the service certificate will be deleted; if the connection status is to be started, the main process of the current edge node will be started. If it is in an abnormal state, stop using the current edge node.
  • the device determines the connection status of the current edge node by obtaining the host name, service certificate and cluster node list corresponding to the current edge node, and then determines the subsequent different processes according to different connection statuses.
  • the connection status When the connection status is in the waiting state, it starts Registration.
  • the connection status is the subject state to be started, the subject process is started.
  • the connection status is the state to be cleaned, the service certificate is deleted.
  • the connection status is abnormal, the current edge node is stopped.
  • connection status other than the pending state the edge node will not start registration again, but will process it according to the process corresponding to other states, avoiding the existing inability to determine the state of the edge node before connecting to the cluster, and thus This causes the problem of repeated registration after blind startup.
  • this application also provides a non-volatile readable storage medium.
  • a computer program is stored on the non-volatile readable storage medium.
  • the above-mentioned edge node processing method is implemented. step.
  • the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile readable storage medium.
  • the technical solution of the present application is essentially or contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a non-volatile computer software. All or part of the steps of the methods described in various embodiments of this application are executed in a readable storage medium.
  • non-volatile readable storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Stored Programmes (AREA)

Abstract

本申请公开了一种边缘节点的处理方法、装置及介质,适用于边缘计算技术领域。根据主机名、服务证书以及集群节点列表的关系确定当前边缘节点的连接状态;若连接状态为待启动状态,则将当前边缘节点进行启动注册;若连接状态为待启动主体状态,则启动当前边缘节点的主体进程;若连接状态为待清理状态,则删除服务证书;若连接状态为异常状态,则停止使用当前边缘节点。通过根据不同的连接状态进行后续的不同进程,当连接状态为待启动状态时,进行启动注册,当连接状态为其他状态时,边缘节点不会再次启动注册,而是根据对应的进程进行处理,避免现有的无法确定边缘节点的连接状态,进而导致的盲目启动后重复注册问题。

Description

一种边缘节点的处理方法、装置及介质
相关申请的交叉引用
本申请要求于2022年03月31日提交中国专利局、申请号202210331126.1、申请名称为“一种边缘节点的处理方法、装置及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及边缘计算技术领域,特别是涉及一种边缘节点的处理方法、装置及介质。
背景技术
随着互联网智能终端设备数量的急剧增加,传统云计算中心集中存储、计算的模式已经无法满足终端设备对于失效、容量、计算能力的需求,将云计算的能力下沉到边缘侧、设备侧,并通过中心进行统一交付、运维、管控,将是云计算的重要发展趋势。
各种边缘容器集群正是在这种趋势下诞生的,边缘容器集群比起传统的容器管理平台(kubernetes,K8s)容器集群,多了一个新的节点类型(边缘节点)。图1为管理端与边缘管理服务连接关系的应用示意图,如图1所示,边缘节点上运行的不是kubernetes的核心服务,而是一个边缘节点服务,在边缘节点上启动一个数据库,边缘节点服务最初从管理端获取数据后,将应用数据存在本地的数据库中,在实际应用场景中,由于网络延迟、波动或者断网情况经常发生,其边缘节点进而失联,因此边缘节点具备一定的自治能力。
边缘节点的管理采用注册机制,边缘节点服务启动后主动与边缘管理服务建立联系,认证通过后管理端将该边缘节点纳入集群节点列表,边缘节点在集群节点列表中的名称就是该边缘节点的主机名。由于无法得知边缘节点的当前连接状态,在每次启动边缘节点服务时都会进行启动注册操作。例如:当边缘节点与一个集群建立连接,执行完任务后与另一个集群在建立连接时,由于有之前集群的数据,当启动边缘节点时,虽管理端删除了该边缘节点,但该边缘节点对应的边缘节点服务并未删除,原本需要删除该边缘节点对应之前集群的数据,但此时会与之前集群再次建立连接,并将该边缘节点重复注册至管理端,违背了删除节点数据的初衷。
发明内容
本申请的目的是提供一种边缘节点的处理方法、装置及介质,避免边缘节点的盲目启动进而导致的重复注册。
为解决上述技术问题,本申请提供一种边缘节点的处理方法,包括:
获取当前边缘节点对应的主机名、服务证书以及集群节点列表;
根据主机名、服务证书以及集群节点列表的关系确定当前边缘节点的连接状态;
若连接状态为待启动状态,则将当前边缘节点进行启动注册;
若连接状态为待启动主体状态,则启动当前边缘节点的主体进程;
若连接状态为待清理状态,则删除服务证书;
若连接状态为异常状态,则停止使用当前边缘节点。
在一些实施例中,根据主机名、服务证书以及集群节点列表的关系确定当前边缘节点的连接状态,包括:
当检测到服务证书存在时,判断集群节点列表是否包含主机名;
若集群节点包含主机名,则确定连接状态为待启动主体状态;
若集群节点不包含主机名,则确定连接状态为待清理状态;
当检测到服务证书不存在时,判断集群节点列表是否包含主机名;
若集群节点列表包含主机名,则确定连接状态为异常状态;
若集群节点列表不包含主机名,则确定连接状态为待启动状态。
在一些实施例中,在若连接状态为待清理状态,则删除服务证书之后,还包括:
删除当前边缘节点对应的配置信息、数据库以及日志。
在一些实施例中,若连接状态为待启动状态,则将当前边缘节点进行启动注册,包括:
生成当前边缘节点对应的服务证书、启动数据库以及启动当前边缘节点注册至管理端。
在一些实施例中,在确定当前边缘节点的连接状态之后,还包括:
卸载当前边缘节点对应的驱动程序以便下次启动当前边缘节点时安装驱动程序。
在一些实施例中,获取集群节点列表,包括:
访问管理端对应的集群节点的kube-apiserver调用接口以获取集群节点列表。
在一些实施例中,还包括:
当连接状态为异常状态时,则输出提示信息。
为解决上述技术问题,本申请还提供一种边缘节点的处理装置,包括:
获取模块,用于获取当前边缘节点对应的主机名、服务证书以及集群节点列表;
确定模块,用于根据主机名、服务证书以及集群节点列表的关系确定当前边缘节点的连接状态,若连接状态为待启动状态,则触发启动注册模块,若连接状态为待启动主体状态,则触发启动主体模块,若连接状态为待清理状态,则触发删除模块,若连接状态为异常状态,则触发停止模块;
启动注册模块,用于将当前边缘节点进行启动注册;
启动主体模块,用于启动当前边缘节点的主体进程;
删除模块,用于删除服务证书;
停止模块,用于停止使用当前边缘节点。
为解决上述技术问题,本申请还提供一种边缘节点的处理装置,包括:
存储器,用于存储计算机程序;
处理器,用于执行计算机程序时实现如上述的边缘节点的处理方法的步骤。
为解决上述技术问题,本申请还提供一种非易失性可读存储介质,非易失性可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述的边缘节点的处理方法的步骤。
本申请提供的一种边缘节点的处理方法,包括获取当前边缘节点对应的主机名、服务证书以及集群节点列表;根据主机名、服务证书以及集群节点列表的关系确定当前边缘节点的连接状态;若连接状态为待启动状态,则将当前边缘节点进行启动注册;若连接状态为待启动主体状态,则启动当前边缘节点的主体进程;若连接状态为待清理状态,则删除服务证书;若连接状态为异常状态,则停止使用当前边缘节点。该方法通过获取当前边缘节点对应的主机名、服务证书以及集群节点列表确定当前的边缘节点的连接状态,进而根据不同的连接状态确定后续的不同进程,当连接状态为待启动状态时,进行启动注册,当连接状态为待启动主体状态时,则启动主体进程,当连接状态为待清理状态时,则删除服务证书,当连接状态为异常状态时,则停止使用当前边缘节点。综上,连接状态除待启动状态之外的其他状态,边缘节点不会再次启动注册,而是根据其他状态对应的进程进行处理,避免现有的无法确定边缘节点在连接集群之前的状态,进而导致的盲目启动后重复注册问题。
另外,本申请还提供了一种边缘节点的处理装置及非易失性可读存储介质,具有如上述边缘节点的处理方法相同的有益效果。
附图说明
为了更清楚地说明本申请实施例,下面将对实施例中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为管理端与边缘管理服务连接关系的应用示意图;
图2为本申请实施例提供的一种边缘节点的处理方法的流程图;
图3为本申请实施例提供的一种边缘节点的处理装置的结构图;
图4为本申请实施例提供的另一种边缘节点的处理装置的结构图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描 述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本申请保护范围。
本申请的核心是提供一种边缘节点的处理方法、装置及介质,避免边缘节点的盲目启动进而导致的重复注册。
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和具体实施方式对本申请作进一步的详细说明。
需要说明的是,本申请提供的边缘节点的处理方法,是在边缘节点服务启动前进行,其中,边缘节点服务在边缘云中,边缘节点上代替kubernetes的核心服务(kubelet)进行容器管理及状态汇报的服务,直接与边缘管理服务交互,通过获取以下列信息判断当前的边缘节点与集群之间的关系,根据需要启动或者其他进程状态下的边缘节点的处理。
图2为本申请实施例提供的一种边缘节点的处理方法的流程图,如图2所示,该方法包括:
S11:获取当前边缘节点对应的主机名、服务证书以及集群节点列表。
可以理解的是,边缘节点服务启动之前需要与管理端的集群建立连接。例如:边缘节点C根据分配的任务需要与集群B连接,在连接之前,需要查看边缘节点C的连接状态,是否与集群B之前的集群任务中已经建立连接,是否还存有其他集群连接后未清理的数据,以便在未清理的状态下启动边缘节点C连接集群B时由于边缘节点的启动机制自动注册到其他集群。
需要获取当前边缘节点的主机名,也就是边缘节点C在本地端的节点主机名,以便于集群节点列表进行比对。判断本边缘节点是否包含在节点列表中,在后续的边缘节点的主体进程运行过程中也会用到主机名。
获取服务证书,便于检查本地的证书文件是否存在,需要说明的是,服务证书的获取仅能通过本地边缘节点获取。若从管理端获取服务证书,则无法确定后续的边缘节点连接状态。主机名和服务证书可以通过操作系统(Operating System,OS)获取。获取集群节点列表,指的是获取需要建立连接的目标集群对应的集群节点列表。其集群节点列表的获取途径可以通过部署在kubernetes容器集群的管理节点进行获取,还可以是通过管理端直接获取分配,本申请不做具体限定。
S12:根据主机名、服务证书以及集群节点列表的关系确定当前边缘节点的连接状态。
根据步骤S11中获取的主机名、服务证书以及集群节点列表之间的关系确定当前边缘节点的连接状态,该当前边缘节点是否存在边缘节点服务证书,本节点是否存在于集群节点列 表。
当前边缘节点是否存在边缘节点服务证书,若当前边缘节点存在边缘节点服务证书,则说明本地端还留有接下来建立连接对应的目标集群的服务证书,该边缘节点服务没有销毁。
当前边缘节点对应的主机名是否存在集群节点列表,若当前边缘节点对应的主机名存在集群节点列表,则说明管理端未删除该当前边缘节点。
结合上述两种判断则可以确定当前边缘节点的连接状态,可以理解的是,两种判断的结合其顺序可以对调,先判断当前边缘节点是否存在边缘节点服务证书,后判断当前边缘节点对应的主机名是否存在集群节点列表,与先判断当前边缘节点对应的主机名是否存在集群节点列表,后判断当前边缘节点是否存在边缘节点服务证书,其确定方式相同,本申请不做具体限定,视实际情况而定。
S13:若连接状态为待启动状态,则将当前边缘节点进行启动注册。
在步骤S12中确定的连接状态为待启动状态时,则说明当前边缘节点不存在边缘节点服务证书,其主机名也不存在于集群节点列表。进一步说明当前边缘节点与目标集群之前未有任何连接,是边缘节点未注册之前的情况。进而将当前边缘节点进行初始化启动,获取服务证书,启动边缘节点服务,将该当前边缘节点注册到管理端,启动主体进程。
S14:若连接状态为待启动主体状态,则启动当前边缘节点的主体进程。
在步骤S12中确定的除待启动之外的其他连接状态包括待启动主体状态、待清理状态和异常状态,则说明当前边缘节点之前与目标集群有过连接,或者断开连接后其管理端、本地端有该当前边缘节点的启动服务程序,由于两种判断方式的结合,其进程状态各有不同。根据不同的进程处理当前边缘节点。
当连接状态为待启动主体状态时,则启动当前边缘节点的主体进程,在上述实施例中提到边缘节点启动服务包括注册和启动主体进程,其主体进程是指与集群管理端的边缘管理服务建立长连接,定时汇报本边缘节点的状态以及本边缘节点上的容器状态,同时接收来自边缘管理服务的指令及执行程序。
S15:若连接状态为待清理状态,则删除服务证书。
当连接状态为待清理状态时,则需要删除服务证书,保证与目标集群的边缘节点启动服务对应的数据的同步性,同时关闭边缘节点服务。
S16:若连接状态为异常状态,则停止使用当前边缘节点。
当连接状态为异常状态时,则说明当前边缘节点无法使用。
本申请提供的一种边缘节点的处理方法,包括获取当前边缘节点对应的主机名、服务证书以及集群节点列表;根据主机名、服务证书以及集群节点列表的关系确定当前边缘节点的 连接状态;若连接状态为待启动状态,则将当前边缘节点进行启动注册;若连接状态为待启动主体状态,则启动当前边缘节点的主体进程;若连接状态为待清理状态,则删除服务证书;若连接状态为异常状态,则停止使用当前边缘节点。该方法通过获取当前边缘节点对应的主机名、服务证书以及集群节点列表确定当前的边缘节点的连接状态,进而根据不同的连接状态确定后续的不同进程,当连接状态为待启动状态时,进行启动注册,当连接状态为待启动主体状态时,则启动主体进程,当连接状态为待清理状态时,则删除服务证书,当连接状态为异常状态时,则停止使用当前边缘节点。综上,连接状态除待启动状态之外的其他状态,边缘节点不会再次启动注册,而是根据其他状态对应的进程进行处理,避免现有的无法确定边缘节点在连接集群之前的状态,进而导致的盲目启动后重复注册问题。
在上述实施例中,步骤S12中的根据主机名、服务证书以及集群节点列表的关系确定当前边缘节点的连接状态,包括:
当检测到服务证书存在时,判断集群节点列表是否包含主机名;
若集群节点列表包含主机名,则确定连接状态为待启动主体状态;
若集群节点列表不包主机名含,则确定连接状态为待清理状态;
当检测到服务证书不存在时,判断集群节点列表是否包含主机名;
若集群节点列表包含主机名,则确定连接状态为异常状态;
若集群节点列表不包含主机名,则确定连接状态为待启动状态。
具体地,当检测到服务证书存在于该边缘节点时,说明本地端针对目标集群的当前边缘节点的边缘节点服务未删除,则进一步判断集群节点列表是否包含主机名。若集群节点列表包含主机名,则该边缘节点之前已经注册至管理端,已经进行了启动服务。可以说明的是,启动服务包括两个步骤,先注册后进行启动主体进程。当前边缘节点已经注册,需要进入启动主体进程的步骤。
若集群节点列表不包含主机名,则说明目标集群与当前边缘节点之前建立连接,但是管理端已经删除该当前边缘节点。为了与目标集群在后续连接时的数据同步,此时确定当前边缘节点的连接状态为待清理状态,需要在本地端将本地端的数据进行清理,关闭并删除边缘节点服务等。
当检测到服务证书不存在于该边缘节点时,说明本地端针对目标集群的当前边缘节点的边缘节点服务删除,则进一步判断集群节点列表是否包含主机名。若集群节点列表包含主机名,则该边缘节点之前注册到管理端,但是在本地端的边缘节点服务的相关证书删除,导致边缘节点服务无法启动,故确定当前边缘节点的连接状态为异常状态,需要工作人员进行干预维修。
若集群节点列表不包含主机名,则说明目标集群与当前边缘节点未建立任何连接,其本地端与管理端都没有任何关于该边缘节点的数据,则确定当前边缘节点的连接状态为待启动状态。
先检测服务证书是否存在于该节点,再判断集群节点列表是否包含主机名仅是一些优选实施例,也可以先判断集群节点列表是否包含主机名,再检测服务证书是否存在于该节点,本申请不做具体限定。
本申请实施例提供的根据主机名、服务证书以及集群节点列表的关系确定当前边缘节点的连接状态,根据先检测服务证书是否存在于该节点,再判断集群节点列表是否包含主机名,分别对应确定四种当前边缘节点的连接状态,为后续根据不同的连接状态进而确定当前边缘节点的不同进程,避免出现边缘节点的盲目启动。
在上述实施例的基础上,在若连接状态为待清理状态,则删除服务证书之后,还包括:
删除当前边缘节点对应的配置信息、数据库以及日志。
可以理解的是,当前边缘节点在与目标集群建立连接之前,此时确定的连接关系为待清理状态,当前边缘节点与目标集群之前有过连接,或者与其他集群建立连接,此时管理端删除数据,但本地端对于其他集群与目标集群建立连接的数据都并未删除。
为了便于建立目标集群的连接,需要将其他集群之前建立连接的相关数据进行删除,即配置信息、数据库以及日志。为了同步与目标集群的边缘节点启动服务,需要将与目标集群之前建立连接的相关数据进行删除,即对应的配置信息、数据库以及日志。
本实施例提供的若连接状态为待清理状态,则删除服务证书、当前边缘节点服务对应的配置信息、数据库以及日志。便于目标集群之间的连接,实现远程清理控制操作。
在上述实施例的基础上,当连接关系为待启动状态时,将当前边缘节点进行启动注册,具体包括:
生成当前边缘节点对应的服务证书、启动数据库以及启动当前边缘节点注册至管理端。
具体地,待启动状态说明当前边缘节点与目标集群未有任何连接,需要生成当前边缘节点对应的服务证书、启动数据库以及启动当前边缘节点注册到管理端,还包括初始化配置文件等。
本申请提供的对当前边缘节点进行初始化,生成当前边缘节点对应的服务证书、启动数据库以及将当前边缘节点注册至管理端。进一步启动边缘节点服务,解决了边缘节点盲目重启问题,只有当连接状态为待启动状态时需要启动注册。
在上述实施例的基础上,在确定当前边缘节点的连接状态之后,还包括:
卸载当前边缘节点对应的驱动程序,以便下次启动当前边缘节点时安装驱动程序。
可以理解的是,本申请提供的边缘节点的处理方法涉及的程序为可执行文件,不需要常驻运行。故在确定完连接状态后,可以将当前边缘节点的驱动程序删除,以便下次启动边缘节点时再次安装驱动程序以释放内存。
在安装当前边缘节点对应的驱动程序时,可以作为边缘节点服务依赖的一部分,安装过程合并到节点增加的流程中。当管理端启动文件传输服务(Apache HTTP Server/Apache Hyper Text Transfer Protocol Server,httpd)时,将边缘节点服务所需依赖文件发布以供下载,边缘管理服务生成边缘节点服务的部署命令,用户拷贝部署命令到边缘节点执行,从管理端的httpd服务下载边缘节点服务所需依赖文件,进而启动边缘节点服务。
本实施例提供的在确定当前边缘节点的连接状态之后,卸载当前边缘节点对应的驱动程序,以便下次启动当前边缘节点时安装驱动程序,实现释放边缘节点的容器内存。
在一些实施例中,在步骤S11中的获取集群节点列表,包括:
访问管理端对应的集群节点的kube-apiserver调用接口以获取集群节点列表。
具体地,kube-apiserver是kubernetes核心服务之一,部署在kubernetes集群的管理节点上,提供一组超文本传输协议/超文本传输协议安全(Hyper Text Transfer Protocol/Hyper Text Transfer Protocol Secure,HTTP/HTTPS)接口供外部连接,其kubernetes属于集群化部署。
kube-apiserver的核心功能是提供kubernetes各类资源对象,如kubernetes的最小单元(Pod)、管理Pod的数量(Replication Controller,RC)、服务(Service)等的增、删、改、查等HTTP Rest(Representational State Transfer,表述性状态转移)接口,成为集群内各个功能模块之间数据交互和通信的中心枢纽,是整个系统的数据总线和数据中心。本申请通过kube-apiserver接口获取集群节点列表仅是一些优选实施例。
本实施例提供的通过kube-apiserver接口获取集群节点列表,提供完备的集群安全机制,实现负责集群状态的存储操作,提供与其他数据交互和通信。
在上述实施例的基础上,当连接状态为异常状态时,说明当前边缘节点无法使用,还包括:
当连接状态为异常状态时,输出提示信息。
具体地,输出提示信息以提醒工作人员并停止使用当前边缘节点,启动报修机制。对于提示信息的设置不做具体限定,可以在边缘节点处设置一个报警装置,进行鸣笛,或者设置故障灯,当出现异常状态时,故障灯进行闪烁。由于边缘节点远程连接,所以可以在管理端设置报警信息,以提醒工作人员进行检查修理。可以视实际情况进行设定即可。
本实施例提供的当连接状态为异常状态时,输出提示信息,提醒工作人员进行处理。
上述详细描述了边缘节点的处理方法对应的各个实施例,在此基础上,本申请还公开与上述方法对应的边缘节点的处理装置,图3为本申请实施例提供的一种边缘节点的处理装置的结构图。如图3所示,边缘节点的处理装置包括:
获取模块11,用于获取当前边缘节点对应的主机名、服务证书以及集群节点列表;
确定模块12,用于根据主机名、服务证书以及集群节点列表的关系确定当前边缘节点的连接状态,若连接状态为待启动状态,则触发启动注册模块13,若连接状态为待启动主体状态,则触发启动主体模块14,若连接状态为待清理状态,则触发删除模块15,若连接状态为异常状态,则触发停止模块16;
启动注册模块13,用于将当前边缘节点进行启动注册;
启动主体模块14,用于启动当前边缘节点的主体进程;
删除模块15,用于删除服务证书;
停止模块16,用于停止使用当前边缘节点。
由于装置部分的实施例与上述的实施例相互对应,因此装置部分的实施例请参照上述方法部分的实施例描述,在此不再赘述。
本申请提供的一种边缘节点的处理装置,包括获取当前边缘节点对应的主机名、服务证书以及集群节点列表;根据主机名、服务证书以及集群节点列表的关系确定当前边缘节点的连接状态;若连接状态为待启动状态,则将当前边缘节点进行启动注册;若连接状态为待启动主体状态,则启动当前边缘节点的主体进程;若连接状态为待清理状态,则删除服务证书;若连接状态为异常状态,则停止使用当前边缘节点。该装置通过获取当前边缘节点对应的主机名、服务证书以及集群节点列表确定当前的边缘节点的连接状态,进而根据不同的连接状态确定后续的不同进程,当连接状态为待启动状态时,进行启动注册,当连接状态为待启动主体状态时,则启动主体进程,当连接状态为待清理状态时,则删除服务证书,当连接状态为异常状态时,则停止使用当前边缘节点。综上,连接状态除待启动状态之外的其他状态,边缘节点不会再次启动注册,而是根据其他状态对应的进程进行处理,避免现有的无法确定边缘节点在连接集群之前的状态,进而导致的盲目启动后重复注册问题。
图4为本申请实施例提供的另一种边缘节点的处理装置的结构图,如图4所示,该装置包括:
存储器21,用于存储计算机程序;
处理器22,用于执行计算机程序时实现边缘节点的处理方法的步骤。
本实施例提供的边缘节点的处理装置可以包括但不限于智能手机、平板电脑、笔记本电脑或者台式电脑等。
其中,处理器22可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器22可以采用数字信号处理器(Digital Signal Processor,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器22也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称中央处理器(Central Processing Unit,CPU);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器22可以集成有图像处理器(Graphics Processing Unit,GPU),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器22还可以包括人工智能(Artificial Intelligence,AI)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器21可以包括一个或多个非易失性可读存储介质,该非易失性可读存储介质可以是非暂态的。存储器21还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。本实施例中,存储器21至少用于存储以下计算机程序211,其中,该计算机程序被处理器22加载并执行之后,能够实现前述任一实施例公开的边缘节点的处理方法的相关步骤。另外,存储器21所存储的资源还可以包括操作系统212和数据213等,存储方式可以是短暂存储或者永久存储。其中,操作系统212可以包括Windows、Unix、Linux等。数据213可以包括但不限于边缘节点的处理方法所涉及到的数据等等。
在一些实施例中,边缘节点的处理装置还可包括有显示屏23、输入输出接口24、通信接口25、电源26以及通信总线27。
本领域技术人员可以理解,图4中示出的结构并不构成对边缘节点的处理装置的限定,可以包括比图示更多或更少的组件。
处理器22通过调用存储于存储器21中的指令以实现上述任一实施例所提供的边缘节点的处理方法。
本申请提供的一种边缘节点的处理装置,包括获取当前边缘节点对应的主机名、服务证 书以及集群节点列表;根据主机名、服务证书以及集群节点列表的关系确定当前边缘节点的连接状态;若连接状态为待启动状态,则将当前边缘节点进行启动注册;若连接状态为待启动主体状态,则启动当前边缘节点的主体进程;若连接状态为待清理状态,则删除服务证书;若连接状态为异常状态,则停止使用当前边缘节点。该装置通过获取当前边缘节点对应的主机名、服务证书以及集群节点列表确定当前的边缘节点的连接状态,进而根据不同的连接状态确定后续的不同进程,当连接状态为待启动状态时,进行启动注册,当连接状态为待启动主体状态时,则启动主体进程,当连接状态为待清理状态时,则删除服务证书,当连接状态为异常状态时,则停止使用当前边缘节点。综上,连接状态除待启动状态之外的其他状态,边缘节点不会再次启动注册,而是根据其他状态对应的进程进行处理,避免现有的无法确定边缘节点在连接集群之前的状态,进而导致的盲目启动后重复注册问题。
进一步的,本申请还提供了一种非易失性可读存储介质,非易失性可读存储介质上存储有计算机程序,计算机程序被处理器22执行时实现如上述边缘节点的处理方法的步骤。
可以理解的是,如果上述实施例中的方法以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个非易失性可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个非易失性可读存储介质中,执行本申请各个实施例所述方法的全部或部分步骤。而前述的非易失性可读存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
对于本申请提供的一种非易失性可读存储介质的介绍请参照上述方法实施例,本申请在此不再赘述,其具有上述边缘节点的处理方法相同的有益效果。
以上对本申请所提供的一种边缘节点的处理方法、装置及介质进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在 任何这种实际的关系或者顺序。而且,术语“包括”“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。

Claims (20)

  1. 一种边缘节点的处理方法,其特征在于,包括:
    获取当前边缘节点对应的主机名、服务证书以及集群节点列表;
    根据所述主机名、所述服务证书以及所述集群节点列表的关系确定所述当前边缘节点的连接状态;
    若所述连接状态为待启动状态,则将所述当前边缘节点进行启动注册;
    若所述连接状态为待启动主体状态,则启动所述当前边缘节点的主体进程;
    若所述连接状态为待清理状态,则删除所述服务证书;
    若所述连接状态为异常状态,则停止使用所述当前边缘节点。
  2. 根据权利要求1所述的边缘节点的处理方法,其特征在于,所述根据所述主机名、所述服务证书以及所述集群节点列表的关系确定所述当前边缘节点的连接状态,包括:
    当检测到所述服务证书存在时,判断所述集群节点列表是否包含所述主机名;
    若所述集群节点包含所述主机名,则确定所述连接状态为所述待启动主体状态;
    若所述集群节点不包含所述主机名,则确定所述连接状态为所述待清理状态;
    当检测到所述服务证书不存在时,判断所述集群节点列表是否包含所述主机名;
    若所述集群节点列表包含所述主机名,则确定所述连接状态为所述异常状态;
    若所述集群节点列表不包含所述主机名,则确定所述连接状态为所述待启动状态。
  3. 根据权利要求2所述的边缘节点的处理方法,其特征在于,在所述若所述连接状态为待清理状态,则删除所述服务证书之后,还包括:
    删除所述当前边缘节点对应的配置信息、数据库以及日志。
  4. 根据权利要求3所述的边缘节点的处理方法,其特征在于,所述若所述连接状态为待启动状态,则将所述当前边缘节点进行启动注册,包括:
    生成所述当前边缘节点对应的所述服务证书、启动所述数据库以及启动所述当前边缘节点注册至管理端。
  5. 根据权利要求4所述的边缘节点的处理方法,其特征在于,在所述生成所述当前边缘节点对应的所述服务证书、启动所述数据库以及启动所述当前边缘节点注册至管理端之后,所述方法还包括:
    初始化所述当前边缘节点对应的配置文件。
  6. 根据权利要求1所述的边缘节点的处理方法,其特征在于,所述获取当前边缘节点对应的主机名、服务证书以及集群节点列表,包括:
    获取当前边缘节点在本地端的节点主机名,并通过本地边缘节点获取所述当前边缘 节点对应的服务证书;
    获取需建立连接的目标集群所对应的集群节点列表。
  7. 根据权利要求1至6任意一项所述的边缘节点的处理方法,其特征在于,在确定所述当前边缘节点的所述连接状态之后,还包括:
    卸载所述当前边缘节点对应的驱动程序以便下次启动所述当前边缘节点时安装所述驱动程序。
  8. 根据权利要求1所述的边缘节点的处理方法,其特征在于,所述若所述连接状态为待启动状态,则将所述当前边缘节点进行启动注册,包括:
    若所述连接状态为待启动状态,则对所述当前边缘节点进行初始化启动,并获取所述当前边缘节点对应的服务证书;
    启动边缘节点服务,将所述当前边缘节点注册至管理端,并启动主体进程。
  9. 根据权利要求1所述的边缘节点的处理方法,其特征在于,所述若所述连接状态为待启动主体状态,则启动所述当前边缘节点的主体进程,包括:
    若所述连接状态为待启动主体状态,则启动所述当前边缘节点的主体进程,通过所述主体进程将所述当前边缘节点与集群管理端的边缘管理服务建立长连接,并定时获取所述当前边缘节点的连接状态以及容器状态,同时接收来自所述边缘管理服务的指令以及执行程序。
  10. 根据权利要求1所述的边缘节点的处理方法,其特征在于,所述若所述连接状态为待清理状态,则删除所述服务证书,包括:
    若所述连接状态为待清理状态,则删除所述服务证书,并关闭边缘节点服务。
  11. 根据权利要求4所述的边缘节点的处理方法,其特征在于,获取所述集群节点列表,包括:
    访问所述管理端对应的集群节点的kube-apiserver调用接口以获取所述集群节点列表。
  12. 根据权利要求2所述的边缘节点的处理方法,其特征在于,还包括:
    当所述连接状态为所述异常状态时,则输出提示信息。
  13. 根据权利要求12所述的边缘节点的处理方法,其特征在于,所述当所述连接状态为所述异常状态时,则输出提示信息,包括:
    当所述连接状态为所述异常状态时,则输出提示信息,同时启动报修机制。
  14. 根据权利要求12或13所述的边缘节点的处理方法,其特征在于,所述当前边缘节点处设置有报警装置,所述当所述连接状态为所述异常状态时,则输出提示信息, 包括:
    当所述连接状态为所述异常状态时,则触发所述报警装置的鸣笛机制,进行鸣笛。
  15. 根据权利要求12或13所述的边缘节点的处理方法,其特征在于,所述当前边缘节点处设置有故障灯,所述当所述连接状态为所述异常状态时,则输出提示信息,包括:
    当所述连接状态为所述异常状态时,则触发所述故障灯的闪烁机制,进行闪烁。
  16. 根据权利要求1所述的边缘节点的处理方法,其特征在于,在所述获取当前边缘节点对应的主机名、服务证书以及集群节点列表之前,所述方法还包括:
    在启动边缘节点服务之前,将所述当前边缘节点与管理端的集群建立连接。
  17. 根据权利要求17所述的边缘节点的处理方法,其特征在于,在所述将所述当前边缘节点与管理端的集群建立连接之前,所述方法还包括:
    若所述当前边缘节点存储有与历史连接集群建立连接后未清理的数据,则在启动所述当前边缘节点连接所述管理端的集群时,基于边缘节点的启动机制,将所述当前边缘节点自动注册至所述历史连接集群。
  18. 一种边缘节点的处理装置,其特征在于,包括:
    获取模块,用于获取当前边缘节点对应的主机名、服务证书以及集群节点列表;
    确定模块,用于根据所述主机名、所述服务证书以及所述集群节点列表的关系确定所述当前边缘节点的连接状态,若所述连接状态为待启动状态,则触发启动注册模块,若所述连接状态为待启动主体状态,则触发启动主体模块,若所述连接状态为待清理状态,则触发删除模块,若所述连接状态为异常状态,则触发停止模块;
    所述启动注册模块,用于将所述当前边缘节点进行启动注册;
    所述启动主体模块,用于启动所述当前边缘节点的主体进程;
    所述删除模块,用于删除所述服务证书;
    所述停止模块,用于停止使用所述当前边缘节点。
  19. 一种边缘节点的处理装置,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于执行所述计算机程序时实现如权利要求1至17任一项所述的边缘节点的处理方法的步骤。
  20. 一种非易失性可读存储介质,其特征在于,所述非易失性可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至17任一项所述的边缘节点的处理方法的步骤。
PCT/CN2022/141658 2022-03-31 2022-12-23 一种边缘节点的处理方法、装置及介质 Ceased WO2023185136A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210331126.1 2022-03-31
CN202210331126.1A CN114640709B (zh) 2022-03-31 2022-03-31 一种边缘节点的处理方法、装置及介质

Publications (1)

Publication Number Publication Date
WO2023185136A1 true WO2023185136A1 (zh) 2023-10-05

Family

ID=81952233

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/141658 Ceased WO2023185136A1 (zh) 2022-03-31 2022-12-23 一种边缘节点的处理方法、装置及介质

Country Status (2)

Country Link
CN (1) CN114640709B (zh)
WO (1) WO2023185136A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117938617A (zh) * 2024-03-19 2024-04-26 济南浪潮数据技术有限公司 设备管理方法、装置、计算机设备及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114640709B (zh) * 2022-03-31 2023-07-25 苏州浪潮智能科技有限公司 一种边缘节点的处理方法、装置及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009082978A1 (fr) * 2007-12-28 2009-07-09 Huawei Technologies Co., Ltd. Procédé de protection de réseau d'accès, système et nœud de bord d'accès
CN112087312A (zh) * 2019-06-15 2020-12-15 华为技术有限公司 一种提供边缘服务的方法、装置和设备
CN112187532A (zh) * 2020-09-18 2021-01-05 北京浪潮数据技术有限公司 一种节点管控方法及系统
CN114640709A (zh) * 2022-03-31 2022-06-17 苏州浪潮智能科技有限公司 一种边缘节点的处理方法、装置及介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111355610A (zh) * 2020-02-25 2020-06-30 网宿科技股份有限公司 一种基于边缘网络的异常处理方法及装置
CN111782370B (zh) * 2020-06-30 2022-12-06 平安科技(深圳)有限公司 一种kubernetes多集群管理系统、方法、终端及存储介质
CN113225214B (zh) * 2021-05-07 2023-04-07 浪潮通信技术有限公司 协同管理边缘cdn节点的方法、装置及计算机可读介质
CN113742031B (zh) * 2021-08-27 2022-11-04 北京百度网讯科技有限公司 节点状态信息获取方法、装置、电子设备及可读存储介质
CN113946443A (zh) * 2021-10-14 2022-01-18 上海明胜品智人工智能科技有限公司 边缘设备管理及主动注册方法、装置和电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009082978A1 (fr) * 2007-12-28 2009-07-09 Huawei Technologies Co., Ltd. Procédé de protection de réseau d'accès, système et nœud de bord d'accès
CN112087312A (zh) * 2019-06-15 2020-12-15 华为技术有限公司 一种提供边缘服务的方法、装置和设备
CN112187532A (zh) * 2020-09-18 2021-01-05 北京浪潮数据技术有限公司 一种节点管控方法及系统
CN114640709A (zh) * 2022-03-31 2022-06-17 苏州浪潮智能科技有限公司 一种边缘节点的处理方法、装置及介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117938617A (zh) * 2024-03-19 2024-04-26 济南浪潮数据技术有限公司 设备管理方法、装置、计算机设备及存储介质

Also Published As

Publication number Publication date
CN114640709B (zh) 2023-07-25
CN114640709A (zh) 2022-06-17

Similar Documents

Publication Publication Date Title
CN108600029B (zh) 一种配置文件更新方法、装置、终端设备及存储介质
CN111262908A (zh) 基于jenkins的任务构建方法及系统
WO2024077885A1 (zh) 容器集群的管理方法、装置、设备及非易失性可读存储介质
CN105468717B (zh) 数据库操作方法和装置
CN113742031B (zh) 节点状态信息获取方法、装置、电子设备及可读存储介质
US20130318512A1 (en) Hot Pluggable Extensions for Access Management System
WO2019076369A1 (zh) 一种云平台部署方法、装置、电子设备及可读存储介质
CN110943860B (zh) 一种bmc固件更新方法、系统、电子设备及存储介质
WO2017162173A1 (zh) 云服务器集群建立连接的方法和装置
CN114185734B (zh) 一种监控集群的方法、装置及电子设备
CN116627721B (zh) 基于混合云的云原生数据库恢复方法、设备及存储介质
CN113296805A (zh) 一种辅助容器实现热升级的方法及装置
WO2023185136A1 (zh) 一种边缘节点的处理方法、装置及介质
CN106506215A (zh) 一种基于cmdb的自动化运维系统
WO2023184875A1 (zh) 一种裸金属磁盘备份方法、装置及计算机可读存储介质
CN108900606A (zh) 一种跨系统实现数据共享的方法、装置及设备
CN114925052B (zh) 重启数据库的方法、装置、设备和计算机可读介质
CN114900449A (zh) 一种资源信息管理方法、系统及装置
US11720424B2 (en) Single flow execution
CN115291972A (zh) 一种K8s集群的环境配置方法、装置及电子设备
CN114996055B (zh) 一种双机热备系统控制方法、装置、介质
CN118626101A (zh) 微服务集群ci/cd的实现方法、装置及电子设备
CN115766405B (zh) 一种故障处理方法、装置、设备和存储介质
CN116149858A (zh) 一种云平台容器集群部署方法、装置、介质
CN115237485A (zh) 一种微服务的启动管理方法、装置、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22934951

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22934951

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02/04/2025)

122 Ep: pct application non-entry in european phase

Ref document number: 22934951

Country of ref document: EP

Kind code of ref document: A1