Layered routing method and system based on cooperation of multiple representative nodes

By adopting a three-layer architecture and a multi-representative node collaboration mechanism in a distributed network, the problems of low performance and poor scalability in large-scale node networks are solved, and efficient and reliable message propagation and rapid fault recovery are achieved.

CN120880977APending Publication Date: 2025-10-31ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511120531.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Traditional distributed network communication architectures suffer from low performance, poor scalability, unbalanced load, high risk of single point of failure, and slow fault recovery in large-scale node networks, especially evident in consortium blockchains and blockchain networks.

Method used

A three-layer network architecture is adopted, which divides nodes into geographical regions and logical units according to their geographical location, and sets up multiple representative nodes (REPs) to work together. Through hierarchical routing and multi-REP collaboration mechanism, efficient message routing and fast fault recovery are achieved.

Benefits of technology

It improves network reliability and scalability, reduces communication latency, achieves load balancing, simplifies network management, avoids single points of failure and network storms, and improves message propagation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120880977A_ABST
    Figure CN120880977A_ABST
Patent Text Reader

Abstract

The invention discloses a hierarchical routing method and system based on cooperation of multiple representative nodes, and belongs to the technical field of distributed network communication. According to the invention, network nodes are organized into an AREA-CELL-node three-layer architecture according to geographic positions, and a plurality of REPs are arranged in each CELL for cooperative work so as to reduce the risk of a single point. A plurality of REPs share external connection according to a predetermined distribution strategy (such as polling) to realize load balancing. Determining a target node layer by layer through a three-level routing table by adopting a hierarchical positioning strategy; and the common node dynamically selects the active REP according to weighted scores of delay, bandwidth and load. Each REP maintains a take-over candidate, and connection migration is completed when a fault occurs. The scheme is suitable for a large-scale peer-to-peer network, and is beneficial to improving the communication reliability and the routing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of distributed network communication technology, and in particular relates to a hierarchical routing method and system based on multi-representative node collaboration. Background Technology

[0002] With the rapid development of blockchain technology, especially consortium blockchains, the number of nodes in distributed networks has grown dramatically, often reaching thousands or even tens of thousands. Traditional network communication architectures have exposed serious performance and scalability problems when faced with such large-scale node networks.

[0003] The existing technology has the following main shortcomings:

[0004] First, traditional P2P networks typically employ either fully connected or random connection strategies. In fully connected mode, each node needs to establish connections with all other nodes, resulting in a connection complexity of O(n^2). 2 When the number of nodes reaches several thousand, network maintenance costs become enormous and unsustainable. While random connections reduce the number of connections, they are prone to network partitioning and have low message propagation efficiency, making them susceptible to broadcast storms.

[0005] Second, existing supernode solutions typically use a single supernode to handle all forwarding tasks in a specific area. This design presents a significant risk of single point of failure. When a supernode fails, all the ordinary nodes it manages lose network connectivity and require a considerable amount of time to recover. Furthermore, a single supernode can easily become a performance bottleneck, limiting network throughput.

[0006] Third, node location and routing efficiency across geographical regions is low. Traditional schemes such as Distributed Hash Tables (DHTs) primarily rely on logical addresses for routing, neglecting the actual geographical location of nodes. This means that two geographically adjacent nodes may require multiple long-distance hops to communicate, significantly increasing communication latency. For example, in a globally distributed network of approximately 8,000 nodes, the average number of hops using traditional schemes may exceed 10, and the end-to-end latency may exceed 200ms (these figures are for background illustration only and are not intended to limit the effectiveness of this invention).

[0007] Fourth, the load balancing mechanism is either missing or inefficient. In real-world networks, some nodes may bear an excessive number of forwarding tasks due to geographical location or network topology, causing these nodes to become overloaded, while the resources of other nodes remain idle. This uneven load distribution not only affects network performance but may also lead to frequent failures of some nodes due to overload.

[0008] Fifth, the fault recovery mechanism is inadequate. Existing solutions typically require a complex topology reconstruction or election process after detecting a node failure, with recovery time often exceeding 30 seconds. During this period, network services may be interrupted or severely degraded.

[0009] Therefore, the industry urgently needs a new network architecture and routing method that can achieve good scalability, high reliability, load balancing and rapid fault recovery while ensuring communication efficiency. Summary of the Invention

[0010] The purpose of this invention is to address the problems existing in the prior art and to provide a hierarchical routing method and system based on multi-representative node collaboration. This invention establishes a three-layer network architecture, setting up multiple collaborative representative nodes within each logical unit, achieving efficient message routing and reliable fault recovery. It is particularly suitable for efficient node communication and message propagation in scenarios such as consortium blockchains, blockchain networks, and large-scale distributed systems.

[0011] To achieve the above-mentioned objectives, the present invention specifically adopts the following technical solution:

[0012] In a first aspect, the present invention provides a hierarchical routing method based on multi-representative node collaboration, which includes the following steps:

[0013] S1. Construct a three-layer network architecture, divide the network nodes into multiple geographical regions according to their geographical location, divide each geographical region into multiple logical units according to the node distribution density, and set up multiple representative nodes and multiple ordinary nodes in each logical unit;

[0014] S2. Establish a multi-REP collaborative mechanism, assign a unique number to each representative node, establish collaborative connection relationships among multiple representative nodes within the same logical unit, and allocate external connection tasks among multiple representative nodes according to a predetermined connection allocation strategy. Each representative node is responsible for connecting to at least one external logical unit and / or external geographical region.

[0015] S3: Perform hierarchical cross-regional node positioning. When the source node sends a message to the target node, the geographical area where the target node is located is first determined through the pre-built three-level routing table, then the specific logical unit is located, and finally the target node is routed through the representative node in the logical unit.

[0016] S4: Ordinary nodes establish connections with multiple representative nodes within this logical unit. The optimal representative node is selected as the active connection for unicast communication based on a weighted score of latency, bandwidth, and load, while the connections of the remaining representative nodes serve as backup connections.

