Data transmission method and device based on VXLAN, storage medium and electronic equipment
By using VXLAN technology and dynamic routing protocols, multiple physical links are virtualized into equivalent paths, solving the problems of resource idleness and congestion in multi-link scenarios of traditional protocols. This enables efficient traffic allocation and fault switching, and is suitable for cloud computing and multi-data center interconnection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 北京联广通网络科技有限公司
- Filing Date
- 2025-04-25
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional dynamic routing protocols cannot effectively utilize resources in scenarios with more than two physical links, leading to link idleness and traffic congestion, especially in high-density link scenarios such as cloud computing and multi-data center interconnection.
VXLAN technology virtualizes multiple physical links into a single virtual link, and utilizes dynamic routing protocols and load balancing algorithms to dynamically adjust link priorities, enabling multiple physical links to be identified as equivalent paths, thus achieving dynamic load balancing and failover of service traffic.
It significantly improves link resource utilization, avoids resource waste, ensures business continuity, and is suitable for efficient network resource utilization and reliable transmission in high-density link scenarios.
Smart Images

Figure CN120342952B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer communications, and more specifically, to a data transmission method, apparatus, storage medium, and electronic device based on VXLAN. Background Technology
[0002] In traditional network architectures, common dynamic routing protocols like OSPF and BGP are primarily designed for small to medium-sized network scenarios. In a dual-link configuration, these protocols effectively achieve link load balancing and redundancy protection, distributing traffic across two physical links and ensuring uninterrupted service operation even in the event of a link failure.
[0003] However, the limitations of existing protocols become apparent when there are three or more physical links in the network. The underlying algorithms of these protocols typically only support a fixed number of transmission paths, usually two by default. Excess physical links cannot be considered valid transmission paths by dynamic routing protocols. This is because the protocols have simplified their path calculation and state synchronization designs; for example, OSPF's SPF algorithm tends to select the optimal path.
[0004] This results in a large number of physical link resources being idle, unable to be allocated on demand or dynamically adjusted in weight. This not only reduces bandwidth utilization but may also cause congestion due to traffic being concentrated on a few links. This problem is even more pronounced in link-intensive scenarios such as cloud computing and multi-data center interconnection, so there is an urgent need for technological innovation to break through the path capacity limitations of traditional routing protocols. Summary of the Invention
[0005] This application provides a VXLAN-based data transmission method, apparatus, storage medium, and electronic device, which can solve the problem of multiple physical links being idle due to only supporting dual-link load.
[0006] The specific technical solution is as follows:
[0007] In a first aspect, embodiments of this application provide a VXLAN-based data transmission method, the method comprising:
[0008] After virtualizing multiple physical links between two user terminals into a single virtual link using Virtual Extended Local Area Network (VXLAN) technology, the priority of the multiple physical links is dynamically adjusted through a dynamic routing protocol, so that the multiple physical links are identified as equivalent paths.
[0009] Based on the equivalent path, the service traffic is distributed to the multiple physical links for transmission using a load-sharing algorithm;
[0010] The system monitors the physical link status in real time, and when any physical link fails, it switches the service traffic to an available target physical link using the load balancing algorithm.
[0011] In one possible implementation, traffic is distributed across the multiple physical links for transmission using a load-sharing algorithm, including:
[0012] Obtain the link weight assigned to each of the multiple physical links based on the weight allocation model;
[0013] Calculate the minimum integer ratio of the weights of all links in the multiple physical links, and calculate the sum of the values in the minimum integer ratio as the total weight;
[0014] Based on the total weight and the minimum integer ratio, a corresponding weight range is configured for the link weight of each physical link, such that the length of the weight range is equal to the integer corresponding to the minimum integer ratio;
[0015] Calculate the hash value of the target information in each packet of the service traffic, and normalize each hash value to obtain the normalized hash value.
[0016] Determine the weight range of each normalized hash value and assign the corresponding message to the physical link corresponding to the weight range for transmission.
[0017] In one possible implementation, a method for assigning link weights to each of the plurality of physical links based on a weight allocation model includes:
[0018] Obtain the current link status indicators and service characteristics of the service traffic for each of the multiple physical links;
[0019] The current link status indicators of each physical link and the service characteristics of the service traffic are input into the weight allocation model to obtain the link weight assigned to each physical link among the multiple physical links.
[0020] In one possible implementation, the priorities of the multiple physical links are dynamically adjusted using a dynamic routing protocol to identify the multiple physical links as equal-cost paths, including:
[0021] Based on the Open Shortest Path First (OSPF) protocol, the cost values of the multiple physical links are set to the same value, and the Equal Cost Multipath (ECMP) function of the OSPF protocol is enabled, so that the multiple physical links are identified as equal cost paths.
[0022] In one possible implementation, when a failure of any physical link is detected, the service traffic is switched to an available target physical link using the load balancing algorithm, including:
[0023] When any physical link fails, the remaining physical links are predicted based on the fault prediction model to obtain the fault prediction result of each remaining physical link within a preset time period in the future. The remaining physical links are the other physical links among the multiple physical links except those that have failed.
[0024] All remaining physical links whose fault prediction results indicate no fault risk are selected as available target physical links.
[0025] The load balancing algorithm switches the service traffic to an available target physical link.
[0026] Secondly, embodiments of this application provide a VXLAN-based data transmission device, the device comprising:
[0027] The adjustment unit is used to dynamically adjust the priority of the multiple physical links after virtualizing multiple physical links between two user terminals into one virtual link through the Virtual Extended Local Area Network (VXLAN) technology, so that the multiple physical links are identified as equivalent paths.
[0028] The load distribution unit is used to distribute service traffic to the multiple physical links for transmission based on the equal-cost path and through a load-sharing algorithm;
[0029] The switching unit is used to monitor the physical link status in real time. When any physical link fails, the service traffic is switched to an available target physical link through the load sharing algorithm.
[0030] In one possible implementation, the load distribution unit includes:
[0031] The acquisition module is used to acquire the link weight assigned to each physical link among the multiple physical links based on the weight allocation model;
[0032] The calculation module is used to calculate the minimum integer ratio of the weights of all links in the multiple physical links, and to calculate the sum of the values in the minimum integer ratio as the total weight;
[0033] The configuration module is used to configure a corresponding weight range for the link weight of each physical link according to the total weight and the minimum integer ratio, such that the length of the weight range is equal to the integer corresponding to the minimum integer ratio;
[0034] The calculation module is also used to calculate the hash value of the target information in each message in the service traffic, and to normalize each hash value to obtain the normalized hash value.
[0035] The determination module is used to determine the weight range in which each normalized hash value belongs;
[0036] The allocation module is used to allocate the corresponding message to the physical link corresponding to the weight interval for transmission.
[0037] In one possible implementation, the method for assigning link weights to each of the multiple physical links based on a weight allocation model includes: obtaining the current link status index of each of the multiple physical links and the service characteristics of the service traffic; inputting the current link status index of each physical link and the service characteristics of the service traffic into the weight allocation model to obtain the assigned link weights for each of the multiple physical links.
[0038] In one possible implementation, the adjustment unit is configured to set the cost values of the multiple physical links to the same value based on the Open Shortest Path First (OSPF) protocol, and enable the Equal Cost Multipath (ECMP) routing function of the OSPF protocol, so that the multiple physical links are identified as equal cost paths.
[0039] In one possible implementation, the switching unit includes:
[0040] The fault prediction module is used to predict the fault of the remaining physical links based on the fault prediction model when any physical link is detected to have failed, and to obtain the fault prediction result of each remaining physical link within a preset time period in the future. The remaining physical links are the other physical links among the multiple physical links except those that have failed.
[0041] The selection module is used to select all physical links in the remaining physical links whose fault prediction results are no fault risk as available target physical links.
[0042] The switching module is used to switch the service traffic to an available target physical link through the load balancing algorithm.
[0043] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method as described in any possible implementation of the first aspect.
[0044] Fourthly, embodiments of this application provide an electronic device, the electronic device comprising:
[0045] One or more processors;
[0046] The processor is coupled to a storage device for storing one or more programs;
[0047] When the one or more programs are executed by the one or more processors, the electronic device performs the method as described in any possible implementation of the first aspect.
[0048] Fifthly, embodiments of this application provide a computer program product containing instructions that, when executed on a computer or processor, cause the computer or processor to perform the method described in any possible implementation of the first aspect.
[0049] As can be seen from the above solutions, the data transmission method, apparatus, storage medium, and electronic device based on VXLAN (Virtual Extensible Local Area Network) provided in this application embodiment can virtualize multiple physical links into a logically unified virtual link through VXLAN technology. This breaks through the limitation of the number of links in traditional dynamic routing protocols, allowing three or more physical links to be identified as equivalent transmission paths through dynamic priority adjustment. This enables dynamic load balancing of service traffic across multiple physical links, significantly improving link resource utilization and avoiding idle waste. At the same time, through real-time link status monitoring and automatic traffic switching mechanisms in case of failure, it ensures that traffic can quickly migrate to available physical links in failure scenarios, guaranteeing service continuity. This effectively solves the problem of multiple physical links not being able to work together in traditional architectures, and is especially suitable for high-density link scenarios such as cloud computing and multi-data center interconnection, achieving efficient utilization of network resources and reliable transmission.
[0050] Furthermore, the technical effects achievable by the embodiments of this application may also include:
[0051] 1. This application's embodiments assign differentiated weights to each physical link through a weighted allocation model, and convert these weights into quantifiable minimum integer ratios and total weights, constructing a weight range that matches link performance, enabling traffic allocation to accurately reflect the actual carrying capacity of the links. By hashing and normalizing the target information of packets, traffic is distributed to the corresponding physical links according to the weight ratio. This supports high-bandwidth physical links to carry more traffic to fully utilize resources, while also allowing low-performance physical links to share the load proportionally, avoiding resource waste or congestion risks associated with traditional fixed allocation methods. This mechanism achieves dynamic traffic balancing and fine-grained control in multi-physical-link scenarios, supports the collaborative work of heterogeneous links (such as mixed links with different bandwidths and priorities), significantly improves the flexibility of network resource scheduling and the fairness of traffic allocation, and is particularly suitable for complex network environments that require link utilization and differentiated service guarantees.
[0052] 2. This application embodiment can use the OSPF (Open Shortest Path First) protocol to uniformly set the cost value of multiple physical links to the same value, enabling the protocol's shortest path algorithm (such as Dijkstra's algorithm) to determine these links as equivalent paths with the same priority. By enabling OSPF's ECMP (Equal-cost multi-path routing) function, it overcomes the limitations of traditional protocols on dual-link load balancing, supporting three or more physical links to participate in traffic transmission simultaneously. This mechanism allows network devices to evenly distribute service traffic across all equivalent links, fully utilizing the bandwidth resources of each link and avoiding resource idleness or traffic congestion caused by differences in link priorities. When a link fails, OSPF automatically removes the failed link through dynamic route convergence, and the remaining equivalent links can still maintain traffic sharing, ensuring service continuity. This technical solution significantly improves routing efficiency and network reliability in multi-link scenarios, and is particularly suitable for scenarios with extremely high requirements for link resource utilization, such as high-bandwidth interconnection within data centers and multi-egress load balancing, achieving a technological breakthrough from dual-link to multi-link collaborative operation.
[0053] 3. This application's embodiments introduce a fault prediction model. When a physical link fails, it not only eliminates the currently faulty link in real time but also predicts the failure risk of the remaining physical links within a preset timeframe based on their real-time status indicators (such as bandwidth, latency, and packet loss rate). Only links without failure risk are included in the set of available target physical links. This mechanism avoids the secondary interruption problem caused by potential failures of remaining physical links in traditional failover, achieving a dual guarantee from "instant availability" to "short-term reliability." By accurately switching traffic to predicted stable physical links, the overall reliability of multi-physical link systems is significantly improved, reducing network oscillations caused by frequent switching or blind allocation. This is particularly suitable for scenarios with extremely high business continuity requirements (such as industrial control and financial transactions). This technology breaks through the limitations of traditional fault handling, transforming passive fault response into proactive reliability assurance through forward-looking risk assessment and intelligent screening, providing a more flexible and predictive solution for traffic scheduling in complex network environments. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0055] Figure 1 A flowchart illustrating a VXLAN-based data transmission method provided in an embodiment of this application;
[0056] Figure 2 A flowchart illustrating a load distribution method provided in an embodiment of this application;
[0057] Figure 3 This is a block diagram of a VXLAN-based data transmission device provided in an embodiment of this application. Detailed Implementation
[0058] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0059] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The terms "comprising" and "having," and any variations thereof, in the embodiments and drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0060] Figure 1 This application provides a flowchart illustrating a VXLAN-based data transmission method. This method can be applied to a switch where VXLAN is deployed. The switch with VXLAN deployed can be referred to as a VTEP (VXLAN Tunnel Endpoint) node. The method includes:
[0061] S110: After virtualizing multiple physical links between two user terminals into a single virtual link using Virtual Extended Local Area Network (VXLAN) technology, the priority of the multiple physical links is dynamically adjusted through a dynamic routing protocol, so that the multiple physical links are identified as equivalent paths.
[0062] VXLAN technology logically integrates multiple physical links between two user terminals into a single "virtual link," enabling Layer 2 traffic to be transmitted across Layer 3 physical networks (similar to building a unified logical channel across different physical paths). Based on this, dynamic routing protocols adjust the priority parameters of each physical link, making the protocol consider these physical links to have the same "priority level" (i.e., equivalent paths). Equivalent paths mean that all links have the right to transmit data, but the amount of data they transmit is not necessarily equal.
[0063] Dynamic routing protocols include OSPF and IS-IS (Intermediate System to Intermediate System). When the dynamic routing protocol is OSPF, the switch can set the cost value of multiple physical links to the same value and enable the ECMP (Equal-cost multi-path routing) function of OSPF, making multiple physical links identify as equal-cost paths. When the dynamic routing protocol is IS-IS, the switch can set the metric value of multiple physical links to the same value and enable the ECMP (Equal-cost multi-path routing) function of IS-IS, making multiple physical links identify as equal-cost paths.
[0064] In dynamic routing protocols, Cost and Metric are core parameters for measuring link priority and are used to determine the "quality" of data transmission paths.
[0065] Cost values are commonly found in the OSPF protocol and represent the transmission cost of a link. They are usually inversely proportional to bandwidth (e.g., a Cost value of 1 is set for a 10G link and 10 for a 1G link). The smaller the value, the "better" the link.
[0066] Metric values are a more general concept that can be used in various protocols (such as IS-IS and BGP (Border Gateway Protocol)). Essentially, they are a quantitative assessment of link status (bandwidth, latency, reliability, etc.). The definitions differ slightly between different protocols (for example, IS-IS's metric can be manually configured, while BGP's metric is used for cross-autonomous system path comparison).
[0067] In this embodiment, the core function of both is to enable the routing protocol to calculate the optimal path using an algorithm (such as Dijkstra's shortest path algorithm): when the Cost or Metric values of multiple physical links are configured to be the same, the protocol will determine these links as "equivalent paths," allowing traffic to be transmitted in parallel on them, thereby achieving multi-link load balancing. For example, if the Cost value of three physical links is all set to 5, OSPF will consider them to have the same priority, and thus distribute traffic evenly across these three links, making full use of the bandwidth resources of each link.
[0068] S120: Based on equal-cost paths, it distributes service traffic across multiple physical links for transmission using a load-sharing algorithm.
[0069] There are various load-sharing algorithms, which can distribute load evenly or allocate load based on the status of each physical link. This application provides a load-sharing algorithm, such as... Figure 2 As shown, the specific implementation process includes steps S121-S125:
[0070] S121: Obtain the link weight assigned to each physical link among multiple physical links based on the weight allocation model.
[0071] The weight allocation model is a neural network model that can be deployed in an SDN controller (which can be deployed in the cloud) or in a switch.
[0072] The weight allocation model can be trained based on historical link status metrics of a large number of physical links and the corresponding service traffic characteristics. After the weight allocation model is trained, when it is necessary to assign link weights to physical links, the current link status metrics and service traffic characteristics of each physical link can be obtained; the current link status metrics and service traffic characteristics of each physical link are then input into the weight allocation model to obtain the assigned link weights for each physical link.
[0073] The link status indicators include at least one of bandwidth utilization, latency, packet loss rate, and jitter level, while the service characteristics of the service traffic include traffic type, priority label, etc.
[0074] Traffic types can be categorized based on the transmission characteristics, real-time requirements, or application scenarios of service data to differentiate the Quality of Service (QoS) requirements of different services. For example:
[0075] Real-time interactive traffic, such as voice calls, video conferencing, and remote control, is extremely sensitive to latency (end-to-end latency) and jitter (latency fluctuation). A certain degree of packet loss is permissible, but low latency must be ensured.
[0076] Bulk transfer traffic, such as file downloads, data backups, and email attachments, requires high bandwidth utilization but allows for higher latency (e.g., a few seconds), prioritizing throughput over real-time performance.
[0077] Bursting transactional traffic, such as database queries and web browsing, is characterized by short connections and strong bursts. It has a certain tolerance for latency but requires a fast response.
[0078] Multicast / broadcast traffic, such as live video streaming and webcasting, requires efficient multicast routing support to avoid overloading single links.
[0079] Priority labels are level identifiers assigned to service traffic to indicate its importance or service level, enabling network devices to differentiate their handling of resource contention (such as priority forwarding and bandwidth reservation). Common implementation methods include:
[0080] IP layer priorities: such as the Type of Service (ToS) field in IPv4 or the Traffic Class field in IPv6, where DSCP (Differentiated Code Point of Service) can define 64 priorities (such as CS6, EF marking high-priority services);
[0081] Layer 2 priority: For example, the Ethernet 802.1p protocol defines a 3-bit priority label (8 levels in total) for traffic priority marking within a local area network;
[0082] Custom tags: In VXLAN scenarios, service priorities can be carried through VNI (Virtual Network Identifier) or extended fields, and priority transfer across Layer 3 networks can be achieved in combination with QoS policies.
[0083] Furthermore, the loss function for the weight allocation model can be:
[0084]
[0085] Where L represents the loss value, N represents the number of physical links, K represents the number of service traffic types, and ω i ω represents the link weight assigned by the model to the i-th physical link. i,k U represents the weight of the k-th type of service on the i-th physical link. i D represents the bandwidth utilization of the i-th physical link. i Let L1 represent the latency of the i-th physical link, and J represent the packet loss rate of the i-th physical link. i Priority represents the jitter level of the i-th physical link. k This indicates the priority of the k-th type of service (e.g., real-time video = 3, file transfer = 1), where α, β, γ, δ, and ∈ are hyperparameters that control the importance of each sub-item.
[0086] α·Var(U i The term ) represents bandwidth balancing, used to prevent overload on a physical link and promote balanced bandwidth utilization. It calculates the variance (Var(U)) of bandwidth utilization across all links. i The smaller the variance, the more balanced the distribution.
[0087] This represents a latency penalty, which applies to high-latency links where lower weights should be assigned. The penalty is calculated by accumulating the product of the weights of each link and their latency; the higher the latency, the greater the penalty.
[0088] This represents a packet loss penalty, used to reduce the weight of links with high packet loss. It is calculated by accumulating the product of the weight of each link and its packet loss rate; the higher the packet loss rate, the greater the penalty.
[0089] This represents a jitter penalty, used to reduce path jitter in jitter-sensitive services. It is calculated by accumulating the product of the weight of each link and its jitter; the greater the jitter, the greater the penalty.
[0090] This represents a business characteristic matching item. High-priority businesses should avoid high-latency and high-packet-loss links. For each type of business, the weighted sum of latency and packet loss of its allocated path is calculated. The higher the priority, the more sensitive it is to this item.
[0091] During model training, the loss value of the above loss function can be calculated in each training round. When the current loss value is greater than the preset loss threshold, the model parameters are adjusted and the model is trained in the next round until the current loss value is less than or equal to the preset loss threshold, thus obtaining the final weight allocation model.
[0092] Through this loss function, the model can learn a weight allocation strategy that can both improve network resource utilization and meet the requirements of service quality.
[0093] S122: Calculate the minimum integer ratio of the weights of all links in multiple physical links, and calculate the sum of the values in the minimum integer ratio as the total weight.
[0094] For example, the weight values of a single physical link output by the weight allocation model are as follows: physical link 1 is 30%, physical link 2 is 50%, and physical link 3 is 20%. Then, physical link 1: physical link 2: physical link 3 = 3:5:2, and the total weight = 3 + 5 + 2 = 10.
[0095] S123: Based on the total weight and the minimum integer ratio, configure the corresponding weight range for the link weight of each physical link, such that the length of the weight range is equal to the integer corresponding to the minimum integer ratio.
[0096] Continuing with the example above, when the ratio of physical link 1: physical link 2: physical link 3 = 3:5:2 and the total weight = 10, the weight range corresponding to physical link 1 can be [0,3), the weight range corresponding to physical link 2 can be [3,8), and the weight range corresponding to physical link 3 can be [8,10).
[0097] S124: Calculate the hash value of the target information in each packet of the service traffic, and normalize each hash value to obtain the normalized hash value.
[0098] The target information may include the five-tuple of the message, including source IP, destination IP, source port, destination port, and protocol, and may also include other information.
[0099] Normalizing each hash value yields a normalized hash value. This involves dividing each hash value by the total weight, and the remainder is the normalized hash value. For example, if message 1 has a hash value of 12, normalizing it results in a hash value of 2, with a weight range of [0, 3), which can be assigned to physical link 1. Similarly, if message 1 has a hash value of 25, normalizing it results in a hash value of 5, with a weight range of [3, 8), which can be assigned to physical link 2.
[0100] S125: Determine the weight range of each normalized hash value and allocate the corresponding message to the physical link corresponding to the weight range for transmission.
[0101] Since each physical link has its corresponding weight range, after normalizing the hash value of each packet to determine its weight range, the packet can be assigned to the physical link corresponding to that weight range for transmission.
[0102] This application's embodiments assign differentiated weights to each physical link through a weighted allocation model, and transform these weights into quantifiable minimum integer ratios and total weights, constructing a weight range that matches link performance, enabling traffic allocation to accurately reflect the actual carrying capacity of the links. By hashing and normalizing the target information of packets, traffic is distributed to the corresponding physical links according to the weight ratio. This supports high-bandwidth physical links to carry more traffic to fully utilize resources, while also allowing low-performance physical links to share the load proportionally, avoiding resource waste or congestion risks associated with traditional fixed allocation methods. This mechanism achieves dynamic traffic balancing and fine-grained control in multi-physical-link scenarios, supports the collaborative work of heterogeneous links (such as mixed links with different bandwidths and priorities), significantly improves the flexibility of network resource scheduling and the fairness of traffic allocation, and is particularly suitable for complex network environments that require high link utilization and differentiated service guarantees.
[0103] It should be added that before distributing service traffic to each physical link through the load balancing algorithm, an independent encryption key (such as AES-GCM or SM4) can be generated for each physical link in advance. The encryption algorithm and key index are carried through the extended field of the VXLAN header (or a custom TLV). When service traffic is distributed to a link through the load balancing algorithm, the corresponding encrypted tunnel of that physical link is automatically called for encapsulation (outer IP packet encryption) to ensure that the traffic keys of different links are isolated.
[0104] The following information is embedded in the VXLAN header extension fields (such as the newly added TLV field): encryption algorithm identifier (such as AES-GCM, SM4) and key index (pointing to the key corresponding to this link) so as to inform the receiving end of the algorithm and key location required for decryption, without transmitting the key itself.
[0105] When a load-sharing algorithm distributes service traffic to a physical link according to a strategy (such as hashing or weighting), the encryption key corresponding to that physical link is called to encrypt the outer IP packet (the outer encapsulation of the VXLAN tunnel) before transmission. This ensures that the service traffic is transmitted through the physical link in encrypted form, and the encryption keys of different physical links do not interfere with each other.
[0106] This application's embodiments achieve fine-grained security protection of "one key per link" in a multi-link environment by generating independent encryption keys for each physical link and dynamically carrying encryption algorithms and key indexes using VXLAN header extension fields or custom TLVs. When service traffic is distributed to a specific link via a load-sharing algorithm, the system automatically calls the dedicated encryption tunnel for that link to encrypt the outer IP of the packet, ensuring that traffic from different links is encapsulated with independent keys, thus eliminating the risk of cross-link key association at the underlying level.
[0107] S130: Monitors the physical link status in real time. When any physical link fails, it switches service traffic to an available target physical link through a load-sharing algorithm.
[0108] In addition to OSPF modules, BFD modules can also be deployed in switches. When two user terminals communicate via multiple physical links through their directly connected switches, if the BFD module in any switch detects an outage in at least one of the physical links, it sends a link outage notification to its local OSPF module. Upon receiving the notification, the OSPF module skips the Dead Timer and directly switches the traffic to an available target physical link using a load-sharing algorithm. Alternatively, it can directly switch traffic to all remaining physical links using the load-sharing algorithm, or it can first select physical links from the remaining links that are unlikely to fail within a preset timeframe, and then switch the traffic to the selected physical links using the load-sharing algorithm. This avoids the situation where a new fault occurs shortly after traffic switching, requiring further switching.
[0109] Specifically, when any physical link fails, the remaining physical links are predicted based on the fault prediction model to obtain the fault prediction result of each remaining physical link within a preset time period. The remaining physical links are the other physical links among multiple physical links except those that have failed. All physical links among the remaining physical links whose fault prediction results are no risk of failure are selected as available target physical links. The service traffic is switched to the available target physical links through a load sharing algorithm.
[0110] The process utilizes a pre-trained fault prediction model, inputting real-time status indicators of the remaining physical links, and outputting the fault probability of each physical link within a preset future timeframe (e.g., the next 30 minutes). Only physical links with fault probabilities less than or equal to a preset probability threshold are included in the set of available target physical links.
[0111] Fault prediction models can employ supervised learning algorithms (such as random forests and LSTM (Long Short-Term Memory) neural networks). Tree models are suitable for processing structured time-series data, while LSTM is suitable for capturing the time-series dependencies of link states. When training the fault prediction model, the collected training samples include historical state indicators of each physical link and corresponding fault records. Gradient descent optimization algorithms are used to minimize prediction errors (e.g., cross-entropy loss function) and learn the mapping relationship between link state features and fault occurrence. State indicators include bandwidth utilization, latency, packet loss rate, jitter, temperature, and voltage. Fault records include link disconnection time and may also include fault types, such as hardware failure, traffic congestion, and configuration errors.
[0112] In addition, new physical link status data can be imported periodically for incremental training to adapt to changes in the network environment (such as hardware aging and changes in service traffic patterns) and ensure long-term stability of prediction accuracy.
[0113] Through the above training process, the fault prediction model can dynamically assess the reliability of the remaining physical links based on real-time data, providing a scientific basis for traffic switching. It upgrades the traditional "post-event response" fault handling mode to intelligent scheduling of "pre-event prevention + real-time optimization", significantly improving the overall availability of multi-link systems.
[0114] The VXLAN-based data transmission method provided in this application can virtualize multiple physical links into a logically unified virtual link through VXLAN technology. This breaks through the limitations of traditional dynamic routing protocols on the number of links, allowing three or more physical links to be identified as equivalent transmission paths through dynamic priority adjustment. This enables dynamic load balancing of service traffic across multiple physical links, significantly improving link resource utilization and avoiding idle waste. Simultaneously, through real-time link status monitoring and an automatic traffic switching mechanism in case of failure, it ensures that traffic quickly migrates to available physical links in failure scenarios, guaranteeing service continuity. This effectively solves the problem of multiple physical links not being able to work together in traditional architectures, and is particularly suitable for high-density link scenarios such as cloud computing and multi-data center interconnection, achieving efficient utilization of network resources and reliable transmission.
[0115] Based on the above method embodiments, another embodiment of this application provides a VXLAN-based data transmission device, such as... Figure 3 As shown, the device includes:
[0116] The adjustment unit 210 is used to dynamically adjust the priority of the multiple physical links after virtualizing multiple physical links between two user terminals into one virtual link through the Virtual Extended Local Area Network (VXLAN) technology, so that the multiple physical links are identified as equivalent paths.
[0117] The load distribution unit 220 is used to distribute service traffic to the multiple physical links for transmission based on the equal-cost path and through a load sharing algorithm;
[0118] The switching unit 230 is used to monitor the physical link status in real time. When any physical link fails, the service traffic is switched to an available target physical link through the load sharing algorithm.
[0119] In one possible implementation, the load distribution unit 220 includes:
[0120] The acquisition module is used to acquire the link weight assigned to each physical link among the multiple physical links based on the weight allocation model;
[0121] The calculation module is used to calculate the minimum integer ratio of the weights of all links in the multiple physical links, and to calculate the sum of the values in the minimum integer ratio as the total weight;
[0122] The configuration module is used to configure a corresponding weight range for the link weight of each physical link according to the total weight and the minimum integer ratio, such that the length of the weight range is equal to the integer corresponding to the minimum integer ratio;
[0123] The calculation module is also used to calculate the hash value of the target information in each message in the service traffic, and to normalize each hash value to obtain the normalized hash value.
[0124] The determination module is used to determine the weight range in which each normalized hash value belongs;
[0125] The allocation module is used to allocate the corresponding message to the physical link corresponding to the weight interval for transmission.
[0126] In one possible implementation, the method for assigning link weights to each of the multiple physical links based on a weight allocation model includes: obtaining the current link status index of each of the multiple physical links and the service characteristics of the service traffic; inputting the current link status index of each physical link and the service characteristics of the service traffic into the weight allocation model to obtain the assigned link weights for each of the multiple physical links.
[0127] In one possible implementation, the adjustment unit 210 is used to set the cost value of the multiple physical links to the same value based on the Open Shortest Path First (OSPF) protocol, and enable the Equal Cost Multipath (ECMP) routing function of the OSPF protocol, so that the multiple physical links are identified as equal cost paths.
[0128] In one possible implementation, the switching unit 230 includes:
[0129] The fault prediction module is used to predict the fault of the remaining physical links based on the fault prediction model when any physical link is detected to have failed, and to obtain the fault prediction result of each remaining physical link within a preset time period in the future. The remaining physical links are the other physical links among the multiple physical links except those that have failed.
[0130] The selection module is used to select all physical links in the remaining physical links whose fault prediction results are no fault risk as available target physical links.
[0131] The switching module is used to switch the service traffic to an available target physical link through the load balancing algorithm.
[0132] The VXLAN-based data transmission device provided in this application can virtualize multiple physical links into a logically unified virtual link through VXLAN technology. This breaks through the limitations of traditional dynamic routing protocols on the number of links, allowing three or more physical links to be identified as equivalent transmission paths through dynamic priority adjustment. This enables dynamic load balancing of service traffic across multiple physical links, significantly improving link resource utilization and avoiding idle waste. Simultaneously, through real-time link status monitoring and an automatic traffic switching mechanism in case of failure, it ensures that traffic can quickly migrate to available physical links in failure scenarios, guaranteeing service continuity. This effectively solves the problem of multiple physical links not being able to work together in traditional architectures, and is particularly suitable for high-density link scenarios such as cloud computing and multi-data center interconnection, achieving efficient utilization of network resources and reliable transmission.
[0133] Based on the above method embodiments, another embodiment of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the above embodiments.
[0134] Based on the above method embodiments, another embodiment of this application provides an electronic device, the electronic device comprising:
[0135] One or more processors;
[0136] The processor is coupled to a storage device for storing one or more programs;
[0137] When the one or more programs are executed by the one or more processors, the electronic device performs the method as described in any of the above embodiments.
[0138] Based on the above embodiments, another embodiment of this application provides a computer program product, which includes instructions that, when executed on a computer or processor, cause the computer or processor to perform the method described in any of the above embodiments.
[0139] The above-described device and system embodiments correspond to the method embodiments and have the same technical effects. For detailed descriptions, please refer to the method embodiments. The device and system embodiments are derived from the method embodiments; detailed descriptions can be found in the method embodiments section, and will not be repeated here. Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of one embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application.
[0140] Those skilled in the art will understand that the modules in the apparatus of the embodiments can be distributed in the apparatus of the embodiments as described in the embodiments, or they can be located in one or more devices different from this embodiment with corresponding changes. The modules of the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.
[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A data transmission method based on VXLAN, characterized in that, The method includes: After virtualizing multiple physical links between two user terminals into a single virtual link using Virtual Extended Local Area Network (VXLAN) technology, the priority of the multiple physical links is dynamically adjusted through a dynamic routing protocol, so that the multiple physical links are identified as equivalent paths. Based on the equivalent path, the service traffic is distributed to the multiple physical links for transmission using a load-sharing algorithm; The system monitors the physical link status in real time, and when any physical link fails, it switches the service traffic to an available target physical link using the load balancing algorithm. The service traffic is distributed across the multiple physical links using a load-sharing algorithm, including: Obtaining the link weight assigned to each of the multiple physical links based on the weight allocation model includes: obtaining the current link status indicator and the service characteristics of the service traffic for each of the multiple physical links; inputting the current link status indicator and the service characteristics of the service traffic into the weight allocation model to obtain the link weight assigned to each of the multiple physical links; the link status indicator includes at least one of bandwidth utilization, latency, packet loss rate, and jitter level; the service characteristics of the service traffic include traffic type and priority label. Calculate the minimum integer ratio of the weights of all links in the multiple physical links, and sum the values of the minimum integer ratio as the total weight; Based on the total weight and the minimum integer ratio, a corresponding weight range is configured for the link weight of each physical link, such that the length of the weight range is equal to the integer corresponding to the minimum integer ratio; Calculate the hash value of the target information in each packet of the service traffic, and normalize each hash value to obtain the normalized hash value. Determine the weight range of each normalized hash value and allocate the corresponding message to the physical link corresponding to the weight range for transmission; The loss function of the weight allocation model is: Wherein, L represents the loss value, N represents the number of physical links, K represents the number of service traffic types, and ω i This represents the link weight assigned to the i-th physical link by the weight allocation model, where ω... i,k U represents the weight of the k-th type of service on the i-th physical link. i D represents the bandwidth utilization of the i-th physical link. i L represents the latency of the i-th physical link. i J represents the packet loss rate of the i-th physical link. i The Priority represents the jitter level of the i-th physical link. k This represents the priority of the k-th type of business, where α, β, γ, δ, and ε are hyperparameters that control the importance of each sub-item. Var(U i α·Var(U) represents the variance of bandwidth utilization across all links. i This indicates a bandwidth balancing measure, used to prevent overload of a physical link and promote balanced bandwidth utilization. This represents a latency penalty term, which should be assigned a lower weight to high-latency links. This represents a packet loss penalty, used to reduce the weight of links with high packet loss. This represents a jitter penalty item, used to reduce path jitter in jitter-sensitive services. This represents a business characteristic matching item. High-priority businesses should avoid high-latency and high-packet-loss links. For each type of business, the weighted sum of latency and packet loss of its allocated path is calculated. The higher the priority, the more sensitive it is to this item.
2. The method according to claim 1, characterized in that, The priorities of the multiple physical links are dynamically adjusted through a dynamic routing protocol to identify them as equal-cost paths, including: Based on the Open Shortest Path First (OSPF) protocol, the cost values of the multiple physical links are set to the same value, and the Equal Cost Multipath (ECMP) function of the OSPF protocol is enabled, so that the multiple physical links are identified as equal cost paths.
3. The method according to any one of claims 1-2, characterized in that, When a failure of any physical link is detected, the service traffic is switched to an available target physical link through the load balancing algorithm, including: When any physical link fails, the remaining physical links are predicted based on the fault prediction model to obtain the fault prediction result of each remaining physical link within a preset time period in the future. The remaining physical links are the other physical links among the multiple physical links except those that have failed. All remaining physical links whose fault prediction results indicate no fault risk are selected as available target physical links. The load balancing algorithm switches the service traffic to an available target physical link.
4. A VXLAN-based data transmission device, characterized in that, The device includes: The adjustment unit is used to dynamically adjust the priority of the multiple physical links after virtualizing multiple physical links between two user terminals into one virtual link through the Virtual Extended Local Area Network (VXLAN) technology, so that the multiple physical links are identified as equivalent paths. The load distribution unit is used to distribute service traffic to the multiple physical links for transmission based on the equal-cost path and through a load-sharing algorithm; The switching unit is used to monitor the physical link status in real time. When any physical link fails, the service traffic is switched to an available target physical link through the load sharing algorithm. The load distribution unit includes: The acquisition module is used to acquire the link weight assigned to each physical link among the multiple physical links based on the weight allocation model, including: acquiring the current link status indicator of each physical link among the multiple physical links and the service characteristics of the service traffic; inputting the current link status indicator of each physical link and the service characteristics of the service traffic into the weight allocation model to obtain the link weight assigned to each physical link among the multiple physical links; the link status indicator includes at least one of bandwidth utilization, latency, packet loss rate, and jitter level; the service characteristics of the service traffic include traffic type and priority label. The calculation module is used to calculate the minimum integer ratio of the weights of all links in the multiple physical links, and to calculate the sum of the values in the minimum integer ratio as the total weight; The configuration module is used to configure a corresponding weight range for the link weight of each physical link according to the total weight and the minimum integer ratio, such that the length of the weight range is equal to the integer corresponding to the minimum integer ratio; The calculation module is also used to calculate the hash value of the target information in each message in the service traffic, and to normalize each hash value to obtain the normalized hash value. The determination module is used to determine the weight range in which each normalized hash value belongs; The allocation module is used to allocate the corresponding message to the physical link corresponding to the weight interval for transmission. The loss function of the weight allocation model is: Wherein, L represents the loss value, N represents the number of physical links, K represents the number of service traffic types, and ω i This represents the link weight assigned to the i-th physical link by the weight allocation model, where ω... i,k U represents the weight of the k-th type of service on the i-th physical link. i D represents the bandwidth utilization of the i-th physical link. i L represents the latency of the i-th physical link. i J represents the packet loss rate of the i-th physical link. i The Priority represents the jitter level of the i-th physical link. k This represents the priority of the k-th type of business, where α, β, γ, δ, and ε are hyperparameters that control the importance of each sub-item. Var(U i α·Var(U) represents the variance of bandwidth utilization across all links. i This indicates a bandwidth balancing measure, used to prevent overload of a physical link and promote balanced bandwidth utilization. This represents a latency penalty term, which should be assigned a lower weight to high-latency links. This represents a packet loss penalty, used to reduce the weight of links with high packet loss. This represents a jitter penalty item, used to reduce path jitter in jitter-sensitive services. This represents a business characteristic matching item. High-priority businesses should avoid high-latency and high-packet-loss links. For each type of business, the weighted sum of latency and packet loss of its allocated path is calculated. The higher the priority, the more sensitive it is to this item.
5. The apparatus according to claim 4, characterized in that, The adjustment unit is used to set the cost value of the multiple physical links to the same value based on the Open Shortest Path First (OSPF) protocol, and to enable the Equal Cost Multipath (ECMP) routing function of the OSPF protocol, so that the multiple physical links are identified as equal cost paths.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-3.
7. An electronic device, characterized in that, The electronic device includes: One or more processors; The processor is coupled to a storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the electronic device performs the method as described in any one of claims 1-3.