Message forwarding method and device, computer equipment and readable storage medium

By clearly specifying the forwarding path in the cloud network, the problem of difficult to customize the data transmission path in the existing technology is solved, and higher network controllability and flexibility are achieved.

CN119583425APending Publication Date: 2025-03-07CHINA TELECOM CLOUD TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411791442.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the existing cloud network environment, the forwarding of data packets depends on the automatic hash routing of network devices based on five-tuple information, making it difficult to achieve users' customized needs for data transmission paths, especially in traffic scenarios where key service traffic of key users or strict requirements for service quality.

Method used

Provide a message forwarding method, by obtaining the message to be forwarded and its corresponding forwarding path, encapsulates the tunnel header information, and sends it to the initial network element, instructing it to send the message to the destination network element according to the forwarding path. This method clearly specifies the forwarding path to realize the customization requirements of the data transmission path.

Benefits of technology

The customization of data transmission paths is achieved and the network controllability is provided. Network administrators can adjust the forwarding paths according to actual needs to deal with dynamic changes and potential risks in the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583425A_ABST
    Figure CN119583425A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of network communication, in particular to a message forwarding method and device, computer equipment and a readable storage medium. The method comprises the following steps: acquiring a to-be-forwarded message and a forwarding path corresponding to the to-be-forwarded message; the forwarding path comprises network element addresses of a plurality of forwarding network elements and a forwarding sequence among the plurality of forwarding network elements; the plurality of forwarding network elements comprise an initial network element, a destination network element and at least one intermediate network element; according to the forwarding path, packaging tunnel header information of the message to be forwarded to obtain a packaged message to be forwarded; and issuing the packaged to-be-forwarded message to the initial network element to indicate the initial network element to send the to-be-forwarded message to the target network element through the intermediate network element according to the tunnel header information of the to-be-forwarded message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to a message forwarding method, device, computer equipment and readable storage medium. Background Art

[0002] With the rapid advancement of cloud computing technology, data traffic in cloud networks is experiencing unprecedented growth. In this context, how to ensure that key business data packets of key users can be transmitted with high performance and low latency in cloud networks has become a technical challenge that needs to be overcome urgently.

[0003] In the existing cloud network environment framework, data packet forwarding often relies on network devices to automatically perform hash routing selection based on quintuple information.

[0004] However, this mechanism has some shortcomings when dealing with specific scenarios, especially when it comes to key business traffic of key users, or traffic with strict requirements on service quality. The above-mentioned general forwarding method is difficult to realize the user's customized requirements for data transmission paths, so it is urgently needed to be improved. Summary of the invention

[0005] Based on this, it is necessary to provide a message forwarding method, device, computer equipment and readable storage medium that can meet the user's personalized message transmission needs in response to the above technical problems.

[0006] In a first aspect, the present application provides a message forwarding method, which is applied to an open virtual switch OVS in a cloud network, and the method includes:

[0007] Obtaining a message to be forwarded and a forwarding path corresponding to the message to be forwarded; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element, and at least one intermediate network element;

[0008] Encapsulate the tunnel header information of the message to be forwarded according to the forwarding path to obtain the encapsulated message to be forwarded;

[0009] The encapsulated message to be forwarded is sent to the initial network element to instruct the initial network element to send the message to be forwarded to the destination network element via the intermediate network element according to the tunnel header information of the message to be forwarded.

[0010] In an exemplary embodiment, encapsulating the tunnel header information of the message to be forwarded according to the network element address information of each network element in the forwarding path to obtain the encapsulated message to be forwarded includes:

[0011] The forwarding path is added to the option field in the Geneve information of the general network virtual encapsulation tunnel of the message to be forwarded, so as to obtain the encapsulated message to be forwarded.

[0012] In an exemplary embodiment, obtaining a forwarding path corresponding to a message to be forwarded includes:

[0013] Obtain the flow table KEY corresponding to the message to be forwarded, which includes the source address and destination address of the message to be forwarded;

[0014] Determine the initial network element of the forwarding path from the candidate network elements in the cloud network according to the source address;

[0015] Determine the destination network element of the forwarding path from the candidate network elements in the cloud network according to the destination address;

[0016] At least one intermediate network element of a forwarding path and a forwarding order between the intermediate network elements are determined from candidate network elements other than the initial network element and the destination network element in the cloud network.

[0017] In an exemplary embodiment, determining at least one intermediate network element of a forwarding path and a forwarding order between the intermediate network elements from candidate network elements other than an initial network element and a destination network element in a cloud network includes:

[0018] Obtaining at least one intermediate network element of a forwarding path selected by the management party from candidate network elements other than the initial network element and the destination network element in the cloud network, and a forwarding order between the intermediate network elements;

[0019] Or, at least one intermediate network element of the forwarding path and a forwarding order between the intermediate network elements are determined according to the network status of each candidate network element except the initial network element and the destination network element in the cloud network.

[0020] In an exemplary embodiment, the network status of the candidate network element includes at least bandwidth utilization, delay, and packet loss rate.

[0021] In a second aspect, the present application provides a message forwarding method, which is applied to an initial network element in a cloud network, and the method includes:

[0022] Obtain the encapsulated message to be forwarded;

[0023] Parsing the tunnel information in the encapsulated message to be forwarded to obtain a forwarding path; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element and at least one intermediate network element;

[0024] Determine, according to the forwarding path, a next intermediate network element corresponding to the initial network element from at least one intermediate network element;

[0025] Update the destination address of the message to be forwarded according to the network element address information of the next intermediate network element;

[0026] Based on the updated destination address, the encapsulated message to be forwarded is sent to the next intermediate network element, so that the next intermediate network element sends the message to be forwarded to the destination network element via other intermediate network elements.

[0027] In a third aspect, the present application provides a message forwarding device configured in an initial network element in a cloud network, the device comprising:

[0028] A message path acquisition module, used to acquire a message to be forwarded and a forwarding path corresponding to the message to be forwarded; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element and at least one intermediate network element;

