Power internet of things edge node failover method, apparatus, device and medium
By using an adaptive heartbeat message mechanism and state topology graph prediction, the target migration node is dynamically selected and data is synchronized, which solves the problem of service interruption in the fault transfer of edge nodes in the power Internet of Things, realizes uninterrupted service migration, and improves the stability and continuity of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG POWER GRID CO LTD INFORMATION CENT
- Filing Date
- 2026-01-22
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies suffer from delayed migration decisions and business interruptions during edge node fault transfer in the power Internet of Things (IoT), making it difficult to achieve continuity and consistency of business status and failing to meet the stringent requirements of high-reliability power applications.
Real-time status data is generated through an adaptive heartbeat message mechanism, a status topology map is dynamically generated, and trend prediction and risk assessment are performed. A suitable target migration node is selected, and business data is migrated synchronously to ensure uninterrupted transfer.
It enables smooth and uninterrupted fault transfer of power Internet of Things services, improving the continuity and stability of service task execution.
Smart Images

Figure CN122339950A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power Internet of Things (IoT) operation and maintenance management technology, and in particular to a method, apparatus, equipment and medium for fault transfer of edge nodes in the power IoT. Background Technology
[0002] In power Internet of Things (IoT) systems, edge nodes serve as crucial hubs connecting physical power equipment with cloud-based management platforms. They undertake core tasks such as real-time data acquisition, local analysis, and rapid control. Their continuous and stable operation directly impacts the power supply reliability of the distribution network, the efficiency of renewable energy integration, and the power quality for users. A failure in an edge node will result in the loss of monitoring signals and the interruption of control commands within its coverage area, potentially leading to localized power supply anomalies or even escalation of the fault. Therefore, achieving rapid and smooth migration during edge node failures, ensuring business continuity and system self-recovery capabilities, is a key technological requirement for enhancing the resilience of the power IoT.
[0003] Currently, most common failover methods in the industry are based on preset rules and static configurations. For example, node liveness is detected through periodic heartbeat messages. When the number of consecutive lost heartbeats reaches a fixed threshold, the node is considered to have failed, and business traffic is switched to a pre-designated backup node. These methods provide basic redundancy protection to a certain extent. However, they have a fundamental core flaw: migration decisions lag significantly behind the occurrence of failures, and the migration action itself is usually accompanied by explicit interruption of business services. Specifically, the "disconnect first, rebuild later" or simple switchover migration modes in existing technologies cannot maintain the continuity and consistency of business states (such as ongoing computing tasks and real-time session contexts) at the moment of switching. This leads to significant service gaps or data loss in critical power control services, making it difficult to meet the stringent requirements of "zero-aware" migration for high-reliability power applications. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and medium for fault transfer at the edge node of the power Internet of Things (IoT), which enables smooth and uninterrupted service migration during fault transfer at the edge node, thereby improving the continuity and stability of power IoT service task execution.
[0005] In a first aspect, embodiments of the present invention provide a method for fault transfer of edge nodes in a power Internet of Things, comprising: For each edge node in the target power Internet of Things system, a preset adaptive heartbeat message mechanism is used to generate and broadcast the current node's heartbeat message and receive heartbeat messages from neighboring nodes; wherein, the heartbeat message includes the node's operating status data and communication status data; For each edge node, a state topology map is dynamically generated based on its own and each neighbor node's real-time heartbeat messages, and state trend prediction and risk assessment are performed based on the pre-acquired historical state sequence of each edge node; wherein, the state topology map integrates the electrical connection relationship between the current node and each neighbor node and real-time link communication data. Based on the results of state trend prediction and risk assessment, it is determined whether each edge node needs to perform failover. When there is a fault node that needs to perform failover, a target migration node is determined according to the state topology diagram of the fault node, and the business data of the fault node is synchronously migrated to the target migration node so that the target migration node can continue to execute the power Internet of Things tasks of the fault node according to the business data.
[0006] This invention provides a real-time, lightweight data acquisition and broadcasting channel for node health status and network communication conditions through an adaptive heartbeat message mechanism, offering the most original and timely data input for all subsequent analysis and decision-making. By dynamically generating a state topology map, the original heartbeat data is transformed into a network structure view including electrical relationships and real-time link quality, providing a contextual environment for path selection and target evaluation during migration. Furthermore, through state trend prediction and risk assessment, future trends are predicted from the current state, and risks are quantified, providing a basis for preventative migration decisions. Based on the topology map and real-time status, the target migration node is determined, ensuring that the migration destination can take over the work with capability and quality. Synchronous migration of business data guarantees the continuity of business operations in the target power IoT system. Compared with existing technologies, this invention can achieve smooth and uninterrupted business migration during fault transfer at edge nodes, thereby improving the continuity and stability of power IoT business task execution.
[0007] In some preferred embodiments of the first aspect, the step of generating and broadcasting the heartbeat message of the current node through a preset adaptive heartbeat message mechanism specifically includes: Obtain the current load data and service priority of the current node, and determine the message sending interval of the current node based on the current load data and service priority; Obtain the current node's running status data and communication status data, and encapsulate the running status data and communication status data into a heartbeat message; According to the message sending interval, the heartbeat message is sent to each neighboring node.
[0008] This invention dynamically adjusts the message interval based on node load and service priority, enabling the heartbeat mechanism to adapt to network load while ensuring timely monitoring. This avoids unnecessary additional overhead when nodes are busy or communication is congested, thereby improving the overall efficiency of the system.
[0009] In some preferred embodiments of the first aspect, the step of dynamically generating a state topology graph based on real-time heartbeat messages from itself and its neighboring nodes specifically includes: Parse each received heartbeat message and extract the source node identifier, running status data and communication status data from the heartbeat message; With the current node as the root node, create or update the corresponding neighbor node objects according to the source node identifier, and set the status attributes of each node object according to the running status data; Based on the communication status data between the current node and each neighboring node, create or update the topological edge between the current node and each neighboring node, and set the real-time link communication attributes of the topological edge; Obtain the pre-configured electrical connection table. If the current node has an electrical connection with a neighboring node in the electrical connection table, add an electrical connection identifier to the corresponding topology edge to generate a state topology graph with the current node as the source node.
[0010] This invention integrates the real-time operating status, communication attributes, and electrical connection relationships of each node to form a state topology diagram of each node, providing a complete and real-time decision-making basis for subsequent fault transfer.
[0011] In some preferred embodiments of the first aspect, the step of performing state trend prediction and risk assessment based on the pre-acquired historical state sequences of each edge node includes: For each edge node, extract the time-series values of each operating status data and communication status data within a preset time period from the pre-acquired historical state sequence; By using a preset time series prediction algorithm, the time series values are analyzed to predict the state data of the current node in the future preset period, and a state trend prediction result is generated.
[0012] This invention improves the foresight of failover decisions by using time series forecasting algorithms to predict trends.
[0013] In some preferred embodiments of the first aspect, the step of performing state trend prediction and risk assessment based on the pre-acquired historical state sequences of each edge node includes: Based on the state trend prediction results, the current real-time state data of the current node, and the fault modes recorded in the historical state sequence, a comprehensive risk score for the current node is calculated; wherein, the comprehensive risk score integrates the current state deviation, the state deterioration trend, and the historical fault correlation. Based on a preset risk scoring threshold, the comprehensive risk score is mapped to the corresponding risk assessment level.
[0014] This invention introduces a comprehensive risk scoring model that integrates three dimensions: current deviation, deterioration trend, and historical fault correlation. This transforms risk assessment from a single indicator judgment to a multi-factor quantitative assessment, making the decision-making basis more scientific and comprehensive, and significantly improving the accuracy of risk warnings and the rationality of migration decisions.
[0015] In some preferred embodiments of the first aspect, the target migration node is determined based on the state topology diagram of the faulty node, specifically as follows: Based on the state topology diagram of the faulty node, nodes with a risk level lower than a preset risk threshold among the neighboring nodes of the faulty node are selected to form a candidate node set; For each candidate node in the candidate node set, a communication quality score between each candidate node and the faulty node is calculated based on the real-time link communication data in the state topology diagram. Based on the electrical connection relationship identifiers in the state topology diagram, calculate the electrical connection tightness score between each candidate node and the faulty node; Obtain the running status data of each candidate node, and calculate the available computing resource score and current load score of each candidate node; By using preset weights, the communication quality score, electrical connection tightness score, available computing resource score, and current load score of each candidate node are weighted and summed to obtain the comprehensive recommendation score for each candidate node. The candidate node with the highest comprehensive recommendation score is determined as the target migration node for the faulty node.
[0016] This invention ensures that the selected target node is not only "usable" but also "easy to use and stable" (with excellent communication and electrical proximity) by calculating the comprehensive recommendation score of each neighbor node, while also having sufficient resources and light load, thus guaranteeing the performance and success rate of task execution after migration.
[0017] In some preferred embodiments of the first aspect, the service data of the faulty node is synchronously migrated to the target migration node, specifically as follows: While the faulty node is still performing its power Internet of Things (IoT) tasks, a basic state image is generated in real time based on the current business status data of the faulty node, and the basic state image is synchronized to the target migration node through a preset migration control channel. During the basic state mirror synchronization process, the faulty node will continuously generate incremental business data as an incremental data log, and synchronize the incremental data log to the target migration node in each preset incremental update cycle. When the difference between the service status of the target migration node and the service status of the faulty node is lower than a preset threshold, the faulty node is suspended from receiving new service requests, and the latest incremental data log is synchronized to the target migration node. Switch the external business traffic entry point of the power Internet of Things task from the fault node to the target migration node; After the external business traffic entry point confirms a successful switchover, the migrated business data and resources in the faulty node are released.
[0018] This invention reduces service downtime (RTO) and data loss (RPO) by synchronizing the state during the operation of the old node and switching traffic at the last instant, thereby achieving a smooth and uninterrupted service migration.
[0019] Secondly, embodiments of the present invention provide a power Internet of Things (IoT) edge node fault transfer device, including a heartbeat status monitoring module, a risk assessment module, and a fault transfer module, wherein... The heartbeat status monitoring module is used to generate and broadcast the heartbeat message of the current node for each edge node in the target power Internet of Things system through a preset adaptive heartbeat message mechanism, and to receive the heartbeat messages of neighboring nodes; wherein, the heartbeat message includes the node's operating status data and communication status data; The risk assessment module is used to dynamically generate a state topology map for each edge node based on its own and its neighboring nodes' real-time heartbeat messages, and to perform state trend prediction and risk assessment based on the pre-acquired historical state sequence of each edge node; wherein, the state topology map integrates the electrical connection relationship between the current node and its neighboring nodes and real-time link communication data. The failover module is used to determine whether each edge node needs to be failover based on the results of state trend prediction and risk assessment. When there is a fault node that needs to be failover, the module determines the target migration node according to the state topology diagram of the fault node and synchronously migrates the business data of the fault node to the target migration node, so that the target migration node can continue to execute the power Internet of Things task of the fault node according to the business data.
[0020] This invention, through a heartbeat status monitoring module, utilizes an adaptive heartbeat message mechanism to provide a real-time, lightweight data acquisition and broadcasting channel for node health status and network communication conditions, providing the most original and timely data input for all subsequent analysis and decision-making. Through a risk assessment module, a state topology map is dynamically generated, transforming the raw heartbeat data into a network structure view including electrical relationships and real-time link quality. This provides a contextual environment for path selection and target evaluation during migration. Furthermore, through state trend prediction and risk assessment, future trends are predicted from the current state, and risks are quantified, providing a basis for preventative migration decisions. Finally, through a failover module, based on the topology map and real-time status, the target migration node is determined, ensuring the migration destination can take over the work with capability and quality. Synchronous migration of business data ensures the continuity of business services in the target power IoT system.
[0021] Thirdly, embodiments of the present invention provide a terminal device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction that causes the processor to perform the operation of the power Internet of Things edge node failover method as described in any of the above.
[0022] Fourthly, embodiments of the present invention provide a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device or apparatus where the computer-readable storage medium is located to perform the power Internet of Things edge node failover method as described in any of the above.
[0023] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0024] Figure 1 A schematic diagram of a power Internet of Things (IoT) edge node fault transfer method provided in an embodiment of the present invention; Figure 2 This is a structural diagram of a power Internet of Things (IoT) edge node fault transfer device provided in an embodiment of the present invention. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] Example 1: like Figure 1 As shown, an embodiment of the present invention provides a power Internet of Things (IoT) edge node fault transfer method, which includes the following steps: S101, for each edge node in the target power Internet of Things system, a preset adaptive heartbeat message mechanism is used to generate and broadcast the current node's heartbeat message and receive heartbeat messages from neighboring nodes; wherein, the heartbeat message includes the node's operating status data and communication status data; In this embodiment, the step of generating and broadcasting the heartbeat message of the current node through a preset adaptive heartbeat message mechanism specifically involves: obtaining the current load data and service priority of the current node, and determining the message sending interval of the current node based on the current load data and service priority; obtaining the running status data and communication status data of the current node, and encapsulating the running status data and communication status data into a heartbeat message; and sending the heartbeat message to each neighboring node according to the message sending interval.
[0027] In one specific embodiment, a preset adaptive heartbeat message mechanism is used to generate and broadcast the heartbeat message of the current node, specifically as follows: First, read the operating status data from the local monitoring module of the edge node, including: CPU utilization: the average value over the past minute; memory usage: the value at the current moment; business processing queue length: the number of power IoT tasks waiting to be processed; local node risk assessment value: the risk score predicted based on historical status sequences.
[0028] Read communication status data from the node's network communication module, including: average round-trip time of the most recent heartbeat cycle: the average delay of the last heartbeat interaction with each neighboring node; link quality indication: such as received signal strength (RSSI) or signal-to-noise ratio (SNR) of carrier communication; and packet loss rate in the current cycle: the packet loss situation of the service channel.
[0029] Furthermore, the collected data are input into a heart rate cycle calculation function: Set a base heartbeat period T_base (e.g., 100 milliseconds); define a weighting coefficient (W_cpu, W_mem, W_risk...) and an influencing factor for each input parameter; calculate the dynamic adjustment factor α, for example: α = 1 + (CPU utilization * W_cpu + risk assessment value * W_risk) - (link quality * W_link). α increases when the load or risk is high, and decreases when the communication quality is good; calculate the final heartbeat period T_heartbeat = T_base * α. Simultaneously set upper and lower limits for T_heartbeat (e.g., minimum 50ms, maximum 500ms) to prevent the period from being too short or too long; output the sending interval T_heartbeat for this heartbeat message.
[0030] Furthermore, the collected operational status data and communication status data, together with the calculated heartbeat cycle value T_heartbeat, node ID, and timestamp, are encapsulated into a structured data packet to obtain a complete heartbeat status message.
[0031] Furthermore, the node broadcasts the encapsulated heartbeat status message to all neighboring nodes through its communication interface.
[0032] Furthermore, start a timer, wait for the T_heartbeat time, and then repeat the above steps to start the next heartbeat cycle.
[0033] It should be noted that heartbeat messages are status monitoring signals sent periodically through the network. They are mainly used to determine the online status and operational health of machines and memory nodes, and are a well-known concept in the field.
[0034] S102, for each edge node, a state topology map is dynamically generated based on its own and each neighbor node's real-time heartbeat messages, and state trend prediction and risk assessment are performed based on the historical state sequence pre-acquired by each edge node; wherein, the state topology map integrates the electrical connection relationship between the current node and each neighbor node and real-time link communication data. In this embodiment, the step of dynamically generating a state topology graph based on real-time heartbeat messages from itself and its neighboring nodes specifically involves: parsing each received heartbeat message and extracting the source node identifier, operational status data, and communication status data from the heartbeat message; using the current node as the root node, creating or updating corresponding neighboring node objects based on the source node identifier, and setting the status attributes of each node object based on the operational status data; creating or updating topology edges between the current node and its neighboring nodes based on the communication status data between the current node and its neighboring nodes, and setting the real-time link communication attributes of the topology edges; obtaining a pre-configured electrical connection relationship table, and if the current node and a neighboring node have an electrical connection in the electrical connection relationship table, adding an electrical connection relationship identifier to the corresponding topology edge to generate a state topology graph with the current node as the source node.
[0035] In one specific embodiment, the step of dynamically generating a state topology graph based on the real-time heartbeat messages of itself and each neighboring node specifically involves: First, obtain the local heartbeat status message: the node's own running status data and communication status data; the neighbor heartbeat status message set: all heartbeat status messages broadcast by neighboring nodes received from the communication interface; and the static electrical connection table (optional base): pre-configured electrical connection relationships between nodes (such as on the same feeder branch), used for initial verification or to enrich the topology semantics.
[0036] Furthermore, each received heartbeat status message is parsed to extract the source node identifier. If the identifier is not in the current topology node list, a new topology node object is created to obtain the updated list of active nodes.
[0037] Furthermore, for each neighboring node: using its own node identifier and the neighboring node identifier as endpoints, create or update a topological edge in the topology graph; extract communication status data related to that specific neighbor (such as one-way / two-way latency to that neighbor, packet loss rate) from its own heartbeat message as an attribute of one direction of the edge; extract its running status data (CPU, memory, etc.) and its reported communication status data (which may include latency to other neighbors, used to build a broader topology) from the neighbor's heartbeat message, and inject them into the corresponding node object and edge object respectively, to obtain a dynamic edge set with attributes such as latency, quality, and node status.
[0038] Furthermore, the static electrical connection table is queried. If the two nodes corresponding to a dynamically created edge are connected in the electrical connection table (such as belonging to the same feeder branch), an electrical connection identifier (such as "same feeder") is added to the topology edge, and it may be assigned a higher reliability weight, resulting in an enhanced topology edge that incorporates electrical connection attributes.
[0039] Furthermore, the set of topology node objects and the set of enhanced topology edges processed above are organized into a graph data structure. An adjacency list is used for storage, facilitating quick lookup of neighbor and link states. Each node entry contains a snapshot of its operational state, and each adjacency edge record contains real-time communication metrics and electrical relationship identifiers, resulting in a state topology graph data structure that reflects the current real-time state.
[0040] It should be noted that a topology maintenance thread is established for the aforementioned state topology graph. Each time a new heartbeat message (from itself or a neighbor) is received, a local update of the corresponding node and edge is triggered. For neighbor nodes that have not been updated for a certain period of time (e.g., 3 times the heartbeat cycle), they are marked as potentially offline and moved from the active node list to the pending confirmation list, thus forming a continuously updated dynamic state topology graph that reflects the latest state of the network.
[0041] In this embodiment, the step of performing state trend prediction and risk assessment based on the pre-acquired historical state sequences of each edge node includes: for each edge node, extracting the time-series values of each operating state data and communication state data within a preset time period from the pre-acquired historical state sequences; analyzing the time-series values using a preset time-series prediction algorithm to predict the state data of the current node in the future preset period, and generating a state trend prediction result.
[0042] In this embodiment, the step of performing state trend prediction and risk assessment based on the pre-acquired historical state sequences of each edge node includes: calculating a comprehensive risk score for the current node based on the state trend prediction results, the current real-time state data of the current node, and the fault modes recorded in the historical state sequences; wherein, the comprehensive risk score integrates the current state deviation, the state deterioration trend, and the historical fault correlation; and mapping the comprehensive risk score to the corresponding risk assessment level according to a preset risk score threshold.
[0043] In one specific embodiment, the step of performing state trend prediction and risk assessment based on the pre-acquired historical state sequences of each edge node includes: First, obtain the historical state sequence: each node ID corresponds to a time series database, which stores the running status data (CPU, memory, queue length, etc.) and communication status data (latency with each neighbor, packet loss rate, etc.) collected in each historical period according to the timestamp; current state snapshot: the latest state data obtained from the latest heartbeat message or real-time collection; prediction configuration parameters: such as prediction step size (the next 3 periods), weights of various indicators used for risk assessment (W_cpu, W_trend, W_history...).
[0044] Furthermore, for a specific indicator (such as CPU utilization), the values of the most recent N periods are extracted from its historical state sequence; using a lightweight time series forecasting algorithm such as exponential smoothing or ARIMA model as input, the value of the indicator in the next M periods is predicted; and the predicted state sequence of the node is generated, which contains the predicted values of each future time point.
[0045] Furthermore, the deviation of the current values of key indicators (such as CPU, memory, and main communication latency) from their respective health baselines is calculated; the predicted state sequence is analyzed to calculate whether the predicted values of key indicators show an upward trend (such as increased load) or a deteriorating trend and its slope; the historical records of the node are queried to calculate the frequency of subsequent failures of similar state patterns in the recent period (such as within 24 hours); a risk assessment function is defined: Risk Score = Σ(Eigenvalue * Corresponding Weight), for example: Risk Score = Current Deviation * W_current + Trend Deterioration * W_trend + Historical Failure Correlation * W_history; a preset risk score threshold is set, and the calculated risk score is mapped to discrete risk levels, such as: "Normal", "Attention", "Warning", "Severe"; the comprehensive risk score and risk level of the node are obtained.
[0046] The final output includes: a status prediction report containing the predicted values and trends of key indicators for each node; and a risk assessment report containing the risk score, risk level, and main risk factors for each node (such as "CPU trend deterioration" and "excessive communication latency with node A").
[0047] S103. Based on the results of state trend prediction and risk assessment, determine whether each edge node needs to perform failover. When there is a fault node that needs to perform failover, determine the target migration node according to the state topology diagram of the fault node, and synchronously migrate the business data of the fault node to the target migration node so that the target migration node can continue to execute the power Internet of Things task of the fault node according to the business data.
[0048] It should be noted that failover refers to the rapid activation of redundant or backup servers, systems, hardware, or networks to take over the work when an active service or application unexpectedly terminates; it is a well-known concept in the field.
[0049] In one specific embodiment, based on the results of state trend prediction and risk assessment, it is determined whether each edge node needs to undergo failover, specifically as follows: Establish a migration decision function, which uses risk level as the primary decision factor and state trend as the auxiliary decision and timing factor.
[0050] Example logic: If the risk level is "Severe", the output decision is "Migration Required" regardless of the trend; if the risk level is "Warning", the status trend forecast report is further checked; if the predicted value of the core indicator (such as CPU predicted load) exceeds the safety threshold in the next 3 periods, or the deterioration trend exceeds the threshold, the output decision is "Migration Required", otherwise, the output is "Observation Pending"; if the risk level is "Attention" or lower, the output decision is "Migration Not Required".
[0051] Furthermore, a decision confidence level can be assigned to the decision outcome. For example, decisions based on a "severity" level have the highest confidence level (e.g., 95%); decisions based on "warning + worsening trend" have the next highest confidence level (e.g., 80%); and decisions with "wait and see" can have a countdown timer set.
[0052] Finally, a node migration decision instruction is generated, which includes: target node identifier, decision result (migration required / no migration required), suggested migration time (immediately / or a future predicted failure time), decision confidence level, and main decision basis (such as "severe risk level" or "predicted CPU overload").
[0053] In this embodiment, the target migration node is determined based on the state topology diagram of the faulty node. Specifically, the following steps are taken: Based on the state topology diagram of the faulty node, nodes with a risk level lower than a preset risk threshold among the neighboring nodes of the faulty node are selected to form a candidate node set; for each candidate node in the candidate node set, a communication quality score between each candidate node and the faulty node is calculated based on real-time link communication data in the state topology diagram; an electrical connection tightness score between each candidate node and the faulty node is calculated based on electrical connection relationship identifiers in the state topology diagram; the operating status data of each candidate node is obtained, and the available computing resource score and current load score of each candidate node are calculated; the communication quality score, electrical connection tightness score, available computing resource score, and current load score of each candidate node are weighted and summed using preset weights to obtain a comprehensive recommendation score for each candidate node; the candidate node with the highest comprehensive recommendation score is determined as the target migration node of the faulty node.
[0054] In one specific embodiment, the target migration node is determined based on the state topology graph of the faulty node. Specifically, the neighbor node list of the faulty node is traversed. The traversal filtering conditions include a risk level of "normal" or "watchful" (excluding high-risk nodes), a node status of being online and active, and a node type having the hardware and software capabilities to perform the target task, thereby obtaining a preliminary candidate node set.
[0055] Furthermore, scores are calculated for each candidate node in the following four dimensions and then normalized (e.g., 0-100 points). Computational capacity score: Compares the available computing resources (CPU idle rate, available memory) of candidate nodes with the task resource requirements. The more abundant the resources, the higher the score; Communication quality score: Extract real-time link communication data (latency, packet loss rate, bandwidth) between candidate nodes and faulty nodes from the topology graph. The higher the quality, the higher the score. Electrical tightness score: If the candidate node and the faulty node have an electrical connection relationship in the topology graph (such as "co-feeder"), a high score is given; Current load score: Based on the length of the business processing queue of the candidate node or the current task load, the lighter the load, the higher the score.
[0056] Furthermore, preset weights are assigned to the four scoring dimensions mentioned above (e.g., computing power 0.3, communication quality 0.3, electrical tightness 0.2, current load 0.2). The comprehensive recommendation score for each candidate node is calculated as Σ(dimensional score × dimensional weight), generating a sorted list of candidate nodes arranged in descending order of their comprehensive recommendation scores.
[0057] Furthermore, the candidate node ranked first is selected as the pre-selected target node. A lightweight probe or reservation request can be sent to this node to verify whether it still meets the current conditions.
[0058] In this embodiment, the business data of the faulty node is synchronously migrated to the target migration node. Specifically, while the faulty node is still executing its power IoT task, a basic state image is generated in real time based on the current business status data of the faulty node, and the basic state image is synchronized to the target migration node through a preset migration control channel. During the basic state image synchronization process, the faulty node records the continuously generated incremental business data as an incremental data log, and synchronizes the incremental data log to the target migration node in each preset incremental update cycle. When the difference between the business status of the target migration node and the business status of the faulty node is lower than a preset threshold, the faulty node is suspended from receiving new business requests, and the latest incremental data log is synchronized to the target migration node. The external business traffic entry point of the power IoT task is switched from the faulty node to the target migration node. After the external business traffic entry point confirms a successful switch, the migrated business data and resources in the faulty node are released.
[0059] In one specific embodiment, the business data of the faulty node is synchronously migrated to the target migration node, specifically as follows: First, after receiving the migration instruction, the faulty node (source node) takes a snapshot of the business data currently being processed to generate a basic state image; the source node initiates a migration session with the target node, sends a migration request, and attaches the task requirements and metadata of the basic state image; the target node checks its own resources, reserves the necessary computing and storage space, and returns a migration ready confirmation; a migration control channel is established to complete resource reservation.
[0060] Furthermore, the source node transmits its basic state image to the target node via the migration control channel; simultaneously, the source node continues to execute its business operations. It records any subsequent changes to business data (incremental) in the incremental data log; the source node periodically synchronizes the incremental data log to the target node. The target node applies these logs sequentially, keeping its state in near real-time synchronization with the source node.
[0061] Furthermore, when the state difference between the source node and the target node is less than a preset threshold (e.g., minimal incremental log latency), a final switchover is triggered. The source node suspends receiving new external business requests and sends the last final incremental log. After applying the final log, the target node reports the state synchronization completion to the migration coordinator (which can be the source node itself or a third party). The migration coordinator atomically switches the business traffic entry point from the source node to the target node. Afterward, new requests are processed by the target node.
[0062] Furthermore, after confirming a successful switchover, the source node is notified; the source node releases the migrated service data and resources, ending the migration session; the node roles and load status in the network topology diagram are updated; the migration is confirmed to be complete, and the system topology status is updated; the updated system view shows that the target node has taken over the services of the faulty node and is operating normally.
[0063] This invention provides a real-time, lightweight data acquisition and broadcasting channel for node health status and network communication conditions through an adaptive heartbeat message mechanism, offering the most original and timely data input for all subsequent analysis and decision-making. By dynamically generating a state topology map, the original heartbeat data is transformed into a network structure view including electrical relationships and real-time link quality, providing a contextual environment for path selection and target evaluation during migration. Furthermore, through state trend prediction and risk assessment, future trends are predicted from the current state, and risks are quantified, providing a basis for preventative migration decisions. Based on the topology map and real-time status, the target migration node is determined, ensuring that the migration destination can take over the work with capability and quality. Synchronous migration of business data guarantees the continuity of business operations in the target power IoT system. Compared with existing technologies, this invention can achieve smooth and uninterrupted business migration during fault transfer at edge nodes, thereby improving the continuity and stability of power IoT business task execution.
[0064] Example 2: like Figure 2 As shown, this embodiment provides a power Internet of Things (IoT) edge node failover device, including a heartbeat status monitoring module 201, a risk assessment module 202, and a failover module 203, wherein... The heartbeat status monitoring module 201 is used to generate and broadcast the heartbeat message of the current node and receive the heartbeat messages of neighboring nodes for each edge node in the target power Internet of Things system through a preset adaptive heartbeat message mechanism; wherein, the heartbeat message includes the node's operating status data and communication status data. In this embodiment, the heartbeat status monitoring module 201 generates and broadcasts the heartbeat message of the current node through a preset adaptive heartbeat message mechanism. Specifically, the heartbeat status monitoring module 201 obtains the current load data and service priority of the current node, and determines the message sending interval of the current node based on the current load data and service priority; obtains the running status data and communication status data of the current node, and encapsulates the running status data and communication status data into a heartbeat message; and sends the heartbeat message to each neighboring node according to the message sending interval.
[0065] The risk assessment module 202 is used to dynamically generate a state topology map for each edge node based on its own and each neighbor node's real-time heartbeat messages, and to perform state trend prediction and risk assessment based on the historical state sequence pre-acquired by each edge node; wherein, the state topology map integrates the electrical connection relationship between the current node and each neighbor node and real-time link communication data. In this embodiment, the risk assessment module 202 dynamically generates a state topology graph based on its own and each neighboring node's real-time heartbeat messages. Specifically, it parses each received heartbeat message and extracts the source node identifier, operational status data, and communication status data from the heartbeat message; using the current node as the root node, it creates or updates the corresponding neighboring node object based on the source node identifier and sets the status attributes of each node object based on the operational status data; based on the communication status data between the current node and each neighboring node, it creates or updates the topology edges between the current node and each neighboring node and sets the real-time link communication attributes of the topology edges; it obtains a pre-configured electrical connection relationship table, and if the current node and a neighboring node have an electrical connection in the electrical connection relationship table, it adds an electrical connection relationship identifier to the corresponding topology edge to generate a state topology graph with the current node as the source node.
[0066] In this embodiment, the risk assessment module 202 performs state trend prediction and risk assessment based on the pre-acquired historical state sequence of each edge node, including: for each edge node, the risk assessment module 202 extracts the time series values of each operating state data and communication state data within a preset time period from the pre-acquired historical state sequence; analyzes the time series values through a preset time series prediction algorithm, predicts the state data of the current node in the future preset period, and generates a state trend prediction result.
[0067] In this embodiment, the risk assessment module 202 performs state trend prediction and risk assessment based on the pre-acquired historical state sequences of each edge node, including: the risk assessment module 202 calculates the comprehensive risk score of the current node based on the state trend prediction results, the current real-time state data of the current node, and the fault modes recorded in the historical state sequences; wherein, the comprehensive risk score integrates the current state deviation, the state deterioration trend, and the historical fault correlation; and maps the comprehensive risk score to the corresponding risk assessment level according to a preset risk score threshold.
[0068] The failover module 203 is used to determine whether each edge node needs to be failover based on the results of state trend prediction and risk assessment. When there is a fault node that needs to be failover, the module determines the target migration node according to the state topology diagram of the fault node and synchronously migrates the business data of the fault node to the target migration node, so that the target migration node can continue to execute the power Internet of Things task of the fault node according to the business data.
[0069] In this embodiment, the failover module 203 determines the target migration node based on the state topology diagram of the faulty node. Specifically, the failover module 203 filters out nodes with a risk level lower than a preset risk threshold from the neighboring nodes of the faulty node based on the state topology diagram, forming a candidate node set. For each candidate node in the candidate node set, based on the real-time link communication data in the state topology diagram, it calculates the communication quality score between each candidate node and the faulty node. Based on the electrical connection relationship identifier in the state topology diagram, it calculates the electrical connection tightness score between each candidate node and the faulty node. It obtains the operating status data of each candidate node and calculates the available computing resource score and current load score of each candidate node. Through preset weights, it performs a weighted summation of the communication quality score, electrical connection tightness score, available computing resource score, and current load score of each candidate node to obtain a comprehensive recommendation score for each candidate node. The candidate node with the highest comprehensive recommendation score is determined as the target migration node of the faulty node.
[0070] In this embodiment, the failover module 203 determines the target migration node based on the state topology diagram of the faulty node. Specifically, the failover module 203 synchronously migrates the service data of the faulty node to the target migration node. While the faulty node is still executing its power IoT tasks, a basic state image is generated in real time based on the faulty node's current business status data, and synchronized to the target migration node through a preset migration control channel. During the basic state image synchronization process, the faulty node records continuously generated incremental business data as incremental data logs, and synchronizes the incremental data logs to the target migration node in each preset incremental update cycle. When the difference between the business status of the target migration node and the business status of the faulty node is lower than a preset threshold, the faulty node is suspended from receiving new business requests, and the latest incremental data logs are synchronized to the target migration node. The external business traffic entry point of the power IoT task is switched from the faulty node to the target migration node. After the external business traffic entry point confirms a successful switch, the migrated business data and resources in the faulty node are released.
[0071] For a more detailed explanation of the working principle and procedures of this embodiment, please refer to the relevant description in Embodiment 1.
[0072] This invention, through a heartbeat status monitoring module 201, utilizes an adaptive heartbeat message mechanism to provide a real-time, lightweight data acquisition and broadcasting channel for node health status and network communication conditions, providing the most original and timely data input for all subsequent analysis and decision-making. Through a risk assessment module 202, a state topology map is dynamically generated, transforming the raw heartbeat data into a network structure view including electrical relationships and real-time link quality. This provides a contextual environment for path selection and target evaluation during migration. Furthermore, through state trend prediction and risk assessment, future trends are predicted from the current state, and risks are quantified, providing a basis for preventative migration decisions. Through a failover module 203, based on the topology map and real-time status, the target migration node is determined, ensuring that the migration destination has the capability and quality to take over the work. Simultaneous migration of business data ensures the continuity of business services in the target power IoT system.
[0073] Example 3: This embodiment provides a terminal device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction that causes the processor to perform the operation of the power Internet of Things edge node failover method as described in any of the above.
[0074] Example 4: This invention provides a computer-readable storage medium including a stored computer program, wherein the computer program, when running, controls the device or apparatus containing the computer-readable storage medium to execute the power Internet of Things edge node failover method as described in any of the above.
[0075] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0076] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A power internet of things edge node failover method, characterized in that, include: For each edge node in the target power Internet of Things system, a preset adaptive heartbeat message mechanism is used to generate and broadcast the current node's heartbeat message and receive heartbeat messages from neighboring nodes; wherein, the heartbeat message includes the node's operating status data and communication status data; For each edge node, a state topology map is dynamically generated based on its own and each neighbor node's real-time heartbeat messages, and state trend prediction and risk assessment are performed based on the pre-acquired historical state sequence of each edge node; wherein, the state topology map integrates the electrical connection relationship between the current node and each neighbor node and real-time link communication data. Based on the results of state trend prediction and risk assessment, it is determined whether each edge node needs to perform failover. When there is a fault node that needs to perform failover, a target migration node is determined according to the state topology diagram of the fault node, and the business data of the fault node is synchronously migrated to the target migration node so that the target migration node can continue to execute the power Internet of Things tasks of the fault node according to the business data.
2. The power internet of things edge node failover method of claim 1, wherein, The process of generating and broadcasting the heartbeat message of the current node through a preset adaptive heartbeat message mechanism is as follows: Obtain the current load data and service priority of the current node, and determine the message sending interval of the current node based on the current load data and service priority; Obtain the current node's running status data and communication status data, and encapsulate the running status data and communication status data into a heartbeat message; According to the message sending interval, the heartbeat message is sent to each neighboring node. 3.The power internet of things edge node failover method of claim 1, wherein, The process of dynamically generating a state topology graph based on real-time heartbeat messages from itself and its neighboring nodes is as follows: Parse each received heartbeat message and extract the source node identifier, running status data and communication status data from the heartbeat message; With the current node as the root node, create or update the corresponding neighbor node objects according to the source node identifier, and set the status attributes of each node object according to the running status data; Based on the communication status data between the current node and each neighboring node, create or update the topological edge between the current node and each neighboring node, and set the real-time link communication attributes of the topological edge; Obtain the pre-configured electrical connection table. If the current node has an electrical connection with a neighboring node in the electrical connection table, add an electrical connection identifier to the corresponding topology edge to generate a state topology graph with the current node as the source node.
4. The power internet of things edge node failover method of claim 1, wherein, The step of performing state trend prediction and risk assessment based on the pre-acquired historical state sequences of each edge node includes: For each edge node, extract the time-series values of each operating status data and communication status data within a preset time period from the pre-acquired historical state sequence; By using a preset time series prediction algorithm, the time series values are analyzed to predict the state data of the current node in the future preset period, and a state trend prediction result is generated.
5. The power internet of things edge node failover method of claim 4, wherein, The step of performing state trend prediction and risk assessment based on the pre-acquired historical state sequences of each edge node includes: Based on the state trend prediction results, the current real-time state data of the current node, and the fault modes recorded in the historical state sequence, a comprehensive risk score for the current node is calculated; wherein, the comprehensive risk score integrates the current state deviation, the state deterioration trend, and the historical fault correlation. Based on a preset risk scoring threshold, the comprehensive risk score is mapped to the corresponding risk assessment level.
6. The power internet of things edge node failover method of claim 1, wherein, Based on the state topology diagram of the faulty node, the target migration node is determined as follows: Based on the state topology diagram of the faulty node, nodes with a risk level lower than a preset risk threshold among the neighboring nodes of the faulty node are selected to form a candidate node set; For each candidate node in the candidate node set, a communication quality score between each candidate node and the faulty node is calculated based on the real-time link communication data in the state topology diagram. Based on the electrical connection relationship identifiers in the state topology diagram, calculate the electrical connection tightness score between each candidate node and the faulty node; Obtain the running status data of each candidate node, and calculate the available computing resource score and current load score of each candidate node; By using preset weights, the communication quality score, electrical connection tightness score, available computing resource score, and current load score of each candidate node are weighted and summed to obtain the comprehensive recommendation score for each candidate node. The candidate node with the highest comprehensive recommendation score is determined as the target migration node for the faulty node.
7. The power internet of things edge node failover method of claim 1, wherein, The service data of the faulty node is synchronously migrated to the target migration node, specifically as follows: While the faulty node is still performing its power Internet of Things (IoT) tasks, a basic state image is generated in real time based on the current business status data of the faulty node, and the basic state image is synchronized to the target migration node through a preset migration control channel. During the basic state mirror synchronization process, the faulty node will continuously generate incremental business data as an incremental data log, and synchronize the incremental data log to the target migration node in each preset incremental update cycle. When the difference between the service status of the target migration node and the service status of the faulty node is lower than a preset threshold, the faulty node is suspended from receiving new service requests, and the latest incremental data log is synchronized to the target migration node. Switch the external business traffic entry point of the power Internet of Things task from the fault node to the target migration node; After the external business traffic entry point confirms a successful switchover, the migrated business data and resources in the faulty node are released.
8. A power internet of things edge node failover apparatus, comprising: It includes a heart rate monitoring module, a risk assessment module, and a failover module, among which... The heartbeat status monitoring module is used to generate and broadcast the heartbeat message of the current node for each edge node in the target power Internet of Things system through a preset adaptive heartbeat message mechanism, and to receive the heartbeat messages of neighboring nodes; wherein, the heartbeat message includes the node's operating status data and communication status data; The risk assessment module is used to dynamically generate a state topology map for each edge node based on its own and its neighboring nodes' real-time heartbeat messages, and to perform state trend prediction and risk assessment based on the pre-acquired historical state sequence of each edge node; wherein, the state topology map integrates the electrical connection relationship between the current node and its neighboring nodes and real-time link communication data. The failover module is used to determine whether each edge node needs to be failover based on the results of state trend prediction and risk assessment. When there is a fault node that needs to be failover, the module determines the target migration node according to the state topology diagram of the fault node and synchronously migrates the business data of the fault node to the target migration node, so that the target migration node can continue to execute the power Internet of Things task of the fault node according to the business data.
9. A terminal device, comprising: include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the power Internet of Things edge node failover method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device or apparatus containing the computer-readable storage medium to perform the power Internet of Things edge node failover method as described in any one of claims 1 to 7.