Message PSP processing method, system and device and readable storage medium

By determining whether the G-SID of the SRv6 message is the second-to-last hop and performing PSP operations, the problem that G-SID cannot operate correctly in the SRv6 environment is solved, and network bandwidth utilization and device compatibility are improved.

CN119109853APending Publication Date: 2024-12-10SUZHOU CENTEC COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411271993.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

In the SRv6 environment, G-SID cannot perform PSP operations correctly because it cannot judge its location only by the SL value, resulting in large header overhead, low bandwidth utilization, and sharding or packet loss.

Method used

By obtaining the SL value and SI value corresponding to the G-SID of the message, it is determined whether the current G-SID is the second-last hop of the message, and performs PSP operation based on these values ​​to strip the SRH header.

Benefits of technology

It realizes high-precision PSP judgment logic based on the existing fields, solves the problem that G-SID cannot perform PSP stripping SRH heads normally, improves the adaptability and flexibility of PSP processing, and avoids device compatibility issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119109853A_ABST
    Figure CN119109853A_ABST
Patent Text Reader

Abstract

The invention discloses a message PSP processing method, system and device and a readable storage medium. The method specifically comprises the steps of obtaining an SL value and an SI value corresponding to a current G-SID of a message; based on the SL value and the SI value, judging whether the current G-SID is the penultimate hop of the message; and if yes, executing PSP operation on the message. Compared with the prior art, according to the message PSP processing method provided by the invention, the corresponding SRv6 message information can be obtained by analyzing the SID information of the message. And based on the combination of the information, whether the current SID is the last but one hop is accurately judged through a preset logic, so that the problem that the G-SID cannot normally execute PSP to strip the SRH head is solved. Meanwhile, in the technical scheme provided by the invention, any extension field is not newly added, and the existing conventional field is not modified, so that the problem in the aspect of equipment compatibility is effectively avoided, and the adaptability and flexibility of PSP processing are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of Ethernet switching chips, and in particular relates to a message PSP processing method, system, device and readable storage medium. Background Art

[0002] The development of cloud computing has brought new challenges to the WAN, requiring the traditional WAN to be transformed. SD-WAN (Software Defined WAN) is the core technology for reconstructing the WAN. Through automatic deployment, centralized control, intelligent scheduling and visualization, it accelerates network delivery, optimizes application experience, improves bandwidth utilization, simplifies network operation and maintenance, and meets the needs of cloud computing for the WAN.

[0003] In response to the problems of SRv6, such as large header overhead leading to low bandwidth utilization of network links, and the increased header length may cause the message size to exceed the MTU, resulting in fragmentation or packet loss, China Mobile and industry partners have proposed a new SRv6 header compression technology solution G-SRv6. This solution is compatible with standard SRv6, uses a fixed SID compression length, is compatible with the original address planning, supports smooth upgrades of existing networks, and is currently the industry-leading solution for operator networks. However, when performing PSP operations, G-SID cannot determine its own location only through SL. Therefore, a method is needed to solve the problem that G-SID cannot perform PSP operations correctly.

[0004] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention

[0005] The object of the present invention is to provide a message PSP processing method, system, device and readable storage medium, which can realize the judgment logic of PSP execution on the basis of existing fields, with high accuracy and strong adaptability.

[0006] In order to achieve the above object, a technical solution provided by a specific embodiment of the present invention is as follows:

[0007] In a first aspect, the present invention provides a message PSP processing method, which comprises:

[0008] Get the SL value and SI value corresponding to the current G-SID of the message;

[0009] Based on the SL value and the SI value, determining whether the current G-SID is the penultimate hop of the message;

[0010] If so, perform a PSP operation on the message.

[0011] In one or more implementations of the present invention, determining whether the current G-SID is the penultimate hop of the message includes:

[0012] If the SL value of the current G-SID is greater than 1, the current G-SID is not the penultimate hop.

