Load balancing method, device and computer equipment based on MPLS-VPN network

By obtaining the forwarding equivalence class routing policy in the MPLS-VPN network and using the backpack algorithm to calculate the dynamic planning table, the problem of unreasonable network resource utilization is solved, load balancing and balanced forwarding of data packets are achieved, and network efficiency and stability are improved. sex.

CN117880182BActive Publication Date: 2024-09-20HAINAN YUEYING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311375491.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2024-09-20
Estimated Expiration
2043-10-20

AI Technical Summary

Technical Problem

The existing MPLS-VPN network lacks effective load balancing design, resulting in unreasonable utilization of network resources and inability to effectively achieve balanced forwarding of data packets.

Method used

By obtaining the forwarding equivalence class routing policy of the MPLS-VPN network, the backpack algorithm is used to determine the candidate paths of the transit nodes, and the dynamic planning table is calculated based on the load balancing and service quality evaluation values, and reasonable reserved paths are selected for packet forwarding to ensure the network Rational utilization of resources.

Benefits of technology

It achieves load balancing in the MPLS-VPN network, ensures balanced forwarding of data packets and reasonable utilization of network resources, and improves network stability and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117880182B
    Figure CN117880182B
Patent Text Reader

Abstract

The embodiment of the present application belongs to the field of network communication technology, and relates to a load balancing method based on an MPLS-VPN network, including: obtaining the routing strategy of the forwarding equivalence class of each MPLS-VPN network; determining the candidate path of each forwarding equivalence class in the MPLS network, and obtaining the transit nodes involved in each candidate path; taking the transit node as a backpack, the node bandwidth as the backpack capacity, the candidate path as the item, and the forwarding bandwidth of the candidate path as the item weight, pre-allocating the items based on the routing strategy and the backpack algorithm, and calculating the total value of each item in the backpack to obtain a dynamic planning table, and the total value is obtained according to the load balancing evaluation value and the service quality evaluation value; determining the reserved path of each transit node according to the dynamic planning table, and then determining the forwarding path of each forwarding equivalence class; obtaining the data packet associated with the MPLS-VPN network, and forwarding the data packet according to the forwarding path of the forwarding equivalence class to which the data packet belongs. The present application realizes load balancing in an MPLS-VPN network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to a load balancing method, device, computer equipment and storage medium based on an MPLS-VPN network. Background Art

[0002] MPLS (Multi-Protocol Label Switching) is an IP backbone network switching standard and belongs to the third-generation network architecture. MPLS is a packet switching technology with a label mechanism. It implements packet forwarding by exchanging labels on an IP network through a fixed-length label; the label not only determines the transmission path of the data packet to provide connection-oriented services, but also increases the transmission speed of the data packet. MPLS-VPN (Virtual Private Network, VPN) is a network technology used to build secure and reliable enterprise network connections; it combines MPLS and VPN technologies to create a virtual private network (VPN) to transmit data in a wide area network. Each MPLS-VPN is logically isolated, which means that the data between different VPN customers is isolated from each other, just like they are in different physical networks. However, the current MPLS-VPN only focuses on security design and lacks effective design in load balancing. Summary of the invention

[0003] The purpose of the embodiments of the present application is to propose a load balancing method, apparatus, computer equipment and storage medium based on an MPLS-VPN network to achieve load balancing based on an MPLS-VPN network.

[0004] In order to solve the above technical problems, the embodiment of the present application provides a load balancing method based on an MPLS-VPN network, which adopts the following technical solution:

[0005] Obtain the routing policy of the forwarding equivalence class corresponding to each MPLS-VPN network;

[0006] According to the preset path algorithm, determine the candidate paths of each forwarding equivalence class in the MPLS network, and obtain the transit nodes involved in each candidate path;

[0007] The transit node is regarded as a backpack, the node bandwidth of the transit node is regarded as the backpack capacity, the candidate path is regarded as the item, the forwarding bandwidth of the candidate path is regarded as the item weight, and the items are pre-allocated based on the routing strategy and the backpack algorithm, and the total value of each item in the backpack is calculated to obtain a dynamic planning table, wherein the total value is obtained according to the load balancing evaluation value and the service quality evaluation value;

[0008] Determine the reserved path of each transfer node according to the dynamic planning table, and determine the forwarding path of each forwarding equivalence class according to the reserved path of each transfer node;

[0009] A data packet associated with the MPLS-VPN network is acquired, and the data packet is forwarded according to a forwarding path of a forwarding equivalence class to which the data packet belongs.

[0010] Furthermore, the step of determining candidate paths of each forwarding equivalence class in the MPLS network according to a preset path algorithm includes:

[0011] For each forwarding equivalence class, obtaining a source node and a target node of the forwarding equivalence class;

[0012] Obtain data control packets from each transit node in the MPLS network;

[0013] Based on the shortest path algorithm and the data control packet, at least one shortest path between the source node and the target node is determined in the MPLS network, and the obtained shortest path is used as a candidate path of the forwarding equivalence class; or,

[0014] Based on a preset search algorithm, determining all initial paths between the source node and the target node in the MPLS network;

[0015] All the initial paths are screened according to the routing policy to obtain candidate paths of the forwarding equivalence class.

[0016] Furthermore, the steps of pre-allocating items based on the routing strategy and the backpack algorithm and calculating the total value of each item in the backpack to obtain a dynamic planning table include:

[0017] For each transit node, generating path combinations at the transit node according to candidate paths of the forwarding equivalence class at the transit node, each path combination including a candidate path under each forwarding equivalence class;

[0018] For each path combination, an initial dynamic programming table of the path combination is established based on a knapsack algorithm;

[0019] For each cell in the initial dynamic programming table, obtaining a candidate path and a transfer node corresponding to the cell;

[0020] Determining whether the candidate path and the transit node meet the capacity conditions in the routing strategy;

[0021] When the capacity condition is met, based on the backpack algorithm and the routing strategy, calculating a first total value of the backpack corresponding to the cell when accepting the item corresponding to the candidate path, and a second total value when not accepting the item corresponding to the candidate path;

[0022] The cell is filled according to the first total value and the second total value, and the next cell in the initial dynamic programming table is judged until the initial dynamic programming table is completely filled to obtain a dynamic programming table.

[0023] Furthermore, the step of calculating the total value of each item in the backpack includes:

[0024] Calculate the load balancing evaluation value and service quality evaluation value of each item in the backpack according to the load balancing strategy and service quality strategy in the routing strategy;

[0025] The total value of the backpack is calculated based on the load balancing evaluation value and the service quality evaluation value of each item.

[0026] Further, the step of determining the reserved path of each transit node according to the dynamic planning table, and determining the forwarding path of each forwarding equivalence class according to the reserved path of each transit node includes:

[0027] According to the principle of correspondence of all equivalence classes and the principle of maximizing backpack value, the reserved paths of each transfer node are determined according to the dynamic planning table, and each reserved path is deduplicated to obtain the forwarding paths of each forwarding equivalence class.

[0028] Further, the step of forwarding the data packet according to the forwarding path of the forwarding equivalence class to which the data packet belongs includes:

[0029] Obtaining the forwarding equivalence class to which the data packet belongs;

[0030] Adding an MPLS label to the data packet according to the forwarding equivalence class, wherein the MPLS label includes an MPLS-VPN network to which the data packet belongs;

[0031] During each forwarding, the transit node is determined according to the MPLS label in the data packet, so as to forward the data packet to the MPLS-VPN network or forward the data packet from the MPLS-VPN network to the target node through the forwarding path formed by each transit node.

[0032] Furthermore, after sending the data packet to a transfer node, the method further includes:

[0033] Get the node status of the next transit node;

[0034] When the node status is normal, forwarding the data packet from the current transit node to the next transit node;

[0035] When the node state is abnormal, path switching is performed at the current transit node according to the candidate path of the forwarding equivalence class to which the data packet belongs, and the data packet is forwarded through the switched path.

[0036] In order to solve the above technical problems, the embodiment of the present application also provides a load balancing device based on an MPLS-VPN network, which adopts the following technical solution:

[0037] A policy acquisition module is used to obtain the routing policy of the forwarding equivalence class corresponding to each MPLS-VPN network;

[0038] A candidate determination module is used to determine the candidate paths of each forwarding equivalence class in the MPLS network according to a preset path algorithm, and obtain the transit nodes involved in each candidate path;

[0039] A planning generation module is used to take the transit node as a backpack, the node bandwidth of the transit node as the backpack capacity, the candidate path as the item, and the forwarding bandwidth of the candidate path as the item weight, perform item pre-allocation based on the routing strategy and the backpack algorithm, and calculate the total value of each item in the backpack to obtain a dynamic planning table, wherein the total value is obtained according to the load balancing evaluation value and the service quality evaluation value;

[0040] A path determination module, used to determine the reserved path of each transfer node according to the dynamic planning table, and determine the forwarding path of each forwarding equivalence class according to the reserved path of each transfer node;

[0041] The data packet forwarding module is used to obtain a data packet associated with the MPLS-VPN network and forward the data packet according to a forwarding path of a forwarding equivalence class to which the data packet belongs.

[0042] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, which includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the load balancing method based on the MPLS-VPN network as described above are implemented.

[0043] In order to solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the steps of the load balancing method based on the MPLS-VPN network as described above are implemented.

[0044] Compared with the prior art, the embodiments of the present application have the following beneficial effects: obtaining the routing strategy of the forwarding equivalence class corresponding to each MPLS-VPN network; determining the candidate paths of each forwarding equivalence class in the MPLS network, and obtaining the transit nodes involved in each candidate path; the present application performs path selection based on the backpack algorithm, takes the transit nodes as backpacks, takes the node bandwidth of the transit nodes as the backpack capacity, takes the candidate paths as items, takes the forwarding bandwidth of the candidate paths as the item weight, performs item pre-allocation based on the routing strategy and the backpack algorithm, and calculates the total value of each item in the backpack, thereby obtaining a dynamic planning table, and the total The value is obtained according to the load balancing evaluation value and the service quality evaluation value, which can reflect the load balancing status and service quality when running different candidate paths at the transit node; the reserved path of each transit node can be reasonably selected according to the dynamic planning table, and the forwarding path of each forwarding equivalence class can be determined according to the reserved path of each transit node; the data packet associated with the MPLS-VPN network is obtained, and the data packet is forwarded according to the forwarding path of the forwarding equivalence class to which the data packet belongs. The present application realizes load balancing in the design and forwarding of MPLS-VPN network data transmission, ensuring the rationality of MPLS network resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0046] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0047] Figure 2 is a flow chart of an embodiment of a load balancing method based on an MPLS-VPN network according to the present application;

[0048] Figure 3 It is a structural diagram of an embodiment of a load balancing device based on an MPLS-VPN network according to the present application;

[0049] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0051] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0052] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0053] like Figure 1 As shown, the load balancing system 100 (MPLS network) based on MPLS-VPN may include transit nodes 101, 102, 103, 104, 105, a network 106 and MPLS-VPNs 107, 108. The network 106 is used to provide a medium for a communication link. The network 106 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0054] The transit nodes 101, 102, 103, 104, and 105 are used to forward data packets. MPLS-VPNs 107 and 108 are MPLS-VPN networks in the MPLS network. MPLS-VPNs 107 and 108 can also be composed of multiple nodes, wherein the nodes can be used as source nodes O of data packets or as destination nodes D of data packets. The nodes in MPLS-VPNs 107 and 108 can be servers that provide various services, such as background servers that provide support for various pages (web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.) displayed on terminal devices. Figure 1Only a part of the MPLS network is shown. MPLS may also contain other devices such as PE (Provider Edge) and CE (Customer Edge). Among them, PE is a router or device at the edge of the provider network (MPLS network), which is connected to the customer network and is responsible for processing customer data. PE routers usually assign VPN labels to customers in MPLS-VPN and isolate and route between different VPNs. CE is a router or device at the edge of the customer network, which is connected to the PE router of the provider network. The CE router is the entry point of the customer network, which transmits data to the provider network and receives data from the provider network.

[0055] It should be understood that Figure 1 The numbers of transit nodes, networks, and MPLS-VPNs in the example are merely illustrative. Any number of transit nodes, networks, and MPLS-VPNs may be provided as required.

[0056] Continue to refer Figure 2 , shows a flow chart of an embodiment of a load balancing method based on an MPLS-VPN network according to the present application. The load balancing method based on an MPLS-VPN network comprises the following steps:

[0057] Step S201, obtaining the routing policy of the forwarding equivalence class corresponding to each MPLS-VPN network.

[0058] Among them, forwarding equivalence class (FEC) is a very important concept in MPLS network. FEC is defined in RFC3031 as a group of IP data packets forwarded in the same way (such as transmitted along the same path, or subjected to the same processing). In the MPLS domain, when a packet enters the network, a specific FEC is assigned to it based on the characteristics of the packet, and this operation is only performed once at the entrance of the MPLS network. The FEC of a packet can be determined not only by the destination address carried in the packet, but also by other factors, such as the source of the packet, the Differentiated Services Code Point (DSCP) and other QoS parameters (Quality of Service, used to manage and optimize traffic) found in the packet headers of the network layer, transport layer and application layer.

[0059] In this application, if the source node O and the destination node D of two data packets are the same, then the two data packets can be regarded as a forwarding equivalence class. That is, the forwarding equivalence class in this application can be regarded as a general term for a class of data packets or forwarding processes with the same source node and destination node. An MPLS-VPN network can have multiple forwarding equivalence classes.

