A link protection method, apparatus, device and medium

By real-time monitoring and dynamic adjustment in the link aggregation group, and by reallocating traffic using the spare port pool and weight information, the problem of seamless switching of mixed rate links during the cutover process is solved, improving the reliability and stability of the network. It is suitable for scenarios such as 5G and data centers.

CN120186085BActive Publication Date: 2026-03-20北京联广通网络科技有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Traditional network links cannot guarantee seamless switching and normal operation of service communication during cutover when faced with mixed-rate ports and unstable physical links.

Method used

By aggregating network ports into link aggregation groups, including active port pools and standby port pools, link status is monitored in real time. When cutover conditions are met, standby ports are selected for activation, and traffic is redistributed based on port weight information. A traffic prediction model is used to predict future traffic demand and dynamically adjust load balancing.

Benefits of technology

It enables seamless switching of hybrid rate links during the cutover process, ensuring uninterrupted business communication, improving network bandwidth and reliability, reducing network upgrade and maintenance costs, and is suitable for flexible networking scenarios such as 5G and data centers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120186085B_ABST
    Figure CN120186085B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a link protection method, device, equipment and medium, the method comprising: aggregating 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, and the active port pool and the standby port pool each include one or more ports with the same or different rates; monitoring the state of each link aggregation group in real time, and for each target link aggregation group, when it is determined that a link switching condition is met, selecting a target standby port that meets a bandwidth requirement from the standby port pool to start; and re-distributing 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. By using the above technical solution, the problem of the inability to losslessly switch mixed rate links is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of data communication, and in particular, to a link protection method, device, equipment and medium. BACKGROUND

[0002] With the rapid development of data communication technology, the demand for network bandwidth is increasing, and the traditional network link has been unable to meet the demand for high bandwidth and high reliability. Link aggregation technology (Eth-Trunk) provides greater bandwidth and higher network reliability by bundling multiple physical Ethernet interfaces into a logical interface for data forwarding. Link aggregation enhances the performance and availability of the network through load balancing and fault switching.

[0003] In related technologies, each link aggregation group is usually composed of multiple physical ports of the same rate to ensure the balance of load sharing. However, in actual applications, there are often cases of different port rates or unstable physical links, especially when a port fails and needs to be cut off, which cannot guarantee that the business communication will not be affected during the cutting process. Therefore, how to realize seamless switching of different rate ports during the cutting process and maintain normal operation of the business is a difficulty faced by current technology. SUMMARY

[0004] Embodiments of the present application provide a link protection method, device, equipment and medium to solve the problem of lossless cutting of mixed rate links.

[0005] In a first aspect, the present application provides a link protection method, comprising:

[0006] Aggregating 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 each include one or more ports of 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 starting in the case that the active ports are insufficient to handle traffic;

[0007] Real-time monitoring of the state of each link aggregation group, for each target link aggregation group, when it is determined that the link cutting condition is met, a target standby port that meets the bandwidth requirement is selected from the standby port pool to start, wherein the link cutting condition includes that the predicted traffic at a future time point that is a set time period from the current time point 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 required bandwidth of the current actual traffic;

[0008] redistribute 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 weight information of the current normal active ports and the started target standby ports of the target link aggregation group.

[0009] Optionally, the target standby port satisfying the bandwidth requirement is selected from the standby port pool for starting, comprising:

[0010] In the case of failure of one or more active ports,

[0011] The first bandwidth information corresponding to the current traffic is counted in real time, the failed active port is disabled, the second bandwidth information corresponding to the remaining normal active ports in the target link aggregation group is determined, and the target standby port satisfying the first difference requirement is selected from the standby port pool according to the first difference between the first bandwidth information and the second bandwidth information for starting;

[0012] In the case of predicted traffic greater than the total bandwidth of the current active ports,

[0013] The second difference between the third bandwidth information corresponding to the predicted traffic and the total bandwidth is calculated, and the target standby port satisfying the second difference requirement is selected from the standby port pool for starting.

[0014] Optionally, the target standby port satisfying the first difference requirement is selected from the standby port pool for starting, comprising:

[0015] If there are multiple candidate standby ports satisfying the first difference requirement in the standby port pool, the target standby port is selected from the multiple candidate standby ports in descending order of bandwidth, so that the bandwidth or bandwidth combination of the selected target standby port is greater than the first difference, and the target standby port is started, or

[0016] The candidate standby port with the largest combined bandwidth greater than and closest to the first difference and the least number is selected from the multiple candidate standby ports as the target standby port, and the target standby port is started.

[0017] Optionally, the target link aggregation group required to be transmitted is redistributed 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, comprising:

[0018] The weight information of the current normal active ports and the started target standby ports is updated in real time according to the bandwidth and actual utilization of the current normal active ports and the started target standby ports of the target link aggregation group;

[0019] According to current weight information corresponding to the current normal active port and the started target standby port respectively, the current normal active port and the started target standby port are allocated with service traffic.

[0020] Optionally, the weight information is calculated by the following formula:

[0021]

[0022] wherein, W i represents the weight corresponding to the port i, B i represents the physical bandwidth of the port i, U i represents the current utilization rate of the port i, and n represents the total number of ports, B j represents the physical bandwidth of the port j, U j represents the current utilization rate of the port j.

[0023] Optionally, the predicted traffic is obtained by a trained traffic prediction model, and the traffic prediction model comprises:

[0024] a parallel time domain convolution layer, configured to extract local time sequence features of each port in parallel;

[0025] a spatial interaction layer, configured to establish an association matrix between the traffic of each port according to the cosine similarity between the local time sequence features of each port;

[0026] a time attention pooling layer, configured to obtain a spatio-temporal fusion feature of each port;

[0027] a prediction output layer, configured to obtain a predicted traffic value at a future set time according to the spatio-temporal fusion feature.

