Link protection method, device, equipment and medium
By monitoring the status in real time in the link aggregation group and dynamically switching the spare ports, the problem of port handover at different rates during the link separating process is solved, and the continuity of service communication and network performance are improved.
Patent Information
- Application Number
- CN202510435733.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-04-09
AI Technical Summary
The prior art is difficult to achieve seamless switching of ports at different rates during link cutting, resulting in the possibility of service communication being affected.
By aggregating network ports into multiple link aggregation groups, each group contains an active port pool and a backup port pool, monitoring the link status in real time. When specific conditions are met, select the appropriate backup port from the backup port pool for startup, and redistribute traffic according to the weight information of each port.
The continuity of service communication is achieved during the link separating process, solving the problem that hybrid rate links cannot be cut without loss, and improving network bandwidth, reliability and stability.
Smart Images

Figure CN120186085A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of data communication technologies, and more particularly, to a link protection method, apparatus, device, and medium. Background Art
[0002] With the rapid development of data communication technologies, the demand for network bandwidth is increasing. Traditional network links can no longer meet the requirements of high bandwidth and high reliability. Link aggregation technology (Eth-Trunk) bundles multiple physical Ethernet interfaces into a logical interface for data forwarding, thereby providing greater bandwidth and higher network reliability. Link aggregation enhances network performance and availability through load balancing and failover.
[0003] In related technologies, each link aggregation group usually consists of multiple physical ports with the same rate to ensure the balance of load sharing. However, in actual applications, situations where port rates are different or physical links are unstable often occur. Especially when a port fails and needs to be cut over, it is impossible to ensure that service communication is not affected during the cutover process. Therefore, how to achieve seamless switching of ports with different rates during the cutover process and keep services running normally is a difficulty faced by current technologies. Summary of the Invention
[0004] Embodiments of the present invention provide a link protection method, apparatus, device, and medium to solve the problem that lossless cutover of hybrid-rate links is impossible.
[0005] In a first aspect, embodiments of the present invention provide a link protection method, including:
[0006] Aggregate network ports to obtain multiple link aggregation groups, where each link aggregation group includes an active port pool and a standby port pool. The active port pool and the standby port pool respectively include one or more ports with the same or different rates. The active ports in the active port pool are used for current data transmission, and the standby ports in the standby port pool are used to be activated when the active ports are insufficient to carry traffic;
[0007] Monitor the status of each link aggregation group in real time. For each target link aggregation group, when it is determined that the link cutover condition is met, select a target standby port that meets the bandwidth requirement from the standby port pool for activation, where the link cutover condition includes that the predicted traffic at a future moment within a set time period from the current moment is greater than the total bandwidth of the current active ports, and / or one or more active ports fail, and the total bandwidth of the remaining normal active ports is less than the bandwidth required by the current actual traffic;
[0008] Reallocate the traffic to be transmitted by the target link aggregation group to the current normal active ports and the activated target standby ports according to the weight information of the current normal active ports and the activated target standby ports of the target link aggregation group.
[0009] Optionally, selecting the target standby ports that meet the bandwidth requirements from the standby port pool for activation includes:
[0010] In the case where one or more active ports fail,
[0011] Real-time statistics of the first bandwidth information corresponding to the current service traffic, and disabling the faulty active ports, and determining the second bandwidth information corresponding to the remaining normal active ports in the target link aggregation group, and according to the first difference between the first bandwidth information and the second bandwidth information, select the target standby ports that meet the requirements of the first difference from the standby port pool for activation;
[0012] In the case where the predicted traffic is greater than the total bandwidth of the current active ports,
[0013] Calculate the second difference between the third bandwidth information corresponding to the predicted traffic and the total bandwidth, and select the target standby ports that meet the requirements of the second difference from the standby port pool for activation.
[0014] Optionally, the selecting the target standby ports that meet the requirements of the first difference from the standby port pool for activation includes:
[0015] If there are multiple candidate standby ports that meet the requirements of the first difference in the standby port pool, then select from the multiple candidate standby ports in descending order of bandwidth, so that the bandwidth or bandwidth combination of the selected target standby ports is greater than the first difference, and activate the target standby ports, or,
[0016] Select the candidate standby ports with the combined bandwidth greater than and closest to the first difference and the smallest number from the multiple candidate standby ports as the target standby ports, and activate the target standby ports.
[0017] Optionally, reallocating the traffic to be transmitted by the target link aggregation group to the current normal active ports and the activated target standby ports according to the weight information of the current normal active ports and the activated target standby ports of the target link aggregation group includes:
[0018] Regularly update the weight information of the current normal active ports and the activated target standby ports according to the bandwidth and actual utilization rate of the current normal active ports and the activated target standby ports of the target link aggregation group;
[0019] Allocate service traffic to the current normal active port and the activated target standby port according to the current weight information corresponding to the current normal active port and the activated target standby port respectively.
[0020] Optionally, the weight information is calculated by the following formula:
[0021]
[0022] where W i represents the weight corresponding to port i, B i represents the physical bandwidth of port i, U i represents the current utilization rate of port i, n represents the total number of ports, B j represents the physical bandwidth of port j, U j represents the current utilization rate of port j.
[0023] Optionally, the predicted traffic is obtained through a trained traffic prediction model, and the traffic prediction model includes:
[0024] A parallel time-domain convolutional layer for parallel extraction of local temporal features of each port;
[0025] A spatial interaction layer for establishing a correlation matrix between the traffic of each port according to the cosine similarity between the local temporal features of each port;
[0026] A time attention pooling layer for obtaining the spatio-temporal fusion features of each port;
[0027] A prediction output layer for predicting the traffic value at a future set time according to the spatio-temporal fusion features.
[0028] Optionally, the traffic prediction model is trained in the following manner:
[0029] Obtain the original sample data, and the training data includes a historical traffic matrix;
[0030] Normalize the original sample data and generate training samples according to a time window. The training samples include the normalized input tensor and the corresponding future traffic label;
[0031] Input the training samples into the traffic prediction model for training to obtain a predicted traffic matrix;
[0032] Compare the predicted values in the predicted traffic matrix with the true values of the corresponding future traffic labels, and continuously update the parameters of the model. When the value of the loss function converges to the minimum, the traffic prediction model is trained;
[0033] where the loss function of the traffic prediction model is:
[0034]
[0035] Among them, α represents the prediction loss weight coefficient, β represents the spatial consistency constraint weight coefficient, γ represents the temporal smoothing constraint weight coefficient, λ represents the regularization term weight coefficient, B represents the batch size, N represents the total number of physical ports B in the aggregation link group, T1 represents the total number of predicted future time steps, t represents the time step index, and w t represents the time decay weight, represents the traffic prediction value of the model for the b-th sample, the n-th port, and the t-th future time step, and y b,n,t represents the corresponding label data; A corresponding to ij represents the element of the inter-port adjacency matrix, represents the average predicted traffic of the b-th sample and the i-th port over all future time steps, represents the average predicted traffic of the b-th sample and the j-th port over all future time steps; represents the traffic prediction value of the model for the b-th sample, the n-th port, and the (t - 1)-th future time step; T2 represents the number of historical time steps, that is, the length of the time series input to the model, and H b,t,n represents the spatio-temporal features output by the parallel TCN model, represents the negative of the L2 norm, which is used to constrain the energy of the features.
[0036] Second, the embodiment of the present invention also provides a link protection device, and the device includes:
[0037] A port aggregation module for aggregating network ports to obtain a plurality of link aggregation groups. Among them, each link aggregation group includes an active port pool and a standby port pool. The active port pool and the standby port pool respectively include one or more ports with the same or different rates. The active ports in the active port pool are used for current data transmission, and the standby ports in the standby port pool are used to be started when the active ports are insufficient to undertake traffic;
[0038] A target standby port startup module for real-time monitoring the status of each link aggregation group. For each target link aggregation group, when it is determined that the link cut condition is met, a target standby port that meets the bandwidth requirement is selected from the standby port pool for startup. Among them, the link cut condition includes that the predicted traffic at a future moment within a set time period from the current moment is greater than the total bandwidth of the current active ports, and / or one or more active ports fail, and the total bandwidth of the remaining normal active ports is less than the bandwidth required by the current actual traffic;
[0039] A traffic distribution module, configured to redistribute the traffic to be transmitted by the target link aggregation group to the current normal active ports and the activated target standby ports according to the weight information of the current normal active ports and the activated target standby ports of the target link aggregation group.
[0040] Optionally, the target standby port activation module includes:
[0041] A link status monitoring unit, configured to monitor the status of each link aggregation group in real time;
[0042] A first activation unit, for each target link aggregation group, in the case where one or more active ports fail, statistically calculate the first bandwidth information corresponding to the current service traffic in real time, disable the failed active ports, and determine the second bandwidth information corresponding to the remaining normal active ports in the target link aggregation group, and select target standby ports that meet the first difference requirement from the standby port pool for activation according to the first difference between the first bandwidth information and the second bandwidth information;
[0043] A second activation unit, in the case where the predicted traffic is greater than the total bandwidth of the current active ports, calculate the second difference between the third bandwidth information corresponding to the predicted traffic and the total bandwidth, and select target standby ports that meet the second difference requirement from the standby port pool for activation.
[0044] Optionally, the first activation unit is specifically configured to:
[0045] If there are multiple candidate standby ports that meet the first difference requirement in the standby port pool, select from the multiple candidate standby ports in descending order of bandwidth, so that the bandwidth or bandwidth combination of the selected target standby ports is greater than the first difference, and activate the target standby ports, or,
[0046] Select the candidate standby ports with the combined bandwidth greater than and closest to the first difference and the smallest number from the multiple candidate standby ports as the target standby ports, and activate the target standby ports.
[0047] Optionally, the traffic distribution module includes:
[0048] A weight update unit, configured to periodically update the weight information of the current normal active ports and the activated target standby ports according to the bandwidth and actual utilization rate of the current normal active ports and the activated target standby ports of the target link aggregation group;
[0049] A traffic distribution unit, configured to distribute service traffic to the current normal active ports and the activated target standby ports according to the current weight information corresponding to the current normal active ports and the activated target standby ports respectively.
[0050] Optionally, the weight information is calculated by the following formula:
[0051]
[0052] where W i represents the weight corresponding to port i, B i represents the physical bandwidth of port i, U i represents the current utilization rate of port i, n represents the total number of ports, B j represents the physical bandwidth of port j, U j represents the current utilization rate of port j.
[0053] Optionally, the predicted traffic is obtained through a trained traffic prediction model, and the traffic prediction model includes:
[0054] A parallel time-domain convolutional layer for parallelly extracting local time-series features of each port;
[0055] A spatial interaction layer for establishing a correlation matrix between the traffic of each port according to the cosine similarity between the local time-series features of each port;
[0056] A time attention pooling layer for obtaining the spatio-temporal fusion features of each port;
[0057] A prediction output layer for predicting the traffic value at a set future time according to the spatio-temporal fusion features.
[0058] Optionally, the traffic prediction model is trained in the following manner:
[0059] Obtain the original sample data, and the training data includes the historical traffic matrix;
[0060] Normalize the original sample data and generate training samples according to the time window. The training samples include the normalized input tensor and the corresponding future traffic label;
[0061] Input the training samples into the traffic prediction model for training to obtain the predicted traffic matrix;
[0062] Compare the predicted values in the predicted traffic matrix with the true values of the corresponding future traffic labels, and continuously update the parameters of the model. When the value of the loss function converges to the minimum, the traffic prediction model is trained.
[0063] Among them, the loss function of the traffic prediction model is:
[0064]
[0065] Among them, α represents the prediction loss weight coefficient, β represents the spatial consistency constraint weight coefficient, γ represents the temporal smoothing constraint weight coefficient, λ represents the regularization term weight coefficient, B represents the batch size, N represents the total number of physical ports B in the aggregation link group, T1 represents the total number of predicted future time steps, t represents the time step index, and w t represents the time decay weight, represents the traffic prediction value of the model for the b-th sample, the n-th port, and the t-th future time step, y b,n,t represents corresponding to the label data; A ij represents the element of the inter-port adjacency matrix, represents the average predicted traffic of the b-th sample and the i-th port over all future time steps, represents the average predicted traffic of the b-th sample and the j-th port over all future time steps; represents the traffic prediction value of the model for the b-th sample, the n-th port, and the (t-1)-th future time step; T2 represents the number of historical time steps, that is, the length of the time series input to the model, H b,t,n represents the spatio-temporal features output by the parallel TCN model, represents the negative square of the L2 norm, which is used to constrain the energy of the features.
[0066] Thirdly, an embodiment of the present invention further provides an electronic device, including:
[0067] a memory storing executable program code;
[0068] a processor coupled to the memory;
[0069] The processor calls the executable program code stored in the memory and executes the link protection method provided by any embodiment of the present invention.
[0070] Fourthly, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the link protection method provided by any embodiment of the present invention.
[0071] The technical solution provided by the embodiment of the present invention, when the link cutover condition is triggered, by starting the standby ports in the link aggregation group and reallocating the traffic to be transmitted by the link aggregation group to the currently active normal ports and the started target standby ports according to the weight information of each port, solves the problem that the hybrid-rate link cannot be cut over losslessly while ensuring that the service communication is not affected during the link cutover process, and at the same time improves the network bandwidth, enhances the reliability and stability of the network, provides core technical support for scenarios such as 5G and data centers that require flexible network deployment, and also significantly reduces the network upgrade and maintenance costs.
[0072] The innovative points of the embodiments of the present invention include:
[0073] 1. When the link cutover condition is triggered, by starting the standby port in the link aggregation group and redistributing the traffic to be transmitted by the link aggregation group to the currently active normal ports and the started target standby ports according to the weight information of each port, on the premise of ensuring that the service communication is not affected during the link cutover process, the problem that the hybrid-rate link cannot be cut over losslessly is solved, and while improving the network bandwidth, the reliability and stability of the network are enhanced, which is one of the innovative points of the embodiments of the present invention.
[0074] 2. By setting corresponding priorities for different types of service traffic, during the load traffic distribution process, first allocate ports for the high-priority service traffic, then allocate corresponding ports for the medium-priority service traffic according to the weight information of the remaining ports, and finally allocate ports for the low-priority service traffic. Such a setting not only improves the bandwidth utilization rate but also meets the actual transmission requirements of different levels of service traffic, which is one of the innovative points of the embodiments of the present invention.
[0075] 3. By predicting the traffic at future moments through a traffic prediction model, in the case where it is determined that the predicted traffic at future moments is greater than the total bandwidth of the current active ports, the link cutover condition is triggered in advance, avoiding the risk of network congestion or service interruption during the cutover process caused by burst traffic, which is one of the innovative points of the embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to these drawings.
[0077] Figure 1a It is a flowchart of a link protection method provided in Embodiment 1 of the present invention;
[0078] Figure 1b It is a structural block diagram of a traffic prediction model provided in Embodiment 1 of the present invention;
[0079] Figure 2 It is a flowchart of a link protection device provided in Embodiment 2 of the present invention;
[0080] Figure 3 It is a structural schematic diagram of an electronic device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0081] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0082] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include steps or units not listed, or may optionally further include other steps or units inherent to these processes, methods, products, or devices.
[0083] The embodiments of the present invention disclose a link protection method, device, equipment, and medium. The following will be described in detail separately.
[0084] Embodiment 1
[0085] Figure 1a As shown in the flowchart of a link protection method provided in Embodiment 1 of the present invention, this method can be applied to the link cutover scenario for link protection to avoid service interruption or packet loss caused by link cutover. The method provided in this embodiment can be executed by a link protection device, and the device can be implemented in software and / or hardware. As Figure 1a shown, the method provided in this embodiment specifically includes:
[0086] S110. Aggregate network ports to obtain multiple link aggregation groups, where each link aggregation group includes an active port pool and a standby port pool.
[0087] In this embodiment, the active port pool and the standby port pool each include one or more ports. The active ports in the active port pool are used for current data transmission, and the standby ports in the standby port pool are used to start when the active ports are insufficient to handle the traffic. When there are multiple ports in the active port pool, the active ports can be ports with the same rate or ports with different rates. Similarly, when there are multiple ports in the standby port pool, the standby ports can be ports with the same rate or ports with different rates. The rates of the active ports and the standby ports can be the same or different, and this embodiment does not make specific limitations on whether the port rates are the same.
[0088] In this embodiment, when aggregating ports with different rates, an extended LACP (Link Aggregation Control Protocol) can be adopted. By customizing TLV (a data exchange protocol) to declare the rate capabilities of ports (such as 10 Gbps and 1 Gbps), the device can identify and adapt to ports with different rates during negotiation. Alternatively, port rate information can be exchanged through LLDP (Link Layer Discovery Protocol) to dynamically adjust the aggregation group policy. Or, a vendor-customized aggregation mode can be adopted. When configuring Eth-Trunk, the mixed rate mode can be forcibly enabled through commands. Or, a static aggregation method can also be adopted, disabling the LACP protocol and directly adding ports with different rates to the aggregation group through manual configuration. Or, at the NFV (Network Function Virtualization) layer, different-rate physical ports can be bound to a logical link through a virtual switch, such as OVS (Open vSwitch). This embodiment does not specifically limit the method of aggregating different-rate physical ports into the same link aggregation group. By sharing the same link aggregation group for ports with different rates, the network environment changes can be more flexibly adapted. After aggregating ports with different rates into the same link aggregation group, the intelligent algorithm for allocating traffic to each port according to weight information in the following text can eliminate the impact of rate differences on load balancing and avoid network interruption caused by port failures or link cuts. For specific details, please refer to the following content.
[0089] S120. Monitor the status of each link aggregation group in real time. For each target link aggregation group, when it is determined that the link cut condition is met, select a target standby port that meets the bandwidth requirement from the standby port pool and start it.
[0090] Among them, the link cutover conditions include that the predicted traffic at a future moment within a set time period from the current moment is greater than the total bandwidth of the current active ports, or one or more active ports fail, and the total bandwidth of the remaining normal active ports is less than the bandwidth required by the current actual traffic, or both of the above situations occur simultaneously. Among them, the set time period can be flexibly set according to the requirements of the actual application scenario. The situations where an active port fails include: detecting that a physical port or link is completely disconnected (such as loss of optical signal, cable breakage, configuration error), or a optical module fails (such as abnormal luminous power), overheating of the switch port chip, etc., or the port CRC (Cyclic Redundancy Check) error rate exceeds the threshold, or the port or link is attacked (such as ARP (Address Resolution Protocol) spoofing, port scanning), and it is necessary to cut over to an isolation link and perform security reinforcement. This embodiment does not specifically limit the situation of port failure.
[0091] In the case where one or more active ports fail:
[0092] Real-time statistics of the first bandwidth information corresponding to the current service traffic, and disabling the failed active ports, and determining the second bandwidth information corresponding to the remaining normal active ports in the target link aggregation group, and selecting a target standby port that meets the first difference requirement from the standby port pool according to the first difference between the first bandwidth information and the second bandwidth information for activation;
[0093] For example, if an Eth-Trunk aggregation group contains 2 10G active ports and 4 unactivated standby ports, including 1 10G standby port, 1 5G standby port, and 3 1G standby ports. If the first bandwidth information corresponding to the current service traffic is 13G, in the case where one of the active ports fails and link cutover is required, the first difference between the first bandwidth information corresponding to the current service traffic and the second bandwidth information corresponding to the remaining normal active ports in the target link aggregation group is 13G - 10G = 3G, that is, it is necessary to activate 1 10G standby port, or activate 1 5G standby port, or activate 3 1G standby ports.
[0094] As an optional implementation manner, in this embodiment, when selecting a target standby port that meets the first difference requirement from the standby port pool for activation, a high-speed priority strategy can be adopted, that is, if there are multiple candidate standby ports that meet the first difference requirement in the standby port pool, then select from the multiple candidate standby ports in the order of bandwidth from high to low, so that the bandwidth or bandwidth combination of the selected target standby port is greater than the first difference.
[0095] For example, when the first difference is 3G, for candidate standby ports (10G, 5G, and 1G), the high-speed standby port is preferentially activated to minimize the number of ports and reduce management complexity. That is, the 10G standby port is preferentially selected. If the 10G standby port is unavailable, the sub-optimal rate 5G standby port is selected.
[0096] For another example, assume that there are multiple switches in an enterprise network. Physical ports with different rates are bundled together through an Eth-Trunk aggregated link to form a virtual link aggregation group. This link aggregation group includes 1 active 1G port and 1 standby 10G port. When a network failure occurs and the lower-rate 1G port needs to be cut over due to physical damage, the system will automatically adjust the load balancing policy according to the above technical solution and switch the data flow to the standby port (10G port). At the same time, the link protection mechanism performs link recovery through redundant ports to ensure that the service is not interrupted. During this process, the entire cut-over process has no impact on service communication. All data flows are transmitted through the new aggregated port, and the normal data forwarding state is restored within a short time after the cut-over.
[0097] As another alternative implementation, in this embodiment, when selecting a target standby port that meets the first difference requirement from the standby port pool, a resource-optimal policy can also be adopted, that is, select the candidate standby ports with a combined bandwidth greater than and closest to the first difference and the smallest number from multiple candidate standby ports as the target standby port for activation.
[0098] For example, when the first difference is 3G, for candidate standby ports (10G, 5G, and 1G), 1 5G standby port (utilization rate 60%) is closer to the first difference than 1 10G standby port (utilization rate 30%), and the number of ports used by 1 5G standby port is less than that of 3 1G standby ports. Therefore, 1 5G standby port is preferentially activated to avoid excessive occupation of port resources.
[0099] In this embodiment, the condition for triggering link cut-over also includes that the predicted traffic is greater than the total bandwidth of the current active port. When the predicted traffic is greater than the total bandwidth of the current active port, by calculating the second difference between the third bandwidth information corresponding to the predicted traffic and the total bandwidth of the current active port, a target standby port that meets the second difference requirement can be selected from the standby port pool for activation. The determination policy of the target standby port is similar to the determination policy of the target standby port when one or more active ports fail, and can specifically refer to the above high-speed priority policy and resource-optimal policy, which will not be elaborated here.
[0100] Among them, the predicted traffic can be predicted through a pre-trained traffic prediction model. Figure 1bThe structural block diagram of a traffic prediction model provided by Embodiment 1 of the present invention is as follows Figure 1b As shown, the traffic prediction model includes a parallel time-domain convolutional layer 210, a spatial interaction layer 220, a temporal attention pooling layer 230, and a prediction output layer 240. Next, the functions and implementation principles of each layer in the traffic prediction model will be described separately.
[0101] (1) The parallel time-domain convolutional layer 210 is used to extract local temporal features of each port in parallel, and can be specifically implemented by TCN (Temporal Convolutional Networks, a convolutional neural network model for processing time series data).
[0102] (2) The spatial interaction layer 220 is used to establish a correlation matrix between the traffic of each port according to the cosine similarity between the local temporal features of each port. In the specific operation process, the features of each port can be compressed into low-dimensional vectors, and then the cosine similarity between the low-dimensional vectors is calculated to generate the influence weights between ports, and then the adjacent port features are weighted and fused to obtain enhanced feature information, which can be specifically implemented by the following formula:
[0103]
[0104] Among them, H i represents the temporal feature of the i-th port output by the parallel TCN module, B represents the number of samples input in a single training, T2 represents the number of historical time steps, N represents the total number of ports, 16 represents the output channels of the time convolution of each port, represents the low-dimensional feature after projection of the i-th port, S j represents the low-dimensional feature after projection of the j-th port, W ij represents the cosine similarity matrix between ports i and j. represents the original feature of the j-th port, Top3(W i ) represents selecting the top 3 ports j with the highest similarity to each port i, represents the enhanced feature of port i, which fuses the feature information of other ports.
[0105] (3) The temporal attention pooling layer is used to obtain the spatio-temporal fusion features of each port and adaptively select key time steps to enhance important historical information.
[0106]
[0107] Among them, A t represents the attention score, Linear represents a fully connected layer that maps features to scalar attention scores, and Softmax represents normalization along the time dimension. Denote the weighted features for each time step, H pooled Denote the pooled features, retaining the spatial correlations between ports and the important information in the time dimension.
[0108] (4) Prediction output layer, based on the pooled spatio-temporal features, generates future traffic predictions through a fully connected layer.
[0109] In this embodiment, the training process of the traffic prediction model can be implemented through the following steps 1 to 4:
[0110] 1. Obtain the original sample data, which includes the historical traffic matrix and may further include port metadata.
[0111] Among them, the historical interest rate matrix includes the number of samples (batch size) input for a single training, the number of historical time steps, and the number of ports. Each time step corresponds to a fixed time length in actual applications. For example, if the data is collected every 5 minutes, each time step represents 5 minutes; if it is collected every hour, the time step is 1 hour. The port metadata includes static features such as physical bandwidth and priority.
[0112] 2. Normalize the original sample data and generate training samples according to the time window. The training samples include the normalized input tensor and the corresponding future traffic labels.
[0113] 3. Input the training samples into the traffic prediction model. After processing through the parallel time convolutional layer, spatial interaction layer, time attention pooling layer, and prediction output layer in the traffic prediction model, obtain the predicted traffic matrix;
[0114] 4. Compare the predicted values in the predicted traffic matrix with the true values of the corresponding future traffic labels. By updating the parameters of the model, when the value of the loss function converges to the minimum, the training of the traffic prediction model is completed.
[0115] Among them, the loss function of the traffic prediction model is:
[0116] y = αy1 + βy2 + γy3 + λy4
[0117]
[0118] Among them, α represents the prediction loss weight coefficient, which is used to control the contribution of the prediction error to the total loss. β represents the spatial consistency constraint weight coefficient, which is used to mediate the penalty intensity of the prediction difference between adjacent ports. γ represents the temporal smoothing constraint weight coefficient, which is used to suppress the mutation of the prediction result. λ represents the regularization term weight coefficient, which is used to balance the model complexity and the fitting ability. y1 represents the dynamic weighted prediction loss sub-function, B represents the batch size, N represents the total number of physical ports B in the aggregation link group, T1 represents the total number of future time steps predicted, t represents the time step index, and w t represents the time decay weight, where is the decay intensity, b,n,t represents the predicted traffic value of the model for the b-th sample, the n-th port, and the t-th future time step, and y represents the corresponding label data. y2 represents the spatial consistency constraint sub-function, and A ij represents the element of the adjacency matrix between ports, and A ij = 1 indicates that ports i and j are physically adjacent or traffic-related, represents the mean predicted traffic of the b-th sample and the i-th port over all future time steps, that is, represents the mean predicted traffic of the b-th sample and the j-th port over all future time steps. y3 represents the temporal consistency constraint loss sub-function, represents the predicted traffic value of the model for the b-th sample, the n-th port, and the (t - 1)-th future time step. y4 represents the regular term sub-function, T2 represents the number of historical time steps, that is, the length of the time series input to the model, and H b,t,n represents the spatio-temporal features output by the parallel TCN model, represents the negative square of the L2 norm, which is used to constrain the energy of the features.
[0119] The above loss function includes a dynamic weighted prediction loss, a spatial consistency constraint, a temporal smoothing constraint, and an adaptive regularization constraint. Among them, the dynamic weighted prediction loss assigns different weights to the prediction errors at different time steps, especially higher weights to long-term predictions, aiming to make the model pay more attention to the prediction accuracy in the future. The spatial consistency constraint ensures the consistency of the model in the spatial dimension by penalizing the differences in the predicted values of adjacent or related ports. The temporal smoothing constraint is to reduce the sudden changes in the prediction results in the temporal dimension. The adaptive regularization term prevents overfitting by constraining the energy of the model's feature representation, and can enhance the robustness of the model to noise and outliers, improving the generalization ability of the model. Therefore, by adopting the above loss function, the traffic prediction model is well improved in terms of prediction accuracy, output stability, and generalization ability. The trained traffic prediction model is applicable to scenarios with strict requirements for prediction accuracy and decision-making real-time performance, such as scenarios like dynamic resource scheduling in the 5G core network and traffic management in cloud computing centers, providing reliable technical support for automated network operation and maintenance.
[0120] In this embodiment, the traffic prediction model is used to predict the traffic at a future time. When it is determined that the predicted traffic at the future time is greater than the total bandwidth of the current active ports, the link cutover condition is triggered in advance, avoiding the risk of network congestion or service interruption during the cutover process caused by burst traffic, and improving the user experience. For example, when an e-commerce conducts a product promotion activity, the link cutover condition can be triggered 3 hours in advance before the start of the promotion activity to avoid the phenomenon of network congestion caused by excessive traffic during the e-commerce promotion activity.
[0121] S130. Redistribute the traffic that needs to be transmitted by the target link aggregation group to the current normal active ports and the activated target standby ports according to the weight information of the current normal active ports and the activated target standby ports of the target link aggregation group.
[0122] It should be noted that when a port failure occurs, the core switch will buffer the traffic of the failed port into the memory first. At this time, the data will not be lost immediately, but will be temporarily stored in the cache and wait for a new standby port to forward it.
[0123] In this embodiment, in the case of an abnormality in the active port, the current normal active port is the remaining normal active ports in the target link aggregation group after disabling the abnormal active port. When the predicted traffic is greater than the total bandwidth of the current active ports, the current normal active port is the original normal active ports in the target link aggregation group.
[0124] As an alternative implementation, the weight information of each port can be set in advance. For example, a higher weight can be assigned to a high-speed port, and a lower weight can be assigned to a low-speed port. During the dynamic reallocation of the load in the system, the traffic can be reallocated to each port according to the pre-set weight information of each port.
[0125] As another alternative implementation, the weight information of each port can also be updated regularly in a dynamic weight manner, that is, according to the bandwidth and actual utilization rate of the current normal active ports and the activated target standby ports of the target link aggregation group, the weight information of the current normal active ports and the target standby ports is updated regularly. Among them, the actual utilization rate of the target standby port is 0 when it is first started. Then, according to the current weight information corresponding to the current normal active ports and the activated target standby ports respectively, service traffic is allocated to the current normal active ports and the activated target standby ports.
[0126] Among them, the weight information is calculated by the following formula:
[0127]
[0128] Among them, W i represents the weight corresponding to port i, B i represents the physical bandwidth of port i, U i represents the current utilization rate of port i, n represents the total number of ports, B j represents the physical bandwidth of port j, U j represents the current utilization rate of port j.
[0129] In this embodiment, in the case where one or more active ports fail, by dynamically adjusting the load distribution between ports according to the weight information of each port, the traffic of the failed port can be immediately switched to the standby port. This process usually occurs within a few milliseconds, so it will not have an obvious impact on network performance, and at the same time, it also avoids the service interruption or packet loss phenomenon caused by the rate mutation in traditional cutover. In the case where it is determined that the predicted traffic at a future moment is greater than the total bandwidth of the current active ports, by starting the standby port in advance and dynamically adjusting the load distribution between ports according to the weight information of each port, the risk of network congestion or service interruption during the cutover caused by burst traffic is avoided, and the user experience is improved.
[0130] Further, before reallocating the traffic required to be transmitted by the target link aggregation group to the current normal active ports and the activated target standby ports, the following steps A to C may further be included:
[0131] A. Identify the type of service traffic included in the traffic required to be transmitted by the target link aggregation group.
[0132] In this embodiment, when one or more active ports fail and standby ports need to be activated, different network applications can be identified by checking the source port number and destination port number of network data packets and performing mapping according to the port number rules used by corresponding network protocols or network applications during communication. When the predicted traffic is greater than the total bandwidth of the current active ports and standby ports need to be activated, the service type of the predicted traffic can be obtained based on a deep learning-based identification method.
[0133] B. Determine the priority of each service traffic according to the type of service traffic.
[0134] In this embodiment, the priorities include high priority, medium priority, and low priority. The correspondence between the type of service traffic and its priority can be set in advance. For example, for critical services with high real-time requirements, such as real-time video streams and financial services, the corresponding priority is high priority; for ordinary services such as management traffic, log transmission, and file backup, the corresponding priority is low priority; for important services such as database synchronization and API (Application Programming Interface) requests, the corresponding priority is medium priority.
[0135] C. For the first service traffic with high priority, allocate the first service traffic to the port with the largest bandwidth among the remaining normal active ports and the target standby port in descending order of bandwidth.
[0136] In this embodiment, for the second service traffic with medium priority, the weight information of the remaining normal active ports and the target standby port in the target aggregated link group can be determined according to the above calculation method of weight information, and the second service traffic can be allocated to each port according to the weight information of each port. For the third service traffic with low priority, the third service traffic is allocated to the remaining unallocated ports in the target link aggregation group.
[0137] By adopting the above settings, not only can the weights of each port be dynamically adjusted based on real-time utilization to optimize bandwidth utilization, but also the actual transmission requirements of service traffic at different levels can be met, improving the user experience.
[0138] It should also be noted that for the activated target standby port and each active port, when allocating traffic to them according to the weight information, if the actual utilization rate of a certain port is greater than the set threshold (such as 90%), part of the traffic of this port can be migrated to other low-load ports, or other standby ports can also be activated to avoid the phenomenon of port overload.
[0139] The technical solution provided in this embodiment, when the link cutover condition is triggered, starts the standby ports in the link aggregation group, and according to the weight information of each port, redistributes the traffic to be transmitted by the link aggregation group to the currently normal active ports and the started target standby ports. On the premise of ensuring that business communication is not affected during the link cutover process, the problem that a hybrid-rate link cannot be cut over losslessly is solved. And while improving the network bandwidth, the reliability and stability of the network are also enhanced, providing core technical support for scenarios that require flexible network networking such as 5G and data centers, and at the same time significantly reducing the network upgrade and maintenance costs.
[0140] Further, the embodiment of the present invention further includes an automatic detection and alarm mechanism, which can detect the link status in real time when a link cutover or a link failure occurs, and send an alarm message to the administrator through the network management system to timely handle the link anomaly problem.
[0141] Further, after the cutover operation is completed, if packet loss or timeout is detected, the system will perform data recovery through the TCP (Transmission Control Protocol) retransmission mechanism. The retransmission mechanism can ensure the integrity of the data and ensure that the data stream will not be lost regardless of any failure.
[0142] Further, in the case where one or more active ports fail, after the failed port is repaired and restored, the system will automatically re-add the port to the link aggregation group. At this time, the system can re-update the weight information of each port and perform the corresponding traffic load adjustment operation. Or, the repaired failed port can be added to the standby port pool as a standby port. When the link cutover condition is met subsequently, it will be started again.
[0143] Embodiment 2
[0144] Figure 2 is a structural block diagram of a link protection device provided in Embodiment 2 of the present invention, as Figure 2 shown, the device includes: a port aggregation module 310, a target standby port start module 320, and a traffic distribution module 330, wherein,
[0145] The port aggregation module 310 is used to aggregate network ports to obtain a plurality of link aggregation groups, wherein each link aggregation group includes an active port pool and a standby port pool. The active port pool and the standby port pool respectively include one or more ports with the same or different rates. The active ports in the active port pool are used for current data transmission, and the standby ports in the standby port pool are used to be started when the active ports are not enough to undertake the traffic;
[0146] The target standby port startup module 320 is used to monitor the status of each link aggregation group in real time. For each target link aggregation group, when it is determined that the link cutover condition is met, a target standby port that meets the bandwidth requirement is selected from the standby port pool for startup. Wherein, the link cutover condition includes that the predicted traffic at a future moment within a set time period from the current moment is greater than the total bandwidth of the current active ports, and / or, one or more active ports fail, and the total bandwidth of the remaining normal active ports is less than the bandwidth required by the current actual traffic;
[0147] The traffic allocation module 330 is used to reallocate the traffic required to be transmitted by the target link aggregation group to the current normal active ports and the started target standby ports according to the weight information of the current normal active ports and the started target standby ports of the target link aggregation group.
[0148] Optionally, the target standby port startup module includes:
[0149] The link status monitoring unit is used to monitor the status of each link aggregation group in real time;
[0150] The first startup unit is used to, for each target link aggregation group, when one or more active ports fail, statistically calculate the first bandwidth information corresponding to the current service traffic in real time, and disable the failed active ports, and determine the second bandwidth information corresponding to the remaining normal active ports in the target link aggregation group, and select a target standby port that meets the first difference requirement from the standby port pool for startup according to the first difference between the first bandwidth information and the second bandwidth information;
[0151] The second startup unit is used to, when the predicted traffic is greater than the total bandwidth of the current active ports, calculate the second difference between the third bandwidth information corresponding to the predicted traffic and the total bandwidth, and select a target standby port that meets the second difference requirement from the standby port pool for startup.
[0152] Optionally, the first startup unit is specifically used for:
[0153] If there are multiple candidate standby ports that meet the first difference requirement in the standby port pool, select them in descending order of bandwidth from the multiple candidate standby ports, so that the bandwidth or bandwidth combination of the selected target standby port is greater than the first difference, and start the target standby port, or,
[0154] Select the candidate standby port with the combined bandwidth greater than and closest to the first difference and the smallest number from the multiple candidate standby ports as the target standby port, and start the target standby port.
[0155] Optionally, the traffic allocation module includes:
[0156] A weight update unit, configured to update the weight information of the current normal active port and the activated target standby port regularly according to the bandwidth and actual utilization rate of the current normal active port and the activated target standby port of the target link aggregation group;
[0157] A traffic allocation unit, configured to allocate service traffic to the current normal active port and the activated target standby port according to the current weight information corresponding to the current normal active port and the activated target standby port respectively.
[0158] Optionally, the weight information is calculated by the following formula:
[0159]
[0160] where W i represents the weight corresponding to port i, B i represents the physical bandwidth of port i, U i represents the current utilization rate of port i, n represents the total number of ports, B j represents the physical bandwidth of port j, U j represents the current utilization rate of port j.
[0161] Optionally, the predicted traffic is obtained by a trained traffic prediction model, and the traffic prediction model includes:
[0162] A parallel time-domain convolutional layer, configured to extract local temporal features of each port in parallel;
[0163] A spatial interaction layer, configured to establish a correlation matrix between the traffic of each port according to the cosine similarity between the local temporal features of each port;
[0164] A time attention pooling layer, configured to obtain the spatio-temporal fusion features of each port;
[0165] A prediction output layer, configured to predict the traffic value at a future set time according to the spatio-temporal fusion features.
[0166] Optionally, the traffic prediction model is trained in the following manner:
[0167] Obtain original sample data, where the training data includes a historical traffic matrix;
[0168] Perform normalization processing on the original sample data, and generate training samples according to a time window, where the training samples include the normalized input tensor and the corresponding future traffic label;
[0169] Input the training samples into the traffic prediction model for training to obtain a predicted traffic matrix;
[0170] Compare the predicted values in the predicted traffic matrix with the true values of the corresponding future traffic labels, and continuously update the parameters of the model. When the value of the loss function converges to the minimum, the traffic prediction model is trained;
[0171] Among them, the loss function of the traffic prediction model is:
[0172]
[0173] Among them, α represents the predicted loss weight coefficient, β represents the spatial consistency constraint weight coefficient, γ represents the temporal smoothing constraint weight coefficient, λ represents the regularization term weight coefficient, B represents the batch size, N represents the total number of physical ports B in the aggregation link group, T1 represents the total number of predicted future time steps, t represents the time step index, w t represents the time decay weight, represents the traffic prediction value of the model for the b-th sample, the n-th port, and the t-th future time step, y b,n,t represents the corresponding label data; A ij represents the element of the inter-port adjacency matrix, represents the average predicted traffic of the b-th sample and the i-th port over all future time steps, represents the average predicted traffic of the b-th sample and the j-th port over all future time steps; represents the traffic prediction value of the model for the b-th sample, the n-th port, and the (t - 1)-th future time step; T2 represents the number of historical time steps, that is, the length of the time series input to the model, H b,t,n represents the spatio-temporal features output by the parallel TCN model, represents the negative of the L2 norm, which is used to constrain the energy of the features.
[0174] Embodiment III
[0175] Please refer to Figure 3 , Figure 3 which is a schematic structural diagram of an electronic device provided by Embodiment III of the present invention.
[0176] As Figure 3 shown, the electronic device may include:
[0177] A memory 701 storing executable program code;
[0178] A processor 702 coupled to the memory 701;
[0179] Among them, the processor 702 calls the executable program code stored in the memory 701 and executes the link protection method provided by any embodiment of the present invention.
[0180] An embodiment of the present invention discloses a computer-readable storage medium that stores a computer program, wherein the computer program causes a computer to execute the link protection method provided in any embodiment of the present invention.
[0181] In various embodiments of the present invention, it should be understood that the magnitude of the sequence numbers of the above processes does not necessarily mean the inevitable sequence of execution. The execution sequence of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0182] In the embodiments provided by the present invention, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0183] In addition, in each embodiment of the present invention, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0184] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a memory and includes several requests for causing a computer device (which can be a personal computer, a server, or a network device, etc., specifically, the processor in the computer device) to execute some or all of the steps of the above method in each embodiment of the present invention.
[0185] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and this program can be stored in a computer-readable storage medium. The storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disk memories, tape memories, or any other medium that can be used to carry or store data and is computer-readable.
[0186] Those of ordinary skill in the art can understand that the drawings are only schematic diagrams of an embodiment, and the modules or processes in the drawings are not necessarily essential for implementing the present invention.
[0187] Those of ordinary skill in the art can understand that the modules in the device in the embodiment can be distributed in the device of the embodiment according to the description of the embodiment, or can be correspondingly changed and located in one or more devices different from this embodiment. The modules of the above embodiments can be combined into one module, or further split into multiple sub-modules.
[0188] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. And these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A link protection method, characterized in that: include: Aggregate the network ports to obtain multiple link aggregation groups, wherein each link aggregation group includes an active port pool and a standby port pool, the active port pool and the standby port pool respectively include one or more ports of the same rate or different rates, the active ports in the active port pool are used for current data transmission, and the standby ports in the standby port pool are used for startup when the active ports are insufficient to handle traffic; Monitor the status of each link aggregation group in real time. For each target link aggregation group, when it is determined that the link cutover condition is met, select a target standby port that meets the bandwidth requirement from the standby port pool to start the target standby port, wherein the link cutover condition includes that the predicted flow at a future time of a set time period from the current time is greater than the total bandwidth of the current active port, and / or one or more active ports fail, and the total bandwidth of the remaining normal active ports is less than the bandwidth required by the current actual flow; According to the weight information of the current normal active port of the target link aggregation group and the activated target standby port, the traffic required to be transmitted by the target link aggregation group is reallocated to the current normal active port and the activated target standby port.
2. The method according to claim 1, characterized in that: The step of selecting a target standby port that meets the bandwidth requirement from the standby port pool for startup includes: In the event of a failure of one or more active ports, Real-time statistics of first bandwidth information corresponding to current service traffic, and disabling faulty active ports, and determining second bandwidth information corresponding to remaining normal active ports in the target link aggregation group, and selecting a target standby port that meets the first difference requirement from the standby port pool for startup according to a first difference between the first bandwidth information and the second bandwidth information; In the case where the predicted traffic is greater than the total bandwidth of the currently active ports, A second difference between the third bandwidth information corresponding to the predicted traffic and the total bandwidth is calculated, and a target standby port that meets the second difference requirement is selected from the standby port pool for startup.
3. The method according to claim 2, characterized in that The step of selecting a target standby port that meets the first difference requirement from the standby port pool for startup includes: If there are multiple candidate standby ports that meet the first difference requirement in the standby port pool, select from the multiple candidate standby ports in order of bandwidth from high to low, so that the bandwidth or bandwidth combination of the selected target standby port is greater than the first difference, and start the target standby port, or, The candidate backup ports with the smallest combined bandwidth greater than and closest to the first difference are selected from the plurality of candidate backup ports as target backup ports, and the target backup ports are started.
4. The method according to claim 1, characterized in that: The method of reallocating the traffic required to be transmitted by the target link aggregation group to the current normal active port and the activated target standby port according to the weight information of the current normal active port and the activated target standby port of the target link aggregation group comprises: According to the bandwidth and actual utilization rate of the current normal active port and the activated target standby port of the target link aggregation group, regularly updating the weight information of the current normal active port and the activated target standby port; According to the current weight information respectively corresponding to the current normal active port and the activated target standby port, the service flow is allocated to the current normal active port and the activated target standby port.
5. The method according to claim 4, characterized in that The weight information is calculated by the following formula: Among them, W i represents the weight corresponding to port i, B i represents the physical bandwidth of port i, U i represents the current utilization of port i, n represents the total number of ports, B j represents the physical bandwidth of port j, U j Indicates the current utilization of port j.
6. The method according to claim 1, characterized in that The predicted traffic is obtained by a trained traffic prediction model, and the traffic prediction model includes: Parallel time-domain convolution layer, used to extract local timing features of each port in parallel; The spatial interaction layer is used to establish the correlation matrix between the traffic of each port based on the cosine similarity between the local timing features of each port; Temporal attention pooling layer, used to obtain the spatiotemporal fusion features of each port; The prediction output layer predicts the flow value at a set time in the future based on the spatiotemporal fusion features.
7. The method according to claim 1, characterized in that The traffic prediction model is trained in the following way: Acquire original sample data, wherein the training data includes a historical traffic matrix; Normalize the original sample data and generate training samples according to the time window, wherein the training samples include the normalized input tensor and the corresponding future traffic label; Inputting the training samples into a traffic prediction model for training to obtain a predicted traffic matrix; Compare the predicted value in the predicted traffic matrix with the true value of the corresponding future traffic label, and continuously update the parameters of the model. When the value of the loss function converges to the minimum, the traffic prediction model training is completed; Among them, the loss function of the traffic prediction model is: Where α represents the prediction loss weight coefficient, β represents the spatial consistency constraint weight coefficient, γ represents the temporal smoothness constraint weight coefficient, λ represents the regularization term weight coefficient, B represents the batch size, N represents the total number of physical ports in the aggregated link group B, T1 represents the total number of predicted future time steps, t represents the time step index, and w t represents the time decay weight, represents the model's traffic prediction value for the bth sample, the nth port, and the tth future time step, y b,n,t Representation and Corresponding label data; A ij represents the elements of the inter-port adjacency matrix, represents the predicted traffic mean of the b-th sample and the i-th port in all future time steps, represents the predicted traffic mean of the b-th sample and the j-th port in all future time steps; represents the traffic prediction value of the model for the bth sample, the nth port, and the t-1th future time step; T2 represents the number of historical time steps, that is, the time series length of the input model, and H b,t,n represents the spatiotemporal features of the output of the parallel TCN model, Represents the negative of the L2 norm, which is used to constrain the energy of the feature.
8. A link protection device, characterized in that: include: A port aggregation module is used to aggregate network ports to obtain multiple link aggregation groups, wherein each link aggregation group includes an active port pool and a standby port pool, the active port pool and the standby port pool respectively include one or more ports with the same or different rates, the active ports in the active port pool are used for current data transmission, and the standby ports in the standby port pool are used for startup when the active ports are insufficient to handle traffic; A target standby port startup module is used to monitor the status of each link aggregation group in real time. For each target link aggregation group, when it is determined that the link cutover condition is met, a target standby port that meets the bandwidth requirement is selected from the standby port pool for startup, wherein the link cutover condition includes that the predicted flow at a future time of a set time period from the current time is greater than the total bandwidth of the current active port, and / or one or more active ports fail, and the total bandwidth of the remaining normal active ports is less than the bandwidth required by the current actual flow; The traffic distribution module is used to redistribute the traffic required to be transmitted by the target link aggregation group to the current normal active port and the activated target standby port according to the weight information of the current normal active port and the activated target standby port of the target link aggregation group.
9. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the link protection method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the link protection method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and device for realizing redundant backup of link aggregation group of manual aggregation
CN113141268A
Fault self-recovery method and device based on port redundancy
CN113918324A
Port number prediction method and device and storage medium
CN114826950A
Link aggregation method and device
CN115643206A
Service function chain SFC resource allocation method and device
CN117424860A