[0013] In one or more implementations of the present invention, determining whether the current G-SID is the penultimate hop of the message further includes:

[0014] If the current G-SID does not carry the COC attribute and the SL value is 1, the current G-SID is the penultimate hop;

[0015] If the current G-SID does not carry the COC attribute and the SL value is 0, the current G-SID is not the penultimate hop.

[0016] In one or more implementations of the present invention, determining whether the current G-SID is the penultimate hop further includes:

[0017] If the current G-SID carries the COC attribute, and the SL value is 1 and the SI value is greater than 0, the current G-SID is not the penultimate hop.

[0018] In one or more implementations of the present invention, determining whether the current G-SID is the penultimate hop of the message further includes:

[0019] If the current G-SID carries the COC attribute, and the SL value is 1 and the SI value is 0, determine whether the storage location of the second G-SID in the next G-SID group has a value;

[0020] If yes, the current G-SID is not the penultimate hop of the message;

[0021] If not, the current G-SID is the penultimate hop of the message.

[0022] In one or more implementations of the present invention, determining whether the current G-SID is the penultimate hop of the message further includes:

[0023] If the current G-SID carries the COC attribute, and the SL value is 0 and the SI value is 1, determine whether the next G-SID storage location in the current G-SID group has a value;

[0024] If yes, the current G-SID is the penultimate hop of the message;

[0025] If not, the current G-SID is not the penultimate hop of the message.

[0026] In one or more implementations of the present invention, determining whether the current G-SID is the penultimate hop of the message further includes:

[0027] If the current G-SID carries the COC attribute, and the SL value is 0 and the SI value is greater than 1, determine whether the next two G-SID storage locations in the current G-SID group have values;

[0028] If the next G-SID storage position in the current G-SID group has a value and the second G-SID storage position has no value, the current G-SID is the penultimate hop of the message;

[0029] If the next G-SID storage position in the current G-SID group has no value or the second G-SID has a value, the current G-SID is not the penultimate hop of the message.

[0030] In one or more embodiments of the present invention, the method further comprises:

[0031] Traverse the current SID. If the current SID carries the COC attribute, the next SID to be processed is the G-SID.

[0032] If the current SID does not carry the COC attribute, the next SID to be processed is a standard SID.

[0033] In one or more embodiments of the present invention, the method further comprises:

[0034] Traverse the current SID and obtain the length of the current SID;

[0035] If the SID contains a preset common prefix and the length of the SID is equal to the preset segment length threshold, the SID is a standard SID;

[0036] If the SID does not contain a preset common prefix and the length of the SID is less than a preset segment length threshold, the SID is a G-SID.

[0037] In one or more embodiments of the present invention, the method further comprises:

[0038] If the current SID is a standard SID with COC attributes and the SL value is 1, determine whether the storage locations of the first two G-SIDs in the next G-SID group have values;

[0039] If the first SID storage position in the next G-SID group has a value and the second SID storage position has no value, the current SID is the penultimate hop of the message;

[0040] If the first SID storage location in the next G-SID group has no value or the second SID has a value, the current SID is not the penultimate hop of the message.

[0041] In one or more embodiments of the present invention, the method further comprises:

[0042] If the current SID is a standard SID without the COC attribute and the SL value is 1, the current SID is the penultimate hop of the message;

[0043] If the SL value of the current standard SID is 0, the current SID is not the penultimate hop of the message.

[0044] In a second aspect, the present invention provides a message PSP processing system, comprising:

[0045] An acquisition module is used to obtain the SL value and SI value corresponding to the current G-SID of the message;

[0046] A judging module, configured to judge whether a current G-SID is the penultimate hop of the message based on the SL value and the SI value;

[0047] The processing module is configured to perform a PSP operation on the message when the current G-SID is the penultimate hop of the message.

[0048] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the message PSP processing method by executing the computer instructions.

[0049] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the message PSP processing method.

