Error code detection method and device of data transmission link and electronic equipment

By setting multiple error counting cycles and thresholds in the data transmission link and adjusting the counting basis according to scenario requirements, the problem of insufficient applicability of error detection is solved, realizing the flexibility and accuracy of error detection and improving the user experience.

CN119945943BActive Publication Date: 2025-11-07INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510109797.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-11-07
Estimated Expiration
2045-01-23

AI Technical Summary

Technical Problem

Existing technologies have poor applicability for error detection in data transmission links. Improperly set error thresholds can lead to the error count of long-running equipment gradually exceeding the threshold, triggering unnecessary link disconnections or failing to detect rapid increases in error rates in a short period of time.

Method used

Multiple error counting cycles and error counting thresholds can be set according to different operating scenarios. Error detection results are generated by calculating the error counting difference and threshold. The error counting basis can be flexibly adjusted to adapt to different scenario requirements, including setting different counting cycles and thresholds for uplink and downlink ports.

Benefits of technology

It improves the applicability of bit error detection, enables timely response to rapid increases in bit errors in a short period, avoids unnecessary link disconnections, enhances user experience, and ensures the accuracy and flexibility of bit error detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945943B_ABST
    Figure CN119945943B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data centers, in particular to a method and device for error code detection of a data transmission link and electronic equipment, wherein the method comprises the following steps: determining a plurality of running scenes of the data transmission link; setting a plurality of error code counting periods and corresponding error code counting thresholds according to the plurality of running scenes; obtaining error code counts of the data transmission link in the error code counting periods; and determining error code detection results of the data transmission link in the plurality of running scenes based on the error code counts corresponding to the plurality of error code counting periods and the error code counting thresholds. Thus, the problems, such as poor applicability of error code detection of the data transmission link in the related art, are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data centers, in particular to a method and device for detecting error codes of a data transmission link and an electronic device. BACKGROUND

[0002] A data transmission link is a physical path for transmitting data in a data communication system and is a medium for transmitting data from a sending end to a receiving end. In actual use, errors may occur when the data transmission link transmits data, thereby generating error codes. In the related art, when the error codes of the data transmission link reach an error code threshold, the data transmission link is actively disconnected for fault isolation.

[0003] However, for devices connected by the data transmission link, especially for devices that need to run for a long time, if the error code threshold is too low, the cumulative error code count may gradually exceed the error code count threshold, triggering unnecessary link disconnection; conversely, if the error code count threshold is too high, the situation of rapid growth of error codes in a short period of time may not be discovered and responded to in time, resulting in ineffective fault isolation. SUMMARY

[0004] The present application provides a method and device for detecting error codes of a data transmission link and an electronic device to solve the technical problem of poor applicability of error code detection of the data transmission link in the related art.

[0005] The first aspect of the present application provides a method for detecting error codes of a data transmission link, comprising the following steps: determining a plurality of running scenarios of the data transmission link; setting a plurality of error code count periods and corresponding error code count thresholds according to the plurality of running scenarios; obtaining error code counts of the data transmission link within the error code count periods, and determining error code detection results of the data transmission link in the plurality of running scenarios based on the error code counts corresponding to the plurality of error code count periods and the error code count thresholds.

[0006] Optionally, the data transmission link includes an uplink and a downlink, and further comprises: setting a plurality of error code count periods for the uplink and the downlink, respectively.

[0007] Optionally, determining the error code detection results of the data transmission link in the plurality of running scenarios based on the error code counts corresponding to the plurality of error code count periods and the error code count thresholds comprises: calculating a count difference value between a current error code count and a previous error code count within the error code count periods corresponding to the plurality of running scenarios, and generating an error code detection result according to the count difference value and the error code count threshold.

[0008] Optionally, generating the error code detection result according to the count difference value and the error code count threshold comprises: accumulating the count difference value within the error code count period; and generating the error code detection result according to the accumulated value of the count difference value and the error code count threshold.

[0009] Optionally, the error code detection result is generated according to the accumulated value of the count difference value and the error code count threshold value, including: if the accumulated value of the count difference value is greater than the error code count threshold value, determining that the error code detection result is that the data transmission link has a fault; and if the accumulated value of the count difference value is less than or equal to the error code count threshold value, determining that the error code detection result is that the data transmission link has no fault.

[0010] Optionally, after determining that the error code detection result is that the data transmission link has no fault, the method further includes: determining an error code count basis of a next error code count period according to the accumulated value of the count difference value, and entering the next error code count period of the data transmission link.

