Link protection switching method, electronic equipment, readable storage medium and computer program product

By acquiring link quality parameters to calculate health scores and using a large model to dynamically adjust switching threshold parameters, the stability and reliability issues caused by fixed thresholds in link protection are resolved, achieving more efficient link protection switching.

CN120880938APending Publication Date: 2025-10-31ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511126504.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

In existing link protection mechanisms, fixed threshold parameters can lead to problems such as excessive link switching reducing stability and failure to switch over in a timely manner when links deteriorate, affecting service reliability.

Method used

By acquiring the link quality parameters of the target link, calculating the health score, and using a pre-trained large model to dynamically adjust the switching threshold parameters based on the real-time link status, link protection switching decisions are made.

Benefits of technology

It improves the sensitivity and reliability of link protection switching, reduces false switching, and enhances business continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120880938A_ABST
    Figure CN120880938A_ABST
Patent Text Reader

Abstract

The invention discloses a link protection switching method, electronic equipment, a readable storage medium and a computer program product, and belongs to the technical field of communication. The method comprises the following steps: acquiring a first link quality parameter of a target link; determining a first health degree score of the target link according to the first link quality parameter, the first health degree score being used for indicating a current link stability state of the target link; according to the first link quality parameter and the first health degree score, obtaining a dynamic switching threshold parameter according to a preset switching threshold obtaining strategy; and performing a link switching decision on the target link according to the dynamic switching threshold parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a link protection switching method, electronic device, readable storage medium, and computer program product. Background Technology

[0002] Existing link protection mechanisms typically rely on fixed alarm threshold parameters to determine whether a link needs to be switched over. However, in complex and dynamic network environments, such as sporadic jitter or sudden interference, link states can fluctuate frequently. Fixed thresholds can easily lead to reduced link stability due to excessive switching over, and affect service reliability due to untimely switching over degraded links. Summary of the Invention

[0003] This application provides a link protection switching method, electronic device, readable storage medium, and computer program product, which can solve the problems that fixed thresholds can easily lead to reduced link stability due to excessive link switching, and the impact on service reliability due to failure to switch in time due to link degradation.

[0004] To solve the above-mentioned technical problems, this application is implemented as follows: Firstly, a link protection switching method is provided, including: Obtain the first link quality parameters of the target link; A first health score of the target link is determined based on the first link quality parameter, wherein the first health score is used to indicate the current link stability status of the target link; Based on the first link quality parameter and the first health score, obtain the dynamic switching threshold parameter according to the preset switching threshold acquisition strategy; The target link is used to make a link switching decision based on the dynamic switching threshold parameters.

[0005] Secondly, an electronic device is provided, the electronic device comprising a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the above-described link protection switching method.

[0006] Thirdly, a readable storage medium is provided, wherein at least one computer program is stored in the readable storage medium, the computer program being loaded and executed by a processor to implement the above-described link protection switching method.

[0007] Fourthly, a computer program product is provided, the computer program product comprising at least one computer program, the computer program being loaded and executed by a processor to implement the link protection switching method provided in the various optional implementations described above.

[0008] The link protection switching method, electronic device, readable storage medium, and computer program product provided in this application can make link switching decisions on target links based on dynamically determined switching threshold parameters in real time. This can improve the sensitivity and reliability of link protection switching, reduce false switching, and enhance service continuity.

[0009] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0010] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0011] Figure 1 A flowchart of a link protection switching method provided in an exemplary embodiment of this application is shown; Figure 2 This application illustrates a flowchart of determining a first health score based on a first link quality parameter, provided in an exemplary embodiment. Figure 3 This application illustrates a flowchart of a model training process provided in an exemplary embodiment. Figure 4 This application illustrates a flowchart of an exemplary embodiment for determining a second health score based on historical alarm data and a second link quality parameter. Figure 5 This invention provides a schematic diagram of the structure of a link protection switching device according to an exemplary embodiment of the present application. Figure 6 A schematic diagram of the structure of a link protection switching device provided in another exemplary embodiment of this application is shown; Figure 7 A schematic block diagram of the structure of an electronic device provided in an exemplary embodiment of this application is shown. Detailed Implementation

[0012] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0013] To address the problems in existing technologies where fixed thresholds can lead to reduced link stability due to excessive link switching and reduced service reliability due to untimely link degradation, this application provides a link protection switching method and apparatus.

[0014] The execution subject of this method can be various types of computing devices, or it can be an application or app installed on a computing device. The computing device can be a user terminal such as a mobile phone, tablet computer, or smart wearable device, or it can be a switch, router, or server. The server can be a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing, consisting of a large number of computers and network servers.

