A message forwarding method, device and electronic equipment

By selecting paths that meet the target quality conditions and forwarding service packets in the SRv6 TE Policy, the problem of service quality being affected by the deterioration of forwarding path quality is solved, and higher service quality is achieved.

CN120768835BActive Publication Date: 2026-06-23NEW H3C TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2024-03-28
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In existing technologies, the degradation of the forwarding path quality of SRv6 TE Policy can affect the service quality of service packets and fail to meet the requirements of the service level agreement.

Method used

After receiving service packets, the system obtains the target service attributes and destination address that match the flow characteristics, selects the SRv6 TE Policy that meets the target quality conditions, and uses this path to forward service packets, ensuring that the selected path has the highest link priority and meets the quality requirements.

Benefits of technology

This effectively avoids the use of poor-quality forwarding paths, improves the quality of business services, and meets the business's requirements for service level agreements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120768835B_ABST
    Figure CN120768835B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a message forwarding method and device and electronic equipment, and relate to the technical field of communication. The method comprises: receiving a service message, the service message comprising a destination address and a flow characteristic; obtaining a target service attribute matched with the flow characteristic, and obtaining at least one intelligent policy routing IPR template matched with the destination address; selecting a target IPR template matched with the target service attribute from the at least one IPR template, and obtaining a target quality condition of the target IPR template; selecting an SRv6TE Policy satisfying the target quality condition from the target IPR template, the SRv6TE Policy comprising a first candidate path; and forwarding the service message through the first candidate path; wherein each IPR template comprises a plurality of SRv6TE Policies having the same service attribute and a quality condition corresponding to the service attribute, and the plurality of SRv6TE Policies have different link priority, and the selected SRv6TE Policy has the highest link priority. The quality of the forwarding path can be avoided from deteriorating to affect the quality of service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a message forwarding method, apparatus and electronic device. Background Technology

[0002] The Internet Protocol Version 6 Segment Routing Traffic Engineering Policy (SRv6TE Policy) is a new tunneling redirection technique developed based on Internet Protocol Version 6 Segment Routing (SRv6) technology. Using this tunneling redirection technique, service packets can be redirected to an appropriate SRv6 TE Policy, and then forwarded using the forwarding paths specified in the SRv6 TEPolicy. Summary of the Invention

[0003] The purpose of this application is to provide a message forwarding method, apparatus, and electronic device to avoid affecting service quality due to path quality degradation in the forwarding path. The specific technical solution is as follows:

[0004] In a first aspect, embodiments of this application provide a message forwarding method, the method comprising:

[0005] Receive a service message, the service message including a destination address and flow characteristics;

[0006] Obtain the target service attribute that matches the flow feature, and obtain at least one intelligent policy routing IPR template that matches the destination address;

[0007] From the at least one IPR template, select a target IPR template that matches the target business attribute, and obtain the target quality conditions of the target IPR template;

[0008] From the target IPR template, select an SRv6 TE Policy that meets the target quality conditions, wherein the SRv6 TE Policy includes a first candidate path;

[0009] The service message is forwarded through the first candidate path;

[0010] Each IPR template includes multiple SRv6 TE Policies with the same service attributes and quality conditions corresponding to the service attributes. The multiple SRv6 TE Policies have different link priorities, and the selected SRv6 TE Policies has the highest link priority.

[0011] In one possible implementation, the target IPR template further includes a preset period; the method further includes:

[0012] Perform the following operations every preset period:

[0013] Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template;

[0014] Determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions;

[0015] Add the primary candidate paths included in the SRv6 TE Policy that meet the target quality conditions for path quality parameters to the set of alternative paths;

[0016] Select the second candidate path with the highest link priority from the set of candidate paths;

[0017] If, within a preset time period, the selected second candidate path is inconsistent with the currently used candidate path, then the second candidate path will be used as the first candidate path.

[0018] In one possible implementation, the target IPR template further includes a preset period; the method further includes:

[0019] Perform the following operations every preset period:

[0020] Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template;

[0021] Based on the link priority from high to low, determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions.

[0022] The first primary candidate path that meets the target quality condition is selected as the third candidate path.

[0023] If, within a preset time period, the selected third candidate path is inconsistent with the currently used candidate path, then the third candidate path will be used as the first candidate path.

[0024] In one possible implementation, the preset duration is a preset duration included in the target IPR template that matches the target business attributes.

[0025] In one possible implementation, at least two SRv6 TE Policies in the target IPR template share a first outgoing interface, the currently used candidate paths include the primary candidate paths of the at least two SRv6 TE Policies, and the fourth candidate path among the primary candidate paths of the at least two SRv6 TE Policies has the lowest scheduling priority.

[0026] If, within a preset time period, the selected second candidate path is inconsistent with the currently used candidate path, then the second candidate path is used as the first candidate path, including:

[0027] If the selected second candidate path and the fourth candidate path are inconsistent within a preset time period, then the second candidate path will be used as the first candidate path to replace the fourth candidate path.

[0028] In one possible implementation, at least two SRv6 TE Policies in the target IPR template share a first outgoing interface, the currently used candidate paths include the primary candidate paths of the at least two SRv6 TE Policies, and the fourth candidate path among the primary candidate paths of the at least two SRv6 TE Policies has the lowest scheduling priority.

[0029] If, within a preset time period, the selected third candidate path is inconsistent with the currently used candidate path, then the third candidate path is used as the first candidate path, including:

[0030] If the selected third candidate path and the fourth candidate path are inconsistent within the preset time period, then the third candidate path will be used as the first candidate path to replace the fourth candidate path.

[0031] In one possible implementation, obtaining the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template includes:

[0032] Obtain the used bandwidth and total bandwidth of the outgoing interface corresponding to the primary candidate path of each SRv6 TE Policy in the target IPR template;

[0033] Obtain the real-time quality parameters and expected quality parameters of the primary candidate paths for each SRv6 TE Policy in the target IPR template;

[0034] The step of determining whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions includes:

[0035] For each SRv6 TE Policy in the target IPR template, determine whether the used bandwidth and total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy, as well as the real-time quality parameters or expected quality parameters of the primary candidate path of the SRv6 TE Policy, meet the target quality conditions.

[0036] If so, then the path quality parameters of the SRv6 TE Policy are determined to meet the target quality conditions;

[0037] If not, then the path quality parameters of the SRv6 TE Policy do not meet the target quality conditions.

[0038] In one possible implementation, the target quality condition includes an upper limit threshold for bandwidth utilization, the real-time quality parameter includes real-time bandwidth, and the expected quality parameter includes expected bandwidth.

[0039] For each SRv6 TE Policy in the target IPR template, determining whether the used bandwidth and total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy, as well as the real-time quality parameters or expected quality parameters of the primary candidate path of the SRv6 TE Policy, meet the target quality conditions includes:

[0040] If the SRv6 TE Policy is not currently carrying traffic, the expected bandwidth occupied by the traffic of the target service attribute is determined based on the real-time bandwidth or expected bandwidth of the primary candidate path of the SRv6 TE Policy.

[0041] Determine the sum of the used bandwidth and the expected bandwidth occupied by the outgoing interface corresponding to the SRv6 TE Policy;

[0042] The product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage;

[0043] Determine whether the sum is less than the upper limit of bandwidth usage;

[0044] If so, then the target quality condition is satisfied;

[0045] If not, then the target quality condition is determined not to be met.

[0046] In one possible implementation, the target quality condition includes an upper limit threshold for bandwidth utilization, the real-time quality parameter includes real-time bandwidth, and the expected quality parameter includes expected bandwidth.

[0047] For each SRv6 TE Policy in the target IPR template, determining whether the used bandwidth and total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy, as well as the real-time quality parameters or expected quality parameters of the primary candidate path of the SRv6 TE Policy, meet the target quality conditions includes:

[0048] If the SRv6 TE Policy is currently carrying traffic, then the product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage.

[0049] Determine whether the used bandwidth of the outgoing interface corresponding to the SRv6 TE Policy is less than the bandwidth occupancy limit;

[0050] If so, then the target quality condition is satisfied;

[0051] If not, then the target quality condition is determined not to be met.

[0052] In one possible implementation, determining the expected bandwidth usage of the traffic for the target service attribute based on the real-time or expected bandwidth of the primary candidate path of the SRv6 TE Policy includes:

[0053] If the primary candidate path of the SRv6 TE Policy has not carried traffic for the target service attribute, then the expected bandwidth of the primary candidate path of the SRv6 TE Policy shall be used as the expected occupied bandwidth.

[0054] If the primary candidate path of the SRv6 TE Policy has already carried traffic for the target service attribute, then the average real-time bandwidth of the primary candidate path of the SRv6 TE Policy obtained within a preset number of preset periods will be used as the expected bandwidth occupied.

[0055] In one possible implementation, the at least one IPR template belongs to the same SRv6 TE Policy group, and the SRv6 TE Policy group matches the destination address.

[0056] Secondly, embodiments of this application provide a message forwarding apparatus, the apparatus comprising:

[0057] The receiving module is used to receive service messages, which include a destination address and flow characteristics;

[0058] The acquisition module is used to acquire target service attributes that match the flow characteristics and acquire at least one intelligent policy routing IPR template that matches the destination address;

[0059] The selection module is configured to select a target IPR template that matches the target service attribute from the at least one IPR template, and obtain the target quality conditions of the target IPR template; and select an SRv6 TE Policy that satisfies the target quality conditions from the target IPR template, wherein the SRv6 TE Policy includes a first candidate path;

[0060] The forwarding module is used to forward the service message through the first candidate path;

[0061] Each IPR template includes multiple SRv6 TE Policies with the same service attributes and quality conditions corresponding to the service attributes. The multiple SRv6 TE Policies have different link priorities, and the selected SRv6 TE Policies has the highest link priority.

[0062] In one possible implementation, the target IPR template further includes a preset period; the device further includes a path selection module.

[0063] The path selection module is specifically used to perform the following operations every preset period:

[0064] Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template;

[0065] Determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions;

[0066] Add the primary candidate paths included in the SRv6 TE Policy that meet the target quality conditions for path quality parameters to the set of alternative paths;

[0067] Select the second candidate path with the highest link priority from the set of candidate paths;

[0068] If, within a preset time period, the selected second candidate path is inconsistent with the currently used candidate path, then the second candidate path will be used as the first candidate path.