[0017] S5: Set up a fault recovery mechanism based on the successor list. Each representative node maintains a successor list containing at least two nodes based on latency, bandwidth, and online time. When a representative node fails, other representative nodes in the same logical unit transfer the connection information of the failed representative node to the first successor in the list.

[0018] Based on the above scheme, each step can be implemented in the following preferred manner.

[0019] As a preferred embodiment of the first aspect mentioned above, in step S1, the K-means clustering algorithm is used to divide the logical units.

[0020] As a preferred embodiment of the first aspect mentioned above, the connection allocation strategy in step S2 is as follows: the external geographical regions that need to be connected are sorted by number, and the i-th representative node is responsible for connecting the external geographical regions numbered {i,i+K,i+2K,...i+(M-1)K}, where K is the total number of representative nodes in this logical unit, i is the sequence number of a representative node, and M represents the number of external geographical regions connected by the representative node; the same polling mechanism is used for the connection allocation of external logical units; each representative node randomly selects any representative node in the target region to establish a connection.

[0021] As a preferred embodiment of the first aspect, the multi-representative node collaboration mechanism in step S2 includes load information synchronization: every 30 seconds, a representative node sends a synchronization message to other representative nodes in the same logical unit, which includes the number of currently connected ordinary nodes, bandwidth utilization, CPU utilization, message queue length, and average latency to other representative nodes; every 60 seconds, an ordinary node evaluates the currently active representative node, and performs a switch when the score difference between the best representative node and the currently active representative node exceeds 20%.

[0022] As a preferred embodiment of the first aspect above, the three-level routing table in step S3 includes: a global routing table, used to record node number, geographic region number, logical unit number, representative node sequence number, node type and status information; a local routing cache, used to record target node, next hop, hop count, complete path and historical delay; and a REP connection table, used to record the connection status of each representative node, the list of responsible geographic regions and the list of logical units.

[0023] As a preferred embodiment of the first aspect mentioned above, the weighted score calculation method in step S4 is as follows:

[0024] Score = 0.4 × (1 / latency) + 0.3 × available bandwidth + 0.3 × (1 / load rate);

[0025] Among them, latency is the average latency of the last 10 communications, available bandwidth is the proportion of remaining bandwidth to total bandwidth, and load rate is the current number of connections divided by the load threshold; the load threshold is set to... This indicates rounding up to the nearest integer.

[0026] As a preferred option in the first aspect mentioned above, in step S5, other representative nodes of the same logical unit are preferentially selected as successors, followed by ordinary nodes with the highest successor scores; the specific calculation method for successor scores is as follows:

[0027] Successor score = 0.3 × latency score + 0.3 × bandwidth score + 0.4 × stability score;

[0028] Latency score = 100 × (1 - average latency / 100ms)

[0029] Bandwidth Score = Available Bandwidth / 10Mbps × 100

[0030] Stability score = min(online time / 24 hours, 1) × 100.

[0031] As a preferred option of the first aspect mentioned above, it also includes a same geographical region optimization mechanism: when the source node and the target node are located in the same geographical region, after the route discovery is completed for the first time through the representative node, the source node and the target node are allowed to establish a direct connection, and subsequent communication will no longer be forwarded through the representative node.

[0032] It also includes a hierarchical heartbeat detection mechanism: the heartbeat interval between representative nodes within the same logical unit is 5 seconds, the heartbeat interval between representative nodes across logical units is 10 seconds, and the heartbeat interval between representative nodes across geographical locations is 15 seconds; the heartbeat interval between ordinary nodes and active representative nodes is 10 seconds, and the heartbeat interval between ordinary nodes and backup representative nodes is 30 seconds. The timeout time of a representative node is set to 3 times the corresponding heartbeat interval of that representative node. If the heartbeat interval of a representative node is greater than the timeout time of that representative node for 3 consecutive times, it is determined that the representative node is faulty.

[0033] As a preferred option for the first aspect mentioned above, message broadcasting adopts a hybrid connection strategy: during unicast, ordinary nodes forward messages only through active representative nodes; during broadcast, ordinary nodes send messages to all connected representative nodes simultaneously, including active and backup connections, and the representative nodes spread the message through the backbone network.

[0034] Secondly, the present invention provides a hierarchical routing system based on multi-representative node collaboration, comprising:

[0035] The network layering module is used to build a three-layer network architecture. It divides network nodes into multiple geographical regions according to their geographical location. Each geographical region is divided into multiple logical units according to the node distribution density. Each logical unit is set with multiple representative nodes and multiple ordinary nodes.

[0036] The collaborative management module is used to establish a multi-representative node collaborative mechanism, assign a unique number to each representative node, establish collaborative connection relationships among multiple representative nodes within the same logical unit, and allocate external connection tasks among multiple representative nodes according to a predetermined connection allocation strategy. Each representative node is responsible for connecting to at least one external logical unit and / or external geographical region.

[0037] The location and routing module is used to perform hierarchical cross-region node location. When the source node sends a message to the target node, it first determines the geographical area where the target node is located through a pre-built three-level routing table, then locates the specific logical unit, and finally routes to the target node through the representative node within the logical unit.

[0038] The connection management module is used to establish connections between ordinary nodes and multiple representative nodes within this logical unit. Based on a weighted score of latency, bandwidth, and load, the optimal representative node is selected as the active connection for unicast communication, while the connections of the remaining representative nodes are used as backup connections.

[0039] The fault recovery module is used to set up a fault recovery mechanism based on a successor list. Each representative node maintains a successor list containing at least two nodes based on latency, bandwidth, and online time. When a representative node fails, other representative nodes in the same logical unit transfer the connection information of the failed representative node to the first successor in the list.

[0040] Compared with the prior art, the present invention has the following advantages:

[0041] (1) High reliability: Through the multi-REP collaborative working mechanism, the problem of single point of failure is avoided. The failure of any single REP node will not cause network partition or service interruption, and can automatically complete fault recovery and connection migration in a short time.

[0042] (2) Improved routing efficiency: The hierarchical positioning mechanism significantly reduces the number of routing hops by narrowing the search range step by step. Broadcast messages can be quickly disseminated to the entire network through the REP backbone, avoiding the network storm problem of traditional flooding methods.

[0043] (3) Good scalability: The layered architecture design reduces network complexity. Linear expansion can be achieved by adding AREA, CELL, or REP nodes, supporting large-scale node deployment.

[0044] (4) Effective load balancing: Through the round-robin allocation algorithm and dynamic adjustment mechanism, the connection tasks are evenly distributed among multiple REPs, avoiding the waste of resources where some nodes are overloaded while other nodes are idle.

[0045] (5) Optimize communication latency: Through a geographically aware hierarchical architecture, nodes in similar geographical locations can communicate quickly. Direct connection optimization within the same AREA further reduces unnecessary relays and lowers end-to-end latency.

[0046] (6) Simplify network management: By restricting direct connections between ordinary nodes, the complex mesh topology is simplified into a star structure centered on REP, which greatly reduces the maintenance complexity and management overhead of the network topology. Attached Figure Description

[0047] Figure 1 This is a flowchart of the steps of the present invention.

[0048] Figure 2 This is a schematic diagram of the three-layer network architecture of the present invention;

[0049] Figure 3 This is a flowchart of the multi-REP collaborative connection allocation process of the present invention;

[0050] Figure 4 This is a flowchart of the hierarchical cross-regional node positioning process of the present invention;

[0051] Figure 5 This is a flowchart of the fault recovery mechanism of the present invention. Detailed Implementation

[0052] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. Technical features in the various embodiments of the present invention can be combined accordingly without mutual conflict.

[0053] In the description of this invention, it should be understood that the terms "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first" and "second" may explicitly or implicitly include at least one of those features.

[0054] like Figure 1 As shown, in a preferred embodiment of the present invention, the hierarchical routing method based on multi-representative node collaboration includes the following steps S1 to S5. The specific implementation process of each step will be described in detail below.

[0055] S1. Construct a three-layer network architecture, dividing network nodes into multiple geographical regions (AREAs) based on their geographical location. Within each geographical region, divide the network into multiple logical units (CELLs) based on the node distribution density. Within each logical unit, set up multiple representative nodes (REPs) and multiple ordinary nodes (REGs).

[0056] It should be noted that in step S1 of this invention, the K-means clustering algorithm is used to divide the logical units: the latitude and longitude coordinates of the input nodes are set to the range of 100-250 nodes in each logical unit, and the optimization is iterated until the nodes in each logical unit are geographically close and the number is balanced.

[0057] In step S1 of this embodiment, a three-layer network architecture (AREA / CELL / Node) is adopted: the entire network is divided into multiple regions (AREA), each region is further subdivided into several logical units (CELL), and each logical unit contains several nodes (REP and REG). The region and unit hierarchy is used to limit the connection range and broadcast propagation range, reducing unnecessary cross-domain communication. For example... Figure 2 As shown, the hierarchical relationship between AREA, CELL, and nodes is specifically illustrated.

[0058] S2. Establish a multi-REP collaborative mechanism, assign a unique number to each representative node (this number consists of three parts: geographic area number AREA_ID, logical unit number CELL_ID, and representative node sequence number REP_seq), establish collaborative connection relationships among multiple representative nodes within the same logical unit, and allocate external connection tasks among multiple representative nodes according to a predetermined connection allocation strategy, with each representative node responsible for connecting to at least one external logical unit and / or external geographic area.

[0059] It should be noted that in step S2 of this invention, the connection allocation strategy is as follows: the external geographical regions to be connected are sorted by number, and the i-th representative node is responsible for connecting the external geographical regions numbered {i,i+K,i+2K,...i+(M-1)K}, where K is the total number of representative nodes of this logical unit, i is the sequence number of a representative node, and M represents the number of external geographical regions connected by the representative node; the same polling mechanism is used for the connection allocation of external logical units; each representative node randomly selects any one representative node in the target region to establish a connection.

[0060] It should be noted that in step S2 of the present invention, the above-mentioned multi-representative node collaboration mechanism includes load information synchronization: every 30 seconds, the representative node sends a synchronization message to other representative nodes in the same logical unit, which includes the number of currently connected ordinary nodes, bandwidth utilization, CPU utilization, message queue length and average latency to other representative nodes; every 60 seconds, the ordinary node evaluates the currently active representative node, and performs a switch when the score difference between the optimal representative node and the currently active representative node exceeds 20%.

[0061] S3: Perform hierarchical cross-regional node positioning. When the source node sends a message to the target node, the geographical area where the target node is located is first determined by the pre-built three-level routing table, then the specific logical unit is located, and finally the target node is routed through the representative node in the logical unit.

[0062] It should be noted that in step S3 of this invention, the above-mentioned three-level routing table includes: a global routing table, used to record node number node_id, geographic area number AREA_ID, logical unit number CELL_ID, representative node sequence number, node type and status information; a local routing cache, used to record target node, next hop, hop count, complete path and historical delay; and a REP connection table, used to record the connection status of each representative node, the list of geographic areas it is responsible for and the list of logical units it is responsible for.

[0063] S4: Ordinary nodes establish connections with multiple representative nodes within this logical unit. Based on a weighted score of latency, bandwidth, and load, the optimal representative node is selected as the active connection for unicast communication, while the connections of the remaining representative nodes serve as backup connections.

[0064] It should be noted that in step S4 of this invention, the above-mentioned weighted scoring calculation method is as follows:

[0065] Score = 0.4 × (1 / latency) + 0.3 × available bandwidth + 0.3 × (1 / load rate);