[0015] Figure 1 A flowchart illustrating a link protection switching method according to an exemplary embodiment of this application is shown. Figure 1 As shown, the link protection switching method mainly includes the following steps (S101-S104): S101. Obtain the first link quality parameters of the target link; In some embodiments, the first link quality parameter includes at least one of the following: current link jitter, current bit error rate, and current packet loss rate.

[0016] In communication networks, the Operation, Administration, and Maintenance (OAM) module is a crucial component for ensuring normal network operation, efficient management, and timely maintenance. It is responsible for collecting various information from network devices, monitoring network performance indicators, performing network configuration management, and diagnosing and repairing faults. For example, the OAM module can continuously monitor key network performance indicators such as bandwidth utilization, packet loss rate, and latency. In this embodiment, the OAM module can perform delay measurement (DM) to obtain the current link jitter of the target link; detect packet loss rate (LM) to obtain the current packet loss rate of the target link; and calculate the current bit error rate of the target link using a chip or FPGA.

[0017] In this embodiment, key performance indicators such as the current link jitter, current bit error rate, and current packet loss rate of the target link are obtained to obtain the health and stability status of the target link, so as to reflect the jitter degree, long-term stability, or degradation trend of the target link and form a link behavior profile, which serves as the basis for subsequent real-time acquisition of dynamic switching threshold parameters.

[0018] S102. Determine the first health score of the target link based on the first link quality parameters, wherein the first health score is used to indicate the current link stability status of the target link; In some embodiments, such as Figure 2 As shown, the first health score is determined based on the first link quality parameters, including the following steps (S201-S202): S201. Normalize the first link quality parameters to obtain the first normalized link quality parameters; In this embodiment, the first normalized link quality parameter is obtained by normalizing the first link quality parameter in step S101. The first normalized link quality parameter includes at least one of the following: current normalized link jitter, current normalized bit error rate, and current normalized packet loss rate.

[0019] For example, the current normalized link jitter is obtained by normalizing the current link jitter in the following way: (1) In this embodiment, For the current normalized link jitter, For the current link jitter, and These are the minimum and maximum values ​​of historical jitter, respectively.

[0020] For example, the current normalized bit error rate is obtained by normalizing the current bit error rate in the following way: (2) In this embodiment, The current normalized bit error rate, The current bit error rate, and These are the minimum and maximum historical bit error rates, respectively.

[0021] For example, the current normalized packet loss rate can be obtained by normalizing the current packet loss rate in the following way: (3) In this embodiment, The current normalized packet loss rate, The current packet loss rate, and These are the minimum and maximum historical packet loss rates, respectively.

[0022] S202. The first health score is obtained by weighting the first normalized link quality parameters using a weighted comprehensive scoring method.

[0023] Link health can reflect the jitter level, long-term stability, or degradation trend of a target link, forming a link behavior profile. In this embodiment, the first health score is used to indicate the current link stability status of the target link.

[0024] In some embodiments, the first health score H is calculated using the following formula: (4) In this embodiment, For the current normalized link jitter, The current normalized bit error rate, The current normalized packet loss rate, , , Indicates weight, .

[0025] In this embodiment, a health scoring model is used, and a weighted comprehensive scoring method is employed to calculate the health score H of the target link. The current normalized link jitter is then considered. Current normalized bit error rate Current normalized packet loss rate As key evaluation indicators, their corresponding weights are as follows: , , ,and For example, as set =0.3、 =0.4、 =0.3.

[0026] The first health score H ranges from [0, 1], with a higher score indicating better link health. For example, if the jitter amplitude and frequency, bit error rate, and packet loss rate of a link are all at historically good levels, and H is close to 1 after calculation, it indicates that the link health is high; conversely, if the indicators are poor, H is close to 0, indicating that the link health is low.

[0027] S103. Obtain dynamic switching threshold parameters according to the first link quality parameters and the first health score, and according to the preset switching threshold acquisition strategy. In some embodiments, dynamic switching threshold parameters are obtained according to a preset switching threshold acquisition strategy based on a first link quality parameter and a first health score. This includes: obtaining the corresponding dynamic switching threshold parameters when the first health score is greater than a first preset threshold; and obtaining the corresponding dynamic switching threshold parameters when the first health score is less than or equal to a second preset threshold. In this embodiment, the values ​​of the first and second preset thresholds are in the range of [0, 1], and are set according to the actual link protection needs. This application does not impose any restrictions on this. Thus, the corresponding dynamic switching threshold parameters are obtained based on the link health score to adapt to dynamic changes in the link and complete link protection switching in real time.

