Data transmission method and device of switch, equipment and storage medium
By identifying switch failures and switching to the standby switch according to data type and priority, the problem of unreliable data transmission in the event of switch failure is solved, and efficient reliability of data transmission and optimized utilization of standby switches are achieved.
Patent Information
- Application Number
- CN202510393117.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-04
AI Technical Summary
In the event of a switch failure, the prior art cannot customize fine scheduling strategies for data of different types and priorities, resulting in unreliable and inefficient transmission of critical data.
By judging the operating parameters of the main switch, identifying faults and using different transmission strategies to switch data to the standby switch according to the data type and priority, including generating instructions, recovery algorithms and packet transmission, ensuring that constant data, real-time video data and non-instant data are transmitted through appropriate standby switches respectively.
In the event of a switch failure, the transmission efficiency and reliability of different types of data are guaranteed, the data transmission pressure is reduced, the utilization rate of backup switches is improved, and the user experience and network stability are ensured.
Smart Images

Figure CN120263872A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication networks, and in particular, to a data transmission method, apparatus, device, and storage medium for a switch. Background Art
[0002] In the field of network communication, switches play a crucial role, enabling high-speed forwarding and switching of data. Once a switch fails, it may cause data transmission interruption and affect network stability. Most existing solutions achieve failover by means of switches or redundant links. However, when a switch fails, the existing solutions simply transfer all the data of the primary switch to an idle standby switch without formulating a refined scheduling strategy for different types and priorities of data, and cannot guarantee the priority transmission of critical data and the reliability of data transmission. Summary of the Invention
[0003] The purpose of the embodiments of the present invention is to provide a data transmission method, apparatus, device, and storage medium for a switch, which can ensure the transmission efficiency and reliability of different types of data under the failure of the primary switch.
[0004] To achieve the above purpose, the embodiments of the present invention provide a data transmission method for a switch, including:
[0005] Input the operating parameters of the primary switch and the data type of the data to be transmitted; wherein, the data type includes constant data, instant data, and non-instant data;
[0006] Based on the operating parameters, determine whether the primary switch fails;
[0007] When the primary switch fails, switch the transmission path of all or part of the data to be transmitted to a standby switch according to a first transmission strategy; wherein, the first transmission strategy includes:
[0008] When the data to be transmitted is constant data, send a first data generation instruction to the corresponding receiving terminal to instruct the receiving terminal to generate the data to be transmitted based on a data generation algorithm;
[0009] When the data to be transmitted is instant video data, send a second data generation instruction to the corresponding sending terminal to instruct the sending terminal to send an inter-frame recovery algorithm and an intra-frame recovery algorithm, as well as inter-frame residual data and intra-frame residual data to the corresponding receiving terminal;
[0010] When the data to be transmitted is not constant data or real-time video data, group the data to be transmitted based on the data type and data form, determine the transmission requirements and transmission priorities, and switch the transmission paths of each group of data to be transmitted to several standby switches whose operating parameters meet the requirements based on the transmission requirements and the transmission priorities.
[0011] As an improvement to the above solution, the judging whether the main switch fails based on the operating parameters includes:
[0012] Judge whether the operating parameters are abnormal based on a preset operating parameter threshold;
[0013] When the operating parameters are abnormal, retrieve an exception report from the receiving terminal of the data to be transmitted;
[0014] Input the operating parameters into a first fault identification model to obtain a first fault identification result;
[0015] Input the exception report into a second fault identification model to obtain a second fault identification result;
[0016] When the first fault identification result is consistent with the second fault identification result, use the first fault identification result or the second fault identification result as the final fault identification result;
[0017] When the first fault identification result is inconsistent with the second fault identification result, select the fault identification result with a high prediction probability as the final fault identification result.
[0018] As an improvement to the above solution, when the data to be transmitted is non-real-time data, the retrieving an exception report from the receiving terminal of the data to be transmitted includes:
[0019] Send test data to the receiving terminal of the data to be transmitted;
[0020] When no feedback data corresponding to the test data is received, or when feedback data corresponding to the test data is received and the feedback data indicates that part of the test data is lost or abnormal, generate an exception report.
[0021] As an improvement to the above solution, the transmission data type is determined by the following method:
[0022] When the value of the data to be transmitted is constant, identify the data to be transmitted as constant data;
[0023] When the value of the data to be transmitted is not constant, calculate the average response time of the data to be transmitted;
[0024] When the average response time is greater than a preset response threshold, the data to be transmitted is identified as non-instantaneous data;
[0025] When the average response time is not greater than the preset response threshold, the data to be transmitted is identified as instantaneous data.
[0026] As an improvement to the above solution, after switching the transmission path of all or part of the data to be transmitted to the standby switch according to the first transmission strategy, it further includes, according to the second transmission strategy, switching the transmission path of part or all of the data to be transmitted from multiple standby switches to the main switch, specifically including:
[0027] For any group of data to be transmitted, when the operating parameters of the main switch meet its transmission priority and transmission requirements, switch the transmission path of this group of data to be transmitted to the main switch.
[0028] As an improvement to the above solution, after switching the transmission path of all or part of the data to be transmitted to the standby switch according to the first transmission strategy, it further includes:
[0029] Based on the operating parameters, call the operating status prediction model to predict the operating parameters of the main switch after the first time interval;
[0030] If the operating parameters after the first time interval meet the transmission requirements, switch the transmission path of the data to be transmitted to the main switch after the first time interval.
[0031] As an improvement to the above solution, the operating status prediction model is a seasonal autoregressive integrated moving average model, as shown in the following formula:
[0032]
[0033] where, y t represents the observed value at time t; represents the non-seasonal autoregressive polynomial, with order p; Φ P (B m ) represents the seasonal autoregressive polynomial, with order P; θ q (B) represents the non-seasonal moving average polynomial, with order q; Θ Q (B m ) represents the seasonal moving average polynomial, with order Q; represents the non-seasonal differencing operation, with the number of times d; represents the seasonal differencing operation, with the number of times D; ε t represents the white noise term; m represents the seasonal period; μ represents the mean of the operating parameters.
[0034] To achieve the above object, an embodiment of the present invention further provides a data transmission device for a switch, including:
[0035] A parameter acquisition module, configured to input the operating parameters of the main switch and the data type of the data to be transmitted; wherein, the data type includes constant data, instant data, and non-instant data;
[0036] A fault judgment module, configured to judge whether the main switch has a fault based on the operating parameters;
[0037] A transmission path switching module, configured to, when the main switch has a fault, switch the transmission path of all or part of the data to be transmitted to a standby switch according to a first transmission strategy; wherein, the first transmission strategy includes:
[0038] When the data to be transmitted is constant data, send a first data generation instruction to the corresponding receiving terminal to instruct the receiving terminal to generate the data to be transmitted based on a data generation algorithm;
[0039] When the data to be transmitted is instant video data, send a second data generation instruction to the corresponding sending terminal to instruct the sending terminal to send an inter-frame recovery algorithm and an intra-frame recovery algorithm, as well as inter-frame residual data and intra-frame residual data to the corresponding receiving terminal;
[0040] When the data to be transmitted is not constant data or instant video data, group the data to be transmitted based on the data type and data form, determine the transmission requirements and transmission priorities, and based on the transmission requirements and the transmission priorities, switch the transmission paths of the groups of data to be transmitted to several standby switches whose operating parameters meet the requirements.
[0041] To achieve the above object, an embodiment of the present invention further provides a data transmission device for a switch, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the data transmission method of the switch as described in any one of the above embodiments is implemented.
[0042] To achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute the data transmission method of the switch as described in any one of the above embodiments.
[0043] Compared with the prior art, the data transmission method, apparatus, device and storage medium of the switch provided by the embodiments of the present invention input the operating parameters of the main switch and the data type of the data to be transmitted; wherein, the data type includes constant data, instant data and non-instant data; based on the operating parameters, it is determined whether the main switch fails; when the main switch fails, according to the first transmission strategy, the transmission path of all or part of the data to be transmitted is switched to the standby switch; wherein, the first transmission strategy includes: when the data to be transmitted is constant data, a first data generation instruction is sent to the corresponding receiving terminal to instruct the receiving terminal to generate the data to be transmitted based on the data generation algorithm; when the data to be transmitted is instant video data, a second data generation instruction is sent to the corresponding sending terminal to instruct the sending terminal to send the inter-frame recovery algorithm and intra-frame recovery algorithm, as well as inter-frame residual data and intra-frame residual data to the corresponding receiving terminal; when the data to be transmitted is not constant data or instant video data, based on the data type and data form, the data to be transmitted is grouped and the transmission requirements and transmission priorities are determined, and based on the transmission requirements and the transmission priorities, the transmission paths of the groups of data to be transmitted are switched to several standby switches whose operating parameters meet the requirements. In the embodiments of the present invention, when the switch fails, by instructing the receiving terminals corresponding to the constant data and instant video data to generate data according to the algorithm, the user experience can be guaranteed and the data transmission pressure can be reduced. Moreover, for non-instant data and other instant data, after grouping based on the transmission requirements and transmission priorities, they are switched to different standby switches, so that while ensuring the normal transmission of all data to the greatest extent, the utilization rate of the standby switches can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a flowchart of a data transmission method of a switch provided by an embodiment of the present invention;
[0045] Figure 2 is a schematic diagram of a switch networking system provided by an embodiment of the present invention;
[0046] Figure 3 is a schematic structural diagram of a data transmission device of a switch provided by an embodiment of the present invention;
[0047] Figure 4 is a schematic structural diagram of a data transmission device of a switch provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0048] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0049] In the description of the present application, it should be understood that the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present application, unless otherwise stated, the meaning of "a plurality" is two or more.
[0050] In the description of the present application, it should be noted that unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific situations.
[0051] See Figure 1 , which is a flowchart of a data transmission method of a switch provided by an embodiment of the present invention, including steps S1 to S3:
[0052] S1. Input the operating parameters of the main switch and the data type of the data to be transmitted; wherein, the data type includes constant data, instant data, and non-instant data;
[0053] S2. Based on the operating parameters, determine whether the main switch fails;
[0054] S3. When the main switch fails, switch the transmission path of all or part of the data to be transmitted to the standby switch according to the first transmission strategy; wherein, the first transmission strategy includes:
[0055] When the data to be transmitted is constant data, send a first data generation instruction to the corresponding receiving terminal to instruct the receiving terminal to generate the data to be transmitted based on the data generation algorithm;
[0056] When the data to be transmitted is instant video data, send a second data generation instruction to the corresponding sending terminal to instruct the sending terminal to send the inter-frame recovery algorithm and the intra-frame recovery algorithm, as well as the inter-frame residual data and the intra-frame residual data to the corresponding receiving terminal;
[0057] When the data to be transmitted is not constant data or real-time video data, based on the data type and data form, the data to be transmitted is grouped and the transmission requirements and transmission priorities are determined. Based on the transmission requirements and the transmission priorities, the transmission paths of each group of data to be transmitted are switched to several standby switches whose operating parameters meet the requirements.
[0058] See Figure 2 , which is a schematic diagram of a switch network configuration system provided by an embodiment of the present invention. It should be noted that the data transmission method of the switch provided by the embodiment of the present invention can be applied to, for example, Figure 2 the switch network configuration system shown. The system includes a main switch, standby switches, and an optical bypass protection device. Among them, the optical bypass protection device is used to execute the data transmission method of the switch described in the embodiment of the present invention. Moreover, an idle standby switch list is maintained on the optical bypass protection device, and the idle standby switch list includes the current operating parameters of the idle standby switches and the predicted operating parameters after the prediction period. Among them, the predicted operating parameters can be calculated through a seasonal autoregressive integrated moving average model based on the transmission history of the idle standby switches; an idle channel list is maintained on the standby switches, and the idle channel list includes the transmission speed, frame loss rate, and transmission delay of the idle channels, as well as the predicted transmission speed, predicted frame loss rate, and predicted transmission delay after the prediction period. Among the above parameters, they can be calculated through a seasonal autoregressive integrated moving average model based on the transmission history of the idle channels.
[0059] Exemplarily, in step S1, the operating parameters of the main switch and the data type included in the data to be transmitted can be detected by real-time monitoring of the heartbeat packets sent by the main switch. Among them, the operating parameters can include transmission speed, number of transmission tasks, frame loss rate, transmission delay, and channel occupancy rate. The data types include constant data, real-time data, and non-real-time data. It should be noted that in the present invention, the data to be transmitted is divided into constant data and non-constant data according to whether the value is constant. For non-constant data, according to its response speed, it is further divided into real-time data and non-real-time data. That is, both real-time data and non-real-time data belong to non-constant data.
[0060] It should be noted that when a failure occurs in the main switch in the prior art, all the data to be transmitted is only mechanically transferred to a certain standby switch for transmission. However, in actual application scenarios, there may be a large amount of data to be transmitted on the same main switch, and the importance and transmission requirements of different data to be transmitted are not the same. The existing failover methods are prone to problems such as data loss and untimely transmission when the amount of data to be transferred is large. To solve the above defects existing in the prior art, in the embodiments of the present invention, based on whether the value is constant, constant data is regarded as an independent data type. Thus, when a transmission failure occurs, an algorithm for generating data can be sent to the corresponding receiving terminal for it (if the receiving terminal already has it, there is no need to send), and the receiving terminal is instructed to generate relevant data by itself according to the data generation algorithm, thereby reducing the data transmission pressure when a transmission failure occurs and improving the transmission efficiency of constant data; further, for non-constant data, in the embodiments of the present invention, it is further divided into immediate data and non-immediate data based on the average response time, so that standby switches in different operating states can be allocated to the data to be transmitted with different response requirements, improving the utilization rate of the standby switch while ensuring the normal transmission of all the data to be transmitted to the greatest extent; further, based on the characteristics of video data and the requirement of high timeliness, for the video data (immediate video data) in the immediate data, in the embodiments of the present invention, the method of sending inter-frame recovery algorithm, intra-frame recovery algorithm, inter-frame residual data and intra-frame residual data is adopted, thereby improving the transmission efficiency of the immediate video data and ensuring the user's video viewing experience under transmission failure.
[0061] Further, in step S3, by way of example, the first transmission strategy may include the following content:
[0062] First, the data to be transmitted is grouped according to the data type of the data to be transmitted, including: (1) For the image data (immediate image data) and video data (immediate video data) in the immediate data, they are divided according to the sending terminal and the receiving terminal, that is, for the data to be transmitted corresponding to the same group of sending terminals and receiving terminals, they are divided into a group of data to be transmitted; (2) For the immediate text data and immediate signaling data in the immediate data, they are divided according to the transmission requirements, that is, the data to be transmitted with the same transmission requirements are divided into the same group; (3) For the image data and video data in the non-immediate data, they are divided into a group of data to be transmitted; (4) For the text data and signaling data in the immediate data, they are divided into a group of data to be transmitted.
[0063] Next, set the transmission priorities and transmission requirements corresponding to each group of data to be transmitted. Exemplarily, the transmission priority can be set according to the data type and whether the data is faulty. For example, the priority of real-time data is higher than that of non-real-time data, and the priority of faulty data is higher than that of non-faulty data, etc. Among them, the transmission priority is used to indicate the transmission order of the data, or the reliability guarantee order of the data. For example, if the transmission priority of group A of data to be transmitted is higher than that of group B of data to be transmitted, then group A of data to be transmitted is transmitted first, followed by group B of data to be transmitted, or the transmission of group A of data to be transmitted cannot be interrupted, and the transmission of group B of data to be transmitted is allowed to be interrupted within a preset number of times or a preset time, and so on. Further, in some embodiments, the transmission requirements specifically include a transmission delay interval and a packet loss rate interval, that is, used to indicate the required transmission delay interval and packet loss rate interval of the data to be transmitted during the transmission process.
[0064] Further, according to the transmission priority and transmission requirements, respectively screen multiple standby switches corresponding to multiple groups of data to be transmitted for switching, including: (1) For real-time data, screen idle standby switches that meet the transmission requirements; if there are no idle standby switches, screen idle channels that meet the transmission requirements; (2) For non-real-time data, screen idle channels that meet the transmission requirements.
[0065] Further, even if there is no transmission failure, but if the operating parameters of the main switch do not meet the transmission priorities and transmission requirements of one or more groups of the data to be transmitted, the first transmission strategy is also executed.
[0066] It should be noted that since the transmission methods of images, videos, texts, and signaling are different during the actual transmission process, and for the receiving terminal, the experience of transmission jams and the like is also different, therefore, in the embodiments of the present invention, different switching methods are set according to images, videos, texts, and signaling, respectively, so as to further ensure the user experience of the receiving terminal when a transmission failure occurs.
[0067] Further, for constant data, instruct the receiving terminal to generate the constant data according to its corresponding generation algorithm. If the receiving terminal lacks the generation algorithm, send the generation algorithm to the receiving terminal.
[0068] Further, for real-time video data, instruct the sending terminal to send the corresponding inter-frame recovery algorithm and intra-frame recovery algorithm, and after the sending is successful, instruct the sending terminal to send the inter-frame residual data and intra-frame residual data. After receiving the inter-frame residual data and intra-frame residual data, the receiving terminal restores the video frames according to the corresponding inter-frame recovery algorithm and intra-frame recovery algorithm.
[0069] Compared with the prior art, in the embodiment of the present invention, when a switch fails, it indicates constant data and enables the receiving terminals corresponding to even video data to generate data according to an algorithm, so as to ensure the user experience and reduce the data transmission pressure. Moreover, for non-instant data and other instant data, after being grouped based on transmission requirements and transmission priorities, they are switched to different standby switches, which can maximize the normal transmission of all data and improve the utilization rate of the standby switches.
[0070] As one optional implementation manner, the transmission data type is determined by the following method:
[0071] When the value of the data to be transmitted is constant, the data to be transmitted is identified as constant data;
[0072] When the value of the data to be transmitted is not constant, calculate the average response time of the data to be transmitted;
[0073] When the average response time is greater than a preset response threshold, the data to be transmitted is identified as non-instant data;
[0074] When the average response time is not greater than the preset response threshold, the data to be transmitted is identified as instant data.
[0075] Exemplarily, for non-constant data, the following method is used to determine whether it is instant data or non-instant data: First, determine all the sending terminals and receiving terminals corresponding to it; then, for a group of sending terminals and receiving terminals, obtain the data transmission history between the sending terminal and the receiving terminal within a statistical period (such as 5 minutes), and calculate the average response time of data transmission in the transmission history. Among them, the response time can be the time from when the receiving terminal initiates a transmission request to when the data is transmitted to the receiving terminal for a certain data, and the average response time is determined by the sum of the response times of all data in the data transmission history and the number of data; further, when the average response time is less than or equal to 10 seconds, the data to be transmitted is identified as instant data, and when the average response time is greater than 10 seconds, the data to be transmitted is identified as non-instant data.
[0076] In practical applications, taking an application program as an example, constant data can be the identifier of the device used by the user when logging in to the application program or account information, etc.; non-instant data can be the data transmitted when the response time between the application program and the server is relatively long when the user remains logged in and does not operate or operates very little after logging in to the application program; instant data can be the data transmitted when the response time between the application program and the server is relatively short when the user remains logged in and operates in real time after logging in to the application program.
[0077] As one of the optional implementation manners, in step S2, determining whether the main switch fails based on the operating parameters includes:
[0078] S21. Judging whether the operating parameters are abnormal based on preset operating parameter thresholds;
[0079] S22. When the operating parameters are abnormal, retrieving an exception report from the receiving terminal of the data to be transmitted;
[0080] S23. Inputting the operating parameters into a first fault identification model to obtain a first fault identification result;
[0081] S24. Inputting the exception report into a second fault identification model to obtain a second fault identification result;
[0082] When the first fault identification result is consistent with the second fault identification result, using the first fault identification result or the second fault identification result as the final fault identification result;
[0083] When the first fault identification result is inconsistent with the second fault identification result, selecting the fault identification result with a high prediction probability as the final fault identification result.
[0084] Exemplarily, in step S21, abnormal operating parameters include that the transmission speed is greater than the transmission speed threshold, the number of transmission tasks is greater than the transmission task threshold, the frame loss rate is greater than the frame loss rate threshold, the transmission delay is greater than the transmission delay threshold, and the channel occupancy rate is greater than the channel occupancy rate threshold.
[0085] Further, in step S22, for the receiving terminals corresponding to real-time data and constant data, after they cannot receive the data to be transmitted, they will actively upload an exception report, and the exception report at least includes data loss, transmission error, and abnormal response time.
[0086] As one of the optional implementation manners, in step S22, when the data to be transmitted is non-real-time data, retrieving the exception report from the receiving terminal of the data to be transmitted includes:
[0087] Sending test data to the receiving terminal of the data to be transmitted;
[0088] When the feedback data corresponding to the test data is not received, or when the feedback data corresponding to the test data is received and the feedback data shows that the test data is partially lost or abnormal, generating an exception report.
[0089] Further, in steps S23 and S24, the first fault identification model performs fault identification based on operating parameters, and the second fault identification model performs fault identification based on exception reports. By comprehensively predicting the results of the two fault identification models in the embodiments of the present invention for fault prediction, the accuracy of fault identification can be improved, so that the data transmission path can be switched in a timely manner, further ensuring the normal transmission of data.
[0090] It can be understood that the order of steps S23 and S24 can be swapped, that is, in some embodiments, the second fault identification model can be used to perform fault identification first, and then the first fault identification model can be used for fault identification, or even simultaneously, which is not limited herein.
[0091] Further, the first fault identification model and the second fault identification model can be decision forest models. Before step S23, training of the first fault identification model and the second fault identification model can also be included.
[0092] Exemplarily, for any single main switch fault, obtain the operating parameters within a preset time period as the data set corresponding to this single fault and perform cleaning and processing, and set the fault category corresponding to this main switch fault as the expected output; assume that the first fault identification model contains N decision trees, then the training process includes the following steps: First, randomly extract N groups of data from the data set as N data subsets corresponding one by one to the N decision trees, and the data of any two data subsets are not completely the same; then, use the data subset to train the corresponding decision tree. During the training process, the input of the decision tree is the data subset, and the output is the fault category corresponding to this main switch fault; further, for any decision tree, when the target probability is greater than 51%, stop training; finally, when all decision trees stop training, the training of this single main switch fault is completed. Continue to perform the above operations on other single main switch faults until all main switch faults of all fault categories have completed the above steps, then the construction of the decision forest model (the first fault identification model) corresponding to the operating parameters is completed.
[0093] Further, for any single main switch fault, obtain the exception report within a preset time period as the data set corresponding to this single fault, and set the fault category corresponding to this main switch fault as the expected output; assume that the decision forest corresponding to the exception report contains N decision trees, then, except that the content of the data set is different, the process of constructing the decision forest model (the second fault identification model) corresponding to the exception report is the same as the process of constructing the decision forest model (the first fault identification model) corresponding to the operating parameters.
[0094] Exemplarily, the decision forest model corresponding to the exception report can also be merged with the decision forest model corresponding to the operating parameters to generate a fault identification model.
[0095] Further, in step S23, the operating parameters are input into the decision forest corresponding to the operating parameters in the fault identification model to obtain a first fault identification result; in step S24, the exception report is input into the decision forest corresponding to the exception report in the fault identification model to obtain a second fault identification result.
[0096] When the first fault identification result and the second fault identification result are consistent, the fault type indicated by the first fault identification result or the second fault identification result is used as the final fault identification result;
[0097] When the first fault identification result and the second fault identification result are inconsistent, the fault type indicated by the fault identification result with a higher probability is selected as the final fault identification result.
[0098] Among them, the corresponding methods for the operating parameters and the exception report include, but are not limited to, respectively setting the labels of the operating parameters and the exception report as the main switch fault name for this time, or setting the labels of the operating parameters and the exception report as the main switch fault number for this time.
[0099] As an optional implementation manner, after switching the transmission path of all or part of the data to be transmitted to the standby switch according to the first transmission strategy, it further includes, according to the second transmission strategy, switching the transmission path of part or all of the data to be transmitted from multiple standby switches to the main switch, specifically including:
[0100] For any group of data to be transmitted, when the operating parameters of the main switch meet its transmission priority and transmission requirements, the transmission path of this group of data to be transmitted is switched to the main switch.
[0101] It should be noted that since the transmission requirements and transmission priorities of different types of data are not the same, therefore, during the fault recovery process of the main switch, its operating parameters may only meet the transmission requirements of some of the data to be transmitted. Therefore, in the embodiments of the present invention, the transmission paths of some of the data to be transmitted that have met the transmission requirements and transmission priorities are first switched back to the main switch. Compared with the prior art where the transmission paths are switched back all at once after the fault is completely resolved, the embodiments of the present invention can more timely free up the standby switch and enable it to be put into a new round of applications, realizing the resource optimization of the standby switch.
[0102] Exemplarily, in some embodiments, the second transmission strategy further includes:
[0103] Real-time monitoring of the operating parameters of each standby switch;
[0104] When the operating parameters of the standby switch indicate that the standby switch does not meet the transmission requirements of the data to be transmitted in the corresponding group, switch the transmission path of the data to be transmitted in the corresponding group to the main switch or a new standby switch that meets the transmission requirements.
[0105] It should be noted that in the prior art, when using redundant links for data transmission, only the status of the main switch is monitored, and the operating parameters of the standby switch are not monitored. In the embodiments of the present invention, not only the standby switch is monitored in real time, but also when the parameters of an individual standby switch do not meet the requirements, the transmission path of the corresponding part of the data to be transmitted can be switched back to the main switch first (if the operating parameters of the main switch do not meet the transmission requirements, switch to a new standby switch that meets the transmission requirements). By implementing batch switching when necessary, the reliability of data transmission can be further ensured, thereby ensuring the stability and efficiency of network communication. Among them, the operating parameters of the standby switch can be monitored in real time through an optical bypass protection device.
[0106] As an optional implementation manner, after switching the transmission path of all or part of the data to be transmitted to the standby switch according to the first transmission strategy, it further includes:
[0107] Based on the operating parameters, call an operating status prediction model to predict the operating parameters of the main switch after a first time interval;
[0108] If the operating parameters after the first time interval meet the transmission requirements, switch the transmission path of the data to be transmitted to the main switch after the first time interval.
[0109] Exemplarily, in some embodiments, it further includes predicting the operating parameters of the standby switch after a second time interval;
[0110] If the operating parameters of the standby switch after the second time interval do not meet the transmission requirements of the data to be transmitted, switch the transmission path of the data to be transmitted from the standby switch to the main switch.
[0111] As an optional implementation manner, the operating status prediction model is a seasonal autoregressive integrated moving average model, as shown in the following formula:
[0112]
[0113] Where y t represents the observed value at time t (that is, the value of the operating parameter observed at time t); represents a non-seasonal autoregressive polynomial with an order of p; Φ P (B m ) represents a seasonal autoregressive polynomial with an order of P; θq (B) represents a non-seasonal moving average polynomial of order q; Θ Q (B m ) represents a seasonal moving average polynomial of order Q; represents a non-seasonal differencing operation of degree d; represents a seasonal differencing operation of degree D; ε t represents the white noise term; m represents the seasonal period; μ represents the mean of the operating parameters, where the operating parameters refer to one of the transmission speed, the number of transmission tasks, the frame loss rate, the transmission delay, and the channel occupancy rate, that is, the four operating parameters of the transmission speed, the number of transmission tasks, the frame loss rate, the transmission delay, and the channel occupancy rate are respectively input into this model, and actually there are 4 curves.
[0114] Compared with the prior art, the data transmission method of the switch provided by the embodiment of the present invention inputs the operating parameters of the main switch and the data type of the data to be transmitted; wherein, the data type includes constant data, instant data, and non-instant data; based on the operating parameters, it is determined whether the main switch fails; when the main switch fails, according to the first transmission strategy, the transmission path of all or part of the data to be transmitted is switched to the standby switch; wherein, the first transmission strategy includes: when the data to be transmitted is constant data, a first data generation instruction is sent to the corresponding receiving terminal to instruct the receiving terminal to generate the data to be transmitted based on the data generation algorithm; when the data to be transmitted is instant video data, a second data generation instruction is sent to the corresponding sending terminal to instruct the sending terminal to send the inter-frame recovery algorithm and the intra-frame recovery algorithm, as well as the inter-frame residual data and the intra-frame residual data to the corresponding receiving terminal; when the data to be transmitted is not constant data or instant video data, based on the data type and the data form, the data to be transmitted is grouped and the transmission requirements and transmission priorities are determined, and based on the transmission requirements and the transmission priorities, the transmission paths of the groups of data to be transmitted are switched to several standby switches whose operating parameters meet the requirements. In the embodiment of the present invention, when the switch fails, by instructing the receiving terminals corresponding to the constant data and the instant video data to generate data according to the algorithm, the user experience can be guaranteed and the data transmission pressure can be reduced. Moreover, for non-instant data and other instant data, after grouping based on the transmission requirements and transmission priorities, they are switched to different standby switches, so that while ensuring the normal transmission of all data to the greatest extent, the utilization rate of the standby switches can be improved.
[0115] See Figure 3 , the embodiment of the present invention also provides a data transmission device 10 for a switch, including:
[0116] A parameter acquisition module 11 for inputting the operating parameters of the main switch and the data types of the data to be transmitted; wherein, the data types include constant data, real-time data, and non-real-time data;
[0117] A fault judgment module 12 for judging whether the main switch has a fault based on the operating parameters;
[0118] A transmission path switching module 13 for switching the transmission path of all or part of the data to be transmitted to a standby switch according to a first transmission strategy when the main switch has a fault; wherein, the first transmission strategy includes:
[0119] When the data to be transmitted is constant data, send a first data generation instruction to the corresponding receiving terminal to instruct the receiving terminal to generate the data to be transmitted based on a data generation algorithm;
[0120] When the data to be transmitted is real-time video data, send a second data generation instruction to the corresponding sending terminal to instruct the sending terminal to send an inter-frame recovery algorithm and an intra-frame recovery algorithm, as well as inter-frame residual data and intra-frame residual data to the corresponding receiving terminal;
[0121] When the data to be transmitted is not constant data or real-time video data, group the data to be transmitted based on the data type and data form, determine the transmission requirements and transmission priorities, and switch the transmission paths of each group of data to be transmitted to several standby switches whose operating parameters meet the requirements based on the transmission requirements and the transmission priorities.
[0122] The data transmission device of the switch provided by the embodiment of the present invention can implement all the process steps of the data transmission method of the switch described in the above embodiment. The functions and achieved technical effects of each module and unit in the device respectively correspond to the functions and achieved technical effects of the data transmission method of the switch described in the above embodiment, and the specific implementation manners will not be elaborated herein.
[0123] See Figure 4 , the embodiment of the present invention also provides a data transmission device 20 of a switch, including a processor 21, a memory 22, and a computer program stored in the memory 22 and configured to be executed by the processor 21. When the processor 21 executes the computer program, the steps in the embodiment of the data transmission method of the switch as described above are implemented, such as Figure 1 The steps S1 to S3 described therein; or, when the processor 21 executes the computer program, the functions of each module in the above device embodiments are implemented.
[0124] The data transmission device of the switch can be computing devices such as desktop computers, laptops, palmtop computers, and cloud servers. The data transmission device of the switch may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the schematic diagram is only an example of the data transmission device of the switch, and does not constitute a limitation on the data transmission device of the switch. It may include more or fewer components than those shown in the figure, or combine certain components, or different components. For example, the data transmission device of the switch may also include input / output devices, network access devices, buses, etc.
[0125] The processor can be a Central Processing Unit (CPU), or can also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The processor is the control center of the data transmission device of the switch, and connects various parts of the entire data transmission device of the switch through various interfaces and lines.
[0126] The memory can be used to store the computer programs and / or modules. The processor realizes various functions of the data transmission device of the switch by running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc.; the data storage area can store data created according to the use of the controller, etc. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as hard disks, memory, plug-in hard disks, Smart Media Cards (SMCs), Secure Digital (SD) cards, Flash Cards, at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
[0127] Among them, if the modules integrated in the data transmission device of the switch are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0128] Compared with the prior art, the data transmission device, equipment and storage medium of the switch provided by the embodiments of the present invention input the operating parameters of the main switch and the data type of the data to be transmitted; among them, the data type includes constant data, instant data and non-instant data; based on the operating parameters, it is judged whether the main switch fails; when the main switch fails, according to the first transmission strategy, the transmission path of all or part of the data to be transmitted is switched to the standby switch; among them, the first transmission strategy includes: when the data to be transmitted is constant data, a first data generation instruction is sent to the corresponding receiving terminal to instruct the receiving terminal to generate the data to be transmitted based on the data generation algorithm; when the data to be transmitted is instant video data, a second data generation instruction is sent to the corresponding sending terminal to instruct the sending terminal to send the inter-frame recovery algorithm and intra-frame recovery algorithm, as well as inter-frame residual data and intra-frame residual data to the corresponding receiving terminal; when the data to be transmitted is not constant data or instant video data, based on the data type and data form, the data to be transmitted is grouped and the transmission requirements and transmission priorities are determined, and based on the transmission requirements and the transmission priorities, the transmission paths of each group of data to be transmitted are switched to several standby switches whose operating parameters meet the requirements. In the embodiments of the present invention, when the switch fails, by instructing the receiving terminals corresponding to the constant data and instant video data to generate data according to the algorithm, the user experience can be guaranteed and the data transmission pressure can be reduced. Moreover, for non-instant data and other instant data, after grouping based on the transmission requirements and transmission priorities, they are switched to different standby switches, so that while ensuring the normal transmission of all data to the greatest extent, the utilization rate of the standby switches can be improved.
[0129] The above are the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present invention.
Claims
1. A data transmission method for a switch, characterized in that, Including: Input the operating parameters of the main switch and the data types of the data to be transmitted; wherein, the data types include constant data, real-time data, and non-real-time data; Based on the operating parameters, determine whether the main switch fails; When the main switch fails, switch the transmission path of all or part of the data to be transmitted to the standby switch according to the first transmission strategy; wherein, the first transmission strategy includes: When the data to be transmitted is constant data, send a first data generation instruction to the corresponding receiving terminal to instruct the receiving terminal to generate the data to be transmitted based on the data generation algorithm; When the data to be transmitted is real-time video data, send a second data generation instruction to the corresponding sending terminal to instruct the sending terminal to send the inter-frame recovery algorithm and the intra-frame recovery algorithm, as well as the inter-frame residual data and the intra-frame residual data to the corresponding receiving terminal; When the data to be transmitted is not constant data or real-time video data, group the data to be transmitted based on the data type and data form, determine the transmission requirements and transmission priorities, and switch the transmission paths of each group of data to be transmitted to several standby switches whose operating parameters meet the requirements based on the transmission requirements and the transmission priorities.
2. The data transmission method of the switch according to claim 1, characterized in that, The determining whether the main switch fails based on the operating parameters includes: Based on a preset operating parameter threshold, determine whether the operating parameters are abnormal; When the operating parameters are abnormal, retrieve an exception report from the receiving terminal of the data to be transmitted; Input the operating parameters into the first fault identification model to obtain a first fault identification result; Input the exception report into the second fault identification model to obtain a second fault identification result; When the first fault identification result and the second fault identification result are consistent, use the first fault identification result or the second fault identification result as the final fault identification result; When the first fault identification result and the second fault identification result are inconsistent, select the fault identification result with a high prediction probability as the final fault identification result.
3. The data transmission method of the switch according to claim 2, wherein When the data to be transmitted is non-real-time data, the retrieving an exception report from the receiving terminal of the data to be transmitted includes: Send test data to the receiving terminal of the data to be transmitted; When the feedback data corresponding to the test data is not received, or when the feedback data corresponding to the test data is received and the feedback data indicates that the test data is partially lost or abnormal, generate an exception report.
4. The data transmission method of the switch according to claim 1, characterized in that, The transmission data type is determined by the following method: When the value of the data to be transmitted is constant, identify the data to be transmitted as constant data; When the value of the data to be transmitted is not constant, calculate the average response time of the data to be transmitted; When the average response time is greater than the preset response threshold, identify the data to be transmitted as non-real-time data; When the average response time is not greater than the preset response threshold, identify the data to be transmitted as real-time data.
5. The data transmission method of the switch according to claim 1, characterized in that, After switching the transmission path of all or part of the data to be transmitted to the standby switch according to the first transmission strategy, it further includes, according to the second transmission strategy, switching the transmission path of part or all of the data to be transmitted from multiple standby switches to the main switch, specifically including: For any group of data to be transmitted, when the operating parameters of the main switch meet its transmission priority and transmission requirements, switch the transmission path of this group of data to be transmitted to the main switch.
6. The data transmission method of the switch according to claim 1, wherein After switching the transmission path of all or part of the data to be transmitted to the standby switch according to the first transmission strategy, it further includes: Based on the operating parameters, call the operating state prediction model to predict the operating parameters of the main switch after the first time interval; If the operating parameters after the first time interval meet the transmission requirements, switch the transmission path of the data to be transmitted to the main switch after the first time interval.
7. The data transmission method of the switch according to claim 6, characterized in that, The operating state prediction model is a seasonal autoregressive integrated moving average model, as shown in the following formula: Among them, y t represents the observed value of time t; represents a non-seasonal autoregressive polynomial of order p; Φ P (B m ) represents a seasonal autoregressive polynomial of order P; θ q (B) represents a non-seasonal moving average polynomial of order q; Θ Q (B m ) represents a seasonal moving average polynomial of order Q; represents a non-seasonal differencing operation of degree d; represents a seasonal differencing operation of degree D; ε t represents the white noise term; m represents the seasonal period; μ represents the mean of the operating parameters.
8. A data transmission device of a switch, characterized in that It includes: A parameter acquisition module for inputting the operating parameters of the main switch and the data type of the data to be transmitted; wherein, the data type includes constant data, instant data, and non-instant data; A fault judgment module for judging whether the main switch has a fault based on the operating parameters; A transmission path switching module for, when the main switch has a fault, switching the transmission path of all or part of the data to be transmitted to the standby switch according to the first transmission strategy; wherein, the first transmission strategy includes: When the data to be transmitted is constant data, send a first data generation instruction to the corresponding receiving terminal to instruct the receiving terminal to generate the data to be transmitted based on the data generation algorithm; When the data to be transmitted is instant video data, send a second data generation instruction to the corresponding sending terminal to instruct the sending terminal to send the inter-frame recovery algorithm and the intra-frame recovery algorithm, as well as the inter-frame residual data and the intra-frame residual data to the corresponding receiving terminal; When the data to be transmitted is not constant data or instant video data, group the data to be transmitted based on the data type and data form and determine the transmission requirements and transmission priorities, and based on the transmission requirements and the transmission priorities, switch the transmission paths of each group of data to be transmitted to several standby switches whose operating parameters meet the requirements.
9. A data transmission device for a switch, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the data transmission method of the switch according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the data transmission method of the switch according to any one of claims 1 to 7.