[0029] A path encapsulation module is used to encapsulate the tunnel header information of the message to be forwarded according to the forwarding path to obtain the encapsulated message to be forwarded;

[0030] The message sending module is used to send the encapsulated message to be forwarded to the initial network element to instruct the initial network element to send the message to be forwarded to the destination network element via the intermediate network element according to the tunnel header information of the message to be forwarded.

[0031] In a fourth aspect, the present application provides a message forwarding device, which is configured in an initial network element in a cloud network, and the device includes:

[0032] A message acquisition module, used to acquire the encapsulated message to be forwarded;

[0033] A parsing module, used to parse the tunnel information in the encapsulated message to be forwarded to obtain a forwarding path; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element and at least one intermediate network element;

[0034] A path determination module, configured to determine, according to the forwarding path, from at least one intermediate network element, a next intermediate network element corresponding to the initial network element;

[0035] An address updating module, used for updating the destination address of the message to be forwarded according to the network element address information of the next intermediate network element;

[0036] The message sending module is used to send the encapsulated message to be forwarded to the next intermediate network element based on the updated destination address, so that the next intermediate network element sends the message to be forwarded to the destination network element via other intermediate network elements.

[0037] In a fifth aspect, the present application further provides an open virtual switch OVS, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0038] Obtaining a message to be forwarded and a forwarding path corresponding to the message to be forwarded; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element, and at least one intermediate network element;

[0039] Encapsulate the tunnel header information of the message to be forwarded according to the forwarding path to obtain the encapsulated message to be forwarded;

[0040] The encapsulated message to be forwarded is sent to the initial network element to instruct the initial network element to send the message to be forwarded to the destination network element via the intermediate network element according to the tunnel header information of the message to be forwarded.

[0041] In a sixth aspect, the present application further provides an initial network element, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0042] Obtain the encapsulated message to be forwarded;

[0043] Parsing the tunnel information in the encapsulated message to be forwarded to obtain a forwarding path; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element and at least one intermediate network element;

[0044] Determine, according to the forwarding path, a next intermediate network element corresponding to the initial network element from at least one intermediate network element;

[0045] Update the destination address of the message to be forwarded according to the network element address information of the next intermediate network element;

[0046] Based on the updated destination address, the encapsulated message to be forwarded is sent to the next intermediate network element, so that the next intermediate network element sends the message to be forwarded to the destination network element via other intermediate network elements.

[0047] In a seventh aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0048] Obtaining a message to be forwarded and a forwarding path corresponding to the message to be forwarded; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element, and at least one intermediate network element;

[0049] Encapsulate the tunnel header information of the message to be forwarded according to the forwarding path to obtain the encapsulated message to be forwarded;

[0050] The encapsulated message to be forwarded is sent to the initial network element to instruct the initial network element to send the message to be forwarded to the destination network element via the intermediate network element according to the tunnel header information of the message to be forwarded.

[0051] In an eighth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0052] Obtain the encapsulated message to be forwarded;

[0053] Parsing the tunnel information in the encapsulated message to be forwarded to obtain a forwarding path; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element and at least one intermediate network element;

[0054] Determine, according to the forwarding path, a next intermediate network element corresponding to the initial network element from at least one intermediate network element;

[0055] Update the destination address of the message to be forwarded according to the network element address information of the next intermediate network element;

[0056] Based on the updated destination address, the encapsulated message to be forwarded is sent to the next intermediate network element, so that the next intermediate network element sends the message to be forwarded to the destination network element via other intermediate network elements.

[0057] In a ninth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0058] Obtaining a message to be forwarded and a forwarding path corresponding to the message to be forwarded; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element, and at least one intermediate network element;

[0059] Encapsulate the tunnel header information of the message to be forwarded according to the forwarding path to obtain the encapsulated message to be forwarded;

[0060] The encapsulated message to be forwarded is sent to the initial network element to instruct the initial network element to send the message to be forwarded to the destination network element via the intermediate network element according to the tunnel header information of the message to be forwarded.

[0061] In a tenth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0062] Obtain the encapsulated message to be forwarded;

[0063] Parsing the tunnel information in the encapsulated message to be forwarded to obtain a forwarding path; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element and at least one intermediate network element;

[0064] Determine, according to the forwarding path, a next intermediate network element corresponding to the initial network element from at least one intermediate network element;

[0065] Update the destination address of the message to be forwarded according to the network element address information of the next intermediate network element;

[0066] Based on the updated destination address, the encapsulated message to be forwarded is sent to the next intermediate network element, so that the next intermediate network element sends the message to be forwarded to the destination network element via other intermediate network elements.

[0067] The above-mentioned message forwarding method, device, computer equipment and readable storage medium, by explicitly specifying the forwarding path, can realize the customized requirements of the data transmission path. Compared with relying on quintuple information for automatic hash routing selection, this method provides higher network controllability. Network administrators can adjust the forwarding path according to actual needs to cope with dynamic changes and potential risks in the network. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0069] Figure 1 A schematic diagram of a flow chart of a message forwarding method in an embodiment;

[0070] Figure 2 A schematic diagram of a Geneve head structure in one embodiment;

[0071] Figure 3 A schematic diagram of a flow chart of a step of obtaining a forwarding path corresponding to a message to be forwarded in an embodiment;

[0072] Figure 4 A schematic diagram of an application environment of a message forwarding method in an embodiment;

[0073] FIG5 (a) is a schematic diagram of forwarding an encapsulated message to be forwarded along a forwarding path in one embodiment;

[0074] Figure 5 (b) is a schematic diagram of message P1;

[0075] Figure 5 (c) is a schematic diagram of message P2;

[0076] Figure 5 (d) is a schematic diagram of message P3;

[0077] Figure 6 A schematic diagram of a flow chart of a message forwarding method in another embodiment;