[0011] Optionally, the error code count basis of the next error code count period is determined according to the accumulated value of the count difference value, including: judging whether the accumulated value of the count difference value is greater than an error code count threshold value of a current error code count period; if the accumulated value of the count difference value is greater than the error code count threshold value of the current error code count period, generating an alarm event of the data transmission link and disconnecting the data transmission link; and if the accumulated value of the count difference value is less than or equal to the error code count threshold value of the current error code count period, determining a preset value of the current error code count period according to the error code count threshold value, wherein the preset value is less than the error code count threshold value; when the accumulated value of the count difference value is greater than the preset value of the current error code count period, taking the preset value of the current error code count period as the error code count basis of the next error code count period; and when the accumulated value of the count difference value is less than or equal to the preset value of the current error code count period, taking the accumulated value of the count difference value as the error code count basis of the next error code count period.

[0012] Optionally, the method further includes: setting an error code interference threshold value according to the error code count threshold value; and if the count difference value is greater than the interference threshold value, taking the interference threshold value as the count difference value.

[0013] The second aspect embodiment of the present application provides a data transmission link error code detection device, including: a first determination module configured to determine a plurality of running scenarios of a data transmission link; a setting module configured to set a plurality of error code count periods and corresponding error code count threshold values according to the plurality of running scenarios; and a second determination module configured to acquire error code counts of the data transmission link in the error code count periods, and determine error code detection results of the data transmission link in the plurality of running scenarios based on the error code counts corresponding to the plurality of error code count periods and the error code count threshold values.

[0014] Optionally, the data transmission link includes an uplink and a downlink, and the device further includes a first setting module configured to set a plurality of error code count periods for the uplink and the downlink respectively.

[0015] Optionally, the second determining module is further configured to: calculate a count difference between the current error code count and the last error code count in the error code count period corresponding to the plurality of running scenarios, and generate the error code detection result according to the count difference and the error code count threshold.

[0016] Optionally, the second determining module is further configured to: accumulate the count difference in the error code count period; and generate the error code detection result according to an accumulated value of the count difference and the error code count threshold.

[0017] Optionally, the second determining module is further configured to: if the accumulated value of the count difference is greater than the error code count threshold, determine that the error code detection result is that the data transmission link has a fault; and if the accumulated value of the count difference is less than or equal to the error code count threshold, determine that the error code detection result is that the data transmission link has no fault.

[0018] Optionally, the method further includes: a third determining module configured to, after determining that the error code detection result is that the data transmission link has no fault, determine an error code count basis of a next error code count period according to the accumulated value of the count difference, and enter the next error code count period of the data transmission link.

[0019] Optionally, the third determining module is further configured to: determine whether the accumulated value of the count difference is greater than an error code count threshold of a current error code count period; if the accumulated value of the count difference is greater than the error code count threshold of the current error code count period, generate an alarm event of the data transmission link and disconnect the data transmission link; and if the accumulated value of the count difference is less than or equal to the error code count threshold of the current error code count period, determine a preset value of the current error code count period according to the error code count threshold, wherein the preset value is less than the error code count threshold; when the accumulated value of the count difference is greater than a preset value of the current error code count period, take the preset value of the current error code count period as the error code count basis of the next error code count period; and when the accumulated value of the count difference is less than or equal to the preset value of the current error code count period, take the accumulated value of the count difference as the error code count basis of the next error code count period.

[0020] Optionally, the method further includes: a judging module configured to set an error code interference threshold according to the error code count threshold; and if the count difference is greater than the interference threshold, take the interference threshold as the count difference.

[0021] A third aspect of embodiments of the present application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor executes the program to implement the error code detection method of the data transmission link according to the above embodiments.

[0022] The fourth aspect of the present application provides a computer readable storage medium, which stores a computer program or instructions, and the computer program or instructions are executed by a processor to implement the error code detection method of the data transmission link according to the above-mentioned embodiments.

[0023] The fifth aspect of the present application provides a computer program product, which includes a computer program or instructions, and the computer program or instructions are executed to implement the error code detection method of the data transmission link according to the above-mentioned embodiments.

[0024] Therefore, the present application includes the following beneficial effects:

[0025] The embodiments of the present application can set corresponding error code counting periods for different running scenarios, set a plurality of error code counting thresholds corresponding to a plurality of error code counting periods, and implement error code detection in different running scenarios through the plurality of error code counting thresholds. For example, through the error code counting threshold in the short-period running scenario, the situation of rapid growth of error codes in a short period is found and responded in time. For another example, through the error code counting threshold in the long-period running scenario, unnecessary disconnection of the data transmission link is avoided, so that the corresponding error code counting threshold can be used for different running scenarios to avoid the inapplicable problem caused by sharing the error code counting threshold. While ensuring the accuracy of error code detection, the applicability of error code detection of the data transmission link can be effectively improved, different error code detection requirements in different running scenarios are effectively taken into account, and the user's use experience is improved. Therefore, the technical problems such as poor applicability of error code detection of the data transmission link in the related art are solved.

[0026] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS

[0027] The above-mentioned and / or additional aspects and advantages of the present application will become apparent and easy to understand from the following description of the embodiments taken with the following drawings, in which:

[0028] Figure 1 A flowchart of the error code detection method of the data transmission link according to the embodiments of the present application is provided.

[0029] Figure 2 A flowchart of the error code detection method of the SAS (Serial Attached SCSI, Serial Attached SCSI) link according to the embodiments of the present application is provided.

[0030] Figure 3 An example diagram of the error code detection device of the data transmission link according to the embodiments of the present application is provided.

[0031] Figure 4 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0032] Embodiments of the present application are described in detail below with reference to examples shown in the attached drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the drawings are exemplary and are intended to explain the present application, and cannot be understood as a limitation of the present application.

[0033] Specifically, Figure 1 A flowchart of a method for error code detection of a data transmission link provided by an embodiment of the present application is shown.

[0034] As Figure 1 shown, the method for error code detection of the data transmission link includes the following steps:

[0035] In step S101, multiple running scenarios of the data transmission link are determined.

[0036] It can be understood that the running scenarios can include multiple types, such as a short-period running scenario and a long-period running scenario. In the short-period running scenario, there can be a rapid growth of error codes. In the long-period running scenario, the device needs to run for a long time. Those skilled in the art can set the running scenarios according to actual conditions. For example, a long-period running scenario can be set between the short-period running scenario and the long-period running scenario to enrich the running scenarios and increase the personalized needs of error code detection of the data transmission link.

[0037] In some embodiments, the types of the data transmission link can include many types, such as a wired transmission link and a wireless transmission link. The wired transmission link can be, for example, a twisted pair, a coaxial cable, an optical fiber, etc. The wireless transmission link can be, for example, Bluetooth, infrared, radio waves, etc. Taking SAS as an example, SAS can be used for data transmission between an upper-layer device and a lower-layer device. The upper-layer device can be, for example, a CPU or a host, etc. The lower-layer device can be, for example, a storage device, etc.

[0038] In some embodiments, the data transmission link can include an uplink port and a downlink port. The uplink port is connected to a port of the upper-layer device and is used to transmit data from the lower-layer device to a processing unit of the upper-layer device. The downlink port is connected to a port of the lower-layer device and is used to deliver data from the upper-layer device to the lower-layer device.

[0039] Therefore, the execution subject of the method in the embodiment of the present application is an electronic device. The electronic device can be the upper-layer device and the lower-layer device described above, or other devices that can run the program corresponding to the method, such as deploying the program of the method in the embodiment of the present application on the corresponding device. The program can be deployed on the upper-layer device or the lower-layer device alone, or can be deployed on the upper-layer device and the lower-layer device simultaneously, so as to implement the error code detection of the data transmission link.

[0040] In step S102, a plurality of error code counting periods and corresponding error code counting thresholds are set according to a plurality of running scenarios.

[0041] It should be noted that the error code counting periods required by different running scenarios are different. For example, in a short-period running scenario, there can be a situation of rapid growth of error codes. In order to monitor the situation of rapid growth of error codes, a shorter error code counting period, such as 1 minute, 2 minutes or 3 minutes, etc., is set in the embodiment of the present application to achieve rapid error code detection. For another example, in a long-period running scenario, the device needs to run for a long time. If a shorter error code counting period is set, the interruption of the data transmission link is easily triggered, which affects the normal operation of the device and does not meet the use requirements of the user. Therefore, a longer error code counting period, such as 12 hours, 13 hours or 14 hours, etc., is set in the embodiment of the present application to ensure the stable operation of the device while monitoring the error codes.

[0042] It is just because that the error code counting periods required by different running scenarios are different, the error code counting thresholds required by different running scenarios are also different. The embodiment of the present application sets different error code counting thresholds for different running scenarios. The error code counting threshold of the short-period running scenario can be set to 10 times, 11 times or 12 times, etc. A smaller error code counting threshold is set to timely discover and respond to the situation of rapid growth of error codes in a short period. The error code counting threshold of the long-period running scenario can be set to 30 times, 31 times or 32 times, etc. A larger error code counting threshold is set to avoid unnecessary disconnection of the data transmission link.

[0043] Therefore, the embodiment of the present application adopts different error code counting thresholds in different running scenarios to avoid the inapplicable problem caused by sharing the error code counting threshold. While ensuring the accuracy of error code detection, the applicability of error code detection of the data transmission link can be effectively improved. The different error code detection requirements in different running scenarios are effectively taken into account, and the use experience of the user is improved.

[0044] For ease of description, in the following embodiments, the error code counting period in the short-period running scenario is a short error code counting period, and the error code counting period in the long-period running scenario is a long error code counting period.

[0045] In some embodiments, the embodiments of the present application not only set multiple error code counting periods based on multiple running scenarios, but also set multiple error code counting periods based on uplink and downlink.

