Link diagnosis model construction method and system, and link diagnosis method and device

By constructing a chain diagnostic model based on the character mode and networking method on the intelligent gateway, and using the OCO algorithm to train this model, the existing speed measuring diagnosis method is inefficient. The effect of the system.

CN119383117APending Publication Date: 2025-01-28FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411512844.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-01-28

Smart Images

  • Figure CN119383117A_ABST
    Figure CN119383117A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of network performance improvement, in particular to a link diagnosis model construction method and system and a link diagnosis method and device.The link diagnosis model construction method comprises the steps that an optimization model corresponding to link congestion control is constructed based on a role mode and a networking mode; the role mode comprises a server mode and a client mode; and training the optimization model based on an OCO algorithm to obtain the link diagnosis model. The link diagnosis model provided by the invention can be adaptive to a role mode and a networking mode, and the sliding window of the TCP is iteratively adjusted in real time according to the received DUP ACK and TIMESTAMP in the current environment, so that the fluctuation of the network environment under different conditions such as a condition from the lower equipment to the sub-gateway, a condition from the sub-gateway to the main gateway, a condition from the main gateway to the internet and the like can be adaptively diagnosed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network performance improvement, and in particular to a link diagnosis model construction method, system, link diagnosis method and device. Background Art

[0002] Among the commonly used speed measurement and diagnosis methods on existing intelligent gateways, most use TCP speed measurement, which is only for a single role mode (server or client). When switching role modes, parameters need to be reconfigured and adjusted, which is inefficient. Moreover, in real-time decision-making and optimization problems, traditional speed measurement and diagnosis and optimization methods may require batch processing and offline calculation of all data, which is inefficient in the face of large-scale data and rapidly changing real-time environments, and is not suitable for lightweight systems, and needs to be improved urgently. Summary of the invention

[0003] The present invention aims to solve at least one of the technical problems in the above-mentioned technology to a certain extent, and proposes a link diagnosis model construction method, comprising:

[0004] Based on the role mode and the networking mode, an optimization model corresponding to the link congestion control is constructed; the role mode includes: server mode and client mode;

[0005] The optimization model is trained based on the OCO algorithm to obtain the link diagnosis model.

[0006] Furthermore, constructing an optimization model corresponding to link congestion control includes:

[0007] At least one TCP parameter is used as an input of the objective function, and the link congestion degree is used as an output of the objective function to construct an objective function;

[0008] Determine the current value of the link congestion level;

[0009] Determining a target value of link congestion based on an objective function;

[0010] Constructing a deviation function according to the deviation between the current value and the target value;

[0011] The optimization model is constructed according to the deviation function.

[0012] Furthermore, the TCP parameters include: TCP MSS, the number of TCP flows pulled up, and the speed measurement limit time.

[0013] Furthermore, the expression of the objective function includes:

[0014]

[0015] Where x represents the size of the sliding window; Indicates taking the minimum value; f t (x t ) indicates the current link congestion level; sup indicates the upper limit; u i Indicates TCP parameters; U i Indicates TCP parameter set; f i (x,u i ) indicates the congestion level f under the corresponding TCP parameters t (x t ) parameter model affected by the parameter; i represents the parameter number.

[0016] Furthermore, the expression of the deviation function includes:

[0017]

[0018] Among them, x represents each decision, that is, the size of the sliding window; Regret represents the model deviation; T represents the test time; f t (x) represents the target link congestion level; K represents the decision set for building a training model for the congestion level using TCP parameters; F represents the set of target link congestion levels within the test time.

[0019] Further, training the optimization model based on the OCO algorithm includes:

[0020] Performing several rounds of training on the optimization model;

[0021] In each round of training, the decision that minimizes the sum of losses in previous rounds is selected to update the optimization model, thereby achieving training of the optimization model.

[0022] The present application also proposes a link diagnosis model construction system, including:

[0023] A model building module is used to construct an optimization model corresponding to link congestion control based on a role mode and a networking mode; the role mode includes: a server mode and a client mode;

[0024] The model optimization module is used to train the optimization model based on the OCO algorithm to obtain the link diagnosis model.