[0078] Figure 7 is a structural block diagram of a message forwarding device in an embodiment;

[0079] Figure 8 It is a structural block diagram of a message forwarding device in another embodiment. DETAILED DESCRIPTION

[0080] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0081] In an exemplary embodiment, Figure 1 As shown, a message forwarding method is provided, and the method is applied to an open virtual switch OVS in a cloud network as an example for explanation, including:

[0082] S101, obtaining a message to be forwarded and a forwarding path corresponding to the message to be forwarded.

[0083] The forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements. The multiple forwarding network elements include an initial network element, a destination network element, and at least one intermediate network element.

[0084] It is understandable that the message to be forwarded refers to the data packet waiting to be sent in the network. These data packets contain key information such as source address, destination address, data content, etc.

[0085] Optionally, the forwarding path refers to the transmission path of a data packet from the source node (i.e., the initial network element) to the target node (i.e., the destination network element) in the network. This path is usually composed of multiple forwarding network elements, including the initial network element, the destination network element, and at least one intermediate network element. Each forwarding network element has a unique network element address in the network to identify its location and communicate with other network elements.

[0086] The forwarding path corresponding to the message to be forwarded may be pre-set or pre-generated.

[0087] S102, encapsulating the tunnel header information of the message to be forwarded according to the forwarding path to obtain the encapsulated message to be forwarded.

[0088] It is understandable that in network communications, when using tunneling technology, it is often necessary to encapsulate data packets so that they can be transmitted on a specific network path (i.e., a tunnel). The encapsulation process involves adding additional header information (i.e., "tunnel header information") before the original data packet (here, the "message to be forwarded"). This header information contains tunnel-related parameters and instructions to ensure that the data packet can be correctly transmitted to the target node through the tunnel.

[0089] Optionally, based on the selected tunnel technology and network configuration, generate or obtain tunnel header information that should be added to the packet to be forwarded. The tunnel header information usually contains a tunnel identifier (such as a tunnel ID), a source address (which may be the entry point of the tunnel), a destination address (the exit point or the final destination of the tunnel), a checksum (for error detection), and other possible tunnel-specific parameters.

[0090] The generated tunnel header information is added to the front of the message to be forwarded. This process may involve combining the data portion of the original message with the tunnel header information to form a new, larger data packet. The new data packet now contains the tunnel header information and all the contents of the original message. After the above encapsulation process, an encapsulated message to be forwarded containing the tunnel header information is obtained. This message is now ready to be transmitted on the tunnel.

[0091] The encapsulated message will be transmitted in the network through the tunnel according to the previously determined forwarding path. Each forwarding network element (including the initial network element, intermediate network element and destination network element) will process the message according to the instructions and parameters in the tunnel header information to ensure that it can be correctly forwarded to the next network element until it finally reaches the destination network element.

[0092] S103, sending the encapsulated message to be forwarded to the initial network element to instruct the initial network element to send the message to be forwarded to the destination network element via the intermediate network element according to the tunnel header information of the message to be forwarded.

[0093] Optionally, the encapsulated message to be forwarded is sent to the initial network element in the network. This initial network element is the starting point for the message to enter the network and the starting point of the tunnel transmission. After receiving the encapsulated message to be forwarded, the initial network element will parse the tunnel header information to obtain the instructions and parameters therein. Based on the tunnel header information, the initial network element will determine the next network element (i.e., the intermediate network element or the destination network element) that should forward the message and prepare to send the message out. If the forwarding path contains intermediate network elements, the initial network element will send the message to the first intermediate network element. Each intermediate network element will repeat the processing process of the initial network element: parse the tunnel header information, determine the next forwarding network element, and send the message out. This process will continue until the message reaches the destination network element or encounters an error / abnormal situation. Finally, the encapsulated message to be forwarded will reach the destination network element. The destination network element will parse the tunnel header information, identify that this is the message it should receive, and process the message as needed (for example, pass the message to the upper layer application, store, or further forward, etc.).

[0094] The above-mentioned message forwarding method, this application can realize the customized requirements of the data transmission path by clearly specifying the forwarding path. Compared with relying on quintuple information for automatic hash routing selection, this method provides higher network controllability. Network administrators can adjust the forwarding path according to actual needs to cope with dynamic changes and potential risks in the network.

[0095] In an exemplary embodiment, the tunnel header information of the message to be forwarded is encapsulated according to the network element address information of each network element in the forwarding path to obtain the encapsulated message to be forwarded, including: adding the forwarding path to the option field in the general network virtual encapsulation tunnel Geneve information of the message to be forwarded to obtain the encapsulated message to be forwarded.

[0096] Optionally, when the tunnel encapsulation protocol is selected as Geneve, the encapsulation process follows the format and requirements specific to the Geneve protocol.

[0097] Geneve is a commonly used encapsulation protocol in network virtualization technology, which allows efficient transmission of data packets between different network domains or virtualization environments. In Geneve encapsulation, the message header contains a series of fields to indicate how to process the encapsulated data packet. The Geneve header structure is as follows: Figure 2 As shown; among which:

[0098] Ver: Version field, used to clearly identify the version information of the protocol or data packet to ensure the compatibility of data between different versions.

[0099] Opt: This is an option field, which contains optional control information and is used to provide additional configuration or function options.

[0100] Len: It is the length field, which indicates the total length of the subsequent fields and helps to parse and verify the integrity of the data packet.

[0101] O (Operation field): Identifies the operation type and specifies the specific action or request performed by the data packet.

[0102] C (Class field): Used to distinguish the categories or types of data packets to facilitate classification processing and routing decisions.

[0103] Rsvd.: This is a reserved field, usually set to 0, to reserve space for future expansion or special purposes.

[0104] ProtocolType: This is the protocol type field, which clearly identifies the protocol type used to ensure that the data packet is processed at the correct protocol stack layer.

[0105] VirtualNetworkIdentifier (VNI): This is the virtual network identifier field that uniquely identifies a virtual network and is used to distinguish different network instances in a virtualized environment.