[0028] Optionally, the traffic prediction model is trained in the following manner:

[0029] obtaining original sample data, wherein the training data comprises a historical traffic matrix;

[0030] performing normalization processing on the original sample data, and generating training samples according to a time window, wherein the training samples comprise an input tensor after normalization and a corresponding future traffic label;

[0031] inputting the training samples into the traffic prediction model for training to obtain a predicted traffic matrix;

[0032] comparing the predicted value in the predicted traffic matrix with a real value of the corresponding future traffic label, and constantly updating parameters of the model, wherein the traffic prediction model is trained when a value of a loss function converges to a minimum value;

[0033] wherein, the loss function of the traffic prediction model is:

[0034]

[0035] Where α 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 in the aggregated link group, T1 represents the total number of predicted future time steps, t represents the time step index, and w t Indicates the time decay weight. y represents the model's traffic prediction for the b-th sample, the n-th port, and the t-th future time step. b,n,t Indicates and Corresponding tag data; A ij The elements represent the adjacency matrix between ports. Let represent the mean predicted traffic for the b-th sample and the i-th port over all future time steps. Let represent the mean predicted traffic of the b-th sample and the j-th port over all future time steps; H represents the model's predicted traffic value 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, i.e., the length of the time series input to the model. b,t,n This represents the spatiotemporal features of the output of the parallel TCN model. This indicates the negation of the L2 norm, used to constrain the energy of the feature.

[0036] Secondly, embodiments of the present invention also provide a link protection device, the device comprising:

[0037] The port aggregation module is used to aggregate network ports to obtain multiple link aggregation groups. Each link aggregation group includes an active port pool and a backup port pool. The active port pool and the backup port pool each include one or more ports with the same or different speeds. The active ports in the active port pool are used for current data transmission, and the backup ports in the backup port pool are used to start when the active ports are insufficient to handle the traffic.

[0038] The target backup 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 cut-off conditions are met, a target backup port that meets the bandwidth requirements is selected from the backup port pool and started. The link cut-off conditions include the predicted traffic at a future time within a set time period from the current time being greater than the total bandwidth of the currently 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 re-distribute traffic required to be transmitted by the target link aggregation group to the current active ports and the target standby ports to be started according to weight information of the current active ports and the target standby ports to be started of the target link aggregation group.

[0040] Optionally, the target standby port starting module comprises:

[0041] a link state monitoring unit, configured to monitor states of each link aggregation group in real time;

[0042] a first starting unit, configured to, for each target link aggregation group, in a case where one or more active ports fail, count first bandwidth information corresponding to current traffic in real time, disable the failed active ports, determine second bandwidth information corresponding to remaining active ports of the target link aggregation group, and select a target standby port meeting a first difference requirement from the standby port pool according to a first difference between the first bandwidth information and the second bandwidth information, and start the target standby port.

[0043] a second starting unit, configured to, in a case where predicted traffic is greater than total bandwidth of current active ports, calculate a second difference between third bandwidth information corresponding to the predicted traffic and the total bandwidth, select a target standby port meeting a second difference requirement from the standby port pool, and start the target standby port.

[0044] Optionally, the first starting unit is specifically configured to:

[0045] if there are multiple candidate standby ports meeting the first difference requirement in the standby port pool, the target standby port is selected from the multiple candidate standby ports in a descending order of bandwidth, so that bandwidth or bandwidth combination of the selected target standby port is greater than the first difference, and the target standby port is started, or

[0046] the candidate standby port with a combination bandwidth greater than and closest to the first difference and a least number of the candidate standby ports is selected from the multiple candidate standby ports as the target standby port, and the target standby port is started.

[0047] Optionally, the traffic distribution module comprises:

[0048] a weight updating unit, configured to update weight information of the current active ports and the target standby ports to be started in a timely manner according to bandwidth and actual utilization of the current active ports and the target standby ports to be started of the target link aggregation group;

[0049] a traffic distribution unit, configured to distribute traffic to the current active ports and the target standby ports to be started according to current weight information corresponding to the current active ports and the target standby ports to be started respectively.

[0050] Optionally, the weight information is calculated by the following formula:

[0051]

[0052] wherein 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, and 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 by a trained traffic prediction model, and the traffic prediction model comprises:

[0054] a parallel time domain convolution layer, configured to extract local time sequence features of each port in parallel;

[0055] a spatial interaction layer, configured to establish an association matrix between the traffic of each port according to the cosine similarity between the local time sequence features of each port;

[0056] a time attention pooling layer, configured to obtain a spatio-temporal fusion feature of each port;

[0057] a prediction output layer, configured to obtain a predicted traffic value at a future set time according to the spatio-temporal fusion feature.

[0058] Optionally, the traffic prediction model is trained in the following manner:

[0059] obtaining original sample data, wherein the training data comprises a historical traffic matrix;

[0060] performing normalization processing on the original sample data, and generating training samples according to a time window, wherein the training samples comprise a normalized input tensor and a corresponding future traffic label;

[0061] inputting the training samples into the traffic prediction model for training to obtain a predicted traffic matrix;

[0062] comparing the predicted values in the predicted traffic matrix with real values of the corresponding future traffic labels, and constantly updating parameters of the model, wherein the traffic prediction model is trained when a value of a loss function converges to a minimum value;

[0063] wherein the loss function of the traffic prediction model is:

[0064]