[0046] It can be understood that, since the uplink and the downlink are in actual operation, the uplink carries data streams converged from multiple lower-layer devices, and the data transmission amount is larger and more complex, and the downlink is responsible for distributing data to specific lower-layer devices, and the data transmission amount is relatively stable, so the error code detection requirements of the uplink and the downlink are different, and the embodiments of the present application can set different error code counting periods for different data transmission amounts of the uplink and the downlink, effectively meet the actual error code detection requirements, and improve the applicability of error code detection.

[0047] For example, a short error code counting period and a long error code counting period are set for the uplink and the downlink, respectively, for example, the short error code counting period of the uplink is set to 1 minute, the long error code counting period is set to 12 hours, the short error code counting period of the downlink is set to 2 minutes, and the long error code counting period is set to 6 hours.

[0048] In step S103, the error code count of the data transmission link is obtained within the error code counting period, and based on the error code counts corresponding to the multiple error code counting periods and the error code count thresholds, the error code detection results of the data transmission link in multiple running scenarios are determined.

[0049] The error code detection results in multiple running scenarios include detection results in a long-period running scenario and detection results in a short-period running scenario.

[0050] It can be understood that, the embodiments of the present application can obtain the error code count of the data transmission link within the error code counting period, and based on the error code counts corresponding to the multiple error code counting periods and the error code count thresholds, the error code detection results of the data transmission link in multiple running scenarios are determined, which comprehensively considers the error code characteristics, user's use requirements and other aspects, sets different error code counting periods and error code count thresholds for different running scenarios, avoids the inapplicable problem caused by sharing the error code count threshold, ensures the accuracy of error code detection, effectively improves the applicability of error code detection of the data transmission link, effectively takes into account different error code detection requirements in different running scenarios, and improves the user's use experience.

[0051] In the embodiments of the present application, based on the error code counts corresponding to the multiple error code counting periods and the error code count thresholds, the error code detection results of the data transmission link in multiple running scenarios are determined, including: within the error code counting period corresponding to the multiple running scenarios, calculating the counting difference value between the current error code count and the last error code count, and generating the error code detection result according to the counting difference value and the error code count threshold.

[0052] It can be understood that the application can calculate the count difference between the current error code count and the last error code count in the error code count period corresponding to multiple running scenarios, and then generate an error code detection result according to the count difference and the error code threshold. The error code detection result is obtained by comparing the pre-set error code count threshold with the calculated count difference, thereby improving the accuracy of the error code detection result.

[0053] Specifically, the embodiment of the application can read the error code counts of the uplink and downlink in different error code count periods at a preset interval (such as 10 seconds), and generate an error code detection result according to the count difference between the current error code count and the last error code count, and the error code count threshold.

[0054] In the embodiment of the application, generating the error code detection result according to the count difference and the error code count threshold includes: accumulating the count difference in the error code count period; and generating the error code detection result according to the accumulated value of the count difference and the error code count threshold.

[0055] It can be understood that the embodiment of the application can accumulate the count difference in the error code count period, and generate the error code detection result according to the accumulated value of the count difference and the error code count threshold.

[0056] In the embodiment of the application, generating the error code detection result according to the accumulated value of the count difference and the error code count threshold includes: if the accumulated value of the count difference is greater than the error code count threshold, determining that the error code detection result is that the data transmission link has a fault; and if the accumulated value of the count difference is less than or equal to the error code count threshold, determining that the error code detection result is that the data transmission link has no fault.

[0057] The error code count threshold is a count threshold set in advance according to specific conditions, which is not specifically limited, such as 5 times or 6 times for the error code count threshold of the uplink error code count period, and 25 times or 30 times for the error code count threshold of the long error code count period.

[0058] It can be understood that the embodiment of the application determines that the error code detection result is that the data transmission link has a fault when the accumulated value of the count difference is greater than the error code count threshold, and otherwise determines that the error code detection result is that the data transmission link has no fault. By comparing the accumulated error code count difference in different error code count periods with the error code count threshold, it is more accurate to determine whether the data transmission link has a fault, thereby avoiding frequent reading and processing of unnecessary error code information.

[0059] It should be noted that the embodiment of the application reports an alarm event of too many error codes of the data transmission link after determining that the error code detection result is that the data transmission link has a fault, and disconnects the data transmission link.

[0060] In the embodiment of the present application, after determining that the error code detection result is that the data transmission link does not have a fault, the method further comprises: determining an error code counting basis of a next error code counting period according to the accumulated value of the counting difference value, and entering the next error code counting period of the data transmission link.

[0061] It can be understood that the embodiment of the present application can determine the error code counting basis of the next error code counting period according to the accumulated value of the counting difference value, and enter an error code counting period of the data transmission link, and dynamically adjust the error code counting basis of the next error code counting period through the accumulated value of the counting difference value, so as to flexibly adapt to the change of the error code, thereby improving the accuracy of error code detection.