[0025] The present application also proposes a link diagnosis method, comprising: performing link diagnosis based on a link diagnosis model constructed using the above-mentioned construction method or construction system.

[0026] The present application also proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program or instruction, and when the computer program or instruction is executed by the processor, it is at least used to implement the above-mentioned link diagnosis method.

[0027] The present application also proposes a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, it is at least used to implement the above-mentioned link diagnosis method.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] The link diagnosis model provided in this application can adapt to the role mode (server mode or client mode) and networking mode (WIFI, LAN, PON, etc.), and adjust the TCP sliding window in real time according to the received DUP ACK and TIMESTAMP in the current environment, so as to realize the adaptive diagnosis of the fluctuation of the network environment in different situations such as the downstream device to the sub-gateway, the sub-gateway to the main gateway, and the main gateway to the Internet. In addition, the algorithm of the link diagnosis model provided in this application is small in magnitude and has low performance requirements, which is especially suitable for lightweight Linux systems such as FTTR (Fiber To The Room).

[0030] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings. The technical scheme of the present invention is further described below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0032] Figure 1 A schematic diagram of a link diagnosis model construction method provided in an embodiment;

[0033] Figure 2 A schematic diagram of a link diagnosis model construction system provided in an embodiment;

[0034] Figure 3 A schematic diagram of a link diagnosis result provided in an embodiment;

[0035] Figure 4 A schematic diagram of an electronic device provided for an embodiment;

[0036] Figure 5 A schematic diagram of a computer-readable storage medium is provided for an embodiment. DETAILED DESCRIPTION

[0037] The present invention is described below in conjunction with the accompanying drawings. The preferred embodiments described herein are only used to illustrate and explain the present invention and are not used to limit the present invention.

[0038] With the gradual development of FTTR (Fiber To The Room) technology, the efficiency of link speed measurement is becoming increasingly higher, and there are more and more lightweight network devices. The traditional link speed measurement method can no longer meet the requirements of users and operators. In order to meet these challenges, the OCO (Online Convex Optimization) algorithm came into being. This algorithm is an online learning and optimization technology, which is particularly suitable for scenarios that require real-time dynamic adjustment of decisions. It does not need to know all the data in advance, but makes optimization decisions at each time step based on the currently observed data and previous decision history.

[0039] Figure 1 The link diagnosis model construction method provided by the present invention includes:

[0040] Based on the role mode and the networking mode, an optimization model corresponding to the link congestion control is constructed; the role mode includes: server mode and client mode;

[0041] The optimization model is trained based on the OCO algorithm to obtain the link diagnosis model.

[0042] According to some embodiments of the present application, based on different usage scenarios, the present application establishes a total of 6 sets of training models for different networking modes (WIFI, LAN, PON) in client and server role modes, and then trains the established optimization models to realize the adaptive role mode and networking mode of the link diagnosis model.

[0043] Furthermore, an optimization model corresponding to link congestion control is constructed, including:

[0044] At least one TCP parameter is used as an input of the objective function, and the link congestion degree is used as an output of the objective function to construct an objective function;

[0045] Determine the current value of the link congestion level;

[0046] Determining a target value of link congestion based on an objective function;

[0047] Constructing a deviation function according to the deviation between the current value and the target value;

[0048] The optimization model is constructed according to the deviation function.

[0049] According to some embodiments of the present application, convex optimization refers to an optimization method in which the objective function is a convex function under the optimization requirement of minimization (maximization), and the feasible domain set formed by the constraint conditions is a convex set. The objective function given in the present application uses TCP parameters as the objective function input, the optimization goal is to minimize the congestion level in the current link during the test time, and constructs a deviation function based on the objective function to construct an optimization model.

[0050] Furthermore, the TCP parameters include: TCP MSS, the number of TCP flows pulled up, and the speed measurement limit time.