[0069] In one possible implementation, the target IPR template further includes a preset period; the device further includes a path selection module.

[0070] The path selection module is specifically used to perform the following operations every preset period:

[0071] Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template;

[0072] Based on the link priority from high to low, determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions.

[0073] The first primary candidate path that meets the target quality condition is selected as the third candidate path.

[0074] If, within a preset time period, the selected third candidate path is inconsistent with the currently used candidate path, then the third candidate path will be used as the first candidate path.

[0075] In one possible implementation, the preset duration is a preset duration included in the target IPR template that matches the target business attributes.

[0076] In one possible implementation, at least two SRv6 TE Policies in the target IPR template share a first outgoing interface, the currently used candidate paths include the primary candidate paths of the at least two SRv6 TE Policies, and the fourth candidate path among the primary candidate paths of the at least two SRv6 TE Policies has the lowest scheduling priority.

[0077] The path selection module is specifically used to select the second candidate path as the first candidate path to replace the fourth candidate path if the selected second candidate path and the fourth candidate path are inconsistent within a preset time period.

[0078] In one possible implementation, at least two SRv6 TE Policies in the target IPR template share a first outgoing interface, the currently used candidate paths include the primary candidate paths of the at least two SRv6 TE Policies, and the fourth candidate path among the primary candidate paths of the at least two SRv6 TE Policies has the lowest scheduling priority.

[0079] The path selection module is specifically used to select the third candidate path as the first candidate path to replace the fourth candidate path if the selected third candidate path and the fourth candidate path are inconsistent within a preset time period.

[0080] In one possible implementation, the path selection module is specifically used to obtain the used bandwidth and total bandwidth of the outgoing interface corresponding to the primary candidate path of each SRv6 TE Policy in the target IPR template; and to obtain the real-time quality parameters and expected quality parameters of the primary candidate path of each SRv6 TE Policy in the target IPR template.

[0081] The path selection module is specifically used for:

[0082] For each SRv6 TE Policy in the target IPR template, determine whether the used bandwidth and total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy, as well as the real-time quality parameters or expected quality parameters of the primary candidate path of the SRv6 TE Policy, meet the target quality conditions.

[0083] If so, then the path quality parameters of the SRv6 TE Policy are determined to meet the target quality conditions;

[0084] If not, then the path quality parameters of the SRv6 TE Policy do not meet the target quality conditions.

[0085] In one possible implementation, the target quality condition includes an upper limit threshold for bandwidth utilization, the real-time quality parameter includes at least real-time bandwidth, and the expected quality parameter includes at least expected bandwidth.

[0086] The path selection module is specifically used for:

[0087] If the SRv6 TE Policy is not currently carrying traffic, the expected bandwidth occupied by the traffic of the target service attribute is determined based on the real-time bandwidth or expected bandwidth of the primary candidate path of the SRv6 TE Policy.

[0088] Determine the sum of the used bandwidth and the expected bandwidth occupied by the outgoing interface corresponding to the SRv6 TE Policy;

[0089] The product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage;

[0090] Determine whether the sum is less than the upper limit of bandwidth usage;

[0091] If so, then the target quality condition is satisfied;

[0092] If not, then the target quality condition is determined not to be met.

[0093] In one possible implementation, the target quality condition includes an upper limit threshold for bandwidth utilization, the real-time quality parameter includes real-time bandwidth, and the expected quality parameter includes expected bandwidth.

[0094] The path selection module is specifically used for:

[0095] If the SRv6 TE Policy is currently carrying traffic, then the product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage.

[0096] Determine whether the used bandwidth of the outgoing interface corresponding to the SRv6 TE Policy is less than the bandwidth occupancy limit;

[0097] If so, then the target quality condition is satisfied;

[0098] If not, then the target quality condition is determined not to be met.

[0099] In one possible implementation, the path selection module is specifically used for:

[0100] If the primary candidate path of the SRv6 TE Policy has not carried traffic for the target service attribute, then the expected bandwidth of the primary candidate path of the SRv6 TE Policy shall be used as the expected occupied bandwidth.

[0101] If the primary candidate path of the SRv6 TE Policy has already carried traffic for the target service attribute, then the average real-time bandwidth of the primary candidate path of the SRv6 TE Policy obtained within a preset number of preset periods will be used as the expected bandwidth occupied.

[0102] In one possible implementation, the at least one IPR template belongs to the same SRv6 TE Policy group, and the SRv6 TE Policy group matches the destination address.

[0103] Thirdly, embodiments of this application provide an electronic device, the electronic device comprising:

[0104] processor;

[0105] transceiver;

[0106] A machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the machine-executable instructions cause the processor to perform the following steps:

[0107] Receive a service message, the service message including a destination address and flow characteristics;

[0108] Obtain the target service attribute that matches the flow feature, and obtain at least one intelligent policy routing IPR template that matches the destination address;

[0109] From the at least one IPR template, select a target IPR template that matches the target business attribute, and obtain the target quality conditions of the target IPR template;

[0110] From the target IPR template, select an SRv6 TE Policy that meets the target quality conditions, wherein the SRv6 TE Policy includes a first candidate path;

[0111] The service message is forwarded through the first candidate path;

[0112] Each IPR template includes multiple SRv6 TE Policies with the same service attributes and quality conditions corresponding to the service attributes. The multiple SRv6 TE Policies have different link priorities, and the selected SRv6 TE Policies has the highest link priority.

[0113] In one possible implementation, the target IPR template further includes a preset period; the machine-executable instructions also cause the processor to perform the following steps:

[0114] Perform the following operations every preset period:

[0115] Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template;

[0116] Determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions;

[0117] Add the primary candidate paths included in the SRv6 TE Policy that meet the target quality conditions for path quality parameters to the set of alternative paths;

[0118] Select the second candidate path with the highest link priority from the set of candidate paths;

[0119] If, within a preset time period, the selected second candidate path is inconsistent with the currently used candidate path, then the second candidate path will be used as the first candidate path.

[0120] In one possible implementation, the target IPR template further includes a preset period; the machine-executable instructions also cause the processor to perform the following steps:

[0121] Perform the following operations every preset period:

[0122] Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template;

[0123] Based on the link priority from high to low, determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions.

[0124] The first primary candidate path that meets the target quality condition is selected as the third candidate path.

[0125] If, within a preset time period, the selected third candidate path is inconsistent with the currently used candidate path, then the third candidate path will be used as the first candidate path.

[0126] In one possible implementation, the preset duration is a preset duration included in the target IPR template that matches the target business attributes.

[0127] In one possible implementation, at least two SRv6 TE Policies in the target IPR template share a first outgoing interface, the currently used candidate paths include the primary candidate paths of the at least two SRv6 TE Policies, and the fourth candidate path among the primary candidate paths of the at least two SRv6 TE Policies has the lowest scheduling priority.

[0128] The machine-executable instructions also cause the processor to perform the following steps:

[0129] If the selected second candidate path and the fourth candidate path are inconsistent within a preset time period, then the second candidate path will be used as the first candidate path to replace the fourth candidate path.

[0130] In one possible implementation, at least two SRv6 TE Policies in the target IPR template share a first outgoing interface, the currently used candidate paths include the primary candidate paths of the at least two SRv6 TE Policies, and the fourth candidate path among the primary candidate paths of the at least two SRv6 TE Policies has the lowest scheduling priority.

[0131] The machine-executable instructions also cause the processor to perform the following steps:

[0132] If the selected third candidate path and the fourth candidate path are inconsistent within the preset time period, then the third candidate path will be used as the first candidate path to replace the fourth candidate path.

[0133] In one possible implementation, the machine-executable instructions further cause the processor to perform the following steps:

[0134] Obtain the used bandwidth and total bandwidth of the outgoing interface corresponding to the primary candidate path of each SRv6 TE Policy in the target IPR template;

[0135] Obtain the real-time quality parameters and expected quality parameters of the primary candidate paths for each SRv6 TE Policy in the target IPR template;

[0136] The step of determining whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions includes:

[0137] For each SRv6 TE Policy in the target IPR template, determine whether the used bandwidth and total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy, as well as the real-time quality parameters or expected quality parameters of the primary candidate path of the SRv6 TE Policy, meet the target quality conditions.

[0138] If so, then the path quality parameters of the SRv6 TE Policy are determined to meet the target quality conditions;

[0139] If not, then the path quality parameters of the SRv6 TE Policy do not meet the target quality conditions.

[0140] In one possible implementation, the target quality condition includes an upper limit threshold for bandwidth utilization, the real-time quality parameter includes real-time bandwidth, and the expected quality parameter includes expected bandwidth.

[0141] The machine-executable instructions also cause the processor to perform the following steps:

[0142] If the SRv6 TE Policy is not currently carrying traffic, the expected bandwidth occupied by the traffic of the target service attribute is determined based on the real-time bandwidth or expected bandwidth of the primary candidate path of the SRv6 TE Policy.

[0143] Determine the sum of the used bandwidth and the expected bandwidth occupied by the outgoing interface corresponding to the SRv6 TE Policy;

[0144] The product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage;

[0145] Determine whether the sum is less than the upper limit of bandwidth usage;

[0146] If so, then the target quality condition is satisfied;

[0147] If not, then the target quality condition is determined not to be met.

[0148] In one possible implementation, the target quality condition includes an upper limit threshold for bandwidth utilization, the real-time quality parameter includes real-time bandwidth, and the expected quality parameter includes expected bandwidth.

[0149] The machine-executable instructions also cause the processor to perform the following steps:

[0150] If the SRv6 TE Policy is currently carrying traffic, then the product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage.

[0151] Determine whether the used bandwidth of the outgoing interface corresponding to the SRv6 TE Policy is less than the bandwidth occupancy limit;

[0152] If so, then the target quality condition is satisfied;

[0153] If not, then the target quality condition is determined not to be met.

[0154] In one possible implementation, the machine-executable instructions further cause the processor to perform the following steps:

[0155] If the primary candidate path of the SRv6 TE Policy has not carried traffic for the target service attribute, then the expected bandwidth of the primary candidate path of the SRv6 TE Policy shall be used as the expected occupied bandwidth.

[0156] If the primary candidate path of the SRv6 TE Policy has already carried traffic for the target service attribute, then the average real-time bandwidth of the primary candidate path of the SRv6 TE Policy obtained within a preset number of preset periods will be used as the expected bandwidth occupied.