[0065] Wherein, a represents a prediction loss weight coefficient, β represents a spatial consistency constraint weight coefficient, γ represents a time smoothing constraint weight coefficient, λ represents a regularization term weight coefficient, B represents a batch size, N represents a total number of physical ports in the aggregation link group, B, T1 represents a total number of predicted future time steps, t represents a time step index, w t represents a time decay weight, represents a predicted traffic value of the model for the bth sample, the nth port and the tth future time step, y b,n,t represents a label data corresponding to A ij represents an element of an inter-port adjacency matrix, represents a predicted traffic mean value of the bth sample, the ith port at all future time steps, represents a predicted traffic mean value of the bth sample, the jth port at all future time steps; represents a predicted traffic value of the model for the bth sample, the nth port and the t-1th future time step; T2 represents a number of historical time steps, that is, a length of a time series input into the model, H b,t,n represents a spatio-temporal feature output by a parallel TCN model, represents a negative of an L2 norm, used to constrain the energy of the feature.

[0066] In a third aspect, an electronic device is also provided in the embodiments of the present application, and the electronic device comprises:

[0067] a memory in which executable program codes are stored;

[0068] a processor coupled to the memory;

[0069] The processor invokes the executable program codes stored in the memory to execute the link protection method provided in any of the embodiments of the present application.

[0070] In a fourth aspect, a computer readable storage medium is also provided in the embodiments of the present application, and the computer readable storage medium has a computer program stored thereon, and the program is executed by a processor to implement the link protection method provided in any of the embodiments of the present application.

[0071] The technical solution provided in the embodiments of the present application solves the problem that mixed rate links cannot be losslessly cut under the premise that service communication is not affected in the link cutting process by starting a standby port in a link aggregation group and reallocating traffic required to be transmitted by the link aggregation group to the current normal active port and the started target standby port according to weight information of each port, improves network bandwidth, enhances the reliability and stability of the network, provides core technical support for 5G, data centers and other scenarios that require flexible networking, and significantly reduces network upgrade and maintenance costs.

[0072] The innovation points of the embodiments of the present application include:

[0073] 1. When the link splitting condition is triggered, the standby ports in the link aggregation group are started, and the traffic required to be transmitted by the link aggregation group is redistributed to the current normal active ports and the started target standby ports according to the weight information of each port, so as to solve the problem that the mixed rate link cannot be split without loss under the premise that the service communication is not affected in the link splitting process, improve the network bandwidth, enhance the reliability and stability of the network, and is one of the innovation points of the embodiments of the present application.

[0074] 2. By setting corresponding priorities for different types of service traffic, the ports are allocated to the high-priority service traffic first, then the corresponding ports are allocated to the medium-priority service traffic according to the weight information of the remaining ports, and finally the ports are allocated to the low-priority service traffic, so that the bandwidth utilization is improved, and the actual transmission demand of different levels of service traffic is met, which is one of the innovation points of the embodiments of the present application.

[0075] 3. The traffic prediction model is used to predict the traffic at future time, and the link splitting condition is triggered in advance when it is determined that the predicted traffic at future time is greater than the total bandwidth of the current active ports, so as to avoid the risk of network congestion or service interruption in the splitting process due to burst traffic, which is one of the innovation points of the embodiments of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0077] Figure 1a A flow chart of a link protection method provided for the first embodiment of the present application;

[0078] Figure 1b A structural block diagram of a traffic prediction model provided for the first embodiment of the present application;

[0079] Figure 2 A flow chart of a link protection device provided for the second embodiment of the present application;

[0080] Figure 3 A structural schematic diagram of an electronic device provided for the third embodiment of the present application. DETAILED DESCRIPTION

[0081] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of the present application.

[0082] It should be noted that the terms "comprising" and "having" and any variations thereof in the embodiments of the present application and the drawings are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally further include steps or units not listed, or can optionally further include other steps or units inherent to the process, method, product or device.

[0083] The embodiments of the present application disclose a link protection method, device, equipment and medium. The following are described in detail respectively.

[0084] Embodiment one

[0085] Figure 1a A flowchart of a link protection method provided by the embodiment one of the present application is shown in the figure. The method can be applied to link protection in a link cutting scenario to avoid service interruption or packet loss caused by link cutting. The method provided by the embodiment can be executed by a link protection device, which can be realized by software and / or hardware. As shown in the figure, the method provided by the embodiment specifically includes the following steps. Figure 1a

[0086] S110, aggregating 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.

[0087] In the 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 for starting in the case that the active ports are insufficient to undertake traffic. In the case that the active port pool includes a plurality of ports, each active port can be a port of the same rate or a port of different rates. Similarly, in the case that the standby port pool includes a plurality of ports, each standby port can be a port of the same rate or a port of different rates. The rates of the active ports and the standby ports can be the same or different, and the embodiment does not specifically limit whether the port rates are the same.

[0088] ​In this embodiment, when aggregating ports of different rates, an extended LACP (Link Aggregation Control Protocol) can be used to declare the rate capability (e.g., 10 Gbps, 1 Gbps) of the ports through a custom TLV (a kind of data exchange protocol), so that the device can identify and adapt to ports of different rates during negotiation. Alternatively, the port rate information can be exchanged through LLDP (Link Layer Discovery Protocol) to dynamically adjust the aggregation group policy. Alternatively, a vendor-defined aggregation mode can be used, and when configuring Eth-Trunk, a command can be used to forcibly enable the mixed rate mode. Alternatively, a static aggregation mode can also be used, and the LACP protocol can be disabled, and different rate ports can be directly added to the aggregation group through manual configuration. Alternatively, in the NFV (Network Function Virtualization) layer, different rate physical ports can be bound as logical links through a virtual switch, such as OVS (Open vSwitch). The embodiment does not specifically limit the way of aggregating different rate physical ports into the same link aggregation group. By sharing the same link aggregation group for different rate ports, the network environment can be more flexibly adapted to changes. After aggregating different rate ports into the same link aggregation group, the intelligent algorithm for allocating traffic to each port according to the weight information in the following text can eliminate the influence of rate difference on load balancing, and avoid network interruption caused by port failure or link cutting. Please refer to the following content for details.

