Distributed heterogeneous memory shared data synchronization method and system oriented to power network device, medium and processor
By constructing a ring topology and RDMA connection, combined with hierarchical data classification and dynamic consistency adjustment, the problems of data synchronization delay and resource waste in power network devices are solved, achieving low-latency and high-efficiency data synchronization, and adapting to the heterogeneity of power systems and network fluctuations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2026-03-24
AI Technical Summary
Existing distributed heterogeneous memory-sharing data synchronization technologies cannot match the operating characteristics of power network devices in terms of topology adaptation, memory efficiency, policy flexibility, and communication latency. This results in high cross-regional data transmission latency, wasted memory resources, and synchronization delays that fail to meet critical business requirements.
A ring-shaped logical topology is constructed, an RDMA communication connection is established, hierarchical data classification is performed, and a differentiated replication strategy and a lightweight consensus algorithm are adopted to dynamically adjust the consistency level and optimize memory pool management and data synchronization process.
It achieves low-latency and high-efficiency data synchronization, adapts to the high real-time and high-reliability requirements of power network devices, reduces storage and transmission overhead, improves memory resource utilization and operation and maintenance efficiency, and adapts to the heterogeneity of power systems and network fluctuations.
Smart Images

Figure CN121728090A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data storage technology for power network devices, and in particular to a distributed heterogeneous memory-sharing data synchronization method, system, medium, and processor for power network devices. Background Technology
[0002] With the deepening of smart grid construction, the number and heterogeneity of power network devices (such as substation monitoring equipment, new energy grid connection terminals, regional dispatching units, etc.) have increased significantly. The power grid data (including real-time status monitoring data, fault alarm data, load statistics data, etc.) generated by various devices exhibit the characteristics of "massive quantity, high real-time performance, and high reliability", which puts forward stringent requirements for distributed memory sharing and data synchronization technologies.
[0003] In current power grids, distributed heterogeneous memory sharing data synchronization mainly relies on traditional general-purpose distributed solutions, which have the following core problems: Poor adaptability of topology architecture to power scenarios: Existing solutions mostly adopt star or bus topologies, which do not consider the coupling characteristics of "business relevance - physical distance" of power devices. For example, including geographically distant substation nodes and dispatch center nodes with low frequency of business interactions in the same synchronization cluster results in high cross-regional data transmission latency (often 10-50ms) and is prone to synchronization interruption due to link fluctuations. It cannot meet the low latency requirements of critical services such as fault alarm (requiring millisecond-level response) and real-time load scheduling.
[0004] Memory sharing is inefficient and has redundant overhead: Power network devices contain heterogeneous memory resources such as high-performance memory for servers and low-bandwidth memory for edge terminals. Existing solutions lack a unified distributed shared memory pool management mechanism. The memory of each node is scheduled independently, and high-frequency access data needs to be copied repeatedly between multiple nodes, which not only wastes memory resources (storage redundancy exceeds 60%), but also further aggravates synchronization delay due to multiple data copies between memory, kernel and user space.
[0005] Data synchronization strategies lack differentiation and dynamic adaptability: Power grid data has significantly different requirements for reliability and real-time performance—fault alarm data needs to be 100% unlost and have a synchronization latency of <5ms, while historical backup data does not have strict requirements for real-time performance. However, existing solutions mostly adopt a one-size-fits-all strategy of "full node replication + fixed consistency level": for critical data, fixed strong consistency can ensure reliability, but it is prone to timeouts when the network fluctuates; for ordinary data, full node replication causes ineffective use of bandwidth and storage resources, and cannot balance the relationship between "reliability-real-time performance-resource overhead".
[0006] Communication mechanisms are insufficient to support the power data transmission requirements: Traditional TCP / IP-based communication methods require forwarding through the operating system kernel, resulting in multiple buffer copies during data transmission and data interaction delays between single nodes often exceeding 8ms; even if some solutions introduce RDMA technology, they do not optimize the communication link configuration in conjunction with the characteristics of power data, thus failing to fully leverage the low-latency advantages of RDMA and still making it difficult to meet the synchronization and timeliness requirements of critical power services.
[0007] In summary, existing distributed heterogeneous memory-sharing data synchronization technologies cannot match the operating characteristics of power network devices in terms of topology adaptation, memory efficiency, policy flexibility, and communication latency. There is an urgent need for a dedicated data synchronization solution optimized for power scenarios to address the above-mentioned technical pain points and ensure the stable and efficient operation of the smart grid.
[0008] Therefore, there is a need for a distributed heterogeneous memory sharing data synchronization method, system, medium, and processor for power network devices. Summary of the Invention
[0009] To address the shortcomings of existing technologies in matching the operational characteristics of power network devices in terms of topology adaptation, memory efficiency, policy flexibility, and communication latency, this invention provides a distributed heterogeneous memory-sharing data synchronization method, system, medium, and processor for power network devices. This method and system can match the operational characteristics of power network devices in terms of topology adaptation, memory efficiency, policy flexibility, and communication latency. The specific technical solution is as follows: A distributed heterogeneous memory-sharing data synchronization method for power grid devices includes: S1: Construct the ring logical topology of the power network device nodes and initialize the shared memory pool; S2: Establish RDMA communication connections between various power network device nodes to facilitate subsequent direct memory access and zero-copy transmission; S3: Hierarchical classification of power grid data; S4: Based on the hierarchical classification of power grid data, power grid data is stored in a shared memory pool according to a differentiated replication strategy to achieve shared data synchronization; S5: Collect network state parameters of the power grid and combine them with the hierarchical classification results and loop topology of the power grid data. Use a lightweight consensus algorithm of Paxos variant to dynamically adjust the consistency level of the power grid data.
[0010] Furthermore, in step S1, the construction of the ring logical topology of the power network device nodes and the initialization of the shared memory pool include the following steps: S11: Calculate the optimal number of ring units, Mopt. First, determine the total number of rings to be divided, ensuring load balancing for each ring. The formula is as follows: ; ; in, The average bandwidth requirement for all nodes; This represents the maximum total bandwidth that a single ring can carry. For the shared memory bandwidth requirements of power network device node i; The rounding up symbol; The number of nodes in an ideal ring; This represents the total number of nodes. S12: For each ring unit, nodes are selected by combining the scores of "business relevance - physical distance" to ensure that nodes within the same ring "interact frequently and are close in distance"; S13: Divide a dedicated memory region on each power network device node in the ring topology, combine the dedicated memory regions of all nodes to build a unified distributed shared memory pool, assign a unique identifier to each data block in the memory pool, and establish a memory information mapping table between nodes to ensure that each node can quickly locate the target data in the shared memory pool.
[0011] Furthermore, in S12, the step of filtering nodes for each ring unit using a comprehensive score of business relevance and physical distance to ensure that nodes within the same ring interact frequently and are close to each other includes the following steps: Calculate the combined matching score between node i and the center node c of the ring. : ; in, Weighting based on business relevance; Weighted by physical distance; This represents the maximum physical distance between nodes within the power grid. It is the central node of the ring; For node i and Business relevance; For node i and The physical distance; For each ring, according to Sort by highest to lowest, and select the top... The nodes form a circular topology, and two constraints must be satisfied: Constraint 1: The maximum physical distance between all nodes within the ring satisfies: ; ; In the above formula, This represents the maximum allowable delay within the ring. The signal propagation speed of the power grid communication link; Constraint 2: Total bandwidth requirement within the ring ; After partitioning, it is necessary to verify whether the ring topology satisfies the requirement of maximizing shared memory performance. The formula is as follows: ; ; In the above formula, The number of pairwise combinations of nodes within the ring; Let be the physical transmission delay between nodes i and j; This represents the average data synchronization size. This represents the average available bandwidth within the ring.
[0012] Furthermore, in step S3, the hierarchical classification of power grid data refers to dividing the data into three levels, A, B, and C, based on the timeliness and importance requirements of the power business scenario when the data enters the shared memory pool. The specific calculation formula is as follows: ; In the above formula, The data classification value is directly mapped to grades A, B, and C. Timeliness factor; As an importance factor; It is a negative factor for data volume; The survival rate factor of adjacent nodes; This is an inverse factor for bandwidth utilization. This represents the average transmission delay. This refers to the packet loss rate of the link.
[0013] Furthermore, in step S4, the hierarchical classification based on power grid data, and the storage of power grid data in a shared memory pool according to a differentiated replication strategy to achieve shared data synchronization, includes the following steps: S41: When there is data update in the shared memory of this node, the data update triggers a local flag; S42: Ranked broadcast update notifications within the ring topology; S43: Each node executes a differentiated replication strategy based on the data classification results to ensure a balance between data reliability and system overhead.
[0014] Furthermore, in step S43, each node executes a differentiated replication strategy based on the data classification results to ensure a balance between data reliability and system overhead, including the following steps: For Class A data, a synchronous replication strategy is adopted. That is, after the data is written to the shared memory of the local node, it is necessary to wait for at least two adjacent nodes in the ring topology to complete the replication of the data and return an acknowledgment signal before the data synchronization is considered complete. For Class B data, a quasi-synchronous replication strategy is adopted, that is, after the data is written to the local node, a replication request is sent to the adjacent nodes. There is no need to wait for confirmation from all nodes. Only one node needs to complete the replication to continue subsequent operations. No node replication is performed on C-level data; the original data is only stored in the shared memory of the generating node.
[0015] Furthermore, in step S5, the process of collecting network state parameters of the power grid and combining them with the hierarchical classification results and loop topology of the power grid data, and using a lightweight consensus algorithm based on a variant of Paxos to dynamically adjust the consistency level of the power grid data, includes the following steps: S51: Real-time collection and quantification of network status parameters such as communication bandwidth, latency, and packet loss rate between nodes; S52: The total decision score is determined using a weighted product model based on three types of parameters: data classification, network state, and topology. ; S53: Based on the differentiated requirements of real-time and reliability of data synchronization in power scenarios, consistency levels are divided into three categories: strong consistency, weak consistency, and eventual consistency. S54: Perform anomaly handling and dynamically adjust the consistency level of power grid data.
[0016] A distributed heterogeneous memory-sharing data synchronization system for power grid devices, applied to the aforementioned distributed heterogeneous memory-sharing data synchronization method for power grid devices, includes: The building module is used to construct the ring logical topology of power network device nodes and initialize the shared memory pool; The connection module is used to establish RDMA communication connections between various power network device nodes to facilitate subsequent direct memory access and zero-copy transmission. The classification module is used to classify power grid data into hierarchical categories; The storage module is used for hierarchical classification of power grid data and stores power grid data in a shared memory pool according to a differentiated replication strategy to achieve shared data synchronization. The adjustment module is used to collect network status parameters of the power grid and combine them with the hierarchical classification results and loop topology of the power grid data. It adopts a lightweight consensus algorithm of Paxos variant to dynamically adjust the consistency level of the power grid data.
[0017] A computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the distributed heterogeneous memory-sharing data synchronization method for power network devices described above.
[0018] A processor for running a program, wherein the program executes the above-described distributed heterogeneous memory-sharing data synchronization method for power network devices.
[0019] Compared with the prior art, the beneficial effects of the present invention are as follows: (i) Adapting to the characteristics of power scenarios and solving core pain points in the industry To meet the dual requirements of "high real-time performance" and "high reliability" for power data, existing technologies mostly adopt general distributed data synchronization solutions that are not optimized for power scenarios. For example, the synchronization latency of ordinary distributed systems often reaches 10-50ms, which cannot meet the critical business requirements such as fault alarms (which need to be <5ms). This solution controls the latency to 0.8-3.2ms through RDMA zero-copy transmission. At the same time, it uses multi-node replication of Class A data and dynamic consistency adjustment to ensure that critical data is not lost, thus meeting the core requirement of "millisecond-level fault response" in power systems.
[0020] This solution addresses the heterogeneity and geographical dispersion of power network nodes. Power networks contain heterogeneous memory nodes such as servers and edge devices, often distributed across different regions (e.g., substations, dispatch centers). Existing solutions often assume homogeneous and concentrated nodes, leading to uneven load distribution. This solution selects nodes based on "business relevance - physical distance" to construct a ring topology, avoiding long-distance cross-regional transmission. Simultaneously, a shared memory pool ensures compatibility with heterogeneous memory, resolving the challenge of heterogeneous node collaboration.
[0021] (II) Performance Optimization: Overcoming the Bottlenecks of Traditional Synchronization Solutions Eliminating data replication redundancy and reducing system overhead: Existing technologies often employ full-node replication strategies (such as master-slave full synchronization in distributed databases), leading to a surge in storage and transmission costs. This solution uses differentiated replication based on data tiers: C-level data is not replicated, while B-level data is backed up on only one node. Compared to full-node replication, this reduces storage redundancy and transmission traffic by 60%-80%, making it particularly suitable for low-cost synchronization of massive historical data (C-level) in power systems.
[0022] Dynamically adapting to network fluctuations avoids a "one-size-fits-all" approach to consistency. Power networks are affected by weather, equipment failures, and other factors, leading to frequent network status fluctuations (e.g., thunderstorms may increase packet loss rates). Existing solutions often use a fixed consistency level (e.g., always strong consistency), which can easily result in synchronization timeouts when the network is poor. This solution adjusts the consistency level by collecting network parameters in real time. For example, it downgrades to eventual consistency when the network is poor to ensure uninterrupted synchronization; it automatically upgrades after the network recovers, balancing real-time performance and reliability.
[0023] (III) Improvement of resource utilization and operation and maintenance efficiency To optimize memory resource scheduling and avoid wasting heterogeneous memory, server memory (high bandwidth) and edge device memory (low bandwidth) in power systems are often used independently, leading to idle high-bandwidth memory and overloaded low-bandwidth memory. This solution constructs a unified shared memory pool and achieves unified scheduling of heterogeneous memory resources through a memory information mapping table. For example, frequently accessed A-level data is allocated to high-bandwidth memory, and low-frequency C-level data is allocated to edge memory, improving memory utilization by 30%-50%.
[0024] To reduce operational complexity and lower post-implementation adjustment costs, existing solutions require redeployment and configuration when adjusting data synchronization strategies (such as adding new data types or changing nodes). This solution automates strategies through quantitative formulas (such as data grading G-values and consistency decision scores). When adding new data types, only factor weights need to be adjusted, without modifying the core logic; when nodes change, the ring topology automatically re-selects nodes, reducing operational costs by more than 40%.
[0025] (iv) Technological Foresight: Compatible with Future Power System Development Trends Supporting the Synchronization of Massive Data After New Energy Grid Connection: With the large-scale grid connection of new energy sources such as wind power and photovoltaics, the amount of power data is growing exponentially (such as real-time wind turbine operation data and user electricity consumption data). Existing solutions are prone to bandwidth bottlenecks. This solution, through ring topology load balancing (dividing ring units according to bandwidth requirements) and RDMA high-bandwidth transmission, can support GB-level data synchronization per second, adapting to the data volume requirements of the new energy era.
[0026] Compatible with edge computing architecture, this solution promotes the "decentralization" of the power industry. Future power systems will evolve towards edge computing (e.g., substations processing data locally, reducing the amount of data transmitted to the dispatch center). This solution's ring topology has no central node; edge nodes can locally build shared memory pools to achieve data interaction, reducing dependence on the central node. This aligns with the "decentralization" trend in power systems and provides technical support for edge power applications (such as local fault diagnosis).
[0027] (v) It can match the operating characteristics of power network devices in terms of topology adaptation, memory efficiency, policy flexibility, and communication latency. Attached Figure Description
[0028] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0029] Figure 1 This is a flowchart illustrating a distributed heterogeneous memory sharing data synchronization method for power network devices. Figure 2 This is a schematic diagram of a distributed heterogeneous memory-sharing data synchronization system for power network devices. Detailed Implementation
[0030] 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, not all, of the embodiments of the present invention. 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.
[0031] It should be understood that, when used in this application, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof.
[0032] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0033] It should also be further understood that the term “and / or” as used in this application refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations.
[0034] Example 1 like Figure 1 The diagram shows a flowchart of a distributed heterogeneous memory sharing data synchronization method for power network devices, including the following technical contents: S1: Construct the ring logical topology of the power network device nodes and initialize the shared memory pool.
[0035] S11: Construct a ring logical topology from N heterogeneous memory nodes (such as server memory, edge device memory, etc.) of power network devices. Each power network device node is an independent unit of the ring topology, directly connected to each other through network links, forming a distributed architecture without a central management node. Specifically, this includes the following steps: To calculate the optimal number of ring cells (Mopt), first determine the total number of rings to be created, ensuring load balancing across each ring. The formula is as follows: ; ; in, The average bandwidth requirement for all nodes; The maximum total bandwidth that a single ring can carry (determined by the performance of the power grid network equipment, such as...) ); For the shared memory bandwidth requirements of power network device node i; The rounding up sign ensures that all nodes can be assigned to the ring cell; The ideal number of ring nodes is an empirical value based on RDMA communication efficiency, usually taken as 4-8 (too many nodes will lead to increased ring broadcast delay, while too few nodes will result in low resource utilization). This represents the total number of nodes.
[0036] Example: If , , , ,but , , That is, dividing the area into two ring-shaped units.
[0037] S12: For each ring unit, nodes are selected based on a combined score of "business relevance - physical distance" to ensure that nodes within the same ring are "frequently interacting and close in distance," as shown in the following formula: 1. Calculate the combined matching score between node i and the ring center node c. : ; in, The weight for business relevance is set at 0.6, because the frequency of business interactions has a greater impact on the performance of shared memory. The physical distance weight is set to 0.4 to balance the impact of distance on latency. The maximum physical distance between nodes within the power grid (e.g.) km), used for normalization ; The central node of the ring (preferably a node with high bandwidth requirements and extensive business connections, such as a regional dispatch center); For node i and Business relevance; For node i and The physical distance.
[0038] 2. For each ring, according to Sort by highest to lowest, and select the top... The nodes form a circular topology, and two constraints must be satisfied: Constraint 1: The maximum physical distance between all nodes within the ring: ; ; In the above formula, This represents the maximum allowable delay within the ring. For the signal propagation speed of the power grid communication link, approximately km / s. For example ms: ; Constraint 2: Total bandwidth requirement within the ring (To avoid bandwidth overload causing shared memory transfer lag).
[0039] 3. After partitioning, it is necessary to verify whether the ring topology satisfies the "maximization of shared memory performance". The core indicator is the "average data synchronization latency within the ring". The following formula must be satisfied: ; ; In the above formula, The number of pairwise combinations of nodes within the ring ( The number of nodes inside the ring. ); The physical transmission delay (signal propagation time) between nodes i and j; For average data synchronization size (e.g., A-level data) ); The average available bandwidth within the ring ( ).
[0040] S13: Divide a dedicated memory region on each power network device node in the ring topology, combine the dedicated memory regions of all nodes to build a unified distributed shared memory pool, and assign a unique identifier (including node address, memory offset, and data type) to each data block in the memory pool. At the same time, establish a memory information mapping table between nodes to ensure that each node can quickly locate the target data in the shared memory pool.
[0041] 1. Clarify the attributes of "shared memory": it is a "shared area" of the node's local memory, rather than an external space independent of the node.
[0042] In this scheme's "distributed shared memory pool," each node's shared memory region is essentially a "region accessible to other nodes" partitioned from that node's local physical memory (shared through memory mapping and RDMA permission configuration), rather than an "external memory pool" detached from the node. For example, node A's shared memory pool is actually part of node A's local memory (assuming addresses 0x1000-0x2000), but through ring topology protocol configuration, nodes B and C can directly access this address via RDMA; similarly, node B's shared memory pool is also part of its local memory, and nodes A and C can directly access it.
[0043] 2. Data generation path: Data is generated directly in local shared memory, without the need for transmission "from local device to shared memory".
[0044] When power network devices generate operational data (such as voltage data collected by sensors, equipment status codes, etc.), the application program (such as the data acquisition module) directly writes the raw data to the shared memory area of the local node (rather than the node's private memory). For example, after the acquisition program of node A obtains a fault alarm data, it does not go through the "node A's private memory buffer," but directly writes it to node A's shared memory pool (a space in the address range 0x1000-0x2000). At this time, the data is "directly written" from generation to entry into shared memory, rather than "cross-area transfer" (similar to creating a file on the D drive of a computer, rather than first creating it on the C drive and then copying it to the D drive).
[0045] 3. The conversion from "data to serialized object" is completed within shared memory without any additional copying.
[0046] When you need to synchronize data to other nodes, the steps are as follows: The data is already in the shared memory of this node (such as the 0x1000-0x2000 region of node A). Calculate the size of the data after it is converted into a serialized object (e.g., if the original data is 100 bytes, the serialized data will be 120 bytes). The original data is converted into a serialized object directly in the shared memory of this node (equivalent to renaming "file A.txt" to "file A.zip" in the D drive; the whole process is completed within the D drive without copying the file to other places). Other nodes (such as node B) directly read the serialized object in node A's shared memory via RDMA and write it into node B's own shared memory area (which is also a shared area of node B's local memory).
[0047] 4. The key to avoiding "transfer from local device to shared memory" is "memory space reuse". In the traditional model, data is first generated in the "application's private memory" (non-shared area) and then copied to the "shared memory," resulting in an extra copy. However, this solution, through memory space planning, allows the application to directly use shared memory as the "initial space for data generation," which is equivalent to "private memory and shared memory reusing the same space," eliminating the need for "internal transmission on the local device" from the source.
[0048] In summary, the data is not "first generated in the local non-shared area and then transferred to the shared memory", but is located in the shared memory from the beginning of its generation. Therefore, the conversion of "data → serialized object" can be completed inside the shared memory, and there is no "transfer from the local end to the shared memory", which ultimately achieves zero-copy low-latency synchronization.
[0049] S2: Establish RDMA communication connections between various power network device nodes to facilitate subsequent direct memory access and zero-copy transmission.
[0050] S21: Establish RDMA communication connections between adjacent power network device nodes in a ring topology, bypassing the operating system kernel, so that each node can directly access the physical memory of the other; at the same time, during the initialization phase of the shared memory pool, the shared memory regions of each power network device node are mapped to the local process address space through memory mapping technology to form a memory information mapping table (that is, the shared memory of all nodes is mapped to the same address space to form a memory information mapping table, and each node stores this memory information mapping table), so as to realize the direct operation of the process on the shared memory.
[0051] S22: When a power network device node needs to read or write data in the shared memory pool, it first locates the node and memory address of the target data through the memory information mapping table, and then directly performs read and write operations on the physical memory of the target node through RDMA technology.
[0052] Furthermore, before data transmission, the size of the serialized object to be transmitted is calculated, and then the serialized object is directly constructed in shared memory. This avoids multiple data copies in the traditional network stack ("memory-kernel-user space"), controlling the data access latency to 0.8-3.2ms, thus meeting the low latency requirements of power network devices for data synchronization.
[0053] Furthermore, serialization objects refer to converting power business data (such as equipment status, fault alarms, and other non-binary data) into "transmittable data units" in binary format (similar to packaged data, facilitating network transmission). The purpose of calculating the size is to determine the total number of bytes of this "binary data packet" before data transmission, so as to reserve exactly matching memory space in shared memory in advance, avoiding data splitting or secondary adjustments due to insufficient space, and reducing additional time consumption.
[0054] The key to directly constructing serialized objects: The traditional approach is to "first generate data in the application's user space and then copy it to shared memory," while this solution directly completes the conversion of "data → serialized object" in shared memory (equivalent to "packing directly at the destination"), skipping the copying step of "user space → shared memory."
[0055] The principle of latency control: After eliminating "multiple copies" and "kernel forwarding", the core time for data transmission is only "the physical latency of RDMA direct access to shared memory", thus the total latency can be compressed to 0.8-3.2ms; The value of adapting to power scenarios: In power networks, services such as equipment fault alarms and real-time load scheduling require "millisecond-level response" (e.g., a fault needs to be synchronized to the dispatch center within 10ms, otherwise the accident may be amplified). This latency range just meets these high real-time requirements.
[0056] S3: Perform hierarchical classification of power grid data.
[0057] Data classification determination: When data enters the shared memory pool, it is classified into three levels, A, B, and C, based on the timeliness and importance requirements of the power business scenario. Level A data: Critical business data (such as real-time status monitoring data of power equipment and fault alarm data), the data size is usually <10KB, and the synchronization delay is required to be <5ms; Level B data: Important business data (such as power load statistics and equipment operation logs), requiring a synchronization delay of <20ms; Level C data: Ordinary business data (such as historical data backups, non-real-time report data), which has no strict requirements on synchronization latency.
[0058] Data classification judgment value The calculation formula is as follows: ; ; ; ; In the above formula, This is used to classify and determine the data; the larger the value, the higher the data priority, directly mapping to A / B / C levels. Timeliness factor; As an importance factor; It is a negative factor for data volume; The neighboring node survival factor takes the value of the number of neighboring surviving nodes of the target node within the ring (0 / 1 / 2). This is an inverse factor for bandwidth utilization. The average transmission delay is in milliseconds. The packet loss rate is %.
[0059] S4: Based on the hierarchical classification of power grid data, power grid data is stored in a shared memory pool according to a differentiated replication strategy to achieve shared data synchronization.
[0060] S41: When data is updated in the shared memory of this node, the data update triggers a "local flag". When new data (or old data is updated) is generated in the shared memory of this node (such as node A), two local operations are completed first: Mark data status: In the "shared memory metadata area" (a special area in shared memory for recording data attributes) of this node, mark new data as "to be synchronized" and record the core attributes of the data (data classification A / B / C, generation time, data unique identifier, storage address); Update the local mapping table: The "memory information mapping table" maintained by this node (which records the location and status of data in the shared memory of all nodes) will be updated synchronously, and the attribute information of the new data will be written into the table to ensure that the data can be quickly queried locally.
[0061] S42: "Broadcast" update notifications within a ring topology.
[0062] Since all nodes form a ring logical structure (node A→node B→node C→…→node A), node A will send a "data update notification" to two directly connected adjacent nodes (such as node B and node N) in the ring topology through a lightweight notification message (containing only the unique data identifier, data hierarchy, local node address, and storage address, with a byte count of <100B).
[0063] After receiving the notification, a neighboring node (such as node B) will first update its own "memory information mapping table" (add the attribute information of the new data of node A), and then forward the notification to the next neighboring node (such as node C). And so on, the notification is "passed down level by level" in the ring topology until all nodes have received the update notification and completed the update of their local mapping tables.
[0064] The process takes very little time: because the notification message is small (only a few hundred bytes) and is transmitted via a low-latency link based on RDMA, the synchronization delay of the entire node notification is usually <1ms, which is far lower than the requirements for power data synchronization (Class A data delay <5ms).
[0065] S43: Each node executes a differentiated replication strategy based on the data classification results to ensure a balance between data reliability and system overhead. This design avoids invalid data transmission caused by "notification-based retrieval" and further reduces system overhead.
[0066] 1. For Class A data, a "synchronous replication" strategy is adopted. That is, after the data is written to the shared memory of the local node, it is necessary to wait for at least two adjacent nodes in the ring topology to complete the replication of the data and return an acknowledgment signal before the data synchronization is considered complete.
[0067] Only Level A data (critical data) requires "multi-node replication", but not the full amount.
[0068] For Class A data (such as power equipment fault alarms and real-time voltage data), to ensure reliability (avoid data loss due to a node failure), a copy should be stored in the shared memory of at least two adjacent nodes in the ring topology, rather than all nodes.
[0069] For example, after node A generates A-level data, it will directly copy the data to the shared memory of neighboring nodes B and N via RDMA. Nodes B and N will mark the data as a "copy" in their local mapping tables and use it only for "disaster recovery" or "nearest access" (if node C needs the data, it can directly read the copy from neighboring node B without needing to access A across nodes).
[0070] The number of replicated nodes is controlled: only 2-3 adjacent nodes, rather than all nodes (if N=10 nodes, only 3 nodes store the data), the storage redundancy is controllable and will not cause a lot of waste.
[0071] 2. For Class B data, a "quasi-synchronous replication" strategy is adopted. That is, after the data is written to the local node, a replication request is initiated to the adjacent nodes. There is no need to wait for confirmation from all nodes. As long as one node completes the replication, subsequent operations can continue. The replication results of the remaining nodes are received through an asynchronous callback mechanism.
[0072] Level B data (critical data) is replicated on demand with single-node backup.
[0073] Level B data (such as electricity load statistics) only needs to be copied to one adjacent node, and a "quasi-synchronous" mechanism is used: After node A generates level B data, it only initiates a replication request to its neighboring node B and can continue other operations without waiting for the replication to complete. After node B completes the replication, it returns an acknowledgment signal to A, and A updates the mapping table to mark "backed up".
[0074] If other nodes (such as C and D) need to use this data, they will not save a copy separately. Instead, they will look up the storage address of A or B through the mapping table and read the original data or backup data directly. After use, they will not keep it locally (unless it is used frequently in the future, in which case it can be temporarily cached, but the cache will be cleared periodically).
[0075] 3. For C-level data (ordinary data), there is "zero copying + on-demand reading" with no redundant storage.
[0076] Level C data (such as historical data backups and non-real-time reports) is not copied to any node; the original data is only stored in the shared memory of the generating node (such as node A).
[0077] If other nodes need to use this data, they can look up the address of node A through the mapping table and directly read the raw data through RDMA. After reading, the data is not saved locally (or only a very short temporary cache is saved).
[0078] Since C-level data has no real-time requirements and is accessed infrequently, this "read-on-demand, no copy storage" model fully meets the needs and has no storage redundancy.
[0079] S5: Collect network state parameters of the power grid and combine them with the hierarchical classification results and loop topology of the power grid data. Use a lightweight consensus algorithm of Paxos variant to dynamically adjust the consistency level of the power grid data.
[0080] In power grids, multiple nodes may simultaneously operate on the same type of data in shared memory (such as nodes A and B updating the same device status data at the same time). If there is no consensus mechanism, conflicts may easily occur, such as "node A saving version 1.0 and node B saving version 2.0".
[0081] S51: Real-time collection and quantification of network status parameters such as communication bandwidth, latency, and packet loss rate between nodes.
[0082] First, the network status and topology are quantified. Then, considering the hierarchical characteristics of power data, the following core input parameters are defined as the basis for consistency level decisions: 1. Determine the data grading coefficients Grade A coefficient Grade B coefficient C-level coefficient It is used to characterize the intensity of the data's need for reliability.
[0083] 2. Calculate the overall network state score. (Values range [0,1]), the formula is as follows: ; in, This is the bandwidth quantization value; This is a delayed quantization value; This is a quantified value for packet loss rate.
[0084] 3. Determine the topology quantization value (Values range [0,1]), the formula is as follows: ; in, The number of adjacent surviving nodes of the target node (values 0, 1, and 2).
[0085] 4. Average round-trip delay (Unit: ms) Specifically, the average value of five round-trip times is obtained through RDMA echo testing and used to dynamically adjust the algorithm timeout.
[0086] S52: The total decision score is determined using a weighted product model based on three types of parameters: data classification, network state, and topology. The calculation formula is as follows: ; in, The value range is [0,3]. The higher the score, the stronger the data's reliability requirement and the better the current network / topology conditions. A more stringent consistency level should be selected first.
[0087] S53: Based on the differentiated requirements of "real-time performance" and "reliability" for data synchronization in power scenarios, consistency levels are divided into three categories: strong consistency, weak consistency, and eventual consistency. The judgment rules and the corresponding Paxos variant algorithm execution logic are as follows: 1. Strong consistency (adapts to A-level data + optimized network + full-survival topology) 1.1 Triggering conditions All of the following conditions must be met simultaneously: ; 1.2 Paxos variant algorithm execution logic 1.21. Proposal Initiation: The data generating node (proposer) sends a "complete proposal packet" containing a unique data identifier to two adjacent nodes (Acceptors). Global version number (Initial value is 1, incremented by 1 with each update).
[0088] 1.22. Timeout Calculation: The negotiated timeout is dynamically set based on real-time latency, using the following formula: ; Coefficient 2 is the optimized value for power scenarios, ensuring that negotiation can still be completed when the network fluctuates, avoiding frequent retries. Of course, other values can also be used.
[0089] 1.23. Consensus Determination: If the proposer reaches a consensus... The system received two "accept responses" from the Acceptor (the responses included the global version number). If the confirmation message is received, consensus is considered reached, and a "data synchronization complete" notification is broadcast to all nodes in the ring topology.
[0090] 1.24. Degradation Mechanism: If only 1 or 0 "accept response" are received, a retry is triggered (maximum of 1 retry). If consensus is still not reached after the retry, it automatically degrades to weak consistency, as shown in the following formula: ; in, Strong consistency; Weak consistency.
[0091] 2. Weak consistency (suitable for A-level data + medium network / B-level data + optimized medium network + partially survivable topology) 2.1 The triggering condition is that any one of the following sets of conditions is met: ; ; 2.2 Paxos variant algorithm execution logic Proposal simplification: The proposer only proposes to one surviving neighbor (preferred). The smallest node sends a "simplified proposal packet", which contains Global version number Reduce data transmission volume; Timeout calculation: Considering potential latency fluctuations due to network conditions, the timeout coefficient is adjusted to 3, as shown in the following formula: ; Consensus reached: If the proposer is in Upon receiving an "accept response" from one Acceptor, the node immediately broadcasts a "data synchronization in progress" notification to all nodes without waiting for responses from other nodes.
[0092] Asynchronous retransmission: Subsequently, complete data is retransmitted to adjacent nodes that did not participate in consensus (such as nodes after fault recovery) through a "low-priority retransmission thread". The retransmission is triggered by the following conditions: Retransmission trigger ; 3. Eventual consistency (suitable for Class C data / poor networks / no live topologies) 3.1 The triggering condition is that any one of the following sets of conditions is met: ; condition group ; ; 3.2 Paxos variant algorithm execution logic Local marking: The proposer only marks the data status as "pending synchronization" in the "metadata area" of the shared memory of this node, without sending a proposal to any Acceptor, as shown in the following formula: Statusdata= ; Periodic broadcasting: A "low-frequency broadcasting mechanism" is used to reduce system overhead. The broadcast period formula is as follows (dynamically adjusted according to network conditions; the worse the network, the longer the period): ; The broadcast content is , ; Version number comparison and merging: After receiving the broadcast, adjacent nodes of the generating data node ensure data consistency by comparing version numbers. If the local version number is different... Lower than the broadcast version number Then, actively request complete data from the proposer (for data of types A and B), using the following formula: ; in, This is the version number that the node will ultimately use to ensure that the data across the entire topology is eventually consistent.
[0093] For adjacent nodes of non-generated data nodes or for C-type data, if a local version number is found... Lower than the broadcast version number Then only the local version number will be updated. .
[0094] S54: Perform anomaly handling and dynamically adjust the consistency level of power grid data.
[0095] 1. Version number conflict handling When the Acceptor detects the proposal Lower than the latest local version number When, return carrying The "rejection of response".
[0096] 2. Consistency level downgrade and recovery, specifically including: When network status If the data collection time is below the network threshold for the current consistency level for three consecutive collection cycles (200ms per cycle, 600ms in total), a degradation is triggered, as shown in the following formula: ; (Note: Level A data can be downgraded to weak consistency at most, but not to eventual consistency, to ensure the basic reliability of core data.)
[0097] When network status The network threshold for the target consistency level is higher than the threshold for three consecutive data collection cycles, and If the target level requirements are met, recovery is triggered, as shown in the following formula: ; An example of this step is as follows: Given conditions: Data type: Class A fault alarm data ( Network status: ;but: (U-Network); Topology state: Both adjacent nodes are alive ( ; Delay parameters: ms.
[0098] 1. Calculation of total decision score (Satisfies the strong consistency triggering condition).
[0099] 2. Algorithm execution parameter calculation Timeout period: ms; Proposal targets: 2 adjacent nodes (node B and node N).
[0100] 3. Execution Results The proposer sends the complete proposal to nodes B and N, and receives two "accept responses" within 2.8ms, thus reaching a consensus. The fault alarm data synchronization delay is 2.8ms (<5ms), which meets the real-time requirements of Class A data, while reliability is ensured through redundant replication on two nodes.
[0101] The core object of dynamic adjustment of consistency level is "power data consistency", that is, according to the network status, data classification characteristics and topology changes of the power scenario, dynamically adapt the "consistency strength" (strong consistency / weak consistency / eventual consistency) of data when synchronizing data between distributed nodes, so as to ensure that power business data always maintains a balance between "real-time requirements" and "reliability requirements", and fully serves the goal of power data synchronization and use.
[0102] This method constructs a distributed architecture foundation through a "ring topology + shared memory pool," achieves low-latency data interaction through "RDMA zero-copy transmission," balances reliability and overhead through "layered data replication," and ensures data consistency under different network conditions by relying on an "adaptive consistency protocol." Each step is interconnected: the topology and memory pool provide a "carrier" for data synchronization, RDMA provides a "high-speed channel" for data transmission, and layered replication and the consistency protocol provide "reliability guarantees" for data synchronization. Together, they achieve efficient, reliable, and low-latency data synchronization of distributed heterogeneous memory in power network devices.
[0103] The following table compares the beneficial effects: Example 2 like Figure 2The diagram shows a structural schematic of a distributed heterogeneous memory-sharing data synchronization system for power grid devices, applied to the aforementioned distributed heterogeneous memory-sharing data synchronization method for power grid devices, including: The building module is used to construct the ring logical topology of power network device nodes and initialize the shared memory pool; The connection module is used to establish RDMA communication connections between various power network device nodes to facilitate subsequent direct memory access and zero-copy transmission. The classification module is used to classify power grid data into hierarchical categories; The storage module is used for hierarchical classification of power grid data and stores power grid data in a shared memory pool according to a differentiated replication strategy to achieve shared data synchronization. The adjustment module is used to collect network status parameters of the power grid and combine them with the hierarchical classification results and loop topology of the power grid data. It adopts a lightweight consensus algorithm of Paxos variant to dynamically adjust the consistency level of the power grid data.
[0104] Example 3 A computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the distributed heterogeneous memory-sharing data synchronization method for power network devices described above.
[0105] Example 4 A processor for running a program, wherein the program executes the above-described distributed heterogeneous memory-sharing data synchronization method for power network devices.
[0106] Beneficial effects: (i) Adapting to the characteristics of power scenarios and solving core pain points in the industry To meet the dual requirements of "high real-time performance" and "high reliability" for power data, existing technologies mostly adopt general distributed data synchronization solutions that are not optimized for power scenarios. For example, the synchronization latency of ordinary distributed systems often reaches 10-50ms, which cannot meet the critical business requirements such as fault alarms (which need to be <5ms). This solution controls the latency to 0.8-3.2ms through RDMA zero-copy transmission. At the same time, it uses multi-node replication of Class A data and dynamic consistency adjustment to ensure that critical data is not lost, thus meeting the core requirement of "millisecond-level fault response" in power systems.
[0107] This solution addresses the heterogeneity and geographical dispersion of power network nodes. Power networks contain heterogeneous memory nodes such as servers and edge devices, often distributed across different regions (e.g., substations, dispatch centers). Existing solutions often assume homogeneous and concentrated nodes, leading to uneven load distribution. This solution selects nodes based on "business relevance - physical distance" to construct a ring topology, avoiding long-distance cross-regional transmission. Simultaneously, a shared memory pool ensures compatibility with heterogeneous memory, resolving the challenge of heterogeneous node collaboration.
[0108] (II) Performance Optimization: Overcoming the Bottlenecks of Traditional Synchronization Solutions Eliminating data replication redundancy and reducing system overhead: Existing technologies often employ full-node replication strategies (such as master-slave full synchronization in distributed databases), leading to a surge in storage and transmission costs. This solution uses differentiated replication based on data tiers: C-level data is not replicated, while B-level data is backed up on only one node. Compared to full-node replication, this reduces storage redundancy and transmission traffic by 60%-80%, making it particularly suitable for low-cost synchronization of massive historical data (C-level) in power systems.
[0109] Dynamically adapting to network fluctuations avoids a "one-size-fits-all" approach to consistency. Power networks are affected by weather, equipment failures, and other factors, leading to frequent network status fluctuations (e.g., thunderstorms may increase packet loss rates). Existing solutions often use a fixed consistency level (e.g., always strong consistency), which can easily result in synchronization timeouts when the network is poor. This solution adjusts the consistency level by collecting network parameters in real time. For example, it downgrades to eventual consistency when the network is poor to ensure uninterrupted synchronization; it automatically upgrades after the network recovers, balancing real-time performance and reliability.
[0110] (III) Improvement of resource utilization and operation and maintenance efficiency To optimize memory resource scheduling and avoid wasting heterogeneous memory, server memory (high bandwidth) and edge device memory (low bandwidth) in power systems are often used independently, leading to idle high-bandwidth memory and overloaded low-bandwidth memory. This solution constructs a unified shared memory pool and achieves unified scheduling of heterogeneous memory resources through a memory information mapping table. For example, frequently accessed A-level data is allocated to high-bandwidth memory, and low-frequency C-level data is allocated to edge memory, improving memory utilization by 30%-50%.
[0111] To reduce operational complexity and lower post-implementation adjustment costs, existing solutions require redeployment and configuration when adjusting data synchronization strategies (such as adding new data types or changing nodes). This solution automates strategies through quantitative formulas (such as data grading G-values and consistency decision scores). When adding new data types, only factor weights need to be adjusted, without modifying the core logic; when nodes change, the ring topology automatically re-selects nodes, reducing operational costs by more than 40%.
[0112] (iv) Technological Foresight: Compatible with Future Power System Development Trends Supporting the Synchronization of Massive Data After New Energy Grid Connection: With the large-scale grid connection of new energy sources such as wind power and photovoltaics, the amount of power data is growing exponentially (such as real-time wind turbine operation data and user electricity consumption data). Existing solutions are prone to bandwidth bottlenecks. This solution, through ring topology load balancing (dividing ring units according to bandwidth requirements) and RDMA high-bandwidth transmission, can support GB-level data synchronization per second, adapting to the data volume requirements of the new energy era.
[0113] Compatible with edge computing architecture, this solution promotes the "decentralization" of the power industry. Future power systems will evolve towards edge computing (e.g., substations processing data locally, reducing the amount of data transmitted to the dispatch center). This solution's ring topology has no central node; edge nodes can locally build shared memory pools to achieve data interaction, reducing dependence on the central node. This aligns with the "decentralization" trend in power systems and provides technical support for edge power applications (such as local fault diagnosis).
[0114] This application discloses a distributed heterogeneous memory-sharing data synchronization method, system, medium, and processor for power network devices, relating to the field of power network data processing technology. It aims to solve problems such as poor adaptability, high synchronization latency, and high resource overhead in existing technologies. The key technical points are: constructing a ring logical topology for power network device nodes and initializing a shared memory pool; establishing RDMA communication connections to achieve zero-copy transmission; classifying power grid data according to timeliness and importance, and storing data based on a differentiated replication strategy to achieve synchronization; and dynamically adjusting the data consistency level using a Paxos variant algorithm, combining network state parameters, data layering results, and topology structure. This invention can reduce data synchronization latency to 0.8-3.2ms, balance reliability and resource overhead, adapt to the heterogeneity of power networks and critical business requirements, and ensure the stable operation of the smart grid.
[0115] Those skilled in the art will recognize that the units of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the invention.
[0116] In the embodiments provided by the present invention, it should be understood that the division of units is only a logical functional division. In actual implementation, there may be other division methods, such as multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored.
[0117] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0118] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of this application.
Claims
1. A distributed heterogeneous memory-sharing data synchronization method for power network devices, characterized in that, include: S1: Construct the ring logical topology of the power network device nodes and initialize the shared memory pool; S2: Establish RDMA communication connections between various power network device nodes to facilitate subsequent direct memory access and zero-copy transmission; S3: Hierarchical classification of power grid data; S4: Based on the hierarchical classification of power grid data, power grid data is stored in a shared memory pool according to a differentiated replication strategy to achieve shared data synchronization; S5: Collect network state parameters of the power grid and combine them with the hierarchical classification results and loop topology of the power grid data. Use a lightweight consensus algorithm of Paxos variant to dynamically adjust the consistency level of the power grid data.
2. The distributed heterogeneous memory sharing data synchronization method for power network devices according to claim 1, characterized in that, In step S1, constructing the ring logical topology of the power network device nodes and initializing the shared memory pool includes the following steps: S11: Calculate the optimal number of ring units, Mopt. First, determine the total number of rings to be divided, ensuring load balancing for each ring. The formula is as follows: ; ; in, The average bandwidth requirement for all nodes; This represents the maximum total bandwidth that a single ring can carry. For the shared memory bandwidth requirements of power network device node i; The rounding up symbol; The number of nodes in an ideal ring; This represents the total number of nodes. S12: For each ring unit, nodes are filtered by a comprehensive score of "business relevance - physical distance" to ensure that nodes within the same ring "interact frequently and are close in distance"; S13: Divide a dedicated memory region on each power network device node in the ring topology, combine the dedicated memory regions of all nodes to build a unified distributed shared memory pool, assign a unique identifier to each data block in the memory pool, and establish a memory information mapping table between nodes to ensure that each node can quickly locate the target data in the shared memory pool.
3. The distributed heterogeneous memory sharing data synchronization method for power network devices according to claim 2, characterized in that, In S12, the step of filtering nodes for each ring unit using a comprehensive score of business relevance and physical distance to ensure that nodes within the same ring interact frequently and are close to each other includes the following steps: Calculate the combined matching score between node i and the center node c of the ring. : ; in, Weighting based on business relevance; Weighted by physical distance; This represents the maximum physical distance between nodes within the power grid. It is the central node of the ring; For node i and Business relevance; For node i and The physical distance; For each ring, according to Sort by highest to lowest, and select the top... The nodes form a circular topology, and two constraints must be satisfied: Constraint 1: The maximum physical distance between all nodes within the ring satisfies: ; ; In the above formula, This represents the maximum allowable delay within the ring. The signal propagation speed of the power grid communication link; Constraint 2: Total bandwidth requirement within the ring ; After partitioning, it is necessary to verify whether the ring topology satisfies the requirement of maximizing shared memory performance. The formula is as follows: ; ; In the above formula, The number of pairwise combinations of nodes within the ring; Let be the physical transmission delay between nodes i and j; This represents the average data synchronization size. This represents the average available bandwidth within the ring.
4. The distributed heterogeneous memory sharing data synchronization method for power network devices according to claim 1, characterized in that, In step S3, the hierarchical classification of power grid data refers to dividing the data into three levels, A, B, and C, based on the timeliness and importance requirements of the power business scenario when the data enters the shared memory pool. The specific calculation formula is as follows: ; In the above formula, The data classification value is directly mapped to grades A, B, and C. Timeliness factor; As an importance factor; It is a negative factor for data volume; The survival rate factor of adjacent nodes; This is an inverse factor for bandwidth utilization. This represents the average transmission delay. This refers to the packet loss rate of the link.
5. The distributed heterogeneous memory sharing data synchronization method for power network devices according to claim 4, characterized in that, In step S4, the hierarchical classification based on power grid data, and the storage of power grid data in a shared memory pool according to a differentiated replication strategy to achieve shared data synchronization, includes the following steps: S41: When there is data update in the shared memory of this node, the data update triggers a local flag; S42: Ranked broadcast update notifications within the ring topology; S43: Each node executes a differentiated replication strategy based on the data classification results to ensure a balance between data reliability and system overhead.
6. The distributed heterogeneous memory sharing data synchronization method for power network devices according to claim 5, characterized in that, In step S43, each node executes a differentiated replication strategy based on the data classification results to ensure a balance between data reliability and system overhead, including the following steps: For Class A data, a synchronous replication strategy is adopted. That is, after the data is written to the shared memory of the local node, it is necessary to wait for at least two adjacent nodes in the ring topology to complete the replication of the data and return an acknowledgment signal before the data synchronization is considered complete. For Class B data, a quasi-synchronous replication strategy is adopted, that is, after the data is written to the local node, a replication request is sent to the adjacent nodes. There is no need to wait for confirmation from all nodes. Only one node needs to complete the replication to continue subsequent operations. No node replication is performed on C-level data; the original data is only stored in the shared memory of the generating node.
7. The distributed heterogeneous memory sharing data synchronization method for power network devices according to claim 1, characterized in that, In step S5, the process of collecting network state parameters of the power grid and combining them with the hierarchical classification results and loop topology of the power grid data, and using a lightweight consensus algorithm of Paxos variant to dynamically adjust the consistency level of the power grid data, includes the following steps: S51: Real-time collection and quantification of network status parameters such as communication bandwidth, latency, and packet loss rate between nodes; S52: The total decision score is determined using a weighted product model based on three types of parameters: data classification, network state, and topology. ; S53: Based on the differentiated requirements of real-time and reliability of data synchronization in power scenarios, consistency levels are divided into three categories: strong consistency, weak consistency, and eventual consistency. S54: Perform anomaly handling and dynamically adjust the consistency level of power grid data.
8. A distributed heterogeneous memory-sharing data synchronization system for power network devices, characterized in that, The distributed heterogeneous memory-sharing data synchronization method for power network devices according to any one of claims 1 to 7 includes: The building module is used to construct the ring logical topology of power network device nodes and initialize the shared memory pool; The connection module is used to establish RDMA communication connections between various power network device nodes to facilitate subsequent direct memory access and zero-copy transmission. The classification module is used to classify power grid data into hierarchical categories; The storage module is used for hierarchical classification of power grid data and stores power grid data in a shared memory pool according to a differentiated replication strategy to achieve shared data synchronization. The adjustment module is used to collect network status parameters of the power grid and combine them with the hierarchical classification results and loop topology of the power grid data. It adopts a lightweight consensus algorithm of Paxos variant to dynamically adjust the consistency level of the power grid data.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the computer-readable storage medium to perform the distributed heterogeneous memory sharing data synchronization method for power network devices as described in any one of claims 1 to 7.
10. A processor, characterized in that, The processor is used to run a program, wherein the program executes the distributed heterogeneous memory sharing data synchronization method for power network devices according to any one of claims 1 to 7.