[0157] In one possible implementation, the at least one IPR template belongs to the same SRv6 TE Policy group, and the SRv6 TE Policy group matches the destination address.

[0158] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method described in the first aspect.

[0159] Fifthly, embodiments of this application provide a computer program product comprising executable instructions that, when executed on a computer, cause the computer to implement the method described in the first aspect.

[0160] Using the above technical solution, after receiving a service packet, the head node obtains the target service attribute matching the flow characteristics and at least one IPR template matching the destination address. Then, from the at least one IPR template, it selects the target IPR template that matches the target service attribute and obtains the target quality conditions of the target IPR template. Next, from the target IPR template, it selects the SRv6 TE Policy that meets the target quality conditions. The selected SRv6 TE Policy has the highest link priority, and the service packet is forwarded through the first candidate path included in the selected SRv6 TE Policy. It can be seen that this embodiment does not directly select the SRv6 TE Policy with the highest link priority, but first selects the SRv6 TE Policy that meets the target quality conditions and has the highest link priority. Since the first candidate path meets the target quality conditions, forwarding the service packet using the first candidate path can meet the service's SLA requirements, avoid using candidate paths with poor path quality to forward the service packet, and improve the service quality.

[0161] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0162] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0163] Figure 1 This is a schematic diagram of the structure of a bank access network provided in an embodiment of this application;

[0164] Figure 2 An exemplary schematic diagram illustrating the configuration of a tunnel diversion strategy provided in an embodiment of this application;

[0165] Figure 3 An exemplary schematic diagram of an SRv6 TE Policy referral process provided for an embodiment of this application;

[0166] Figure 4 A flowchart of a message forwarding method provided in an embodiment of this application;

[0167] Figure 5 A schematic diagram of the overall scheme of the message forwarding method provided in the embodiments of this application;

[0168] Figure 6 An exemplary schematic diagram illustrating an application scenario provided in this application embodiment;

[0169] Figure 7 This is a schematic diagram of the structure of a message forwarding device provided in an embodiment of this application;

[0170] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0171] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0172] First, the application scenarios provided in the embodiments of this application will be introduced.

[0173] like Figure 1 As shown, Figure 1 This is a schematic diagram of the structure of a bank access network provided in an embodiment of this application. The bank access network includes a branch (Spoke), a secondary branch (Boarder), a primary branch (Hub), and a bank core network. The branch includes nodes for production and office work, nodes for the Internet of Things, etc.

[0174] Branch offices are connected to secondary branches, which in turn are connected to primary branches, allowing for the forwarding of business messages between them. Primary branches are connected to the bank's core network, enabling mutual access to the data center through communication between them. Furthermore, branches and primary branches can also transmit business messages to the network management platform via the Telemetry protocol.

[0175] Each node in the bank's access network deploys an SRv6 TE Policy. The SRv6 TE Policy supports deployment in various network environments. As an example, Figure 1The SRv6 TE Policy is deployed within an SRv6 policy (Ethernet Virtual Private Network layer 3 Virtual Private Network over SRv6 Policy, EVPN L3VPN over SRv6 Policy) of a next-generation VPN layer 3 VPN. The SRv6 TE Policy includes multiple candidate paths, such as candidate path 1, candidate path 2, and so on. Furthermore, the path quality of the candidate paths in the SRv6 TE Policy can be detected using in-situ flow information telemetry (IFIT) tunnel-level quality inspection.

[0176] In related technologies, after a primary bank receives a service message, it can redirect the message to an SRv6 TEPolicy and forward it using the forwarding path specified in the SRv6 TEPolicy. However, when the quality of the forwarding path in the SRv6 TEPolicy deteriorates, it may fail to meet the service level agreement (SLA) requirements of the service, thus affecting service quality.

[0177] The following explains the relevant technical terms used in the embodiments of this application.

[0178] Segment routing (SR) employs a header node path selection mechanism. The header node pre-encapsulates the segment identifier (SID) of the segments the path will traverse. When a packet passes through an SR node, the SR node forwards the packet based on its SID. Except for the header node, other nodes do not need to maintain path state. SRv6 refers to using SR in an IPv6 network, forwarding packets using IPv6 addresses as SIDs.

[0179] SRv6 TE Policy is a new tunneling redirection technique developed based on SRv6 technology. An SRv6 TE Policy consists of multiple candidate paths with different priorities. Each candidate path includes one or more forwarding paths identified by a Segment List. The SID list is an end-to-end path from source to destination, used to instruct devices in the SRv6 network to follow the path specified by the SID list, rather than the shortest path calculated by the Internet Gateway Protocol (IGP). If a packet is imported into an SRv6 TEPolicy, the header node adds the SID list to the packet, and the remaining devices in the SRv6 network execute the instructions embedded in the SID list.

[0180] An SRv6 TE Policy can be globally uniquely identified by the following triples:

[0181] HeadEnd: This is a node generated by the SRv6 TE Policy, used to redirect service packets to the SRv6 TE Policy.

[0182] Color: This is an extended community attribute carried by the SRv6 TE Policy. BGP routes carrying the same color attribute can use this SRv6 TE Policy.

[0183] End-point: The IPv6 address of the destination node of the SRv6 TE Policy.

[0184] Currently, business packets can be redirected to the appropriate SRv6 TEPolicy based on methods such as Color value and tunneling strategy.

[0185] Taking Color value-based traffic redirection as an example, after the head node receives a service packet, it looks up the routing table to obtain the next-hop address and Color value in the routing table entry that matches the service packet. Then, it looks up the SRv6 TE Policy whose End-point address is the same as the next-hop address and whose Color value is the same as the Color value in the routing table entry. Finally, it forwards the service packet through the SRv6 TEPolicy.

[0186] Tunnel-based traffic redirection refers to the process where, after receiving a service packet, the head node looks up the routing table to obtain the next-hop address in the routing table entry that matches the service packet, then looks up the SRv6 TE Policy or SRv6 TE Policy group that matches the next-hop address, and then forwards the service packet through the matched SRv6 TE Policy or SRv6 TE Policy group.

[0187] An SRv6 TE Policy group is a collection of SRv6 TE Policies with the same End-point address. Based on identifiers such as the Differentiated Services Code Point (DSCP) or Dot1p value, packets can be mapped to SRv6 TE Policies with different Color values ​​within the SRv6 TE Policy group for forwarding, thereby achieving differentiated forwarding control based on the different identifiers of the services.

[0188] SRv6 TE Policy groups are identified by a Group ID, and SRv6 TE Policy groups also have a Color value and an End-point attribute.

[0189] Color value: This is an extended community attribute carried by the SRv6 TE Policy group. Border Gateway Protocol (BGP) routes carrying the same Color attribute can be iterated to this SRv6 TE Policy group.

[0190] End-point: This is the IPv6 address of the destination node in the SRv6 TE Policy group. If an SRv6 TE Policy has the same End-point as an SRv6 TE Policy group, then that SRv6 TE Policy belongs to that SRv6 TE Policy group.

[0191] SRv6 TE Policy, as a new technology, provides a flexible method for selecting forwarding paths, which can meet different user forwarding needs. When there are multiple SRv6 TE Policy paths between the head node and the destination node in an SRv6 network, making reasonable use of SRv6 TE Policy to select forwarding paths can not only facilitate network management and planning for administrators, but also effectively reduce the forwarding pressure on network devices.

[0192] Before using SRv6 TE Policy to forward service packets, you need to configure SRv6 TE Policy. The following describes the process of configuring SRv6 TE Policy.

[0193] like Figure 2 As shown, the main process for configuring SRv6 TE Policy is as follows: First, configure the BGP route Color value, then configure the tunnel routing policy. Figure 2 Four tunneling strategies are illustrated as examples: traffic redirection to SRv6 TEPolicy via Color, traffic redirection to SRv6 TE Policy via Differentiated Services Code Point (DSCP), traffic redirection to SRv6 TE Policy via Service Class, and traffic redirection to SRv6 TE Policy via Traffic Engineering Class (TE-Class). In practice, tunneling strategies are not limited to these. Finally, different tunneling strategies are configured for specific services. For example, a tunneling strategy via DSCP is configured for the first service, and a tunneling strategy via TE-Class is configured for the second service.

[0194] Understandably, multiple SRv6 TE Policies with the same End-point can form an SRv6 TEPolicy group. Each SRv6 TE Policy in the SRv6 TE Policy group has its own Color value. By specifying the mapping relationship between message attributes such as DSCP, TE-Class, Service-Class, and 802.1p and the Color value, and through the association of the Color values, a mapping relationship can be formed between a certain attribute of the message (DSCP, TE-Class, Service-Class, or 802.1p), the Color value, and the SRv6 TE Policy.

[0195] The following example illustrates the SRv6-TE Policy traffic redirection process, using TE-Class to redirect traffic to SRv6 TE Policy. Other tunneling strategies can be found in the relevant protocol specifications and will not be detailed here.

[0196] The basic principle of TE-Class-based traffic redirection is to redirect packets to the corresponding SRv6 TE Policy based on their TE-Class value. This redirection method requires first deploying an SRv6 TE Policy group and directing traffic into the SRv6 TE Policy group, and then redirecting packets with specific TE-Class values ​​to the corresponding SRv6 TE Policy based on the mapping rules in the SRv6 TE Policy group.

[0197] The working mechanism of traffic redirection based on TE-Class is as follows:

[0198] Step 1: Use any of the following methods to redirect business traffic to the SRv6 TE Policy group:

[0199] Method 1: Configure a tunnel policy. In the tunnel policy, bind the specified destination address to the SRv6 TE Policy group, thereby redirecting traffic destined for that address to the SRv6 TE Policy group.

[0200] Method 2: Configure a tunnel policy. Specify the SRv6 TE Policy group as the preferred tunnel in the tunnel policy. When the next hop address of the route is the destination address of the SRv6 TE Policy group, the traffic will be directed to that SRv6 TE Policy group.

[0201] Method 3: After finding an SRv6 TE Policy group whose Color value and End-point address match the Color extended community attribute and next-hop address of the BGP route, iterate the BGP route to the SRv6 TE Policy group.

[0202] Step 2: Automatically add multiple SRv6 TE Policies with different Color values ​​into one SRv6 TE Policy group. Define the mapping relationship between TE-Class values ​​and Color values ​​in the SRv6 TE Policy group.