[0089] S120, real-time monitoring of the state of each link aggregation group, for each target link aggregation group, when it is determined that the link cutting condition is met, a target standby port that meets the bandwidth requirement is selected from the standby port pool to start.

[0090] The link cutting condition includes that the predicted traffic at a future time point set by a time period from the current time point is greater than the total bandwidth of the current active port, or one or more active ports fail, the total bandwidth of the remaining normal active ports is less than the required bandwidth of the current actual traffic, or both of the above two cases occur. The set time period can be flexibly set according to the requirements of the actual application scene. The failure of the active port includes that the physical port or link is completely disconnected (such as loss of optical signal, cable breakage, configuration error), or the optical module fails (such as abnormal light emitting power), the switch port chip overheats, or the port CRC (Cyclic Redundancy Check, cyclic redundancy check error rate) exceeds the threshold, or the port or link is attacked (such as ARP (Address Resolution Protocol, Address Resolution Protocol) spoofing, port scanning), and needs to be cut to the isolation link and secured. The embodiment does not specifically limit the situation of port failure.

[0091] In the case of failure of one or more active ports:

[0092] The first bandwidth information corresponding to the current service traffic is counted in real time, the failed active port is disabled, the second bandwidth information corresponding to the remaining normal active ports in the target link aggregation group is determined, and the target standby port meeting the first difference requirement is selected from the standby port pool according to the first difference between the first bandwidth information and the second bandwidth information to start.

[0093] For example, if an Eth-Trunk aggregation group contains 2 10G active ports and 4 inactive 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 of failure of one of the active ports and the need for link cutting, 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, 1 10G standby port needs to be started, or 1 5G standby port is started, or 3 1G standby ports are started.

[0094] As an optional implementation, in the embodiment, the target standby port meeting the first difference requirement is selected from the standby port pool to start, which can adopt a high-speed priority strategy, that is, if there are multiple candidate standby ports meeting the first difference requirement in the standby port pool, the target standby port is selected 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, in the case of the first difference value being 3G, for the candidate backup ports (10G, 5G and 1G), a high-speed backup port is preferentially started to minimize the number of ports and reduce management complexity, that is, a 10G backup port is preferentially selected, and if the 10G backup port is unavailable, a sub-optimal rate 5G backup port is selected.

[0096] For example, in the case of the first difference value being 3G, for the candidate backup ports (10G, 5G and 1G), a high-speed backup port is preferentially started to minimize the number of ports and reduce management complexity, that is, a 10G backup port is preferentially selected, and if the 10G backup port is unavailable, a sub-optimal rate 5G backup port is selected.

[0097] As another optional implementation, in the embodiment, the target backup port that meets the first difference value requirement is selected from the backup port pool for starting, and a resource optimization strategy can also be used, that is, a candidate backup port with a combined bandwidth greater than and closest to the first difference value and a smallest number is selected from multiple candidate backup ports as the target backup port for starting.

[0098] For example, in the case of the first difference value being 3G, for the candidate backup ports (10G, 5G and 1G), a 5G backup port (60% utilization rate) is closer to the first difference value than a 10G backup port (30% utilization rate), and a 5G backup port uses the least number of ports relative to three 1G backup ports, therefore, a 5G backup port is preferentially started to avoid excessive occupation of port resources.

[0099] In the embodiment, the condition for triggering link cutting also includes predicted traffic being greater than the total bandwidth of the current active port. In the case of predicted traffic being greater than the total bandwidth of the current active port, a target backup port that meets the second difference value requirement can be selected from the backup port pool for starting by calculating the second difference value between the third bandwidth information corresponding to the predicted traffic and the total bandwidth of the current active port. The determination strategy of the target backup port is similar to the determination strategy of the target backup port in the case of one or more active ports being faulty, and specific reference can be made to the high-speed priority strategy and the resource optimization strategy described above, which will not be described herein again.

[0100] The predicted traffic can be predicted by a trained traffic prediction model. Figure 1bA structural block diagram of a flow prediction model provided for Embodiment One of the present application is shown in Figure 1b The flow prediction model includes a parallel time domain convolution layer 210, a spatial interaction layer 220, a time attention pooling layer 230, and a prediction output layer 240. The functions and implementation principles of each layer in the flow prediction model are described below.

[0101] (1) The parallel time domain convolution layer 210 is used to extract local time sequence features of each port in parallel, which can be 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 flows of each port according to the cosine similarity between the local time sequence features of each port. In the specific operation process, each port feature can be compressed into a low-dimensional vector, and then the cosine similarity between each low-dimensional vector is calculated to generate the influence weight between ports, and then the adjacent port features are weighted and fused to obtain enhanced feature information, which can be implemented by the following formula:

[0103]

[0104] wherein H i represents the time sequence 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 historical time step, N represents the total number of ports, and 16 represents the time convolution output channel of each port, represents the low-dimensional feature of the i-th port after projection, S j represents the low-dimensional feature of the j-th port after projection, 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 the selection of the top 3 ports j with the highest similarity to each port i, represents the enhanced feature of port i, which integrates the feature information of other ports.

[0105] (3) The time attention pooling layer is used to obtain the spatio-temporal fusion feature of each port and adaptively select the key time step to enhance the important historical information.

[0106]

[0107] wherein A t represents the attention score, Linear represents a fully connected layer that maps the feature to a scalar attention score, and Softmax represents normalization along the time dimension, denotes the weighting of the features at each time step, H pooled denotes the pooled features, preserving the important information of spatial correlation between ports and temporal dimension.

[0108] (4) The prediction output layer generates future traffic prediction based on the pooled spatio-temporal features 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-4:

[0110] 1. Obtain the original sample data, which includes the historical traffic matrix and can further include port metadata.

