CN112822283B - Edge node control method and device, control node and storage medium - Google Patents

Edge node control method and device, control node and storage medium Download PDF

Info

Publication number
CN112822283B
CN112822283B CN202110083869.7A CN202110083869A CN112822283B CN 112822283 B CN112822283 B CN 112822283B CN 202110083869 A CN202110083869 A CN 202110083869A CN 112822283 B CN112822283 B CN 112822283B
Authority
CN
China
Prior art keywords
edge node
time
keep
node
alive
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.)
Active
Application number
CN202110083869.7A
Other languages
Chinese (zh)
Other versions
CN112822283A (en
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.)
Chongqing Unisinsight Technology Co Ltd
Original Assignee
Chongqing Unisinsight 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 Chongqing Unisinsight Technology Co Ltd filed Critical Chongqing Unisinsight Technology Co Ltd
Priority to CN202110083869.7A priority Critical patent/CN112822283B/en
Publication of CN112822283A publication Critical patent/CN112822283A/en
Application granted granted Critical
Publication of CN112822283B publication Critical patent/CN112822283B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • 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

Abstract

The invention relates to the technical field of edge computing, and provides a control method, a control device, a control node and a storage medium of an edge node, which are applied to the control node, wherein the control node is in communication connection with a first edge node, and the method comprises the following steps: acquiring current system time and pre-stored keep-alive time, wherein the keep-alive time is the time when the first edge node sends a keep-alive message to the control node last time; and if the time interval between the current system time and the keep-alive time is greater than a preset threshold value, judging that the first edge node is an abnormal node. Compared with the prior art, the method and the device can find the abnormal edge node in time under the condition of not depending on the edge node, so as to take corresponding measures in time and improve the reliability of the service.

Description