[0203] Step 3: Based on the TE-Class value of the packet, find the Color value associated with that TE-Class value, and then match that Color value with the corresponding SRv6 TE Policy in the SRv6 TE Policy group. This effectively establishes a mapping relationship of TE-Class value -> Color -> SRv6 TE Policy, thereby enabling packets carrying a specified TE-Class value to be forwarded through the specified SRv6 TE Policy.

[0204] like Figure 3 As shown, with Figure 3Taking the network structure shown as an example, the process of traffic redirection based on TE-Class will be introduced.

[0205] Figure 3 In the diagram, there are two SRv6 TE Policies between the head node (device A) and the tail node (device D): SRv6 TE Policy 1 and SRv6 TE Policy 2. SRv6 TE Policy 1 has a Color value of 100 and includes a forwarding path of Device A-D-D-D. SRv6 TE Policy 2 has a Color value of 200 and includes a forwarding path of Device A-D-D-D-D-E-F-D. The End-point address of both SRv6 TE Policy 1 and SRv6 TE Policy 2 is address 4::4 of device D. The traffic redirection process is as follows:

[0206] 1. Device D sends an MP-BGP route to device A. The IP prefix of this route is 2.2.2.2 / 32, the Color value is 100, and the next hop is device D's address 4::4.

[0207] 2. Create SRv6 TE Policy group 111 on device A. The Color value of SRv6 TE Policy group 111 is 10, and the End-point is address 4::4 of device D. Define the mapping relationship between Color values ​​and TE class IDs within SRv6 TE Policy group 111: Color 100 maps to TE class ID 1, and Color 200 maps to TE class ID 2. Then configure a tunneling policy on device A to bind SRv6 TE Policy group 111 to the destination address 2.2.2.2.

[0208] Among them, SRv6 TE Policy group 111 includes SRv6 TE Policy1 and SRv6 TE Policy2. SRv6 TE Policy1 has a Color value of 100, an End-point of device D (address 4::4), and a SID list including the IPv6 addresses of devices B, C, and D. SRv6 TE Policy2 has a Color value of 200, an End-point of device D (address 4::4), and a SID list including the IPv6 addresses of devices E, F, and D.

[0209] Binding SRv6 TE Policy group 111 to destination address 2.2.2.2 on device A generates a forwarding information base (FIB). The FIB includes the mapping relationship of TE class ID 1->Color100->SRv6 TEPolicy1 and the mapping relationship of TE class ID 2->Color200->SRv6TE Policy2.

[0210] 3. After receiving the packet, Device A finds the matching tunnel policy based on the packet's destination address, then associates it with the SRv6 TE Policy group. Next, it looks up the Color value mapped to the TE class ID of the packet, and then matches the Color value to a specific SRv6 TE Policy within the SRv6 TE Policy group. Within that SRv6 TE Policy, it selects the optimal candidate path. Taking the candidate paths included in SRv6 TE Policy1 as an example, the packet with TE class ID 1 is forwarded according to the SID list in that candidate path via the path Device B -> Device C -> Device D, thus achieving TE class ID redirection of the packet.

[0211] In the above process, the Color value is used to define the application-level network SLA policy, which can perform static network path planning based on specific services and realize service value segmentation. That is, an SRv6 TE Policy is pre-planned for the service. However, when the path quality of the candidate path included in the SRv6 TE Policy deteriorates, forwarding service packets according to the candidate path will fail to meet the service's SLA requirements.

[0212] To address this issue, this application provides a message forwarding method, which is applied to the head node in an SRv6 network, such as... Figure 4 As shown, the method includes:

[0213] S401. Receive service messages, which include the destination address and flow characteristics.

[0214] The flow characteristics of the service message may include information such as a five-tuple, DSCP, and VPN identifier used to identify a service flow, but this application embodiment does not limit this.

[0215] S402. Obtain the target service attributes that match the flow characteristics, and obtain at least one intelligent policy routing IPR template that matches the destination address.

[0216] The head node pre-stores the correspondence between stream features and business attributes. Business attributes can be represented by TE-Class, and the head node can determine the target business attribute based on this correspondence.

[0217] At least one IPR template belongs to the same SRv6 TE Policy group, and the SRv6 TE Policy group matches the destination address of the service message.

[0218] The header node can be based on the SRv6 TE Policy group that matches the destination address of the service packet, which can be determined through methods such as color redirection and tunnel redirection.

[0219] For example, if tunneling is used, the routing table can be looked up based on the destination address of the service packet to obtain the next-hop address for forwarding the service packet, and then the SRv6 TEPolicy group with the same End-Point address as the next-hop address can be obtained. The obtained SRv6 TE Policy group is the SRv6 TE Policy group that matches the destination address.

[0220] If the Color-based routing method is used, the routing table can be looked up based on the destination address of the service packet. The matching next-hop address and Color value can be obtained from the routing table, and then the SRv6TE Policy group with the same End-Point address as the next-hop address can be obtained. If the Color value of the SRv6 TE Policy group is the same as the Color value obtained from the routing table, then the SRv6 TE Policy group is the SRv6 TE Policy group that matches the destination address.

[0221] The head node can also select other diversion methods according to the configuration to divert service packets to the SRv6 TE Policy group that matches the destination address. The specific diversion method can be referred to the relevant protocol provisions, and this application embodiment does not limit it.

[0222] The SRv6 TE Policy group includes multiple SRv6 TE Policies with the same End-point address, and each SRv6 TE Policy corresponds to a service attribute. In this embodiment of the application, multiple SRv6 TE Policies with the same service attribute in the SRv6 TE Policy group are added to an IPR template, and an SRv6 TE Policy group includes at least one IPR template.

[0223] Each IPR template includes multiple SRv6 TE Policies with the same service attributes and the corresponding quality conditions for those service attributes, and the multiple SRv6 TE Policies have different link priorities.

[0224] S403. From at least one IPR template, select the target IPR template that matches the target business attributes, and obtain the target quality conditions of the target IPR template.

[0225] The head node can determine the target IPR template that matches the target business attribute based on the correspondence between business attributes and IPR templates.

[0226] The target IPR template includes target quality conditions, which can also be called SLA standards. For example, target quality conditions may include a bandwidth occupancy limit of <80%.

[0227] The target IPR template includes target quality conditions and routing priority information for SRv6 TE Policies with the same service attributes.

[0228] As an example, the routing priority information of the SRv6 TE Policy includes:

[0229] SRv6 TE Policy A priority (link priority) 10, expected bandwidth BW_A, first label outgoing interface InterfaceA, scheduling priority A.

[0230] SRv6 TE Policy B priority 20, expected bandwidth BW_B, first label outgoing interface InterfaceB, scheduling priority B.

[0231] SRv6 TE Policy C priority 30, expected bandwidth BW_C, first label output interface InterfaceC, scheduling priority C.

[0232] S404. From the target IPR template, select the SRv6 TE Policy that meets the target quality conditions. The SRv6 TEPolicy includes the first candidate path.

[0233] The selected SRv6 TE Policy has the highest link priority.

[0234] As an example, if SRv6 TE Policy B and SRv6 TE Policy C meet the target path quality conditions, and the link priority of SRv6 TE Policy B is higher than the link priority of SRv6 TE Policy C, then the primary candidate path included in SRv6 TE Policy B will be used as the first candidate path.

[0235] S405. Forward the service message through the first candidate path.

[0236] Using the above technical solution, after receiving a service packet, the head node obtains the target service attribute matching the flow characteristics and at least one IPR template matching the destination address. Then, from the at least one IPR template, it selects the target IPR template that matches the target service attribute and obtains the target quality conditions of the target IPR template. Next, from the target IPR template, it selects the SRv6 TE Policy that meets the target quality conditions. The selected SRv6 TE Policy has the highest link priority, and the service packet is forwarded through the first candidate path included in the selected SRv6 TE Policy. It can be seen that this embodiment does not directly select the SRv6 TE Policy with the highest link priority, but first selects the SRv6 TE Policy that meets the target quality conditions and has the highest link priority. Since the first candidate path meets the target quality conditions, forwarding the service packet using the first candidate path can meet the service's SLA requirements, avoid using candidate paths with poor path quality to forward the service packet, and improve the service quality.

[0237] In this embodiment, the target IPR template also includes a preset period, which is the period during which the head node selects the optimal candidate path for the target IPR template. The optimal candidate path is the first candidate path in the above embodiment.

[0238] In one implementation, the head node performs the following operations every preset period:

[0239] Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template; add the primary candidate paths included in the SRv6 TE Policy whose path quality parameters meet the target quality conditions to the candidate path set; and select the candidate path with the highest link priority in the candidate path set as the first candidate path.

[0240] Understandably, for each SRv6 TE Policy in the target IPR template, if the path quality parameters of the primary candidate path included in that SRv6 TE Policy do not meet the target quality conditions, then the primary candidate path included in that SRv6 TE Policy is considered a poor-quality path and cannot be used for subsequent service forwarding. Conversely, if the path quality parameters of the primary candidate path included in that SRv6 TE Policy meet the target quality conditions, then the primary candidate path included in that SRv6 TE Policy can be added to the candidate path set as a backup path.

[0241] In this way, an optimal candidate path can be reselected for the target IPR template at preset intervals. After the service packets are diverted to the target IPR template, the optimal candidate path can be used to forward the service packets. This avoids continuing to use the forwarding path currently used by the service flow when the path quality deteriorates, and instead allows for timely switching to the newly selected optimal candidate path, thereby improving service quality.

[0242] In another possible implementation, the head node performs the following operation every preset period:

[0243] Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template; determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions; add the primary candidate paths included in the SRv6 TE Policy whose path quality parameters meet the target quality conditions to the candidate path set; select the second candidate path with the highest link priority in the candidate path set; if the selected second candidate path is inconsistent with the currently used candidate path within a preset time period, then the second candidate path is used as the first candidate path.

[0244] It should be noted that if there are multiple SRv6 TE Policies with the same link priority in the candidate path set, and these multiple SRv6 TE Policies have the highest link priority in the candidate path set, then the second candidate paths included by the multiple SRv6 TE Policies with the same link priority can all be used as the optimal paths, and subsequent traffic can be load-sharing among the multiple SRv6 TE Policies.