[0028] In some embodiments, dynamic switching threshold parameters are obtained according to a preset switching threshold acquisition strategy based on a first link quality parameter and a first health score. This includes: inputting the first link quality parameter and the first health score into a pre-trained model and outputting the dynamic switching threshold parameters. Therefore, by utilizing the predictive power of a large model, the corresponding dynamic switching threshold parameters can be obtained more accurately, thereby improving the sensitivity and reliability of link protection switching, reducing false switching, and enhancing service continuity.

[0029] In some embodiments, before inputting the first link quality parameter and the first health score into the pre-trained model and outputting the dynamic switching threshold parameter, the link protection switching method provided in this application embodiment further includes a step of training the model.

[0030] For example, the machine learning model with adaptive optimization of link protection threshold used in this embodiment can be further improved by adopting a new generation of large models (such as the Transformer architecture) to enhance prediction and feature extraction capabilities. The Transformer processes sequence data through a self-attention mechanism, and each output element can be directly associated with all elements in the input sequence, thereby effectively capturing long-distance dependencies.

[0031] Historical alarm data and historical link quality parameters (such as historical link jitter, historical bit error rate, and historical packet loss rate) of the target link naturally possess time-series characteristics, which aligns with the Transformer architecture's advantage in capturing sequence dependencies. The Transformer has a multi-head attention mechanism, which can simultaneously consider the alarm / performance evolution patterns at different time scales in the target link data, thus more accurately reflecting the link's health status.

[0032] Figure 3 A flowchart illustrating the training of a model, as shown in an embodiment of this application, is illustrated. Figure 3 As shown, the process of training the model specifically includes the following steps (S301-S304): S301. Obtain historical alarm data of the target link and quality parameters of the second link; For example, the OAM module can collect historical alarm data and second link quality parameters of the target link in real time. In some embodiments, the second link quality parameters include at least one of the following: historical link jitter, historical bit error rate, and historical packet loss rate; the historical alarm data includes at least one of the following: alarm type, frequency, duration, and severity of historical alarm events. For example, the historical alarm data and second link quality parameters are data within a preset period of time, such as historical data from the past week or the past month.

[0033] S302. Determine the second health score based on historical alarm data and second link quality parameters; Link health can reflect the jitter level, long-term stability, or degradation trend of a target link, forming a link behavior profile. In this embodiment, the second health score is used to indicate the historical link stability status of the target link.

[0034] In this embodiment, similar to the first health score, the normalized link quality parameter of each link quality parameter is first calculated, and then the weighted comprehensive scoring method is used to calculate the second health score by weighting the normalized link quality parameters.

[0035] In some embodiments, such as Figure 4 As shown, the second health score is determined based on historical alarm data and second link quality parameters, including the following steps (S401-S403): S401. Normalize the second link quality parameters to obtain the second normalized link quality parameters; In some embodiments, the second normalized link quality parameters include: historical normalized link jitter, historical normalized bit error rate, and historical normalized packet loss rate.

[0036] For example, historical normalized link jitter can be obtained by normalizing historical link jitter in the following way: (5) In this embodiment, For historical normalization link jitter, For historical link jitter, and These are the minimum and maximum values ​​of historical jitter, respectively.

[0037] For example, the historical normalized bit error rate (BER) can be obtained by normalizing the historical BER in the following way: (6) In this embodiment, For historical normalized bit error rate, Historical error rate and These are the minimum and maximum historical bit error rates, respectively.

[0038] For example, the historical normalized packet loss rate can be obtained by normalizing the historical packet loss rate in the following way: (7) In this embodiment, For historical normalized packet loss rate, Historical packet loss rate and These are the minimum and maximum historical packet loss rates, respectively.

[0039] S402. Normalize the historical alarm data to obtain the historical normalized alarm data; In some embodiments, historical normalized alarm data can be calculated by comprehensively considering factors such as alarm type, frequency, duration, and severity of historical alarm events in the historical alarm data. For example, different types of alarms are assigned different weights (signal failure alarms have a higher weight than general signal degradation alarms), the number of alarms occurring per unit time is counted, and weighted adjustments are made based on alarm duration and severity to finally obtain historical normalized alarm data.

[0040] For example, historical alarm data is obtained by comprehensively calculating the alarm type, frequency, and duration of historical alarm events in the following way: (8) In this embodiment, Historical alarm data The weight of the i-th type of alarm, for example, signal failure alarm. =0.8, Deterioration =0.2; This represents the number of times the i-th type of alarm occurs per unit time. is the average duration of a single alarm of type i; n represents the total number of alarm types.

[0041] For example, normalized historical alarm data can be obtained by normalizing historical alarm data in the following way: (9) In this embodiment, For historical normalized alarm data, Historical alarm data and These are the minimum and maximum values ​​of historical alarm data, respectively.