Edge node control method and device, control node and storage medium
Technical Field
The present invention relates to the field of edge computing technologies, and in particular, to a method and an apparatus for controlling an edge node, a control node, and a storage medium.
Background
In the edge network, a central cloud control node is usually simultaneously accessed to a plurality of edge nodes to manage the edge nodes, in order to know the connection state between the control node and the edge nodes in time, under a normal condition, the edge nodes initiate keep-alive requests to the control nodes at regular time, if response requests fed back by the control nodes are not received within a preset time period, the edge nodes judge that the connection between the edge nodes and the control nodes is abnormal, and in the mode, when the edge nodes are powered down, the control nodes cannot be informed in time, so that service interruption on the edge nodes is caused, and the reliability of service is influenced.
Disclosure of Invention
The invention aims to provide a control method and device of an edge node, a control node and a storage medium, wherein the control node can timely find abnormal edge nodes without being influenced by the self state of the edge node so as to take corresponding measures in time and improve the reliability of services.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides a method for controlling an edge node, where the method is applied to a control node, and the control node is in communication connection with a first edge node, where the method includes: acquiring current system time and pre-stored keep-alive time, wherein the keep-alive time is the time when the first edge node sends a keep-alive message to the control node last time; and if the time interval between the current system time and the keep-alive time is greater than a preset threshold value, judging that the first edge node is an abnormal node.
In a second aspect, the present invention provides an apparatus for controlling an edge node, where the apparatus is applied to a control node, and the control node is communicatively connected to a first edge node, and the apparatus includes:
an obtaining module, configured to obtain current system time and pre-stored keep-alive time, where the keep-alive time is time when the first edge node sends a keep-alive message to the control node last time; and the judging module is used for judging that the first edge node is an abnormal node if the time interval between the current system time and the keep-alive time is greater than a preset threshold value.
In a third aspect, the present invention provides a control node, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the control method of the edge node when executing the computer program.
In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the control method of an edge node as described above.
Compared with the prior art, the invention stores the keep-alive time of the edge node through the control node, the control node actively judges whether the interval threshold value between the current system time and the keep-alive time is larger than the preset threshold value, if so, the control node judges the edge node as an abnormal node, thereby timely finding the abnormal edge node under the condition of not depending on the edge node, so as to timely take corresponding measures and improve the reliability of the service.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 shows a schematic view of an application scenario provided in an embodiment of the present invention.
Fig. 2 is a block diagram illustrating a control node according to an embodiment of the present invention.
Fig. 3 shows a flowchart of a method for controlling an edge node according to an embodiment of the present invention.
Fig. 4 is a flowchart illustrating another method for controlling an edge node according to an embodiment of the present invention.
Fig. 5 is a flowchart illustrating another method for controlling an edge node according to an embodiment of the present invention.
Fig. 6 is a flowchart illustrating another method for controlling an edge node according to an embodiment of the present invention.
Fig. 7 is a flowchart illustrating another method for controlling an edge node according to an embodiment of the present invention.
Fig. 8 is a diagram illustrating an example of a processing sequence of a processing method for an edge node according to an embodiment of the present invention.
Fig. 9 is a block diagram illustrating a control apparatus of an edge node according to an embodiment of the present invention.
Fig. 10 is a block diagram illustrating an example of the structure of a control apparatus of an edge node according to an embodiment of the present invention.
Icon: 10-a control node; 11-a processor; 12-a memory; 13-a bus; 14-a communication interface; 20-edge nodes; 30-an intelligent terminal; 40-a web camera; 100-control means of edge nodes; 110-an obtaining module; 120-a decision module; 130-keep alive module; 140-scheduling module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined or explained in subsequent figures.
In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. indicate an orientation or a positional relationship based on that shown in the drawings or that the product of the present invention is used as it is, this is only for convenience of description and simplification of the description, and it does not indicate or imply that the device or the element referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and thus should not be construed as limiting the present invention.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic view illustrating an application scenario provided by an embodiment of the present invention, and fig. 1 (a), fig. 1 (b), and fig. 1 (c) are schematic views illustrating application scenarios when an edge node normally works, an exception occurs, and an exception recovers respectively. In fig. 1 (a), a control node 10 is in communication connection with 4 edge nodes 20, and the edge nodes 20 may communicate with different devices according to service needs, where in fig. 1 (a), the edge node 1 has access to n intelligent terminals 30, the edge node 2 has access to 3 network cameras 40, the edge node 3 has access to 3 network cameras 40, and the edge node 4 has access to 4 network cameras 40.
The webcam 40, also called IPC (IP Camra, IPC), is a new generation of webcam produced by combining traditional webcam and web technology, and can transmit the image to the other end of the earth through the web, and the remote browser can monitor the image without any professional software.
An edge network is composed of edge nodes 1 to 4, the intelligent terminals 1 to n and IPC1 to IPC10 access the edge network, and the types of services provided by the edge nodes 1 to 4 may be the same or different, for example, in fig. 1, the types of services provided by the edge node 1 and the types of services provided by the edge nodes 2 to 4 are different, the types of devices accessed are different, the types of services provided by the edge nodes 2 to 4 are the same, and the devices accessed are all IPC, it can be understood that when any edge node fails, the service on the edge node can only be dispatched to other edge nodes consistent with the type of service provided by the edge node with the failure, for example, when the edge node 2 fails, the IPC1 to IPC3 can only be taken over by the edge node 3 and/or the edge node 4.
The control node 10 may be a cloud controller, a cloud server, or a server group consisting of a plurality of servers, and the control node 10 is configured to uniformly manage the edge nodes 20.
The edge node 20 is a logical abstraction of basic commonality capabilities of a plurality of product forms on the edge side, such as edge gateways, edge controllers, edge servers, etc., which have commonality capabilities of edge side real-time data analysis, local data storage, real-time network connection, etc.
The intelligent terminal 30 includes, but is not limited to, intelligent electronic devices such as intelligent home appliances, smart phones, and intelligent wearable devices.
In fig. 1 (b), if the edge node 2 is abnormal, IPC1 to IPC3 accessing the edge node 2 are rescheduled by the control node 10, IPC1 to IPC2 are scheduled to the edge node 3, IPC3 is scheduled to the edge node 4.
In FIG. 1 (c), the edge node 2 is restored to normal state, and the control node 10 re-schedules the edge nodes 2 of IPC 1-IPC 3.
As can be seen from the above fig. 1 (a), (b) and (c), no matter the edge node 2 is abnormal or is recovered from the abnormal state to the normal state, the services of the IPCs 1 to 3 accessed by the edge node 2 in the whole process are not affected, thereby ensuring the continuous operation of the services.
On the basis of fig. 1, an embodiment of the present invention further provides a block diagram of a control node 10, referring to fig. 2, fig. 2 shows a block diagram of a control node provided in an embodiment of the present invention, where the control node 10 includes a processor 11, a memory 12, a bus 13, and a communication interface 14. The processor 11 and the memory 12 are connected by a bus 13, and the processor 11 communicates with the edge node 20 via a communication interface 14.
The processor 11 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 11. The Processor 11 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
The memory 12 is used for storing a program, for example, the control device 100 of the edge node in the embodiment of the present invention, the control device 100 of the edge node includes at least one software functional module which may be stored in the memory 12 in a form of software or firmware (firmware), and the processor 11 executes the program after receiving an execution instruction to implement the control method of the edge node in the embodiment of the present invention.
The Memory 12 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory). Alternatively, the memory 12 may be a storage device built in the processor 11, or may be a storage device independent of the processor 11.
The bus 13 may be an ISA bus, a PCI bus, an EISA bus, or the like. Fig. 2 is represented by only one double-headed arrow, but does not represent only one bus or one type of bus.
On the basis of fig. 1 and fig. 2, an embodiment of the present invention provides a method for controlling an edge node, which is applied to a control node 10 in fig. 1 and fig. 2, please refer to fig. 3, and fig. 3 shows a flowchart of a method for controlling an edge node according to an embodiment of the present invention, where the method includes the following steps:
step S100, obtaining the current system time and the pre-stored keep-alive time, wherein the keep-alive time is the time when the first edge node sends the keep-alive message to the control node last time.
In this embodiment, the current system Time and the keep-alive Time may be both expressed in the form of a timestamp, but may also be expressed in other forms, such as Coordinated Universal Time (UTC) Time, greenwich Mean Time (GMT) Time, and the like. As a specific implementation manner, when a first edge node accesses an edge network, a control node 10 creates a keep-alive request monitoring port, records an identifier of the first edge node and a timestamp during access, the first edge node is provided with a timer, and sends a keep-alive message to the control node 10 at a fixed time by using the timer, where the keep-alive message includes the identifier of the first edge node and the timestamp of sending the keep-alive message, and the control node 10 updates the keep-alive time of the first edge node according to the received keep-alive message. For example, the edge node 1 enters the edge network at time stamp 1610524065, and the control node 10 locally records the keep-alive time of the edge node 1 as: 1610524065, the timer set by the edge node 1 for sending keep-alive messages is 5 seconds, and then the control node 10 receives the keep-alive messages sent by the edge node 1, where the time stamp in the keep-alive messages is: 1610524070, at which point the controlling node 10 updates the locally recorded keep-alive time to 1610524070.
It should be noted that, when there are a plurality of edge nodes 20 in communication connection with the control node 10, the control node 10 stores the keep-alive time of all the edge nodes 20, and updates the keep-alive time of each edge node 20 stored locally by the control node 10 according to the keep-alive message sent by each edge node 20 at regular time.
And step S110, if the time interval between the current system time and the keep-alive time is greater than a preset threshold, determining that the first edge node is an abnormal node.
In this embodiment, the preset threshold is a threshold for the control node 10 to determine whether the first edge node is abnormal, if an interval between the current system time and the time when the first edge node last sends the keep-alive message is greater than the preset threshold, it is determined that the first edge node is an abnormal node, otherwise, it is determined that the first edge node is normal.
It should be noted that, when there are a plurality of edge nodes 20 and a control node 10 in communication connection, the control node 10 may periodically determine, in a polling manner, whether a time interval between the keep-alive time of each locally stored edge node 20 and the current system time is greater than a preset threshold, for example, there are 5 edge nodes, which are edge nodes 1 to 5, and the control node 10 polls sequentially every 1 minute, first determines whether the edge node 1 is an abnormal node according to the keep-alive time of the locally stored edge node 1 and the current system time, and then sequentially determines the edge nodes 2 to 5.
According to the method provided by the embodiment of the invention, the control node 10 can timely find the abnormal edge node without being influenced by the state of the edge node 20, so that the countermeasure can be timely taken, and the reliability of the service is improved.
In this embodiment, the first edge node sends a keep-alive message to the control node 10 at a fixed time, and the control node updates the locally stored keep-alive time in time according to the keep-alive message to ensure that the keep-alive time is correct, so as to facilitate correct judgment of whether the first edge node is abnormal or not according to the keep-alive time, and therefore, the embodiment of the present invention further includes a specific implementation manner of processing the keep-alive message, please refer to fig. 4, and fig. 4 shows a flowchart of another control method for an edge node according to the embodiment of the present invention, where the method includes the following steps:
step S200, receiving the keep-alive message sent by the first edge node, wherein the keep-alive message carries the sending time for sending the keep-alive message.
In this embodiment, as a specific implementation manner, the monitoring module in the control node 10 is responsible for receiving the keep-alive message sent by the first edge node and placing the keep-alive message into the message queue, and the keep-alive module in the control node 10 is responsible for taking out the keep-alive message from the message queue and performing subsequent processing according to the keep-alive message, where the subsequent processing mainly includes step S210 and step S220.
Step S210, if the time interval between the sending time and the keep-alive time is less than or equal to a preset threshold, determining the sending time as the keep-alive time.
In this embodiment, the preset threshold is consistent with the preset threshold in step S110, and the time interval between the sending time and the keep-alive time is less than or equal to the preset threshold, it is determined that the keep-alive message is normally sent, and at this time, the keep-alive time needs to be updated, that is, the sending time is determined as the keep-alive time.
Step S220, if the time interval between the sending time and the keep-alive time is greater than a preset threshold, sending preset synchronization data to the first edge node.
In this embodiment, if the time interval between the sending time and the keep-alive time is greater than the preset threshold, it is considered that the first edge node may have a network failure, or the sending of the keep-alive message is delayed due to factors such as network instability, and at this time, in order to ensure the synchronization of data between the control node 10 and the first edge node 20, the control node 10 needs to send preset synchronization data to the first edge node, where the preset synchronization data may be, but is not limited to, configuration information of the edge network, configuration information of the first edge node, and the like.
It should be noted that, as a specific implementation manner, if a time interval between the sending time and the keep-alive time is greater than a preset threshold, the keep-alive message sent by the first edge node may be used as a registration message for re-accessing the edge network, and at this time, the keep-alive time of the first edge node stored by the control node 10 may be updated again, so that a correct determination may be made on the keep-alive message sent by the first edge node to the control node 10 at a certain time in the following.
The method provided by the embodiment of the invention can not only normally update the keep-alive time locally stored by the control node 10 according to the keep-alive message normally sent by the first edge node, but also synchronize the preset synchronization message of the control node 10 to the first edge node in time when the first edge node abnormally sends the keep-alive message, thereby ensuring the consistency of data between the control node 10 and the first edge node.
When any edge node 20 fails, the existing solution is usually that the control node 10 evicts the failed edge node 20, or when the network recovers after a long time disconnection, the failed edge node 20 synchronizes the latest data from the control node 10, ensuring the data consistency of the two. However, in this implementation, the service responsible for the failed edge node 20 is in the stop and disconnect state, and continuous operation of the service cannot be guaranteed.
In this embodiment, in order to enable the service provided by the first edge node not to be interrupted when the first edge node fails, an embodiment of the present invention further provides an implementation manner for scheduling the service on the failed first edge node, please refer to fig. 5, where fig. 5 shows a flowchart of another method for controlling an edge node according to an embodiment of the present invention, where the method includes the following steps:
step S300, if the first edge node is abnormal, the service run by the first edge node is dispatched to the second edge node.
In this embodiment, the services provided by the first edge node and the second edge node are of the same type, for example, both provide IPC access, and a pull service of IPC can be implemented. Taking fig. 1 as an example, the first edge node is the edge node 2, and because the IPCs 1 to IPCs 3 accessing the edge node 2 actually access the edge network, that is, the IPCs 1 to IPCs 3 and the edge node 1, the edge node 3 and the edge node 4 belong to the same network, the edge node 3 and the edge node 4 can also access the IPCs 1 to IPCs 3, thereby realizing the take-over of the IPCs 1 to IPCs 3 services.
In this embodiment, the number of services run by the first edge node may be greater than the number of the second edge nodes, or may also be less than or equal to the number of the second edge nodes, if the number of services run by the first edge node is less than or equal to the number of the second edge nodes, a target second edge node meeting the service requirement may be selected from the second edge nodes to take over the services run by the first edge node, for example, the number of IPCs accessed by the first edge node is 3, the number of the second edge nodes is 4, and all the 4 second edge nodes may bear a newly added IPC, at this time, 3 target second edge nodes may be selected from the second edge nodes, each target second edge node takes over one IPC of the first edge node, or balance of services on the second edge nodes may be achieved according to the idle degree of the second edge nodes, for example, the number of IPCs accessed by the 4 second edge nodes is: 2. 1, then 3 IPCs for the first edge node can be scheduled to the second edge node which currently has access to only one IPC.
According to the method provided by the embodiment of the invention, the service operated by the first edge node is dispatched to the second edge node, so that on one hand, data recovery and service succession can be effectively and quickly carried out, and the continuity of the service operated by the first edge node is ensured, on the other hand, a disaster recovery backup system does not need to be specially and independently purchased or developed, the cost overhead is reduced, the resource utilization rate of edge node equipment is improved, the service operation and maintenance efficiency is improved, and the operation and maintenance cost of the edge is reasonably and effectively reduced.
In this embodiment, if the number of services in the failed first edge node is greater than the number of second edge nodes, at this time, in order to implement balance of services in the second edge nodes, an embodiment of the present invention further provides a specific implementation manner for scheduling services in the first edge node in this scenario, please refer to fig. 6, where fig. 6 shows a flowchart of another control method for an edge node provided in the embodiment of the present invention, and step S300 includes the following sub-steps:
in the substep S3001, the remaining resource count of each second edge node is obtained.
In this embodiment, the remaining resource number may be the number of devices that can be accessed again by the second edge node, or may be idle CPU resources, memory resources, and the like of the second edge node.
In the sub-step S3002, the weight of each second edge node is determined according to the remaining resource count of each second edge node and the remaining resource count of all second edge nodes.
In this embodiment, in order to keep services in the scheduled second edge nodes approximately balanced, the weight of each second edge node is determined first, and then the plurality of services run by the first edge node are scheduled to the corresponding second edge nodes according to the weights.
In the sub-step S3003, a plurality of services operated by the first edge node are dispatched to each of the second edge nodes according to the weight of each of the second edge nodes.
In this embodiment, taking the service of the edge node providing access to the IPC as an example, the number of IPCs accessed by the first edge node is 50, and the number of the second edge node is 3: the number of the edge nodes 1 to 3 (i.e. the number of the remaining resources) which can be accessed to the IPC is: 120, 100 and 50, the corresponding weights are: (120/(120 +100+ 50)) =0.44, (100/(120 +100+ 50)) =0.37, (50/(120 +100+ 50)) =0.19, and the number of IPCs to be finally scheduled is as follows: 0.44 × 50=22, 0.37 × 50=18, 0.19 × 50=9, since 22+18+9=49, the number of IPCs switched in than 50 of the first edge node is less than 1, and the 1 more IPCs can be scheduled to the edge node 1 with the highest weight.
The method provided by the embodiment of the invention allocates the service of the failed first edge node to the second edge node of the same service type by scheduling the service of the failed first edge node, so that the service of the failed first edge node can meet the continuity requirement.
In this embodiment, if the failed first edge node recovers from the failed state to the normal state, in order to relieve the pressure of the second edge node due to the newly added service in time, the service originally provided by the first edge node may be dispatched from the second edge node back to the first edge node, so that the implementation of the present invention further provides a control method when the first edge node recovers from the failure, please refer to fig. 7, where fig. 7 shows a flowchart of another control method for the edge node provided in the embodiment of the present invention, where the method includes the following steps:
in step S400, if the first edge node returns to normal, the service of the first edge node operated by each second edge node is rescheduled to the first edge node.
In this embodiment, as a specific implementation manner, if the first edge node returns to normal, the first edge node sends a network access request to the control node 10, the control node 10 detects whether the first edge node is an abnormal node according to the identifier of the edge node, and if the first edge node is an abnormal node, the timestamp is updated, the service of the first edge node operated by each second edge node is deleted, and the first edge node is scheduled.
It should be noted that, in order to timely notify the user that the first edge node fails or the first edge node fails to recover, the embodiment of the present invention further provides an implementation manner of notifying the user by a linkage alarm, where the alarm manner may be, but is not limited to: buzzing notifications, mail notifications, short message notifications, etc. The user is informed through linkage, so that the user can know the information at the first time and carry out processing recovery, and the service node can be recovered in the shortest time to avoid loss.
To generally describe the processing method of the edge node according to the embodiment of the present invention and describe the timing involved in each step, an exemplary diagram of the processing timing of the processing method of the edge node according to the embodiment of the present invention is provided, and please refer to fig. 8, and fig. 8 illustrates an exemplary diagram of the processing timing of the processing method of the edge node according to the embodiment of the present invention. It should be noted that fig. 8 is only an example based on a specific implementation, and does not represent only this implementation.
In order to perform the corresponding steps in the above embodiments and various possible implementations, an implementation of the control apparatus 100 for an edge node is given below. Referring to fig. 9, fig. 9 is a block diagram illustrating a control apparatus 100 for an edge node according to an embodiment of the present invention. It should be noted that the basic principle and the generated technical effect of the control apparatus 100 for edge nodes provided in this embodiment are the same as those of the above embodiments, and for the sake of brief description, no reference is made to this embodiment.
The control apparatus 100 of the edge node includes an acquisition module 110, a determination module 120, a keep-alive module 130, and a scheduling module 140.
An obtaining module 110, configured to obtain current system time and pre-stored keep-alive time, where the keep-alive time is time when the first edge node sends a keep-alive message to the control node last time.
The determining module 120 is configured to determine that the first edge node is an abnormal node if a time interval between the current system time and the keep-alive time is greater than a preset threshold.
A keep-alive module 130 to: receiving a keep-alive message sent by a first edge node, wherein the keep-alive message carries sending time for sending the keep-alive message; and if the time interval between the sending time and the keep-alive time is less than or equal to a preset threshold value, determining the sending time as the keep-alive time.
As a specific embodiment, the keep-alive module 130 is further configured to: and if the time interval between the sending time and the keep-alive time is greater than a preset threshold value, sending preset synchronous data to the first edge node.
The scheduling module 140 is configured to schedule a service run by the first edge node to the second edge node if the first edge node is abnormal.
As a specific implementation manner, the number of services run by the first edge node is multiple, the number of second edge nodes is multiple, the number of services is greater than the number of second edge nodes, and the scheduling module 140 is specifically configured to: acquiring the residual resource number of each second edge node; determining the weight of each second edge node according to the residual resource number of each second edge node and the total residual resource number of all the second edge nodes; and dispatching a plurality of services operated by the first edge node to each second edge node according to the weight of each second edge node.
As a specific embodiment, the scheduling module 140 is further configured to: and if the first edge node is recovered to be normal, the service of the first edge node operated by each second edge node is rescheduled to the first edge node.
As a specific implementation manner, an embodiment of the present invention further provides a block diagram of an exemplary structure of a control apparatus 100 for an edge node, and referring to fig. 10, fig. 10 shows a block diagram of an exemplary structure of a control apparatus 100 for an edge node according to an embodiment of the present invention.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the above-mentioned control method for an edge node.
In summary, embodiments of the present invention provide a method and an apparatus for controlling an edge node, a control node, and a storage medium, which are applied to a control node, where the control node is in communication connection with a first edge node, and the method includes: acquiring current system time and pre-stored keep-alive time, wherein the keep-alive time is the time when the first edge node sends a keep-alive message to the control node last time; and if the time interval between the current system time and the keep-alive time is greater than a preset threshold value, judging that the first edge node is an abnormal node. Compared with the prior art, the embodiment of the invention stores the keep-alive time of the edge node through the control node, the control node actively judges whether the interval threshold value between the current system time and the keep-alive time is larger than the preset threshold value, and if the interval threshold value is larger than the preset threshold value, the edge node is judged to be an abnormal node, so that the abnormal edge node is timely found under the condition of not depending on the edge node, a countermeasure is timely taken, and the reliability of the service is improved.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (7)