[0111] wherein the historical rate matrix includes the number of samples input for single training (batch size), the number of historical time steps and the number of ports, wherein each time step corresponds to a fixed time length in actual application, for example, data is collected every 5 minutes, then each time step represents 5 minutes; if collected every hour, the time step is 1 hour. The port metadata includes physical bandwidth, priority and other static characteristics.

[0112] 2. Normalize the original sample data and generate training samples according to the time window, which includes the normalized input tensor and the corresponding future traffic label.

[0113] 3. Input the training sample into the traffic prediction model, and process it through the parallel time convolution layer, the spatial interaction layer, the time attention pooling layer and the prediction output layer in the traffic prediction model to obtain the predicted traffic matrix;

[0114] 4. Compare the predicted value in the predicted traffic matrix with the true value of the corresponding future traffic label, and update the parameters of the model when the value of the loss function converges to the minimum, and the traffic prediction model training is completed.

[0115] wherein the loss function of the traffic prediction model is:

[0116] y = αy1 + βy2 + γy3 + λy4

[0117]

[0118] wherein, a represents a prediction loss weight coefficient for controlling the contribution of prediction error in the total loss, b represents a spatial consistency constraint weight coefficient for mediating the punishment intensity of adjacent port prediction difference, g represents a time smoothing constraint weight coefficient for restraining the mutation of prediction results, l represents a regularization term weight coefficient for balancing the model complexity and fitting ability, y1 represents a dynamic weighted prediction loss sub-function, B represents a 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 a time step index, w t represents a time decay weight, is the decay strength, represents the traffic prediction value of the model for the bth sample, the nth port and the tth future time step, y b,n,t represents the label data corresponding to . y2 represents a spatial consistency constraint sub-function, A ij represents an element of the adjacency matrix between ports, A ij = 1 represents that the ports i and j are physically adjacent or flow associated, represents the predicted traffic average of the bth sample, the ith port at all future time steps, i.e. represents the predicted traffic average of the bth sample, the jth port at all future time steps. y3 represents a time consistency constraint loss sub-function, represents the traffic prediction value of the model for the bth sample, the nth port and the t-1th future time step. y4 represents a regularization term sub-function, T2 represents the number of historical time steps, i.e. the length of the time series input into the model, H b,t,n represents the spatiotemporal features output by the parallel TCN model, represents the negative of the L2 norm, used to constrain the energy of the features.

[0119] The loss function includes a dynamic weighted prediction loss, a spatial consistency constraint, a time smoothing constraint, and an adaptive regularization constraint. The dynamic weighted prediction loss is obtained by assigning different weights to the prediction errors of different time steps, especially higher weights to long-term predictions, so that the model pays 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 difference between the prediction values of adjacent or related ports. The time smoothing constraint is to reduce the sudden change of the prediction results in the time dimension. The adaptive regularization term prevents overfitting by constraining the energy of the model feature representation, enhances the robustness of the model to noise and outliers, and improves the generalization ability of the model. Therefore, by using the above loss function, the traffic prediction model is improved in terms of prediction accuracy, output stability and generalization ability. The trained traffic prediction model is suitable for scenarios that require strict prediction accuracy and real-time decision-making, such as 5G core network dynamic resource scheduling, cloud computing center traffic management, etc., 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 future time, and in the case where the predicted traffic at future time is greater than the total bandwidth of the current active ports, the link switching condition is triggered in advance to avoid the risk of network congestion or service interruption during the switching process caused by sudden traffic, and the user experience is improved. For example, when an e-commerce platform conducts a promotion activity, the link switching condition can be triggered 3 hours before the start of the promotion activity to avoid network congestion during the e-commerce promotion activity due to excessive traffic.

[0121] S130, according to the weight information of the current normal active ports and the started target standby ports of the target link aggregation group, the traffic required to be transmitted by the target link aggregation group is redistributed to the current normal active ports and the started target standby ports.

[0122] It should be noted that when a port failure occurs, the core switch will first buffer the traffic of the failed port to the memory. At this time, the data will not be immediately lost, but will be temporarily stored in the cache, waiting for the new standby port to forward.

[0123] In this embodiment, in the case where an active port is abnormal, the current normal active port is the remaining normal active port in the target link aggregation group after the abnormal active port is disabled. In the case where the predicted traffic is greater than the total bandwidth of the current active ports, the current normal active port is the original normal active port in the target link aggregation group.

[0124] As an optional implementation, the weight information of each port can be preset, for example, higher weight can be assigned to high-speed ports and lower weight to low-speed ports. In the process of dynamic load redistribution of the system, the traffic can be redistributed to each port according to the preset weight information of each port.

[0125] As another optional implementation, the weight information of each port can also be updated in a dynamic weight manner, that is, the weight information of the current active ports and the target standby ports is updated in time according to the bandwidth and actual utilization of the current active ports and the target standby ports of the target link aggregation group, wherein the actual utilization of the target standby ports is 0 at the first start. Then the current active ports and the target standby ports are assigned with traffic according to the current weight information corresponding to the current active ports and the target standby ports respectively.

[0126] wherein the weight information is calculated by the following formula:

[0127]

[0128] wherein 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, and n represents the total number of ports, B j represents the physical bandwidth of port j, U j represents the current utilization of port j.

[0129] In the embodiment, in the case of failure of one or more active ports, the traffic of the failed port can be immediately switched to the standby port by dynamically adjusting the load distribution among the ports according to the weight information of each port, which usually occurs within a few milliseconds, thus not causing significant impact on network performance, and avoiding the service interruption or packet loss phenomenon caused by rate mutation in the traditional switchover. In the case of determining that the predicted traffic at the future time is greater than the total bandwidth of the current active ports, the standby port is started in advance and the load distribution among the ports is dynamically adjusted according to the weight information of each port, thereby avoiding the risk of network congestion or service interruption in the switchover process caused by burst traffic, and improving the user experience.