[0042] S403. The second health score is obtained by weighting the second normalized link quality parameters and historical normalized alarm data using a weighted comprehensive scoring method.

[0043] In some embodiments, the second health score is calculated using the following formula. : (10) In this embodiment, For historical normalization link jitter, For historical normalized bit error rate, For historical normalized packet loss rate, For historical normalized alarm data, , , , This indicates the weights corresponding to each parameter. .

[0044] In this embodiment, a health scoring model is used, and a weighted comprehensive scoring method is employed to calculate the historical health score of the target link. Normalize historical link jitter Historical normalized bit error rate Historical normalized packet loss rate and historical normalized alarm data As key evaluation indicators, their corresponding weights are as follows: , , ,and For example, as set =0.3、 =0.2、 =0.3、 =0.2.

[0045] Second Health Score The value range is [0, 1], and a higher score indicates a better link health. For example, if the historical jitter amplitude and frequency, bit error rate, and packet loss rate of a link are all at historically good levels, the calculated value is considered good. A value close to 1 indicates a high historical health of the link; conversely, if the indicators are poor, A value close to 0 indicates a low historical health of the link.

[0046] S303. Construct an association graph, wherein the nodes in the association graph include: historical alarm data, second link quality parameters, historical state switching data, and second health score, and the weight of the edges between nodes represents the degree of association between each node. In some embodiments, before constructing the associated image, the link protection switching method provided in this application further includes: acquiring historical state switching data. In some embodiments, the historical state switching data includes: historical switching events and corresponding historical switching threshold parameters. Historical switching events include: switching time, triggering reason, etc., and the corresponding historical switching threshold parameters include at least one of the following: historical dynamic hold-off time and historical dynamic signal degradation (SignalDegrade, SD) state determination threshold.

[0047] For example, the aforementioned historical alarm data, second link quality parameters, historical switchover data, and second health score are used to construct a correlation graph. Key elements are represented by nodes, such as "historical link jitter," "historical bit error rate," "historical packet loss rate," "second health score," "alarm type," "number of alarms and duration," "historical switchover events," and "corresponding historical switchover threshold parameters," each treated as an independent node. Nodes are connected by edges, with edge weights set according to the correlation between elements. For instance, when a high bit error rate is often accompanied by a decline in link health, the edge weight between the "historical bit error rate" node and the "second health score" node is relatively high; if a switchover is triggered by a specific alarm, there is a strong correlation between the "alarm type" node and the "historical switchover events" and "corresponding historical switchover threshold parameters" nodes, resulting in a higher edge weight for the corresponding node. Each edge also includes relevant information labels, such as the number of times the correlation occurred and the average impact.

[0048] S304. Use the association graph as training data for the model and train the model.

[0049] Training data input: The constructed association graph is used as the model input. The Transformer model utilizes a multi-head self-attention mechanism, enabling it to simultaneously focus on the complex relationships between different nodes in the graph. For example, when analyzing the graph, the model can simultaneously capture the impact of bit error rate changes on link health, as well as the potential connections between alarm events and failover decisions.

[0050] Training Objectives and Output: The training objective of the model remains minimizing the difference between the predicted threshold and the optimal threshold for actual switching effects. The output is the optimal switching threshold parameters for the corresponding scenario, namely the dynamic hold-off time and the dynamic SD (Switching-Off) decision threshold. During training, the optimal threshold parameters used in actual switching events are used as labels. By calculating the difference between the predicted threshold and the label, for example, using a regression loss function such as mean squared error, or a custom loss such as a weighted loss combining the false switching rate and the false switching rate, the model parameters are continuously adjusted to optimize the model's ability to learn the relationships between various elements in the graph, thereby improving the accuracy of the model's prediction of the dynamic switching threshold parameters.

[0051] In some embodiments, when the large model outputs dynamic switching threshold parameters, it simultaneously receives feedback on the actual switching results of the link, and combines the feedback on the actual switching results to continuously optimize the model itself, dynamically adjusting its weights or parameters, thereby further improving the accuracy of the model in predicting dynamic switching threshold parameters.

[0052] Therefore, based on the trained model, the first link quality parameters and the first health score acquired in real time are input into the pre-trained model, and the model outputs the optimal dynamic switching threshold parameters. Thus, by leveraging the predictive power of a large model, the corresponding dynamic switching threshold parameters can be obtained more accurately, thereby improving the sensitivity and reliability of link protection switching, reducing false switching, and enhancing business continuity.