1. A method for controlling an edge node, the method being applied to a control node, the control node being communicatively connected to a first edge node, the first edge node being a plurality of edge nodes, the method comprising:
acquiring current system time and pre-stored keep-alive time, wherein the keep-alive time is the time when the first edge node sends a keep-alive message to the control node last time by utilizing a self timer;
judging whether the time interval between the keep-alive time of each locally stored first edge node and the current system time is larger than a preset threshold value or not in a polling mode at regular time;
if the time interval between the current system time and the keep-alive time is larger than a preset threshold value, judging that the first edge node is an abnormal node;
receiving a keep-alive message sent by the first edge node, wherein the keep-alive message carries sending time for sending the keep-alive message;
if the time interval between the sending time and the keep-alive time is smaller than or equal to the preset threshold, determining the sending time as the keep-alive time;
if the time interval between the sending time and the keep-alive time is larger than the preset threshold value, sending preset synchronous data to the first edge node, taking the keep-alive message as a registration message for the first edge node to access the edge network again, and updating the keep-alive time according to the sending time.
2. The method of claim 1, wherein the control node is further communicatively coupled to a second edge node, the first edge node running the same type of service as the second edge node, the method further comprising:
and if the first edge node is abnormal, scheduling the service operated by the first edge node to the second edge node.
3. The method of claim 2, wherein the first edge node runs a plurality of services, the second edge node runs a plurality of services, the number of services is greater than the number of second edge nodes, and the step of scheduling the services run by the first edge node to the second edge node comprises:
acquiring the residual resource number of each second edge node;
determining the weight of each second edge node according to the number of the remaining resources of each second edge node and the total number of the remaining resources of all the second edge nodes;
and scheduling a plurality of services operated by the first edge node to each second edge node according to the weight of each second edge node.
4. The method of controlling an edge node according to claim 2, the method further comprising:
and if the first edge node returns to normal, rescheduling the service of the first edge node operated by each second edge node to the first edge node.
5. An edge node processing apparatus, applied to a control node, the control node being communicatively connected to a first edge node, the first edge node being a plurality of edge nodes, the apparatus comprising:
an obtaining module, configured to obtain current system time and pre-stored keep-alive time, where the keep-alive time is time when the first edge node sends a keep-alive message to the control node last time by using a timer of the first edge node;
a determination module to: judging whether the time interval between the keep-alive time of each first edge node stored locally and the current system time is larger than a preset threshold value in a polling mode at regular time;
if the time interval between the current system time and the keep-alive time is larger than a preset threshold value, judging that the first edge node is an abnormal node; a keep-alive module to:
receiving a keep-alive message sent by the first edge node, wherein the keep-alive message carries sending time for sending the keep-alive message;
if the time interval between the sending time and the keep-alive time is smaller than or equal to the preset threshold, determining the sending time as the keep-alive time;
if the time interval between the sending time and the keep-alive time is larger than the preset threshold value, sending preset synchronous data to the first edge node, taking the keep-alive message as a registration message for the first edge node to access the edge network again, and updating the keep-alive time according to the sending time.
6. A control node comprising a memory and a processor, characterized in that the memory stores a computer program which, when executed by the processor, implements a method of controlling an edge node according to any one of claims 1-4.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of controlling an edge node according to any one of claims 1-4.
CN202110083869.7A 2021-01-21 2021-01-21 Edge node control method and device, control node and storage medium Active CN112822283B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110083869.7A CN112822283B (en) 2021-01-21 2021-01-21 Edge node control method and device, control node and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110083869.7A CN112822283B (en) 2021-01-21 2021-01-21 Edge node control method and device, control node and storage medium