[0050] Compared with the prior art, the message PSP processing method provided by the present invention can obtain the corresponding SRv6 message information by parsing the SID information of the message. Based on the combination of information, the preset logic is used to accurately determine whether the current SID is the penultimate hop, thereby solving the problem that the G-SID cannot normally execute PSP to strip the SRH header. At the same time, in the technical solution provided by the present invention, no extension fields are added, and the existing conventional fields are not modified, which effectively avoids equipment compatibility issues and improves the adaptability and flexibility of PSP processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0052] Figure 1 is a schematic diagram of a G-SID and a standard SID in one embodiment of the present invention;

[0053] Figure 2 It is a flow chart of a method for processing a message PSP in one embodiment of the present invention;

[0054] Figure 3 It is a structural block diagram of a message PSP processing system in one embodiment of the present invention;

[0055] Figure 4 It is a structural block diagram of an electronic device in one embodiment of the present invention. DETAILED DESCRIPTION

[0056] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific implementation modes.

[0057] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.

[0058] In order to facilitate understanding of the technical solutions of the present application, the technical terms that may appear in the present invention are first explained in detail below.

[0059] SID (Segment Identifier): The identifier of the node executing the command on the ingress message. Segment routing defines the destination address prefix / node and adjacency in the network as segments, and assigns segment identifiers to these destination address prefix / node and adjacency. The segment identifier is equivalent to the MPLS label in the traditional MPLS technology, which is mapped to the MPLS label at the forwarding level to identify the unique segment.

[0060] G-SID (Generalized Segment Identifier): G-SRv6 achieves compression by removing redundant information from the Segment List and only carrying the changed Node ID and Function ID. During the forwarding process, G-SRv6 only needs to update the changed Node ID and Function ID to the corresponding part of the IPv6 destination address to generate a new IPv6 destination address. This is the basic idea of ​​G-SRv6 compression. In the G-SRv6 solution provided by the present invention, G-SID is used to directly refer to the compressed SID.

[0061] When the SL value is 1, the current G-SID may be the second to last, third, fourth, or fifth node depending on the SI value, and additional logic is required to make a judgment. When it is uncertain whether there are 4 G-SIDs in the G-SID group, there are more possibilities.

[0062] Specifically, there is a method for implementing PSP processing based on the SRv6 header compression technical solution in the prior art, which specifically includes: First, when performing global planning of segment routing, pre-confirm the forwarding path and the processing method of the node at each forwarding node. The administrator confirms the information of the penultimate hop, and when deploying the above-mentioned manually determined penultimate hop node, the SRH header stripping action is enforced, so that the PSP processing operation can be performed normally in the mixed deployment scenario of G-SID and standard SID.

[0063] However, since the same node may be in multiple different SRv6 domains at the same time, SIDs are reused, that is, the same SID needs to be processed differently according to the different values ​​of its node information. In this case, a message at a certain node is expected to be matched with the SID and then be replaced and forwarded normally. If the node is configured with mandatory PSP in another SRv6 domain during node deployment, the message expected to be replaced and forwarded will be stripped of the SRH header, which seriously affects the forwarding of subsequent nodes.

[0064] In another solution, a new message field can be defined in the message, and one or more bytes in the message IPDA can be used to identify whether the current SID is the penultimate hop of the current message in the corresponding forwarding path. In this way, PSP operations can be performed in a targeted manner. However, since this solution requires the addition of a new message field and the processing logic for the field, this technical solution will inevitably cause other devices to be incompatible, thereby affecting normal forwarding.

[0065] The inventor of the present invention discovered the main shortcomings of the prior art, and based on the shortcomings of the prior art, proposed a new technical implementation idea: obtain the general information fields corresponding to different SIDs under SRv6, specifically including: SL field, COC field, SI field, etc. Based on a comprehensive analysis of the values ​​of the above general information, the number of SIDs that need to be processed after the current SID can be estimated. Based on this, when the number of SIDs that need to be processed later is 1, corresponding to the penultimate hop of the present invention, PSP processing is performed to strip the SRH message header.