[0245] In this embodiment, after the head node selects the second candidate path, if the second candidate path is inconsistent with the currently used candidate path, switching and back-cutting suppression can be performed. Specifically, a switching cycle timer can be started. Before the preset timeout period, if the calculated second candidate path with the highest link priority is consistent with the currently used candidate path, the switching cycle timer is stopped and reset to zero, and the currently used candidate path continues to be used until the next calculated second path is inconsistent with the currently used candidate path, at which point the timer restarts.

[0246] If, between the start of the timing period and the completion of the preset time, the calculated second candidate path with the highest link priority is inconsistent with the currently used candidate path, then the second candidate path will be used as the first candidate path. In other words, the second candidate path will be the optimal candidate path, and subsequent service packets redirected to the target IPR template will be switched to use the second candidate path for forwarding.

[0247] In the above process, if the link priority of the second candidate path is lower than that of the currently used candidate path, a path switch is required, that is, the currently used forwarding path is switched from the candidate path with higher link priority to the second candidate path with lower link priority.

[0248] If the link priority of the second candidate path is higher than that of the currently used candidate path, it means that the path quality of the second candidate path deteriorated but has since recovered to a high quality. Therefore, path switching is required, which means switching the currently used forwarding path from the low-priority candidate path to the high-priority second candidate path.

[0249] The preset duration is a preset duration included in the target IPR template that matches the target service attributes; this preset duration is the path switching cycle. In this embodiment, different preset durations matching different service attributes can be preset according to the service characteristics. For example, a shorter preset duration can be set for voice services with high real-time requirements.

[0250] This method, by setting a preset duration, can reduce the impact of path switching on services and ensure the quality of service for critical traffic. For example, after switching from a high-link-priority candidate path to a low-link-priority candidate path, if the high-link-priority candidate path recovers, it needs to switch back from the low-link-priority candidate path to the high-link-priority candidate path. If important services are still being transmitted on the low-link-priority candidate path at this time, the switchback action will result in traffic loss. In this embodiment, the switchback can only be performed after a preset duration, which can ensure the reliability of important services transmitted on the low-link-priority path during this period.

[0251] In another possible implementation, the head node performs the following operation every preset period:

[0252] Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template; determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions according to the link priority from high to low; select the first primary candidate path that meets the target quality conditions as the third candidate path; if the selected third candidate path is inconsistent with the currently used candidate path within a preset time period, then select the third candidate path as the first candidate path.

[0253] Specifically, if multiple SRv6 TE Policies with the same link priority exist in the target IPR template, and the primary candidate paths included in these SRv6 TE Policies all meet the target path quality conditions, and there are no SRv6 TE Policies with higher link priority in the target IPR template, or the primary candidate paths included in the higher-priority SRv6 TE Policies do not meet the target path quality conditions, then all the primary candidate paths included in the multiple SRv6 TE Policies with the same link priority will be used as third candidate paths. If it is subsequently determined that the third candidate path needs to be used as the first candidate path, then traffic will be load-balanced among the primary candidate paths included in the multiple SRv6 TE Policies with the same link priority.

[0254] Using this method, primary candidate paths that meet the target quality conditions can be selected in descending order of link priority. The optimal candidate path (i.e., the third candidate path) can be quickly determined. After determining the optimal candidate path, there is no need to continue to judge whether other primary candidate paths included in the SRv6 TE Policy meet the target quality conditions, which can save processing overhead and improve efficiency.

[0255] In some embodiments of this application, at least two SRv6 TE Policies in the target IPR template share a first outgoing interface. The currently used candidate paths include the primary candidate paths of at least two SRv6 TE Policies, and the fourth candidate path among the primary candidate paths of at least two SRv6 TE Policies has the lowest scheduling priority;

[0256] Accordingly, in the above embodiments, if the selected second candidate path is inconsistent with the currently used candidate path within a preset time period, the second candidate path is used as the first candidate path. Specifically, this can be implemented as follows:

[0257] If the selected second candidate path and the fourth candidate path are inconsistent within the preset time period, the second candidate path will be used as the first candidate path to replace the fourth candidate path.

[0258] In other words, when the path quality parameters of at least two primary candidate paths of SRv6 TE Policies sharing the first outgoing interface do not meet the target quality conditions, it indicates that the available bandwidth of the first outgoing interface is insufficient. In this case, the traffic carried by the primary candidate paths of at least two SRv6 TE Policies can be gradually switched to other candidate paths, i.e., the switchover can be performed in multiple stages. Within the current preset period, the traffic carried by the fourth candidate path with the lowest scheduling priority is switched to the first candidate path first, while the traffic carried by other SRv6 TE Policies sharing the first outgoing interface is not switched for the time being.

[0259] In the next preset cycle, if the path quality parameters of the fifth candidate path (which has the second lowest priority) among the primary candidate paths of at least two SRv6 TE Policies sharing the first outgoing interface still do not meet the target quality conditions, the traffic carried by the fifth candidate path will be switched to the first candidate path selected in that preset cycle. This allows for the gradual switching of traffic carried by one SRv6 TE Policy on the first outgoing interface each preset cycle.

[0260] It should be noted that if the path quality parameters of all primary candidate paths in the target IPR template do not meet the target quality conditions, path switching will not be performed.

[0261] Accordingly, if at least two SRv6 TE Policies in the target IPR template share the first outgoing interface, and the currently used candidate paths include the primary candidate paths of at least two SRv6 TE Policies, and the fourth candidate path among the primary candidate paths of at least two SRv6 TE Policies has the lowest scheduling priority, then if the selected third candidate path is inconsistent with the currently used candidate path within a preset time period, the third candidate path will be used as the first candidate path. Specifically, this can be implemented as follows:

[0262] If the selected third candidate path and the fourth candidate path are inconsistent within the preset time period, the third candidate path will be used as the first candidate path to replace the fourth candidate path.

[0263] This means that the traffic carried by an SRv6 TE Policy on a first outgoing interface can be switched at each preset cycle to achieve gradual switching.

[0264] The following describes the method for determining whether each candidate path meets the target quality conditions.

[0265] In the above embodiments, obtaining the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template includes:

[0266] Step 1: Obtain the used bandwidth and total bandwidth of the outgoing interface corresponding to the primary candidate path of each SRv6 TE Policy in the target IPR template.

[0267] Among them, the outgoing interface is the physical outgoing interface of the first tag of the Segment List of the primary candidate path of SRv6 TE Policy, which is an outgoing interface of the head node.

[0268] Step 2: Obtain the real-time quality parameters and expected quality parameters of the primary candidate path for each SRv6 TE Policy in the target IPR template. The real-time quality parameters include at least the real-time bandwidth, and the expected quality parameters include at least the expected bandwidth.

[0269] The head node of the SRv6 TE Policy group enables real-time traffic statistics for the SRv6 TE Policy. This real-time traffic statistics function can detect the real-time quality parameters of different SRv6 TE Policies within the group. Real-time quality parameters include at least real-time bandwidth, and optionally, transmission latency and packet loss rate. Correspondingly, expected quality parameters may also include expected transmission latency and expected packet loss rate.

[0270] It should be noted that if a primary candidate path contains multiple Segment Identifier (SID) lists, i.e. multiple forwarding paths, and traffic exists in all of these forwarding paths, then the real-time quality parameters of each forwarding path need to be measured. Then, the real-time quality parameters of the forwarding paths corresponding to each SID list are weighted and summed according to their respective weights. The result of the weighted summation is used as the real-time quality parameter of the primary candidate path.

[0271] The expected quality parameters are statically configured parameters in the SRv6 TE Policy. The expected quality parameters include at least the expected bandwidth, and optionally, the expected transmission delay and the expected packet loss rate.

[0272] Optionally, if the head node does not have real-time traffic statistics enabled, the expected quality parameters of the SRv6 TE Policy can be used as the real-time quality parameters.

[0273] Accordingly, after obtaining the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template, the method further includes:

[0274] Step A: For each SRv6 TE Policy in the target IPR template, determine whether the used bandwidth and total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy, as well as the real-time quality parameters or expected quality parameters of the primary candidate path of the SRv6 TE Policy, meet the target quality conditions.

[0275] If yes, proceed to step B; otherwise, proceed to step C.

[0276] In one implementation, the target quality condition includes an upper limit threshold for bandwidth utilization. Accordingly, bandwidth can be used to determine whether the target quality condition is met; that is, step A specifically includes:

[0277] For each SRv6 TE Policy in the target IPR template, based on the used bandwidth and total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy, as well as the real-time quality parameters or expected quality parameters of the primary candidate path of the SRv6 TE Policy, determine whether the bandwidth utilization rate of the SRv6 TE Policy is greater than the upper limit threshold; if yes, it is determined that the target quality condition is met; if no, it is determined that the target quality condition is not met.

[0278] The methods for determining whether the bandwidth utilization rate of the SRv6 TE Policy exceeds the upper limit threshold include the following two cases:

[0279] Case 1: If the SRv6 TE Policy is not currently carrying traffic, then the expected bandwidth occupied by the traffic of the target service attribute is determined based on the real-time bandwidth or expected bandwidth of the primary candidate path of the SRv6 TE Policy. The sum of the used bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the expected bandwidth occupied is determined. The product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is taken as the upper limit value of bandwidth occupation. It is then determined whether the sum is less than the upper limit value of bandwidth occupation.

[0280] This can be understood as determining whether (used bandwidth + expected bandwidth) < (total bandwidth * upper limit threshold of the outgoing interface corresponding to the SRv6 TE Policy) is true.

[0281] If yes, then the target quality condition is met; if no, then the target quality condition is not met.

[0282] The method for determining the expected bandwidth usage is as follows:

[0283] If the primary candidate path of the SRv6 TE Policy has not carried traffic for the target service attribute, then the expected bandwidth of the primary candidate path of the SRv6 TE Policy is used as the expected occupied bandwidth. When the SRv6 TE Policy participates in routing for the first time, if it has not carried traffic for the target service attribute, then the pre-configured expected bandwidth can be used as the expected occupied bandwidth.