[0051] According to some embodiments of the present application, due to the characteristics of TCP, the congestion on the link is closely related to the above three parameters: TCP MSS determines the length of a single message. When the number of messages is constant, the larger the MSS value, the easier it is to fill the TCP window; the more TCP streams are pulled up, the larger the amount of messages processed by the CPU per unit time, and the easier it is to congest; the smaller the speed limit time, the higher the efficiency of the algorithm convergence is required, and the shorter the required correction step size. Therefore, it is necessary to use multiple parameters and train the model at the same time to achieve better results. If you continue to train with one parameter alone, the model will not be able to fully match the actual speed measurement environment. In summary, the input parameters in the objective function model include: TCP MSS, the number of TCP streams pulled up, and the speed limit time. The above three parameters and input and output are used to train this model at the same time to obtain the final model.

[0052] Furthermore, the expression of the objective function includes:

[0053]

[0054] Where x represents the size of the sliding window; Indicates taking the minimum value; f t (x t ) indicates the current link congestion level; sup indicates the upper limit; u i Indicates TCP parameters; U i Indicates TCP parameter set; f i (x,u i ) indicates the congestion level f under the corresponding TCP parameters t (x t ) parameter model affected by the parameter; i represents the parameter number.

[0055] According to some embodiments of the present application, the input of the objective function is the sliding window size x t The output of the objective function is the congestion level f in the current link t (x t). The congestion level can be quantified as the sum of the difference between the number of DUP ACKs received and the TIMESTAMP of the TCP message within a unit time t. The constraints are the maximum window size set in the device and the limit rate negotiated by the physical link layer. The purpose of optimization in this embodiment is to minimize the congestion level in the current link within a limited speed measurement time by using the data collected by the step size of each sampling step, and to make the speed measurement value as close as possible to the limit rate negotiated by the physical link layer.

[0056] In the process of speed measurement and diagnosis, the Online Convex Optimization (OCO) algorithm model designed by this application will design a theoretical optimal solution: that is, no DUP ACK will be received per unit time and the difference in timestamps is 0. A deviation will be defined based on the current value and the target value, which is the output f of the model. t (x t ).

[0057] Furthermore, the expression of the deviation function includes:

[0058]

[0059] Among them, x represents each decision, that is, the size of the sliding window; Regret represents the model deviation; T represents the test time; f t (x) represents the target link congestion level; K represents the decision set for building a training model for the congestion level using TCP parameters; F represents the set of target link congestion levels within the test time.

[0060] According to some embodiments of the present application, the algorithm evaluation result Regret of the present application is obtained according to the objective function, which is a function of time T. The algorithm measurement indicator of OCO is Regret, and the goal of this algorithm is to optimize Regret.

[0061] Further, training the optimization model based on the OCO algorithm includes:

[0062] Performing several rounds of training on the optimization model;

[0063] In each round of training, the decision that minimizes the sum of losses in previous rounds is selected to update the optimization model, thereby achieving training of the optimization model.

[0064] According to some embodiments of the present application, the model is trained using the FTL (Follow the Leader) idea in machine learning, that is, in each round, for example, the t+1th round, a decision is selected that minimizes the sum of the losses in the previous t rounds. The expression is as follows:

[0065]

[0066] Among them, x represents the decision made each time, that is, the size of the sliding window; T represents the total number of rounds; argmin represents the decision value selected when the objective function is minimized; K represents the decision set for building a training model based on the congestion level using TCP parameters.

[0067] In addition, since the loss functions are all convex functions in the context of OCO, the FTRL (Follow-the-regularized-Leader) algorithm can be used to add a regularization term to the above algorithm.

[0068] In this embodiment, the final update decision is as follows:

[0069]

[0070] Among them, x represents each decision; η represents the skewness coefficient; represents the regularization term; K represents the decision set for building a training model based on the congestion level using TCP parameters.

[0071] Based on the same technical concept, such as Figure 2 As shown, the present application provides a link diagnosis model construction system, including: a model construction module, used to construct an optimization model corresponding to link congestion control based on role mode and networking mode; the role mode includes: server mode and client mode; a model optimization module, used to train the optimization model based on the OCO algorithm to obtain the link diagnosis model.

[0072] The present application also provides a link diagnosis method, including: performing link diagnosis based on a link diagnosis model constructed using the above-mentioned construction method or construction system.