[0106] Reserved: This is a reserved field, also reserved for future expansion or specific purposes, and is usually set to 0.

[0107] Variable-LengthOptions: A variable-length option field that contains additional information of variable length and is used to provide additional configuration or data to enhance the flexibility and functionality of the data packet.

[0108] In this embodiment, the user message is carried by using the Geneve tunnel message encapsulation format, and the optimal path information is carried by adding an option type of ip_list.

[0109] For example, the option structure is defined as follows:

[0110] struct ip_list_opts

[0111] {

[0112] uint16_t option_class; / *Option class, 10000. * /

[0113] uint8_t type; / **< Options type ip_list example 0x06. * /

[0114] uint8_t len; / **< Options length 2 ips is 4. * /

[0115] uint8_t ip_cnt; / **< conter of ips. is 2 * /

[0116] uint8_t cur_ip_id; / **< current index in the iplist 1* /

[0117] uint16_t rsv0;

[0118] uint32_t ips[]; / **< Variable length ips. * /

[0119] } __attribute__((__packed__));

[0120] Specifically, the ip_list structure is described in Table 1 below:

[0121] Table 1

[0122] Field Name Bit width meaning option_class 16 A collection of major categories, usually classified by company type 8 The subclass under the general class can be defined as 6 in this case, which represents ip_list Len 8 Option length, in 4 bytes ip_cnt 8 ips contains the number of ips cur_ip_id 8 The current encapsulation uses the ip index in ips rsv0 16 Not used, fill in 0 Ips 32*ip_cnt IP address set of key network element interfaces in the path

[0123] It is understood that option_class (16 bits) is a field that identifies the option category, which is usually used to distinguish options defined by different companies or organizations. In this context, it can be set to a specific value (such as 10000) to identify that this is an IP list option.

[0124] Type (8 bits) This field is used to further subdivide the specific type under the option category. In the example you provided, the type is set to 0x06, indicating that this is an ip_list type option.

[0125] len (8 bits) This field indicates the length of the option, in units of 4 bytes (or 32 bits). Since the ips field is variable length, the len field is used to indicate the total length of the entire ip_list_opts structure (including the fixed part and the variable length part). It should be noted that the length here should include all fields, not just the length of the ips array.

[0126] ip_cnt (8 bits) This field indicates the number of IP addresses contained in the ips array. It tells the receiver how many IP addresses it should expect to find in the ips array.

[0127] cur_ip_id (8 bits) This field indicates the position of the IP index used by the current encapsulation in the ips array. It allows the receiver to know which IP address the current message should be forwarded using. In multipath or load balancing scenarios, this field can change dynamically.

[0128] rsv0 (16 bits) This is a reserved field, currently unused, and should be set to 0. It provides room for future extensions.

[0129] ips (32*ip_cnt bits) This is a variable length field that contains the set of IP addresses of key network element interfaces passed through in the path. Each IP address is 32 bits, so the total length of the ips array is ip_cnt multiplied by 4 bytes (32 bits). This field allows the encapsulator to specify one or more IP addresses as part of the message transmission path.

[0130] Exemplarily, when constructing a Geneve message, if you need to carry IP list information, you can create an ip_list_opts structure instance and fill in the corresponding fields; the option_class, type and len fields should be set according to the protocol specification and actual needs; the ip_cnt field should be set to the number of IP addresses in the ips array; the cur_ip_id field should be set to the IP index that should be currently used (usually counting from 1); the rsv0 field should be set to 0; the ips array should contain the IP addresses of all forwarding network elements in the path, arranged in the forwarding order between the forwarding network elements; finally, the entire ip_list_opts structure (including the fixed part and the ips array) is attached as binary data to the option field of the Geneve message.

[0131] In an exemplary embodiment, Figure 3 As shown, obtaining the forwarding path corresponding to the message to be forwarded includes:

[0132] S301, obtaining the flow table KEY corresponding to the message to be forwarded.

[0133] The flow table KEY includes the source address and destination address of the message to be forwarded.

[0134] For example, the flow table KEY corresponding to the message to be forwarded usually includes the following key fields or information, which are used to uniquely identify and match specific network traffic:

[0135] VNI (Virtual Network Identifier): In a cloud network environment, especially when using virtualization technologies (such as SDN, NFV, etc.), VNI is used to distinguish different virtual networks or tenant networks. The flow table KEY can include the VNI field to ensure that the message is correctly routed to the corresponding virtual network.

[0136] Source IP Address: The sender IP address of the message. In the flow table KEY, the source IP address is used to match traffic from a specific sender.

[0137] Destination IP Address: The IP address of the recipient of the message. The flow table KEY contains the destination IP address so that the message can be routed to the correct destination.

[0138] IP Protocol Type: The IP protocol type used by the message, such as TCP, UDP, ICMP, etc. The IP protocol type is specified in the flow table KEY to match a specific type of network traffic.

[0139] TOS (Type of Service): The TOS field is used to indicate the quality of service requirements of the message, such as priority, throughput, latency, etc. Including the TOS field in the flow table KEY can achieve differentiated processing of traffic with different quality of service requirements.

[0140] Source Port: For connection-oriented protocols such as TCP or UDP, the source port is used to identify the sender's application or service. The source port field can be included in the flow table key to match traffic from a specific application or service.

[0141] Destination Port: For connection-oriented protocols such as TCP or UDP, the destination port is used to identify the receiving application or service. The flow table KEY contains the destination port field to route the message to the correct application or service.

[0142] Optionally, in this embodiment, the source address of the message to be forwarded includes the source IP address and source port of the message; in this embodiment, the destination address of the message to be forwarded includes the destination IP address and destination port of the message.

[0143] S302: Determine an initial network element of a forwarding path from candidate network elements in the cloud network according to the source address.