[0284] If the primary candidate path of the SRv6 TE Policy has already carried traffic for the target service attribute, the average real-time bandwidth of the primary candidate path of the SRv6 TE Policy obtained within a preset number of preset periods is used as the expected bandwidth occupied. The head node can record the real-time quality parameters of each SRv6 TE Policy in each preset period, for example, in tabular form. Then, the head node can obtain the real-time bandwidth of the SRv6 TE Policy obtained within the most recent preset number of periods, and take the average as the expected bandwidth occupied. This allows for a more accurate prediction of the expected bandwidth occupied for traffic carrying the target service attribute, and calculates whether carrying the target service attribute traffic on the primary candidate path of the SRv6 TE Policy still meets the target quality conditions, thus enabling a more accurate selection of the optimal path for the target service attribute traffic.

[0285] Case 2: If the SRv6 TE Policy is currently carrying traffic, then the product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage; determine whether the used bandwidth of the outgoing interface corresponding to the SRv6 TE Policy is less than the upper limit value of bandwidth usage.

[0286] This can be understood as determining whether the used bandwidth of the outgoing interface corresponding to the SRv6 TE Policy is less than (the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy * the upper limit threshold).

[0287] If yes, then the target quality condition is met; if no, then the target quality condition is not met.

[0288] It is understandable that if the size relationship in any of the above situations holds, then it can be determined that the bandwidth utilization rate of the SRv6 TE Policy is greater than the upper limit threshold, that is, the primary candidate paths included in the SRv6 TE Policy meet the target quality conditions.

[0289] In another implementation, the target IPR template also includes latency thresholds, packet loss rate thresholds, etc. Accordingly, in step A, for each SRv6 TE Policy, it is necessary to determine whether the bandwidth utilization rate of the SRv6 TE Policy is less than the upper limit threshold, whether the transmission latency is less than the latency threshold, and whether the packet loss rate is less than the packet loss rate threshold. If all the determination results are yes, the SRv6 TE Policy is determined to meet the target quality conditions; if any determination result is no, the SRv6 TE Policy is determined not to meet the target quality conditions. It is understood that if the target IPR template also includes other indicator threshold standards, then it is necessary to determine whether each indicator of the SRv6 TE Policy meets the indicator threshold standard separately.

[0290] By using this method, the head node can periodically collect the path quality parameters of each SRv6 TE Policy and accurately determine whether the path quality parameters of each SRv6 TE Policy meet the target quality conditions in the target IPR template based on real-time conditions. This allows for the accurate selection of SRv6 TE Policies that meet the target quality conditions, ensuring optimal path selection for traffic and avoiding problems such as network congestion and data loss.

[0291] The following describes the message forwarding method provided in the embodiments of this application with specific examples, such as... Figure 5 As shown, the embodiments of this application can be achieved through intelligent routing based on tunnel quality using SRv6 TE Policy, specifically through the coordinated implementation of three functions: tunnel quality detection, optimal tunnel calculation, and traffic introduction tunnel.

[0292] In this context, tunnel quality detection refers to obtaining the path quality parameters of the primary candidate paths included in each SRv6 TEPolicy in the target IPR template, as described in the above embodiments.

[0293] Optimal tunnel calculation refers to the process of selecting the first candidate path once every preset period in the above embodiments.

[0294] Traffic inbound tunneling refers to the process of redirecting a received service message to the first candidate path.

[0295] like Figure 6 As shown, the next-generation wide area network (Application-driven Wide Area Network, AD-WAN) pre-deploys tunneling policies between the head and tail nodes, adds Color attributes to VPN routes, deploys QoS policies for services, and establishes a mapping relationship between TE-class and IPR templates. The specific implementation process is as follows:

[0296] (1) Deploy tunnel strategy and use SRv6 TE Policy to group tunnels to forward service traffic.

[0297] like Figure 6 As shown, the IP address of the tail node is 1.1.1.1 / 32, and the tunnel policy deployed in the head node is: packets destined for address 1.1.1.1 are forwarded through SRv6 TE Policy group 100.

[0298] The head node contains SRv6 TE Policy group 100. One IPR template of SRv6 TE Policy group 100 contains three SRv6 TE Policies, namely SRv6 TE Policy A, SRv6 TE Policy B and SRv6 TEPolicy C.

[0299] In another implementation, the packet can be redirected to the SRv6 TE Policy group 100 using color redirection. This application embodiment does not limit the method of redirecting the packet to the SRv6 TE Policy group.

[0300] (2) Mark the TE Class ID of critical business traffic through QoS policy.

[0301] After redirecting the service message to SRv6 TE Policy group 100, the TE Class ID corresponding to the service message can be determined based on the mapping relationship between the flow characteristics of the service message and the TE Class ID.

[0302] For example, the QoS policy in head node A is: the TE Class ID of the key business A is marked as 10.

[0303] (3) Establish the mapping relationship between TE Class ID and IPR template.

[0304] After determining the TE Class ID corresponding to the service packet, the target IPR template corresponding to the TE Class ID of the current service packet can be determined based on the mapping relationship between the TE Class ID and the IPR template. The service packet is then forwarded according to the primary candidate path included in the current optimal SRv6 TE Policy in the target IPR template. For example, if SRv6 TE Policy A, SRv6 TE Policy B, and SRv6 TE Policy C all meet the target quality conditions, and SRv6 TE Policy A has the highest link priority, then the primary candidate path of SRv6 TE Policy A will be used to forward the service packet.

[0305] This method can dynamically and intelligently select paths that meet the target quality conditions for business traffic without requiring manual adjustments by operations and maintenance personnel. It can balance the bandwidth of each SRv6 TE Policy, avoiding excessive bandwidth utilization or even congestion in individual SRv6 TE Policies, thus improving service quality.

[0306] Corresponding to the above method embodiments, this application also provides a message forwarding device, such as... Figure 7 As shown, the device includes:

[0307] The receiving module 701 is used to receive service messages, which include destination address and flow characteristics.

[0308] The acquisition module 702 is used to acquire target service attributes that match the flow characteristics and acquire at least one intelligent policy routing IPR template that matches the destination address;

[0309] Selection module 703 is used to select a target IPR template that matches the target business attributes from at least one IPR template and obtain the target quality conditions of the target IPR template; and to select an SRv6 TE Policy that meets the target quality conditions from the target IPR template, wherein the SRv6 TE Policy includes a first candidate path;

[0310] Forwarding module 704 is used to forward service packets through the first candidate path;

[0311] Each IPR template includes multiple SRv6 TE Policies with the same service attributes and the corresponding quality conditions for the service attributes. The multiple SRv6 TE Policies have different link priorities, and the selected SRv6 TE Policies has the highest link priority.

[0312] Optionally, the target IPR template also includes a preset period; the device also includes a path selection module;

[0313] The path selection module is specifically used to perform the following operations at preset intervals:

[0314] Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template;

[0315] Determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions;

[0316] Add the primary candidate paths included in the SRv6 TE Policy that meet the target quality conditions for path quality parameters to the set of alternative paths;

[0317] Select the second candidate path with the highest link priority from the set of alternative paths;

[0318] If the selected second candidate path is different from the currently used candidate path within the preset time period, then the second candidate path will be used as the first candidate path.

[0319] Optionally, the target IPR template also includes a preset period; the device also includes a path selection module;

[0320] The path selection module is specifically used to perform the following operations at preset intervals:

[0321] Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template;

[0322] Based on the link priority from high to low, determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions.

[0323] The first primary candidate path that meets the target quality conditions will be used as the third candidate path.

[0324] If the selected third candidate path is different from the currently used candidate path within the preset time period, then the third candidate path will be used as the first candidate path.

[0325] Optionally, the preset duration is the preset duration included in the target IPR template that matches the target business attributes.

[0326] Optionally, at least two SRv6 TE policies in the target IPR template share the first outgoing interface, and the currently used candidate paths include the primary candidate paths of at least two SRv6 TE policies, and the fourth candidate path among the primary candidate paths of at least two SRv6 TE policies has the lowest scheduling priority.

[0327] The path selection module is specifically used to select the second candidate path as the first candidate path to replace the fourth candidate path if the selected second candidate path and the fourth candidate path are inconsistent within a preset time period.

[0328] Optionally, at least two SRv6 TE Policies in the target IPR template share the first outgoing interface, the currently used candidate paths include the primary candidate paths of at least two SRv6 TE Policies, and the fourth candidate path among the primary candidate paths of at least two SRv6 TE Policies has the lowest scheduling priority;

[0329] The path selection module is specifically used to select the third candidate path as the first candidate path to replace the fourth candidate path if the selected third candidate path and the fourth candidate path are inconsistent within a preset time period.

[0330] Optionally, the path selection module is specifically used to obtain the used bandwidth and total bandwidth of the outgoing interface corresponding to the primary candidate path of each SRv6 TE Policy in the target IPR template; and to obtain the real-time quality parameters and expected quality parameters of the primary candidate path of each SRv6 TE Policy in the target IPR template.

[0331] The path selection module is specifically used for:

[0332] For each SRv6 TE Policy in the target IPR template, determine whether the used bandwidth and total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy, as well as the real-time quality parameters or expected quality parameters of the primary candidate path of the SRv6 TE Policy, meet the target quality conditions.

[0333] If so, then the path quality parameters of the SRv6 TE Policy are determined to meet the target quality conditions;

[0334] If not, then the path quality parameters of the SRv6 TE Policy do not meet the target quality conditions.

[0335] Optionally, the target quality conditions include an upper limit threshold for bandwidth utilization, real-time quality parameters include at least real-time bandwidth, and expected quality parameters include at least expected bandwidth.

[0336] The path selection module is specifically used for:

[0337] If the SRv6 TE Policy is not currently carrying traffic, the expected bandwidth occupied by the traffic of the target service attribute is determined based on the real-time bandwidth or expected bandwidth of the primary candidate path of the SRv6 TE Policy.

[0338] Determine the sum of the used bandwidth and the expected bandwidth of the outgoing interface corresponding to the SRv6 TE Policy;

[0339] The product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage;

[0340] Determine if the sum is less than the maximum bandwidth usage limit;

[0341] If so, then the target quality condition is met;

[0342] If not, then the target quality conditions are not met.

[0343] Optionally, the target quality conditions include an upper limit threshold for bandwidth utilization, the real-time quality parameters include real-time bandwidth, and the expected quality parameters include expected bandwidth.

[0344] The path selection module is specifically used for:

[0345] If the SRv6 TE Policy is currently carrying traffic, then the product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage.