[0062] In the embodiment of the present application, determining the error code counting basis of the next error code counting period according to the accumulated value of the counting difference value comprises: determining whether the accumulated value of the counting difference value is greater than an error code counting threshold value of the current error code counting period; if the accumulated value of the counting difference value is greater than the error code counting threshold value of the current error code counting period, generating an alarm event of the data transmission link and disconnecting the data transmission link; and if the accumulated value of the counting difference value is less than or equal to the error code counting threshold value of the current error code counting period, determining a preset value of the current error code counting period according to the error code counting threshold value, wherein the preset value is less than the error code counting threshold value; when the accumulated value of the counting difference value is greater than the preset value of the current error code counting period, taking the preset value of the current error code counting period as the error code counting basis of the next error code counting period; and when the accumulated value of the counting difference value is less than or equal to the preset value of the current error code counting period, taking the accumulated value of the counting difference value as the error code counting basis of the next error code counting period.

[0063] The preset value can be determined according to the error code counting threshold value, for example, can be half, one fourth, etc. of the error code counting threshold value, and the preset value is less than the error code counting threshold value.

[0064] It can be understood that the embodiment of the present application can determine whether the accumulated value of the counting difference value is greater than the error code counting threshold value of the current error code counting period, if the accumulated value of the counting difference value is greater than the error code counting threshold value of the current error code counting period, generate an alarm event of the data transmission link and disconnect the data transmission link, otherwise determine a preset value of the current error code counting period according to the error code counting threshold value, that is, the preset value can be determined according to the error code counting threshold value, for example, can be half, one fourth, etc. of the error code counting threshold value, and the preset value is less than the error code counting threshold value, and when the accumulated value of the counting difference value is greater than the preset value of the current error code counting period, take the preset value of the current error code counting period as the error code counting basis of the next error code counting period, and when the accumulated value of the counting difference value is less than or equal to the preset value of the current error code counting period, take the accumulated value of the counting difference value as the error code counting basis of the next error code counting period.

[0065] For example, in a SAS link environment, the error count threshold of a short error count period is 10 times, if the accumulated value of the count difference is 15 times, which is greater than 10 times, an alarm event of the SAS link is generated, and the data transmission link is disconnected; if the accumulated value of the current count difference is 6 times, which is less than 10 times, and the preset value is half of the error count threshold, for example, the preset value is 5 times, the accumulated value of the current count difference is 6 times, which is greater than 5 times, 5 times of the next error count period is set as the error count basis; if the accumulated value of the current count difference is 3 times, 3 times is set as the error count basis of the next error count period.

[0066] This way of reducing the next count processing not only considers the error history in the previous error count period, but also gives a certain buffer space, which can more flexibly adjust the monitoring strategy without affecting normal operation, which helps to avoid triggering the alarm too early because of long-term accumulation of small errors, and also ensures sufficient response ability to sudden increase of errors.

[0067] In the embodiments of the present application, the error interference threshold is set according to the error count threshold; and if the count difference is greater than the interference threshold, the interference threshold is used as the count difference.

[0068] The error interference threshold is determined according to the set error count threshold, and the interference threshold is usually set to a part of the error count threshold of the short error count period, for example, half of the error count threshold of the short error count period, in order to distinguish between occasional errors in normal operation and significant error growth possibly caused by external factors.

[0069] It can be understood that when the count difference is greater than the interference threshold, it indicates that the error increase this time may be caused by external interference or other reasons, such as a scenario of human external interference leading to a sharp increase in error count within 10 seconds, so the count error is not directly used for accumulation, but the interference threshold is used as the count difference for subsequent accumulation. By setting the error interference threshold and adjusting when the count difference exceeds the interference threshold, accidental error events can be filtered out without affecting normal operation, ensuring timely and accurate response to real error problems, and improving the accuracy of subsequent error detection results.

[0070] For example, in a short error count period, the error count threshold is 10 times, so the interference threshold can be set to 5 times, if the calculation difference is 7, 7 is directly used as the count difference for accumulation, if the calculation difference is 12, the interference threshold 5 is used as the count difference for accumulation, and the actual 12 is not used.

[0071] In some embodiments, setting the error code interference threshold according to the error code count threshold comprises: identifying an error code count period in which error code interference exists, obtaining a corresponding relationship table of the error code count period in which error code interference exists, the corresponding relationship table being a corresponding relationship between the error code count threshold and the error code interference threshold, and determining the error code interference threshold of the error code count period based on the corresponding relationship table.

[0072] It can be understood that the embodiments of the present application can determine the error code count period in which error code interference exists in advance, such as the error code count period of a short period running scene, which is prone to the scene of a sharp increase in error code count caused by external interference in a short period. Therefore, the embodiments of the present application calibrate the corresponding relationship table in advance. Since the error code count threshold can be specifically set, the error code interference threshold can be accurately determined through the corresponding relationship table, so as to improve the anti-interference capability.