[0066] Among them, latency is the average latency of the last 10 communications, available bandwidth is the proportion of remaining bandwidth to total bandwidth, and load rate is the current number of connections divided by the load threshold; the load threshold is set to... This indicates rounding up to the nearest integer.

[0067] S5: Set up a fault recovery mechanism based on the successor list. Each representative node maintains a successor list containing at least two nodes based on latency, bandwidth, and online time. When a representative node fails, other representative nodes in the same logical unit transfer the connection information of the failed representative node to the first successor in the list.

[0068] It should be noted that in step S5 of this invention, other representative nodes of the same logical unit are preferentially selected as successors, and then the ordinary node with the highest successor score is selected as the successor; the specific calculation method for the successor score is as follows:

[0069] Successor score = 0.3 × latency score + 0.3 × bandwidth score + 0.4 × stability score;

[0070] Latency score = 100 × (1 - average latency / 100ms)

[0071] Bandwidth Score = Available Bandwidth / 10Mbps × 100

[0072] Stability score = min(online time / 24 hours, 1) × 100.

[0073] It should be noted that the method of the present invention also includes a geographical region optimization mechanism: when the source node and the target node are located in the same geographical region, after the route discovery is completed for the first time through the representative node, the source node and the target node are allowed to establish a direct connection, and subsequent communication will no longer be forwarded through the representative node, so as to reduce communication latency and representative node load.

[0074] It should be noted that the method of the present invention also includes a hierarchical heartbeat detection mechanism: the heartbeat interval between representative nodes within the same logical unit is 5 seconds, the heartbeat interval between representative nodes across logical units is 10 seconds, and the heartbeat interval between representative nodes across geographical locations is 15 seconds; the heartbeat interval between ordinary nodes and active representative nodes is 10 seconds, and the heartbeat interval between ordinary nodes and backup representative nodes is 30 seconds. The timeout time of a representative node is set to 3 times the heartbeat interval corresponding to that representative node. If the heartbeat interval of a representative node is greater than the timeout time of that representative node for 3 consecutive times, it is determined that the representative node is faulty.

[0075] It should be noted that in this invention, message broadcasting adopts a hybrid connection strategy: during unicast, ordinary nodes forward messages only through active representative nodes; during broadcast, ordinary nodes send messages to all connected representative nodes simultaneously, including active connections and backup connections, and representative nodes spread rapidly through the backbone network.

[0076] To better demonstrate the specific implementation and technical effects of the present invention, the hierarchical routing method based on multi-representative node collaboration shown in steps S1 to S5 of the above preferred implementation will be applied to a specific example.

[0077] Example

[0078] The hierarchical routing method based on multi-representative node collaboration used in this embodiment is implemented as described above. The main steps of this method are introduced below.

[0079] I. Network Initialization and Architecture Construction

[0080] This embodiment describes the initialization process of a large-scale distributed network. For example... Figure 2 As shown, a three-tier architecture of AREA-CELL-Node is adopted.

[0081] Step 1.1: Geographic Region (AREA) Division

[0082] This embodiment divides regions based on the geographical location information of the nodes. The division principle is to group nodes with similar geographical locations and low network latency into the same region. Typical division schemes may include: division by continent, such as Europe, North America, Asia, etc.; division by country or region, such as East Asia, Southeast Asia, South Asia, etc.; and customized division based on actual network topology and latency characteristics. Each AREA contains several nodes, the number of which depends on the actual deployment in the region. Flexible configuration of the number of AREAs and the division method is supported.

[0083] Step 1.2: Logic Unit (CELL) Partitioning

[0084] The nodes within each AREA are further subdivided into multiple ELLs. The subdivision method employs a geographic location-based clustering algorithm. This algorithm takes the location information (longitude and latitude) of all nodes within the AREA as input, and the target ELL size is set to range from 100 to 250 nodes.

[0085] The algorithm execution process includes: first, estimating the required number of cells based on the total number of nodes and the target size; then, selecting initial cluster centers using random selection or the K-means++ method; next, iterative optimization, assigning each node to the nearest cluster center, recalculating the center position of each cluster, and checking whether the cluster size meets the constraints; splitting clusters with more nodes than the upper limit, and merging clusters with fewer nodes than the lower limit with the nearest cluster; the algorithm converges when all cell sizes meet the constraints and the cluster centers no longer change significantly. This algorithm ensures that the nodes within each cell are geographically concentrated and that the number of nodes is moderate, facilitating management.

[0086] Step 1.3: REP Node Configuration

[0087] Each cell requires several REP nodes as representative nodes. The selection criteria for REP nodes include: in terms of network conditions, they need to have high bandwidth and stable network connection; in terms of computing resources, they need to have sufficient CPU and memory resources; in terms of reliability, they need to have a high historical online rate and low failure rate; in terms of geographical location, they need to be as close as possible to the geographical center of the cell.

[0088] The principle for determining the number of REP nodes is as follows: 2-3 REPs for small-scale cells (100-150 nodes); 3-4 REPs for medium-scale cells (151-200 nodes); and 4-5 REPs for large-scale cells (201-250 nodes). REP nodes can be pre-specified through configuration files or dynamically generated through an election algorithm. The proportion of REP nodes to the total number of nodes is generally controlled between 2% and 5%, ensuring both a streamlined backbone network and sufficient redundancy.

[0089] Step 1.4: REP Election and Revocation

[0090] Triggering conditions: REP election is automatically triggered under the following circumstances: The number of available REPs in this cell is lower than the target minimum, ensuring that there are always enough REPs to provide services; The average load of existing REP nodes exceeds a preset threshold T (recommended to be set to 80%), indicating that more REPs need to be added to share the load; A high failure rate of REP nodes is detected, such as a heartbeat failure rate exceeding 10%; The network administrator manually triggers the election based on operational needs. After triggering, the election process is automatically started to ensure that the number and quality of REPs meet network requirements.