[0060] Each MPLS-VPN network has a routing policy for its corresponding forwarding equivalence class. Routing policy is a general term for control and configuration information related to packet forwarding. Routing policy is used to implement traffic engineering, ensure uniform traffic distribution, avoid link overload, and ensure isolation between MPLS-VPNs.

[0061] Step S202: According to a preset path algorithm, candidate paths of each forwarding equivalence class are determined in the MPLS network, and transit nodes involved in each candidate path are obtained.

[0062] Specifically, for a forwarding equivalence class, its source node and destination node are determined, so the candidate path of the forwarding equivalence class can be determined in the MPLS network according to the preset path algorithm. Data packets need to pass through transit nodes for forwarding, so the transit nodes involved in each candidate path can also be obtained.

[0063] Furthermore, the above-mentioned step of determining the candidate paths of each forwarding equivalence class in the MPLS network according to a preset path algorithm may include: for each forwarding equivalence class, obtaining the source node and the destination node of the forwarding equivalence class; obtaining the data control packet of each transit node in the MPLS network; based on the shortest path algorithm and the data control packet, determining at least one shortest path between the source node and the destination node in the MPLS network, and using the obtained shortest path as the candidate path of the forwarding equivalence class; or, based on a preset search algorithm, determining all initial paths between the source node and the destination node in the MPLS network; screening all initial paths according to the routing policy to obtain the candidate paths of the forwarding equivalence class.

[0064] Specifically, for each forwarding equivalence class, the source node O and the destination node D of the forwarding equivalence class are obtained, and then the data control packets of each transit node in the MPLS network are obtained.

[0065] Access Control Lists (ACLs) are data packets that implement access control. They can control the flow of data packets and define which data packets are allowed to pass through network devices and which data packets are rejected.

[0066] In MPLS-VPN load balancing, ACLs can isolate traffic from different VPNs. Each VPN can have its own ACL to define which IP addresses, subnets, or protocols can enter or leave the VPN, which helps ensure that data traffic between different VPNs is isolated from each other and does not interfere with or leak each other. ACLs support administrators to configure rules to control which data packets can pass through transit nodes or other network devices; through ACLs, fine-grained access control policies can be implemented to ensure that only data packets that meet the rules can pass. By controlling the flow of data packets through ACLs, performance can be optimized; administrators can define rules to ensure that high-priority traffic is given priority.

[0067] Based on the shortest path algorithm and data control packets, at least one shortest path between the source node and the target node can be determined in the MPLS network. The shortest path algorithm can use the Dijkstra algorithm or the Bellman-Ford algorithm, and the obtained shortest path is used as a candidate path for the forwarding equivalence class. The shortest path allows data packets related to MPLS-VPN to pass through with the shortest possible distance. The shortest path here can be the shortest path in the strict sense (at least one path with the same path length) or the shortest of several paths (at least two paths with different path lengths).

[0068] All initial paths between the source node and the target node can also be determined in the MPLS network based on a preset search algorithm. Here, a depth-first search (DFS) or a breadth-first search (BFS) can be used to find all initial paths between the source node and the target node. It should be noted that the initial path also needs to comply with the restrictions of the data control packet.

[0069] Some of the initial paths do not meet the requirements. For example, it is generally not necessary to select the longest path. Some initial paths can be discarded according to the length condition in the routing policy. If the initial path passes through a transit node, and the transit node is found to have a low configuration and a high failure rate according to the routing policy, the transit node may be overloaded. The initial path passing through the transit node can be deleted. The remaining initial paths after screening will be used as candidate paths for the forwarding equivalence class.

[0070] In this embodiment, the source node and the target node of each forwarding equivalence class are obtained; the data control packet of each transit node in the MPLS network is obtained, and the data control packet defines which data packets can pass through the transit node; based on the shortest path algorithm and the data control packet, at least one shortest path between the source node and the target node is determined in the MPLS network as a candidate path for the forwarding equivalence class; or based on a preset search algorithm, all initial paths between the source node and the target node are determined in the MPLS network, and all initial paths are screened according to the routing policy to obtain candidate paths for the forwarding equivalence class; the candidate paths are obtained in a variety of ways to prepare for subsequent path selection.

[0071] Step S203, taking the transit node as a backpack, the node bandwidth of the transit node as the backpack capacity, the candidate path as the item, and the forwarding bandwidth of the candidate path as the item weight, pre-allocate the items based on the routing strategy and the backpack algorithm, and calculate the total value of each item in the backpack to obtain a dynamic planning table, wherein the total value is obtained according to the load balancing evaluation value and the service quality evaluation value.

[0072] Among them, the knapsack algorithm is an algorithm for solving the knapsack problem. The knapsack problem is a combinatorial optimization problem, which can be described as: given a set of items, each item has its own weight and value. Within the limited total weight (i.e., the limited capacity of the knapsack), how do we choose (how to choose which items to put into the knapsack) to maximize the total value of the items. This application selects the forwarding path based on the knapsack algorithm, but improves the existing knapsack algorithm.

[0073] Specifically, the present application regards the transit node as a backpack, the transit node has a node bandwidth, and the node bandwidth will be used as the backpack capacity. The candidate path is regarded as an item, and the candidate path also requires a certain bandwidth, which is the forwarding bandwidth, and the forwarding bandwidth will be used as the item weight.

[0074] Items are pre-allocated based on the routing strategy and backpack algorithm, and the total value of each item in the backpack is calculated to obtain a dynamic planning table. The pre-allocation process is to determine whether to put an item into the backpack, that is, to determine whether to make the transfer node participate in the data forwarding in the candidate path, or to determine whether the candidate path can run at the transfer node / can be activated at the transfer node.

[0075] Based on the knapsack algorithm and routing strategy, we can make a judgment and calculate the total value of each item in the knapsack when the item is put into the knapsack and when it is not put into the knapsack. We can make a decision based on the calculated total value and fill in the dynamic programming table to record the decision results. The dynamic programming table is a concept in the knapsack algorithm, which will be explained in detail later.

[0076] Furthermore, the above-mentioned steps of pre-allocating items based on the routing strategy and the backpack algorithm and calculating the total value of each item in the backpack to obtain a dynamic planning table may include: for each transfer node, generating each path combination at the transfer node according to the candidate paths of the forwarding equivalence class at the transfer node, each path combination contains a candidate path under each forwarding equivalence class; for each path combination, establishing an initial dynamic planning table of the path combination based on the backpack algorithm; for each cell in the initial dynamic planning table, obtaining the candidate path and transfer node corresponding to the cell; judging whether the candidate path and the transfer node meet the capacity conditions in the routing strategy; when the capacity conditions are met, calculating the first total value of the backpack corresponding to the cell when accepting the items corresponding to the candidate path and the second total value when not accepting the items corresponding to the candidate path based on the backpack algorithm and the routing strategy; filling the cell according to the first total value and the second total value, and judging the next cell in the initial dynamic planning table until the initial dynamic planning table is filled to obtain the dynamic planning table.