[0073] The error code detection method of the data transmission link of the embodiments of the present application will be described below through a specific embodiment. Taking the SAS link as an example, the overall flow of the error code detection method of the SAS link is as shown in Figure 2 , which comprises:

[0074] 1. A plurality of error code periods are set for the uplink and downlink in the SAS link, for example, 2, 3, etc. Two error code count periods are taken as an example in the present embodiment, i.e. a long error code count period and a short error code count period, and corresponding error code count thresholds. For example, the long error code count period of the uplink is 12 hours, and the error code threshold is 30. The short error code count period is 1 minute, and the error code threshold is 10. The long error code count period of the downlink is 6 hours, and the error code threshold is 30. The short error code count period is 2 minutes, and the error code threshold is 20.

[0075] 2. A timer is started, and the program is set to obtain error code count from the SAS expander every preset time interval, for example, every 10 seconds.

[0076] 3. The SAS link error code calculation algorithm, i.e. the error code detection method of the embodiments of the present application, is set. The long error code count period (long tick) and the short error code count period (short tick) can both use this error code calculation algorithm, which is as follows:

[0077] The initial error code count is based on the first reading of the SAS expander error code count by the program running. Every 10 seconds, the current error code count (newcount) is read from the SAS expander. If the current error code count is greater than the last error code count (lastcount), and the count difference (diff) between newcount and lastcount is greater than half of the short period error code count threshold, it is considered that the error code count has increased by half of the short period error code count threshold (in order to exclude the scenario of rapid increase of error code count within 10 seconds caused by human external interference). The diff value is accumulated within the error code count period. When the accumulated diff value is greater than the error code count threshold of the count period, an alarm event of excessive error code of the SAS link is reported, and the corresponding SAS link is disconnected, i.e., the port corresponding to the SAS link is closed, and the error code of the port is no longer monitored. After the port is closed, data transmission is no longer possible, and the error code will no longer increase. If the accumulated diff value within the count period is not greater than the error code count threshold of the count period, the accumulated diff value is halved as the error code count basis to start a new count period of error code accumulation and fault judgment.

[0078] 4. Deploy the program to the storage device, and run the SAS link error code detection algorithm.

[0079] According to the error code detection method of the data transmission link provided in the embodiments of the present application, corresponding error code count periods can be set for different running scenarios, and multiple error code count thresholds are set corresponding to the multiple error code count periods, so that error code detection in different running scenarios is realized through the multiple error code count thresholds. For example, through the error code count threshold in the short period running scenario, a situation of rapid increase of error code within a short period can be discovered and responded in time. For another example, through the error code count threshold in the long period running scenario, unnecessary disconnection of the data transmission link can be avoided, so that corresponding error code count thresholds can be used for different running scenarios to avoid the inapplicability problem caused by sharing of the error code count threshold. While ensuring the accuracy of error code detection, the applicability of error code detection of the data transmission link can be effectively improved, and different error code detection requirements in different running scenarios can be effectively taken into account, thereby improving the user experience.

[0080] Secondly, the error code detection device of the data transmission link according to the embodiments of the present application is described with reference to the accompanying drawings.

[0081] Figure 3 is a block schematic diagram of the error code detection device of the data transmission link according to the embodiments of the present application.

[0082] As shown in Figure 3 , the error code detection device 10 of the data transmission link includes a first determination module 200, a setting module 200, and a second determination module 300.

[0083] The first determining module 100 is configured to determine a plurality of running scenarios of the data transmission link; the setting module 200 is configured to set a plurality of error code counting periods and corresponding error code counting thresholds according to the plurality of running scenarios; and the second determining module 300 is configured to acquire error code counts of the data transmission link in the error code counting periods, and determine error code detection results of the data transmission link in the plurality of running scenarios based on the error code counts corresponding to the plurality of error code counting periods and the error code counting thresholds.

[0084] In the embodiment of the present application, the data transmission link comprises an uplink and a downlink.

[0085] In the embodiment of the present application, the apparatus 10 of the present application further comprises a first setting module.

[0086] The first setting module is configured to set a plurality of error code counting periods for the uplink and the downlink respectively.

[0087] In the embodiment of the present application, the second determining module 300 is further configured to calculate a counting difference value between a current error code count and a previous error code count in the error code counting periods corresponding to the plurality of running scenarios, and generate an error code detection result according to the counting difference value and the error code counting threshold.

[0088] In the embodiment of the present application, the second determining module 300 is further configured to accumulate the counting difference value in the error code counting period, and generate an error code detection result according to an accumulated value of the counting difference value and the error code counting threshold.

[0089] In the embodiment of the present application, the second determining module 300 is further configured to determine that the error code detection result is that the data transmission link has a fault if the accumulated value of the counting difference value is greater than the error code counting threshold, and determine that the error code detection result is that the data transmission link has no fault if the accumulated value of the counting difference value is less than or equal to the error code counting threshold.