[0066] Please refer to Figure 2 FIG. 1 is a flow chart of a method for processing a message PSP in accordance with an embodiment of the present invention. The method for processing a message PSP specifically comprises the following steps:

[0067] S201: Obtain the SL value and SI value corresponding to the current G-SID of the message;

[0068] It should be noted that SL (Segments Left) means the number of remaining unprocessed segments, which is used to indicate the number of remaining unprocessed segments after the current SID. Each of the segments may be a standard SID or a G-SID group consisting of multiple G-SIDs.

[0069] It should also be noted that the embodiments of the present invention are applied to segment routing, which is a technical solution that only needs to add a series of segment identifiers to the message at the node loaded by the explicit path to guide the message forwarding. The basic concept of segment routing is to divide the network into different segments, and then splice them together to form a corresponding forwarding path, and then forward the message along the specified path.

[0070] Furthermore, SRv6 (Segment Routing IPv6, segment routing based on IPv6 forwarding plane) is a new generation of IP bearer protocol, which realizes network programmability through flexible IPv6 extension header. Segment routing based on IPv6 forwarding plane simplifies the network protocol type, has good scalability and programmability, can meet the diversified needs of more new services, provide high reliability, and has good application prospects in cloud services.

[0071] In an exemplary embodiment of the present invention, the message PSP processing method further includes: determining whether the next SID to be processed adjacent to the current SID is a G-SID.

[0072] Specifically, the current SID is traversed. If the current SID carries the COC attribute, the next adjacent SID to be processed is the G-SID; if the current SID does not carry the COC attribute, the next adjacent SID to be processed is the standard SID.

[0073] Among them, COC (Continue of Compression) is a characteristic parameter defined by G-SRv6. It is introduced to be compatible with ordinary SIDs in G-SRv6, and is used to indicate that the next SID to be processed is G-SID. In a specific embodiment, when a node processes a SID carrying the COC feature, it means that the next 32-bit G-SID in the Segment List needs to be updated to the destination address field, that is, the next SID to be processed is G-SID.

[0074] On the other hand, it is understandable that in the embodiment of the present invention, in addition to the first SID processed during message transmission, whether the current SID is a G-SID can also be determined based on whether the previous SID carries the COC attribute.

[0075] It should be noted that G-SRv6 reduces the overhead of the SRv6 message header by compressing the SRv6 SID and encapsulating a shorter SRv6 SID (G-SID) in the Segment List of the SRH, thereby improving the forwarding efficiency of the SRv6 message. When deploying SRv6, an address block is usually planned for the allocation of SRv6 SIDs. This address block is called the SID Space. In an SRv6 domain, SRv6 SIDs are allocated from the SID Space and have the same prefix (i.e., the common prefix CommonPrefix). Therefore, the common prefix of the SRv6 SID in the Segment List is redundant information. G-SRv6 removes the Common Prefix of the SRv6 SID in the Segment List and only carries the variable part of the SRv6 SID, i.e., the compressed SID (G-SID), which can effectively reduce the overhead of the SRv6 message header. During the message forwarding process, when the destination address of the message is replaced according to the Segment List in the SRH header, the G-SID and the Common Prefix are concatenated to form a new destination address, and the table is looked up and forwarded again.

[0076] Based on the above-mentioned distinguishing features between G-SID and SID, in another exemplary embodiment provided by the present invention, determining whether the current SID is a G-SID further includes: traversing the current SID and obtaining the length of the current SID; if the SID contains a preset common prefix and the length of the SID is equal to a preset segment length threshold, the SID is a standard SID; if the SID contains no preset common prefix and the length of the SID is less than a preset segment length threshold, the SID is a G-SID.

