(19)
(11)EP 3 565 197 A1

(12)EUROPEAN PATENT APPLICATION
published in accordance with Art. 153(4) EPC

(43)Date of publication:
06.11.2019 Bulletin 2019/45

(21)Application number: 17891216.8

(22)Date of filing:  03.11.2017
(51)International Patent Classification (IPC): 
H04L 12/803(2013.01)
(86)International application number:
PCT/CN2017/109374
(87)International publication number:
WO 2018/129993 (19.07.2018 Gazette  2018/29)
(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR
Designated Extension States:
BA ME
Designated Validation States:
MA MD

(30)Priority: 13.01.2017 CN 201710024012

(71)Applicant: Huawei Technologies Co., Ltd.
Longgang District Shenzhen, Guangdong 518129 (CN)

(72)Inventor:
  • ZHAO, Ge
    Shenzhen Guangdong 518129 (CN)

(74)Representative: Gill Jennings & Every LLP 
The Broadgate Tower 20 Primrose Street
London EC2A 2ES
London EC2A 2ES (GB)

  


(54)PATH SELECTION METHOD AND DEVICE


(57) Embodiments of the present invention provide a routing method and apparatus. The method includes: receiving, by a controller, a path measurement message; determining, by the controller, a path score of each of at least two paths based on a preset rule and the path measurement result; determining, by the controller, a routing policy of first customer-premises equipment based on the path score of each of the at least two paths; and sending, by the controller, the routing policy to the first customer-premises equipment, so that the first customer-premises equipment selects, from the at least two paths according to the routing policy, a path for transmitting a data packet. According to the present invention, path quality of each path can be scored based on the preset rule and the path measurement message obtained after measurement by the customer-premises equipment; and the routing policy suitable for a current network-wide path status is generated based on path scores and delivered to the customer-premises equipment, to ensure that customer-premises equipments in an entire network can transmit a data packet sent by a service application more quickly, stably, and securely. This improves data packet transmission quality.




Description


[0001] This application claims priority to Chinese Patent Application No. 201710024012.1, filed with the Chinese Patent Office on January 13, 2017 and entitled "ROUTING METHOD AND APPARATUS", which is incorporated herein by reference in its entirety.

TECHNICAL FIELD



[0002] The present invention relates to the field of communications technologies, and in particular, to a routing method and apparatus.

BACKGROUND



[0003] A software-defined wide area network (English: software-defined wide area network, SD-WAN for short) is a new type of wide area network architecture that can centrally control wide area network traffic on a plurality of paths. The SD-WAN includes a multi-protocol label switching (English: multi-protocol label switching, MPLS for short) network, the Internet (English: Internet), a virtual private network (English: virtual private network, VPN for short) network, a Long Term Evolution (English: long term evolution, LTE for short) network of cellular data services, and the like, and is intended to help customers reduce wide area network (WAN) costs and improve wide area network connection flexibility.

[0004] As shown in FIG. 1, the SD-WAN includes a controller and a plurality of customer-premises equipments (English: customer-premises equipment, CPE for short). Serving as an egress of a headquarters network, a headquarters-side CPE (namely, a CPE 3) is connected, by using at least two paths, to each branch-side CPE (namely, a CPE 2) configured in a branch. The at least two paths may be, for example, two paths in FIG. 1 that connect a CPE A and the CPE 3 by using a first network and a second network, respectively. In actual application, the controller 1 delivers a customer-predefined routing policy to the headquarters-side CPE (hereinafter referred to as CPE hub) and a plurality of branch-side CPEs (hereinafter referred to as CPE site) in branches. Each CPE site determines, based on the routing policy, measured path parameters of the at least two paths, and the like, a path over which a data packet of each service application in the branch is transmitted to the CPE hub.

[0005] However, after a CPE site in one branch determines, based on a path parameter measured by a branch-side measurement device and the routing policy, a path for transmitting a data packet, a CPE site in another branch may also determine to use the path to transmit a data packet. Consequently, many branches use the same path to transmit data packets to the headquarters, and the path becomes busy and congested, affecting data packet transmission of service applications in the plurality of branches.

SUMMARY



[0006] Embodiments of the present invention provide a routing method and apparatus, to resolve a prior-art problem that a path becomes busy and congested when a plurality of branches simultaneously use the path to transmit data packets to headquarters.

[0007] To resolve the foregoing technical problem, the embodiments of the present invention disclose the following technical solutions.

[0008] A first aspect of the embodiments of the present invention provides a routing method, including: receiving, by a controller, a path measurement message, where the path measurement message includes path measurement results of at least two paths between a first customer-premises equipment and a second customer-premises equipment; determining, by the controller, a path score of each of the at least two paths based on a preset rule and the path measurement results in the path measurement message; determining, by the controller, a routing policy of the first customer-premises equipment based on the path score of each of the at least two paths; and sending, by the controller, the routing policy to the first customer-premises equipment, so that the first customer-premises equipment selects, from the at least two paths according to the routing policy, a path for transmitting a data packet.

[0009] With reference to the first aspect, in a first possible implementation of the first aspect, the method further includes:
for each of the at least two paths, obtaining, by the controller, historical path scores of the path at at least two historical moments before a current time point; predicting a score change trend of the path based on the obtained historical path scores; and determining a future path score of the path at a future moment after the current time point based on the score change trend of the path; and the determining, by the controller based on a preset rule and the path measurement results, a path score of each of the at least two paths corresponding to the first customer-premises equipment includes: for each of the at least two paths, calculating, by the controller, the path score of the path based on a path measurement result, the historical path scores, and the future path score of the path and according to the preset rule.

[0010] With reference to the first aspect, in a second possible implementation of the first aspect, the path measurement result includes at least one of path traffic, a path jitter rate, a path delay, a path packet loss rate, and path switching frequency.

[0011] With reference to the first aspect, in a third possible implementation of the first aspect, the method further includes:
sending, by the controller, a measurement notification message to the first customer-premises equipment, where the measurement notification message includes at least one of a traffic measurement threshold, a jitter measurement threshold, a delay measurement threshold, a packet loss measurement threshold, and a switching threshold, so that the first customer-premises equipment measures each of the at least two corresponding paths to obtain a path measurement result of each path.

[0012] With reference to the first aspect, in a fourth possible implementation of the first aspect, an original routing policy of the first customer-premises equipment includes at least one service application, and a priority, a primary path, and a secondary path that are corresponding to each of the at least one service application; and the determining, by the controller, a routing policy of the first customer-premises equipment based on the path score of each of the at least two paths includes: determining, by the controller, a service application whose priority is higher than a preset priority in the at least one service application, as a target application, where a primary path corresponding to the target application is a first path; determining, by the controller, a path score of the first path; and when the path score of the first path is less than a second threshold, changing, by the controller, the primary path corresponding to the target application from the first path to any path whose path score is greater than a first threshold, to obtain a new routing policy of the first customer-premises equipment.

[0013] A second aspect of the embodiments of the present invention provides a routing method, where the method includes: measuring, by a first customer-premises equipment, each of at least two paths between the first customer-premises equipment and a second customer-premises equipment, to obtain a path measurement result of each path; when a path measurement result of any of the at least two paths meets a preset condition, generating, by the first customer-premises equipment, a path measurement message based on the path measurement result of each path, where the path measurement message carries the path measurement result of each path; sending, by the first customer-premises equipment, the path measurement message to a controller; and receiving, by the first customer-premises equipment, a routing policy sent by the controller based on the path measurement message, and selecting, from the at least two paths according to the routing policy, a path for transmitting a data packet of each service application.

[0014] With reference to the second aspect, in a first possible implementation of the second aspect, the path measurement result includes at least one of path traffic, a path jitter rate, a path delay, a path packet loss rate, and path switching frequency.

[0015] With reference to the second aspect, in a first possible implementation of the second aspect, the measurement notification message includes a traffic measurement threshold, a jitter measurement threshold, a delay measurement threshold, a packet loss measurement threshold, and/or a switching threshold; and the method further includes:
in any path measurement result, if path traffic exceeds the traffic measurement threshold, a jitter rate exceeds the jitter measurement threshold, a delay exceeds the delay measurement threshold, a packet loss rate exceeds the packet loss measurement threshold, or switching frequency exceeds the switching threshold, determining that the path measurement result meets the preset condition.

[0016] A third aspect of the embodiments of the present invention provides a routing apparatus, including a receiving module, a determining module, and a sending module.

[0017] The receiving module is configured to receive a path measurement message, where the path measurement message includes path measurement results of at least two paths between a first customer-premises equipment and a second customer-premises equipment; the determining module is configured to determine a path score of each of the at least two paths based on a preset rule and the path measurement results; the determining module is further configured to determine a routing policy of the first customer-premises equipment based on the path score of each of the at least two paths; and the sending module is configured to send the routing policy to the first customer-premises equipment, so that the first customer-premises equipment selects, from the at least two paths according to the routing policy, a path for transmitting a data packet.

[0018] The routing apparatus can implement the method in the first aspect and the implementations of the first aspect.

[0019] A fourth aspect of the embodiments of the present invention provides a routing apparatus, where the apparatus includes:
a measurement module, configured to measure each of at least two paths between the first customer-premises equipment and a second customer-premises equipment, to obtain a path measurement result of each path; a generation module, configured to: when a path measurement result of any of the at least two paths meets a preset condition, generate a path measurement message based on the path measurement result of each path, where the path measurement message carries the path measurement result of each path; a sending module, configured to send the path measurement message to a controller; and a receiving module, configured to: receive a routing policy sent by the controller based on the path measurement message; and select, from the at least two paths according to the routing policy, a path for transmitting a data packet of each service application.

[0020] The routing apparatus can implement the method in the second aspect and the implementations of the second aspect.

[0021] A fifth aspect of the embodiments of the present invention provides a routing apparatus, including a processor and a memory. The processor and the memory are configured to support the routing apparatus in implementing corresponding functions in the method in the first aspect or the second aspect. The memory stores a program, and the processor is configured to invoke the program to implement the method in the first or second aspect and the implementations of the first or second aspect.

[0022] A sixth aspect of the embodiments of the present invention provides a computer readable medium, configured to store a computer program, and the computer program includes an instruction used to execute the method in the first or second aspect and the implementations of the first or second aspect.

[0023] The technical solutions provided in the embodiments of the present invention may have the following beneficial effects:
In the embodiments of the present invention, after receiving the path measurement message, the controller may first determine, based on the preset rule and the received path measurement results, path scores of the at least two paths corresponding to the customer-premises equipment; then, determine the routing policy of the first customer-premises equipment based on the path score of each of the at least two paths; and finally send the routing policy to the first customer-premises equipment, so that the first customer-premises equipment selects, from the at least two paths according to the routing policy, the path for transmitting a data packet.

[0024] According to the methods provided in the embodiments of the present invention, path quality of each path can be scored based on the path measurement message obtained after the first customer-premises equipment measures each of the at least two paths between the first customer-premises equipment and the second customer-premises equipment and according to the preset rule; the routing policy suitable for a current network-wide path status is automatically generated based on the path scores; and the generated routing policy is automatically delivered to the first customer-premises equipment and the second customer-premises equipment, to ensure that the customer-premises equipments in an entire network can transmit a data packet sent by a service application more quickly, stably, and securely. This improves data packet transmission quality.

[0025] It should be understood that, the foregoing general description and the following detailed description are merely illustrative and explanative, and are not intended to limit the present invention.

BRIEF DESCRIPTION OF DRAWINGS



[0026] To describe the technical solutions in the embodiments of the present invention or in the prior art more clearly, the following briefly describes the accompanying drawings required for describing the embodiments or the prior art.

FIG. 1 is a diagram of a network architecture to which a routing method is applied according to an example embodiment;

FIG. 2 is a schematic flowchart of a routing method according to an example embodiment;

FIG. 3 is a schematic flowchart of step S105 in FIG. 2;

FIG. 4 is a schematic structural diagram of a routing apparatus according to an example embodiment;

FIG. 5 is a schematic structural diagram of another routing apparatus according to an example embodiment; and

FIG. 6 is a schematic structural diagram of still another routing apparatus according to an embodiment of the present invention.


DESCRIPTION OF EMBODIMENTS



[0027] To make a person skilled in the art understand the technical solutions in the present invention better, the following describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention.

[0028] During transmission of a data packet in a branch, to select an appropriate path for the data packet based on path quality of an entire network, as shown in FIG. 2, an embodiment of the present invention provides a routing method. The routing method may be applied to a controller 1 in FIG. 1. In actual application, the controller 1 is mainly responsible for generating a routing policy based on a path parameter, and delivering the routing policy to a branch-side CPE 2 and a headquarters-side CPE 3. FIG. 1 also includes the branch-side CPE 2 and the headquarters-side CPE 3. The branch-side CPE 2 measures at least two paths connected to the branch-side CPE 2, adds measured path measurement results to a path measurement message, and reports the path measurement message to the controller 1. The headquarters-side CPE 3 measures path parameters of at least two paths connected to the headquarters-side CPE 3, and reports the measured path parameters to the controller 1 in a form of a path measurement message. In this embodiment of the present invention, the path is a path between the headquarters-side CPE 3 and the branch-side CPE 2. As shown in FIG. 1, the headquarters-side CPE 3 and a branch-side CPE A communicate by using a path passing through a first network, or communicate by using a path passing through a second network; and the headquarters-side CPE 3 and a branch-side CPE B also communicate by using a path passing through the first network, or communicate by using a path passing through the second network. In other words, each branch-side CPE 2 communicates with the headquarters-side CPE 3 by using at least two paths. The routing method includes the following steps.

[0029] Step S101. A first customer-premises equipment measures each of at least two paths between the first customer-premises equipment and a second customer-premises equipment, to obtain a path measurement result of each path.

[0030] In this embodiment of the present invention, the first customer-premises equipment may be the headquarters-side CPE or the branch-side CPE; a customer is generally an enterprise user; the at least two paths corresponding to the first customer-premises equipment may be at least two paths by using which the headquarters-side CPE is connected to the branch-side CPE, or at least two paths by using which the branch-side CPE is connected to the headquarters-side CPE; a path measurement message carries path measurement results of the at least two paths corresponding to the first customer-premises equipment; and the path measurement result includes at least one of path traffic (namely, a quantity of packets transmitted per second on the path), a path jitter rate (namely, a quantity of jitters per second on the path), a path delay (namely, time required for transmitting a packet from one end of the path to the other end of the path), a path packet loss rate (namely, a quantity of packets lost per second on the path), and path switching frequency (namely, a quantity of times of path switching per second).

[0031] In this step, the first customer-premises equipment measures at least one of the path traffic, the jitter parameter, the delay, the packet loss rate, and the switching frequency of each of the at least two paths by using which the first customer-premises equipment is connected to the second customer-premises equipment, and generates, based on the measured path measurement result of each path, the path measurement message including the path measurement results of the plurality of paths.

[0032] Optionally, when an active measurement function is not configured in each customer-premises equipment, path measurement may be initiated in a passive manner based on a measurement notification message sent by the controller. Therefore, before step S101, the method may further include: receiving, by the first customer-premises equipment, the measurement notification message sent by the controller, and measuring each of the at least two paths based on the measurement notification message, to obtain the measurement result of each path.

[0033] Step S102. When a path measurement result of any of the at least two paths meets a preset condition, the first customer-premises equipment generates a path measurement message based on the path measurement result of each path, where the path measurement message carries the path measurement result of each path; and the first customer-premises equipment sends the path measurement message to the controller.

[0034] In this embodiment of the present invention, to help the first customer-premises equipment determine whether the path traffic, the jitter rate, the delay, or the packet loss rate of each path exceeds a corresponding threshold, and therefore to facilitate determining whether the path measurement result meets the preset condition, the measurement notification message includes at least one of a traffic measurement threshold, a jitter measurement threshold, a delay measurement threshold, a packet loss measurement threshold, and a switching threshold.

[0035] In this step, the first customer-premises equipment may first compare the measured path traffic with the traffic measurement threshold, compare the jitter parameter with the jitter measurement threshold, compare the delay with the delay measurement threshold, compare the packet loss rate with the packet loss measurement threshold, or compare the switching frequency with the switching threshold. In any path measurement result, if path traffic exceeds the traffic measurement threshold, a jitter rate exceeds the jitter measurement threshold, a delay exceeds the delay measurement threshold, a packet loss rate exceeds the packet loss measurement threshold, or switching frequency exceeds the switching threshold, the path measurement result meets the preset condition. In this embodiment of the present invention, the branch-side CPE may directly send the path measurement message to the controller, and the headquarters-side CPE may also directly send the path measurement message to the controller.

[0036] Step S103. The controller receives the path measurement message.

[0037] In this embodiment of the present invention, the path measurement message includes the path measurement results of the at least two paths between the first customer-premises equipment and the second customer-premises equipment.

[0038] In this step, the controller may receive path measurement messages sent by a plurality of customer-premises equipments, that is, path measurement messages sent by the headquarters-side CPE and a plurality of branch-side CPEs.

[0039] Step S104. The controller determines a path score of each of the at least two paths based on a preset rule and the path measurement result.

[0040] In this embodiment of the present invention, the preset rule may be represented by the following formula:



[0041] In the preceding formula, LinkM indicates a path score of any path; traffic indicates path traffic; weight_traffic indicates a weight of the path traffic; jitter indicates a jitter rate of the path; weight_j indicates a weight of the jitter rate; delay indicates a delay; weight_d indicates a weight of the delay; loss indicates a packet loss rate; weight_L indicates a weight of the packet loss rate; LinkSwitch indicates switching frequency; weight_switch indicates a weight of the switching frequency; HisLinkM indicates a historical path score of the network path at a moment the same as the current time point on a previous day; for example, if the current time point is 8:00 a.m. on December 10, the moment the same as the current time point on the previous day may be 8:00 a.m. on December 9, 8:00 a.m. on December 8, 8:00 a.m. on December 7, or the like; weight_h indicates a weight of the historical path score; FutureLinkM indicates a future path score at a future moment the same as the current time point on a future day; for example, if the current time point is 10:00 p.m. on December 10, the moment the same as the current time point on the previous day may be 10:00 p.m. on December 11; and weight_f indicates a weight of the future path score. An F(x) function may be used to calculate scores of the parameters in the formula (1) based on input values of the parameters. The parameter herein may be traffic, jitter, delay, loss, LinkSwitch, HisLinkM, or FutureLinkM. The F(x) function is not limited in the present invention, and an appropriate algorithm may be determined based on an actual situation. The following is an example of the F(x):
if x≤BT F(x)=100;
if BT<x≤VT F(x)=60+40(VT-X)/(VT-BT);
if VT<X≤IT F(x)=60-60(X-VT)/VT; and
if X>IT F(x)=0, where
VT is a minimum threshold, IT may be an acceptable worst threshold, BT is a maximum threshold, and VT<IT<BT.

[0042] Based on the foregoing formula, the method may further include the following steps:

[0043] For each customer-premises equipment, the controller obtains historical path scores of each of at least two paths at at least two historical moments before a current time point, or in other words, the controller may determine HisLinkM for the at least two paths corresponding to each customer-premises equipment.

[0044] For each path, the controller predicts a score change trend of the path based on the obtained historical path scores, and determines a future path score of the path at a future moment after the current time point based on the score change trend, or in other words, the controller may determine FutureLinkM for the at least two paths corresponding to each customer-premises equipment.

[0045] In this step, the controller calculates the path score of each path based on the path measurement result, the historical path scores, and the future path score of the path and according to the preset rule.

[0046] In actual application, referring to the following correspondence table 1, an original routing policy of each customer-premises equipment includes at least one service application, and a priority, a primary path, and a secondary path that are corresponding to each of the at least one service application.
Service applicationPriorityPrimary pathSecondary path
VoIP High MPLS path Internet path
Email Medium Internet path MPLS path


[0047] In actual application, if a routing policy in customer-premises equipment is to be replaced for a first time, an original routing policy may be a routing policy preconfigured by a customer in the customer-premises equipment. If a routing policy in customer-premises equipment is not to be replaced for a first time, an original routing policy may be a routing policy delivered by the controller last time. A replacement identifier may be set to help determine whether the routing policy in the customer-premises equipment is to be replaced for the first time. For example, when the replacement identifier is 0, the routing policy has not been replaced, and is a customer-preconfigured routing policy; when the replacement identifier is 1, the routing policy has been replaced. The primary path is a path used preferentially, and the secondary path is a candidate path. A priority of a service application may be a priority of using a path by the service application. For example, the priority of using the multi-protocol label switching virtual private network (English: Multi-Protocol Label Switching Virtual Private Network, MPLS VPN for short) network path by the service application Email is medium, and the priority of using the MPLS VPN path by the service application Voice over Internet Protocol (English: Voice over Internet Protocol, VoIP for short) is high.

[0048] Step S105. The controller determines a routing policy of the customer-premises equipment based on the path score of each of the at least two paths.

[0049] In actual application, step S105 may include the following steps.

[0050] Step S1051. The controller determines a service application whose priority is higher than a preset priority in the at least one service application, as a target application, where a primary path corresponding to the target application is a first path.

[0051] In this embodiment of the present invention, the preset priority may be a high priority, a medium-or-high priority, or the like, and may be specifically set based on an actual need. This is not limited in this embodiment of the present invention.

[0052] Step S1052. The controller determines a path score of the first path.

[0053] Specifically, the controller has determined the path score of each path, and therefore can determine the score of the first path easily after determining the first path.

[0054] Step S1053. When the path score of the first path is less than a second threshold, the controller changes the primary path corresponding to the target application from the first path to any path whose path score is greater than a first threshold, to obtain a new routing policy of the first customer-premises equipment. In this embodiment of the present invention, the first threshold and the second threshold may each be a preset value, for example, 1, 2 or 3. In this embodiment of the present invention, the first threshold is greater than the second threshold, and specific values may be set based on an actual need.

[0055] A path whose path score is greater than the first threshold is a path of relatively good path quality, and a path whose path score is less than the second threshold is a path of relatively poor path quality.

[0056] In this step, the controller replaces a primary path, corresponding to each target application identifier, of relatively poor path quality in the original routing policy with a path whose path score is greater than the first threshold, or in other words, changes the primary path from the path with a low path score to the path with a high path score, to obtain the new routing policy, so as to ensure more reliable transmission of a data packet.

[0057] In actual application, optionally, the routing method may further include:
determining, by the controller, path scores of primary paths of a plurality of service applications in the to-be-replaced routing policy.

[0058] In this step, the controller may determine, based on the original routing policy of each customer-premises equipment, the primary path corresponding to each service application, and then determine, based on path scores of the at least two paths of the customer-premises equipment, a primary path A of each service application. Because the path scores of the at least two paths of the customer-premises equipment certainly include a path score X of the path A, a path score of the primary path of the service application A is X.

[0059] If the path scores of the primary paths of the plurality of service applications are greater than a third threshold, and the current routing policy is not the routing policy preconfigured by the customer in the customer-premises equipment, the controller sends a rollback instruction to the at least one customer-premises equipment in which the path scores are greater than the third threshold, so that the routing policy of the at least one customer-premises equipment is rolled back to the preconfigured routing policy.

[0060] In this embodiment of the present invention, the plurality of service applications for which the path scores of the primary paths are greater than the third threshold may be all the service applications in the to-be-replaced routing policy, or the like. The third threshold should be greater than the first threshold, and the third threshold may be a preset value, for example, 1, 2 or 3. A specific value may be set based on an actual need.

[0061] In this step, the controller may compare the path score of the primary path of each service application with the third threshold. When scores of a plurality of primary paths are greater than the third threshold, the primary paths whose path scores are greater than the third threshold have relatively good path quality. In actual application, in the preconfigured routing policy, a primary path is generally a path of relatively good path quality, and a secondary path is a path whose path quality is poorer than that of the primary path. Therefore, the rollback instruction may be used to instruct the customer-premises equipment to roll back from the current routing policy to the preconfigured routing policy, and the customer-premises equipment transmits a data packet according to the preconfigured routing policy without generating a new routing policy.

[0062] Step S106. The controller sends the routing policy to the first customer-premises equipment.

[0063] In actual application, the controller may further store the determined routing policy before or after sending the routing policy, so that the controller knows a current routing policy of each customer-premises equipment.

[0064] Step S107. The first customer-premises equipment selects, from the at least two paths according to the routing policy, a path for transmitting a data packet of each service application.

[0065] In this step, after receiving the routing policy sent by the controller, the first customer-premises equipment may determine, according to the routing policy, the path for transmitting a data packet sent by each service application.

[0066] In actual application, before step S102, the routing method may further include:

determining, by the controller, the path scores of the primary paths of the plurality of service applications in the original routing policy; and

if a path measurement result of a primary path of at least one service application meets an automatic switching condition, changing, by the customer-premises equipment, the primary path of the at least one service application to secondary path, and changing the secondary path to primary path.



[0067] In this embodiment of the present invention, the automatic switching condition may be that path traffic on a primary path, a jitter rate of a delay jitter on the path, a delay of the path, and a packet loss rate of packet loss on the path and/or a switching parameter of path switching frequency are/is less than a minimum path quality threshold preconfigured by the customer. In this case, before sending the path measurement message to the controller, the customer-premises equipment may further automatically change the primary path to secondary path, and change the secondary path to primary path.

[0068] In this embodiment of the present invention, after receiving the path measurement message, the controller may first determine, based on the preset rule and the received path measurement results, the path scores of the at least two paths corresponding to the customer-premises equipment; then, determine the routing policy of the first customer-premises equipment based on the path score of each of the at least two paths; and finally send the routing policy to the first customer-premises equipment, so that the first customer-premises equipment selects, from the at least two paths according to the routing policy, the path for transmitting a data packet.

[0069] According to the method provided in this embodiment of the present invention, path quality of each path can be scored based on the path measurement message obtained after the first customer-premises equipment measures each of the at least two paths between the first customer-premises equipment and the second customer-premises equipment and according to the preset rule; the routing policy suitable for a current network-wide path status is automatically generated based on the path scores; and the generated routing policy is automatically delivered to the first customer-premises equipment and the second customer-premises equipment, to ensure that the customer-premises equipments in an entire network can transmit a data packet sent by a service application more quickly, stably, and securely. This improves data packet transmission quality.

[0070] As shown in FIG. 4, in another embodiment of the present invention, a routing apparatus is provided, including a receiving module 11, a determining module 12, and a sending module 13.

[0071] The receiving module 11 is configured to receive a path measurement message, where the path measurement message includes path measurement results of at least two paths between a first customer-premises equipment and a second customer-premises equipment.

[0072] The determining module 12 is configured to determine a path score of each of the at least two paths based on a preset rule and the path measurement results.

[0073] The determining module 12 is further configured to determine a routing policy of the first customer-premises equipment based on the path score of each of the at least two paths.

[0074] The sending module 13 is configured to send the routing policy to the first customer-premises equipment, so that the first customer-premises equipment selects, from the at least two paths according to the routing policy, a path for transmitting a data packet.

[0075] In another embodiment of the present invention, the determining module 12 is further configured to: for each of the at least two paths, obtain historical path scores of the path at at least two historical moments before a current time point; predict a score change trend of the path based on the obtained historical path scores; and determine a future path score of the path at a future moment after the current time point based on the score change trend of the path; and
the determining module 12 is further configured to: for each of the at least two paths, calculate the path score of the path based on a path measurement result, the historical path scores, and the future path score of the path and according to the preset rule.

[0076] In another embodiment of the present invention, the path measurement result includes at least one of path traffic, a path jitter rate, a path delay, a path packet loss rate, and path switching frequency.

[0077] In another embodiment of the present invention, the sending module 13 is further configured to send a measurement notification message to the first customer-premises equipment, where the measurement notification message includes at least one of a traffic measurement threshold, a jitter measurement threshold, a delay measurement threshold, a packet loss measurement threshold, and a switching threshold, so that the first customer-premises equipment measures each of the at least two corresponding paths to obtain a path measurement result of each path.

[0078] In another embodiment of the present invention, an original routing policy of the first customer-premises equipment includes at least one service application, and a priority, a primary path, and a secondary path that are corresponding to each of the at least one service application; and the determining module 12 is configured to:

determine a service application whose priority is higher than a preset priority in the at least one service application, as a target application, where a primary path corresponding to the target application is a first path;

determine a path score of the first path; and

when the path score of the first path is less than a second threshold, change the primary path corresponding to the target application from the first path to any path whose path score is greater than a first threshold, to obtain a new routing policy of the first customer-premises equipment.



[0079] As shown in FIG. 5, in still another embodiment of the present invention, a routing apparatus is provided, including a measurement module 21, a generation module 22, a sending module 23, and a receiving module 24.

[0080] The measurement module 21 is configured to measure each of at least two paths between the first customer-premises equipment and a second customer-premises equipment, to obtain a path measurement result of each path.

[0081] The generation module 22 is configured to: when a path measurement result of any of the at least two paths meets a preset condition, generate a path measurement message based on the path measurement result of each path, where the path measurement message carries the path measurement result of each path.

[0082] The sending module 23 is configured to send the path measurement message to a controller.

[0083] The receiving module 24 is configured to: receive a routing policy sent by the controller based on the path measurement message; and select, from the at least two paths according to the routing policy, a path for transmitting a data packet of each service application.

[0084] In still another embodiment of the present invention, the path measurement result includes at least one of path traffic, a path jitter rate, a path delay, a path packet loss rate, and path switching frequency.

[0085] In still another embodiment of the present invention, the measurement notification message includes a traffic measurement threshold, a jitter measurement threshold, a delay measurement threshold, a packet loss measurement threshold, and/or a switching threshold; and the apparatus further includes:
a determining module, configured to: in any path measurement result, if path traffic exceeds the traffic measurement threshold, a jitter rate exceeds the jitter measurement threshold, a delay exceeds the delay measurement threshold, a packet loss rate exceeds the packet loss measurement threshold, or switching frequency exceeds the switching threshold, determine that the path measurement result meets the preset condition.

[0086] An embodiment of the present invention provides a routing apparatus 600, as shown in FIG. 6, including a memory 601, a processor 602, and a communications interface 603. The memory 601 is configured to store code or a program, the processor 602 is configured to invoke the code or the program to execute any of the methods shown in FIG. 2 and FIG. 3, and the communications interface 603 is configured to communicate with another device.

[0087] The memory 601, the processor 602 and the communications interface 603 are coupled together by using a bus system 604. The memory 601 may include a random access memory, or may further include a non-volatile memory, such as at least one magnetic disk storage. The bus system 604 may be an Industry Standard Architecture (English: Industry Standard Architecture, ISA for short) bus, a Peripheral Component Interconnect (English: Peripheral Component, PCI for short) bus, an Extended Industry Standard Architecture (English: Extended Industry Standard Architecture, EISA for short) bus, or the like. The bus system 604 may be classified into an address bus, a data bus, a control bus, and the like. For ease of representation, the bus is represented by using only one bold line in FIG. 6. However, this does not mean that there is only one bus or one type of bus.

[0088] In an implementation, the receiving module and the sending module in FIG. 4 or FIG. 5 may be integrated into the communications interface 603, and the remaining modules may be integrated into the processor 602. The remaining modules may be built in or be independent of the processor of a network device in a hardware form, or may be stored in a software form in the memory of the network device, for the processor to invoke to perform operations corresponding to the foregoing modules. The processor may be a central processing unit (English: central processing unit, CPU for short), an application-specific integrated circuit (English: applicationspecific integrated circuit, ASIC for short), or one or more integrated circuits configured to implement this embodiment of the present invention.

[0089] The devices in the routing apparatus 600 provided in this embodiment of the present invention are configured to execute the foregoing method. Therefore, for beneficial effects of the routing apparatus 600, refer to the beneficial effects of the foregoing method. Details are not repeated herein.

[0090] During specific implementation, the present invention further provides a computer storage medium. The computer storage medium may store a program. When the program is executed, some or all of the steps of the embodiments of the routing method provided in the present invention may be performed. The storage medium may be a magnetic disk, an optical disc, a read-only memory (English: read-only memory, ROM for short), a random access memory (English: random access memory, RAM for short), or the like.

[0091] For same or similar parts in the embodiments in this specification, mutual reference may be made between these embodiments. Especially, wireless communications device embodiments are basically similar to a method embodiment, and therefore are described briefly. For related parts, refer to descriptions in the method embodiment.

[0092] The foregoing implementations of the present invention are not intended to limit the protection scope of the present invention.


Claims

1. A routing method, comprising:

receiving, by a controller, a path measurement message, wherein the path measurement message comprises path measurement results of at least two paths between a first customer-premises equipment and a second customer-premises equipment;

determining, by the controller, a path score of each of the at least two paths based on a preset rule and the path measurement results;

determining, by the controller, a routing policy of the first customer-premises equipment based on the path score of each of the at least two paths; and

sending, by the controller, the routing policy to the first customer-premises equipment, so that the first customer-premises equipment selects, from the at least two paths according to the routing policy, a path for transmitting a data packet.


 
2. The method according to claim 1, wherein the method further comprises:

for each of the at least two paths, obtaining, by the controller, historical path scores of the path at at least two historical moments before a current time point; predicting a score change trend of the path based on the obtained historical path scores; and determining a future path score of the path at a future moment after the current time point based on the score change trend of the path; and

the determining, by the controller based on a preset rule and the path measurement results, a path score of each of the at least two paths corresponding to the first customer-premises equipment comprises:
for each of the at least two paths, calculating, by the controller, the path score of the path based on a path measurement result, the historical path scores, and the future path score of the path and according to the preset rule.


 
3. The method according to claim 1, wherein the path measurement result comprises at least one of path traffic, a path jitter rate, a path delay, a path packet loss rate, and path switching frequency.
 
4. The method according to claim 3, wherein the method further comprises:
sending, by the controller, a measurement notification message to the first customer-premises equipment, wherein the measurement notification message comprises at least one of a traffic measurement threshold, a jitter measurement threshold, a delay measurement threshold, a packet loss measurement threshold, and a switching threshold, so that the first customer-premises equipment measures each of the at least two corresponding paths to obtain a path measurement result of each path.
 
5. The method according to any one of claims 1 to 4, wherein an original routing policy of the first customer-premises equipment comprises at least one service application, and a priority, a primary path, and a secondary path that are corresponding to each of the at least one service application; and the determining, by the controller, a routing policy of the first customer-premises equipment based on the path score of each of the at least two paths comprises:

determining, by the controller, a service application whose priority is higher than a preset priority in the at least one service application, as a target application, wherein a primary path corresponding to the target application is a first path;

determining, by the controller, a path score of the first path; and

when the path score of the first path is less than a second threshold, changing, by the controller, the primary path corresponding to the target application from the first path to any path whose path score is greater than a first threshold, to obtain a new routing policy of the first customer-premises equipment.


 
6. A routing method, wherein the method comprises:

measuring, by a first customer-premises equipment, each of at least two paths between the first customer-premises equipment and a second customer-premises equipment, to obtain a path measurement result of each path;

when a path measurement result of any of the at least two paths meets a preset condition, generating, by the first customer-premises equipment, a path measurement message based on the path measurement result of each path, wherein the path measurement message carries the path measurement result of each path;

sending, by the first customer-premises equipment, the path measurement message to a controller; and

receiving, by the first customer-premises equipment, a routing policy sent by the controller based on the path measurement message, and selecting, from the at least two paths according to the routing policy, a path for transmitting a data packet of each service application.


 
7. The method according to claim 6, wherein the path measurement result comprises at least one of path traffic, a path jitter rate, a path delay, a path packet loss rate, and path switching frequency.
 
8. The method according to claim 7, wherein the measurement notification message comprises a traffic measurement threshold, a jitter measurement threshold, a delay measurement threshold, a packet loss measurement threshold, and/or a switching threshold; and the method further comprises:
in any path measurement result, if path traffic exceeds the traffic measurement threshold, a jitter rate exceeds the jitter measurement threshold, a delay exceeds the delay measurement threshold, a packet loss rate exceeds the packet loss measurement threshold, or switching frequency exceeds the switching threshold, determining that the path measurement result meets the preset condition.
 
9. A routing apparatus, comprising:

a receiving module, configured to receive a path measurement message, wherein the path measurement message comprises path measurement results of at least two paths between a first customer-premises equipment and a second customer-premises equipment;

a determining module, configured to determine a path score of each of the at least two paths based on a preset rule and the path measurement results, wherein

the determining module is further configured to determine a routing policy of the first customer-premises equipment based on the path score of each of the at least two paths; and

a sending module, configured to send the routing policy to the first customer-premises equipment, so that the first customer-premises equipment selects, from the at least two paths according to the routing policy, a path for transmitting a data packet.


 
10. The apparatus according to claim 9, wherein
the determining module is further configured to: for each of the at least two paths, obtain historical path scores of the path at at least two historical moments before a current time point; predict a score change trend of the path based on the obtained historical path scores; and determine a future path score of the path at a future moment after the current time point based on the score change trend of the path; and
the determining module is further configured to: for each of the at least two paths, calculate the path score of the path based on a path measurement result, the historical path scores, and the future path score of the path and according to the preset rule.
 
11. The apparatus according to claim 9, wherein the path measurement result comprises at least one of path traffic, a path jitter rate, a path delay, a path packet loss rate, and path switching frequency.
 
12. The apparatus according to claim 11, wherein
the sending module is further configured to send a measurement notification message to the first customer-premises equipment, wherein the measurement notification message comprises at least one of a traffic measurement threshold, a jitter measurement threshold, a delay measurement threshold, a packet loss measurement threshold, and a switching threshold, so that the first customer-premises equipment measures each of the at least two corresponding paths to obtain a path measurement result of each path.
 
13. The apparatus according to any one of claims 9 to 12, wherein an original routing policy of the first customer-premises equipment comprises at least one service application, and a priority, a primary path, and a secondary path that are corresponding to each of the at least one service application; and the determining module is configured to:

determine a service application whose priority is higher than a preset priority in the at least one service application, as a target application, wherein a primary path corresponding to the target application is a first path;

determine a path score of the first path; and

when the path score of the first path is less than a second threshold, change the primary path corresponding to the target application from the first path to any path whose path score is greater than a first threshold, to obtain a new routing policy of the first customer-premises equipment.


 
14. A routing apparatus, wherein the apparatus comprises:

a measurement module, configured to measure each of at least two paths between the first customer-premises equipment and a second customer-premises equipment, to obtain a path measurement result of each path;

a generation module, configured to: when a path measurement result of any of the at least two paths meets a preset condition, generate a path measurement message based on the path measurement result of each path, wherein the path measurement message carries the path measurement result of each path;

a sending module, configured to send the path measurement message to a controller; and

a receiving module, configured to: receive a routing policy sent by the controller based on the path measurement message; and select, from the at least two paths according to the routing policy, a path for transmitting a data packet of each service application.


 
15. The apparatus according to claim 14, wherein the path measurement result comprises at least one of path traffic, a path jitter rate, a path delay, a path packet loss rate, and path switching frequency.
 
16. The apparatus according to claim 15, wherein the measurement notification message comprises a traffic measurement threshold, a jitter measurement threshold, a delay measurement threshold, a packet loss measurement threshold, and/or a switching threshold; and the apparatus further comprises:
a determining module, configured to: in any path measurement result, if path traffic exceeds the traffic measurement threshold, a jitter rate exceeds the jitter measurement threshold, a delay exceeds the delay measurement threshold, a packet loss rate exceeds the packet loss measurement threshold, or switching frequency exceeds the switching threshold, determine that the path measurement result meets the preset condition.
 




Drawing
















Search report










Cited references

REFERENCES CITED IN THE DESCRIPTION



This list of references cited by the applicant is for the reader's convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard.

Patent documents cited in the description