[0053] In some embodiments, the dynamic switchover threshold parameters include one of the following: dynamic SD status determination threshold and dynamic hold-off time. In some embodiments, if the link fluctuates drastically, the hold-off time is appropriately extended to avoid unnecessary switching caused by short-term fluctuations; if the link is stable for a long period, the hold-off time is shortened to quickly respond to link degradation. In some embodiments, the SD determination threshold for triggering switchover is flexibly set according to the link health and degradation trend. The output of the large model may include: a specific threshold value, or a threshold value plus a threshold adjustment range (such as "+10%" or "-10%").

[0054] S104. Make a link switching decision for the target link based on the dynamic switching threshold parameters.

[0055] Determining whether a link has failed relies on two methods: one is to determine whether a switchover is needed based on changes in physical layer signals such as bit error rate and optical power, and a dynamic SD status threshold; the other is to introduce a fixed delay to wait before making a judgment in order to avoid misjudgment caused by instantaneous jitter, and to determine whether a switchover is needed based on the dynamic hold-off time.

[0056] In practical applications, the dynamic switching threshold parameters output by the large model can be sent to the OAM detection module via the main control FPGA or OAM configuration interface. These dynamic switching threshold parameters are used to detect link status, and the detected link status is compared with the dynamic switching threshold parameters to make a comprehensive judgment and determine a link switching decision. For example, when the link status meets the dynamic switching threshold parameters, link switching is triggered; otherwise, the existing link status is maintained to avoid unnecessary switching.

[0057] In some embodiments, the link protection switching method provided in this application further includes: triggering an alarm when the detected link state meets the dynamic switching threshold parameters and the alarm triggering condition is met, and recording the alarm type, number of times, and duration of the alarm. In some embodiments, the alarm triggering condition is updated to ensure that the link protection switching decision is based on the latest dynamic switching threshold parameters.

[0058] In some embodiments, a "threshold update cycle" or "alarm trigger condition update cycle" can be configured to update the alarm trigger conditions and dynamic switching threshold parameters when the preset cycle is reached, so as to balance the real-time performance of the model and the stability of the network.

[0059] The link protection switching method provided in this application makes link switching decisions for the target link based on the dynamically determined switching threshold parameters in real time. This can improve the sensitivity and reliability of link protection switching, reduce false switching, and enhance service continuity.

[0060] An exemplary embodiment of this application provides a link protection switching device 10. Figure 5 This illustration shows a structural block diagram of a link protection switching device 10 provided in an exemplary embodiment of this application. The above-described link protection switching device is applied to an OAM module and can achieve the following: Figures 1 to 4 All or part of the contents of any of the embodiments shown. The following is only a brief description of the structure and function of the link protection switching device 10. For other matters not covered, please refer to the relevant descriptions in the above-described link protection switching method. The embodiment of the link protection switching device 10 corresponds to the embodiment of the above-described link protection switching method. All implementation processes and methods of the above-described method embodiments can be applied to the embodiment of the link protection switching device and can achieve the same technical effect.

[0061] like Figure 5 As shown, the link protection switching device 10 includes: an acquisition module 100, a health determination module 200, a dynamic switching threshold acquisition module 300, and a decision module 400. In this embodiment, the acquisition module 100 is used to acquire a first link quality parameter of the target link; the health determination module 200 is used to determine a first health score of the target link based on the first link quality parameter, wherein the first health score is used to indicate the current link stability status of the target link; the dynamic switching threshold acquisition module 300 is used to acquire a dynamic switching threshold parameter according to the first link quality parameter and the first health score and a preset switching threshold acquisition strategy; the decision module 400 is used to make a link switching decision for the target link based on the dynamic switching threshold parameter.

[0062] In some embodiments, the health determination module 200 determines the first health score based on the first link quality parameter in the following manner: normalizing the first link quality parameter to obtain the first normalized link quality parameter; and using a weighted comprehensive scoring method to perform a weighted calculation on the first normalized link quality parameter to obtain the first health score.

[0063] In some embodiments, the first link quality parameter includes at least one of the following: current link jitter, current bit error rate, and current packet loss rate; the first normalized link quality parameter includes at least one of the following: current normalized link jitter, current normalized bit error rate, and current normalized packet loss rate. In this embodiment, by obtaining key performance indicators such as the current link jitter, current bit error rate, and current packet loss rate of the target link, the health and stability status of the target link is obtained to reflect the jitter level, long-term stability, or degradation trend of the target link, forming a link behavior profile, which serves as the basis for subsequent real-time acquisition of dynamic switching threshold parameters.

[0064] For example, the current normalized link jitter can be obtained by normalizing the current link jitter, the current bit error rate, and the current bit error rate using formulas (1)-(3) above. Current normalized bit error rate and the current normalized packet loss rate For details, please refer to the description of the link protection switching method embodiment above; the steps are repeated here.