[0144] It is understandable that in cloud networks, the source address is key information for identifying the originator of a data message. Through the source address, it is possible to determine which network node or terminal device the message is sent from, thereby making corresponding routing or forwarding decisions.

[0145] First, the source IP address and source port information carried in the message need to be parsed. The source IP address is used to determine the network location of the message initiator, while the source port may be used to identify a specific application or service. Candidate network elements in the cloud network usually include access gateways (AGWs), Internet gateways (IGWs), service gateways (SGWs), etc. It is necessary to find the network element that is directly connected to or closest to the message initiator among the candidate network elements based on the source address information. Among the matched candidate network elements, the network element that is closest to the message initiator or has the best connection status is selected as the initial network element. The initial network element is usually the first processing node after the message enters the cloud network, and is responsible for forwarding the message to subsequent network elements or destinations.

[0146] S303: Determine a destination network element of the forwarding path from candidate network elements in the cloud network according to the destination address.

[0147] It is understandable that in a cloud network, the destination address is key information of the intended recipient of a data message. Through the destination address, it is possible to determine which network node or terminal device the message should be forwarded to, thereby completing the data transmission.

[0148] Optionally, the destination IP address and destination port information carried in the message are first parsed. The destination IP address is used to determine the network location or subnet to which the message should arrive, while the destination port is used to identify the application or service of the receiver. According to the parsed destination address information, the internally maintained routing table or flow table is queried. These table entries record the forwarding path or next-hop network element information corresponding to different destination addresses. In the queried routing table or flow table entry, the next-hop network element or forwarding path that matches the destination address will be found. These next-hop network elements or forwarding paths are usually candidate network elements in the cloud network, such as the access gateway (AGW), the Internet gateway (IGW), the service gateway (SGW), etc. Among the matched candidate network elements, the network element closest to the destination or with the best connection status is selected as the destination network element. The destination network element is usually the last processing node of the message in the cloud network, responsible for delivering the message to the final recipient.

[0149] S304: Determine at least one intermediate network element of the forwarding path and a forwarding order between the intermediate network elements from candidate network elements other than the initial network element and the destination network element in the cloud network.

[0150] Optionally, query possible paths from the initial network element to the destination network element. This path information usually includes the identification and forwarding order of the intermediate network elements. Evaluate the quality of each path based on criteria such as path optimality, load balancing, network policy, and security requirements. This may involve calculating indicators such as path latency, bandwidth utilization, and security. Based on the evaluation of path quality, select the optimal combination of intermediate network elements and their forwarding order. If there are multiple paths to choose from, consider implementing load balancing or path redundancy.

[0151] In an exemplary embodiment, determining at least one intermediate network element of a forwarding path and a forwarding order between the intermediate network elements from candidate network elements other than an initial network element and a destination network element in a cloud network includes:

[0152] In one achievable manner, at least one intermediate network element of a forwarding path selected by a management party from candidate network elements other than an initial network element and a destination network element in a cloud network, and a forwarding order between the intermediate network elements are obtained.

[0153] It can be understood that obtaining at least one intermediate network element of the forwarding path selected by the management party from the candidate network elements other than the initial network element and the destination network element in the cloud network refers to a pre-set forwarding path, namely, static routing: Static routing refers to the routing information manually configured on each network device by the network administrator according to the network topology and business requirements. These routing information specifies the path that the data packet should take from the source address to the destination address. The advantages of static routing are simple configuration, easy management, and no reliance on dynamic routing protocols in the network.

[0154] Or, in another achievable manner, at least one intermediate network element of the forwarding path and the forwarding order between the intermediate network elements are determined based on the network status of each candidate network element except the initial network element and the destination network element in the cloud network.

[0155] It can be understood that at least one intermediate network element of the forwarding path is determined based on the network status of each candidate network element other than the initial network element and the destination network element in the cloud network, which refers to the pre-generated forwarding path, that is, dynamic routing: dynamic routing is to automatically calculate and generate routing tables through routing protocols in the network. These routing protocols can sense changes in network topology and dynamically update routing information based on the changes. The advantage of dynamic routing is that it is highly flexible and adaptable, can automatically adapt to changes in network topology, and can select the best forwarding path based on network conditions (such as link quality, congestion, etc.).

[0156] The network status of the candidate network element at least includes bandwidth utilization, delay and packet loss rate.

[0157] It can be understood that bandwidth utilization refers to the ratio of the bandwidth currently used by the network element to its total bandwidth. It reflects the bandwidth resource usage of the network element. Latency refers to the time required for a message to reach the receiving end from the sender. It reflects the speed and efficiency of network transmission. Packet loss rate refers to the ratio of the number of messages lost during network transmission to the total number of messages. It reflects the reliability and stability of the network.

[0158] Exemplarily, based on the above-mentioned message forwarding method, an application environment of the message forwarding method is provided, and the application environment is applied to a cloud network. In the cloud network, an open virtual switch OVS in the cloud network accesses the public network through an elastic public IP (EIP). Figure 4 As shown:

[0159] In such Figure 4 In the example, the initial path generated by the open virtual switch OVS for the packets to be forwarded is: VM -> OVS -> IGW -> SGW -> Cloud Network Border Gateway. Cloud monitoring found that in the original path (shown by the red line), some network elements had high loads, resulting in long forwarding delays. To ensure the access quality of VIP customer cvm1, the monitoring tool generated a forwarding path for it to access the public network: cvm1 -> OVS -> IGW1 -> SGW2 -> Cloud Network Border Gateway. This path effectively improves network performance and user experience by selecting network elements with low loads and short forwarding delays.

[0160] exist Figure 4 Based on the forwarding path provided, the open virtual switch OVS encapsulates the message to be forwarded, as shown in the messages P1, P2 and P3 in Figure 5: Before processing, the message to be forwarded is an ordinary user data message without any path information. After processing, the message to be forwarded is encapsulated with the Geneve tunnel header information (that is, the encapsulated message to be forwarded) and carries the IP address list of the key nodes of the forwarding path. This encapsulation process enables the message to be forwarded to be forwarded in the cloud network according to the preset forwarding path. At the same time, when the message to be forwarded reaches the last node of the forwarding path, the path information and tunnel header will be stripped off, restored to the original user data message form, and then forwarded to the destination.