[0091] Candidate Eligibility: Nodes participating in REP elections must meet strict eligibility requirements: At least H hours of online time (H=72 recommended) to ensure stable operation for sufficient time; average round-trip time (RTT) to other nodes within the cell not exceeding the threshold R milliseconds (R=50 recommended) to guarantee good network connectivity; available bandwidth not less than B Mbps (B=100 recommended) to meet backbone network transmission needs; and no abnormal behavior records in the past 24 hours, including protocol violations, abnormal traffic, malicious operations, etc. Only nodes that meet all conditions can become qualified candidates.

[0092] Scoring Model: A three-dimensional weighted scoring model is used for qualified candidate nodes. The score calculation comprehensively considers: network latency performance (40% weight), calculated based on the average RTT between the node and other nodes; lower latency results in a higher score; bandwidth capacity (30% weight), assessing the node's available bandwidth and historical bandwidth usage; more abundant bandwidth results in a higher score; and online stability (30% weight), evaluated based on the node's cumulative online time and historical disconnection count; better stability results in a higher score. The final score is the weighted sum of the three dimensions, used for ranking candidate nodes.

[0093] Election Process: The election employs a simplified majority confirmation mechanism. The process includes: Candidate Submission Phase: Eligible nodes submit candidate applications to existing REPs, including performance metrics and service commitments; Proposal Broadcast Phase: Existing REPs verify candidate eligibility and broadcast the qualified candidate information to all REPs within the CELL; Scoring and Ranking Phase: Each REP independently calculates the candidate node's score and selects the nodes with the highest scores as nominees; Confirmation Voting Phase: A simple majority vote is conducted on the nominated nodes, and a candidate node is elected when it receives more than 2 / 3 of the REPs' approval votes; Certificate Issuance Phase: A short-term certificate valid for 7 days is issued to the elected REP, automatically renewing before expiration. The certificate contains the REP's identity, scope of permissions, and validity period information. The entire election process is completed within 10 minutes, avoiding prolonged service interruptions.

[0094] Revocation Mechanism: REP revocation employs a combination of performance evaluation and voting. Revocation trigger conditions include: performance scores falling into the bottom 10% of all REPs for three consecutive evaluation periods (1 hour per period); serious failures or malicious behavior confirmed by a majority of REPs; and voluntarily requesting to leave the REP role. The revocation process is as follows: any REP can initiate a revocation proposal with relevant evidence; other REPs verify the evidence and vote; when more than 2 / 3 of the votes are in favor, revocation is executed; a successor is immediately selected from the REP's successor list, or a new election is triggered; the revoked node is downgraded to a regular node, and all its REP responsibilities are transferred to the successor. The revocation process ensures a smooth transition and does not affect normal network operation.

[0095] Security Measures: The election and revocation processes employ multiple security mechanisms. REP certificates are issued by a CELL-level Certificate Authority (CA) to ensure identity authenticity; all election-related messages require digital signatures to prevent forgery and tampering; a nonce mechanism is introduced to prevent replay attacks; and a complete audit log is maintained to record all election and revocation operations, supporting post-event traceability and auditing. These security measures ensure the fairness and verifiability of the election process.

[0096] Step 1.5: Connection Establishment

[0097] like Figure 2 As shown, this embodiment establishes three types of connections: First, full connectivity within a cell's REPs. A full connectivity network is established between all REP nodes within the same cell. If a cell has n REPs, then n×(n-1) / 2 bidirectional connections need to be established. These connections are maintained as long-lived connections to ensure fast communication between REPs within the cell. Second, external connection allocation. A round-robin allocation algorithm is used to assign external connection tasks to each REP. Figure 3The specific allocation process is illustrated: each REP is assigned a sequence number (1 to n); the external AREAs and external ELLs that need to be connected are sorted separately; the i-th REP is responsible for connecting to the external area whose sequence number modulo n remains i; each REP randomly selects a REP within its assigned area to establish a connection. For example, if a ELL has 4 REPs and needs to connect to 8 external areas, then REP 1 is responsible for areas 1 and 5, REP 2 for areas 2 and 6, REP 3 for areas 3 and 7, and REP 4 for areas 4 and 8. Finally, ordinary node connections are established. Each ordinary node maintains concurrent connections with k REPs within its ELL (default k=3, configurable 2–4), and active connections are selected using a weighted score S=0.4*(1 / RTT)+0.3*bandwidth+0.3*(1 / load rate); the rest are reserved and re-evaluated periodically (60s), with ±10% hysteresis to avoid jitter switching. The remaining connections serve as backup connections.

[0098] II. Multi-REP Collaborative Working Mechanism

[0099] Step 2.1: Implementation of the connection allocation algorithm

[0100] like Figure 3 As shown, the round-robin allocation algorithm executes according to the following process: The algorithm receives a list of REP nodes, a list of target regions, and a list of target cells as input. First, initialization is performed by assigning a sequence number to each REP and initializing its responsible region and cell lists to an empty set. Then, the region list is sorted, and each region is assigned to the corresponding sequence number of the REP node in a round-robin manner. The assigned REP randomly selects a target REP from the REP list of that region to establish a connection. A similar process is used for the allocation of external cells.

[0101] Step 2.2: Load Information Synchronization

[0102] The load synchronization mechanism between REP nodes is triggered every 30 seconds. The synchronization process includes: constructing a synchronization message containing the node ID, timestamp, and load information (number of connected ordinary nodes, bandwidth utilization, message queue length, and CPU utilization); calculating the average latency to each connected node; adding successor list information; and broadcasting the message to other REP nodes within the same cell. Through this periodic synchronization mechanism, each REP can promptly understand the load status and network conditions of other REPs.

[0103] Step 2.3: Dynamic Load Adjustment