[0077] Since redundant fields are removed, G-SID is usually shorter than SID. However, depending on the actual usage scenario, it is not ruled out that some G-SIDs will encapsulate other additional field information that plays a specific function in other specific scenarios. Therefore, it is not possible to accurately determine whether the current SID is a G-SID based solely on the length. Since the common prefix is ​​redundant information, it is usually removed when the segment identifier is compressed. Therefore, in the present invention, it is necessary to further traverse the SID to determine whether there is a preset common prefix. The common prefix is ​​combined with the SID length for comprehensive analysis to obtain a more accurate judgment result.

[0078] It should also be noted that SI (Segment ID Index) means segment index number. When generating compressed SID, space must be reserved for SI. During forwarding, the SI field in the destination address is meaningful only when the SID in the destination address field is a compressible SID. SI indicates the position of the G-SID in the G-SID group. Figure 1 The figure shows a schematic diagram of G-SID and standard SID in a specific embodiment of the present invention. In the SID of the 128-bit IPv6 address, four 32-bit G-SIDs are preset. When SI=3, the lowest 32-bit value of the G-SID group is located; when SI=0, the highest 32-bit value of the G-SID group is located.

[0079] S202: Based on the SL value and the SI value, determine whether the current G-SID is the penultimate hop of the message;

[0080] In an exemplary embodiment of the present invention, determining whether the current G-SID is the penultimate hop of the message includes: if the SL value of the current G-SID is greater than 1, then the current G-SID is not the penultimate hop.

[0081] It can be understood that the SL value is used to identify the number of segments to be processed later, and there is at least one SID to be processed in each segment. When the SL value is greater than 1, the SL value can only be a positive integer due to its own properties. Therefore, the minimum SL value is 2, that is, the number of segments to be processed later is at least 2, and further, the number of SIDs to be processed later is at least two. Therefore, the current SID cannot be the second to last hop.

[0082] In an exemplary embodiment of the present invention, if the current G-SID does not carry the COC attribute and the SL value is 1, the current G-SID is the penultimate hop; if the current G-SID does not carry the COC attribute and the SL value is 0, the current G-SID is not the penultimate hop.

[0083] Specifically, the current G-SID does not carry the COC attribute, which means that the next SID to be processed is not a G-SID, and the current G-SID must be the highest-order G-SID in the current G-SID group. On the one hand, the next SID to be processed can be a standard SID; on the other hand, the current SID may be the last hop. Under the premise that the current G-SID does not carry the COC attribute, if the SL value is 1, it means that there is a segment to be processed, so the SID to be processed is a standard SID, and the current SID is the second-to-last hop; if the SL value is 0, it means that the current segment is the last segment to be processed. Since the current SID is a G-SID, there cannot be other standard SIDs in this segment, and the current SID can only be the last hop.

[0084] In an exemplary embodiment of the present invention, if the current G-SID carries the COC attribute, and the SL value is 1, and the SI value is greater than 0, then the current G-SID is not the penultimate hop.

[0085] It should be noted that there is at least one G-SID in the G-SID group, and it is stored in order from low to high. For example, if there is only one G-SID stored in the G-SID group, the SI value of the G-SID must be 3, and if there are only two G-SIDs stored in the G-SID group, the SI values ​​of the G-SID must be 3 and 2.

[0086] It is understandable that the order of forwarding G-SID values ​​is the same as that of ordinary SIDs, which are forwarded in reverse order. Therefore, in each G-SID group, the first G-SID to be obtained is the G-SID with SI 3, followed by the G-SID with SI 2, and so on. Combined with the above reasons, when the current G-SID group has only one G-SID, in order to be able to directly obtain it during processing, the SI value of the G-SID should be 3.

[0087] The COC attribute indicates that the next SID to be processed is a G-SID. On the one hand, the current G-SID may be the highest G-SID in the current G-SID group, and the next segment is also a G-SID group storing one or more G-SIDs. On the other hand, the current G-SID may be a non-highest G-SID in this segment, and there may be higher-order G-SIDs in the same group after it.