[0161] In Figure 5 (b), message P1 is an encapsulated message to be processed that is forwarded by the virtual machine OVS to one of the intermediate network elements (IGW1). The fields in the message to be forwarded are:

[0162] igw1mac: represents the MAC address of the first interface (IGW1).

[0163] smac: Source MAC address, that is, the MAC address of the device that sends the data packet.

[0164] vm-vtep-ip: IP address of the VTEP (Virtual Tunnel End Point) of the virtual switch OVS.

[0165] igw1-ip: IP address of the first interface (IGW1).

[0166] udphdr-sport: UDP source port number.

[0167] 6801: Specific port number or protocol number used for network traffic filtering.

[0168] vm-mac: MAC address of the virtual switch OVS.

[0169] vm_sip: source IP address of the virtual switch OVS.

[0170] dst-ip: destination IP address.

[0171] sport: Source port number, used to identify the port from which the data packet is sent.

[0172] dport: Destination port number, used to identify the receiving port of the data packet.

[0173] Geneve-header (tunnel information of the message to be forwarded): parameters of the Geneve protocol header, including the virtual path identifier, protocol type, option field, IP address list and its number, currently used IP address ID and port range. The forwarding path in this embodiment is stored in the IP address list.

[0174] In Figure 5 (b), message P2 is an encapsulated message to be processed that is forwarded from IGW1 to another intermediate network element (SGW2). The fields in the message to be forwarded are:

[0175] sgw1mac, igw1mac: source and destination MAC addresses.

[0176] igw1_ip, sgw2-ip: source and destination IP addresses.

[0177] udphdr-sport: UDP source port.

[0178] dst-ip: destination IP address.

[0179] sport, dport: source and destination port.

[0180] data: data packet content.

[0181] geneve-header: Geneve protocol header, including vni (virtual network identifier), proto_type (protocol type), options (such as IP list, IP count, current IP ID).

[0182] In this process, the option path information in the Geneve header can be stripped together with the tunnel at the last hop or stripped at the penultimate hop. The matching conditions are divided into two cases: including the detailed options field and not including the options field.

[0183] In Figure 5 (b), message P3 is an encapsulated message to be processed that is forwarded from IGW1 to another intermediate network element (SGW2). The fields in the message to be forwarded are:

[0184] gw-mac: Gateway ID associated with the MAC address.

[0185] sgw2-relay-port-mac: Relay function of service gateway SGW2 with a port based on MAC address.

[0186] vm_sip: Session Initiation Protocol (SIP) service on a virtual machine (VM).

[0187] dst-ip: Destination IP address, indicating the recipient of the data packet.

[0188] sport: Source port, identifies the port where the packet is sent.

[0189] dport: Destination port, which identifies the port of the data packet receiver.

[0190] data: the data content to be transmitted.

[0191] In an exemplary embodiment, Figure 6 As shown, a message forwarding method is provided, taking the method applied to an initial network element in a cloud network as an example, including:

[0192] S601: Obtain an encapsulated message to be forwarded.

[0193] Optionally, the initial network element first receives an encapsulated message to be forwarded, which may have been encapsulated in one or more tunnel protocols for transmission in the cloud network.

[0194] S602, parsing the tunnel information in the encapsulated message to be forwarded to obtain a forwarding path.

[0195] The forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements. The multiple forwarding network elements include an initial network element, a destination network element, and at least one intermediate network element.

[0196] Specifically, the initial network element parses the tunnel information in the message, which usually includes the tunnel header or other encapsulation protocol information, and extracts the forwarding path from the tunnel information, the path including the network element addresses of multiple forwarding network elements and the forwarding order between them.

[0197] S603: Determine, according to the forwarding path, from at least one intermediate network element, a next intermediate network element corresponding to the initial network element.

[0198] Optionally, based on the parsed forwarding path, the initial network element determines a next intermediate network element that should receive the message.

[0199] S604: Update the destination address of the message to be forwarded according to the network element address information of the next intermediate network element.

[0200] Optionally, the initial network element updates the destination address field of the message according to the determined address of the next intermediate network element.

[0201] S605, based on the updated destination address, the encapsulated message to be forwarded is sent to the next intermediate network element, so that the next intermediate network element sends the message to be forwarded to the destination network element via other intermediate network elements. The initial network element sends the message to the next intermediate network element according to the updated destination address.

[0202] Exemplarily, for the next intermediate network element that receives the encapsulated message to be forwarded, the message processing process is as follows:

[0203] (1) Obtain the encapsulated message to be forwarded and determine whether the cur_ip_id of the encapsulated message to be forwarded is less than ip_cn.

[0204] It can be understood that the cur_ip_id of the encapsulated message to be forwarded is the message identifier of the currently processed IP message (the currently processed IP message is the encapsulated message to be forwarded), and ip_cn is the total number of all fragments of the IP message or the preset upper limit of the processing range.

[0205] (2) If so, cur_ip_id is incremented, ips[cur_ip_id] is used as the destination IP address, and the tunnel header is encapsulated.

[0206] If cur_ip_id is less than ip_cnt, it means that the current message has not been processed yet, and there are subsequent fragmentation or processing steps to be performed, such as continuing to increment cur_ip_id, taking ips[cur_ip_id] as the destination IP address and encapsulating the tunnel header, etc. This ensures that each fragment is processed correctly to avoid data loss or omission.

[0207] It is understandable that the value of cur_ip_id is incremented so as to process the next IP fragment or message. This step ensures that each message or fragment can be uniquely identified and processed sequentially.

[0208] Using the incremented cur_ip_id as the index, the corresponding destination IP address is retrieved from the IP address array ips in the above ip_list_opts. This step ensures that the message can be forwarded according to the predetermined destination address.

