Edge node status determination method, device, electronic device, and storage medium
By randomly selecting the second edge node in the edge node network, detecting and combining the third edge node that meets the conditions, sending status data and determining the status through the leader node, the problem of inaccurate edge node status perception is solved, and accurate node scheduling and network stability are achieved.
Patent Information
- Application Number
- CN202511109185.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-08-08
AI Technical Summary
The problem of edge node scheduling errors caused by inaccurate edge node status perception.
A second edge node is randomly determined among multiple first edge nodes, and multiple third edge nodes that meet the first condition are detected through the second edge node, combined to form a first group, and node status data is periodically sent to the edge nodes in the group. The node status is determined through the leader node, and the status of the edge node is determined in combination with the cloud node status map.
It achieves accurate perception and correct scheduling of edge node status, avoids scheduling errors caused by inaccurate status, and improves the operating efficiency and reliability of the edge computing network.
Smart Images

Figure CN120602495B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, device, electronic device, and storage medium for determining the status of an edge node. Background Art
[0002] With the rapid development of edge computing, the number and heterogeneity of edge nodes (such as smart gateways, local servers, and IoT devices) have increased dramatically. Traditional edge computing architectures tend to adopt a centralized cloud-based decision-making model. In this model, cloud servers are responsible for collecting and analyzing edge node status data and making corresponding scheduling decisions. If the cloud cannot establish communication with an edge node within the specified time, it cannot accurately perceive the edge node's status, resulting in scheduling errors.
[0003] In related technologies, there is no effective solution to the problem of incorrect edge node scheduling due to inaccurate edge node status perception. Summary of the Invention
[0004] The present application provides a method, device, electronic device and storage medium for determining the state of an edge node, so as to at least solve the problem in the related art of edge node scheduling errors caused by inaccurate edge node state perception.
[0005] The present application provides a method for determining the status of an edge node, comprising: randomly determining a second edge node from a plurality of first edge nodes, and detecting, through the second edge node, a plurality of third edge nodes from the plurality of first edge nodes that meet a first condition, wherein the plurality of first edge nodes are ungrouped nodes from the plurality of edge nodes, and the first condition indicates the network service conditions and central processor architectures that must be met for grouping the plurality of first edge nodes; combining the second edge node and the plurality of third edge nodes to obtain a first group, and periodically sending first node status data of m fifth edge nodes to the i-th fourth edge node in the first group, wherein the first group includes n fourth edge nodes, the n fourth edge nodes include the i-th fourth edge node and the m fifth edge nodes, the m fifth edge nodes are edge nodes from the n fourth edge nodes other than the i-th fourth edge node, and i [1, n], i, m, n are all positive integers; the m first node status data received by n-1 fourth edge nodes are all sent to the leader node, so that the leader node can The first node status data are used to determine the second node status data of the n fourth edge nodes, wherein the n fourth edge nodes include the leader node; an edge node status map is generated according to the n second node status data, and the status of the multiple first edge nodes is determined according to the edge node status map and the cloud node status map, wherein the cloud node status map includes multiple third node status data periodically uploaded by the multiple first edge nodes, and the multiple third node status data correspond one-to-one to the multiple first edge nodes.
[0006] The present application also provides a device for determining the status of an edge node, comprising: a first determination module, configured to randomly determine a second edge node from a plurality of first edge nodes, and detect, through the second edge node, a plurality of third edge nodes from the plurality of first edge nodes that meet a first condition, wherein the plurality of first edge nodes are ungrouped nodes from the plurality of edge nodes, and the first condition indicates the network service conditions and central processor architectures that must be met for grouping the plurality of first edge nodes; a combination module, configured to combine the second edge node and the plurality of third edge nodes to obtain a first group, and periodically send first node status data of m fifth edge nodes to the i-th fourth edge node in the first group, wherein the first group includes n fourth edge nodes, the n fourth edge nodes include the i-th fourth edge node and the m fifth edge nodes, the m fifth edge nodes are edge nodes from the n fourth edge nodes other than the i-th fourth edge node, and i [1, n], i, m, n are all positive integers; the second determining module is used to send the m first node status data received by n-1 fourth edge nodes to the leader node, so that the leader node can determine the first node status data according to the received data. The first node status data are used to determine the second node status data of the n fourth edge nodes, wherein the n fourth edge nodes include the leader node; a third determination module is used to generate an edge node status map according to the n second node status data, and determine the status of the multiple first edge nodes according to the edge node status map and the cloud node status map, wherein the cloud node status map includes multiple third node status data periodically uploaded by the multiple first edge nodes, and the multiple third node status data correspond one-to-one to the multiple first edge nodes.
[0007] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned edge node status determination methods when executing the computer program.
[0008] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for determining the state of an edge node are implemented.
[0009] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned edge node status determination methods when executed by a processor.
[0010] According to the present application, a second edge node is randomly determined from a plurality of ungrouped first edge nodes, a plurality of third edge nodes that meet a first condition are detected by the second edge node from a plurality of first edge nodes, a first group is determined by the second edge node and the plurality of third edge nodes, and then the first node status data of the m fifth edge nodes are periodically sent to the i-th fourth edge node in the first group, and the m first node status data received by the n-1 fourth edge nodes are all sent to the leader node, so that the leader node can determine the first group according to the received first node status data. The system uses the first node status data to determine the second node status data of n fourth edge nodes, generates an edge node status map based on the n second node status data, and determines the status of multiple first edge nodes based on the edge node status map and the cloud node status map. This solves the problem of incorrect edge node scheduling caused by inaccurate edge node status perception in related technologies, thereby effectively perceiving the status of edge nodes and correctly scheduling them. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0012] Figure 1 A hardware structure diagram of a method for determining the state of an edge node provided in an embodiment of the present application;
[0013] Figure 2 A flow chart of a method for determining the state of an edge node provided in an embodiment of the present application;
[0014] Figure 3 A schematic diagram of a method for determining the state of an edge node provided in an embodiment of the present application;
[0015] Figure 4 This is a structural block diagram of a device for determining the state of an edge node provided in an embodiment of the present application. DETAILED DESCRIPTION
[0016] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0017] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0018] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure diagram of a method for determining the state of an edge node according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. The server device may also include a transmission device 106 and an input / output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0019] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining the state of the edge node in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the method for determining the state of the edge node mentioned above. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0020] Transmission device 106 is used to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by a communication provider of the server device. In one embodiment, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0021] An embodiment of the present application provides a method for determining the status of an edge node, which is applied to the above-mentioned server device. Figure 2 is a flow chart of a method for determining the state of an edge node according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0022] Step S202: randomly determining a second edge node from among the plurality of first edge nodes, and detecting, through the second edge node, a plurality of third edge nodes from among the plurality of first edge nodes that meet a first condition, wherein the plurality of first edge nodes are ungrouped nodes from the plurality of edge nodes, and the first condition indicates a network service condition and a central processing unit architecture that must be met for grouping the plurality of first edge nodes;
[0023] Step S204: Combine the second edge node and the plurality of third edge nodes to obtain a first group, and periodically send first node status data of m fifth edge nodes to the i-th fourth edge node in the first group, wherein the first group includes n fourth edge nodes, the n fourth edge nodes include the i-th fourth edge node and the m fifth edge nodes, and the m fifth edge nodes are edge nodes other than the i-th fourth edge node among the n fourth edge nodes, i [1, n], i, m, n are all positive integers;
[0024] Step S206: Send the m pieces of the first node status data received by the n-1 fourth edge nodes to the leader node, so that the leader node can determining the second node status data of the n fourth edge nodes based on the first node status data, wherein the n fourth edge nodes include the leader node;
[0025] Step S208: Generate an edge node status map based on n pieces of second node status data, and determine the status of the multiple first edge nodes based on the edge node status map and the cloud node status map, wherein the cloud node status map includes multiple third node status data periodically uploaded by the multiple first edge nodes, and the multiple third node status data correspond one-to-one to the multiple first edge nodes.
[0026] Through the above steps, a second edge node is randomly determined from multiple first edge nodes, and multiple third edge nodes that meet the first condition are detected by the second edge node from multiple first edge nodes. The second edge node and the multiple third edge nodes are combined to obtain a first group, and the first node status data of m fifth edge nodes are periodically sent to the i-th fourth edge node in the first group. The m first node status data received by n-1 fourth edge nodes are all sent to the leader node, so that the leader node can receive the first node status data according to the received first node status data. The system uses the first node status data to determine the second node status data of n fourth edge nodes, generates an edge node status map based on the n second node status data, and determines the status of multiple first edge nodes based on the edge node status map and the cloud node status map. This solves the problem of incorrect edge node scheduling caused by inaccurate edge node status perception in related technologies, thereby effectively perceiving the status of edge nodes and correctly scheduling them.
[0027] In an exemplary embodiment, detecting multiple third edge nodes that meet the first condition among the multiple first edge nodes through the second edge node includes: obtaining a first network service status and a first central processor architecture of the second edge node; matching a sixth edge node among the multiple first edge nodes, wherein the second network service status of the sixth edge node is consistent with the first network service status, and the second central processor architecture of the sixth edge node is consistent with the first central processor architecture; and when the sixth edge node is matched, determining the multiple sixth edge nodes as the multiple third edge nodes.
[0028] In an edge computing network, when a second edge node wishes to combine with other edge nodes, it first checks its own network conditions and central processing unit (CPU) architecture. It then selects those nodes (sixth edge nodes) from among multiple first edge nodes that have comparable network conditions and the same or compatible CPU architecture. Ultimately, these qualified sixth edge nodes are identified as partners (third edge nodes) of the second edge node and join the same collaborative group to perform operations such as data exchange, application scheduling, and resource optimization, thereby improving the efficiency and reliability of the entire edge network.
[0029] By determining a sixth edge node among multiple first edge nodes that has the same first network service status and first central processor architecture as the second edge node, it can be ensured that the edge nodes in the group can communicate efficiently in a similar environment and can execute the same type of tasks or applications without affecting the execution of tasks or data processing due to compatibility issues caused by hardware differences.
[0030] In an exemplary embodiment, the second edge node and the multiple third edge nodes are combined to obtain a first group, including: adding the number of the second edge nodes to the number of the multiple third edge nodes to obtain a first number; when the first number is less than or equal to a preset number, the second edge node and the multiple third edge nodes are combined to obtain the first group, wherein the preset number is the maximum number of edge nodes that can be included in the first group; when the first number is greater than the preset number, the second edge node and the seventh edge node are combined to obtain the first group, wherein the multiple third edge nodes include the seventh edge node, and the number of the seventh edge nodes is the preset number.
[0031] Optionally, in the above embodiment, a preset number is set as the maximum limit on the number of edge nodes that can be included in a group. This limit is typically set based on considerations such as network performance, resource management, and collaborative efficiency to prevent increased management complexity and decreased resource utilization due to overly large groups. If the calculated first number does not exceed the preset number, the second edge node is combined with all matching third edge nodes to form a first group of a predetermined size. This indicates that the current combination is of a reasonable size and can function as an effective collaborative unit for further resource allocation or task scheduling. If the first number exceeds the preset number, the attempted combination may be too large and difficult to manage. In this case, a reduction strategy is implemented, selecting only a preset number of nodes (the seventh edge node) from the plurality of third edge nodes to form the first group together with the second edge node. The seventh edge node here is actually a subset of the third edge nodes, and its number is strictly controlled within a preset range to ensure that the group size is appropriate and meets the system's group size constraints.
[0032] The selection and adjustment of node combinations are based on network service quality, CPU architecture consistency, and controllability of group size. This aims to build small collaborative units that are suitable for the current network environment and resource conditions, ensuring that each group does not exceed the preset maximum number of nodes, thereby ensuring the efficiency of communication between edge nodes within the group.
[0033] In an exemplary embodiment, before randomly determining a second edge node from a plurality of first edge nodes, the method further includes: obtaining a plurality of first Internet Protocol addresses of the plurality of first edge nodes, and a plurality of second Internet Protocol addresses of the plurality of edge nodes, wherein the plurality of first Internet Protocol addresses correspond one-to-one to the plurality of first edge nodes, and the plurality of second Internet Protocol addresses correspond one-to-one to the plurality of edge nodes; storing the plurality of first Internet Protocol addresses in a first list, and storing the plurality of second Internet Protocol addresses in a second list.
[0034] In an exemplary embodiment, after combining the second edge node and the multiple third edge nodes to obtain a first group, the method further includes: obtaining third Internet Protocol addresses of the n fourth edge nodes; and deleting the n third Internet Protocol addresses from the first list.
[0035] Multiple edge nodes carry access addresses and authentication information and connect to the edge node management module in the cloud via the network. The cloud-based edge node management module obtains the second Internet Protocol (IP) addresses of the multiple edge nodes and stores them in the L_all list (equivalent to the second list). It also obtains the first IP addresses of multiple ungrouped first edge nodes from the multiple edge nodes and stores them in the L_left list (equivalent to the first list). It should be noted that initially, the edge node IP addresses in the L_all list and the edge node IP addresses in the L_left list are equal.
[0036] After grouping multiple first edge nodes to obtain a first group, obtain the third IP addresses of n fourth edge nodes in the first group, store the n third IP addresses in the L1 list, and delete the n third IP addresses from the L_left list.
[0037] By actively connecting to the cloud management module through the edge node carrying the access address and authentication information, the cloud can automatically identify and record the IP addresses of all edge nodes, establish a complete L_all list, and realize the unified management of edge nodes. In addition, the cloud also synchronously maintains an L_left list to track edge nodes that have not yet been assigned to any group, allowing the cloud to accurately grasp which nodes are available and which nodes have not yet been grouped at any point in time. After the first group is constructed, the third IP address in the group is stored in the L1 list, and the IP addresses of these grouped nodes are removed from the L_left list, ensuring that the L_left list always reflects the current set of edge nodes that have not yet been grouped.
[0038] In an exemplary embodiment, after the second edge node and the multiple third edge nodes are combined to obtain a first group, the method further includes: when q eighth edge nodes request to be added to p second groups, adding the fourth Internet Protocol addresses of the q eighth edge nodes to the first list and the second list, wherein the p second groups are the final groups of the multiple edge nodes, the p second groups include the first group, and p and q are positive integers; and randomly determining a ninth edge node in each second group to obtain p ninth edge nodes, and obtaining the fourth network service status and fourth central processor architecture of each ninth edge node; detecting the first list through the kth ninth edge node to determine whether the third network service status of the yth eighth edge node is consistent with the fourth network service status of the kth ninth edge node, and determining whether the third central processor architecture of the yth eighth edge node is consistent with the fourth central processor architecture of the kth ninth edge node, wherein y [1, q] and y is a positive integer, k [1, p] and k is a positive integer; when it is determined that the yth third network service situation is consistent with the kth fourth network service situation, and the yth third central processing unit architecture is consistent with the kth fourth central processing unit architecture, the yth eighth edge node is added to the third group, wherein the third group is the group corresponding to the kth ninth edge node.
[0039] In an exemplary embodiment, after adding the yth eighth edge node to the third group, the method further includes: determining whether the first list is empty; and if it is determined that the first list is empty, stopping detecting the first list through the kth ninth edge node.
[0040] When q new edge nodes (eighth edge nodes) request to join the p already formed second groups, their IP addresses (fourth Internet Protocol addresses) are first added to two lists managed by the cloud: L_left (first list) and L_all (second list). This operation ensures that the information of all known edge nodes is fully recorded by the system. At the same time, the new edge nodes are also marked as ungrouped, awaiting further determination and processing.
[0041] To assess the new node's suitability for joining an existing group, a representative node (the ninth edge node) is randomly selected from each existing second group, totaling p. These representative nodes will be used for subsequent probing and compatibility testing to determine the new edge node's compatibility with existing groups. The kth representative node (the ninth edge node) will provide a standardized description of its group's communication conditions and hardware architecture, specifically the fourth network service and fourth CPU architecture of the kth ninth edge node. Based on these fourth network service and fourth CPU architecture, probing of the new edge node (the eighth edge node) in the L_left list will then begin.
[0042] Specifically, the network service status and CPU architecture of the yth new edge node (the eighth edge node) are compared with those of the kth representative node (the ninth edge node) to determine whether they are consistent. If the network service status (third network service status) of the yth new edge node is consistent with the fourth network service status of the kth representative node, and the CPU architecture of the new edge node (the third CPU architecture) is also the same as the fourth CPU architecture, then the new edge node is determined to be compatible with the group (the third group) to which the kth ninth edge node belongs. In this case, the new edge node is officially added to the third group to which the kth representative node belongs.
[0043] After the yth new edge node (the eighth edge node) successfully joins the third group, the L_left list (the first list) is checked to determine whether there are any ungrouped edge nodes waiting to be processed. If the L_left list is empty during the check, it means that all edge nodes have been assigned to the corresponding groups and there are no ungrouped edge nodes waiting to be processed. Once the L_left list is determined to be empty, the current probing operation of the first list by the ninth edge node (the representative node of the group) is stopped.
[0044] It should be clarified that the second grouping mentioned in this embodiment is the final grouping obtained after grouping multiple edge nodes. For example, assume there are 40 edge nodes, of which 25 edge nodes are grouped nodes. These 25 edge nodes are combined to obtain a partial grouping, leaving 15 edge nodes as ungrouped nodes that need to be grouped. Assuming that the network service conditions and central processing unit architecture of these 15 edge nodes are the same, and their number does not exceed the grouping threshold, these 15 edge nodes are combined to obtain the first grouping. Therefore, the second grouping includes the partial grouping corresponding to the 25 edge nodes and the first grouping corresponding to the 15 edge nodes. The second grouping is the final grouping of multiple edge nodes.
[0045] The compatibility test in this embodiment ensures that the addition of new nodes does not disrupt the stability and efficiency of existing groupings, avoids unstable edge node transmission due to hardware inconsistencies or network conditions, and enhances the robustness and continuity of the edge computing network when new nodes are added. Furthermore, by automatically checking and determining whether the L_left list is empty, the server can be prevented from continuing to perform detection and grouping operations after all nodes have been correctly grouped, thereby saving computing resources and network bandwidth and reducing unnecessary energy consumption.
[0046] In an exemplary embodiment, after combining the second edge node and the plurality of third edge nodes to obtain a first group, the method further comprises: determining a fourth group corresponding to the g-th tenth edge node among the h tenth edge nodes to be removed when the p second groups receive a removal request, wherein g [1, h], g and h are both positive integers, the p second groups include the fourth group, and the removal request is used to indicate the removal of the h tenth edge nodes in the p second groups; removing the g-th tenth edge node in the fourth group, and deleting the Internet Protocol address of the g-th tenth edge node in the third list corresponding to the fourth group, wherein the third list is used to store the Internet Protocol addresses of multiple eleventh edge nodes in the fourth group; sending the updated third list to other edge nodes, wherein the other edge nodes are the eleventh edge nodes in the fourth group other than the g-th tenth edge node.
[0047] When p already formed second groups receive a request to remove h specific edge nodes (the tenth edge node), they first determine which specific nodes will be removed. Here, a variable g (g is a positive integer ranging from 1 to h) represents the position of each node to be removed within the h node lists, allowing each removal request to be processed individually. For each g-th tenth edge node to be removed, the group (the fourth group) in which the node currently resides must be found and confirmed. This is achieved by querying the group information stored in the cloud-based edge node management module to ensure that the removal operation is performed on the correct group. After determining the fourth group in which the g-th tenth edge node resides, the g-th tenth edge node is removed from the fourth group and its IP address is deleted from the third list corresponding to the fourth group to update the third list. To ensure that all nodes in the fourth group are aware of this change, the updated third list (recording the IP address of the newest member of the fourth group) is sent to the other nodes in the fourth group (the eleventh edge node). Here, other edge nodes refer to all nodes in the fourth group except the g-th tenth edge node that is removed. They need to receive update information and adjust their state perception and communication strategies to adapt to changes in the network structure.
[0048] By determining the fourth group where the g-th tenth edge node to be removed is located, deleting the IP address of the g-th tenth edge node in the third list corresponding to the fourth group, and sending the updated third list to the eleventh edge nodes other than the g-th tenth edge node in the fourth group, it is effectively avoided to allocate resources to nodes that no longer participate in network activities, thereby improving resource utilization.
[0049] In an exemplary embodiment, the leader node receives The first node status data determines the second node status data of the n fourth edge nodes, including: determining the whether the n-1 fourth node status data corresponding to the i-th fourth edge node in the first node status data are all consistent; when it is determined that the n-1 fourth node status data are all consistent, any one of the n-1 fourth node status data is determined as the fifth node status data of the i-th fourth edge node; and the second node status data is determined according to the fifth node status data of the n fourth edge nodes.
[0050] In an exemplary embodiment, determining the After determining whether the n-1 fourth node status data corresponding to the i-th fourth edge node in the first node status data are all consistent, the method also includes: when it is determined that inconsistent fourth node status data exist in the n-1 fourth node status data, determining a second number of sixth node status data whose values are the first value in the n-1 fourth node status data, and determining a third number of seventh node status data whose values are the second value in the n-1 fourth node status data; when it is determined that the second number is greater than the third number, determining the sixth node status data as the fifth node status data; when it is determined that the second number is less than or equal to the third number, determining the seventh node status data as the fifth node status data.
[0051] Alternatively, assume that there are five edge nodes: ABCDE, where C is the leader node. Each edge node will receive the first node status data sent by other edge nodes. For example, A (the fourth edge node i) will receive the first node status data sent by BCDE (the m fifth edge nodes). ABDE will send the m first node status data it has received to C. Therefore, C receives If the fifth node status data of A is to be determined, the leader node C needs to determine whether the four fourth node status data of A are consistent among the 20 first node status data.
[0052] If the four fourth node status data are consistent, for example, all four fourth node status data are 1, then 1 is determined as the fifth node status data of A. Similarly, the fifth node status data corresponding to BC, D, and E can be determined respectively. The second node status data can be determined based on the fifth node status data of the n fourth edge nodes.
[0053] In the case where there are inconsistent fourth node status data among the four fourth node status data, for example, one fourth node status data is 0 and three fourth node status data are 1. In this case, the leader node C makes a judgment and determines 1 as the fifth node status data of A based on the principle of majority rule.
[0054] The leader node receives The second node status data of n fourth edge nodes are determined by using the first node status data. When different edge nodes make inconsistent status determinations for the same node, the status of the edge node can be accurately determined.
[0055] In an exemplary embodiment, after generating an edge node status map based on n second node status data, the method further includes: periodically determining the second node status data of the n fourth edge nodes through the leader node; when the second node status data of the current cycle is inconsistent with the second node status data of the previous cycle, updating the edge node status map based on the second node status data of the current cycle to obtain the updated edge node status map.
[0056] The leader node collects the second-node status data of n fourth-edge nodes at a preset interval (e.g., every few minutes or at a time interval dynamically adjusted based on network conditions). This second-node status data typically includes key indicators such as the node's operating status, resource usage, and network connectivity. After the leader node completes status data collection for the current cycle, it compares this second-node status data with the same type of data collected in the previous cycle. If any differences are detected (e.g., a node suddenly goes offline, resource usage reaches a warning level, etc.), this indicates that the node status of an edge node has changed. Once the leader node determines that the data for the current cycle is inconsistent with the previous data, it updates the edge node status map based on the latest second-node status data.
[0057] The leader node periodically collects and compares second-node status data, ensuring real-time monitoring of any status changes in the n fourth-edge nodes. Furthermore, the leader node updates the edge node status map only when the second-node status data for the current cycle is inconsistent with the second-node status data from the previous cycle. This avoids duplicate data transmission when the second-node status remains stable, reduces network communication overhead, and optimizes network resource utilization.
[0058] In an exemplary embodiment, after determining the states of the multiple first edge nodes according to the edge node state map and the cloud node state map, the method further includes: determining the first state of the i-th fourth edge node in the edge node state map, and determining the second state of the i-th fourth edge node in the cloud node state map; when the first state is an abnormal state and the second state is a normal state, obtaining the first state of the i-th fourth edge node within a preset time period, wherein the preset time period is a time period after the current moment; when it is determined that the first states within the preset time period are all the abnormal states, determining that the i-th fourth edge node is out of the first group; when there is a twelfth edge node out of the first group among the n fourth edge nodes, and the number of the twelfth edge nodes is greater than or equal to a preset threshold, regrouping the multiple twelfth edge nodes.
[0059] If the first state is abnormal and the second state is normal, this indicates that network fluctuations or local hardware failures at the i-th fourth edge node have disrupted communication with the cloud. To further confirm whether the node is experiencing a persistent abnormal state, the server will examine the i-th fourth edge node's state records within a preset time period to determine whether its abnormal state remains persistent. The selection of the preset time period requires a comprehensive consideration of the network's average fluctuation period and the fault tolerance of edge applications, ensuring that the server can promptly detect edge nodes experiencing chronic abnormalities while avoiding misjudgments due to brief network fluctuations. If the first state is determined to be abnormal throughout the preset time period, the edge node (the i-th fourth edge node) is officially deemed to have been removed from the first group. If multiple twelfth edge nodes in the first group exhibit the aforementioned abnormal state, and the number of such nodes reaches a preset threshold, regrouping of the multiple twelfth edge nodes is triggered. The preset threshold is typically set based on cloud resource redundancy and network resilience requirements.
[0060] By comparing the leader node's assessment of edge node status with the cloud's, and confirming persistent abnormalities at the edge, the true state of the node can be more accurately identified, avoiding misjudgments due to the limitations of single-point monitoring. Furthermore, when the number of abnormal nodes reaches a certain threshold, a regrouping mechanism is triggered, preventing instability of the entire group or network caused by abnormalities in a few nodes.
[0061] In an exemplary embodiment, after determining the status of the multiple first edge nodes based on the edge node status map and the cloud node status map, the method also includes: when the first status is a normal state and the second status is an abnormal state, stopping sending tasks to the i-th fourth edge node and controlling the i-th fourth edge node to continue executing the received tasks.
[0062] When the first state is normal and the second state is abnormal, the server stops sending new task requests to the i-th fourth edge node. This step avoids additional resource allocation and task scheduling on nodes with unclear or potentially abnormal states, preventing potential resource waste and application failure. Although the allocation of new tasks has been stopped, the cloud allows the node to continue executing received tasks. This ensures application continuity and data processing integrity, especially during task execution, avoiding sudden interruptions due to state information conflicts, which could lead to data loss or application service degradation.
[0063] In an exemplary embodiment, after determining the status of the multiple first edge nodes based on the edge node status map and the cloud node status map, the method also includes: when the first status and the second status are both abnormal states, stopping sending tasks to the i-th fourth edge node, and sending the tasks received in the i-th fourth edge node to the m fifth edge nodes.
[0064] If both the first and second states are confirmed as abnormal, the server will immediately stop assigning any new tasks to the abnormal edge node (the fourth edge node, i). Furthermore, to ensure application continuity and data processing integrity, the server will migrate tasks already received from the abnormal node to other healthy edge nodes. By rescheduling tasks to these healthy edge nodes, the network's service capabilities will not be significantly impacted even if some edge nodes fail, ensuring that applications and services can continue to run.
[0065] In an exemplary embodiment, after determining the status of the multiple first edge nodes based on the edge node status map and the cloud node status map, the method also includes: when the first status and the second status are both normal, continuing to send tasks to the i-th fourth edge node, and controlling the i-th fourth edge node to continue executing the received tasks.
[0066] If the first and second status determinations agree, meaning both consider the i-th fourth edge node to be normal, this indicates that the node has neither encountered any local communication problems nor exhibited any global abnormal behavior within the network, indicating that it is a fully healthy, working node. In this case, the cloud will continue to assign new tasks to this edge node (the i-th fourth edge node). Simultaneously, the i-th fourth edge node will continue to execute previously received tasks, ensuring task continuity and data processing integrity.
[0067] Through the collaborative judgment of the edge node status map and the cloud node status map, the node status of the i-th fourth edge node can be determined more accurately, and the task scheduling of the i-th fourth edge node can be adjusted according to the node status of the i-th fourth edge node.
[0068] In an exemplary embodiment, before sending the m first-node status data received by n-1 fourth edge nodes to the leading node, the method further includes: randomly setting a waiting time for each of the n fourth edge nodes; when the waiting time of the i-th fourth edge node expires, sending a heartbeat message of the i-th fourth edge node to the m fifth edge nodes; when the m fifth edge nodes receive the heartbeat message of the i-th fourth edge node, determining whether the m fifth edge nodes are in a waiting-for-election state, wherein the waiting-for-election state is used to indicate that the edge node is waiting to run for the leading node; when it is determined that none of the m fifth edge nodes are in the waiting-for-election state, determining the i-th fourth edge node as the leading node.
[0069] A random waiting time is set for each fourth edge node (i.e., a potential leader candidate) within a group. This design aims to prevent all nodes from attempting to initiate leadership competition at the same time, which would introduce unnecessary network load and potentially conflicting election behaviors. When the random waiting time of the i-th fourth edge node expires, it sends a heartbeat message to the other m fifth edge nodes in the group. After receiving the heartbeat message from the i-th fourth edge node, the m fifth edge nodes check whether they are in the waiting state. The waiting state means that the edge node is preparing for or has already participated in the leader election process. If none of the m fifth edge nodes are in the waiting state and they all successfully receive the heartbeat message from the i-th fourth edge node, the i-th fourth edge node is determined to be the leader node.
[0070] In edge computing, leader election is crucial for maintaining communication and state consistency among nodes within a group. To avoid unnecessary network load and decision conflicts caused by multiple nodes competing for the leadership role, a heartbeat message mechanism with randomized wait times is used to determine the leader. This ensures that every edge node has a chance to become the leader, preventing certain nodes from consistently holding the leadership role due to network location or time advantages, thereby increasing the fairness of the election process.
[0071] In order to better understand the process of determining the state of the edge node, the method for determining the state of the edge node is described below in conjunction with an optional embodiment, but it is not intended to limit the technical solution of the embodiment of the present application.
[0072] Figure 3 is a schematic diagram of a method for determining the state of an edge node according to an embodiment of the present application, such as Figure 3 Specifically, it includes the following contents:
[0073] Multiple edge nodes carry access addresses and authentication information and access the edge node management module in the cloud through the network. The cloud edge node management module obtains the second IP addresses of the multiple edge nodes and stores the second IP addresses in the L_all list (equivalent to the second list), and obtains the first IP addresses of the multiple ungrouped first edge nodes among the multiple edge nodes and stores the first IP addresses in the L_left list (equivalent to the first list). Furthermore, the multiple edge nodes each report their own status to the cloud, forming a cloud node status map of the multiple edge nodes in the cloud, and the cloud node status map is saved to the edge status storage module. It should be clarified that initially, the edge node IP addresses in the L_all list and the edge node IP addresses in the L_left list are equal.
[0074] Optionally, assuming that there are multiple ungrouped first edge nodes among the multiple edge nodes, a second edge node is randomly determined from the multiple first edge nodes, the first network service status and the first central processing unit architecture of the second edge node are obtained, and the network service status of the multiple first edge nodes is screened out to select those nodes whose network service status is consistent with the first network service status. Furthermore, the multiple first edge nodes are screened out to select multiple third edge nodes whose CPU architecture is the same as or compatible with the first CPU architecture. The number of second edge nodes is added to the number of the multiple third edge nodes to obtain a first number. If the first number is less than or equal to a preset number, the second edge node and the multiple third edge nodes are combined to obtain a first group, where the preset number is the maximum number of edge nodes that can be included in the first group. After the multiple first edge nodes are grouped to obtain the first group, the third IP addresses of the n fourth edge nodes (the second edge node and the multiple third edge nodes) in the first group are obtained, and the n third IP addresses are stored in the L1 list, and the n third IP addresses are deleted from the L_left list.
[0075] Assume that there are edge groups 1, 2, and 3. There are 5 fourth edge nodes ABCDE in edge group 1. They periodically send the first node status data of BCDE to A. Therefore, A receives the first node status data sent by BCDE, B receives the first node status data of ACDE, C receives the first node status data of ABDE, D receives the first node status data of ABCE, and E receives the first node status data of ABCD. C is determined to be the leader node in the first group through the Raft election algorithm. Then ABDE sends the multiple first node status data they received to the leader node C. At this time, the leader node C receives If the fifth node status data of A is to be determined, the leader node C needs to determine whether the four fourth node status data of A are consistent among the 20 first node status data.
[0076] If the four fourth-node status data are consistent, for example, all four are 1, then 1 is determined as A's fifth-node status data. If there are inconsistencies among the four fourth-node status data, for example, one is 0 and three are 1, then leader node C makes a judgment and, based on the principle of majority rule, determines 1 as A's fifth-node status data. Similarly, the fifth-node status data corresponding to nodes B, C, and D can be determined. The fifth-node status data for nodes A, B, C, and D is determined as the second-node status data. An edge node status graph is generated based on the second-node status data. The status of multiple edge nodes is determined based on the edge node status graph and the cloud node status graph. For example, if A's first state in the edge node status graph is abnormal, and its second state in the cloud node status graph is normal, this indicates that A may have left its current group (assuming it is edge group 1). Further determination is needed to determine whether A's first state within a period of time after the current moment is also abnormal. If the first state is still abnormal, then A is determined to have left edge group 1.
[0077] When A's first state is normal and the second state is abnormal, the scheduling decision module in the cloud will stop sending new task requests to A, but A can continue to execute the tasks it has received. When both A's first state and second state are confirmed to be abnormal, the scheduling decision module will immediately stop assigning any new tasks to A. Not only that, in order to ensure the continuity of the application and the integrity of data processing, the scheduling decision module will take measures to migrate A's received tasks to other normally operating edge nodes. When the first state and second state of A are both determined to be normal, the scheduling decision module will continue to assign new tasks to A, and A will also continue to execute the tasks it has previously received, ensuring the continuity of tasks and the integrity of data processing.
[0078] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0079] The embodiment of the present application also provides a device for determining the state of an edge node, such as Figure 4 As shown, the device includes:
[0080] a first determining module 42 configured to randomly determine a second edge node from among the plurality of first edge nodes, and detect, through the second edge node, a plurality of third edge nodes from among the plurality of first edge nodes that meet a first condition, wherein the plurality of first edge nodes are ungrouped nodes from the plurality of edge nodes, and the first condition indicates a network service condition and a central processing unit architecture that must be met for grouping the plurality of first edge nodes;
[0081] The combining module 44 is configured to combine the second edge node and the plurality of third edge nodes to obtain a first group, and periodically send first node status data of m fifth edge nodes to the i-th fourth edge node in the first group, wherein the first group includes n fourth edge nodes, the n fourth edge nodes include the i-th fourth edge node and the m fifth edge nodes, the m fifth edge nodes are edge nodes other than the i-th fourth edge node among the n fourth edge nodes, and i [1, n], i, m, n are all positive integers;
[0082] The second determining module 46 is configured to send the m pieces of the first node status data received by the n-1 fourth edge nodes to the leader node, so that the leader node can determine the first node status data according to the received data. determining the second node status data of the n fourth edge nodes based on the first node status data, wherein the n fourth edge nodes include the leader node;
[0083] The third determination module 48 is used to generate an edge node status map based on n pieces of second node status data, and determine the status of the multiple first edge nodes based on the edge node status map and the cloud node status map, wherein the cloud node status map includes multiple third node status data periodically uploaded by the multiple first edge nodes, and the multiple third node status data correspond one-to-one to the multiple first edge nodes.
[0084] In an embodiment of the present application, a second edge node is randomly determined from a plurality of first edge nodes, and a plurality of third edge nodes that meet the first condition are detected by the second edge node in the plurality of first edge nodes. The second edge node and the plurality of third edge nodes are combined to obtain a first group, and the first node status data of the m fifth edge nodes are periodically sent to the i-th fourth edge node in the first group, and the m first node status data received by the n-1 fourth edge nodes are all sent to the leader node, so that the leader node can receive the first node status data according to the received first node status data. The system uses the first node status data to determine the second node status data of n fourth edge nodes, generates an edge node status map based on the n second node status data, and determines the status of multiple first edge nodes based on the edge node status map and the cloud node status map. This solves the problem of incorrect edge node scheduling caused by inaccurate edge node status perception in related technologies, thereby effectively perceiving the status of edge nodes and correctly scheduling them.
[0085] In an exemplary embodiment, the first determination module 42 is further used to obtain the first network service status and the first central processor architecture of the second edge node; match a sixth edge node among the multiple first edge nodes, wherein the second network service status of the sixth edge node is consistent with the first network service status, and the second central processor architecture of the sixth edge node is consistent with the first central processor architecture; when the sixth edge node is matched, determine the multiple sixth edge nodes as the multiple third edge nodes.
[0086] In an exemplary embodiment, the combination module 44 is further used to add the number of the second edge nodes to the number of the multiple third edge nodes to obtain a first number; when the first number is less than or equal to a preset number, the second edge node and the multiple third edge nodes are combined to obtain the first group, wherein the preset number is the maximum number of edge nodes that can be included in the first group; when the first number is greater than the preset number, the second edge node and the seventh edge node are combined to obtain the first group, wherein the multiple third edge nodes include the seventh edge node, and the number of the seventh edge node is the preset number.
[0087] In an exemplary embodiment, the first determination module 42 is further used to obtain multiple first Internet Protocol addresses of the multiple first edge nodes, and multiple second Internet Protocol addresses of the multiple edge nodes, wherein the multiple first Internet Protocol addresses correspond one-to-one to the multiple first edge nodes, and the multiple second Internet Protocol addresses correspond one-to-one to the multiple edge nodes; store the multiple first Internet Protocol addresses in a first list, and store the multiple second Internet Protocol addresses in a second list.
[0088] In an exemplary embodiment, the combining module 44 is further configured to obtain third Internet Protocol addresses of the n fourth edge nodes; and delete the n third Internet Protocol addresses from the first list.
[0089] In an exemplary embodiment, the combination module 44 is further configured to add the fourth Internet Protocol addresses of the q eighth edge nodes to the first list and the second list when q eighth edge nodes request to be added to p second groups, wherein the p second groups are the final groups of the multiple edge nodes, the p second groups include the first group, and p and q are positive integers; and randomly determine the ninth edge node in each second group to obtain p ninth edge nodes, and obtain the fourth network service status and fourth central processor architecture of each ninth edge node; detect the first list through the kth ninth edge node to determine whether the third network service status of the yth eighth edge node is consistent with the fourth network service status of the kth ninth edge node, and determine whether the third central processor architecture of the yth eighth edge node is consistent with the fourth central processor architecture of the kth ninth edge node, wherein y [1, q] and y is a positive integer, k [1, p] and k is a positive integer; when it is determined that the yth third network service situation is consistent with the kth fourth network service situation, and the yth third central processing unit architecture is consistent with the kth fourth central processing unit architecture, the yth eighth edge node is added to the third group, wherein the third group is the group corresponding to the kth ninth edge node.
[0090] In an exemplary embodiment, the combining module 44 is further configured to determine whether the first list is empty; if it is determined that the first list is empty, stop detecting the first list through the kth ninth edge node.
[0091] In an exemplary embodiment, the combining module 44 is further configured to determine, when the p second groups receive a removal request, a fourth group corresponding to the g-th tenth edge node among the h tenth edge nodes to be removed, wherein g [1, h], g and h are both positive integers, the p second groups include the fourth group, and the removal request is used to indicate the removal of the h tenth edge nodes in the p second groups; removing the g-th tenth edge node in the fourth group, and deleting the Internet Protocol address of the g-th tenth edge node in the third list corresponding to the fourth group, wherein the third list is used to store the Internet Protocol addresses of multiple eleventh edge nodes in the fourth group; sending the updated third list to other edge nodes, wherein the other edge nodes are the eleventh edge nodes in the fourth group other than the g-th tenth edge node.
[0092] In an exemplary embodiment, the second determining module 46 is further configured to determine the whether the n-1 fourth node status data corresponding to the i-th fourth edge node in the first node status data are all consistent; when it is determined that the n-1 fourth node status data are all consistent, any one of the n-1 fourth node status data is determined as the fifth node status data of the i-th fourth edge node; and the second node status data is determined according to the fifth node status data of the n fourth edge nodes.
[0093] In an exemplary embodiment, the second determination module 46 is also used to determine a second number of sixth node status data having a first value among the n-1 fourth node status data, and to determine a third number of seventh node status data having a second value among the n-1 fourth node status data, when it is determined that inconsistent fourth node status data exist among the n-1 fourth node status data; and to determine the sixth node status data as the fifth node status data when it is determined that the second number is greater than the third number; and to determine the seventh node status data as the fifth node status data when it is determined that the second number is less than or equal to the third number.
[0094] In an exemplary embodiment, the third determination module 48 is also used to periodically determine the second node status data of the n fourth edge nodes through the leader node; when the second node status data of the current cycle is inconsistent with the second node status data of the previous cycle, the edge node status map is updated according to the second node status data of the current cycle to obtain the updated edge node status map.
[0095] In an exemplary embodiment, the third determination module 48 is also used to determine the first state of the i-th fourth edge node in the edge node state map, and determine the second state of the i-th fourth edge node in the cloud node state map; when the first state is an abnormal state and the second state is a normal state, obtain the first state of the i-th fourth edge node within a preset time period, wherein the preset time period is a time period after the current moment; when it is determined that the first states within the preset time period are all the abnormal states, determine that the i-th fourth edge node is out of the first group; when there is a twelfth edge node that is out of the first group among the n fourth edge nodes, and the number of the twelfth edge nodes is greater than or equal to a preset threshold, regroup the multiple twelfth edge nodes.
[0096] In an exemplary embodiment, the third determination module 48 is further used to stop sending tasks to the i-th fourth edge node and control the i-th fourth edge node to continue executing the received tasks when the first state is a normal state and the second state is an abnormal state.
[0097] In an exemplary embodiment, after determining the status of the multiple first edge nodes based on the edge node status map and the cloud node status map, the method also includes: when the first status and the second status are both abnormal states, stopping sending tasks to the i-th fourth edge node, and sending the tasks received in the i-th fourth edge node to the m fifth edge nodes.
[0098] In an exemplary embodiment, the third determination module 48 is further configured to, when both the first state and the second state are normal, continue to send tasks to the i-th fourth edge node and control the i-th fourth edge node to continue executing the received tasks.
[0099] In an exemplary embodiment, the second determination module 46 is further used to randomly set a waiting time for each of the n fourth edge nodes; when the waiting time of the i-th fourth edge node expires, send a heartbeat message of the i-th fourth edge node to the m fifth edge nodes; when the m fifth edge nodes receive the heartbeat message of the i-th fourth edge node, determine whether the m fifth edge nodes are in a waiting-for-election state, wherein the waiting-for-election state is used to indicate that the edge node is waiting to run for the leader node; when it is determined that none of the m fifth edge nodes are in the waiting-for-election state, determine that the i-th fourth edge node is the leader node.
[0100] It should be noted that for the description of the features in the embodiment corresponding to the device for determining the state of an edge node, reference can be made to the relevant description of the embodiment corresponding to the method for determining the state of an edge node, and no further details will be given here.
[0101] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned edge node state determination method embodiments.
[0102] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned edge node status determination method embodiments when running.
[0103] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0104] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned edge node status determination method embodiments are implemented.
[0105] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned edge node state determination method embodiments are implemented.
[0106] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0107] The above is a detailed introduction to the state determination method, device, electronic device and storage medium of an edge node provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for determining the state of an edge node, characterized in that: include: Randomly determining a second edge node from a plurality of first edge nodes, and detecting, through the second edge node, a plurality of third edge nodes from the plurality of first edge nodes that meet a first condition, wherein the plurality of first edge nodes are ungrouped nodes from the plurality of edge nodes, and the first condition indicates a network service condition and a central processor architecture that must be met for grouping the plurality of first edge nodes; The second edge node and the plurality of third edge nodes are combined to obtain a first group, and first node status data of m fifth edge nodes are periodically sent to the i-th fourth edge node in the first group, wherein the first group includes n fourth edge nodes, the n fourth edge nodes include the i-th fourth edge node and the m fifth edge nodes, and the m fifth edge nodes are edge nodes other than the i-th fourth edge node among the n fourth edge nodes, and i [1, n], i, m, n are all positive integers; The m first node status data received by the n-1 fourth edge nodes are all sent to the leader node, so that the leader node can determining the second node status data of the n fourth edge nodes based on the first node status data, wherein the n fourth edge nodes include the leader node; An edge node status map is generated based on n pieces of second-node status data, and the status of the multiple first edge nodes is determined based on the edge node status map and the cloud node status map, wherein the cloud node status map includes multiple third node status data periodically uploaded by the multiple first edge nodes, and the multiple third node status data correspond one-to-one to the multiple first edge nodes.
2. The method for determining the state of an edge node according to claim 1, wherein: Detecting, by the second edge node, a plurality of third edge nodes among the plurality of first edge nodes that meet a first condition includes: Obtaining a first network service status and a first central processing unit architecture of the second edge node; Matching a sixth edge node among the multiple first edge nodes, wherein the second network service condition of the sixth edge node is consistent with the first network service condition, and the second central processing unit architecture of the sixth edge node is consistent with the first central processing unit architecture; In a case where the sixth edge node is matched, a plurality of the sixth edge nodes are determined as the plurality of third edge nodes.
3. The method for determining the state of an edge node according to claim 1, wherein: Combining the second edge node and the plurality of third edge nodes to obtain a first group includes: Adding the number of the second edge nodes to the number of the plurality of third edge nodes to obtain a first number; When the first number is less than or equal to a preset number, combining the second edge node and the plurality of third edge nodes to obtain the first group, wherein the preset number is a maximum number of edge nodes that can be included in the first group; When the first number is greater than the preset number, the second edge node and the seventh edge node are combined to obtain the first group, wherein the multiple third edge nodes include the seventh edge node, and the number of the seventh edge nodes is the preset number.
4. The method for determining the state of an edge node according to claim 1, wherein: Before randomly determining the second edge node from the plurality of first edge nodes, the method further includes: Obtaining a plurality of first Internet Protocol addresses of the plurality of first edge nodes and a plurality of second Internet Protocol addresses of the plurality of edge nodes, wherein the plurality of first Internet Protocol addresses correspond one-to-one to the plurality of first edge nodes, and the plurality of second Internet Protocol addresses correspond one-to-one to the plurality of edge nodes; The plurality of first Internet Protocol addresses are stored in a first list, and the plurality of second Internet Protocol addresses are stored in a second list.
5. The method for determining the state of an edge node according to claim 4, wherein: After combining the second edge node and the plurality of third edge nodes to obtain a first group, the method further includes: Obtaining third Internet Protocol addresses of the n fourth edge nodes; Delete n third Internet Protocol addresses from the first list.
6. The method for determining the state of an edge node according to claim 4, wherein: After combining the second edge node and the plurality of third edge nodes to obtain a first group, the method further includes: In a case where q eighth edge nodes request to be added to p second groups, adding the fourth Internet Protocol addresses of the q eighth edge nodes to the first list and the second list, wherein the p second groups are final groups of the plurality of edge nodes, the p second groups include the first group, and p and q are positive integers; and Randomly determine a ninth edge node in each second group to obtain p ninth edge nodes, and obtain a fourth network service status and a fourth central processing unit architecture of each ninth edge node; The first list is detected by the kth ninth edge node to determine whether the third network service condition of the yth eighth edge node is consistent with the fourth network service condition of the kth ninth edge node, and whether the third central processing unit architecture of the yth eighth edge node is consistent with the fourth central processing unit architecture of the kth ninth edge node, wherein y [1, q] and y is a positive integer, k [1, p] and k is a positive integer; When it is determined that the yth third network service situation is consistent with the kth fourth network service situation, and the yth third central processor architecture is consistent with the kth fourth central processor architecture, the yth eighth edge node is added to the third group, wherein the third group is the group corresponding to the kth ninth edge node.
7. The method for determining the state of an edge node according to claim 6, wherein: After adding the y-th eighth edge node to the third group, the method further includes: determining whether the first list is empty; When it is determined that the first list is empty, stopping detecting the first list through the kth ninth edge node.
8. The method for determining the state of an edge node according to claim 6, wherein: After combining the second edge node and the plurality of third edge nodes to obtain a first group, the method further includes: In the case where the p second groups receive a removal request, a fourth group corresponding to the g-th tenth edge node among the h tenth edge nodes to be removed is determined, wherein g [1, h], where g and h are both positive integers, the p second groups include the fourth group, and the removal request is used to instruct to remove the h tenth edge nodes from the p second groups; removing the g-th tenth edge node from the fourth group, and deleting the Internet Protocol address of the g-th tenth edge node from a third list corresponding to the fourth group, wherein the third list is used to store the Internet Protocol addresses of multiple eleventh edge nodes in the fourth group; The updated third list is sent to other edge nodes, wherein the other edge node is the eleventh edge node in the fourth group except the g-th tenth edge node.
9. The method for determining the state of an edge node according to claim 1, wherein: The leader node receives The first node status data is used to determine the second node status data of the n fourth edge nodes, including: Determine the whether the n-1 fourth node status data corresponding to the i-th fourth edge node in the first node status data are all consistent; When it is determined that the n-1 fourth node status data are all consistent, determining any one of the n-1 fourth node status data as the fifth node status data of the i-th fourth edge node; The second node status data is determined according to the fifth node status data of the n fourth edge nodes.
10. The method for determining the state of an edge node according to claim 9, wherein: Determine the After determining whether n-1 fourth node status data corresponding to the i-th fourth edge node in the first node status data are all consistent, the method further includes: In a case where it is determined that inconsistent fourth node status data exists among the n-1 fourth node status data, determining a second number of sixth node status data having a value of the first value among the n-1 fourth node status data, and determining a third number of seventh node status data having a value of the second value among the n-1 fourth node status data; In a case where it is determined that the second number is greater than the third number, determining the sixth node status data as the fifth node status data; In a case where it is determined that the second number is less than or equal to the third number, the seventh node status data is determined as the fifth node status data.
11. The method for determining the state of an edge node according to claim 1, wherein: After generating an edge node state graph according to the n pieces of second node state data, the method further includes: Periodically determining, by the leader node, second node status data of the n fourth edge nodes; When the second node status data of the current cycle is inconsistent with the second node status data of the previous cycle, the edge node status map is updated according to the second node status data of the current cycle to obtain the updated edge node status map.
12. The method for determining the state of an edge node according to claim 1, wherein: After determining the states of the plurality of first edge nodes according to the edge node state map and the cloud node state map, the method further includes: Determine a first state of the i-th fourth edge node in the edge node state map, and determine a second state of the i-th fourth edge node in the cloud node state map; When the first state is an abnormal state and the second state is a normal state, obtaining the first state of the i-th fourth edge node within a preset time period, wherein the preset time period is a time period after the current moment; When it is determined that the first states within the preset time period are all the abnormal states, determining that the i-th fourth edge node is separated from the first group; If there is a twelfth edge node that is separated from the first group among the n fourth edge nodes, and the number of the twelfth edge nodes is greater than or equal to a preset threshold, the plurality of the twelfth edge nodes are regrouped.
13. The method for determining the state of an edge node according to claim 12, wherein: After determining the states of the plurality of first edge nodes according to the edge node state map and the cloud node state map, the method further includes: When the first state is a normal state and the second state is an abnormal state, sending tasks to the i-th fourth edge node is stopped, and the i-th fourth edge node is controlled to continue executing the received tasks.
14. The method for determining the state of an edge node according to claim 12, wherein: After determining the states of the plurality of first edge nodes according to the edge node state map and the cloud node state map, the method further includes: When both the first state and the second state are abnormal states, sending tasks to the i-th fourth edge node is stopped, and tasks received in the i-th fourth edge node are sent to the m fifth edge nodes.
15. The method for determining the state of an edge node according to claim 12, wherein: After determining the states of the plurality of first edge nodes according to the edge node state map and the cloud node state map, the method further includes: When both the first state and the second state are normal states, continue to send tasks to the i-th fourth edge node, and control the i-th fourth edge node to continue to execute the received tasks.
16. The method for determining the state of an edge node according to claim 1, wherein: Before sending the m pieces of the first node status data received by the n-1 fourth edge nodes to the leader node, the method further includes: Randomly setting a waiting time for each of the n fourth edge nodes; When the waiting time of the i-th fourth edge node expires, sending a heartbeat message of the i-th fourth edge node to the m fifth edge nodes; When the m fifth edge nodes receive the heartbeat message of the i-th fourth edge node, determining whether the m fifth edge nodes are in a waiting-for-election state, wherein the waiting-for-election state is used to indicate that the edge node is waiting to run for the leader node; When it is determined that none of the m fifth edge nodes are in the waiting-for-election state, the i-th fourth edge node is determined to be the leader node.
17. A device for determining the state of an edge node, characterized in that: include: A first determination module is configured to randomly determine a second edge node from among a plurality of first edge nodes, and detect, through the second edge node, a plurality of third edge nodes from among the plurality of first edge nodes that meet a first condition, wherein the plurality of first edge nodes are ungrouped nodes from among the plurality of edge nodes, and the first condition indicates a network service condition and a central processing unit architecture that must be met for grouping the plurality of first edge nodes; a combining module, configured to combine the second edge node and the plurality of third edge nodes to obtain a first group, and periodically send first node status data of m fifth edge nodes to the i-th fourth edge node in the first group, wherein the first group includes n fourth edge nodes, the n fourth edge nodes include the i-th fourth edge node and the m fifth edge nodes, the m fifth edge nodes are edge nodes among the n fourth edge nodes except the i-th fourth edge node, and i [1, n], i, m, n are all positive integers; The second determining module is configured to send the m pieces of the first node status data received by the n-1 fourth edge nodes to the leader node, so that the leader node can determine the first node status data according to the received data. determining the second node status data of the n fourth edge nodes based on the first node status data, wherein the n fourth edge nodes include the leader node; The third determination module is used to generate an edge node status map based on n pieces of second node status data, and determine the status of the multiple first edge nodes based on the edge node status map and the cloud node status map, wherein the cloud node status map includes multiple third node status data periodically uploaded by the multiple first edge nodes, and the multiple third node status data correspond one-to-one to the multiple first edge nodes.
18. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the method for determining the state of an edge node according to any one of claims 1 to 16 when executing the computer program.
19. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method for determining the state of an edge node according to any one of claims 1 to 16 are implemented.
20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for determining the state of an edge node according to any one of claims 1 to 16 are implemented.
Citation Information
Patent Citations
Resource preheating method, device and equipment of CDN (Content Delivery Network) and storage medium
CN117834730A
Multi-terminal data transmission detection method and system based on artificial intelligence
CN119922092A