[0077] Specifically, for each transit node, there can be multiple candidate paths of the forwarding equivalence class at the transit node, which means that multiple forwarding equivalence classes may need to pass through the transit node for data forwarding. Select a candidate path from the candidate paths of each forwarding equivalence class to obtain multiple path combinations. For example, suppose there are three forwarding equivalence classes W, X, and Y at transit node A, and the number of candidate paths they have is w, x, and y respectively; then there are at most A combination of paths.

[0078] For each path combination, an initial dynamic programming table of the path combination is established based on the knapsack algorithm. The initial dynamic programming table is a two-dimensional table in the knapsack algorithm. The following Table 1 is an initial dynamic programming table in an embodiment.

[0079] Assuming the maximum backpack capacity is N, the columns of the initial dynamic programming table are in the order of 0-N, each column corresponds to a specific backpack capacity, and the backpack capacity increases gradually from left to right; assuming the number of candidate paths (number of items) in the path combination is M, the rows in the initial dynamic programming table are 0-M, each row corresponds to a candidate path / item, and row 0 represents that the candidate path / item content is empty. There is no specific order for which row the items are in the table, and they can be set at will.

[0080] Table 1

[0081]

[0082]

[0083] For example, in Table 1 above, there are candidate paths 0, 1, 2, and 3. Each candidate path has a forwarding bandwidth (i.e., item weight), and the total value needs to be calculated after the items are put into the backpack. 0-6 in the column represent the node bandwidth (i.e., the backpack capacity of each backpack).

[0084] For each cell in the initial dynamic planning table, obtain the candidate path and transit node corresponding to the cell; determine whether the candidate path and transit node meet the capacity conditions in the routing strategy. The capacity condition is an existing concept in the backpack algorithm. For the cell dp[i][j], the corresponding backpack capacity is j, and the corresponding item i has an item weight. If you want to put the item into the backpack, the item weight must be less than or equal to the backpack capacity. This application uses the forwarding bandwidth of the candidate path as the item weight and the node bandwidth of the transit node as the backpack capacity. Therefore, the actual meaning of the capacity condition is: if the candidate path i requires the operation support of the transit node j, the forwarding bandwidth of the candidate path i needs to be less than or equal to the node bandwidth of the transit node j.

[0085] When the capacity conditions are met, based on the backpack algorithm and routing strategy, the first total value of the backpack corresponding to the cell when accepting the items corresponding to the candidate path and the second total value when not accepting the items corresponding to the candidate path are calculated.

[0086] Comparing the first total value with the second total value, the larger total value is usually selected, because the larger total value means better load balancing and service quality. If the first total value is greater than the second total value, the processing result of the first total value is selected, and the item is put into the backpack, that is, the transit node j supports the operation of the candidate path i. If the first total value is less than the second total value, the processing result of the second total value is selected, and the item is not put into the backpack, that is, the transit node j does not support the operation of the candidate path i. If the first total value and the second total value are equal, they can be processed arbitrarily.

[0087] Fill the cells according to the selection results. After filling, the cell dp[i][j] can show the maximum total value of each item in the backpack after selecting the first i items when the backpack capacity is j. The filled cell shows the local optimal solution.

[0088] Then, according to the preset judgment order, the next cell in the initial dynamic table is obtained and the next cell is judged. The judgment process is the same as the above process of this embodiment until all cells in the initial dynamic table are filled to obtain a dynamic planning table.

[0089] Furthermore, the step of calculating the total value of each item in the backpack may include: calculating the load balancing evaluation value and service quality evaluation value of each item in the backpack according to the load balancing strategy and service quality strategy in the routing strategy; calculating the total value of the backpack according to the load balancing evaluation value and service quality evaluation value of each item.

[0090] Specifically, the present application calculates the total value of each item in the backpack according to the load balancing strategy and service quality strategy in the routing strategy, that is, from the two perspectives of load balancing and service quality. The items in the backpack represent that the transit node supports the operation of the candidate path, and the candidate path must occupy the resources at the transit node. The bandwidth, link quality, etc. occupied by each candidate path can be used as a load balancing evaluation value. The candidate path needs to meet the quality of service (QoS) requirements, the delay caused by the transit node, the matching relationship between the resource configuration (such as priority) required by the equivalent forwarding class and the resource configuration (such as priority) provided by the transit node (for example, voice calls may require lower delays and higher bandwidths, while file downloads can use lower priorities, and transit nodes need to meet the requirements as much as possible), the maximum bandwidth that the transit node can provide (the candidate paths corresponding to the items in the backpack do not necessarily occupy all the resources at the transit node, and the unused resources can continue to be allocated to the candidate link), etc., will be used as the quality of service evaluation value. That is, this step is to determine the parameters related to load balancing and service quality based on the load balancing strategy and service quality strategy for the candidate paths corresponding to each item in the backpack (some parameters are obtained separately according to the candidate paths corresponding to each item in the backpack, and some parameters are obtained according to the overall calculation formed by the candidate paths corresponding to each item in the backpack), obtain the load balancing evaluation value and service quality evaluation value of each item, and then calculate the total value of the backpack, so as to evaluate and assess the candidate paths corresponding to each item in the backpack.

[0091] Based on the load balancing evaluation value and service quality evaluation value of each item in the backpack, the total value of the backpack can be calculated according to a preset calculation method. It can be understood that the larger the total value, the better the load balancing and service quality at the transfer node.

[0092] In this embodiment, according to the load balancing strategy and service quality strategy in the routing strategy, the load balancing evaluation value and service quality evaluation value of each item in the backpack are calculated respectively, and then the total value of the backpack is calculated to evaluate the load balancing effect and service quality.

[0093] In this embodiment, for each transfer node, according to the candidate paths of the forwarding equivalence class at the transfer node, each path combination at the transfer node is generated, and each path combination contains a candidate path under each forwarding equivalence class; for each path combination, an initial dynamic programming table of the path combination is established based on the backpack algorithm; for each cell in the initial dynamic programming table, the candidate path and the transfer node corresponding to the cell are obtained; it is determined whether the candidate path and the transfer node meet the capacity conditions in the routing strategy to avoid the path allocation not meeting the actual conditions; when the capacity conditions are met, based on the backpack algorithm and the routing strategy, the first total value of the backpack corresponding to the cell when accepting the items corresponding to the candidate path and the second total value when not accepting the items corresponding to the candidate path are calculated; the total value reflects the load balancing and service quality of different path combinations when running on the transfer node, so that the cell can be filled according to the first total value and the second total value, and the next cell can be judged until the table is filled to obtain the dynamic programming table, thereby realizing the evaluation of various path combinations from the perspective of load balancing and service quality.