[0104] Regular nodes evaluate REP performance every 60 seconds. The evaluation process first calculates the score of the currently active REP, then iterates through all connected REPs and calculates their respective scores. The score calculation considers three factors: average latency (weight 40%), available bandwidth (weight 30%), and load rate (weight 30%). If a REP's score is found to be more than 20% higher than the currently active REP, a switchover operation is performed, and that REP is set as the new active connection. The load threshold is set as the total number of CELL nodes divided by the number of REPs, then multiplied by 1.15 and rounded up to ensure reasonable load distribution.

[0105] III. Layered Cross-Regional Node Positioning

[0106] This step will explain the complete process of cross-region message routing in detail. For example... Figure 4 As shown, this embodiment employs a hierarchical positioning strategy, narrowing the search range step by step. Assume that source node A needs to send a message to target node B, and the two nodes are located in different AREAs.

[0107] Step 3.1: Routing Initiation

[0108] Source node A (a normal node) sends the message to its currently active REP node. The message contains the identifier of the target node B.

[0109] Step 3.2: Target Positioning

[0110] Active REPs perform tertiary location by querying the routing table.

[0111] Level 1 Location (AREA Level): R_src queries the global routing table to determine the AREA to which target node B belongs. The global routing table records at least the following fields: node ID, AREA_ID, CELL_ID, and management REP_ID. It also records node type and status information for policy optimization.

[0112] Second-level positioning (CELL level): If R_src is not responsible for the AREA, then look for the REP (denoted as R_area) that contains the AREA in the "List of Responsible Areas" in this CELL's REP connection table; if R_src is already responsible for the AREA, then skip this level.

[0113] Level 3 positioning (node ​​level): Select the entry REP (R_entry) on the target AREA side. R_entry queries the local routing table to determine the specific CELL where the target node B is located and its management REP (R_dst).

[0114] Step 3.3: Message forwarding path

[0115] Reference Figure 4A typical forwarding path includes the following hops: the source node sends the message to the active REP of the source cell; the active REP of the source cell forwards it to the REP responsible for the target area within the source cell (intra-cell forwarding); the responsible REP forwards it to the ingress REP of the target area (cross-area forwarding); the ingress REP of the target area forwards it to the REP of the target cell (intra-area forwarding); the REP of the target cell is finally delivered to the target node. For communication within the same area, such as... Figure 4 As shown in the decision branch, this embodiment will identify and adopt a shorter path to avoid unnecessary cross-AREA forwarding.

[0116] Step 3.4: Route Optimization

[0117] This embodiment implements a route caching mechanism: after the initial successful routing, the source node caches routing information, including the target node ID, next-hop REP, complete path, and historical latency; the cache validity period is set to 3600 seconds; subsequent communication directly uses the cached path to avoid repeated queries. For communication within the same AREA, when the source and target are detected to be in the same AREA and the direct connection criterion in Section 5 is met, a direct connection for data plane only can be established after the initial routing is completed; if the direct connection is broken or fails, it automatically falls back to the path via the REP.

[0118] V. Fault Recovery Mechanism

[0119] like Figure 5 As shown, this embodiment provides a complete fault detection and recovery process.

[0120] Step 4.1: Selection and maintenance of heirs

[0121] The successor list is updated hourly. The update process first collects all nodes within the cell as candidates, then calculates a successor score for each candidate node. The score calculation considers three factors: the average latency to the node (lower latency, higher score, weight 30%); the node's available bandwidth (higher bandwidth, higher score, weight 30%); and the node's online time (longer online time, higher score, weight 40%). Candidate nodes are ranked according to their overall score, and the top 5 nodes are selected as successors. Finally, the successor list is synchronized with other REP nodes in the same cell.

[0122] Step 4.2: Fault Detection

[0123] This embodiment employs a layered heartbeat mechanism and exposes configurable intervals: same-cell REP 3–8s, cross-cell REP 6–15s, cross-area REP 10–20s, REG→active REP 5–15s, REG→standby REP 20–45s. Default values ​​are 5 / 10 / 15 / 10 / 30s respectively. The timeout threshold is calculated as α × heartbeat interval, with α defaulting to 3.0 and adjustable from 2.5 to 4.0. Dynamic weighted timeout is supported (adaptively adjusted based on recent packet loss / jitter). If three consecutive heartbeats time out, the peer node is considered faulty, triggering the fault recovery process.

[0124] Step 4.3: Fault Recovery Execution

[0125] The REP fault recovery process includes the following steps: First, fault confirmation is performed, with other active REPs in the same cell confirming that the faulty node is indeed unable to connect; then, a successor is obtained, selecting the first online candidate node from the successor list of the faulty REP; next, connection information is collected, including ordinary nodes managed by the faulty REP, the external areas and units it is responsible for, and routing table information; connection migration is performed, transferring all connection information to the successor node; before takeover, the successor is authorized by a majority-signed promotion order from the surviving REPs; CELL-CA immediately issues a short-term REP certificate (validity ≤ 24h) and publishes it via CRL / OCSP; if subsequent audits fail, the certificate can be revoked and rolled back to the second-best successor. If the successor was originally an ordinary node, it is promoted to a REP node; all affected nodes are notified to update their connection information; finally, the entire network routing table is updated, replacing the faulty REP's information with the successor's information.

[0126] V. Same as AREA optimization mechanism

[0127] Optimization for direct connections between nodes in the same area is triggered after the initial route discovery. In this embodiment, when the source and destination nodes are detected to be in the same area, the value of establishing a direct connection is evaluated. The direct connection evaluation is based on active probing: short test sequences are sent to candidate peers to estimate the end-to-end RTT and effective bandwidth; simultaneously, a path elongation factor s (empirical 1.3–1.7) with refractive index correction is used to correct the geographic estimate. If min(RTT_probe, RTT_geo*s) + queue estimate < current path RTT × 0.7, and the expected throughput within 5 minutes is ≥ the threshold, then a direct connection is established; ±5% hysteresis is used to avoid frequent oscillations. To avoid resource waste, a 300-second aging timer is set for direct connections; if no data is transmitted within 300 seconds, the connection will be automatically disconnected. Direct connections only carry data plane traffic; control signaling such as authentication, key rotation, and route updates continue to be transmitted via REP.