[0209] (3) If not, execute the operation of stripping the P_list option.

[0210] If cur_ip_id is not less than ip_cnt, it may mean that the current message has been processed to the last fragment or has reached the preset processing range upper limit. At this time, the corresponding operation will be performed according to the specific situation, such as stripping P_listoption or sending the message. This judgment mechanism helps to ensure the accuracy and efficiency of message processing and the integrity and reliability of data transmission.

[0211] (4) Determine whether the incremented cur_ip_id is equal to ip_cnt-1, and check whether the second-to-last item in the message options has the stripping function enabled.

[0212] It can be understood that judging whether the incremented cur_ip_id is equal to ip_cnt-1 is to confirm whether the currently processed message fragment is the second to last fragment (because the array or list index usually starts from 0, so ip_cnt-1 means the one before the last fragment).

[0213] It is understandable that the penultimate item in the message options is checked to see if the stripping function is enabled. The message options may contain a series of flags or parameters used to control the message processing behavior, and the stripping function may be one of them, which is used to indicate that certain parts or options in the message need to be removed under certain conditions.

[0214] (5) If yes, execute the operation of stripping P_list option.

[0215] It is understandable that if cur_ip_id is equal to ip_cnt-1, and the penultimate item in the message option does enable the stripping function, then the stripping of the P_list option will be performed.

[0216] This means that the P_list option or other specified parts in the message will be removed, perhaps to reduce the message size, meet network transmission requirements, or comply with specific network protocols.

[0217] (6) If not, the encapsulated message to be forwarded is sent.

[0218] It is understood that if cur_ip_id is not equal to ip_cnt-1, or the stripping function is not enabled in the message options, the stripping operation will be skipped and the encapsulated message to be forwarded will be directly sent. This usually includes sending the message to the next network node, network element or final destination.

[0219] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0220] Based on the same inventive concept, the embodiment of the present application also provides a message forwarding device for implementing the message forwarding method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more message forwarding device embodiments provided below can refer to the limitations on the message forwarding method above, and will not be repeated here.

[0221] In an exemplary embodiment, Figure 7 As shown, a message forwarding device is provided, which is configured in an open virtual switch OVS in a cloud network, and the device includes:

[0222] The message path acquisition module 71 is used to acquire the message to be forwarded and the forwarding path corresponding to the message to be forwarded; the forwarding path includes the network element addresses of multiple forwarding network elements and the forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include the initial network element, the destination network element and at least one intermediate network element;

[0223] A path encapsulation module 72, used to encapsulate the tunnel header information of the message to be forwarded according to the forwarding path to obtain the encapsulated message to be forwarded;

[0224] The message sending module 73 is used to send the encapsulated message to be forwarded to the initial network element to instruct the initial network element to send the message to be forwarded to the destination network element via the intermediate network element according to the tunnel header information of the message to be forwarded.

[0225] In an exemplary embodiment, Figure 8 As shown, a message forwarding device is provided, which is configured in an initial network element in a cloud network, and the device includes:

[0226] A message acquisition module 81, used to acquire the encapsulated message to be forwarded;

[0227] The parsing module 82 is used to parse the tunnel information in the encapsulated message to be forwarded to obtain a forwarding path; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element and at least one intermediate network element;

[0228] A path determination module 83, configured to determine, according to the forwarding path, from at least one intermediate network element, a next intermediate network element corresponding to the initial network element;

[0229] An address updating module 84, configured to update the destination address of the message to be forwarded according to the network element address information of the next intermediate network element;

[0230] The message sending module 85 is used to send the encapsulated message to be forwarded to the next intermediate network element based on the updated destination address, so that the next intermediate network element sends the message to be forwarded to the destination network element via other intermediate network elements.

[0231] Each module in the above-mentioned message forwarding device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0232] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0233] Obtaining a message to be forwarded and a forwarding path corresponding to the message to be forwarded; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element, and at least one intermediate network element;

[0234] Encapsulate the tunnel header information of the message to be forwarded according to the forwarding path to obtain the encapsulated message to be forwarded;

[0235] The encapsulated message to be forwarded is sent to the initial network element to instruct the initial network element to send the message to be forwarded to the destination network element via the intermediate network element according to the tunnel header information of the message to be forwarded.

[0236] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0237] Obtaining a message to be forwarded and a forwarding path corresponding to the message to be forwarded; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element, and at least one intermediate network element;

[0238] Encapsulate the tunnel header information of the message to be forwarded according to the forwarding path to obtain the encapsulated message to be forwarded;

[0239] The encapsulated message to be forwarded is sent to the initial network element to instruct the initial network element to send the message to be forwarded to the destination network element via the intermediate network element according to the tunnel header information of the message to be forwarded.

[0240] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0241] Obtaining a message to be forwarded and a forwarding path corresponding to the message to be forwarded; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element, and at least one intermediate network element;

[0242] Encapsulate the tunnel header information of the message to be forwarded according to the forwarding path to obtain the encapsulated message to be forwarded;

[0243] The encapsulated message to be forwarded is sent to the initial network element to instruct the initial network element to send the message to be forwarded to the destination network element via the intermediate network element according to the tunnel header information of the message to be forwarded.

[0244] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0245] Obtain the encapsulated message to be forwarded;

[0246] Parsing the tunnel information in the encapsulated message to be forwarded to obtain a forwarding path; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element and at least one intermediate network element;

[0247] Determine, according to the forwarding path, a next intermediate network element corresponding to the initial network element from at least one intermediate network element;

[0248] Update the destination address of the message to be forwarded according to the network element address information of the next intermediate network element;

[0249] Based on the updated destination address, the encapsulated message to be forwarded is sent to the next intermediate network element, so that the next intermediate network element sends the message to be forwarded to the destination network element via other intermediate network elements.

[0250] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0251] Obtain the encapsulated message to be forwarded;