[0094] Step S204, determining the reserved path of each transit node according to the dynamic planning table, and determining the forwarding path of each forwarding equivalence class according to the reserved path of each transit node.

[0095] Specifically, the reserved path of each transit node is determined according to the dynamic planning table, and the reserved path refers to the path supported by the transit node. When the transit node supports the forwarding of data packets of the path combination where the reserved path is located, there is a local optimal load balance.

[0096] Each transit node has at least one reserved path. By connecting the reserved paths of each transit node in series, the forwarding paths of each forwarding equivalence class can be obtained.

[0097] Furthermore, the above step S204 may include: determining the reserved paths of each transit node according to the principle of full equivalence class correspondence and the principle of backpack value maximization according to a dynamic programming table, and performing deduplication processing on each reserved path to obtain a forwarding path of each forwarding equivalence class.

[0098] Specifically, the reserved paths are selected according to the principle of full equivalence class correspondence and the principle of backpack value maximization. Among them, the principle of full equivalence class correspondence means that each forwarding equivalence class can correspond to a forwarding path in the end. For this reason, at least one path combination needs to be reserved at each transit node. The principle of backpack value maximization means that when selecting a path combination from the dynamic planning table, it is necessary to ensure that the total value of each item in the backpack is as large as possible to ensure load balancing and service quality.

[0099] The reserved path obtained at each transit node refers to the forwarding path that the transit node can support. A complete forwarding path requires multiple transit nodes. If a reserved path L is obtained at transit node A, a reserved path L may also be obtained at transit node B. Therefore, it is necessary to deduplicate the reserved paths according to the reserved paths of each transit node. After deduplication, each forwarding equivalence class corresponds to at least one complete forwarding path.

[0100] In this embodiment, in accordance with the principle of full equivalence class correspondence and the principle of backpack value maximization, the reserved path of each transit node is determined according to the dynamic planning table, and the selected reserved path can achieve higher load balancing and service quality; each reserved path is then deduplicated to obtain the forwarding path of each forwarding equivalence class, thereby preparing the path for data packet forwarding.

[0101] Step S205, obtaining a data packet associated with the MPLS-VPN network, and forwarding the data packet according to a forwarding path of the forwarding equivalence class to which the data packet belongs.

[0102] Specifically, a data packet associated with the MPLS-VPN network is obtained, and the forwarding equivalence class to which the data packet belongs is determined; a forwarding path corresponding to the forwarding equivalence class is obtained, so that the data packet is forwarded according to the forwarding path.

[0103] Furthermore, the above-mentioned step of forwarding the data packet according to the forwarding path of the forwarding equivalence class to which the data packet belongs may include: obtaining the forwarding equivalence class to which the data packet belongs; adding an MPLS label to the data packet according to the forwarding equivalence class, the MPLS label including the MPLS-VPN network to which the data packet belongs; and determining the transit node according to the MPLS label in the data packet at each forwarding, so as to forward the data packet to the MPLS-VPN network through the forwarding path formed by each transit node, or forwarding the data packet from the MPLS-VPN network to the target node.

[0104] Specifically, the MPLS label is a concept in the MPLS network. The MPLS label is added by the source node O, or by the edge router connected to the MPLS-VPN network according to the forwarding equivalence class to which the data packet belongs. It can indicate the VPN identity of the data packet (that is, the MPLS-VPN network to which the data packet belongs) and the forwarding path.

[0105] At each forwarding, the transfer node is determined according to the MPLS label in the data packet. After reaching the next transfer node, the next transfer node deletes the previous MPLS label and adds a new MPLS label. The next transfer node is determined according to the new MPLS label until the target node is reached. Among them, the forwarding path formed by each transfer node is the forwarding path of the forwarding equivalence class obtained by the backpack algorithm.

[0106] After obtaining the forwarding path of each forwarding equivalence class through the backpack algorithm, the routing table in each node can be updated. The routing table includes the local network topology information and the forwarding path, that is, the routing table stores the complete routing path information from the source node to the target node. However, the transit nodes do not obtain the entire path information at once, they only rely on the information in the routing table to gradually determine the next transit node.

[0107] The data packet may be forwarded from the source node to the MPLS-VPN network so that each node in the MPLS-VPN network obtains the data packet. Alternatively, the source node may be a node in the MPLS-VPN network, and the data packet is forwarded by the MPLS-VPN network to a target node outside the MPLS-VPN network.

[0108] In this embodiment, the forwarding equivalence class to which the data packet belongs is obtained; an MPLS label is added to the data packet according to the forwarding equivalence class, and the MPLS label includes the MPLS-VPN network to which the data packet belongs; at each forwarding, a transit node is determined according to the MPLS label in the data packet; the data packet is forwarded to the MPLS-VPN network through a forwarding path formed by each transit node, or the data packet is forwarded from the MPLS-VPN network to a target node, and the data packet can be correctly transmitted to the target while ensuring load balancing through the collaborative work between the transit nodes.

[0109] Furthermore, after sending a data packet to a transit node, the above method may also include: obtaining the node status of the next transit node; when the node status is normal, forwarding the data packet from the current transit node to the next transit node; when the node status is abnormal, performing path switching at the current transit node according to the candidate path of the forwarding equivalence class to which the data packet belongs, and forwarding the data packet through the switched path.

[0110] Specifically, in the process of forwarding a data packet, after sending the data packet to a certain transit node, the node status of the next transit node is obtained. The node status is determined by factors such as the most recent / latest node load, link quality, and delay of the transit node.

[0111] It can be understood that the node status reflects whether the transit node is suitable for forwarding data packets. When the node status is normal, the next transit node can realize normal forwarding of the data packet, and the data packet is forwarded to the next transit node.

[0112] When the node status is abnormal, the next transit node may not be able to effectively forward the data packet due to high load or failure. At this time, according to the candidate path of the forwarding equivalence class to which the data packet belongs, the path switching is performed at the current transit node to switch to other candidate paths. It should be noted that the next transit node in the candidate path to be switched to needs to be in a normal state; then the data packet is forwarded through the switched path.

[0113] In this embodiment, after a data packet is sent to a transit node, the node status of the next transit node is obtained; when the node status is normal, the current transit node forwards the data packet to the next transit node; when the node status is abnormal, path switching is performed at the current transit node based on the candidate path of the forwarding equivalence class to which the data packet belongs, so as to switch to other candidate paths, and the data packet is forwarded through the switched path, thereby ensuring the normal forwarding of the data packet.