[0130] Further, before redistributing the traffic required for transmission of the target link aggregation group to the current active ports and the started target standby ports, the following steps A-C can also be included:

[0131] A, identifying the type of service traffic contained in the traffic required for transmission of the target link aggregation group.

[0132] In the embodiment, when one or more active ports fail and a backup port needs to be started, the different network applications can be identified by checking the source port number and the destination port number of the network data packet and mapping according to the port number rules used by the corresponding network protocol or network application in communication. When the predicted traffic is greater than the total bandwidth of the current active ports and a backup port needs to be started, the service type of the predicted traffic can be obtained based on the deep learning identification method.

[0133] B. Determine the priority of each service traffic according to the type of the service traffic.

[0134] In the embodiment, the priority includes high priority, medium priority and low priority. The correspondence between the type of the service traffic and the priority thereof can be set in advance. For example, for critical services with high real-time requirements, such as real-time video streaming, financial services and the like, the corresponding priority is high priority; for management traffic, log transmission, file backup and the like, the corresponding priority is low priority; for important services such as database synchronization, API (Application Programming Interface) request and the like, the corresponding priority is medium priority.

[0135] C. For the first service traffic with high priority, the first service traffic is allocated to the port with the largest bandwidth among the remaining normal active ports and the target backup port in the order of bandwidth from high to low.

[0136] In the embodiment, for the second service traffic with medium priority, the weight information of the remaining normal active ports and the target backup port in the target link aggregation group can be determined according to the calculation method of the weight information described above, and the second service traffic is 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 ports in the target link aggregation group which have not been allocated.

[0137] By using the above settings, not only the weight of each port can be dynamically adjusted based on real-time utilization to optimize bandwidth utilization, but also the actual transmission needs of service traffic of different levels can be met to improve user experience.

[0138] It should be further noted that for the target backup port and the active ports which have been started, if the actual utilization rate of a port is greater than a set threshold (for example, 90%), part of the traffic of the port can be migrated to other low-load ports, or other backup ports can be started to avoid the phenomenon of port overload.

[0139] The technical scheme provided by the embodiment can, when the link switching condition is triggered, start a backup port in a link aggregation group, and re-distribute the traffic required to be transmitted by the link aggregation group to the current normal active port and the started target backup port according to the weight information of each port, so as to solve the problem that mixed rate links cannot be switched without loss under the premise that the service communication is not affected in the link switching process. In addition, while improving the network bandwidth, the reliability and stability of the network are also enhanced, which provides core technical support for 5G, data centers and other scenarios that require flexible networking, and significantly reduces the network upgrade and maintenance cost.

[0140] Further, the embodiment of the application further includes an automatic detection and alarm mechanism, which can detect the link state in real time when the link switching or link failure occurs, and send alarm information to the administrator through the network management system, so as to timely handle the link abnormal problem.

[0141] Further, when the switching operation is completed, if it is detected that there is a data packet loss or timeout, 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 that one or more active ports fail, after the failed port is repaired and recovered, 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. Alternatively, the repaired failed port can be added to the backup port pool as a backup port. When the link switching condition is met in the future, the backup port will be started.

[0143] Embodiment two

[0144] Figure 2 The structure block diagram of a link protection device provided for the second embodiment of the application is shown in Figure 2 The device includes a port aggregation module 310, a target backup port starting module 320 and a traffic distribution module 330, wherein,

[0145] The port aggregation module 310 is configured to aggregate network ports to obtain a plurality of link aggregation groups, wherein each link aggregation group includes an active port pool and a backup port pool, the active port pool and the backup port pool each 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 backup ports in the backup port pool are used for starting in the case that the active ports are insufficient to undertake the traffic;

[0146] The target backup port starting module 320 is configured to monitor states of each link aggregation group in real time, and for each target link aggregation group, select a target backup port satisfying a bandwidth requirement from the backup port pool to start when it is determined that a link switchover condition is met, wherein the link switchover condition includes that predicted traffic at a future time point that is a set time period from a current time point is greater than total bandwidth of current active ports, and / or one or more active ports fail, and total bandwidth of remaining normal active ports is less than bandwidth required by current actual traffic.

[0147] The traffic distribution module 330 is configured to redistribute traffic required to be transmitted by the target link aggregation group to current normal active ports and started target backup ports according to weight information of the current normal active ports and the started target backup ports of the target link aggregation group.

[0148] Optionally, the target backup port starting module includes:

[0149] The link state monitoring unit is configured to monitor states of each link aggregation group in real time.

[0150] The first starting unit is configured to, for each target link aggregation group, in a case where one or more active ports fail, statistically obtain first bandwidth information corresponding to current traffic in real time, disable the failed active ports, determine second bandwidth information corresponding to remaining normal active ports in the target link aggregation group, and select a target backup port satisfying a first difference requirement from the backup port pool according to a first difference between the first bandwidth information and the second bandwidth information to start.

[0151] The second starting unit is configured to, in a case where predicted traffic is greater than total bandwidth of current active ports, calculate a second difference between third bandwidth information corresponding to the predicted traffic and the total bandwidth, and select a target backup port satisfying a second difference requirement from the backup port pool to start.

[0152] Optionally, the first starting unit is specifically configured to:

[0153] If there are multiple candidate backup ports satisfying the first difference requirement in the backup port pool, the target backup port is selected from the multiple candidate backup ports in a descending order of bandwidth, so that bandwidth or bandwidth combination of the selected target backup port is greater than the first difference, and the target backup port is started, or

[0154] The candidate backup port with a combination bandwidth greater than and closest to the first difference and a smallest quantity is selected from the multiple candidate backup ports as the target backup port, and the target backup port is started.

[0155] Optionally, the traffic distribution module includes:

[0156] a weight updating unit, configured to update weight information of the current active ports and the started target standby ports in the target link aggregation group in a time manner according to bandwidths and actual utilization rates of the current active ports and the started target standby ports;

[0157] a traffic distribution unit, configured to distribute service traffic to the current active ports and the started target standby ports according to current weight information corresponding to the current active ports and the started target standby ports respectively.

[0158] Optionally, the weight information is calculated by the following formula:

[0159]

[0160] wherein, W i denotes weight corresponding to port i, B i denotes physical bandwidth of port i, U i denotes current utilization rate of port i, and n denotes total quantity of ports, B j denotes physical bandwidth of port j, U j denotes current utilization rate of port j.

[0161] Optionally, the predicted traffic is obtained by a trained traffic prediction model, and the traffic prediction model comprises:

[0162] a parallel time domain convolution layer, configured to extract local time sequence features of each port in parallel;

[0163] a spatial interaction layer, configured to establish an association matrix among traffics of each port according to cosine similarity among the local time sequence features of each port;

[0164] a time attention pooling layer, configured to obtain a spatio-temporal fusion feature of each port;

[0165] a prediction output layer, configured to obtain a predicted traffic value at a future set time according to the spatio-temporal fusion feature.

[0166] Optionally, the traffic prediction model is trained in the following manner:

[0167] obtaining original sample data, wherein the training data comprises a historical traffic matrix;

[0168] performing normalization processing on the original sample data, and generating training samples according to a time window, wherein the training samples comprise an input tensor after normalization and a corresponding future traffic label;

[0169] inputting the training samples into the traffic prediction model to perform training, and obtaining a predicted traffic matrix;

[0170] The predicted values ​​in the predicted traffic matrix are compared with the actual values ​​of the corresponding future traffic labels, and the parameters of the model are continuously updated. When the value of the loss function converges to the minimum, the traffic prediction model training is complete.

[0171] The loss function of the traffic prediction model is:

[0172]

[0173] Where α 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 in the aggregated link group, T1 represents the total number of predicted future time steps, t represents the time step index, and w t Indicates the time decay weight. y represents the model's traffic prediction for the b-th sample, the n-th port, and the t-th future time step. b,n,t Indicates and Corresponding tag data; A ij The elements represent the adjacency matrix between ports. Let represent the mean predicted traffic for the b-th sample and the i-th port over all future time steps. Let represent the mean predicted traffic of the b-th sample and the j-th port over all future time steps; H represents the model's predicted traffic value 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, i.e., the length of the time series input to the model. b,t,n This represents the spatiotemporal features of the output of the parallel TCN model. This indicates the negation of the L2 norm, used to constrain the energy of the feature.

[0174] Example 3

[0175] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention.

[0176] like Figure 3 As shown, the electronic device may include:

[0177] Memory 701 storing executable program code;

[0178] Processor 702 coupled to memory 701;

[0179] The processor 702 calls the executable program code stored in the memory 701 to execute the link protection method provided in any embodiment of the present invention.

[0180] The embodiment of the present application discloses a computer readable storage medium, which stores a computer program, wherein the computer program makes a computer execute the link protection method provided by any embodiment of the present application.

[0181] In various embodiments of the present application, it should be understood that the size of the sequence number of the above processes does not mean the inevitable sequence of execution, and the execution sequence of the processes should be determined according to their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0182] In the embodiments provided by the present application, 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 the determination of B according to A does not mean that B is determined only according to A, but also can be determined according to A and / or other information.

[0183] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically independently, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0184] The integrated unit described above, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer accessible memory. Based on such understanding, the technical solutions of the present application, essentially or in the form of a contribution to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. The computer software product is stored in a memory and includes several steps for causing a computer device (which can be a personal computer, a server, or a network device, etc., and specifically can be a processor in a computer device) to execute the methods of the embodiments of the present application described above.

[0185] Those skilled in the art can understand that all or part of the steps of various methods in the above embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer readable storage medium, including 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 disk storage, magnetic disk storage, magnetic tape storage, or any other medium that can be used to carry or store data which can be read by a computer.

[0186] Those skilled in the art can understand that the modules or flows in the drawings are not necessarily required to implement the present application.

[0187] Those skilled in the art can understand that the modules in the device in the embodiments can be distributed in the device in the embodiments as described in the embodiments, or can be changed and located in one or more devices different from the embodiments. The modules in the above embodiments can be combined into one module, or can be 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 application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A link protection method, characterized in that, include: Network ports are aggregated to obtain multiple link aggregation groups including ports of mixed rates. Each link aggregation group includes an active port pool and a backup port pool. The active port pool and the backup port pool each include one or more ports of the same or different rates. The active ports in the active port pool are used for current data transmission, and the backup ports in the backup port pool are used to start when the active ports are insufficient to handle the traffic. The status of each link aggregation group is monitored in real time. For each target link aggregation group, when the link cut-off conditions are met, a target backup port that meets the bandwidth requirements is selected from the backup port pool and started. The link cut-off conditions include that the predicted traffic at a future time within a set time period from the current time is greater than the total bandwidth of the currently active port. Based on the dynamic weight information of the current active ports and the activated target backup ports of the target link aggregation group, and according to the priority of the traffic to be transmitted by the target link aggregation group, the traffic to be transmitted by the target link aggregation group is redistributed to the current active ports and the activated target backup ports. The dynamic weight information is updated periodically based on the bandwidth and actual utilization of the current active ports and the activated target backup ports of the target link aggregation group. The predicted traffic is obtained through a trained traffic prediction model, which includes: Parallel temporal convolutional layers are used to extract local temporal features from each port in parallel. The spatial interaction layer is used to establish an association matrix between the traffic of each port based on the cosine similarity between the local time-series features of each port. The association matrix is ​​established by the following formula: ,in, This represents the temporal feature of the i-th port of the parallel temporal convolutional layer output. This represents the cosine similarity matrix between ports i and j. This represents the original characteristics of the j-th port. This represents the characteristics of the enhanced port i. This means selecting the top 3 ports with the highest similarity to each port i; Temporal attention pooling layer is used to obtain the spatiotemporal fusion features of each port; The prediction output layer, based on the spatiotemporal fusion characteristics, predicts the flow value at a future set time.