[0065] In some embodiments, the health determination module 200 obtains a first health score by weighting the first normalized link quality parameters using a weighted comprehensive scoring method: The first health score H is calculated using the formula (4) mentioned above: (4) in, For the current normalized link jitter, The current normalized bit error rate, The current normalized packet loss rate, , , Indicates weight, .

[0066] The first health score H ranges from [0, 1], with a higher score indicating better link health. For example, if the jitter amplitude and frequency, bit error rate, and packet loss rate of a link are all at historically good levels, and H is close to 1 after calculation, it indicates that the link health is high; conversely, if the indicators are poor, H is close to 0, indicating that the link health is low.

[0067] In some embodiments, the dynamic switching threshold acquisition module 300 acquires dynamic switching threshold parameters according to a preset switching threshold acquisition strategy based on a first link quality parameter and a first health score: if the first health score is greater than a first preset threshold, the corresponding dynamic switching threshold parameter is acquired; if the first health score is less than or equal to a second preset threshold, the corresponding dynamic switching threshold parameter is acquired. In this embodiment, the values ​​of the first and second preset thresholds are in the range of [0, 1], and are set according to actual link protection needs; this application does not impose any restrictions on this. Therefore, by acquiring the corresponding dynamic switching threshold parameters based on the link health, link protection switching can be completed in real time to adapt to dynamic changes in the link.

[0068] In some embodiments, the dynamic switching threshold acquisition module 300 acquires dynamic switching threshold parameters according to a preset switching threshold acquisition strategy based on the first link quality parameters and the first health score: The first link quality parameters and the first health score are input into a pre-trained model, and the dynamic switching threshold parameters are output. Therefore, by utilizing the predictive power of a large model, the corresponding dynamic switching threshold parameters can be acquired more accurately, thereby improving the sensitivity and reliability of link protection switching, reducing false switching, and enhancing service continuity.

[0069] In some embodiments, such as Figure 6 As shown, the link protection switching device 10 provided in this application embodiment further includes: a model training module 500, used to acquire historical alarm data and second link quality parameters of the target link; determine a second health score based on the historical alarm data and second link quality parameters, wherein the second health score is used to indicate the historical link stability status of the target link; construct an association graph, wherein the nodes in the association graph include: historical alarm data, second link quality parameters, historical state switching data and second health score, and the weight of the edges between nodes represents the degree of association between each node; and use the association graph as training data for the model to train the model.

[0070] In some embodiments, the second link quality parameters include at least one of the following: historical link jitter, historical bit error rate, and historical packet loss rate; historical alarm data includes at least one of the following: alarm type, number, duration, and severity of historical alarm events; historical state switching data includes: historical switching events and corresponding historical switching threshold parameters. In some embodiments, the corresponding historical switching threshold parameters include at least one of the following: historical dynamic hold-off time and historical dynamic SD state determination threshold.

[0071] In some embodiments, the model training module 500 determines the second health score based on historical alarm data and the second link quality parameter in the following manner: normalizing the second link quality parameter to obtain the second normalized link quality parameter; normalizing the historical alarm data to obtain historical normalized alarm data; and using a weighted comprehensive scoring method to perform a weighted calculation on the second normalized link quality parameter and the historical normalized alarm data to obtain the second health score.

[0072] In some embodiments, the second normalized link quality parameter includes: historical normalized link jitter, historical normalized bit error rate, and historical normalized packet loss rate; for example, the historical normalized link jitter is obtained by normalizing the historical link jitter, historical bit error rate, and historical bit error rate using formulas (5)-(7) above. Historical normalized bit error rate and historical normalized packet loss rate For details, please refer to the description of the link protection switching method embodiment above; the steps are repeated here.

[0073] In some embodiments, historical normalized alarm data can be calculated by comprehensively considering factors such as alarm type, frequency, duration, and severity of historical alarm events in the historical alarm data. For example, different types of alarms are assigned different weights (signal failure alarms have a higher weight than general signal degradation alarms), the number of alarms occurring per unit time is counted, and weighted adjustments are made based on alarm duration and severity to finally obtain historical normalized alarm data.

[0074] For example, the historical alarm data is obtained by normalizing the historical alarm data using formulas (8) and (9) above. For details, please refer to the description of the link protection switching method embodiment above; the steps are repeated here.

[0075] The model training module 500 calculates the second health score by weighting the second normalized link quality parameters and historical normalized alarm data using a weighted comprehensive scoring method: The second health score is calculated using formula (10) above. : (10) in, For historical normalization link jitter, For historical normalized bit error rate, For historical normalized packet loss rate, For historical normalized alarm data, , , , Indicates weight, .