[0114] In this embodiment, the routing strategy of the forwarding equivalence class corresponding to each MPLS-VPN network is obtained; the candidate path of each forwarding equivalence class is determined in the MPLS network, and the transit nodes involved in each candidate path are obtained; the present application performs path selection based on the backpack algorithm, takes the transit node as the backpack, takes the node bandwidth of the transit node as the backpack capacity, takes the candidate path as the item, takes the forwarding bandwidth of the candidate path as the item weight, performs item pre-allocation based on the routing strategy and the backpack algorithm, and calculates the total value of each item in the backpack, and then obtains a dynamic planning table, the total value is obtained according to the load balancing evaluation value and the service quality evaluation value, which can reflect the load balancing status and service quality when different candidate paths are running at the transit node; according to the dynamic planning table, the reserved path of each transit node can be reasonably selected, and the forwarding path of each forwarding equivalence class can be determined according to the reserved path of each transit node; the data packet associated with the MPLS-VPN network is obtained, and the data packet is forwarded according to the forwarding path of the forwarding equivalence class to which the data packet belongs. The present application realizes load balancing in the design and forwarding of data transmission in the MPLS-VPN network, and ensures the rationality of MPLS network resource utilization.

[0115] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0116] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0117] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a load balancing device based on an MPLS-VPN network. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0118] like Figure 3 As shown, the load balancing device 300 based on the MPLS-VPN network described in this embodiment includes: a policy acquisition module 301, a candidate determination module 302, a planning generation module 303, a path determination module 304 and a data packet forwarding module 305, wherein:

[0119] The policy acquisition module 301 is used to acquire the routing policy of the forwarding equivalence class corresponding to each MPLS-VPN network.

[0120] The candidate determination module 302 is used to determine the candidate paths of each forwarding equivalence class in the MPLS network according to a preset path algorithm, and obtain the transit nodes involved in each candidate path.

[0121] The planning generation module 303 is used to take the transit node as a backpack, the node bandwidth of the transit node as the backpack capacity, the candidate path as the item, and the forwarding bandwidth of the candidate path as the item weight, and pre-allocate the items based on the routing strategy and the backpack algorithm and calculate the total value of each item in the backpack to obtain a dynamic planning table, wherein the total value is obtained according to the load balancing evaluation value and the service quality evaluation value.

[0122] The path determination module 304 is used to determine the reserved path of each transfer node according to the dynamic planning table, and determine the forwarding path of each forwarding equivalence class according to the reserved path of each transfer node.

[0123] The data packet forwarding module 305 is used to obtain a data packet associated with the MPLS-VPN network and forward the data packet according to a forwarding path of a forwarding equivalence class to which the data packet belongs.

[0124] In this embodiment, the routing strategy of the forwarding equivalence class corresponding to each MPLS-VPN network is obtained; the candidate path of each forwarding equivalence class is determined in the MPLS network, and the transit nodes involved in each candidate path are obtained; the present application performs path selection based on the backpack algorithm, takes the transit node as the backpack, takes the node bandwidth of the transit node as the backpack capacity, takes the candidate path as the item, takes the forwarding bandwidth of the candidate path as the item weight, performs item pre-allocation based on the routing strategy and the backpack algorithm, and calculates the total value of each item in the backpack, and then obtains a dynamic planning table, the total value is obtained according to the load balancing evaluation value and the service quality evaluation value, which can reflect the load balancing status and service quality when different candidate paths are running at the transit node; according to the dynamic planning table, the reserved path of each transit node can be reasonably selected, and the forwarding path of each forwarding equivalence class can be determined according to the reserved path of each transit node; the data packet associated with the MPLS-VPN network is obtained, and the data packet is forwarded according to the forwarding path of the forwarding equivalence class to which the data packet belongs. The present application realizes load balancing in the design and forwarding of data transmission in the MPLS-VPN network, and ensures the rationality of MPLS network resource utilization.

[0125] In some optional implementations of this embodiment, the candidate determination module 302 may include: a node determination submodule, a control packet acquisition submodule, a shortest determination submodule, an initial determination submodule, and a candidate determination submodule, wherein:

[0126] The node determination submodule is used to obtain the source node and the target node of each forwarding equivalence class.

[0127] The control packet acquisition submodule is used to acquire the data control packets of each transit node in the MPLS network.

[0128] The shortest determination submodule is used to determine at least one shortest path between a source node and a target node in an MPLS network based on a shortest path algorithm and a data control packet, and use the obtained shortest path as a candidate path of a forwarding equivalence class.

[0129] The initial determination submodule is used to determine all initial paths between the source node and the target node in the MPLS network based on a preset search algorithm.

[0130] The candidate determination submodule is used to screen all initial paths according to the routing strategy to obtain candidate paths of the forwarding equivalence class.

[0131] In this embodiment, the source node and the target node of each forwarding equivalence class are obtained; the data control packet of each transit node in the MPLS network is obtained, and the data control packet defines which data packets can pass through the transit node; based on the shortest path algorithm and the data control packet, at least one shortest path between the source node and the target node is determined in the MPLS network as a candidate path for the forwarding equivalence class; or based on a preset search algorithm, all initial paths between the source node and the target node are determined in the MPLS network, and all initial paths are screened according to the routing policy to obtain candidate paths for the forwarding equivalence class; the candidate paths are obtained in a variety of ways to prepare for subsequent path selection.

[0132] In some optional implementations of this embodiment, the planning generation module 303 may include: a combination generation submodule, an initial establishment submodule, an acquisition submodule, a capacity judgment submodule, a value calculation submodule, and a cell filling submodule, wherein:

[0133] The combination generation submodule is used to generate, for each transfer node, path combinations at the transfer node according to the candidate paths of the forwarding equivalence class at the transfer node, each path combination including a candidate path under each forwarding equivalence class.

[0134] The initial establishment submodule is used to establish an initial dynamic programming table of the path combination based on the knapsack algorithm for each path combination.

[0135] The acquisition submodule is used to obtain the candidate path and transfer node corresponding to each cell in the initial dynamic planning table.

[0136] The capacity judgment submodule is used to judge whether the candidate paths and transit nodes meet the capacity conditions in the routing strategy.

[0137] The value calculation submodule is used to calculate the first total value of the backpack corresponding to the cell when accepting the items corresponding to the candidate path, and the second total value when not accepting the items corresponding to the candidate path, based on the backpack algorithm and routing strategy when the capacity conditions are met.

[0138] The cell filling submodule is used to fill the cell according to the first total value and the second total value, and to judge the next cell in the initial dynamic programming table until the initial dynamic programming table is filled to obtain the dynamic programming table.

[0139] In this embodiment, for each transfer node, according to the candidate paths of the forwarding equivalence class at the transfer node, each path combination at the transfer node is generated, and each path combination contains a candidate path under each forwarding equivalence class; for each path combination, an initial dynamic programming table of the path combination is established based on the backpack algorithm; for each cell in the initial dynamic programming table, the candidate path and the transfer node corresponding to the cell are obtained; it is determined whether the candidate path and the transfer node meet the capacity conditions in the routing strategy to avoid the path allocation not meeting the actual conditions; when the capacity conditions are met, based on the backpack algorithm and the routing strategy, the first total value of the backpack corresponding to the cell when accepting the items corresponding to the candidate path and the second total value when not accepting the items corresponding to the candidate path are calculated; the total value reflects the load balancing and service quality of different path combinations when running on the transfer node, so that the cell can be filled according to the first total value and the second total value, and the next cell can be judged until the table is filled to obtain the dynamic programming table, thereby realizing the evaluation of various path combinations from the perspective of load balancing and service quality.