2. The method according to claim 1, characterized in that, The step of selecting a target backup port that meets the bandwidth requirements from the backup port pool for startup includes: In the event of a failure of one or more active ports The system performs real-time statistics on the first bandwidth information corresponding to the current service traffic, disables faulty active ports, determines the second bandwidth information corresponding to the remaining normal active ports in the target link aggregation group, and selects a target backup port from the backup port pool that meets the first difference requirement based on the first bandwidth information and the second bandwidth information. If the predicted traffic is greater than the total bandwidth of the currently active port. Calculate the second difference between the third bandwidth information corresponding to the predicted traffic and the total bandwidth, and select a target backup port that meets the second difference requirement from the backup port pool for startup.

3. The method according to claim 2, characterized in that, The step of selecting a target backup port from the backup port pool that meets the first difference requirement for startup includes: If multiple candidate backup ports in the backup port pool meet the first difference requirement, then a target backup port is selected from these candidate backup ports in descending order of bandwidth, such that the bandwidth or bandwidth combination of the selected target backup port is greater than the first difference, and the target backup port is then activated. Select the candidate backup port with the smallest number of ports whose combined bandwidth is greater than and closest to the first difference from multiple candidate backup ports, and then activate the target backup port.

4. The method according to claim 1, characterized in that, The weight information is calculated using the following formula: in, This represents the weight corresponding to port i. This represents the physical bandwidth of port i. This represents the current utilization rate of port i, and n represents the total number of ports. This represents the physical bandwidth of port j. This indicates the current utilization rate of port j.

5. The method according to claim 1, characterized in that, The traffic prediction model is trained in the following manner: Obtain raw sample data, which includes a historical traffic matrix; The original sample data is normalized and training samples are generated according to a time window. The training samples include the normalized input tensor and the corresponding future traffic labels. The training samples are input into the traffic prediction model for training to obtain the predicted traffic matrix; The predicted values ​​in the predicted traffic matrix are compared with the actual values ​​of the corresponding future traffic labels, and the parameters of the model are continuously updated. When the value of the loss function converges to the minimum, the traffic prediction model training is complete. The loss function of the traffic prediction model is: in, Represents the weighting coefficient of the prediction loss. This represents the weighting coefficient of the spatial consistency constraint. This represents the weighting coefficients of the time smoothing constraint. Here, B represents the weight coefficient of the regularization term, B represents the batch size, N represents the total number of physical ports in the aggregated link group, T1 represents the total number of predicted future time steps, and t represents the time step index. Indicates the time decay weight. This represents the model's predicted traffic values ​​for the b-th sample, the n-th port, and the t-th future time step. Indicates and Corresponding tag data; The elements represent the adjacency matrix between ports. Let represent the mean predicted traffic for the b-th sample and the i-th port over all future time steps. Let represent the mean predicted traffic of the b-th sample and the j-th port over all future time steps; This represents the model's traffic prediction for the b-th sample, the n-th port, and the (t-1)-th future time step; This represents the number of historical time steps, i.e., the length of the time series input to the model. This represents the spatiotemporal features of the output of the parallel TCN model. This indicates the negation of the L2 norm, used to constrain the energy of the feature.

6. A link protection device, characterized in that, include: The port aggregation module is used to aggregate network ports to obtain multiple link aggregation groups including ports of mixed rates. Each link aggregation group includes an active port pool and a backup port pool. The active port pool and the backup port pool each 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 backup ports in the backup port pool are used to start when the active ports are insufficient to handle the traffic. The target backup 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 cut-off conditions are met, a target backup port that meets the bandwidth requirements is selected from the backup port pool and started. The link cut-off conditions include that the predicted traffic at a future time within a set time period from the current time is greater than the total bandwidth of the currently active port. The traffic allocation module is used to reallocate the traffic required to be transmitted by the target link aggregation group to the current active port and the activated target backup port according to the dynamic weight information of the current active port and the activated target backup port of the target link aggregation group, based on the priority of the traffic required to be transmitted by the target link aggregation group. The dynamic weight information is updated periodically based on the bandwidth and actual utilization of the current active port and the activated target backup port of the target link aggregation group. The predicted traffic is obtained through a trained traffic prediction model, which includes: Parallel temporal convolutional layers are used to extract local temporal features from each port in parallel. The spatial interaction layer is used to establish an association matrix between the traffic of each port based on the cosine similarity between the local time-series features of each port. The association matrix is ​​established by the following formula: ,in, This represents the temporal feature of the i-th port of the parallel temporal convolutional layer output. This represents the cosine similarity matrix between ports i and j. This represents the original characteristics of the j-th port. This represents the characteristics of the enhanced port i. This means selecting the top 3 ports with the highest similarity to each port i; Temporal attention pooling layer is used to obtain the spatiotemporal fusion features of each port; The prediction output layer, based on the spatiotemporal fusion characteristics, predicts the flow value at a future set time.

7. An electronic device, characterized in that, The electronic device includes: One or more processors; 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-5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the link protection method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Method and device for realizing redundant backup of link aggregation group of manual aggregation

    CN113141268A

  • Port number prediction method and device and storage medium

    CN114826950A

  • Static link aggregation configuration method and device

    CN119030917A

  • Network adjustment method and device, electronic equipment and storage medium

    CN119544605A