[0346] Determine whether the used bandwidth of the outgoing interface corresponding to the SRv6 TE Policy is less than the bandwidth usage limit.

[0347] If so, then the target quality condition is met;

[0348] If not, then the target quality conditions are not met.

[0349] Optionally, the path selection module is specifically used for:

[0350] If the primary candidate path of the SRv6 TE Policy has not carried traffic of the target service attribute, then the expected bandwidth of the primary candidate path of the SRv6 TE Policy shall be used as the expected occupied bandwidth.

[0351] If the primary candidate path of the SRv6 TE Policy has already carried traffic for the target service attribute, the average real-time bandwidth of the primary candidate path of the SRv6 TE Policy obtained within a preset number of preset periods will be used as the expected bandwidth usage.

[0352] Optionally, at least one IPR template belongs to the same SRv6 TE Policy group, and the SRv6 TE Policy group matches the destination address.

[0353] Corresponding to the above method embodiments, this application also provides an electronic device, such as... Figure 8 As shown, the electronic device includes:

[0354] Processor 801;

[0355] Transceiver 804;

[0356] Machine-readable storage medium 802 stores machine-executable instructions that can be executed by processor 801; the machine-executable instructions cause processor 801 to perform the following steps:

[0357] Receive service messages, which include the destination address and flow characteristics;

[0358] Obtain the target service attributes that match the flow characteristics, and obtain at least one intelligent policy routing IPR template that matches the destination address;

[0359] From at least one IPR template, select the target IPR template that matches the target business attributes, and obtain the target quality conditions of the target IPR template;

[0360] From the target IPR template, select the SRv6 TE Policy that meets the target quality conditions. The SRv6 TE Policy includes the first candidate path.

[0361] Forward the business message through the first candidate path;

[0362] Each IPR template includes multiple SRv6 TE Policies with the same service attributes and the corresponding quality conditions for the service attributes. The multiple SRv6 TE Policies have different link priorities, and the selected SRv6 TE Policies has the highest link priority.

[0363] Optionally, the target IPR template also includes a preset cycle; the machine-executable instructions further cause the processor 801 to perform the following steps:

[0364] Perform the following operations at preset intervals:

[0365] Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template;

[0366] Determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions;

[0367] Add the primary candidate paths included in the SRv6 TE Policy that meet the target quality conditions for path quality parameters to the set of alternative paths;

[0368] Select the second candidate path with the highest link priority from the set of alternative paths;

[0369] If the selected second candidate path is different from the currently used candidate path within the preset time period, then the second candidate path will be used as the first candidate path.

[0370] Optionally, the target IPR template also includes a preset cycle; the machine-executable instructions further cause the processor 801 to perform the following steps:

[0371] Perform the following operations at preset intervals:

[0372] Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template;

[0373] Based on the link priority from high to low, determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions.

[0374] The first primary candidate path that meets the target quality conditions will be used as the third candidate path.

[0375] If the selected third candidate path is different from the currently used candidate path within the preset time period, then the third candidate path will be used as the first candidate path.

[0376] Optionally, the preset duration is the preset duration included in the target IPR template that matches the target business attributes.

[0377] Optionally, at least two SRv6 TE policies in the target IPR template share the first outgoing interface, and the currently used candidate paths include the primary candidate paths of at least two SRv6 TE policies, and the fourth candidate path among the primary candidate paths of at least two SRv6 TE policies has the lowest scheduling priority.

[0378] The machine-executable instructions also cause the processor 801 to perform the following steps:

[0379] If the selected second candidate path and the fourth candidate path are inconsistent within the preset time period, the second candidate path will be used as the first candidate path to replace the fourth candidate path.

[0380] Optionally, at least two SRv6 TE policies in the target IPR template share the first outgoing interface, and the currently used candidate paths include the primary candidate paths of at least two SRv6 TE policies, and the fourth candidate path among the primary candidate paths of at least two SRv6 TE policies has the lowest scheduling priority.

[0381] The machine-executable instructions also cause the processor 801 to perform the following steps:

[0382] If the selected third candidate path and the fourth candidate path are inconsistent within the preset time period, the third candidate path will be used as the first candidate path to replace the fourth candidate path.

[0383] Optionally, the machine-executable instructions also cause the processor 801 to perform the following steps:

[0384] Obtain the used bandwidth and total bandwidth of the outgoing interface corresponding to the primary candidate path of each SRv6 TE Policy in the target IPR template;

[0385] Obtain the real-time and expected quality parameters of the primary candidate paths for each SRv6 TE Policy in the target IPR template;

[0386] Determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions, including:

[0387] For each SRv6 TE Policy in the target IPR template, determine whether the used bandwidth and total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy, as well as the real-time quality parameters or expected quality parameters of the primary candidate path of the SRv6 TE Policy, meet the target quality conditions.

[0388] If so, then the path quality parameters of the SRv6 TE Policy are determined to meet the target quality conditions;

[0389] If not, then the path quality parameters of the SRv6 TE Policy do not meet the target quality conditions.

[0390] Optionally, the target quality conditions include an upper limit threshold for bandwidth utilization, the real-time quality parameters include real-time bandwidth, and the expected quality parameters include expected bandwidth.

[0391] The machine-executable instructions also cause the processor 801 to perform the following steps:

[0392] If the SRv6 TE Policy is not currently carrying traffic, the expected bandwidth occupied by the traffic of the target service attribute is determined based on the real-time bandwidth or expected bandwidth of the primary candidate path of the SRv6 TE Policy.

[0393] Determine the sum of the used bandwidth and the expected bandwidth of the outgoing interface corresponding to the SRv6 TE Policy;

[0394] The product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage;

[0395] Determine if the sum is less than the maximum bandwidth usage limit;

[0396] If so, then the target quality condition is met;

[0397] If not, then the target quality conditions are not met.

[0398] Optionally, the target quality conditions include an upper limit threshold for bandwidth utilization, the real-time quality parameters include real-time bandwidth, and the expected quality parameters include expected bandwidth.

[0399] The machine-executable instructions also cause the processor 801 to perform the following steps:

[0400] If the SRv6 TE Policy is currently carrying traffic, then the product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage.

[0401] Determine whether the used bandwidth of the outgoing interface corresponding to the SRv6 TE Policy is less than the bandwidth usage limit.

[0402] If so, then the target quality condition is met;

[0403] If not, then the target quality conditions are not met.

[0404] Optionally, the machine-executable instructions also cause the processor 801 to perform the following steps:

[0405] If the primary candidate path of the SRv6 TE Policy has not carried traffic of the target service attribute, then the expected bandwidth of the primary candidate path of the SRv6 TE Policy shall be used as the expected occupied bandwidth.

[0406] If the primary candidate path of the SRv6 TE Policy has already carried traffic for the target service attribute, the average real-time bandwidth of the primary candidate path of the SRv6 TE Policy obtained within a preset number of preset periods will be used as the expected bandwidth usage.

[0407] Optionally, at least one IPR template belongs to the same SRv6 TE Policy group, and the SRv6 TE Policy group matches the destination address.

[0408] like Figure 8 As shown, the electronic device may also include a communication bus 803. The processor 801, machine-readable storage medium 802, and transceiver 804 communicate with each other via the communication bus 803. The communication bus 803 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 803 can be divided into an address bus, a data bus, a control bus, etc.

[0409] The transceiver 804 can be a wireless communication module. Under the control of the processor 801, the transceiver 804 interacts with other devices for data exchange.

[0410] Machine-readable storage medium 802 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Alternatively, machine-readable storage medium 802 may also be at least one storage device located remotely from the aforementioned processor.

[0411] The processor 801 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0412] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described message forwarding methods.

[0413] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the message forwarding methods described above.

[0414] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0415] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0416] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0417] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A message forwarding method, characterized in that, The method includes: Receive a service message, the service message including a destination address and flow characteristics; Obtain the target service attribute that matches the flow feature, and obtain at least one intelligent policy routing IPR template that matches the destination address; From the at least one IPR template, select a target IPR template that matches the target business attribute, and obtain the target quality conditions of the target IPR template; From the target IPR template, select an SRv6 TE Policy that meets the target quality conditions, wherein the SRv6 TE Policy includes a first candidate path; The service message is forwarded through the first candidate path; Each IPR template includes multiple SRv6 TE Policies with the same service attributes and quality conditions corresponding to the service attributes. The multiple SRv6 TE Policies have different link priorities, and the selected SRv6 TE Policy has the highest link priority.

2. The method according to claim 1, characterized in that, The target IPR template also includes a preset period; the method further includes: Perform the following operations every preset period: Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template; Determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions; Add the primary candidate paths included in the SRv6 TE Policy that meet the target quality conditions for path quality parameters to the set of alternative paths; Select the second candidate path with the highest link priority from the set of candidate paths; If, within a preset time period, the selected second candidate path is inconsistent with the currently used candidate path, then the second candidate path will be used as the first candidate path.

3. The method according to claim 1, characterized in that, The target IPR template also includes a preset period; the method further includes: Perform the following operations every preset period: Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template; Based on the link priority from high to low, determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions. The first primary candidate path that meets the target quality condition is selected as the third candidate path. If, within a preset time period, the selected third candidate path is inconsistent with the currently used candidate path, then the third candidate path will be used as the first candidate path.

4. The method according to claim 2 or 3, characterized in that, The preset duration is the preset duration included in the target IPR template that matches the target business attributes.

5. The method according to claim 2, characterized in that, At least two SRv6 TEPolicies in the target IPR template share a first outgoing interface, and the currently used candidate paths include the primary candidate paths of the at least two SRv6 TE Policies, and the fourth candidate path among the primary candidate paths of the at least two SRv6 TE Policies has the lowest scheduling priority. If, within a preset time period, the selected second candidate path is inconsistent with the currently used candidate path, then the second candidate path is used as the first candidate path, including: If the selected second candidate path and the fourth candidate path are inconsistent within a preset time period, then the second candidate path will be used as the first candidate path to replace the fourth candidate path.

6. The method according to claim 3, characterized in that, At least two SRv6 TEPolicies in the target IPR template share a first outgoing interface, and the currently used candidate paths include the primary candidate paths of the at least two SRv6 TE Policies, and the fourth candidate path among the primary candidate paths of the at least two SRv6 TE Policies has the lowest scheduling priority. If, within a preset time period, the selected third candidate path is inconsistent with the currently used candidate path, then the third candidate path is used as the first candidate path, including: If the selected third candidate path and the fourth candidate path are inconsistent within the preset time period, then the third candidate path will be used as the first candidate path to replace the fourth candidate path.