[0128] VI. Broadcast Optimization Mechanism

[0129] Broadcast message propagation employs a tiered diffusion strategy. When a regular node initiates a broadcast, it sends the message to all connected REP nodes. Upon receiving the broadcast message, each REP node forwards it according to the following priorities: First priority is intra-cell diffusion, forwarding the message to all other REP nodes within the same cell to ensure rapid coverage of that cell. Second priority is cross-cell diffusion, forwarding the message to other cells connected to by that REP, with each cell selecting one REP as its target. Third priority is cross-area diffusion, forwarding the message to other AREAs connected to by that REP, propagating across areas through the ingress REP. Fourth priority is distribution to regular nodes, distributing the message to all regular nodes connected to that REP.

[0130] To avoid message storms, a message cache can be maintained to record the IDs of processed messages. When duplicate messages are received, they are discarded without being forwarded. Through this mechanism, broadcast messages can quickly spread throughout the network while avoiding network congestion.

[0131] In summary, the innovation of this invention lies in:

[0132] Establish multi-REP collaboration and outbound connection allocation: Multiple representative nodes (REPs) are configured for each cell and area. Each REP is responsible for outbound connections and cross-domain routing. A scoring mechanism is used to allocate outbound connection numbers to REPs, preventing single REP overload and improving redundancy. Outbound connections preferentially point to REPs in adjacent areas / cells to shorten paths and improve reachability.

[0133] Three-level hierarchical positioning: Query / routing requests are first parsed within the current cell. If no match is found, the search is escalated to the current area, and then to cross-area searches. This hierarchical candidate set reduces network-wide broadcasting and fallback.

[0134] Intelligent connection management and scoring switching: Dynamically evaluate connection quality based on scoring functions of RTT, bandwidth and load, trigger connection switching and enable backup connections; avoid jitter switching through hysteresis, and set periodic re-evaluation windows.

[0135] Rapid Failure Recovery and Takeover Candidates: Detects REP failures through heartbeat and timeout thresholds, selects a takeover candidate from "standby REPs / takeover candidates" based on scores, maintains stable external connections, and updates certificates and authorizations to complete a secure takeover.

[0136] Direct connection optimization within the same area: When the probe RTT / bandwidth reaches the threshold, a direct connection is established. Geographical distance and path length are only used as priors, not as the final threshold, to ensure that the optimization results are measurable and stable.

[0137] Hierarchical broadcasting and deduplication: Messages are distributed hierarchically across CELL / AREA / AREA, and deduplication and decay are performed through message ID, Bloom filtering and LRU caching to control the spread range and duplication rate.

[0138] It should also be noted that the hierarchical routing method based on multi-representative node collaboration in the above embodiments can essentially be executed by a computer program or module. Therefore, similarly, based on the same inventive concept, another preferred embodiment of the present invention also provides a hierarchical routing system based on multi-representative node collaboration, corresponding to the hierarchical routing method based on multi-representative node collaboration provided in the above embodiments, comprising:

[0139] The network layering module is used to build a three-layer network architecture. It divides network nodes into multiple geographical regions according to their geographical location. Each geographical region is divided into multiple logical units according to the node distribution density. Each logical unit is set with multiple representative nodes and multiple ordinary nodes.

[0140] The collaborative management module is used to establish a multi-representative node collaborative mechanism, assign a unique number to each representative node, establish collaborative connection relationships among multiple representative nodes within the same logical unit, and allocate external connection tasks among multiple representative nodes according to a predetermined connection allocation strategy. Each representative node is responsible for connecting to at least one external logical unit and / or external geographical region.

[0141] The location and routing module is used to perform hierarchical cross-region node location. When the source node sends a message to the target node, it first determines the geographical area where the target node is located through a pre-built three-level routing table, then locates the specific logical unit, and finally routes to the target node through the representative node within the logical unit.

[0142] The connection management module is used to establish connections between ordinary nodes and multiple representative nodes within this logical unit. Based on a weighted score of latency, bandwidth, and load, the optimal representative node is selected as the active connection for unicast communication, while the connections of the remaining representative nodes are used as backup connections.

[0143] The fault recovery module is used to set up a fault recovery mechanism based on a successor list. Each representative node maintains a successor list containing at least two nodes based on latency, bandwidth, and online time. When a representative node fails, other representative nodes in the same logical unit transfer the connection information of the failed representative node to the first successor in the list.

[0144] It should also be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the embodiments provided in this application, the division of steps or modules in the system and method is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple modules or steps may be combined or integrated together, and a module or step may also be split.

[0145] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, all technical solutions obtained through equivalent substitution or transformation fall within the protection scope of the present invention.

Claims

1. A hierarchical routing method based on multi-representative node collaboration, characterized in that, Includes the following steps: S1. Construct a three-layer network architecture, divide the network nodes into multiple geographical regions according to their geographical location, divide each geographical region into multiple logical units according to the node distribution density, and set up multiple representative nodes and multiple ordinary nodes in each logical unit; S2. Establish a multi-REP collaborative mechanism, assign a unique number to each representative node, establish collaborative connection relationships among multiple representative nodes within the same logical unit, and allocate external connection tasks among multiple representative nodes according to a predetermined connection allocation strategy. Each representative node is responsible for connecting to at least one external logical unit and / or external geographical region. S3: Perform hierarchical cross-regional node positioning. When the source node sends a message to the target node, the geographical area where the target node is located is first determined through the pre-built three-level routing table, then the specific logical unit is located, and finally the target node is routed through the representative node in the logical unit. S4: Ordinary nodes establish connections with multiple representative nodes within this logical unit. The optimal representative node is selected as the active connection for unicast communication based on a weighted score of latency, bandwidth, and load, while the connections of the remaining representative nodes serve as backup connections. S5: Set up a fault recovery mechanism based on a successor list. Each representative node maintains a successor list containing at least two nodes based on latency, bandwidth, and online time. When a representative node fails, other representative nodes in the same logical unit transfer the connection information of the failed representative node to the first successor in the list.