[0076] Second Health Score The value range is [0, 1], and a higher score indicates a better link health. For example, if the historical jitter amplitude and frequency, bit error rate, and packet loss rate of a link are all at historically good levels, the calculated value is considered good. A value close to 1 indicates a high historical health of the link; conversely, if the indicators are poor, A value close to 0 indicates a low historical health of the link.

[0077] The model training module 500 constructs an association graph, where nodes include: historical alarm data, second link quality parameters, historical state switching data, and second health score. The weights of the edges between nodes represent the degree of association between them. For example, the aforementioned historical alarm data, second link quality parameters, historical state switching data, and second health score are used to construct the association graph. Key elements such as "historical link jitter," "historical bit error rate," "historical packet loss rate," "second health score," "alarm type," "number of alarms and duration," "historical switching events," and "corresponding historical switching threshold parameters" are each treated as an independent node. Nodes are connected by edges, and the weights of the edges are set according to the degree of association between the elements. For example, when a high bit error rate is often accompanied by a decline in link health, the edge weight between the "historical bit error rate" node and the "second health score" node is relatively high. If a switchover is triggered by a specific alarm, there is a strong correlation between the "alarm type" node and the "historical switchover event" and "corresponding historical switchover threshold parameter" nodes, and the corresponding edge weight is relatively high. Each edge also comes with relevant information labels, such as the number of times the association occurred and the average degree of impact.

[0078] The model training module 500 uses the association graph as training data to train the model.

[0079] Training data input: The constructed association graph is used as the model input. The Transformer model utilizes a multi-head self-attention mechanism, enabling it to simultaneously focus on the complex relationships between different nodes in the graph. For example, when analyzing the graph, the model can simultaneously capture the impact of bit error rate changes on link health, as well as the potential connections between alarm events and failover decisions.

[0080] Training Objectives and Output: The training objective of the model remains minimizing the difference between the predicted threshold and the optimal threshold for actual switching effects. The output is the optimal switching threshold parameters (dynamic hold-off time and dynamic SD decision threshold) for the corresponding scenario. During training, the optimal threshold parameters used in actual switching events are used as labels. By calculating the difference between the predicted threshold and the label (using a regression loss function such as mean squared error, or a custom loss such as a weighted loss combining false switching rate and false switching rate), the model parameters are continuously adjusted to optimize the model's ability to learn the relationships between various elements in the graph, thereby improving the accuracy of the model's prediction of dynamic switching threshold parameters.

[0081] In some embodiments, the model training module 500 is also used to receive feedback on the actual switching results of the link when the dynamic switching threshold parameters are output by the large model, and to continuously optimize the model by combining the feedback on the actual switching results, dynamically adjusting its weights or parameters, and further improving the accuracy of the model in predicting the dynamic switching threshold parameters.

[0082] Therefore, based on the trained model, the first link quality parameters and the first health score acquired in real time are input into the pre-trained model, and the model outputs the optimal dynamic switching threshold parameters. Thus, by leveraging the predictive power of a large model, the corresponding dynamic switching threshold parameters can be obtained more accurately, thereby improving the sensitivity and reliability of link protection switching, reducing false switching, and enhancing business continuity.

[0083] In some embodiments, the dynamic switchover threshold parameters include one of the following: dynamic SD status determination threshold and dynamic hold-off time. In some embodiments, if the link fluctuates drastically, the hold-off time is appropriately extended to avoid unnecessary switching caused by short-term fluctuations; if the link is stable for a long period, the hold-off time is shortened to quickly respond to link degradation. In some embodiments, the SD determination threshold for triggering switchover is flexibly set according to the link health and degradation trend. The output of the large model may include: a specific threshold value, or a threshold value plus a threshold adjustment range (such as "+10%" or "-10%").

[0084] In practical applications, the dynamic switching threshold parameters output by the large model can be sent to the decision module 400 via the main control FPGA or OAM configuration interface. The decision module 400 uses these dynamic switching threshold parameters to detect link status and compares the detected link status with the dynamic switching threshold parameters to make a link switching decision. For example, when the link status meets the dynamic switching threshold parameters, link switching is triggered; otherwise, the existing link status is maintained to avoid unnecessary switching.

[0085] The link protection switching device provided in this application can make link switching decisions on the target link based on the dynamically determined switching threshold parameters in real time, thereby improving the sensitivity and reliability of link protection switching, reducing false switching, and improving service continuity.

[0086] Figure 7 A structural block diagram of an electronic device 1000 illustrating an exemplary embodiment of this application is shown. The electronic device 1000 can be implemented as the link protection switching device described above, which can be configured in electronic devices such as smartphones, tablets, laptops, desktop computers, smartwatches, televisions, routers, switches, or servers.