[0252] Parsing the tunnel information in the encapsulated message to be forwarded to obtain a forwarding path; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element and at least one intermediate network element;

[0253] Determine, according to the forwarding path, a next intermediate network element corresponding to the initial network element from at least one intermediate network element;

[0254] Update the destination address of the message to be forwarded according to the network element address information of the next intermediate network element;

[0255] Based on the updated destination address, the encapsulated message to be forwarded is sent to the next intermediate network element, so that the next intermediate network element sends the message to be forwarded to the destination network element via other intermediate network elements.

[0256] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0257] Obtain the encapsulated message to be forwarded;

[0258] Parsing the tunnel information in the encapsulated message to be forwarded to obtain a forwarding path; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element and at least one intermediate network element;

[0259] Determine, according to the forwarding path, a next intermediate network element corresponding to the initial network element from at least one intermediate network element;

[0260] Update the destination address of the message to be forwarded according to the network element address information of the next intermediate network element;

[0261] Based on the updated destination address, the encapsulated message to be forwarded is sent to the next intermediate network element, so that the next intermediate network element sends the message to be forwarded to the destination network element via other intermediate network elements.

[0262] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0263] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0264] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A message forwarding method, characterized in that: An open virtual switch OVS applied in a cloud network, the method comprising: Acquire a message to be forwarded and a forwarding path corresponding to the message to be forwarded; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element and at least one intermediate network element; Encapsulating the tunnel header information of the message to be forwarded according to the forwarding path to obtain an encapsulated message to be forwarded; The encapsulated message to be forwarded is sent to the initial network element to instruct the initial network element to send the message to be forwarded to the destination network element via the intermediate network element according to the tunnel header information of the message to be forwarded.

2. The method according to claim 1, characterized in that: The encapsulating the tunnel header information of the message to be forwarded according to the network element address information of each network element in the forwarding path to obtain the encapsulated message to be forwarded includes: The forwarding path is added to the option field in the general network virtual encapsulation tunnel Geneve information of the message to be forwarded to obtain the encapsulated message to be forwarded.

3. The method according to claim 1, characterized in that Obtaining a forwarding path corresponding to the message to be forwarded includes: Obtaining a flow table KEY corresponding to the message to be forwarded, wherein the flow table KEY includes a source address and a destination address of the message to be forwarded; Determine, according to the source address, an initial network element of the forwarding path from candidate network elements in the cloud network; Determine, according to the destination address, a destination network element of the forwarding path from candidate network elements in the cloud network; At least one intermediate network element of the forwarding path and a forwarding order between the intermediate network elements are determined from candidate network elements in the cloud network except the initial network element and the destination network element.

4. The method according to claim 3, characterized in that The determining, from candidate network elements other than the initial network element and the destination network element in the cloud network, at least one intermediate network element of the forwarding path and a forwarding order between the intermediate network elements comprises: Acquire at least one intermediate network element of the forwarding path selected by the management party from candidate network elements other than the initial network element and the destination network element in the cloud network, and a forwarding order between the intermediate network elements; Or, at least one intermediate network element of the forwarding path and a forwarding order between the intermediate network elements are determined according to the network status of each candidate network element in the cloud network except the initial network element and the destination network element.

5. The method according to claim 4, characterized in that The network status of the candidate network element includes at least bandwidth utilization, delay and packet loss rate.

6. The method according to claim 1, characterized in that An initial network element applied to a cloud network; the method comprising: Obtain the encapsulated message to be forwarded; Parsing the tunnel information in the encapsulated message to be forwarded to obtain a forwarding path; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include the initial network element, the destination network element and at least one intermediate network element; Determine, according to the forwarding path, from at least one intermediate network element, a next intermediate network element corresponding to the initial network element; updating the destination address of the message to be forwarded according to the network element address information of the next intermediate network element; Based on the updated destination address, the encapsulated message to be forwarded is sent to the next intermediate network element, so that the next intermediate network element sends the message to be forwarded to the destination network element via other intermediate network elements.

7. A message forwarding device, characterized in that: An open virtual switch OVS configured in a cloud network, the device comprising: A message path acquisition module, used to acquire a message to be forwarded and a forwarding path corresponding to the message to be forwarded; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include an initial network element, a destination network element and at least one intermediate network element; A path encapsulation module, used to encapsulate the tunnel header information of the message to be forwarded according to the forwarding path to obtain an encapsulated message to be forwarded; The message sending module is used to send the encapsulated message to be forwarded to the initial network element to instruct the initial network element to send the message to be forwarded to the destination network element via the intermediate network element according to the tunnel header information of the message to be forwarded.

8. A message forwarding device, characterized in that: An initial network element configured in a cloud network, the device comprising: A message acquisition module, used to acquire the encapsulated message to be forwarded; A parsing module, configured to parse the tunnel information in the encapsulated message to be forwarded to obtain a forwarding path; the forwarding path includes network element addresses of multiple forwarding network elements and a forwarding order between the multiple forwarding network elements; the multiple forwarding network elements include the initial network element, the destination network element and at least one intermediate network element; A path determination module, configured to determine, according to the forwarding path, from at least one intermediate network element, a next intermediate network element corresponding to the initial network element; An address updating module, configured to update the destination address of the message to be forwarded according to the network element address information of the next intermediate network element; The message sending module is used to send the encapsulated message to be forwarded to the next intermediate network element based on the updated destination address, so that the next intermediate network element sends the message to be forwarded to the destination network element via other intermediate network elements.

9. An open virtual switch OVS, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

10. An initial network element, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method described in claim 6 are implemented.

Citation Information

Patent Citations

  • Computing power access method and device, electronic equipment and storage medium

    CN116346938A

  • Data processing method, network node and computer readable storage medium

    CN116405431A

  • Service message processing method and device, computer equipment and storage medium

    CN118677837A

  • Specifying and utilizing paths through a network

    WO2019147316A1