7. The method according to claim 2 or 3, characterized in that, The step of obtaining the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template includes: Obtain the used bandwidth and total bandwidth of the outgoing interface corresponding to the primary candidate path of each SRv6 TE Policy in the target IPR template; Obtain the real-time quality parameters and expected quality parameters of the primary candidate paths for each SRv6 TE Policy in the target IPR template; The step of determining whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions includes: For each SRv6 TE Policy in the target IPR template, determine whether the used bandwidth and total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy, as well as the real-time quality parameters or expected quality parameters of the primary candidate path of the SRv6 TE Policy, meet the target quality conditions. If so, then the path quality parameters of the SRv6 TE Policy are determined to meet the target quality conditions; If not, then the path quality parameters of the SRv6 TE Policy do not meet the target quality conditions.

8. The method according to claim 7, characterized in that, The target quality condition includes an upper limit threshold for bandwidth utilization, the real-time quality parameter includes real-time bandwidth, and the expected quality parameter includes expected bandwidth. For each SRv6 TE Policy in the target IPR template, determining whether the used bandwidth and total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy, as well as the real-time quality parameters or expected quality parameters of the primary candidate path of the SRv6 TE Policy, meet the target quality conditions includes: If the SRv6 TE Policy is not currently carrying traffic, the expected bandwidth occupied by the traffic of the target service attribute is determined based on the real-time bandwidth or expected bandwidth of the primary candidate path of the SRv6 TE Policy. Determine the sum of the used bandwidth and the expected bandwidth occupied by the outgoing interface corresponding to the SRv6 TE Policy; The product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage; Determine whether the sum is less than the upper limit of bandwidth usage; If so, then the target quality condition is satisfied; If not, then the target quality condition is determined not to be met.

9. The method according to claim 7, characterized in that, The target quality condition includes an upper limit threshold for bandwidth utilization, the real-time quality parameter includes real-time bandwidth, and the expected quality parameter includes expected bandwidth. For each SRv6 TE Policy in the target IPR template, determining whether the used bandwidth and total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy, as well as the real-time quality parameters or expected quality parameters of the primary candidate path of the SRv6 TE Policy, meet the target quality conditions includes: If the SRv6 TE Policy is currently carrying traffic, then the product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage. Determine whether the used bandwidth of the outgoing interface corresponding to the SRv6 TE Policy is less than the bandwidth occupancy limit; If so, then the target quality condition is satisfied; If not, then the target quality condition is determined not to be met.

10. The method according to claim 8, characterized in that, The step of determining the expected bandwidth usage of the traffic for the target service attribute based on the real-time or expected bandwidth of the primary candidate path of the SRv6 TE Policy includes: If the primary candidate path of the SRv6 TE Policy has not carried traffic for the target service attribute, then the expected bandwidth of the primary candidate path of the SRv6 TE Policy shall be used as the expected occupied bandwidth. If the primary candidate path of the SRv6 TE Policy has already carried traffic for the target service attribute, then the average real-time bandwidth of the primary candidate path of the SRv6 TE Policy obtained within a preset number of preset periods will be used as the expected bandwidth occupied.

11. The method according to any one of claims 1-3, characterized in that, The at least one IPR template belongs to the same SRv6 TE Policy group, and the SRv6 TE Policy group matches the destination address.

12. A message forwarding device, characterized in that, The device includes: The receiving module is used to receive service messages, which include a destination address and flow characteristics; The acquisition module is used to acquire target service attributes that match the flow characteristics and acquire at least one intelligent policy routing IPR template that matches the destination address; The selection module is configured to select a target IPR template that matches the target service attribute from the at least one IPR template, and obtain the target quality conditions of the target IPR template; and select an SRv6 TE Policy that satisfies the target quality conditions from the target IPR template, wherein the SRv6 TE Policy includes a first candidate path; The forwarding module is used to forward the service message through the first candidate path; Each IPR template includes multiple SRv6 TE Policies with the same service attributes and quality conditions corresponding to the service attributes. The multiple SRv6 TE Policies have different link priorities, and the selected SRv6 TE Policy has the highest link priority.

13. An electronic device, characterized in that, The electronic device includes: processor; transceiver; A machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the machine-executable instructions cause the processor to perform the following steps: Receive a service message, the service message including a destination address and flow characteristics; Obtain the target service attribute that matches the flow feature, and obtain at least one intelligent policy routing IPR template that matches the destination address; From the at least one IPR template, select a target IPR template that matches the target business attribute, and obtain the target quality conditions of the target IPR template; From the target IPR template, select an SRv6 TE Policy that meets the target quality conditions, wherein the SRv6 TE Policy includes a first candidate path; The service message is forwarded through the first candidate path; Each IPR template includes multiple SRv6 TE Policies with the same service attributes and quality conditions corresponding to the service attributes. The multiple SRv6 TE Policies have different link priorities, and the selected SRv6 TE Policy has the highest link priority.

14. The electronic device according to claim 13, characterized in that, The target IPR template also includes a preset period; the machine-executable instructions further cause the processor to perform the following steps: Perform the following operations every preset period: Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template; Determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions; Add the primary candidate paths included in the SRv6 TE Policy that meet the target quality conditions for path quality parameters to the set of alternative paths; Select the second candidate path with the highest link priority from the set of candidate paths; If, within a preset time period, the selected second candidate path is inconsistent with the currently used candidate path, then the second candidate path will be used as the first candidate path.

15. The electronic device according to claim 13, characterized in that, The target IPR template also includes a preset period; the machine-executable instructions further cause the processor to perform the following steps: Perform the following operations every preset period: Obtain the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template; Based on the link priority from high to low, determine whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions. The first primary candidate path that meets the target quality condition is selected as the third candidate path. If, within a preset time period, the selected third candidate path is inconsistent with the currently used candidate path, then the third candidate path will be used as the first candidate path.

16. The electronic device according to claim 14 or 15, characterized in that, The preset duration is the preset duration included in the target IPR template that matches the target business attributes.

17. The electronic device according to claim 14, characterized in that, At least two SRv6 TE Policies in the target IPR template share a first outgoing interface, and the currently used candidate paths include the primary candidate paths of the at least two SRv6 TE Policies, and the fourth candidate path among the primary candidate paths of the at least two SRv6 TE Policies has the lowest scheduling priority. The machine-executable instructions also cause the processor to perform the following steps: If the selected second candidate path and the fourth candidate path are inconsistent within a preset time period, then the second candidate path will be used as the first candidate path to replace the fourth candidate path.

18. The electronic device according to claim 15, characterized in that, At least two SRv6 TE Policies in the target IPR template share a first outgoing interface, and the currently used candidate paths include the primary candidate paths of the at least two SRv6 TE Policies, and the fourth candidate path among the primary candidate paths of the at least two SRv6 TE Policies has the lowest scheduling priority. The machine-executable instructions also cause the processor to perform the following steps: If the selected third candidate path and the fourth candidate path are inconsistent within the preset time period, then the third candidate path will be used as the first candidate path to replace the fourth candidate path.

19. The electronic device according to claim 14 or 15, characterized in that, The machine-executable instructions also cause the processor to perform the following steps: Obtain the used bandwidth and total bandwidth of the outgoing interface corresponding to the primary candidate path of each SRv6 TE Policy in the target IPR template; Obtain the real-time quality parameters and expected quality parameters of the primary candidate paths for each SRv6 TE Policy in the target IPR template; The step of determining whether the path quality parameters of the primary candidate paths included in each SRv6 TE Policy in the target IPR template meet the target quality conditions includes: For each SRv6 TE Policy in the target IPR template, determine whether the used bandwidth and total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy, as well as the real-time quality parameters or expected quality parameters of the primary candidate path of the SRv6 TE Policy, meet the target quality conditions. If so, then the path quality parameters of the SRv6 TE Policy are determined to meet the target quality conditions; If not, then the path quality parameters of the SRv6 TE Policy do not meet the target quality conditions.

20. The electronic device according to claim 19, characterized in that, The target quality condition includes an upper limit threshold for bandwidth utilization, the real-time quality parameter includes real-time bandwidth, and the expected quality parameter includes expected bandwidth. The machine-executable instructions also cause the processor to perform the following steps: If the SRv6 TE Policy is not currently carrying traffic, the expected bandwidth occupied by the traffic of the target service attribute is determined based on the real-time bandwidth or expected bandwidth of the primary candidate path of the SRv6 TE Policy. Determine the sum of the used bandwidth and the expected bandwidth occupied by the outgoing interface corresponding to the SRv6 TE Policy; The product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage; Determine whether the sum is less than the upper limit of bandwidth usage; If so, then the target quality condition is satisfied; If not, then the target quality condition is determined not to be met.

21. The electronic device according to claim 19, characterized in that, The target quality condition includes an upper limit threshold for bandwidth utilization, the real-time quality parameter includes real-time bandwidth, and the expected quality parameter includes expected bandwidth. The machine-executable instructions also cause the processor to perform the following steps: If the SRv6 TE Policy is currently carrying traffic, then the product of the total bandwidth of the outgoing interface corresponding to the SRv6 TE Policy and the upper limit threshold is used as the upper limit value of bandwidth usage. Determine whether the used bandwidth of the outgoing interface corresponding to the SRv6 TE Policy is less than the bandwidth occupancy limit; If so, then the target quality condition is satisfied; If not, then the target quality condition is determined not to be met.

22. The electronic device according to claim 20, characterized in that, The machine-executable instructions also cause the processor to perform the following steps: If the primary candidate path of the SRv6 TE Policy has not carried traffic for the target service attribute, then the expected bandwidth of the primary candidate path of the SRv6 TE Policy shall be used as the expected occupied bandwidth. If the primary candidate path of the SRv6 TE Policy has already carried traffic for the target service attribute, then the average real-time bandwidth of the primary candidate path of the SRv6 TE Policy obtained within a preset number of preset periods will be used as the expected bandwidth occupied.

23. The electronic device according to any one of claims 13-15, characterized in that, The at least one IPR template belongs to the same SRv6 TE Policy group, and the SRv6 TE Policy group matches the destination address.