Flow data distribution method and device, server and storage medium
By analyzing traffic packets in the cloud computing virtual network and matching routing rules, dynamically determining the target forwarding path of traffic packets, the problem of being unable to achieve fine-grained traffic control and parallel distribution in the cloud computing virtual network is solved, and efficient traffic scheduling and management are achieved.
Patent Information
- Application Number
- CN202411765358.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-03
AI Technical Summary
In cloud computing virtual networks, fine-grained traffic control and parallel distribution cannot be achieved, especially in the same subnet of VPC, it can only support a single type of traffic model, resulting in limited traffic scheduling.
By obtaining preconfigured routing rules and traffic packets to be distributed, the traffic packets are parsed, the source address is determined, and the target forwarding path of traffic packets is dynamically determined based on the source address and the preconfigured routing rules, thereby optimizing the utilization efficiency of network resources.
Accurate traffic scheduling based on source address and pre-configured routing rules is realized, network resource utilization efficiency is optimized, traffic management is enhanced, and network congestion or delay is avoided.
Smart Images

Figure CN119788585A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing virtual network technology, and in particular to a flow data distribution method, device, server and storage medium. Background Art
[0002] In cloud environments, traffic scheduling often faces limitations when faced with multiple mixed traffic scenarios. In particular, within the same subnet of a virtual private cloud (VPC), only a single type of traffic model is usually supported, making fine-grained traffic control and efficient traffic management more difficult.
[0003] In cloud environments, traffic scheduling is often limited when faced with multiple mixed traffic scenarios. Typically, only a single type of traffic model can be supported within the same subnet of a VPC, making it more difficult to achieve fine-grained traffic control and efficient traffic management. Summary of the invention
[0004] In view of this, the present invention provides a method, device, server and storage medium for distributing flow data to solve the problem that fine-grained flow control and parallel distribution cannot be achieved in current cloud computing virtual networks.
[0005] In a first aspect, the present invention provides a method for distributing traffic data, comprising: obtaining preconfigured routing rules and traffic data packets to be distributed; parsing the traffic data packets to determine the source address of the traffic data packets; matching the source address with the preconfigured routing rules, and determining a target forwarding path for the traffic data packets based on the matching results; and forwarding the traffic data packets from the source address to the target address according to the target forwarding path.
[0006] The traffic data distribution method provided by the embodiment of the present invention can dynamically select the best forwarding path by parsing the traffic data packets and matching the routing rules, thereby optimizing the utilization efficiency of network resources and realizing accurate traffic scheduling based on the source address and preconfigured routing rules.
[0007] In an optional implementation, forwarding traffic data packets from a source address to a target address according to a target forwarding path includes: obtaining performance parameters of the target forwarding path; adjusting the target forwarding path based on the performance parameters, and forwarding traffic data packets from the source address to the target address according to the adjusted target forwarding path.
[0008] The method for distributing traffic data provided by the embodiment of the present invention can intelligently select the best path based on the real-time performance data of the target forwarding path to avoid network congestion or delay and ensure efficient forwarding of traffic. This adaptive adjustment mechanism improves the responsiveness of the network and enhances the flexibility and reliability of traffic management.
[0009] In an optional implementation, obtaining preconfigured routing rules includes: obtaining preset configuration information of source routing, a default routing table, and a management traffic routing table; generating a source routing table based on routing configuration parameters of the preset configuration information; and determining the preconfigured routing rules based on a priority relationship among the source routing table, the default routing table, and the management traffic routing table.
[0010] The method for distributing traffic data provided by the embodiment of the present invention can accurately generate pre-configured routing rules by comprehensively considering the priority relationship between source routing, default routing table and management traffic routing table, thereby realizing more intelligent and efficient traffic scheduling. By dynamically generating source routing tables based on preset configuration information and adjusting them according to the priorities of different routing tables, the system can flexibly respond to different network environments and business requirements, ensure that data traffic is forwarded along the optimal path, improve network reliability and performance, and avoid potential routing conflicts and performance bottlenecks.
[0011] In an optional embodiment, preconfigured routing rules are determined based on the priority relationship among the source routing table, the default routing table, and the management traffic routing table, including: determining a first priority relationship among the source routing table, the default routing table, and the management traffic routing table, and a second priority relationship between different routing rules based on a preset routing policy; and determining preconfigured routing rules based on the source routing table, the default routing table, the management traffic routing table, the first priority relationship, and the second priority relationship.
[0012] The method for distributing traffic data provided by the embodiment of the present invention first determines the first priority relationship between the source routing table, the default routing table and the management traffic routing table based on a preset routing strategy, thereby reasonably dividing the processing order and priority of different types of traffic. In addition, a second priority relationship between different routing rules is also defined to further optimize the routing selection process. In this way, the method can make more intelligent and efficient routing decisions in a complex network environment, avoid traffic conflicts, and thus significantly improve the reliability, performance and flexibility of the network.
[0013] In an optional embodiment, the source routing table includes a mapping relationship between source routes and forwarding paths of different source addresses and a preset forwarding address corresponding to each source route; determining a target forwarding path of a traffic data packet based on a matching result includes: if the source address matches the mapping relationship in the source routing table, determining a corresponding target forwarding path and a target address corresponding to the target forwarding path based on the source address; if the source address does not match the mapping relationship in the source routing table, determining a corresponding target forwarding path and a target address corresponding to the target forwarding path based on a default routing table.
[0014] The method for distributing traffic data provided by an embodiment of the present invention can achieve accurate traffic forwarding decisions by utilizing the mapping relationship between the source address and the forwarding path in the source routing table. When the source address matches the source routing table, the system can quickly determine the optimal target forwarding path and the corresponding target address, thereby improving traffic processing efficiency; and when the source address does not match, the system will automatically select an alternative path according to the default routing table to ensure that the traffic can still be forwarded smoothly. This flexible path selection mechanism not only optimizes the accuracy and efficiency of traffic forwarding, but also enhances the robustness and adaptability of the network, and can cope with different traffic and network environment changes.
[0015] In an optional implementation, if multi-path routing forwarding is performed for the traffic data packet, an optimal forwarding path is determined based on the first priority relationship and the second priority relationship; and the traffic data packet is forwarded from the source address to the destination address based on the optimal forwarding path.
[0016] The method for distributing traffic data provided by the embodiment of the present invention can intelligently determine the optimal forwarding path by combining the first priority relationship and the second priority relationship, thereby improving the accuracy and efficiency of routing decisions when performing multi-path routing forwarding. Traffic data packets are forwarded from the source address to the destination address based on the optimal forwarding path, ensuring fast and reliable transmission of data streams, while effectively avoiding conflicts and redundancies in path selection, optimizing the utilization of network resources, and improving overall network performance and stability.
[0017] In an optional implementation, a traffic data packet is parsed to determine a source address of the traffic data packet, including: determining source routing information of the traffic data packet in response to a configuration operation for source path routing information; and when a traffic data packet is received, parsing the source routing information carried by the traffic data packet to determine a source address of the traffic data packet.
[0018] The method for distributing flow data provided by the embodiment of the present invention responds to the configuration operation of the source path routing information, and the system can dynamically update and determine the source routing information of the flow data packet, ensuring the accuracy and real-time nature of the source address information. Therefore, the method makes the routing decision more accurate, optimizes the forwarding path of the data flow, and improves the adaptability and reliability of the network, and can better cope with the flow management requirements in different network environments.
[0019] In a second aspect, the present invention provides a traffic data distribution device, comprising: an acquisition module, used to acquire preconfigured routing rules and traffic data packets to be distributed; a parsing module, used to parse the traffic data packets and determine the source address of the traffic data packets; a matching module, used to match the source address and the preconfigured routing rules, and determine the target forwarding path of the traffic data packets based on the matching results; and a forwarding module, used to forward the traffic data packets from the source address to the target address according to the target forwarding path.
[0020] In a third aspect, the present invention provides a server, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the traffic data distribution method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0021] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for distributing traffic data of the first aspect or any corresponding embodiment thereof.
[0022] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method for distributing traffic data of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 is a flow chart of a method for distributing flow data according to an embodiment of the present invention;
[0025] Figure 2 is a flow chart of another method for distributing traffic data according to an embodiment of the present invention;
[0026] Figure 3 is a flow chart of another method for distributing flow data according to an embodiment of the present invention;
[0027] Figure 4 is a flow chart of another method for distributing traffic data according to an embodiment of the present invention;
[0028] Figure 5 is a structural block diagram of a flow data distribution device according to an embodiment of the present invention;
[0029] Figure 6 It is a schematic diagram of the hardware structure of the server according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0031] In a cloud computing virtual network, traffic is usually routed and forwarded by the destination address. At present, mainstream public cloud service providers (such as AWS) usually isolate different types of traffic by creating multiple subnets and configuring network access control lists (ACLs) or security groups. Although the functional division and interactive configuration of different subnets provide a certain degree of security, this also makes operation and maintenance complicated, and it is difficult to reasonably divide different types of traffic into the same subnet according to the specific business needs of users. For example, AWS VPC usually creates two subnets, one connected to the Internet gateway to handle public network traffic, and the other connected through AWS VPN to handle private traffic. The two use network ACLs to isolate traffic and achieve security control. However, although this approach can provide a certain degree of security isolation, it cannot achieve refined traffic control or efficient parallel traffic distribution.
[0032] In addition, in the cloud computing virtual network, the downstream inbound traffic (from outside the cloud to inside the cloud) is usually configured by the management and control platform and sent to the network devices to ensure cluster high availability or active-standby mode between network elements. When the traffic passes through the rate-limited network element, the system will divert the traffic to different dedicated network elements according to the configuration, such as NAT Gateway, load balancer (LB), etc. The upstream outbound traffic (from inside the cloud to outside the cloud) needs to be configured by the user in the private VPC. For different dedicated or customized scenarios, users need to configure the subnet routing table to meet personalized needs.
[0033] For mixed traffic scenarios, users can configure routes based on the destination, such as directing traffic to gateways such as NATGateway or load balancers, and usually configure all-zero routes. At the same time, the system will configure a route pointing to the Internet Gateway by default, which has a lower priority and is only used as a backup path. Due to the coarse granularity of the all-zero route, this configuration may lead to some fine-grained traffic diversion requirements that cannot be met, such as the need to direct a small amount of traffic to the Internet Gateway and a large amount of traffic to the NAT Gateway. To achieve this requirement, the mainstream approach is to create multiple subnets in platforms such as AWS and configure specific routing policies for each subnet, such as one subnet dedicated to NATGateway and another for the Internet Gateway. However, this method is more complicated to operate and brings higher O&M difficulties.
[0034] In view of this, the technical solution of the present invention provides a method for supporting multiple routing next-hop priorities in a variety of hybrid scenarios in a cloud computing virtual network, and realizing dynamic distribution of multi-path traffic. By parsing the traffic data packet and extracting the source address, matching it with the pre-configured routing rules, dynamically determining the forwarding path of the data packet, and accurately forwarding the traffic data packet from the source address to the target address, the problem of how to perform flexible dynamic intelligent scheduling according to different cloud host types in the cloud network is solved.
[0035] According to an embodiment of the present invention, an embodiment of a method for distributing traffic data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0036] In this embodiment, a method for distributing traffic data is provided, which can be used in a server. Figure 1 is a flow chart of a method for distributing flow data according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0037] Step S101, obtaining pre-configured routing rules and traffic data packets to be distributed.
[0038] Preconfigured routing rules refer to a set of rules set in advance for traffic forwarding decisions, which may include, for example, source address, destination address, protocol type, routing priority, etc., and are used to guide how data packets are forwarded from the source address to the destination address. Specifically, the preconfigured routing rules can be obtained by reading the routing table, rule file, etc. configured in advance on the server.
[0039] The traffic data packets to be distributed refer to network data packets that need to be forwarded through the server, including traffic from different sources, and need to be processed and forwarded according to preconfigured routing rules. Specifically, the traffic data packets to be distributed can be received in actual operation through a network interface or other communication methods.
[0040] Step S102, parse the traffic data packet to determine the source address of the traffic data packet.
[0041] The source address of a traffic data packet refers to the network address of the device or host that sent the data packet, such as an IP address or MAC address, which is located in the header field of the data packet and is used to identify the sender of the data packet. Specifically, after receiving the traffic data packet, the server extracts the header information of the data packet and searches for the source address field. For example, in the IP protocol, the source address is located in the source IP address field of the IP header. The server extracts and determines the source address of the data packet by reading these fields.
[0042] Step S103, matching the source address with the pre-configured routing rule, and determining the target forwarding path of the traffic data packet based on the matching result.
[0043] The match result refers to the information on whether the source address of the traffic data packet matches the pre-configured routing rules. If the source address meets a preset routing rule, it is considered a successful match, otherwise the match fails. The target forwarding path refers to the transmission route of the traffic data packet from the source address to the target address determined based on the match result, which may include multiple network nodes or routers. Specifically, when matching, the source address of the traffic data packet is compared with the conditions in the routing rules. If the source address meets a certain rule, the target forwarding path of the data packet is determined according to the rule. This path may include specific routers, gateways and other network devices.
[0044] Step S104, forwarding the traffic data packet from the source address to the target address according to the target forwarding path.
[0045] The destination address refers to the address of the terminal device or target network that receives the traffic data packet. Specifically, according to the target forwarding path determined by the preconfigured routing rules, the traffic data packet is forwarded to the next hop through appropriate network devices (such as routers, gateways, etc.) in sequence until it reaches the destination address.
[0046] The traffic data distribution method provided by the embodiment of the present invention can dynamically select the best forwarding path by parsing the traffic data packets and matching the routing rules, thereby optimizing the utilization efficiency of network resources and realizing accurate traffic scheduling based on the source address and preconfigured routing rules.
[0047] In this embodiment, a method for distributing traffic data is provided, which can be used in a server. Figure 2 is a flow chart of a method for distributing flow data according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0048] Step S201, obtaining pre-configured routing rules and traffic data packets to be distributed.
[0049] Specifically, the above step S201 includes:
[0050] Step S2011, obtaining preset configuration information of source routing, a default routing table and a management traffic routing table.
[0051] The preset configuration information of source routing refers to the basic information related to the network routing pre-configured by the user, such as the network interface configuration of the source device, routing protocol, static routing or dynamic routing settings, etc. Specifically, the server uses the routing information pre-configured by the user in the virtual network management console or API, including the mapping relationship between the public IP address and the private IP address associated with the elastic public IP (EIP), as well as the relevant routing policies. Among them, the preset configuration information defines how to forward traffic based on the source IP address, and selects the appropriate forwarding path and next-hop address for the traffic packet. With this information, the server can dynamically determine and apply user-defined routing rules to achieve the correct forwarding of mixed traffic.
[0052] The default routing table is automatically loaded when the server starts according to the network environment or static configuration. It contains the default forwarding path for data packets when no more specific routing rules are matched. Specifically, the default routing table can be queried and obtained through operating system commands.
[0053] The management traffic routing table refers to a routing rule table specifically used to manage and control specific traffic (such as traffic from certain users or applications) to optimize or limit the transmission path of certain traffic. Specifically, the user manually configures the management traffic routing table according to the network traffic management and stores it in the configuration file of the server.
[0054] Step S2012: Generate a source routing table based on the routing configuration parameters of the preset configuration information.
[0055] The routing configuration parameters of the preset configuration information refer to parameter configurations related to network routing, such as IP addresses, subnet masks, routing protocol settings, network interface information, routing policies, and priorities. The source routing table is a routing table generated based on the above-mentioned preset routing configuration parameters, which contains routing rules and paths related to the source address of the data packet. The function of the source routing table is to provide guidance for forwarding traffic data packets from the source address to the destination address. Specifically, the preset configuration information includes the network path, the configuration of each network connection type (such as the internal path of the virtual network, the VPN connection path, the DirectConnect connection path, etc.), and the relevant routing parameters of each path (such as the next hop address, bandwidth, delay, priority, etc.). This information generates a source routing table in a regularized manner, and the table records the mapping relationship between the source routing information and the corresponding forwarding path.
[0056] Step S2013: Determine the preconfigured routing rules based on the priority relationship among the source routing table, the default routing table, and the management traffic routing table.
[0057] When determining the preconfigured routing rules based on the priority relationship between the source routing table, the default routing table, and the management traffic routing table, the preconfigured routing rules are determined by matching and making decisions in the order of priority of each routing table. For example, a specific traffic forwarding path is first selected based on the information in the source routing table. If the source routing table fails to provide a clear forwarding path, the routing rules in the management traffic routing table are referenced. If there is no matching path in the management traffic routing table, forwarding is performed based on the general path provided by the default routing table.
[0058] The method for distributing traffic data provided by the embodiment of the present invention can accurately generate pre-configured routing rules by comprehensively considering the priority relationship between source routing, default routing table and management traffic routing table, thereby realizing more intelligent and efficient traffic scheduling. By dynamically generating source routing tables based on preset configuration information and adjusting them according to the priorities of different routing tables, the system can flexibly respond to different network environments and business requirements, ensure that data traffic is forwarded along the optimal path, improve network reliability and performance, and avoid potential routing conflicts and performance bottlenecks.
[0059] In some optional implementations, the above step S2013 includes:
[0060] Step a1, determining a first priority relationship among a source routing table, a default routing table, and a management traffic routing table, and a second priority relationship among different routing rules based on a preset routing policy.
[0061] The first priority relationship refers to the priority ranking relationship between the source routing table, the default routing table, and the management traffic routing table. Based on the preset routing policy, the priority of these routing tables is used to determine which routing table's rules have a higher priority during the routing forwarding process. The second priority relationship refers to the priority relationship between different routing rules within the same routing table. Specifically, based on the preset routing policy, when determining the first priority relationship between the source routing table, the default routing table, and the management traffic routing table, the priority order between these tables is set according to factors such as routing category, management level, and business criticality to ensure that the most appropriate routing rules are applied first. The second priority relationship between different routing rules determines which rule should be executed first among multiple rules in the same table by analyzing the specific conditions and matching accuracy of the routing rules, thereby achieving optimal traffic distribution. For example, the management traffic routing table can have a higher priority than the system default routing table to ensure that management traffic is forwarded first; the user source routing table can have a higher priority than the management traffic routing table and the system default routing table to implement the priority of user-defined source routing; within the same routing table, more specific routing rules have higher priority, such as host routing takes precedence over segment routing to achieve the longest mask match; in addition, routing rules with a higher management level also have a higher priority, such as static routing takes precedence over dynamic routing, thereby ensuring the accuracy and efficiency of routing forwarding.
[0062] Furthermore, between multiple routing tables (such as source routing table, default routing table and management traffic routing table), conflict detection must be performed first to ensure that routing rules in different routing tables do not conflict. For example, the address prefix ranges in the source routing table and the default routing table cannot overlap to avoid ambiguity. When determining the priority relationship of these routing tables, it is necessary to set the priority order based on factors such as the category of the routing table, business criticality, and management level to ensure that high-priority routing table rules can be applied first. For rule conflicts within the same routing table, check whether the new routing rule is repeated or conflicts with the address range and next hop of the existing rule. If there is a conflict, prompt the user to handle it. Combined with the priority relationship, the priority of rules within the same routing table depends on the specific conditions and matching accuracy of the rules. For example, specific host routing rules will have higher priority, while more general network segment routing rules will be overwritten.
[0063] Secondly, when forwarding data packets, the matching engine needs to select the most appropriate forwarding path based on the types of different routing tables and routing rules. For example, the source routing extension header information of the data packet will be matched in the source routing table first; if the match is not successful, it will then try to match the characteristic information of the management traffic in the management traffic routing table; finally, the destination address will be matched according to the longest prefix in the default routing table. At this time, the priority relationship determines which routing table's rules will be executed first if multiple routing tables can match the data packet. According to the preset routing policy, the source routing table will have a higher priority than the management traffic routing table and the default routing table, which means that user-defined source routing rules will give priority to data packet forwarding. In the same routing table, more specific routing rules (such as host routing) will be higher than more general routing rules (such as segment routing) to ensure the longest prefix match.
[0064] Thirdly, when routing tables and routing rules need to be dynamically added, deleted, or modified, conflict detection is performed again to ensure that routing black holes or forwarding loops are not introduced after the update. Priority relationships will also change during the update process. For example, new static routing rules will overwrite previous dynamic routing rules, or new user-defined source routes will change the priority of the source routing table. For conflict resolution, prompts can be provided to users to resolve conflicts, and intelligent solutions can also be provided. For example, the priority of routing rules can be automatically adjusted, or more specific routing rules can overwrite generalized rules, thereby ensuring the efficiency and accuracy of the routing forwarding process.
[0065] Step a2, determining a preconfigured routing rule based on the source routing table, the default routing table, the management traffic routing table, the first priority relationship, and the second priority relationship.
[0066] The process of determining the preconfigured routing rules is achieved by analyzing the priority relationship between the source routing table, the default routing table, and the management traffic routing table based on the routing policy. Specifically, based on the preset routing policy, the first priority relationship between the source routing table, the default routing table, and the management traffic routing table is determined, and the priority order of different routing tables is defined; then, the second priority relationship between different routing rules within the routing table is further determined, and specific routing matching rules are clarified, such as more specific rules (such as host routing) taking precedence over broader rules (such as network segment routing). In this way, preconfigured routing rules are finally generated based on the matching of the source address with these routing tables and the priority rules, ensuring that traffic data packets can be correctly forwarded according to the priority.
[0067] In the above implementation, based on the preset routing strategy, the first priority relationship between the source routing table, the default routing table and the management traffic routing table is first determined, so as to reasonably divide the processing order and priority of different types of traffic. In addition, the second priority relationship between different routing rules is also defined to further optimize the routing selection process. In this way, the method can make more intelligent and efficient routing decisions in a complex network environment, avoid traffic conflicts, and thus significantly improve the reliability, performance and flexibility of the network.
[0068] Step S2014, obtain the traffic data packet to be distributed. For details, see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0069] Step S202: parse the traffic data packet to determine the source address of the traffic data packet. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0070] Step S203, matching the source address with the pre-configured routing rule, and determining the target forwarding path of the traffic data packet based on the matching result.
[0071] Specifically, the above step S203 includes:
[0072] Step S2031, match the source address with the pre-configured routing rules. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0073] Step S2032: If the source address matches the mapping relationship in the source routing table, a corresponding target forwarding path and a target address corresponding to the target forwarding path are determined based on the source address.
[0074] The source routing table includes the mapping relationship between the source routes and forwarding paths of different source addresses and the preset forwarding addresses corresponding to each source route, wherein the mapping relationship refers to the routing rules defined according to different source addresses in the source routing table, wherein each source address is associated with its corresponding forwarding path (i.e., the network path that the traffic should take). The source routing table specifies a specific forwarding path for each source address to guide the forwarding process of the data packet from the source address to the destination address. The preset forwarding address corresponding to each source route refers to the destination address defined for each source route, which is the final destination address that the data packet should reach during the transmission process. Specifically, if the source address information matches the mapping relationship in the source routing table, the corresponding forwarding path is searched from the source routing table according to the source address information, and the destination address corresponding to the path is determined. That is, the appropriate routing path is determined by the source address, and the destination address is determined thereby, so that the traffic data packet can be correctly forwarded to the predetermined destination.
[0075] For example, the user defines two source routing paths through the interface, where path 1 adopts a low-latency forwarding strategy and path 2 adopts a high-bandwidth forwarding strategy. The user assigns the data packets of the video service traffic to path 1 and the data packets of the file transfer service traffic to path 2. Based on the source routing information in the data packets, the server forwards the video traffic through path 1 with low latency, and forwards the file transfer traffic through path 2 with high bandwidth, thereby optimizing the traffic according to business needs. Ultimately, the video service achieves lower latency, while file transfer can achieve higher throughput.
[0076] Step S2033: If the source address does not match the mapping relationship in the source routing table, a corresponding target forwarding path and a target address corresponding to the target forwarding path are determined based on the default routing table.
[0077] If the source address information does not match the mapping relationship in the source routing table, the forwarding path is determined according to the default routing table. Specifically, the preset routing rules in the default routing table are searched, and the corresponding target forwarding path and target address are determined for the traffic data packet according to these rules. The default routing table provides a set of common routing rules. When the source address information cannot find a match in the source routing table, the traffic data packet will be forwarded according to the rules in the default routing table to ensure that the data packet can continue to be transmitted to the correct destination address.
[0078] For example, the user defines a static source route specifically for forwarding all traffic from the management server and sets the route to the highest priority. When the router receives a traffic packet, it will match the static source route first and forward the traffic directly to the next hop. For other non-management traffic packets, the router uses the system default route and forwards them based on the longest prefix match.
[0079] The method for distributing traffic data provided by an embodiment of the present invention can achieve accurate traffic forwarding decisions by utilizing the mapping relationship between the source address and the forwarding path in the source routing table. When the source address matches the source routing table, the system can quickly determine the optimal target forwarding path and the corresponding target address, thereby improving traffic processing efficiency; and when the source address does not match, the system will automatically select an alternative path according to the default routing table to ensure that the traffic can still be forwarded smoothly. This flexible path selection mechanism not only optimizes the accuracy and efficiency of traffic forwarding, but also enhances the robustness and adaptability of the network, and can cope with different traffic and network environment changes.
[0080] Step S2034: If multi-path routing forwarding is performed for the traffic data packet, an optimal forwarding path is determined based on the first priority relationship and the second priority relationship.
[0081] The optimal forwarding path refers to the most suitable routing path selected according to the first priority relationship and the second priority relationship in a multi-path routing forwarding scenario, which is used to forward traffic data packets to the destination address. Specifically, if there are multiple possible forwarding paths, the first priority relationship and the second priority relationship will sort and compare different paths according to the preset routing strategy to determine the path that best suits the current traffic.
[0082] Step S2035, forwarding the traffic data packet from the source address to the target address based on the optimal forwarding path.
[0083] The optimal forwarding path is determined by matching the source address of the traffic data packet with the preconfigured routing rules. If there are multiple candidate paths, the path with the best performance is selected based on the first priority and second priority rules. Finally, the traffic data packet is forwarded from the source address to the destination address through the determined optimal forwarding path, ensuring efficient and stable transmission of the data stream.
[0084] For example, Figure 3 As shown in the figure, users (actors) manage and configure the network through cloud network servers and cloud network managers. Traffic is processed by gateways such as cloud host gateways, elastic bare metal network management or classic bare metal network management, and connected to the external network through public elastic IP. In the NAT scenario, private IP addresses and public IP addresses are converted to ensure secure communication between internal and external networks. Finally, traffic is connected securely and quickly between different networks through technologies such as VPN, dedicated lines or high-speed connections between clouds, ensuring the stability and security of data transmission.
[0085] The method for distributing traffic data provided by the embodiment of the present invention can intelligently determine the optimal forwarding path by combining the first priority relationship and the second priority relationship, thereby improving the accuracy and efficiency of routing decisions when performing multi-path routing forwarding. Traffic data packets are forwarded from the source address to the destination address based on the optimal forwarding path, ensuring fast and reliable transmission of data streams, while effectively avoiding conflicts and redundancies in path selection, optimizing the utilization of network resources, and improving overall network performance and stability.
[0086] Step S204, forwarding the traffic data packet from the source address to the target address according to the target forwarding path.
[0087] Specifically, after the user submits the preset configuration information of the source route, the server stores it in the source routing table and establishes a mapping relationship between the source route and the forwarding path. The path may include a virtual network internal path, a virtual network and VPN connection path, a virtual network and Direct Connect connection path, etc. A source routing table is set in the virtual router or virtual switch of the virtual network, which stores the mapping relationship between the source routing information and the forwarding path, and is used to find the corresponding forwarding path according to the source routing information when the data packet is transmitted. For the dedicated traffic data packet entering the virtual network, the source routing information (such as the next hop address, source routing path identifier, etc.) is set in the Overlay layer to clarify the forwarding path of the data packet. When the virtual network receives a dedicated traffic data packet entering its boundary, the source address and destination address information in the data packet are extracted. According to the source routing information in the data packet, the corresponding forwarding path is searched in the source routing table, and the source MAC and destination MAC are matched by the Overlay layer to confirm the uplink and downlink directions of the traffic. According to the optimal forwarding path found, the data packet is exported or forwarded to the target address within the virtual network. The source routing information and source routing table settings can be configured by the virtual network management end during the creation or operation process, or can be issued by the device connected to the virtual network (such as VPN gateway, DirectConnect device, etc.) when the connection is established. The source routing table supports dynamic updating of the mapping relationship between source routing information and forwarding paths to support hot backup and load balancing functions of source routing paths, ensuring high availability and performance optimization of network traffic.
[0088] The method for distributing traffic data provided by the embodiment of the present invention realizes fine-grained traffic control and management. By defining differentiated forwarding strategies for different types of traffic, such as using a low-latency path for high-priority traffic and a high-bandwidth path for low-priority traffic, users can accurately plan the direction of traffic according to business needs, and realize on-demand traffic diversion and refined management. At the same time, the method optimizes the utilization efficiency of network resources, maximizes network bandwidth, avoids overload of a single path, improves overall throughput, and intelligently selects the best path according to the real-time network status, performs dynamic traffic balancing and redirection, thereby reducing equipment load, extending service life, and reducing architecture costs. In terms of network management, a simple and easy-to-use source routing method is adopted to avoid complex ACL, security group and subnet isolation mechanisms, and supports user-defined dynamic source routing strategies to reduce configuration workload. Through centralized traffic management and control, management efficiency is further improved, and configuration delivery and changes are simplified. In addition, the method also enhances the high availability of the network, sets multiple source routing paths for key business traffic, realizes automatic failover and traffic backup, avoids data loss or network jitter caused by unstable paths, reduces the impact of single point failures on the network, and improves service continuity and reliability. Finally, this method expands the network boundary, supports exporting dedicated traffic out of the virtual network, connects to the local IDC or inter-cloud dedicated line, supports interconnection between different cloud environments, builds a flexible hybrid cloud architecture, and realizes the hot standby function of hybrid traffic by setting the primary and backup source routing paths, further improving the high availability of the network.
[0089] In this embodiment, a method for distributing traffic data is provided, which can be used in a server. Figure 4 is a flow chart of a method for distributing flow data according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0090] Step S301, obtain pre-configured routing rules and traffic data packets to be distributed. For details, see Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.
[0091] Step S302, parse the traffic data packet to determine the source address of the traffic data packet.
[0092] Specifically, the above step S302 includes:
[0093] Step S3021, in response to the configuration operation for the source path routing information, determining the source routing information of the traffic data packet.
[0094] Source path routing information refers to the network path information used to describe the data packet from the source address to the destination address, for example, it may include the routing rules of each forwarding node in the network, the next hop address, the routing identifier and other information. The source routing information of the traffic data packet refers to the routing information carried by the data packet during the transmission process, which is used to describe the path through which it should reach the destination, for example, it may include the source address of the data packet, the destination address, and the forwarding path identifier that the data packet should pass on the source path and other information. Specifically, when the source path routing information is obtained according to the user's configuration operation (for example, through the routing rules or network policies set by the administrator), the server will determine the source routing information of the data packet based on these configurations. For example, if the administrator specifies a specific source path or routing rule, the server will extract the source routing information in the traffic data packet according to these configurations and apply it to ensure that the data packet is forwarded along the correct path.
[0095] Step S3022, when a traffic data packet is received, the source routing information carried in the traffic data packet is parsed to determine the source address of the traffic data packet.
[0096] When a traffic data packet is received, the source address of the traffic data packet is determined by parsing the source routing information in the data packet. Specifically, the traffic data packet carries source routing information, which includes various identifiers or metadata of the data packet in the transmission path, indicating the source of the data packet. By parsing this information, the source address of the data packet can be extracted, and then the sender or original source of the data packet can be identified.
[0097] Step S303, match the source address with the pre-configured routing rules, and determine the target forwarding path of the traffic data packet based on the matching result. Figure 2 Step S203 of the illustrated embodiment will not be described in detail here.
[0098] Step S304: forward the traffic data packet from the source address to the target address according to the target forwarding path. Figure 2 Step S204 of the illustrated embodiment will not be described in detail here.
[0099] The method for distributing flow data provided by the embodiment of the present invention responds to the configuration operation of the source path routing information, and the system can dynamically update and determine the source routing information of the flow data packet, ensuring the accuracy and real-time nature of the source address information. Therefore, the method makes the routing decision more accurate, optimizes the forwarding path of the data flow, and improves the adaptability and reliability of the network, and can better cope with the flow management requirements in different network environments.
[0100] In this embodiment, a distribution device for flow data is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0101] This embodiment provides a flow data distribution device, such as Figure 5 As shown, including:
[0102] The acquisition module 401 is used to acquire pre-configured routing rules and traffic data packets to be distributed;
[0103] The parsing module 402 is used to parse the traffic data packet and determine the source address of the traffic data packet;
[0104] A matching module 403 is used to match the source address with the preconfigured routing rules and determine the target forwarding path of the traffic data packet based on the matching result;
[0105] The forwarding module 404 is used to forward the traffic data packet from the source address to the target address according to the target forwarding path.
[0106] In some optional implementations, the forwarding module 404 includes:
[0107] A first acquisition submodule is used to acquire performance parameters of a target forwarding path;
[0108] The forwarding submodule is used to adjust the target forwarding path based on the performance parameters, and forward the traffic data packet from the source address to the target address according to the adjusted target forwarding path.
[0109] In some optional implementations, the acquisition module 401 includes:
[0110] The second acquisition submodule is used to obtain preset configuration information of source routing, a default routing table and a management traffic routing table;
[0111] A generation submodule, used to generate a source routing table based on routing configuration parameters of preset configuration information;
[0112] The first determination submodule is used to determine the preconfigured routing rules based on the priority relationship among the source routing table, the default routing table and the management traffic routing table.
[0113] In some optional implementations, the determining submodule includes:
[0114] A first determining unit, configured to determine a first priority relationship among a source routing table, a default routing table, and a management traffic routing table, and a second priority relationship among different routing rules based on a preset routing policy;
[0115] The second determining unit is used to determine the preconfigured routing rule based on the source routing table, the default routing table, the management traffic routing table, the first priority relationship and the second priority relationship.
[0116] In some optional implementations, the matching module 403 includes:
[0117] A second determination submodule is used to determine a corresponding target forwarding path and a target address corresponding to the target forwarding path based on the source address if the source address matches a mapping relationship in the source routing table;
[0118] The third determination submodule is used to determine the corresponding target forwarding path and the target address corresponding to the target forwarding path based on the default routing table if the source address does not match the mapping relationship in the source routing table.
[0119] In some optional implementations, the matching module 403 further includes:
[0120] A fourth determination submodule, configured to determine an optimal forwarding path based on the first priority relationship and the second priority relationship if multi-path routing forwarding is performed for the traffic data packet;
[0121] The forwarding submodule is used to forward the traffic data packet from the source address to the destination address based on the optimal forwarding path.
[0122] In some optional implementations, the parsing module 402 includes:
[0123] a fifth determination submodule, configured to determine source routing information of a traffic data packet in response to a configuration operation on the source path routing information;
[0124] The parsing submodule is used to parse the source routing information carried in the traffic data packet when the traffic data packet is received, and determine the source address of the traffic data packet.
[0125] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0126] The traffic data distribution device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0127] The flow data distribution device provided in the embodiment of the present invention can dynamically select the best forwarding path by parsing the flow data packets and matching the routing rules, thereby optimizing the utilization efficiency of network resources and realizing accurate flow scheduling based on the source address and preconfigured routing rules.
[0128] The embodiment of the present invention also provides a server having the above Figure 5 The distribution device of the flow data is shown.
[0129] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a server provided by an optional embodiment of the present invention, such as Figure 6 As shown, the server includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the server, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple servers can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0130] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0131] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0132] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of the server, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0133] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0134] The server further comprises a communication interface 30 for the server to communicate with other devices or a communication network.
[0135] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0136] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0137] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for distributing traffic data, characterized in that: The method comprises: Obtain preconfigured routing rules and traffic data packets to be distributed; Parsing the traffic data packet to determine the source address of the traffic data packet; Matching the source address with the preconfigured routing rule, and determining a target forwarding path for the traffic data packet based on the matching result; The traffic data packet is forwarded from the source address to the target address according to the target forwarding path.
2. The method according to claim 1, characterized in that: The forwarding of the traffic data packet from the source address to the target address according to the target forwarding path includes: Obtaining performance parameters of the target forwarding path; The target forwarding path is adjusted based on the performance parameter, and the traffic data packet is forwarded from the source address to the target address according to the adjusted target forwarding path.
3. The method according to claim 1, characterized in that The obtaining of preconfigured routing rules includes: Get preset configuration information for source routing, default routing table, and management traffic routing table; Generate a source routing table based on the routing configuration parameters of the preset configuration information; The preconfigured routing rule is determined based on a priority relationship among the source routing table, the default routing table, and the management traffic routing table.
4. The method according to claim 3, characterized in that The determining the preconfigured routing rule based on the priority relationship among the source routing table, the default routing table, and the management traffic routing table includes: Determine a first priority relationship among the source routing table, the default routing table, and the management traffic routing table, and a second priority relationship between different routing rules based on a preset routing policy; The preconfigured routing rule is determined based on the source routing table, the default routing table, the management traffic routing table, the first priority relationship, and the second priority relationship.
5. The method according to claim 4, characterized in that The source routing table includes a mapping relationship between source routes and forwarding paths of different source addresses and a preset forwarding address corresponding to each source route; Determining a target forwarding path of the traffic data packet based on the matching result includes: If the source address matches the mapping relationship in the source routing table, determining the corresponding target forwarding path and the target address corresponding to the target forwarding path based on the source address; If the source address does not match the mapping relationship in the source routing table, the corresponding target forwarding path and the target address corresponding to the target forwarding path are determined based on the default routing table.
6. The method according to claim 5, characterized in that Also includes: If multi-path routing forwarding is performed for the traffic data packet, determining an optimal forwarding path based on the first priority relationship and the second priority relationship; The traffic data packet is forwarded from the source address to the destination address based on the optimal forwarding path.
7. The method according to claim 1, characterized in that The parsing of the traffic data packet to determine the source address of the traffic data packet includes: In response to a configuration operation on source path routing information, determining source routing information of the traffic data packet; When the traffic data packet is received, the source routing information carried by the traffic data packet is parsed to determine the source address of the traffic data packet.
8. A flow data distribution device, characterized in that: The device comprises: An acquisition module, used to acquire preconfigured routing rules and traffic data packets to be distributed; A parsing module, used to parse the traffic data packet and determine the source address of the traffic data packet; A matching module, used for matching the source address with the preconfigured routing rule, and determining a target forwarding path for the traffic data packet based on the matching result; A forwarding module is used to forward the traffic data packet from the source address to the target address according to the target forwarding path.
9. A server, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the traffic data distribution method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the flow data distribution method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Policy routing implementation method and device
CN111181861A
Flow traction configuration method and device, electronic equipment and storage medium
CN116489082A
Dynamic policy based routing
US20030009585A1
Method, Apparatus and Program for Detecting Spoofed Network Traffic
US20130125235A1
Route priority configuration method, device, and controller
US20200007465A1
Cited By
Network control scheduling method based on flow perception and path optimization
CN121151332A
A network control and scheduling method based on traffic awareness and path optimization
CN121151332B