[0140] In some optional implementations of this embodiment, the value calculation submodule may include: an evaluation value calculation unit and a total value calculation unit, wherein:

[0141] The evaluation value calculation unit is used to calculate the load balancing evaluation value and service quality evaluation value of each item in the backpack according to the load balancing strategy and service quality strategy in the routing strategy.

[0142] The total value calculation unit is used to calculate the total value of the backpack according to the load balancing evaluation value and the service quality evaluation value of each item.

[0143] In this embodiment, according to the load balancing strategy and service quality strategy in the routing strategy, the load balancing evaluation value and service quality evaluation value of each item in the backpack are calculated respectively, and then the total value of the backpack is calculated to evaluate the load balancing effect and service quality.

[0144] In some optional implementations of this embodiment, the path determination module 304 can also be used to determine the reserved path of each transit node according to the dynamic planning table in accordance with the principle of full equivalence class correspondence and the principle of backpack value maximization, and deduplicate each reserved path to obtain the forwarding path of each forwarding equivalence class.

[0145] In this embodiment, in accordance with the principle of full equivalence class correspondence and the principle of backpack value maximization, the reserved path of each transit node is determined according to the dynamic planning table, and the selected reserved path can achieve higher load balancing and service quality; each reserved path is then deduplicated to obtain the forwarding path of each forwarding equivalence class, thereby preparing the path for data packet forwarding.

[0146] In some optional implementations of this embodiment, the data packet forwarding module 305 may include: an equivalence class acquisition submodule, a label adding submodule, and a data packet forwarding submodule, wherein:

[0147] The equivalence class acquisition submodule is used to obtain the forwarding equivalence class to which the data packet belongs.

[0148] The label adding submodule is used to add an MPLS label to the data packet according to the forwarding equivalence class. The MPLS label includes the MPLS-VPN network to which the data packet belongs.

[0149] The data packet forwarding submodule is used to determine the transit node according to the MPLS label in the data packet each time forwarding, so as to forward the data packet to the MPLS-VPN network through the forwarding path formed by each transit node, or forward the data packet from the MPLS-VPN network to the target node.

[0150] In this embodiment, the forwarding equivalence class to which the data packet belongs is obtained; an MPLS label is added to the data packet according to the forwarding equivalence class, and the MPLS label includes the MPLS-VPN network to which the data packet belongs; at each forwarding, a transit node is determined according to the MPLS label in the data packet; the data packet is forwarded to the MPLS-VPN network through a forwarding path formed by each transit node, or the data packet is forwarded from the MPLS-VPN network to a target node, and the data packet can be correctly transmitted to the target while ensuring load balancing through the collaborative work between the transit nodes.

[0151] In some optional implementations of this embodiment, after sending a data packet to a transit node, the data packet forwarding module 305 may further include: a state acquisition submodule, a normal forwarding submodule, and an abnormal forwarding submodule, wherein:

[0152] The status acquisition submodule is used to obtain the node status of the next transfer node.

[0153] The normal forwarding submodule is used to forward the data packet from the current transit node to the next transit node when the node status is normal.

[0154] The abnormal forwarding submodule is used to switch the path at the current transit node according to the candidate path of the forwarding equivalence class to which the data packet belongs when the node status is abnormal, and forward the data packet through the switched path.

[0155] In this embodiment, after a data packet is sent to a transit node, the node status of the next transit node is obtained; when the node status is normal, the current transit node forwards the data packet to the next transit node; when the node status is abnormal, path switching is performed at the current transit node based on the candidate path of the forwarding equivalence class to which the data packet belongs, so as to switch to other candidate paths, and the data packet is forwarded through the switched path, thereby ensuring the normal forwarding of the data packet.

[0156] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0157] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0158] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0159] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of a load balancing method based on an MPLS-VPN network, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0160] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions or process data stored in the memory 41, such as computer-readable instructions for running the load balancing method based on the MPLS-VPN network.

[0161] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0162] The computer device provided in this embodiment can execute the above-mentioned load balancing method based on MPLS-VPN network. The load balancing method based on MPLS-VPN network here can be the load balancing method based on MPLS-VPN network in each of the above-mentioned embodiments.

[0163] In this embodiment, the routing strategy of the forwarding equivalence class corresponding to each MPLS-VPN network is obtained; the candidate path of each forwarding equivalence class is determined in the MPLS network, and the transit nodes involved in each candidate path are obtained; the present application performs path selection based on the backpack algorithm, takes the transit node as the backpack, takes the node bandwidth of the transit node as the backpack capacity, takes the candidate path as the item, takes the forwarding bandwidth of the candidate path as the item weight, performs item pre-allocation based on the routing strategy and the backpack algorithm, and calculates the total value of each item in the backpack, and then obtains a dynamic planning table, the total value is obtained according to the load balancing evaluation value and the service quality evaluation value, which can reflect the load balancing status and service quality when different candidate paths are running at the transit node; according to the dynamic planning table, the reserved path of each transit node can be reasonably selected, and the forwarding path of each forwarding equivalence class can be determined according to the reserved path of each transit node; the data packet associated with the MPLS-VPN network is obtained, and the data packet is forwarded according to the forwarding path of the forwarding equivalence class to which the data packet belongs. The present application realizes load balancing in the design and forwarding of data transmission in the MPLS-VPN network, and ensures the rationality of MPLS network resource utilization.

[0164] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the load balancing method based on the MPLS-VPN network as described above.

[0165] In this embodiment, the routing strategy of the forwarding equivalence class corresponding to each MPLS-VPN network is obtained; the candidate path of each forwarding equivalence class is determined in the MPLS network, and the transit nodes involved in each candidate path are obtained; the present application performs path selection based on the backpack algorithm, takes the transit node as the backpack, takes the node bandwidth of the transit node as the backpack capacity, takes the candidate path as the item, takes the forwarding bandwidth of the candidate path as the item weight, performs item pre-allocation based on the routing strategy and the backpack algorithm, and calculates the total value of each item in the backpack, and then obtains a dynamic planning table, the total value is obtained according to the load balancing evaluation value and the service quality evaluation value, which can reflect the load balancing status and service quality when different candidate paths are running at the transit node; according to the dynamic planning table, the reserved path of each transit node can be reasonably selected, and the forwarding path of each forwarding equivalence class can be determined according to the reserved path of each transit node; the data packet associated with the MPLS-VPN network is obtained, and the data packet is forwarded according to the forwarding path of the forwarding equivalence class to which the data packet belongs. The present application realizes load balancing in the design and forwarding of data transmission in the MPLS-VPN network, and ensures the rationality of MPLS network resource utilization.