[0090] In the embodiment of the present application, the apparatus 10 of the present application further comprises a third determining module.

[0091] The third determining module is configured to determine an error code counting basis of a next error code counting period according to the accumulated value of the counting difference value after determining that the error code detection result is that the data transmission link has no fault, and enter the next error code counting period of the data transmission link.

[0092] In the embodiment of the present application, the third determining module is further configured to: determine whether the accumulated value of the count difference is greater than the error code count threshold of the current error code count period; if the accumulated value of the count difference is greater than the error code count threshold of the current error code count period, generate an alarm event of the data transmission link and disconnect the data transmission link; if the accumulated value of the count difference is less than or equal to the error code count threshold of the current error code count period, determine the preset value of the current error code count period according to the error code count threshold, wherein the preset value is less than the error code count threshold; when the accumulated value of the count difference is greater than the preset value of the current error code count period, take the preset value of the current error code count period as the error code count basis of the next error code count period; and when the accumulated value of the count difference is less than or equal to the preset value of the current error code count period, take the accumulated value of the count difference as the error code count basis of the next error code count period.

[0093] In the embodiment of the present application, the device 10 of the present application further comprises a determining module.

[0094] The determining module is configured to set the error code interference threshold according to the error code count threshold; and if the count difference is greater than the interference threshold, take the interference threshold as the count difference.

[0095] It should be noted that the foregoing explanation and description of the error code detection method for the data transmission link also apply to the error code detection device for the data transmission link of the present embodiment, which will not be described herein again.

[0096] The error code detection device for the data transmission link provided in the embodiment of the present application can set corresponding error code count periods for different running scenarios, set multiple error code count thresholds corresponding to the multiple error code count periods, and realize error code detection in different running scenarios through the multiple error code count thresholds, such as through the error code count threshold in the short-period running scenario to timely discover and respond to the situation of rapid growth of error codes in a short period, and through the error code count threshold in the long-period running scenario to avoid unnecessary disconnection of the data transmission link, so that the corresponding error code count threshold can be used for different running scenarios to avoid the inapplicability problem caused by sharing the error code count threshold, while ensuring the accuracy of error code detection, the applicability of error code detection for the data transmission link can be effectively improved, different error code detection requirements in different running scenarios can be effectively taken into account, and the user's use experience is improved.

[0097] Figure 4 A structural schematic diagram of an electronic device provided in the embodiment of the present application is shown. The electronic device can include:

[0098] The memory 401, the processor 402, and the computer program stored in the memory 401 and executable on the processor 402.

[0099] The processor 402 implements the error code detection method of the data transmission link provided in the above embodiments when executing the program.

[0100] Further, the electronic device further comprises:

[0101] The communication interface 403 is configured to communicate between the memory 401 and the processor 402.

[0102] The memory 401 is configured to store a computer program executable on the processor 402.

[0103] The memory 401 can include a high-speed RAM (Random Access Memory) memory, and can further include a non-volatile memory, for example, at least one disk memory.

[0104] If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 can be connected to each other through a bus and complete communication between each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, Figure 4 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0105] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can complete communication between each other through an internal interface.

[0106] The processor 402 can be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0107] The embodiments of the present application further provide a computer readable storage medium, which stores a computer program or instructions, and the computer program or instructions are executed by the processor to implement the error code detection method of the data transmission link as above.

[0108] The embodiment of the present application further provides a computer program product comprising a computer program or instructions, which, when executed, implement the error code detection method of the data transmission link as described above.

[0109] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms is not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or N embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples, without contradiction.

[0110] In addition, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "N" is at least two, for example, two, three, etc., unless otherwise explicitly specified.

[0111] Any process or method descriptions in flow charts or described elsewhere herein can be understood as representing code modules, segments, or portions of code which include one or more executable instructions for implementing the specified logical functions or steps, and the preferred embodiments of the present application also include the possibility that the described functions may be implemented by alternative means, such as using the functions of general purpose hardware computing devices in a substantially similar manner, or by using a combination of hardware and software to implement the functionality in either an analogous or a equivalent manner, as would be understood by one skilled in the art.

[0112] It should be understood that parts of the present application can be implemented in hardware, software, firmware or a combination thereof. In the above-described embodiments, the steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. As in another embodiment, if implemented in hardware, any of the following technologies known in the art or their combinations can be used: discrete logic circuit with logic gate circuit for implementing logical functions on data signals, application specific integrated circuit with suitable combination of logic gate circuit, programmable gate array, field programmable gate array, etc.

[0113] Those skilled in the art can understand that all or part of the steps of the method for implementing the above-mentioned embodiments can be instructed by a program to complete the relevant hardware, and the above-mentioned program can be stored in a computer readable storage medium. When the program is executed, it includes one of the steps of the method embodiment or a combination thereof.