[0088] Furthermore, when the SL value is 1, it indicates that the G-SID group where the current G-SID is located is not the last segment. When the SI value is greater than 0, it indicates that the current G-SID is not in the highest position of the current G-SID group, and the next G-SID will not leave the last position of the group empty and will be stored in the G-SID group corresponding to the last segment, and the last segment will not be a null value, so it indicates that there are at least two SIDs behind the current G-SID, that is, the current one is at least the third hop from the bottom.

[0089] In an exemplary embodiment of the present invention, if the current G-SID carries the COC attribute, and the SL value is 1 and the SI value is 0, it is determined whether the storage location of the second G-SID in the next G-SID group has a value; if so, the current G-SID is not the penultimate hop of the message; if not, the current G-SID is the penultimate hop of the message.

[0090] The current G-SID carries the COC attribute, indicating that the next SID to be processed is G-SID, and the SI value is 0, indicating that the current G-SID is the highest-order SID in the current G-SID group, that is, the current G-SID is at the last position of this G-SID group, and because the next SID is G-SID, the last segment is also a G-SID group. At this time, according to the parsed message information, you can directly read whether the second G-SID storage location below has a value. If there is a value, it means that the current G-SID is at least the third-to-last hop; if there is no value, it is determined that the current G-SID is the second-to-last hop.

[0091] In an exemplary embodiment of the present invention, if the current G-SID carries the COC attribute, and the SL value is 0 and the SI value is 1, it is determined whether the next G-SID storage position in the current G-SID group has a value; if so, the current G-SID is the penultimate hop of the message; if not, the current G-SID is not the penultimate hop of the message.

[0092] It can be understood that the SL value of 0 means that the G-SID group to which the current G-SID belongs is the last segment to be processed. At the same time, the SI value of the G-SID currently being processed is 1. As long as the G-SID with an SI value of 0 has a value, the corresponding G-SID currently being processed is the penultimate hop. Otherwise, the G-SID without a value is not processed, and the G-SID currently being processed is the last hop.

[0093] In an exemplary embodiment of the present invention, if the current G-SID carries the COC attribute, and the SL value is 0, and the SI value is greater than 1, it is determined whether the next two G-SID storage positions in the current G-SID group have values; if the next G-SID storage position in the current G-SID group has a value and the second G-SID storage position has no value, the current G-SID is the penultimate hop of the message; if the next G-SID storage position in the current G-SID group has no value or the second G-SID has a value, the current G-SID is not the penultimate hop of the message.

[0094] Similar to the previous embodiment, when the SI value is greater than 1, as long as the number of G-SIDs with higher bits and values ​​than the currently processed G-SID in the same group is 1, the currently processed G-SID will be the penultimate hop of the message. Due to the storage logic of the G-SID group, there will not be a situation in the same group where two G-SIDs with values ​​are separated by a G-SID without value. Therefore, when the current G-SID carries the COC attribute, and the SL value is 0, and the SI value is greater than 1, it is sufficient to determine whether the next two adjacent G-SID storage locations have values. If the next G-SID storage location has no value, the current SID is the last hop; if the subsequent second G-SID has a value, the current G-SID is at least the third-to-last hop; only when the next adjacent G-SID has a value and the second G-SID has no value, the currently processed G-SID will be the penultimate hop.

[0095] S203: If the current G-SID is the penultimate hop of the message, perform a PSP operation on the message.

[0096] It should be noted that the PSP (Penultimate Segment POP of the SRH) operation refers to the SRH removal operation performed by the penultimate end. This function is used to perform the SRH stripping operation when the SID is the penultimate hop. Its function is similar to the penultimate hop popping PHP (Penultimate Hop Popping) in the MPLS forwarding mechanism, which can improve forwarding efficiency. Therefore, based on the above judgment logic, when it is judged that the current is the penultimate hop, the PSP operation can be performed.

