IPv6 address segmentation coding method and device for segment routing
Patent Information
- Application Number
- CN202511592333.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2045-11-03
AI Technical Summary
[0005]有鉴于此,本发明的目的在于提出一种面向分段路由的IPv6地址分割编码方法及装置,以解决或部分解决背景技术提及的问题
第一,通过路径分区和容器化承载,减少SRH中编码单元数量,避免头部开销挤压有效负载,提升数据传输效率;无需逐跳解析复杂的128位SID,简化协议处理流程,尤其适配配电侧、站内等算力有限的终端设备。按“边界优先”规则分区,使不同域编码逻辑独立,解决多厂商设备SRH功能兼容问题;故障时仅需重构故障分区容器,缩小重构影响范围,降低重构开销。
Smart Images

Figure CN121509298B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of network communication and Internet protocol technology, and specifically relates to an IPv6 address segmentation coding method and apparatus for segmented routing. Background Technology
[0002] In the process of integrating new power systems with digitalization, fields such as power grids have an urgent need for deterministic transmission and high reliability of wide-area production communication networks. For example, time-sensitive services such as protection signals and PMU (Phasor Measurement Unit) have strict constraints on latency and jitter, but terminals in stations and distribution-side nodes are often limited by bandwidth and computing power.
[0003] Segmented routing (SR), especially SRv6 technology, provides a technical framework for multi-domain collaboration and explicit routing with source path orchestration capabilities. However, its mechanism of expressing paths by carrying a list of 128-bit segment identifiers (SIDs) in the IPv6 extension header faces bottlenecks in engineering implementation: as the number of path hops increases, the length of the SRH (Segment Routing Header) expands dramatically, squeezing the effective load and increasing the device's resolution burden, especially significantly impacting nodes with small packet transmission and limited computing power; at the same time, inconsistent support for SRH functionality from multiple vendors leads to complex cross-domain interoperability, and path reconstruction in the event of a failure incurs high overhead due to the large number of SIDs.
[0004] Existing burden reduction methods, such as shortening SID, SRH compression, and path indexing, are either only applicable to single-domain scenarios with unified coding rules, or rely on state synchronization to offset compression benefits, or are limited to local domains. They are difficult to balance the flexibility, cross-domain compatibility, and low-overhead requirements of SRv6, and cannot adapt to complex network environments such as power grids that are cross-domain, heterogeneous, and time-sensitive. There is an urgent need for new segmented routing coding optimization schemes. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide an IPv6 address segmentation coding method and apparatus for segmented routing, so as to solve or partially solve the problems mentioned in the background art.
[0006] To achieve the above objectives, in a first aspect, the present invention provides an IPv6 address segmentation encoding method for segmented routing, comprising the following steps: Step 1, Node Identifier Allocation and Parameter Determination: Assign a unique node identifier to each forwarding node within the domain, calculate the bit width of the node identifier, and ensure that nodes within the domain maintain a consistent mapping relationship between node identifiers and IPv6 addresses; set the container segment budget bit count and the container control field budget bit count (containing cursor, length, and checksum information); determine the maximum number of nodes per partition based on the container segment budget bit count and the container control field budget bit count, and mark boundary nodes for differences in intra-domain behavioral capabilities, cross-domain operations, and stateful service chains; Step 2, Path Partitioning: Input the ordered path composed of the node identifiers, the node identifier bit width determined in Step 1, the container segment budget bit count, the maximum number of nodes in each partition, and the set of marked boundary nodes. According to the rules that the number of nodes in a partition does not exceed the maximum number of nodes, the partitioning is preferentially performed at the boundary nodes, and the path compression rate and network robustness are taken into account, the ordered path is divided into multiple continuous partitions. Step 3, Intra-area encoding and packet assembly: Construct a fixed-length container for each partition, set a container control field containing the number of partition nodes, the number of forwarded nodes, and integrity verification within the container, convert the node identifiers within the partition to binary and concatenate them into a bit string with a fixed bit width, fill the container into the segmented routing header list in a preset order, and set the remaining segment quantity parameter. Step 4, Packet Forwarding: The forwarding node verifies the integrity of the container information. If it fails, it discards the packet and issues an alarm. If the number of forwarded nodes is less than the number of partition nodes, it calculates the bit offset, extracts the target node identifier, looks up the corresponding IPv6 address through the mapping relationship, updates the number of forwarded nodes, and then forwards the packet. If the number of forwarded nodes is not less than the number of partition nodes, it decrements the remaining segment number parameter. If the remaining segment number parameter after decrementing is greater than 0, it switches to the next container and repeats the extraction and forwarding operation. If the remaining segment number parameter is equal to 0, the packet forwarding is completed.
[0007] As a preferred scheme for IPv6 address segmentation coding method for segmented routing, in step 1, the unique node identifier assigned to the forwarding node within the domain has a value range of [1, N], where N is the total number of forwarding nodes within the domain.
[0008] As a preferred scheme for IPv6 address segmentation encoding for segmented routing, in step 1, the bit width of the node identifier is calculated as the minimum binary bit width b, using the following formula:
[0009] In the formula, Indicates to The calculation result is rounded up.
[0010] As a preferred scheme for IPv6 address segmentation coding method for segmented routing, in step 1, the formula for determining the maximum number of nodes m in each partition based on the container segment budget bits and the container control field budget bits is as follows:
[0011] In the formula, B is the budget bits used by the container segment for encoding the node identifier sequence within the carrying area. Indicates to The calculation result is rounded down; and each container occupies a 128-bit segment identifier position in the segmented routing header, and the metadata overhead of the container is within the preset total header overhead threshold.
[0012] As a preferred scheme for IPv6 address segmentation encoding method for segmented routing, step 2, path partitioning specifically includes: Initialize the starting index and number of partitions for the initial path; Set the starting point of the current partition, and determine the maximum candidate ending point of the current partition by combining the maximum number of nodes in the partition and the total number of nodes in the ordered path; Within the interval from the start of the current partition to the maximum candidate endpoint, if an index corresponding to a boundary node exists, the boundary node index closest to the maximum candidate endpoint is selected as the endpoint of the current partition; otherwise, the maximum candidate endpoint is used as the endpoint of the current partition. Generate the current partition and update the number of partitions and the starting index of the path. If the starting index of the path does not exceed the total number of nodes in the ordered path, repeat the partitioning process until all paths are partitioned and the partition sequence is output.
[0013] As a preferred scheme for IPv6 address segmentation coding methods for segmented routing, the maximum candidate endpoint for the current partition is determined. The method is as follows:
[0014] In the formula, i The starting index of the current path. L The total number of nodes in the ordered path; Minimum number of zones required to calculate the path The formula is:
[0015] In the formula, Indicates to The calculation result is rounded up, and the minimum number of container jumps is equal to the minimum number of zones. Consistent.
[0016] As a preferred scheme for IPv6 address segmentation coding method for segmented routing, in step 3, the Len field in the container control field, which represents the number of partition nodes, is 8 bits and has a value range of [1, m], where m is the maximum number of nodes that each partition can accommodate; the Cursor field, which represents the number of forwarded nodes, is 8 bits, with an initial value of 0 and a value range of [0, Len]; and the Integrity field for information integrity verification adopts CRC-16 verification.
[0017] As a preferred method for IPv6 address segmentation encoding for segmented routing, in step 3, the Segment List filling order in the segmented routing header is as follows: In the formula, For the corresponding partition The completed 128-bit container, K This represents the total number of partitions after path segmentation, enabling forwarding nodes to read path information within containers in path order.
[0018] As a preferred scheme for IPv6 address segmentation coding method for segmented routing, the formula for calculating the bit offset off in step 4 is:
[0019] In the formula, Cursor This represents the number of nodes that have forwarded the message within the container. Based on this offset value, the next b bits are extracted from the NodeID Bits bit string. After converting the next b bits into a decimal number, the target node identifier is obtained.
[0020] As a preferred scheme for IPv6 address segmentation coding method for segmented routing, in step 4, when the integrity verification of information within the container fails, the forwarding node, in addition to discarding the data packet, also records alarm information including the verification failure time, the corresponding container identifier, and the verification failure type.
[0021] Secondly, the present invention provides an apparatus for an IPv6 address segmentation coding method for segmented routing, comprising: The node identification and parameter configuration module is used to assign a unique node identifier to forwarding nodes within the domain, calculate the bit width of the node identifier, and ensure that nodes within the domain maintain a consistent mapping relationship between node identifiers and IPv6 addresses. It sets the budget bits for container segments and the budget bits for container control fields containing cursor, length, and check information. Based on the budget bits for container segments and the budget bits for container control fields, it determines the maximum number of nodes in each partition and marks boundary nodes with differences in behavior capabilities within the domain, cross-domain boundaries, and stateful service chains. The path partitioning module is used to take into input an ordered path composed of node identifiers, the determined bit width of the node identifiers, the budget bit count of the container segment, the maximum number of nodes in each partition, and the set of marked boundary nodes. The module divides the ordered path into multiple continuous partitions according to the rules that the number of nodes in a partition does not exceed the maximum number of nodes, the partitioning is preferentially performed at the boundary nodes, and the path compression rate and network robustness are taken into account. The encoding and packet assembly module is used to construct a fixed-length container for each partition. The container contains a container control field that includes the number of partition nodes, the number of forwarded nodes, and integrity verification. The node identifiers in the partition are converted to binary and then concatenated into a bit string with a fixed bit width. The container is filled into the segment routing header list in a preset order, and the remaining segment quantity parameter is set. The packet forwarding module is used to verify the integrity of container information at the forwarding node. If the verification fails, the packet is discarded and an alarm is triggered. If the number of forwarded nodes is less than the number of partition nodes, the target node identifier is extracted after calculating the bit offset. The corresponding IPv6 address is looked up through the mapping relationship, the number of forwarded nodes is updated, and the packet is forwarded. If the number of forwarded nodes is not less than the number of partition nodes, the remaining segment number parameter is decremented. If the remaining segment number parameter after decrementing is greater than 0, the packet forwarding operation is repeated for the next container. If the remaining segment number parameter is equal to 0, the packet forwarding is completed.
[0022] As a preferred scheme for IPv6 address segmentation coding device for segmented routing, in the node identifier and parameter configuration module, the unique node identifier assigned to the intra-domain forwarding node has a value range of [1, N], where N is the total number of intra-domain forwarding nodes.
[0023] As a preferred scheme for an IPv6 address segmentation coding device for segmented routing, in the node identifier and parameter configuration module, the bit width of the node identifier is calculated as the minimum binary bit width b, using the following formula:
[0024] In the formula, Indicates to The calculation result is rounded up.
[0025] As a preferred scheme for an IPv6 address segmentation coding device for segmented routing, the formula for determining the maximum number of nodes m in each partition based on the container segment budget bits and the container control field budget bits in the node identification and parameter configuration module is as follows:
[0026] In the formula, B is the budget bits used by the container segment for encoding the node identifier sequence within the carrying area. Indicates to The calculation result is rounded down; and each container occupies a 128-bit segment identifier position in the segmented routing header, and the metadata overhead of the container is within the preset total header overhead threshold.
[0027] As a preferred embodiment of an IPv6 address segmentation coding device for segmented routing, the path partitioning module includes: The path partition initialization submodule is used to initialize the starting index and number of partitions for the path; The partition candidate endpoint determination submodule is used to set the starting point of the current partition and determine the maximum candidate endpoint of the current partition by combining the maximum number of nodes in the partition and the total number of nodes in the ordered path. The partition endpoint selection submodule is used to select the boundary node index closest to the maximum candidate endpoint as the endpoint of the current partition if there is an index corresponding to the boundary node within the interval from the start of the current partition to the maximum candidate endpoint; otherwise, the maximum candidate endpoint is used as the endpoint of the current partition. The partition generation and iteration submodule is used to generate the current partition and update the number of partitions and the starting index of the path. If the starting index of the path does not exceed the total number of nodes in the ordered path, the partitioning process is repeated until all paths are partitioned and the partition sequence is output.
[0028] As a preferred scheme for IPv6 address segmentation coding devices for segmented routing, the maximum candidate endpoint for the current partition is determined. The method is as follows:
[0029] In the formula, i The starting index of the current path. L The total number of nodes in the ordered path; Minimum number of zones required to calculate the path The formula is:
[0030] In the formula, Indicates to The calculation result is rounded up, and the minimum number of container jumps is equal to the minimum number of zones. Consistent.
[0031] As a preferred scheme for IPv6 address segmentation coding device for segmented routing, in the coding packet module, the Len field in the container control field, which represents the number of partition nodes, is 8 bits and has a value range of [1, m], where m is the maximum number of nodes that each partition can accommodate; the Cursor field, which represents the number of forwarded nodes, is 8 bits, with an initial value of 0 and a value range of [0, Len]; and the Integrity field for information integrity verification adopts the CRC-16 verification method.
[0032] As a preferred embodiment of the IPv6 address segmentation encoding device for segmented routing, the Segment List filling order in the encoding packet assembly module is as follows: In the formula, For the corresponding partition The completed 128-bit container, K This represents the total number of partitions after path segmentation, enabling forwarding nodes to read path information within containers in path order.
[0033] As a preferred embodiment of the IPv6 address segmentation coding device for segmented routing, the formula for calculating the bit offset off in the packet forwarding module is:
[0034] In the formula, Cursor This represents the number of nodes that have forwarded the message within the container. Based on this offset value, the next b bits are extracted from the NodeID Bits bit string. After converting the next b bits into a decimal number, the target node identifier is obtained.
[0035] As a preferred solution for an IPv6 address segmentation coding device for segmented routing, in the packet forwarding module, when the integrity verification of information within a container fails, the forwarding node, in addition to discarding the packet, also records alarm information including the verification failure time, the corresponding container identifier, and the verification failure type.
[0036] Thirdly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the segmented IPv6 address segmentation coding method of the first aspect or any possible implementation thereof.
[0037] Fourthly, the present invention provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform steps in the segmented routing-oriented IPv6 address segmentation coding method of the first aspect or any possible implementation thereof.
[0038] The beneficial effects of the technical solution provided by this invention are as follows: First, by using path partitioning and containerized transport, the number of coding units in the SRH is reduced, avoiding header overhead from squeezing the effective payload and improving data transmission efficiency. It eliminates the need for hop-by-hop parsing of complex 128-bit SIDs, simplifying the protocol processing flow, and is particularly suitable for terminal equipment with limited computing power, such as those in power distribution stations and substations. Partitioning according to the "boundary priority" rule ensures independent coding logic for different domains, resolving SRH function compatibility issues for multi-vendor equipment. In case of a fault, only the faulty partition container needs to be reconstructed, minimizing the scope of reconstruction impact and reducing reconstruction overhead.
[0039] Second, it follows the SRv6 segmented routing header protocol specification without modifying the existing SRv6 control plane mechanism, while supporting flexible service chain orchestration and retaining the advantages of source routing. It adapts to network environments with different node sizes; all nodes only need to maintain a unified mapping table, eliminating the need for additional dedicated hardware or protocol stacks, thus offering strong versatility.
[0040] Third, it provides low-latency and low-jitter transmission guarantees for time-sensitive services such as PMU and protection signals, reducing the impact of faults on services and facilitating the implementation of scenarios such as source-network-load-storage collaborative control. It reduces link bandwidth usage, delays bandwidth expansion needs, alleviates equipment processing pressure, extends the lifespan of low-computing-power terminals, and lowers network construction and maintenance costs. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in this invention or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are merely embodiments of this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 A schematic diagram of the IPv6 address segmentation encoding method for segmented routing provided in an embodiment of the present invention; Figure 2 The schematic diagrams provided are specific implementation examples of the present invention and are not part of the invention itself, but are only used as auxiliary illustrations of the algorithm of the present invention. Figure 3 A diagram illustrating the path partitioning encoding message format based on SRH provided in this embodiment of the invention; Figure 4 A schematic diagram of the IPv6 address segmentation coding device architecture for segmented routing provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0044] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this invention should have the ordinary meaning understood by those skilled in the art to which this invention pertains. The terms "comprising" or "including," or similar words used in the embodiments of this invention, mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects.
[0045] With the deep integration of new power systems and enterprise digitalization, key sectors such as power grids and energy are placing stringent demands on production communication networks that are wide-area, multi-level, and multi-service-shared, requiring "deterministic transmission + high-reliability bearer." For example, time-sensitive services in power systems, such as protection signals, differential control, and synchronous phasor measurement (PMU), require end-to-end latency, jitter, and fault switching speeds accurate to the millisecond level. However, terminal equipment within substations and distribution-side nodes are generally limited by bandwidth resources and computing power, making it difficult to handle the complex protocol processing overhead. This contradiction between high service demands and low equipment capabilities is becoming increasingly prominent.
[0046] Segmented routing (SR) technology, with its core advantages of source path orchestration and flexible service chain scheduling, provides a unified technical framework for multi-domain collaboration, explicit route planning, and path verifiability, becoming a key candidate solution to resolve the aforementioned contradictions. Among them, IPv6-based segmented routing (SRv6) expresses the complete forwarding path by carrying a list of segment identifiers (SIDs) in the IPv6 extension header, without relying on routing protocol convergence at intermediate nodes, theoretically meeting the low-latency requirements of time-sensitive services. However, in engineering implementation, the SRv6 segmented route header (SRH) faces a significant bottleneck: as the path hop count increases, the accumulation of each 128-bit SID leads to a rapid expansion of the SRH length, directly causing three major problems: First, the effective load is severely squeezed, and the transmission efficiency drops significantly. In private networks such as power grids, long-distance paths across provincial-regional-station levels generally contain 20-30 hops. The corresponding SRH needs to carry 20-30 128-bit SIDs, and the header overhead accounts for more than 50% of the total data packet length. Especially for small PMU data packets (usually only tens of bytes), the header overhead may far exceed the effective data, resulting in the ineffective occupation of link transmission resources.
[0047] Secondly, the increased burden on equipment parsing limits processing performance. The processors of terminals and distribution-side nodes within the station have limited computing power. Parsing the lengthy SRHs one by one with SIDs requires a large amount of computing resources, which can easily lead to increased packet forwarding latency, decreased small packet throughput, and even trigger equipment buffer overflow, affecting business continuity.
[0048] Third, fault reconstruction and cross-domain interoperability are highly complex. Power grids and other private networks often involve networking of equipment from multiple vendors. Different vendors have different standards for supporting SRH extension and compression functions, which makes protocol interoperability difficult in cross-domain scenarios. At the same time, the length of SRH means that when a fault occurs, path reconstruction needs to regenerate and distribute a large number of SIDs, which prolongs the fault recovery time and makes it difficult to meet the "zero impact of faults" requirement of time-sensitive services.
[0049] To alleviate the above problems, the industry has explored various SRH burden reduction methods, which can be mainly divided into three categories: First, shortening the SID length, such as using variable-length SIDs or local SID encoding, reduces header overhead by reducing the number of bits in a single SID. However, such methods are only effective in scenarios with a single domain and uniform encoding rules. When crossing domains, interoperability may fail due to incompatible encoding formats. Second, SRH compression optimization, such as techniques based on prefix aggregation and stateful compression, reduces the number of SIDs carried in packets by merging consecutive SIDs or relying on the state storage of intermediate nodes. However, this relies on state synchronization between nodes. In scenarios with frequent changes in service chains and dynamic adjustments to fault domains, synchronization overhead will offset the compression benefits. Third, path indexing, which maps the complete path to an index within a local domain and retrieves path information through index queries. However, existing solutions are mostly limited to the control plane or a single domain and have not formed a systematic solution that is universal, elastically scalable, and supports rapid fault rollback. They cannot adapt to complex network environments such as power grids that are cross-domain, heterogeneous, and time-sensitive.
[0050] It is evident that existing technologies struggle to simultaneously address the issues of SRH bloat, heavy parsing burden, difficulties in cross-domain interoperability, and high fault reconstruction overhead without compromising the flexibility of SRv6. Therefore, given the specific needs of critical sectors such as power grids, there is an urgent need for a segmented routing coding optimization scheme that balances header compression efficiency, ease of equipment processing, and cross-domain compatibility, providing technical support for the leap in network capabilities during the construction phase of new power systems. The following are the specific details of an embodiment of this invention.
[0051] See Figure 1 This invention provides an IPv6 address segmentation encoding method for segmented routing, comprising the following steps: S1, Node Identifier Allocation and Parameter Determination: Assign a unique node identifier to each forwarding node within the domain, calculate the bit width of the node identifier, and ensure that nodes within the domain maintain a consistent mapping relationship between node identifiers and IPv6 addresses; set the container segment budget bit count and the container control field budget bit count (containing cursor, length, and checksum information); determine the maximum number of nodes in each partition based on the container segment budget bit count and the container control field budget bit count, and mark boundary nodes for differences in intra-domain behavioral capabilities, cross-domain operations, and stateful service chains; S2, Path Partitioning: Input the ordered path composed of the node identifiers, the node identifier bit width determined in step S1, the container segment budget bit count, the maximum number of nodes in each partition, and the set of marked boundary nodes. According to the rules that the number of nodes in the partition does not exceed the maximum number of nodes, the partitioning is preferentially performed at the boundary nodes, and the path compression rate and network robustness are taken into account. S3, Intra-area coding and packet assembly: Construct a fixed-length container for each partition, set a container control field containing the number of partition nodes, the number of forwarded nodes, and integrity verification within the container, convert the node identifiers within the partition to binary and concatenate them into a bit string with a fixed bit width, fill the container into the segmented routing header list in a preset order, and set the remaining segment quantity parameter. S4, Packet Forwarding: The forwarding node verifies the integrity of the container information. If it fails, it discards the packet and issues an alarm. If the number of forwarded nodes is less than the number of partition nodes, it calculates the bit offset, extracts the target node identifier, looks up the corresponding IPv6 address through the mapping relationship, updates the number of forwarded nodes, and then forwards the packet. If the number of forwarded nodes is not less than the number of partition nodes, it decrements the remaining segment number parameter. If the remaining segment number parameter after decrementing is greater than 0, it switches to the next container and repeats the extraction and forwarding operation. If the remaining segment number parameter is equal to 0, the packet forwarding is completed.
[0052] In this embodiment, in step S1, the unique node identifier assigned to the forwarding node within the domain has a value range of [1, N], where N is the total number of forwarding nodes within the domain.
[0053] In step S1, the bit width of the node identifier is calculated as the minimum binary bit width b, and the formula is:
[0054] In the formula, Indicates to The calculation result is rounded up.
[0055] In step S1, the formula for determining the maximum number of nodes m in each partition based on the container segment budget bits and the container control field budget bits is as follows:
[0056] In the formula, B is the budget bits used by the container segment for encoding the node identifier sequence within the carrying area. Indicates to The calculation result is rounded down; and each container occupies a 128-bit segment identifier position in the segmented routing header, and the metadata overhead of the container is within the preset total header overhead threshold.
[0057] See Figure 2This embodiment is based on a new type of power system production communication network, covering a single-domain scale of 120 forwarding nodes, including provincial core, municipal aggregation, and substation access. These nodes include three cross-domain boundaries (province-municipal, municipal-substation, and substation-dedicated line) and stateful service chain nodes such as power business firewalls, intrusion detection, and time-sensitive gateways. The business path runs from the provincial dispatch center application cluster to a remote substation, carrying a composite stream of synchronization phasor measurement and control commands, and must traverse service chains such as "provincial firewall, provincial time-sensitive gateway, municipal intrusion detection, and substation security isolation" sequentially. To optimize system performance, the proposed segmented routing-oriented IPv6 address segmentation coding method is adopted. Through a mechanism of "path partitioning, fixed-length encoding of node identifiers within each zone, and hop-by-hop expansion of each zone container," the path is preferentially segmented at cross-domain and service chain boundaries, compressing the segmented routing header length, reducing small packet overhead and parsing pressure, while retaining segmented routing semantics and rapid reconstruction capabilities. This achieves deterministic transmission and high-reliability bearer capabilities in the power grid private network scenario.
[0058] Based on the above application scenario, the specific process in step S1 is as follows: S1.1 Node Unique Short Identifier Assignment; S1.1.1 Assigns a unique node identifier to each forwarding node within the domain, ranging from [1, 120], including: core domain: 1……40; city domain: 41……80; site domain: 81……120.
[0059] S1.1.2 Calculate the minimum bit width =7 bits, but considering alignment and expansion, the strategy is to take a bit width of b=8 bits; S1.1.3 generates a consistent "path dictionary" within the domain, with node identifiers and IPv6 addresses covering 120 mappings, and has been distributed to the entire network; see Table 1, which only lists nodes on the displayed service paths: Table 1 Nodes on the business path
[0060] Step S1.2, setting the bit budget for containers and regions; S1.2.1 Set the carrying budget bits B and control field budget H (including cursor, length, and checksum) for each "container segment": Control fields: Length Len = 8 bits, Cursor = 8 bits, Integrity = 16 bits, total H = 32 bits; since each container is fixed at 128 bits, the budget B = 128 - H = 96 bits is reserved for the fixed-length sequence of the node identifier within the area; S1.2.2 Determine the maximum number of nodes that each region can accommodate. Each node identifier occupies b=8 bits, therefore the upper limit for each region is... Each container segment occupies a 128-bit segment identifier slot; the control field is already included in this slot, satisfying the total header overhead threshold; S1.3 Behavioral Capabilities and Cross-Domain Boundary Constraints: Mark the differences in behavioral capabilities within the domain, the location of cross-domain boundaries, and the stateful service chain boundaries. The boundary nodes are: provincial time-sensitive gateway (node identifier 7, service chain anchor point), province-prefecture cross-domain boundary node (node identifier 41, boundary), prefecture-city intrusion detection (node identifier 45, service chain anchor point), prefecture-station cross-domain boundary node (node identifier 81, boundary), station-intra-station security isolation (node identifier 92, service chain anchor point), and station-dedicated line fault domain boundary node (node identifier 119, boundary). The output boundary node set is {7, 41, 45, 81, 92, 119}.
[0061] In this embodiment, step S2, path partitioning specifically includes: Initialize the starting index and number of partitions for the initial path; Set the starting point of the current partition, and determine the maximum candidate ending point of the current partition by combining the maximum number of nodes in the partition and the total number of nodes in the ordered path; Within the interval from the start of the current partition to the maximum candidate endpoint, if an index corresponding to a boundary node exists, the boundary node index closest to the maximum candidate endpoint is selected as the endpoint of the current partition; otherwise, the maximum candidate endpoint is used as the endpoint of the current partition. Generate the current partition and update the number of partitions and the starting index of the path. If the starting index of the path does not exceed the total number of nodes in the ordered path, repeat the partitioning process until all paths are partitioned and the partition sequence is output.
[0062] Among them, determining the largest candidate endpoint of the current partition. The method is as follows:
[0063] In the formula, i The starting index of the current path. L The total number of nodes in the ordered path; Minimum number of zones required to calculate the path The formula is:
[0064] In the formula, Indicates to The calculation result is rounded up, and the minimum number of container jumps is equal to the minimum number of zones. Consistent.
[0065] Specifically, based on the above application scenario, in step S2, the path partitioning algorithm is run to determine how to partition the path. The specific process is as follows: Step S2.1 Input and Target; Step S2.1.1 Input ordered path P = {n1=1, n2=2, n3=3, n4=4, n5=6, n6=5, n7=8, n8=9, n9=10, n 10 =7,n 11 =41,n 12 =42, n 13 =44, n 14 =43,n 15 =45, n 16 =46,n 17 =47, n 18 =49,n 19 =50, n 20 =81, n 21 =86, n 22 =87, n 23 =88, n 24 =90, n 25 =92, n 26 =93, n 27 =95, n 28 =96, n 29 =98, n 30 =119, n 31 =120}, path length L=31, path includes service chain anchor points: 10 (provincial time-sensitive gateway=7), 15 (city IDS=45), 25 (intra-site isolation=92), including cross-domain / fault domain boundary: index 11 (province-city=41), 20 (city-site=81), 30 (site-dedicated line=119). Other input parameters: width b=8, budget B=96, maximum limit per zone m=12, boundary index set {7, 41, 45, 81, 92, 119}; Step S2.1.2: Determine the target and divide the path into K consecutive regions Q = {Q1, Q2, ..., Q...} K The number of nodes in the region does not exceed 12. The partition is preferably performed at the boundary, and the result is as close to m=12 as possible while satisfying the robustness requirement. Step S2.2: Run the basic greedy partitioning algorithm; Step S2.2.1, Initialization: i=1, K=0; Step S2.2.2, loop: First district: Starting point s=1, maximum candidate endpoint t max =min(1+12-1,31)=12; Find the nearest boundary endpoint within the interval ([1, 12], and select the nearest boundary index t=11; Generate Q1={n1, ...,n 11}, update K=1, i=12; Second district: Starting point s=12, t max =min(12+12-1,31)=23; To find the boundary within the interval [12, 23], select the nearest boundary index t=20; Generate Q2={n 12 ,…,n 20}, update K=2, i=21; The third district: Starting point (s=21, t max =min(21+12-1,31)=31; Find the boundary within the interval [21, 31]: Select the nearest boundary index t=119; Generate Q3={n 21 ,…,n 30}, update K=3, i=31; Balance handling: i=31≤L, then generate Q4={n 31}, update K=4, i=32; End: i=32>L, loop terminates; Step S2.2.3: Output the partition sequence; Q1={n1,…,n 11 (11 jumps, to the province and service chain within the provincial-regional boundary) Q2={n 12 ,…,n 20 (9 jumps, from the city / prefecture to the station boundary) Q3={n 21 ,…,n 30 (10 hops, from the station's intra-domain to the station-dedicated line boundary) Q4={n 31 (1 hop, end / dedicated line) Statistics: K=4 Step S2.4, Calculation of minimum number of zones and minimum number of jumps: Maximum number of zones K min = =3, actual K=4. In order to satisfy the boundary priority partitioning (robustness and cross-domain constraints), a region of length one is generated at the end; therefore, the "container jump" number is 4.
[0066] In this embodiment, in step S3, within the container control field, the Len field, representing the number of partition nodes, is 8 bits with a value range of [1, m], where m is the maximum number of nodes that each partition can accommodate; the Cursor field, representing the number of forwarded nodes, is 8 bits with an initial value of 0 and a value range of [0, Len]; the Integrity field for information integrity verification uses CRC-16 verification. In step S3, the Segment List in the segmented routing header is filled in the following order: In the formula, For the corresponding partition The completed 128-bit container, K This represents the total number of partitions after path segmentation, enabling forwarding nodes to read path information within containers in path order. The message format is as follows: Figure 3 Each partition Q j Each container occupies one 128-bit SID slot in the SRH.
[0067] Specifically, based on the above application scenario, step S3 includes the following steps: S3.1 Set container control fields; Len:∣Q1∣=11,∣Q2∣=9,∣Q3∣=10,∣Q4∣=1; Cursor: Initializes to all zeros; Integrity: Calculates a 16-bit cyclic redundancy check for each of the "length, cursor, and bit string within the region" (example value); Container 1: CRC-16=0xA1B2; Container 2: CRC-16=0x7C39; Container 3: CRC-16=0x2F84; Container 4: CRC-16 = 0x1D07; Step S 3.2, bit string within the region; The bit width b=8; the bit string lengths for each region are 88, 72, 80, and 8 bits respectively (corresponding to 11×8, 9×8, 10×8, and 1×8). Container 1: 00000001 00000010 00000011 00000100 00000110 00000101 000010000001001 00001010 00000111 00101001; Container two: 00101010 00101100 00101011 00101101 00101110 00101111 0011000100110010 01010001; Container 3: 01010110 01010111 01011000 01011010 01011100 01011101 0101111101100000 01100010 01110111; Container 4: 01111000; Step S 3.3, Alignment and Fill; Container 1: Fill the remaining 96 - 88 = 8 bits with zeros; Container 2: Fill the remaining 24 bits with zeros; Container 3: Fill the remaining 16 bits with zeros; Container 4: Fill the remaining 88 bits with zeros; Step S 3.4, segmented route header filling; Segment List = [Container 4, Container 3, Container 2, Container 1]; SegmentsLeft = 4, LastEntry = 3, HdrExtLen is calculated using 4×128 bits.
[0068] In this embodiment, the formula for calculating the bit offset off in step S4 is:
[0069] In the formula, Cursor The number of forwarded nodes within the container is given. Based on this offset value, the next b bits are extracted from the NodeID Bits bit string. These b bits are then converted to decimal to obtain the target node identifier. In step S4, when the information integrity check within the container fails, the forwarding node, in addition to discarding the data packet, also records alarm information including the check failure time, the corresponding container identifier, and the check failure type.
[0070] Specifically, based on the above application scenario, step S4 includes the following steps: Step S4.1, Capability and Integrity Check: The device identifies the containerized partition format, recalculates the CRC-16 checksum locally, and compares the integrity check results to confirm success. Step S4.2: Currently in container one, cursor Cursor=11=length Len, cross-container switching is required; Step S4.2.1: Reduce the remaining number of segments, SegmentsLeft = 4, to 3. Step S4.2.2: The latest SegmentsLeft > 0, switch to the next container (container two); Step S4.3, number retrieval and mapping within the area; Step S4.2.1, at this point, the cursor Cursor = 0 < length Len, continue; Step S4.2.2 Calculate the bit offset off = Cursor × b = 0; Step S4.2.3 Take the first 8 bits from the bit string in the area based on the off value and parse it into the target node identifier 42 (decimal). Step S4.2.4 Find the IPv6 address corresponding to the node identifier in the path dictionary, which is 2001:db8:2000::42; Step S4.2.5 Set the cursor Cursor = Cursor + 1 and write it back to the cursor field in the container; Step S4.2.6: Update the destination address / next hop based on the obtained IPv6 address and send the data packet; Following this process, containers two and three are consumed in sequence; when entering container four, there is only one hop, and after consumption, SegmentsLeft=0, and the path is completed.
[0071] Step S4.3: The entire node sequence in this area has been consumed; proceed with cross-container switching. Step S4.3.1: Set SegmentsLeft = SegmentsLeft - 1; Step S4.3.2, if SegmentsLeft > 0: SRH switches to the next container C. j+1 If the packet forwarding is complete, proceed to step S4.2; otherwise, the process ends.
[0072] In summary, compared with existing technologies, this invention reduces the number of coding units in the SRH by using "path partitioning + containerized transport," replacing the traditional "one 128-bit SID per hop" with "one 128-bit container per zone," thus avoiding header overhead squeezing the effective payload and improving data transmission efficiency. The forwarding nodes of this invention rely on "local Node-ID and IPv6 address mapping table + cursor hop-by-hop extraction," eliminating the need for hop-by-hop parsing of complex 128-bit SIDs, simplifying the protocol processing flow, and is particularly suitable for terminal devices with limited computing power, such as those in power distribution and substations. This invention partitions according to the "boundary priority" rule, making the coding logic of different domains independent and solving the compatibility problem of SRH functions for devices from multiple vendors; in case of failure, only the faulty partition container needs to be reconstructed, reducing the scope of reconstruction impact and lowering reconstruction overhead. This invention follows the SRv6 segmented routing header protocol specification by "controlling cross-container advancement with the remaining segment count and recording progress within the zone with a cursor," without modifying the existing SRv6 control plane mechanism, while also supporting flexible service chain orchestration and retaining the advantages of source routing. This invention can adapt to network environments with different node sizes by adjusting parameters such as Node-ID bit width and container budget. All nodes only need to maintain a unified mapping table, without the need for additional dedicated hardware or protocol stacks, making it highly versatile. This invention provides low-latency and low-jitter transmission guarantees for time-sensitive services such as PMUs and protection signals, reducing the impact of faults on services and facilitating the implementation of scenarios such as "source-network-load-storage" collaborative control. This invention reduces link bandwidth usage, delays bandwidth expansion needs, alleviates equipment processing pressure, extends the lifespan of low-computing-power terminals, and lowers network construction and maintenance costs.
[0073] It should be noted that the method of this embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this embodiment, and these devices will interact with each other to complete the IPv6 address segmentation coding method for segmented routing.
[0074] It should be noted that the above description describes some embodiments of the present invention. In some cases, the described actions or steps can be performed in a different order than that shown in the above embodiments and the desired result can still be achieved. Furthermore, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0075] See Figure 4 Based on the same inventive concept, corresponding to any of the above embodiments, this invention also provides an apparatus for an IPv6 address segmentation coding method for segmented routing, comprising: The node identification and parameter configuration module 100 is used to assign a unique node identifier to the forwarding node within the domain, calculate the bit width of the node identifier, and enable nodes within the domain to maintain a consistent mapping relationship between the node identifier and the IPv6 address; set the budget bit number of the container segment and the budget bit number of the container control field containing cursor, length, and check information; determine the maximum number of nodes in each partition based on the budget bit number of the container segment and the budget bit number of the container control field; and mark the boundary nodes of the domain's behavioral capability differences, cross-domain, and stateful service chains. The path partitioning module 200 is used to take into input an ordered path composed of the node identifiers, the determined bit width of the node identifiers, the budget bit count of the container segment, the maximum number of nodes in each partition, and the set of marked boundary nodes, and to divide the ordered path into multiple continuous partitions according to the rules that the number of nodes in the partition does not exceed the maximum number of nodes, the partitioning is preferentially performed at the boundary nodes, and the path compression rate and network robustness are taken into account. The encoding and packet assembly module 300 is used to construct a fixed-length container for each partition. The container contains a container control field that includes the number of partition nodes, the number of forwarded nodes, and integrity verification. The node identifiers in the partition are converted to binary and then concatenated into a bit string with a fixed bit width. The container is filled into the segment routing header list in a preset order, and the remaining segment quantity parameter is set. The packet forwarding module 400 is used to verify the integrity of container information by forwarding nodes. If the verification fails, the packet is discarded and an alarm is triggered. If the number of forwarded nodes is less than the number of partition nodes, the target node identifier is extracted after calculating the bit offset. The corresponding IPv6 address is looked up through the mapping relationship, the number of forwarded nodes is updated, and the packet is forwarded. If the number of forwarded nodes is not less than the number of partition nodes, the remaining segment number parameter is decremented. If the remaining segment number parameter after decrementing is greater than 0, the packet forwarding operation is repeated for the next container. If the remaining segment number parameter is equal to 0, the packet forwarding is completed.
[0076] In this embodiment, the unique node identifier assigned to the domain forwarding node in the node identifier and parameter configuration module 100 has a value range of [1, N], where N is the total number of domain forwarding nodes.
[0077] In this embodiment, in the node identifier and parameter configuration module 100, the bit width of the node identifier is calculated as the minimum binary bit width b, and the formula is:
[0078] In the formula, Indicates to The calculation result is rounded up.
[0079] In this embodiment, the formula for determining the maximum number of nodes m in each partition based on the container segment budget bits and the container control field budget bits in the node identification and parameter configuration module 100 is as follows:
[0080] In the formula, B is the budget bits used by the container segment for encoding the node identifier sequence within the carrying area. Indicates to The calculation result is rounded down; and each container occupies a 128-bit segment identifier position in the segmented routing header, and the metadata overhead of the container is within the preset total header overhead threshold.
[0081] In this embodiment, the path partitioning module 200 includes: The path partition initialization submodule 201 is used to initialize the starting index of the path and the number of partitions. The partition candidate endpoint determination submodule 202 is used to set the starting point of the current partition and determine the maximum candidate endpoint of the current partition by combining the maximum number of nodes in the partition and the total number of nodes in the ordered path. The partition endpoint selection submodule 203 is used to select the boundary node index closest to the maximum candidate endpoint as the endpoint of the current partition if there is an index corresponding to the boundary node within the interval from the start point of the current partition to the maximum candidate endpoint; otherwise, the maximum candidate endpoint is used as the endpoint of the current partition. The partition generation and iteration submodule 204 is used to generate the current partition and update the number of partitions and the starting index of the path. If the starting index of the path does not exceed the total number of nodes in the ordered path, the partitioning process is repeated until the partitioning of all paths is completed and the partition sequence is output.
[0082] Among them, determining the largest candidate endpoint of the current partition. The method is as follows:
[0083] In the formula, i The starting index of the current path. L The total number of nodes in the ordered path; Minimum number of zones required to calculate the path The formula is:
[0084] In the formula, Indicates to The calculation result is rounded up, and the minimum number of container jumps is equal to the minimum number of zones. Consistent.
[0085] In this embodiment, in the encoding packet module 300, the Len field, which represents the number of partition nodes, is 8 bits in the container control field, with a value range of [1, m], where m is the maximum number of nodes that each partition can accommodate; the Cursor field, which represents the number of forwarded nodes, is 8 bits, with an initial value of 0 and a value range of [0, Len]; and the Integrity field for information integrity verification adopts the CRC-16 verification method.
[0086] In this embodiment, the order in which the Segment List of the segment routing header is filled in the encoding packet assembly module 300 is as follows: In the formula, For the corresponding partition The completed 128-bit container, K This represents the total number of partitions after path segmentation, enabling forwarding nodes to read path information within containers in path order.
[0087] In this embodiment, the formula for calculating the bit offset off in the data packet forwarding module 400 is as follows:
[0088] In the formula, Cursor This represents the number of nodes that have forwarded the message within the container. Based on this offset value, the next b bits are extracted from the NodeID Bits bit string. After converting the next b bits into a decimal number, the target node identifier is obtained.
[0089] In this embodiment, when the integrity verification of information within a container fails in the data packet forwarding module 400, the forwarding node, in addition to discarding the data packet, also records alarm information including the verification failure time, the corresponding container identifier, and the verification failure type.
[0090] The apparatus of the above embodiments is used to implement a segmented routing-oriented IPv6 address segmentation coding method corresponding to any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0091] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements an IPv6 address segmentation coding method for segmented routing as described in any of the above embodiments.
[0092] Figure 5This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 510, a memory 520, an input / output interface 530, a communication interface 540, and a bus 550. The processor 510, memory 520, input / output interface 530, and communication interface 540 are interconnected internally via the bus 550.
[0093] The processor 510 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0094] The memory 520 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 520 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 520 and is called and executed by the processor 510.
[0095] Input / output interface 530 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.
[0096] The communication interface 540 is used to connect the communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0097] Bus 550 includes a pathway for transmitting information between various components of the device, such as processor 510, memory 520, input / output interface 530, and communication interface 540.
[0098] It should be noted that although the above-described device only shows the processor 510, memory 520, input / output interface 530, communication interface 540, and bus 550, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0099] The electronic devices described above are used to implement a segmented routing-oriented IPv6 address segmentation coding method corresponding to any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0100] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, the present invention also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute an IPv6 address segmentation coding method for segmented routing as described in any of the above embodiments.
[0101] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0102] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute an IPv6 address segmentation coding method for segmented routing as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0103] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention is limited to these examples; within the framework of the invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity.
[0104] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of the invention, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of the invention, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of the invention will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of the invention, it will be apparent to those skilled in the art that the embodiments of the invention may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0105] Although the invention has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAMDRAM) may be used with the embodiments discussed.
[0106] The embodiments of this invention are intended to cover all such substitutions, modifications, and variations falling within the scope of the claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this invention should be included within the scope of protection of this invention.
Claims
1. A method for IPv6 address segmentation coding for segmented routing, characterized in that, Includes the following steps: Step 1, Node Identifier Allocation and Parameter Determination: Assign a unique node identifier to each forwarding node within the domain, calculate the bit width of the node identifier, and ensure that nodes within the domain maintain a consistent mapping relationship between node identifiers and IPv6 addresses; set the container segment budget bit count and the container control field budget bit count (containing cursor, length, and checksum information); determine the maximum number of nodes per partition based on the container segment budget bit count and the container control field budget bit count, and mark boundary nodes for differences in intra-domain behavioral capabilities, cross-domain operations, and stateful service chains; Step 2, Path Partitioning: Input the ordered path composed of the node identifiers, the node identifier bit width determined in Step 1, the container segment budget bit count, the maximum number of nodes in each partition, and the set of marked boundary nodes. According to the rules that the number of nodes in a partition does not exceed the maximum number of nodes, the partitioning is preferentially performed at the boundary nodes, and the path compression rate and network robustness are taken into account, the ordered path is divided into multiple continuous partitions. Step 3, Intra-area encoding and packet assembly: Construct a fixed-length container for each partition, set a container control field containing the number of partition nodes, the number of forwarded nodes, and integrity verification within the container, convert the node identifiers within the partition to binary and concatenate them into a bit string with a fixed bit width, fill the container into the segmented routing header list in a preset order, and set the remaining segment quantity parameter. Step 4, Packet Forwarding: The forwarding node verifies the integrity of the container information. If it fails, it discards the packet and issues an alarm. If the number of forwarded nodes is less than the number of partition nodes, it calculates the bit offset, extracts the target node identifier, looks up the corresponding IPv6 address through the mapping relationship, updates the number of forwarded nodes, and then forwards the packet. If the number of forwarded nodes is not less than the number of partition nodes, it decrements the remaining segment number parameter. If the remaining segment number parameter after decrementing is greater than 0, it switches to the next container and repeats the extraction and forwarding operation. If the remaining segment number parameter is equal to 0, the packet forwarding is completed.
2. The IPv6 address segmentation coding method for segmented routing according to claim 1, characterized in that, In step 1, the unique node identifier assigned to the forwarding node within the domain has a value range of [1, N], where N is the total number of forwarding nodes within the domain; In step 1, the bit width of the node identifier is calculated as the minimum binary bit width b, using the following formula: ; In the formula, Indicates to The calculation result is rounded up; In step 1, the formula for determining the maximum number of nodes m in each partition based on the container segment budget bits and the container control field budget bits is as follows: ; In the formula, B is the budget bits used by the container segment for encoding the node identifier sequence within the carrying area. Indicates to The calculation result is rounded down; and each container occupies a 128-bit segment identifier position in the segmented routing header, and the metadata overhead of the container is within the preset total header overhead threshold.
3. The IPv6 address segmentation coding method for segmented routing according to claim 2, characterized in that, In step 2, path partitioning specifically includes: Initialize the starting index and number of partitions for the initial path; Set the starting point of the current partition, and determine the maximum candidate ending point of the current partition by combining the maximum number of nodes in the partition and the total number of nodes in the ordered path; Within the interval from the start of the current partition to the maximum candidate endpoint, if an index corresponding to a boundary node exists, the boundary node index closest to the maximum candidate endpoint is selected as the endpoint of the current partition; otherwise, the maximum candidate endpoint is used as the endpoint of the current partition. Generate the current partition and update the number of partitions and the starting index of the path. If the starting index of the path does not exceed the total number of nodes in the ordered path, repeat the partitioning process until all paths are partitioned and the partition sequence is output. Determine the largest candidate endpoint for the current partition The method is as follows: ; In the formula, i The starting index of the current path. L The total number of nodes in the ordered path; Minimum number of zones required to calculate the path The formula is: ; In the formula, Indicates to The calculation result is rounded up, and the minimum number of container jumps is equal to the minimum number of zones. Consistent.
4. The IPv6 address segmentation coding method for segmented routing according to claim 3, characterized in that, In step 3, within the container control field, the Len field, which represents the number of partition nodes, is 8 bits with a value range of [1, m], where m is the maximum number of nodes that each partition can accommodate; the Cursor field, which represents the number of forwarded nodes, is 8 bits with an initial value of 0 and a value range of [0, Len]; the Integrity field for information integrity verification uses CRC-16 verification. In step 3, the order in which the Segment List in the segmented routing header is filled is as follows: In the formula, For the corresponding partition The completed 128-bit container, K This represents the total number of partitions after path segmentation, enabling forwarding nodes to read path information within containers in path order.
5. The IPv6 address segmentation coding method for segmented routing according to claim 4, characterized in that, In step 4, the formula for calculating the bit offset off is: In the formula, Cursor This represents the number of nodes that have forwarded the message within the container. Based on this offset value, the next b bits are extracted from the NodeID Bits bit string. After converting the next b bits into a decimal number, the target node identifier is obtained. In step 4, when the integrity verification of information within the container fails, the forwarding node, in addition to discarding the data packet, also records alarm information including the verification failure time, the corresponding container identifier, and the verification failure type.
6. An apparatus for an IPv6 address segmentation coding method for segmented routing, characterized in that, include: The node identification and parameter configuration module is used to assign a unique node identifier to forwarding nodes within the domain, calculate the bit width of the node identifier, and ensure that nodes within the domain maintain a consistent mapping relationship between node identifiers and IPv6 addresses. It sets the budget bits for container segments and the budget bits for container control fields containing cursor, length, and check information. Based on the budget bits for container segments and the budget bits for container control fields, it determines the maximum number of nodes in each partition and marks boundary nodes with differences in behavior capabilities within the domain, cross-domain boundaries, and stateful service chains. The path partitioning module is used to take into input an ordered path composed of node identifiers, the determined bit width of the node identifiers, the budget bit count of the container segment, the maximum number of nodes in each partition, and the set of marked boundary nodes. The module divides the ordered path into multiple continuous partitions according to the rules that the number of nodes in a partition does not exceed the maximum number of nodes, the partitioning is preferentially performed at the boundary nodes, and the path compression rate and network robustness are taken into account. The encoding and packet assembly module is used to construct a fixed-length container for each partition. The container contains a container control field that includes the number of partition nodes, the number of forwarded nodes, and integrity verification. The node identifiers in the partition are converted to binary and then concatenated into a bit string with a fixed bit width. The container is filled into the segment routing header list in a preset order, and the remaining segment quantity parameter is set. The packet forwarding module is used to verify the integrity of container information at the forwarding node. If the verification fails, the packet is discarded and an alarm is triggered. If the number of forwarded nodes is less than the number of partition nodes, the target node identifier is extracted after calculating the bit offset. The corresponding IPv6 address is looked up through the mapping relationship, the number of forwarded nodes is updated, and the packet is forwarded. If the number of forwarded nodes is not less than the number of partition nodes, the remaining segment number parameter is decremented. If the remaining segment number parameter after decrementing is greater than 0, the packet forwarding operation is repeated for the next container. If the remaining segment number parameter is equal to 0, the packet forwarding is completed.
7. The IPv6 address segmentation coding device for segmented routing according to claim 6, characterized in that, In the node identifier and parameter configuration module, the unique node identifier assigned to the forwarding node within the domain has a value range of [1, N], where N is the total number of forwarding nodes within the domain; In the node identifier and parameter configuration module, the bit width of the node identifier is calculated as the minimum binary bit width b, using the following formula: In the formula, Indicates to The calculation result is rounded up; In the node identification and parameter configuration module, the formula for determining the maximum number of nodes m in each partition based on the container segment budget bits and the container control field budget bits is as follows: In the formula, B is the budget bits used by the container segment for encoding the node identifier sequence within the carrying area. Indicates to The calculation result is rounded down; and each container occupies a 128-bit segment identifier position in the segmented routing header, and the metadata overhead of the container is within the preset total header overhead threshold.
8. The IPv6 address segmentation coding device for segmented routing according to claim 7, characterized in that, The path partitioning module includes: The path partition initialization submodule is used to initialize the starting index and number of partitions for the path; The partition candidate endpoint determination submodule is used to set the starting point of the current partition and determine the maximum candidate endpoint of the current partition by combining the maximum number of nodes in the partition and the total number of nodes in the ordered path. The partition endpoint selection submodule is used to select the boundary node index closest to the maximum candidate endpoint as the endpoint of the current partition if there is an index corresponding to the boundary node within the interval from the start of the current partition to the maximum candidate endpoint; otherwise, the maximum candidate endpoint is used as the endpoint of the current partition. The partition generation and iteration submodule is used to generate the current partition and update the number of partitions and the starting index of the path. If the starting index of the path does not exceed the total number of nodes in the ordered path, the partitioning process is repeated until the partitioning of all paths is completed and the partition sequence is output. Determine the largest candidate endpoint for the current partition The method is as follows: In the formula, i The starting index of the current path. L The total number of nodes in the ordered path; Minimum number of zones required to calculate the path The formula is: In the formula, Indicates to The calculation result is rounded up, and the minimum number of container jumps is equal to the minimum number of zones. Consistent.
9. The IPv6 address segmentation coding device for segmented routing according to claim 8, characterized in that, In the encoding and packet assembly module, the Len field, which represents the number of partition nodes, is 8 bits in the container control field, with a value range of [1, m], where m is the maximum number of nodes that each partition can accommodate; the Cursor field, which represents the number of forwarded nodes, is 8 bits, with an initial value of 0 and a value range of [0, Len]; the Integrity field for information integrity verification uses CRC-16 verification. In the encoding packet assembly module, the Segment List of the segmented routing header is filled in the following order: In the formula, For the corresponding partition The completed 128-bit container, K This represents the total number of partitions after path segmentation, enabling forwarding nodes to read path information within containers in path order.
10. An IPv6 address segmentation coding device for segmented routing according to claim 9, characterized in that, In the packet forwarding module, the formula for calculating the bit offset off is: In the formula, Cursor This represents the number of nodes that have forwarded the message within the container. Based on this offset value, the next b bits are extracted from the NodeID Bits bit string. After converting the next b bits into a decimal number, the target node identifier is obtained. In the packet forwarding module, when the integrity verification of information within a container fails, the forwarding node, in addition to discarding the packet, also records alarm information including the verification failure time, the corresponding container identifier, and the verification failure type.
Citation Information
Patent Citations
Compressing segment identifiers for segment routing
CN115428412A
Method, apparatus and computer-readable medium for multicast communication in a containerized environment
US20230131043A1