Publications (2)

Publication Number Publication Date
CN112822283A CN112822283A (en) 2021-05-18
CN112822283B true CN112822283B (en) 2023-02-28

Family

ID=75858589

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110083869.7A Active CN112822283B (en) 2021-01-21 2021-01-21 Edge node control method and device, control node and storage medium

Country Status (1)

Country Link
CN (1) CN112822283B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115297124B (en) * 2022-07-25 2023-08-04 天翼云科技有限公司 System operation and maintenance management method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626314A (en) * 2009-08-07 2010-01-13 杭州华三通信技术有限公司 Backup method and backup system of central node of star topology network
CN111294845A (en) * 2020-02-13 2020-06-16 世纪龙信息网络有限责任公司 Node switching method and device, computer equipment and storage medium
CN112073265A (en) * 2020-08-31 2020-12-11 帷幄匠心科技(杭州)有限公司 Internet of things monitoring method and system based on distributed edge computing

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897499A (en) * 2015-12-07 2016-08-24 乐视云计算有限公司 Distributed storage system node state monitoring method, center code and system
US10178186B2 (en) * 2016-06-16 2019-01-08 Sap Se Connection reestablishment protocol for peer communication in distributed systems
CN111147352A (en) * 2019-12-23 2020-05-12 杭州米络星科技(集团)有限公司 Distributed data synchronization method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626314A (en) * 2009-08-07 2010-01-13 杭州华三通信技术有限公司 Backup method and backup system of central node of star topology network
CN111294845A (en) * 2020-02-13 2020-06-16 世纪龙信息网络有限责任公司 Node switching method and device, computer equipment and storage medium
CN112073265A (en) * 2020-08-31 2020-12-11 帷幄匠心科技(杭州)有限公司 Internet of things monitoring method and system based on distributed edge computing