[0097] It should also be noted that, since the decision logic for executing the PSP operation in the embodiment of the present invention is based on whether the corresponding message is the penultimate hop of forwarding in the segment routing, even if the current node is in a different SRv6 domain, it will not affect the overall transmission process of the message.

[0098] Furthermore, since the G-SRv6 environment is compatible with both G-SID and standard SID, the message PSP processing method provided by the present invention also includes: if the current SID is a standard SID carrying the COC attribute and the SL value is 1, then determining whether the storage positions of the first two SIDs in the next segment have values; if the first SID storage position of the next segment has a value and the second SID storage position has no value, then the current SID is the penultimate hop of the message; if the first SID storage position of the next segment has no value or the second SID has a value, then the current SID is not the penultimate hop of the message.

[0099] Since the current SID is a standard SID and carries the COC attribute, it can be determined that the next adjacent segment must be a G-SID group. When the SL value is 1, it indicates that the G-SID group of the next segment is the last segment. When there is only one G-SID with a value in the G-SID group, the standard SID currently being processed is the second-to-last hop of the message. When the SL value is 0, the current segment is the last segment, and the standard SID currently being processed is the last hop; when the SL value is greater than 1, there is at least one SID with a value to be processed in the remaining segments, so the standard SID currently being processed is at least the third-to-last hop. Therefore, when the SID currently being processed is a standard SID and the SL value is not 1, the standard SID currently being processed must not be the second-to-last hop.

[0100] On the other hand, it can be understood that, similar to the prior art, PSP processing is performed in an SRv6 environment. When the current SID is a standard SID that does not carry the COC attribute and the SL value is 1, the current SID is the penultimate hop of the message; if the current SID has an SL value of 0, the current SID is not the penultimate hop of the message.

[0101] Please refer to Figure 3 As shown, based on the same inventive concept as the aforementioned message PSP processing method, an embodiment of the present invention provides a message PSP processing system 300 , which includes: an acquisition module 301 , a determination module 302 and a processing module 303 .

[0102] Specifically, the acquisition module 301 is used to obtain the SL value and SI value corresponding to the current G-SID of the message; the judgment module 302 is used to judge whether the current G-SID is the penultimate hop of the message based on the SL value and the SI value; the processing module 303 is used to perform a PSP operation on the message when the current G-SID is the penultimate hop of the message.

[0103] Please refer to Figure 4 As shown, an embodiment of the present invention further provides an electronic device 400, which includes at least one processor 401, a memory 402 (such as a non-volatile memory), a memory 403, and a communication interface 404, and the at least one processor 401, the memory 402, the memory 403, and the communication interface 404 are connected together via a bus 405. At least one processor 401 is used to call at least one program instruction stored or encoded in the memory 402, so that the at least one processor 401 performs various operations and functions of the message PSP processing method described in various embodiments of this specification.

[0104] In an embodiment of the present specification, the electronic device 400 may include, but is not limited to, a personal computer, a server computer, a workstation, a desktop computer, a laptop computer, a notebook computer, a mobile electronic device, a smart phone, a tablet computer, a cellular phone, a personal digital assistant (PDA), a handheld device, a messaging device, a wearable electronic device, a consumer electronic device, and the like.

[0105] An embodiment of the present invention further provides a computer-readable medium carrying computer-executable instructions. When the computer-executable instructions are executed by a processor, they can be used to implement various operations and functions of the message PSP processing method described in various embodiments of this specification.

[0106] The computer-readable medium in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.

[0107] In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0108] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0109] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatuses, systems, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0110] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.

Claims

1. A message PSP processing method, characterized in that: include: Get the SL value and SI value corresponding to the current G-SID of the message; Based on the SL value and the SI value, determining whether the current G-SID is the penultimate hop of the message; If so, perform a PSP operation on the message.