2. The hierarchical routing method based on multi-representative node collaboration according to claim 1, characterized in that, In step S1, the K-means clustering algorithm is used to divide the logical units.

3. The hierarchical routing method based on multi-representative node collaboration according to claim 1, characterized in that, The connection allocation strategy in step S2 is as follows: the external geographical regions that need to be connected are sorted by number, and the i-th representative node is responsible for connecting the external geographical regions numbered {i,i+K,i+2K,...i+(M-1)K}, where K is the total number of representative nodes in this logical unit, i is the sequence number of a representative node, and M represents the number of external geographical regions connected by the representative node; the same round-robin mechanism is used for the connection allocation of external logical units; each representative node randomly selects any representative node in the target region to establish a connection.

4. The hierarchical routing method based on multi-representative node collaboration according to claim 1, characterized in that, The multi-representative node collaboration mechanism in step S2 includes load information synchronization: every 30 seconds, a representative node sends a synchronization message to other representative nodes in the same logical unit, which includes the number of currently connected ordinary nodes, bandwidth utilization, CPU utilization, message queue length, and average latency to other representative nodes; every 60 seconds, an ordinary node evaluates the currently active representative node, and performs a switch when the score difference between the best representative node and the currently active representative node exceeds 20%.

5. The hierarchical routing method based on multi-representative node collaboration according to claim 1, characterized in that, The three-level routing table in step S3 includes: a global routing table, which records node number, geographic region number, logical unit number, representative node sequence number, node type, and status information; a local routing cache, which records the target node, next hop, hop count, complete path, and historical delay; and a REP connection table, which records the connection status of each representative node, the list of geographic regions it is responsible for, and the list of logical units it is responsible for.

6. The hierarchical routing method based on multi-representative node collaboration according to claim 1, characterized in that, The weighted score calculation method in step S4 is as follows: Score = 0.4 × (1 / latency) + 0.3 × available bandwidth + 0.3 × (1 / load rate); Among them, latency is the average latency of the last 10 communications, available bandwidth is the proportion of remaining bandwidth to total bandwidth, and load rate is the current number of connections divided by the load threshold; the load threshold is set to... This indicates rounding up to the nearest integer.

7. The hierarchical routing method based on multi-representative node collaboration according to claim 1, characterized in that, In step S5, other representative nodes of the same logical unit are selected as successors first, followed by ordinary nodes with the highest successor score; the specific calculation method for the successor score is as follows: Successor score = 0.3 × latency score + 0.3 × bandwidth score + 0.4 × stability score; Latency score = 100 × (1 - average latency / 100ms) Bandwidth Score = Available Bandwidth / 10Mbps × 100 Stability score = min(online time / 24 hours, 1) × 100.

8. The hierarchical routing method based on multi-representative node collaboration according to claim 1, characterized in that, It also includes a same-geographic-region optimization mechanism: when the source node and the target node are located in the same geographic region, after the route discovery is completed for the first time through the representative node, the source node and the target node are allowed to establish a direct connection, and subsequent communication will no longer be forwarded through the representative node; It also includes a hierarchical heartbeat detection mechanism: the heartbeat interval between representative nodes within the same logical unit is 5 seconds, the heartbeat interval between representative nodes across logical units is 10 seconds, and the heartbeat interval between representative nodes across geographical locations is 15 seconds; the heartbeat interval between ordinary nodes and active representative nodes is 10 seconds, and the heartbeat interval between ordinary nodes and backup representative nodes is 30 seconds. The timeout time of a representative node is set to 3 times the corresponding heartbeat interval of that representative node. If the heartbeat interval of a representative node is greater than the timeout time of that representative node for 3 consecutive times, it is determined that the representative node is faulty.

9. The hierarchical routing method based on multi-representative node collaboration according to claim 1, characterized in that, The message broadcasting adopts a hybrid connection strategy: during unicast, ordinary nodes forward messages only through active representative nodes; during broadcast, ordinary nodes send messages to all connected representative nodes simultaneously, including active and backup connections, and the representative nodes spread the message through the backbone network.

10. A hierarchical routing system based on multi-representative node collaboration, characterized in that, include: The network layering module is used to build a three-layer network architecture. It divides network nodes into multiple geographical regions according to their geographical location. Each geographical region is divided into multiple logical units according to the node distribution density. Each logical unit is set with multiple representative nodes and multiple ordinary nodes. The collaborative management module is used to establish a multi-representative node collaborative mechanism, assign a unique number to each representative node, establish collaborative connection relationships among multiple representative nodes within the same logical unit, and allocate external connection tasks among multiple representative nodes according to a predetermined connection allocation strategy. Each representative node is responsible for connecting to at least one external logical unit and / or external geographical region. The location and routing module is used to perform hierarchical cross-region node location. When the source node sends a message to the target node, it first determines the geographical area where the target node is located through a pre-built three-level routing table, then locates the specific logical unit, and finally routes to the target node through the representative node within the logical unit. The connection management module is used to establish connections between ordinary nodes and multiple representative nodes within this logical unit. Based on a weighted score of latency, bandwidth, and load, the optimal representative node is selected as the active connection for unicast communication, while the connections of the remaining representative nodes are used as backup connections. The fault recovery module is used to set up a fault recovery mechanism based on a successor list. Each representative node maintains a successor list containing at least two nodes based on latency, bandwidth, and online time. When a representative node fails, other representative nodes in the same logical unit transfer the connection information of the failed representative node to the first successor in the list.