[0073] According to other embodiments of the present application, the present application uses a total of 6 training models in different networking modes (WIFI, LAN, PON) in client and server role modes in different usage scenarios to train the established optimization model. In the final experiment, it can adapt to the server and client roles within the limited 20-second speed test time and can optimize to about 90% of the link negotiation rate.

[0074] Take LAN networking in client mode as an example. LAN networking, GE ports are connected, and the physical layer theoretical speed is 1000Mbps: Input is sliding window size: x t , the output is the congestion level in the current link: f t (x t ), the specific parameter u in the model i Including: TCPMSS, number of TCP flows pulled up, speed limit time. Figure 3 As shown, it can be seen that the link diagnosis method provided in the present application can converge to the physical bandwidth in 2 seconds and complete the speed measurement in 5 seconds, which can meet the existing speed measurement requirements.

[0075] like Figure 4 As shown, the present application provides an electronic device, which includes a memory and a processor. The memory stores a computer program or instruction. When the computer program or instruction is executed by the processor, it is at least used to implement the above-mentioned link diagnosis method.

[0076] like Figure 5 As shown, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, it is at least used to implement the above-mentioned link diagnosis method.

[0077] The present application also provides a computer program product, which is stored in a computer-readable storage medium. When the computer program product is executed by a processor, it is at least used to implement the above-mentioned link diagnosis method.

[0078] It is obvious that a person skilled in the art may make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A link diagnosis model construction method, characterized in that: include: Based on the role model and networking mode, an optimization model corresponding to link congestion control is constructed; The role mode includes: server mode and client mode; The optimization model is trained based on the OCO algorithm to obtain the link diagnosis model.

2. The link diagnosis model construction method according to claim 1, characterized in that: The construction of an optimization model corresponding to link congestion control includes: At least one TCP parameter is used as an input of the objective function, and the link congestion degree is used as an output of the objective function to construct an objective function; Determine the current value of the link congestion level; Determining a target value of link congestion based on an objective function; Constructing a deviation function according to the deviation between the current value and the target value; The optimization model is constructed according to the deviation function.

3. The link diagnosis model construction method according to claim 2, characterized in that: The TCP parameters include: TCP MSS, number of TCP flows started, and speed test limit time.

4. The link diagnosis model construction method according to claim 2, characterized in that: The expression of the objective function includes: Where x represents the size of the sliding window; Indicates taking the minimum value; f t (x t ) indicates the current link congestion level; sup indicates the upper limit; u i Indicates TCP parameters; U i Indicates TCP parameter set; f i (x,u i ) indicates the congestion level f under the corresponding TCP parameters t (x t ) parameter model affected by the parameter; i represents the parameter number.

5. The link diagnosis model construction method according to claim 2, characterized in that: The expression of the deviation function includes: Among them, x represents each decision, that is, the size of the sliding window; Regret represents the model deviation; Y represents the test time; f t (x) represents the target link congestion level; K represents the decision set for building a training model for the congestion level using TCP parameters; F represents the set of target link congestion levels within the test time.

6. The link diagnosis model construction method according to claim 1, characterized in that: Training the optimization model based on the OCO algorithm includes: Performing several rounds of training on the optimization model; In each round of training, the decision that minimizes the sum of losses in previous rounds is selected to update the optimization model, thereby achieving training of the optimization model.

7. A link diagnosis model construction system, characterized in that: include: A model building module is used to construct an optimization model corresponding to link congestion control based on the role mode and networking mode; The role mode includes: server mode and client mode; The model optimization module is used to train the optimization model based on the OCO algorithm to obtain the link diagnosis model.

8. A link diagnosis method, characterized in that: include: Link diagnosis is performed based on a link diagnosis model constructed using the link diagnosis model construction method described in any one of claims 1 to 6 or the link diagnosis model construction system described in claim 7.

9. An electronic device, comprising a memory and a processor, characterized in that: The memory stores a computer program or instruction, and when the computer program or instruction is executed by the processor, it is at least used to implement the link diagnosis method according to claim 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction, and when the computer program or instruction is executed by the processor, it is at least used to implement the link diagnosis method according to claim 8.