2. The message PSP processing method according to claim 1, characterized in that: Determining whether the current G-SID is the penultimate hop of the message includes: If the SL value of the current G-SID is greater than 1, the current G-SID is not the penultimate hop.

3. The message PSP processing method according to claim 1, characterized in that: Determining whether the current G-SID is the penultimate hop of the message further includes: If the current G-SID does not carry the COC attribute and the SL value is 1, the current G-SID is the penultimate hop; If the current G-SID does not carry the COC attribute and the SL value is 0, the current G-SID is not the penultimate hop.

4. The message PSP processing method according to claim 1, characterized in that: Determining whether the current G-SID is the penultimate hop also includes: If the current G-SID carries the COC attribute, and the SL value is 1 and the SI value is greater than 0, the current G-SID is not the penultimate hop.

5. The message PSP processing method according to claim 1, characterized in that: Determining whether the current G-SID is the penultimate hop of the message further includes: If the current G-SID carries the COC attribute, and the SL value is 1 and the SI value is 0, determine whether the storage location of the second G-SID in the next G-SID group has a value; If yes, the current G-SID is not the penultimate hop of the message; If not, the current G-SID is the penultimate hop of the message.

6. The message PSP processing method according to claim 1, characterized in that: Determining whether the current G-SID is the penultimate hop of the message further includes: If the current G-SID carries the COC attribute, and the SL value is 0 and the SI value is 1, determine whether the next G-SID storage location in the current G-SID group has a value; If yes, the current G-SID is the penultimate hop of the message; If not, the current G-SID is not the penultimate hop of the message.

7. The message PSP processing method according to claim 1, characterized in that: Determining whether the current G-SID is the penultimate hop of the message further includes: If the current G-SID carries the COC attribute, and the SL value is 0 and the SI value is greater than 1, determine whether the next two G-SID storage locations in the current G-SID group have values; If the next G-SID storage position in the current G-SID group has a value and the second G-SID storage position has no value, the current G-SID is the penultimate hop of the message; If the next G-SID storage position in the current G-SID group has no value or the second G-SID has a value, the current G-SID is not the penultimate hop of the message.

8. The message PSP processing method according to claim 1, characterized in that: The method further comprises: Traverse the current SID. If the current SID carries the COC attribute, the next SID to be processed is the G-SID. If the current SID does not carry the COC attribute, the next SID to be processed is a standard SID.

9. The message PSP processing method according to claim 1, characterized in that: The method further comprises: Traverse the current SID and obtain the length of the current SID; If the SID contains a preset common prefix and the length of the SID is equal to the preset segment length threshold, the SID is a standard SID; If the SID does not contain a preset common prefix and the length of the SID is less than a preset segment length threshold, the SID is a G-SID.

10. The message PSP processing method according to claim 1, characterized in that: The method further comprises: If the current SID is a standard SID with COC attributes and the SL value is 1, determine whether the storage locations of the first two G-SIDs in the next G-SID group have values; If the first SID storage position in the next G-SID group has a value and the second SID storage position has no value, the current SID is the penultimate hop of the message; If the first SID storage location in the next G-SID group has no value or the second SID has a value, the current SID is not the penultimate hop of the message.

11. The message PSP processing method according to claim 10, characterized in that: The method further comprises: If the current SID is a standard SID without the COC attribute and the SL value is 1, the current SID is the penultimate hop of the message; If the SL value of the current standard SID is 0, the current SID is not the penultimate hop of the message.

12. A message PSP processing system, characterized in that: include: An acquisition module is used to obtain the SL value and SI value corresponding to the current G-SID of the message; A judging module, configured to judge whether a current G-SID is the penultimate hop of the message based on the SL value and the SI value; The processing module is configured to perform a PSP operation on the message when the current G-SID is the penultimate hop of the message.

13. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the message PSP processing method according to any one of claims 1 to 11 by executing the computer instructions.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the message PSP processing method according to any one of claims 1 to 11.