[0166] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0167] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A load balancing method based on MPLS-VPN network, characterized in that: The steps include: Obtain the routing policy of the forwarding equivalence class corresponding to each MPLS-VPN network; According to the preset path algorithm, determine the candidate paths of each forwarding equivalence class in the MPLS network, and obtain the transit nodes involved in each candidate path; The transit node is regarded as a backpack, the node bandwidth of the transit node is regarded as the backpack capacity, the candidate path is regarded as the item, the forwarding bandwidth of the candidate path is regarded as the item weight, and the items are pre-allocated based on the routing strategy and the backpack algorithm, and the total value of each item in the backpack is calculated to obtain a dynamic planning table, wherein the total value is obtained according to the load balancing evaluation value and the service quality evaluation value; Determine the reserved path of each transfer node according to the dynamic planning table, and determine the forwarding path of each forwarding equivalence class according to the reserved path of each transfer node; Acquire a data packet associated with the MPLS-VPN network, and forward the data packet according to a forwarding path of a forwarding equivalence class to which the data packet belongs; The steps of pre-allocating items based on the routing strategy and the backpack algorithm and calculating the total value of each item in the backpack to obtain a dynamic planning table include: For each transit node, generating path combinations at the transit node according to candidate paths of the forwarding equivalence class at the transit node, each path combination including a candidate path under each forwarding equivalence class; For each path combination, an initial dynamic programming table of the path combination is established based on a knapsack algorithm; For each cell in the initial dynamic programming table, obtaining a candidate path and a transfer node corresponding to the cell; Determining whether the candidate path and the transit node meet the capacity conditions in the routing strategy; When the capacity condition is met, based on the backpack algorithm and the routing strategy, calculating a first total value of the backpack corresponding to the cell when accepting the item corresponding to the candidate path, and a second total value when not accepting the item corresponding to the candidate path; The cell is filled according to the first total value and the second total value, and the next cell in the initial dynamic programming table is judged until the initial dynamic programming table is completely filled to obtain a dynamic programming table.

2. The load balancing method based on MPLS-VPN network according to claim 1, characterized in that: The step of determining candidate paths of each forwarding equivalence class in the MPLS network according to a preset path algorithm comprises: For each forwarding equivalence class, obtaining a source node and a target node of the forwarding equivalence class; Obtain data control packets from each transit node in the MPLS network; Based on the shortest path algorithm and the data control packet, at least one shortest path between the source node and the target node is determined in the MPLS network, and the obtained shortest path is used as a candidate path of the forwarding equivalence class; or, Based on a preset search algorithm, determining all initial paths between the source node and the target node in the MPLS network; All the initial paths are screened according to the routing policy to obtain candidate paths of the forwarding equivalence class.

3. The load balancing method based on MPLS-VPN network according to claim 1, characterized in that: The steps for calculating the total value of each item in the backpack include: Calculate the load balancing evaluation value and service quality evaluation value of each item in the backpack according to the load balancing strategy and service quality strategy in the routing strategy; The total value of the backpack is calculated based on the load balancing evaluation value and the service quality evaluation value of each item.

4. The load balancing method based on MPLS-VPN network according to claim 3, characterized in that: The step of determining the reserved path of each transfer node according to the dynamic planning table, and determining the forwarding path of each forwarding equivalence class according to the reserved path of each transfer node includes: According to the principle of correspondence of all equivalence classes and the principle of maximizing backpack value, the reserved paths of each transfer node are determined according to the dynamic planning table, and each reserved path is deduplicated to obtain the forwarding paths of each forwarding equivalence class.

5. The load balancing method based on MPLS-VPN network according to claim 1, characterized in that: The step of forwarding the data packet according to the forwarding path of the forwarding equivalence class to which the data packet belongs comprises: Obtaining the forwarding equivalence class to which the data packet belongs; Adding an MPLS label to the data packet according to the forwarding equivalence class, wherein the MPLS label includes an MPLS-VPN network to which the data packet belongs; During each forwarding, the transit node is determined according to the MPLS label in the data packet, so as to forward the data packet to the MPLS-VPN network or forward the data packet from the MPLS-VPN network to the target node through the forwarding path formed by each transit node.

6. The load balancing method based on MPLS-VPN network according to claim 5, characterized in that: After the data packet is sent to a transfer node, the method further includes: Get the node status of the next transit node; When the node status is normal, forwarding the data packet from the current transit node to the next transit node; When the node state is abnormal, path switching is performed at the current transit node according to the candidate path of the forwarding equivalence class to which the data packet belongs, and the data packet is forwarded through the switched path.

7. A load balancing device based on MPLS-VPN network, characterized in that: include: A policy acquisition module is used to obtain the routing policy of the forwarding equivalence class corresponding to each MPLS-VPN network; A candidate determination module is used to determine the candidate paths of each forwarding equivalence class in the MPLS network according to a preset path algorithm, and obtain the transit nodes involved in each candidate path; A planning generation module is used to take the transit node as a backpack, the node bandwidth of the transit node as the backpack capacity, the candidate path as the item, and the forwarding bandwidth of the candidate path as the item weight, perform item pre-allocation based on the routing strategy and the backpack algorithm, and calculate the total value of each item in the backpack to obtain a dynamic planning table, wherein the total value is obtained according to the load balancing evaluation value and the service quality evaluation value; A path determination module, used to determine the reserved path of each transfer node according to the dynamic planning table, and determine the forwarding path of each forwarding equivalence class according to the reserved path of each transfer node; A data packet forwarding module, used to obtain a data packet associated with the MPLS-VPN network and forward the data packet according to a forwarding path of a forwarding equivalence class to which the data packet belongs; The dynamic planning table obtained by performing item pre-allocation based on the routing strategy and the backpack algorithm and calculating the total value of each item in the backpack includes: For each transit node, generating path combinations at the transit node according to candidate paths of the forwarding equivalence class at the transit node, each path combination including a candidate path under each forwarding equivalence class; For each path combination, an initial dynamic programming table of the path combination is established based on a knapsack algorithm; For each cell in the initial dynamic programming table, obtaining a candidate path and a transfer node corresponding to the cell; Determining whether the candidate path and the transit node meet the capacity conditions in the routing strategy; When the capacity condition is met, based on the backpack algorithm and the routing strategy, calculating a first total value of the backpack corresponding to the cell when accepting the item corresponding to the candidate path, and a second total value when not accepting the item corresponding to the candidate path; The cell is filled according to the first total value and the second total value, and the next cell in the initial dynamic programming table is judged until the initial dynamic programming table is completely filled to obtain a dynamic programming table.

8. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the load balancing method based on the MPLS-VPN network as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the load balancing method based on an MPLS-VPN network as claimed in any one of claims 1 to 6 are implemented.