Also Published As

Publication number Publication date
CN112822283A (en) 2021-05-18

Similar Documents

Publication Publication Date Title
CN103744809B (en) Vehicle information management system double hot standby method based on VRRP
US6438707B1 (en) Fault tolerant computer system
US8180882B2 (en) Distributed messaging system and method for sharing network status data
KR100812374B1 (en) System and method for managing protocol network failures in a cluster system
CN102714607B (en) Connectivity fault management timeout period control
CN103944746A (en) Hot standby method and device
CN101262369B (en) Master/slave realization method for dispatching server and dispatching server
WO2014166265A1 (en) Method, terminal, cache server and system for updating webpage data
US20080288812A1 (en) Cluster system and an error recovery method thereof
CN110830283B (en) Fault detection method, device, equipment and system
CN103581276A (en) Cluster management device and system, service client side and corresponding method
CN113067850B (en) Cluster arrangement system under multi-cloud scene
CN105429799B (en) Server backup method and device
CN103888277A (en) Gateway disaster recovery backup method, apparatus and system
CN111385107B (en) Main/standby switching processing method and device for server
WO2012174893A1 (en) Dual-center disaster recovery-based switching method and device in iptv system
CN109245926B (en) Intelligent network card, intelligent network card system and control method
CN110417600B (en) Node switching method and device of distributed system and computer storage medium
CN112822283B (en) Edge node control method and device, control node and storage medium
CN112486707A (en) Redis-based message asynchronous consumption method and device
CN107979498B (en) Mesh network cluster and large file transmission method based on cluster
CN110109772A (en) A kind of method for restarting of CPU, communication equipment and readable storage medium storing program for executing
CN117130730A (en) Metadata management method for federal Kubernetes cluster
CN113867915A (en) Task scheduling method, electronic device and storage medium
CN110351122B (en) Disaster recovery method, device, system and electronic equipment

Legal Events

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