[0087] Typically, electronic device 1000 includes a processor 1001 and a memory 1002.

[0088] Processor 1001 may include one or more processing cores, such as a quad-core processor, a deca-core processor, etc. Processor 1001 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1001 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1001 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0089] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1002 is used to store at least one instruction, which is executed by the processor 1001 to implement all or part of the steps in the link protection switching method shown in the method embodiments of this application.

[0090] Those skilled in the art will understand that Figure 7 The structure shown does not constitute a limitation on the electronic device 1000, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0091] In one exemplary embodiment, a readable storage medium is also provided, which stores a program or instructions that, when executed by a processor, implement all or part of the steps in the link protection switching method described above. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, or optical data storage device, etc.

[0092] In one exemplary embodiment, a computer program product is also provided, comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions that, when executed by a computer, cause the computer to perform the aforementioned... Figures 1 to 4 All or part of the steps of the link protection switching method shown in any embodiment.

[0093] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.

[0094] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A link protection switching method, characterized in that, include: Obtain the first link quality parameters of the target link; A first health score of the target link is determined based on the first link quality parameter, wherein the first health score is used to indicate the current link stability status of the target link; Based on the first link quality parameter and the first health score, obtain the dynamic switching threshold parameter according to the preset switching threshold acquisition strategy; The target link is used to make a link switching decision based on the dynamic switching threshold parameters.

2. The method according to claim 1, characterized in that, The step of determining the first health score based on the first link quality parameter includes: The first normalized link quality parameter is obtained by normalizing the first link quality parameter; The first health score is obtained by weighting the first normalized link quality parameters using a weighted comprehensive scoring method.

3. The method according to claim 2, characterized in that, The first link quality parameter includes at least one of the following: current link jitter, current bit error rate, and current packet loss rate; The first normalized link quality parameter includes at least one of the following: current normalized link jitter, current normalized bit error rate, and current normalized packet loss rate.

4. The method according to claim 3, characterized in that, The first health score is obtained by weighting the first normalized link quality parameters using a weighted comprehensive scoring method, including: The first health score H is calculated using the following formula: in, For the current normalized link jitter, The current normalized bit error rate, The current normalized packet loss rate, , , Indicates weight, .

5. The method according to claim 1, characterized in that, The step of obtaining dynamic switchover threshold parameters according to the first link quality parameters and the first health score based on a preset switchover threshold acquisition strategy includes: The first link quality parameter and the first health score are input into the pre-trained model, and the dynamic switching threshold parameter is output.

6. The method according to claim 5, characterized in that, Before inputting the first link quality parameter and the first health score into the pre-trained model and outputting the dynamic switching threshold parameter, the method includes: Obtain historical alarm data of the target link and quality parameters of the second link; A second health score is determined based on the historical alarm data and the second link quality parameter, wherein the second health score is used to indicate the historical link stability status of the target link; Construct an association graph, wherein the nodes in the association graph include: the historical alarm data, the second link quality parameters, the historical state switching data, and the second health score, and the weight of the edges between the nodes represents the degree of association between each node; The association graph is used as training data for the model to train it.

7. The method according to claim 6, characterized in that, The second link quality parameter includes at least one of the following: historical link jitter, historical bit error rate, and historical packet loss rate; The historical alarm data includes at least one of the following: alarm type, frequency, duration, and severity of historical alarm events; The historical state transition data includes: historical transition events and corresponding historical transition threshold parameters.

8. The method according to claim 7, characterized in that, The step of determining the second health score based on the historical alarm data and the second link quality parameters includes: The second normalized link quality parameter is obtained by normalizing the second link quality parameter. The historical alarm data is normalized to obtain historical normalized alarm data; The second health score is obtained by weighting the second normalized link quality parameter and the historical normalized alarm data using a weighted comprehensive scoring method.

9. The method according to claim 8, characterized in that, The second normalized link quality parameters include: historical normalized link jitter, historical normalized bit error rate, and historical normalized packet loss rate; The second health score is obtained by weighting the second normalized link quality parameters and the historical normalized alarm data using a weighted comprehensive scoring method, including: The second health score is calculated using the following formula. : in, For the historical normalized link jitter, The historical normalized bit error rate, The historical normalized packet loss rate, The historical normalized alarm data, , , , Indicates weight, .

10. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the steps of the link protection switching method as described in any one of claims 1 to 9.

11. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the link protection switching method as described in any one of claims 1 to 9.

12. A computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the steps of the link protection switching method as described in any one of claims 1 to 9.