[0114] Although the embodiments of the present application have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and cannot be understood as limiting the present application. Those skilled in the art can make changes, modifications, replacements and variations to the above-mentioned embodiments within the scope of the present application.

Claims

1. A method of error code detection for a data transmission link, characterized in that, The method comprises the following steps: determining a plurality of running scenarios of a data transmission link; setting a plurality of error code counting periods and corresponding error code counting thresholds according to the plurality of running scenarios; acquiring error code counts of the data transmission link within the error code counting periods, and determining error code detection results of the data transmission link under the plurality of running scenarios based on the error code counts and the error code counting thresholds corresponding to the plurality of error code counting periods; the determining of the error code detection results of the data transmission link under the plurality of running scenarios based on the error code counts and the error code counting thresholds corresponding to the plurality of error code counting periods comprises: calculating a counting difference value of a current error code count and a previous error code count within the error code counting periods corresponding to the plurality of running scenarios, and generating an error code detection result according to the counting difference value and the error code counting threshold; the generating of the error code detection result according to the counting difference value and the error code counting threshold comprises: accumulating the counting difference value within the error code counting period, and generating an error code detection result according to the accumulated value of the counting difference value and the error code counting threshold.

2. The method of error detection of a data transmission link according to claim 1, characterized in that, The data transmission link comprises an uplink and a downlink, and further comprises: a plurality of error code counting periods are respectively set for the uplink and the downlink.

3. The method of error detection of a data transmission link according to claim 1, characterized in that, The generating of the error code detection result according to the accumulated value of the counting difference value and the error code counting threshold comprises: if the accumulated value of the counting difference value is greater than the error code counting threshold, it is determined that the error code detection result is that the data transmission link has a fault; if the accumulated value of the counting difference value is less than or equal to the error code counting threshold, it is determined that the error code detection result is that the data transmission link has no fault.

4. The method of error detection of a data transmission link according to claim 3, characterized in that, After it is determined that the error code detection result is that the data transmission link has no fault, the method further comprises: determining an error code counting basis of a next error code counting period according to the accumulated value of the counting difference value, and entering the next error code counting period of the data transmission link.

5. The method of error detection of a data transmission link according to claim 4, characterized in that, The determining of the error code counting basis of the next error code counting period according to the accumulated value of the counting difference value comprises: judging whether the accumulated value of the counting difference value is greater than an error code counting threshold of a current error code counting period; if the accumulated value of the counting difference value is greater than the error code counting threshold of the current error code counting period, generating an alarm event of the data transmission link, and disconnecting the data transmission link; if the accumulated value of the counting difference value is less than or equal to the error code counting threshold of the current error code counting period, determining a preset value of the current error code counting period according to the error code counting threshold, wherein the preset value is less than the error code counting threshold; when the accumulated value of the counting difference value is greater than a preset value of the current error code counting period, taking the preset value of the current error code counting period as the error code counting basis of the next error code counting period; and when the accumulated value of the counting difference value is less than or equal to the preset value of the current error code counting period, taking the accumulated value of the counting difference value as the error code counting basis of the next error code counting period.

6. The method of error detection of a data transmission link according to claim 1, wherein, The method further comprises: setting an error code interference threshold according to the error code counting threshold; if the counting difference value is greater than the interference threshold, taking the interference threshold as the counting difference value.

7. An error code detection device for a data transmission link, characterized in that The method comprises: The first determining module is configured to determine a plurality of operation scenarios of the data transmission link; The setting module is configured to set a plurality of error code counting periods and corresponding error code counting thresholds according to the plurality of operation scenarios; The second determining module is configured to acquire error code counts of the data transmission link in the error code counting periods, and determine error code detection results of the data transmission link in the plurality of operation scenarios based on the error code counts and the error code counting thresholds corresponding to the plurality of error code counting periods; the determination of the error code detection results of the data transmission link in the plurality of operation scenarios based on the error code counts and the error code counting thresholds corresponding to the plurality of error code counting periods comprises: calculating a counting difference value between a current error code count and a previous error code count in the error code counting periods corresponding to the plurality of operation scenarios, and generating an error code detection result according to the counting difference value and the error code counting threshold; the generation of the error code detection result according to the counting difference value and the error code counting threshold comprises: accumulating the counting difference value in the error code counting period, and generating an error code detection result according to an accumulated value of the counting difference value and the error code counting threshold.

8. An electronic device, comprising: The computer program is stored in the memory and executable on the processor, and the processor executes the program to implement the error code detection method of the data transmission link according to any one of claims 1-6. The computer program is stored in the memory and executable on the processor, and the processor executes the program to implement the error code detection method of the data transmission link according to any one of claims 1-6.

Citation Information

Patent Citations

  • Data transmission method and device as well as system

    CN102629898A

  • Link error code processing method and device and computer readable storage medium

    CN115333979A