Data statistical method and device
By setting a counter in the receiving device to record the number of bits or symbols corrected in the data stream, the problem of data stream parameter statistics is solved, the evaluation of transmission channel quality and receiving end processing anomalies is realized, and the accuracy and efficiency of data stream processing are improved.
Patent Information
- Application Number
- CN202410504399.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2025-10-24
AI Technical Summary
How to effectively collect relevant parameters of data traffic to evaluate the communication quality of the transmission channel and detect data processing anomalies of the receiving device, especially in the forward error correction coding scenario, has not been effectively solved by existing technologies.
P counters are set in the receiving device to record the number of codewords with different numbers of bits or symbols corrected in the data stream, which are used to count parameters such as burst errors, error rate and synchronization errors. Data processing is performed based on the recorded values of the P counters.
It realizes burst error detection, error rate calculation and synchronization error detection of data streams, provides evaluation of transmission channel quality and receiving end processing anomalies, and improves the accuracy and efficiency of data processing.
Smart Images

Figure CN120834895A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of communication, and in particular, to a data statistics method and device. BACKGROUND
[0002] A data stream can be transmitted in a network. In some scenarios, after receiving the data stream, a receiving end can perform statistics on related parameters of the data stream, so as to perform data processing based on the statistical parameters subsequently. For example, the statistical parameters are used to evaluate the communication quality provided by a transmission channel, or the statistical parameters are used to determine whether the data processing operation of the receiving end device is abnormal, and the like. As a specific example, in a scenario where a sending end performs forward error correction (FEC) encoding on a sent data stream, the receiving end can decode the FEC codewords included in the received data stream, and perform statistics on related parameters based on the decoding result.
[0003] How to perform statistics on the related parameters of the data stream is a problem to be solved at present. SUMMARY
[0004] In the first aspect, the present application provides a data statistics method, which can be applied to a receiving end device. In the embodiments of the present application, considering that the number of bits of a codeword that are corrected can reflect the communication quality provided by a transmission channel and whether the data processing operation of the receiving end device is abnormal, therefore, in the present application, P counters are set in the receiving end device, P can be an integer greater than or equal to 3, and the P counters can respectively perform statistics on the number of codewords with different numbers of corrected bits in a data stream according to the number of bits of the codewords in the data stream that are corrected. Correspondingly, after receiving the data stream, the receiving end device can use the P counters to respectively record the number of codewords with different numbers of corrected bits in the data stream, so as to perform data processing based on the statistical parameters subsequently.
[0005] In a possible implementation, considering that the number of codewords with different numbers of corrected bits in the data stream can reflect whether burst errors occur in the data stream, therefore, after using the P counters to respectively record the number of codewords with different numbers of corrected bits in the data stream, burst errors can be further detected based on the values respectively recorded by the P counters. The detection of burst errors mentioned here can be detection of whether burst errors occur in the data stream, can be detection of the number of times that burst errors occur in the data stream, can be detection of the corresponding data length when burst errors occur in the data stream, and the like.
[0006] In a possible implementation, the number of codewords with different number of corrected bits in the data stream can reflect the error rate of the data stream transmission, and therefore, after the P counters record the number of codewords with different number of corrected bits in the data stream respectively, the error rate can be further calculated based on the values recorded by the P counters respectively.
[0007] In a possible implementation, the error rate includes, but is not limited to, one or more of a codeword error ratio (CER), a bit error ratio (BER), a symbol error ratio (SER), and a frame loss ratio (FLR). In other words, after the P counters record the number of codewords with different number of corrected bits in the data stream respectively, one or more of the CER, the BER, the SER, and the FLR can be further calculated based on the values recorded by the P counters respectively.
[0008] In a possible implementation, the number of codewords with different number of corrected bits in the data stream can reflect whether the synchronization processing of the data stream by the receiving end device is erroneous, and therefore, after the P counters record the number of codewords with different number of corrected bits in the data stream respectively, whether the data stream is erroneous in synchronization can be further detected based on the values recorded by the P counters respectively.
[0009] In a possible implementation, the number of corrected bits corresponding to any two of the P counters is different. As a specific example, the number of corrected bits corresponding to the P counters is continuous, for example, 0 to P-2 and more than P-2 respectively. In this way, the distribution of the number of corrected bits of the codewords included in the data stream can be determined.
[0010] In a possible implementation, after the receiving end device receives the data stream, at least one codeword can be obtained based on the data stream. Further, error correction is performed on each of the at least one codeword to determine the number of corrected bits in each codeword, so as to update the value of at least one of the aforementioned P counters. As a specific example, for any one codeword, after the number of corrected bits in the codeword is determined, the counter corresponding to the number of bits is incremented by 1.
[0011] In a possible implementation, the receiving end device is provided with R counters, which are used to record the number of code word groups with different number of corrected bits in the at least one code word group according to the number of corrected bits in each code word group. R can be a positive integer greater than or equal to 3.
[0012] In a possible implementation, any two of the R counters correspond to different number of corrected bits. As a specific example, the R counters correspond to consecutive number of corrected bits, for example, 0 to R-2 and more than R-2. In this way, the distribution of the number of corrected bits in the code word groups included in the at least one code word group can be determined.
[0013] In a possible implementation, after receiving the data stream, the receiving end device can obtain the at least one code word group based on the data stream. Further, for each code word group, the error correction of each code word included in the code word group is performed to determine the number of corrected bits in each code word, and the number of corrected bits in each code word in the code word group is further summed to obtain the number of corrected bits in the code word group, so as to update the value of at least one of the aforementioned R counters. As a specific example, for any code word group, after determining the number of corrected bits in the code word group, the counter corresponding to the number of corrected bits is incremented by 1.
[0014] In a possible implementation, the receiving end device can be further provided with at least one of a code word group number counter, a code word number counter and a bit number counter. The code word group number counter is used to record the total number of code word groups included in the data stream. The code word number counter is used to record the total number of code words included in the data stream. The bit number counter is used to record the total number of bits included in the data stream. Optionally, the receiving end device can perform one or more of detecting burst error, calculating error rate and detecting synchronization error of the data stream by combining the values recorded by at least one of the code word group number counter, the code word number counter and the bit number counter, and the number of code word groups with different number of corrected bits in the at least one code word group.
[0015] In the second aspect, the present application provides a data statistics method, which can be applied to a receiving device. The receiving device can receive a data stream, and further obtain at least one codeword group based on the data stream, and for each codeword group in the at least one codeword group, it includes Q codewords obtained by deinterleaving, where Q is an integer greater than or equal to 2. Taking into account the number of corrected bits in the codeword group, it can reflect the communication quality provided by the transmission channel and whether the data processing operation of the receiving device is abnormal. Therefore, in an embodiment of the present application, the receiving device can count the number of codeword groups with different numbers of bits corrected in the at least one codeword group, so as to facilitate subsequent data processing based on statistical parameters.
[0016] In one possible implementation, considering that the number of codeword groups with different numbers of bits corrected in the at least one codeword group can reflect whether burst errors have occurred in the data stream, after counting the number of codeword groups with different numbers of bits corrected in the at least one codeword group, burst errors can be further detected based on the statistical results. The burst error detection mentioned herein can include detecting whether burst errors have occurred in the data stream, detecting the number of burst errors occurring in the data stream, detecting the data length corresponding to the occurrence of burst errors in the data stream, and so on.
[0017] In one possible implementation, considering that the number of codeword groups with different numbers of bits corrected in the at least one codeword group can reflect the error rate of data stream transmission, therefore, after counting the number of codeword groups with different numbers of bits corrected in the at least one codeword group, the error rate of data stream transmission can be further calculated based on the statistical results.
[0018] In one possible implementation, the error rate includes, but is not limited to, one or more of CER, BER, SER, and FLR. In other words, using the solution of the present application, after counting the number of codeword groups with different numbers of corrected bits in the at least one codeword group, one or more of CER, BER, SER, and FLR for data stream transmission can be further calculated based on the statistical results.
[0019] In one possible implementation, considering the number of codeword groups with different numbers of bits corrected in the at least one codeword group, it can be reflected whether an error occurs in the synchronization processing of the data stream by the receiving device. Therefore, after counting the number of codeword groups with different numbers of bits corrected in the at least one codeword group, it is possible to further detect whether the data stream has a synchronization error based on the statistical results.
[0020] In a possible implementation, the above first aspect and any one of the first aspect, and the above second aspect and any one of the second aspect can be combined in any manner without conflict.
[0021] In a possible implementation, the code word in the above first aspect and the above second aspect can be an FEC code word, for example, can be an FEC outer code code word, or can be an FEC inner code code word in a concatenated code scenario.
[0022] In a third aspect, the present application provides a data statistical method, which can be applied to a receiving end device. In the embodiments of the present application, the number of code words with corrected symbols can reflect the communication quality provided by a transmission channel and whether the data processing operation of the receiving end device is abnormal, and therefore, in the present application, P counters are set in the receiving end device, P can be an integer greater than or equal to 3, and the P counters can respectively count the number of code words with different numbers of corrected symbols in a data stream according to the number of code words with corrected symbols in the data stream. Correspondingly, after the receiving end device receives the data stream, the P counters can be used to respectively record the number of code words with different numbers of corrected symbols in the data stream, so as to facilitate subsequent data processing based on the statistical parameters.
[0023] In a possible implementation, the number of code words with different numbers of corrected symbols in the data stream can reflect whether burst errors occur in the data stream, and therefore, after the P counters respectively record the number of code words with different numbers of corrected symbols in the data stream, burst errors can be further detected based on the number recorded by the P counters. The detection of burst errors mentioned here can be detection of whether burst errors occur in the data stream, can be detection of the number of times of burst errors occurring in the data stream, or can be detection of the corresponding data length when burst errors occur in the data stream, and the like.
[0024] In a possible implementation, the number of code words with different numbers of corrected symbols in the data stream can reflect the error rate of the data stream transmission, and therefore, after the P counters respectively record the number of code words with different numbers of corrected symbols in the data stream, the error rate can be further calculated based on the number recorded by the P counters.
[0025] In a possible implementation, the error rate includes but is not limited to one or more of CER, BER, SER, and FLR. In other words, after the P counters respectively record the number of code words with different numbers of corrected symbols in the data stream, one or more of CER, BER, SER, and FLR can be calculated based on the number recorded by the P counters.
[0026] In a possible implementation, the number of codewords with different number of corrected symbols in the data stream is considered to reflect whether the synchronization processing of the data stream by the receiving end device is correct or not, and therefore, after the P counters are used to record the number of codewords with different number of corrected symbols in the data stream respectively, the synchronization error of the data stream can be detected based on the number recorded by the P counters respectively.
[0027] In a possible implementation, the number of corrected symbols corresponding to any two of the P counters is different. As a specific example, the number of corrected symbols corresponding to the P counters is continuous, for example, 0 to P-2 and more than P-2 respectively. In this way, the distribution of the number of corrected symbols of the codewords included in the data stream can be determined.
[0028] In a possible implementation, after the receiving end device receives the data stream, at least one codeword can be obtained based on the data stream. Further, each codeword in the at least one codeword is corrected to determine the number of corrected symbols in each codeword, so as to update the value of at least one of the P counters. As a specific example, for any one codeword, after the number of corrected symbols in the codeword is determined, the counter corresponding to the number of corrected symbols is incremented by 1.
[0029] In a possible implementation, the receiving end device is provided with R counters, which are used to record the number of codeword groups with different number of corrected symbols in the at least one codeword group according to the number of corrected symbols in each codeword group in the at least one codeword group. R can be a positive integer greater than or equal to 3.
[0030] In a possible implementation, the number of corrected symbols corresponding to any two of the R counters is different. As a specific example, the number of corrected symbols corresponding to the R counters is continuous, for example, 0 to R-2 and more than R-2 respectively. In this way, the distribution of the number of corrected symbols of the codeword groups included in the at least one codeword group can be determined.
[0031] In a possible implementation, after receiving the data stream, the receiving end device can obtain at least one code word group based on the data stream. Further, for each code word group, error correction is performed on each code word included in the code word group to determine the number of corrected symbols in each code word, and further, the number of corrected symbols in each code word in the code word group is summed to obtain the number of corrected symbols in the code word group, so as to update the value of at least one of the aforementioned R counters. As a specific example, for any code word group, after determining the number of corrected symbols in the code word group, the counter corresponding to the number of symbols is incremented by 1.
[0032] In a possible implementation, the receiving end device can further be provided with at least one of a code word group number counter, a code word number counter, and a symbol number counter. The code word group number counter is configured to record the total number of code word groups included in the data stream. The code word number counter is configured to record the total number of code words included in the data stream. The symbol number counter is configured to record the total number of symbols included in the data stream. Optionally, the receiving end device can combine the counting values of at least one of the code word group number counter, the code word number counter, and the symbol number counter, and the number of code word groups with different numbers of corrected symbols obtained by statistics, to perform one or more of the following: detecting a burst error, calculating an error rate, and detecting whether the data stream is out of synchronization.
[0033] In a fourth aspect, the present application provides a data statistics method, which can be applied to a receiving end device. The receiving end device can receive a data stream, and further, obtain at least one code word group based on the data stream. Each code word group in the at least one code word group includes Q code words obtained by deinterleaving, where Q is an integer greater than or equal to 2. The number of corrected symbols in a code word group can reflect the communication quality provided by a transmission channel, and whether the data processing operation of the receiving end device is abnormal. Therefore, in the embodiments of the present application, the receiving end device can count the number of code word groups with different numbers of corrected symbols in the at least one code word group, so as to perform subsequent data processing based on the counted parameters.
[0034] In a possible implementation, the number of code word groups in the at least one code word group that have different numbers of corrected symbols can reflect whether the data stream has a burst error, and therefore, after the number of code word groups in the at least one code word group that have different numbers of corrected symbols is counted, a burst error of the data stream can be detected based on the counting result.
[0035] In a possible implementation, the number of code word groups in the at least one code word group that have different numbers of corrected symbols can reflect an error rate of the data stream, and therefore, after the number of code word groups in the at least one code word group that have different numbers of corrected symbols is counted, the error rate of the data stream can be calculated based on the counting result.
[0036] In a possible implementation, the error rate includes, but is not limited to, one or more of the CER, the BER, the SER, and the FLR. In other words, after the number of code word groups in the at least one code word group that have different numbers of corrected bits is counted, one or more of the CER, the BER, the SER, and the FLR of the data stream can be calculated based on the counting result.
[0037] In a possible implementation, the number of code word groups in the at least one code word group that have different numbers of corrected symbols can reflect whether a synchronization process of the data stream performed by the receiving end device is erroneous, and therefore, after the number of code word groups in the at least one code word group that have different numbers of corrected symbols is counted, whether the data stream is erroneous in synchronization can be detected based on the counting result.
[0038] In a possible implementation, the third aspect and any one of the third aspect, and the fourth aspect and any one of the fourth aspect described above can be combined in any manner without conflict.
[0039] In a possible implementation, the code word in the third aspect and the fourth aspect described above can be an FEC code word, for example, can be an FEC outer code word, or for example, in a concatenated code scenario, can be an FEC inner code word.
[0040] In a fifth aspect, the present application provides a data counting device, the device comprising: a receiving unit configured to receive a data stream; and a processing unit configured to record, by P counters respectively, a number of code words in the data stream that have different numbers of corrected bits, where P is greater than or equal to 3.
[0041] In a possible implementation, the processing unit is further configured to: detect burst errors according to the number of times recorded by the P counters respectively; or calculate an error rate according to the number of times recorded by the P counters respectively, or detect whether the data stream is out of synchronization according to the number of times recorded by the P counters respectively.
[0042] In a possible implementation, the P counters respectively correspond to the number of corrected bits being 0 to P-2 and more than P-2.
[0043] In a possible implementation, when determining the number of corrected bits in one code word in the data stream, the counter corresponding to the number of corrected bits is incremented by 1.
[0044] In a possible implementation, the processing unit is further configured to: obtain at least one code word group from the data stream, each code word group in the at least one code word group including Q code words obtained by deinterleaving, Q being greater than or equal to 2; and count the number of code word groups in the at least one code word group that have different numbers of corrected bits.
[0045] In a possible implementation, the processing unit is further configured to perform at least one of the following: detect burst errors according to the number of code word groups in the at least one code word group that have different numbers of corrected bits; or calculate an error rate according to the number of code word groups in the at least one code word group that have different numbers of corrected bits, or detect whether the data stream is out of synchronization according to the number of code word groups in the at least one code word group that have different numbers of corrected bits.
[0046] In a possible implementation, R counters respectively record the number of code word groups in the at least one code word group that have different numbers of corrected bits, R being greater than or equal to 3.
[0047] In a possible implementation, the R counters respectively correspond to the number of corrected bits being 0 to R-2 and more than R-2.
[0048] In a possible implementation, when determining the number of corrected bits in one code word group in the at least one code word group, the counter corresponding to the number of corrected bits is incremented by 1.
[0049] In a possible implementation, the processing unit is further configured to perform at least one of the following: a code word group number counter records the total number of code word groups included in the data stream; a code word number counter records the total number of code words included in the data stream; and a bit number counter records the total number of bits included in the data stream.
[0050] In a sixth aspect, the present application provides a data statistics device, the device comprising: a receiving unit configured to receive a data stream;
[0051] a processing unit configured to obtain at least one code word group from the data stream, each code word group in the at least one code word group comprising Q code words obtained by deinterleaving, Q being greater than or equal to 2; and count the number of code word groups in the at least one code word group that have different numbers of corrected bits.
[0052] In a possible implementation, the processing unit is further configured to: detect burst errors according to the number of code word groups in the at least one code word group that have different numbers of corrected bits; or calculate an error rate according to the number of code word groups in the at least one code word group that have different numbers of corrected bits, or detect whether the data stream has synchronization errors according to the number of code word groups in the at least one code word group that have different numbers of corrected bits.
[0053] In a possible implementation, R counters are configured to record the number of code word groups in the at least one code word group that have different numbers of corrected bits, R being greater than or equal to 3.
[0054] In a possible implementation, the R counters correspond to the numbers of corrected bits that are 0 to R-2 and more than R-2, respectively.
[0055] In a possible implementation, when the number of corrected bits in a code word group in the at least one code word group is determined, a counter corresponding to the number of corrected bits is incremented by 1.
[0056] In a possible implementation, the processing unit is further configured to perform at least one of the following: a code word group number counter is configured to count the total number of code word groups included in the data stream; a code word number counter is configured to count the total number of code words included in the data stream; and a bit number counter is configured to count the total number of bits included in the data stream.
[0057] In a possible implementation, the processing unit is further configured to: P counters are configured to record the number of code words in the data stream that have different numbers of corrected bits, P being greater than or equal to 3.
[0058] In a possible implementation, the processing unit is further configured to: detect burst errors according to the number of code words recorded by the P counters, respectively; or calculate an error rate according to the number of code words recorded by the P counters, respectively, or detect whether the data stream has synchronization errors according to the number of code words recorded by the P counters, respectively.
[0059] In a possible implementation, the P counters correspond to the numbers of corrected bits that are 0 to P-2 and more than P-2, respectively.
[0060] In a possible implementation, when determining the number of corrected bits in one code word in the data stream, a counter corresponding to the number of bits is incremented by 1.
[0061] In a possible implementation, the code word in the third aspect and the fourth aspect comprises a forward error correction (FEC) code word.
[0062] In a possible implementation, the FEC code word comprises an FEC inner code code word or an FEC outer code code word.
[0063] In a possible implementation, the data statistics apparatus in the third aspect and the fourth aspect comprises a chip, an optical module, a network device, or a server.
[0064] In a seventh aspect, the present application provides a data statistics apparatus, which comprises: a receiving unit configured to receive a data stream; and a processing unit configured to record, by P counters respectively, the number of code words with different numbers of corrected symbols in the data stream, where P is greater than or equal to 3.
[0065] In a possible implementation, the processing unit is further configured to: detect burst errors according to the number of code words with different numbers of corrected symbols in the data stream; or calculate an error rate according to the number of code words with different numbers of corrected symbols in the data stream, or detect whether the data stream is out of synchronization according to the number of code words with different numbers of corrected symbols in the data stream.
[0066] In a possible implementation, the P counters correspond to the numbers of corrected symbols, which are 0 to P-2 and more than P-2 respectively.
[0067] In a possible implementation, when determining the number of corrected symbols in one code word in the data stream, a counter corresponding to the number of symbols is incremented by 1.
[0068] In a possible implementation, the processing unit is further configured to: obtain at least one code word group from the data stream, each code word group in the at least one code word group comprising Q code words obtained by deinterleaving, where Q is greater than or equal to 2; and count the number of code word groups with different numbers of corrected symbols in the at least one code word group.
[0069] In a possible implementation, the processing unit is further configured to perform at least one of the following: detect burst errors according to the number of code word groups with different numbers of corrected symbols in the at least one code word group; or calculate an error rate according to the number of code word groups with different numbers of corrected symbols in the at least one code word group, or detect whether the data stream is out of synchronization according to the number of code word groups with different numbers of corrected symbols in the at least one code word group.
[0070] In a possible implementation, the R counters respectively record the number of code word groups in the at least one code word group that are corrected for different numbers of symbols, and R is greater than or equal to 3.
[0071] In a possible implementation, the R counters respectively correspond to the numbers of corrected symbols that are respectively 0 to R-2, and more than R-2.
[0072] In a possible implementation, when the number of corrected symbols in one code word group in the at least one code word group is determined, a counter corresponding to the number of symbols is incremented by 1.
[0073] In a possible implementation, the processing unit is further configured to perform at least one of the following: a code word group number counter records the total number of code word groups included in the data stream; a code word number counter records the total number of code words included in the data stream; and a symbol number counter records the total number of symbols included in the data stream.
[0074] In an eighth aspect, the present application provides a data statistics device, the device comprising: a receiving unit configured to receive a data stream;
[0075] a processing unit configured to obtain at least one code word group from the data stream, each code word group in the at least one code word group comprising Q code words obtained by deinterleaving, and Q is greater than or equal to 2; and count the number of code word groups in the at least one code word group that are corrected for different numbers of symbols.
[0076] In a possible implementation, the processing unit is further configured to: detect a burst error according to the number of code word groups in the at least one code word group that are corrected for different numbers of symbols; or calculate an error rate according to the number of code word groups in the at least one code word group that are corrected for different numbers of symbols, or detect whether the data stream is out of synchronization according to the number of code word groups in the at least one code word group that are corrected for different numbers of symbols.
[0077] In a possible implementation, the R counters respectively record the number of code word groups in the at least one code word group that are corrected for different numbers of symbols, and R is greater than or equal to 3.
[0078] In a possible implementation, the R counters respectively correspond to the numbers of corrected symbols that are respectively 0 to R-2, and more than R-2.
[0079] In a possible implementation, when the number of corrected symbols in one code word group in the at least one code word group is determined, a counter corresponding to the number of symbols is incremented by 1.
[0080] In a possible implementation, the processing unit is further configured to perform at least one of the following: a code word group number counter records a total number of code word groups included in the data stream; a code word number counter records a total number of code words included in the data stream; and a symbol number counter records a total number of symbols included in the data stream.
[0081] In a possible implementation, the processing unit is further configured to: P counters respectively record numbers of code words with different numbers of corrected symbols in the data stream, and P is greater than or equal to 3.
[0082] In a possible implementation, the processing unit is further configured to: detect a burst error according to the numbers respectively recorded by the P counters; or calculate an error rate according to the numbers respectively recorded by the P counters, or detect whether the data stream is out of synchronization according to the numbers respectively recorded by the P counters.
[0083] In a possible implementation, the P counters respectively correspond to numbers of corrected symbols that are 0 to P-2, and more than P-2.
[0084] In a possible implementation, when the number of corrected symbols in a code word in the data stream is determined, a counter corresponding to the number of symbols is incremented by 1.
[0085] In a possible implementation, the code word in the third aspect and the fourth aspect includes a forward error correction (FEC) code word.
[0086] In a possible implementation, the FEC code word includes an FEC inner code code word or an FEC outer code code word.
[0087] In a possible implementation, the data statistics device in the third aspect and the fourth aspect includes a chip, an optical module, a network device, or a server.
[0088] In a ninth aspect, the present application provides a device. The device includes a processor and a communication interface, the processor being used to perform the data processing operations in the method described in the first aspect and any one of the first aspects above, and the communication interface being used to perform the data transceiving operations in the method described in the first aspect and any one of the first aspects above; or, the processor being used to perform the data processing operations in the method described in the second aspect and any one of the second aspects above, and the communication interface being used to perform the data transceiving operations in the method described in the second aspect and any one of the second aspects above. Alternatively, the processor being used to perform the data processing operations in the method described in the third aspect and any one of the third aspects above, and the communication interface being used to perform the data transceiving operations in the method described in the third aspect and any one of the third aspects above. Alternatively, the processor being used to perform the data processing operations in the method described in the fourth aspect and any one of the fourth aspects above, and the communication interface being used to perform the data transceiving operations in the method described in the fifth aspect and any one of the fifth aspects above.
[0089] In one possible implementation, the device further includes a memory, the memory being used to store instructions or computer programs, and the processor being used to execute the instructions or computer programs in the memory, thereby triggering the device to perform the method described in the first aspect and any one of the first aspects above; or, the processor being used to execute the instructions or computer programs in the memory to perform the method described in the second aspect and any one of the second aspects above. Or, the processor being used to execute the instructions or computer programs in the memory to perform the method described in the third aspect and any one of the third aspects above. Or, the processor being used to execute the instructions or computer programs in the memory to perform the method described in the fourth aspect and any one of the fourth aspects above.
[0090] In a tenth aspect, the present application provides a device comprising an interface circuit and a processing circuit, wherein the interface circuit is used to receive and / or send data, and the processing circuit is used to perform data processing.
[0091] In one example, the device is used to perform the method described in the first aspect and any one of the first aspects above. In this case:
[0092] The interface circuit is used to receive a data stream; the processing circuit is used to use P counters to respectively record the number of code words with different numbers of bits corrected in the data stream, where P is greater than or equal to 3.
[0093] In another example, the device is used to perform the method described in any one of the above second aspects and the second aspect. In this case:
[0094] The interface circuit is configured to receive a data stream, and the processing circuit is configured to obtain at least one code word group from the data stream, each code word group in the at least one code word group comprising Q code words obtained by deinterleaving, Q being greater than or equal to 2; and count a number of code word groups in the at least one code word group in which different numbers of bits are corrected.
[0095] In another example, the device is configured to perform the method of the third aspect above and any one of the third aspect, and for this case:
[0096] The interface circuit is configured to receive a data stream, and the processing circuit is configured to record, by using P counters respectively, a number of code words in the data stream in which different numbers of symbols are corrected, P being greater than or equal to 3.
[0097] In yet another example, the device is configured to perform the method of the fourth aspect above and any one of the fourth aspect, and for this case:
[0098] The interface circuit is configured to receive a data stream, and the processing circuit is configured to obtain at least one code word group from the data stream, each code word group in the at least one code word group comprising Q code words obtained by deinterleaving, Q being greater than or equal to 2; and count a number of code word groups in the at least one code word group in which different numbers of symbols are corrected.
[0099] In a eleventh aspect, the present application provides a computer readable storage medium, comprising instructions or a computer program, when running on a computer, causing the computer to perform the method of the first aspect above and any one of the first aspect, or, when running on a computer, causing the computer to perform the method of the second aspect above and any one of the second aspect, or, when running on a computer, causing the computer to perform the method of the third aspect above and any one of the third aspect, or, when running on a computer, causing the computer to perform the method of the fourth aspect above and any one of the fourth aspect.
[0100] In a twelfth aspect, the present application provides a computer program product comprising instructions or a computer program, when running on a computer, causing the computer to perform the method of the first aspect above and any one of the first aspect, or, causing the computer to perform the method of the second aspect above and any one of the second aspect, or, causing the computer to perform the method of the third aspect above and any one of the third aspect, or, causing the computer to perform the method of the fourth aspect above and any one of the fourth aspect.
[0101] In a thirteenth aspect, the present application provides a chip comprising an interface circuit and a processing circuit, the chip being configured to perform the method of the first aspect above and any one of the first aspect above, or the method of the second aspect above and any one of the second aspect above, or the method of the third aspect above and any one of the third aspect above, or the method of the fourth aspect above and any one of the fourth aspect above.
[0102] In a fourteenth aspect, the present application provides an optical module comprising an interface circuit and a processing circuit, the optical module being configured to perform the method of the first aspect above and any one of the first aspect above, or the method of the second aspect above and any one of the second aspect above, or the method of the third aspect above and any one of the third aspect above, or the method of the fourth aspect above and any one of the fourth aspect above. BRIEF DESCRIPTION OF DRAWINGS
[0103] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0104] Figure 1 An exemplary application scenario schematic diagram provided for the embodiments of the present application;
[0105] Figure 2 A flowchart of a data statistical method provided for the embodiments of the present application;
[0106] Figure 3 A data processing flow schematic diagram provided for the embodiments of the present application;
[0107] Figure 4 A flowchart of another data statistical method provided for the embodiments of the present application;
[0108] Figure 5 A data processing flow schematic diagram provided for the embodiments of the present application;
[0109] Figure 6 A structure schematic diagram of a receiving end device provided for the embodiments of the present application;
[0110] Figure 7 A structure schematic diagram of a data statistical device provided for the embodiments of the present application;
[0111] Figure 8 A structure schematic diagram of a device provided for the embodiments of the present application;
[0112] Figure 9 A structural schematic diagram of a device provided by an embodiment of the present application is shown in FIG. 1.
[0113] Figure 10 A structural schematic diagram of a chip or optical module provided by an embodiment of the present application is shown in FIG. 2. DETAILED DESCRIPTION
[0114] An embodiment of the present application provides a data statistical method and device, which can statistically analyze relevant parameters based on a received data stream.
[0115] Before introducing the data statistical method provided by an embodiment of the present application, the possible application scenarios of the present application are introduced first.
[0116] Referring to FIG. 3, Figure 1 FIG. 3 is a schematic diagram of an exemplary application scenario provided by an embodiment of the present application.
[0117] As shown in FIG. 4, Figure 1 the chip or optical module of the sending end can perform FEC encoding on the data stream to be sent, wherein, Figure 1 FIG. 4 shows that the sending end can perform FEC encoding on the data stream to be sent in parallel by using an 8-way FEC encoder, the 8-way FEC codewords obtained through FEC encoding are subjected to 8:1 bit pair interleaving, and the data stream obtained through 8:1 bit pair interleaving is subjected to a pad insertion operation. Figure 1 As shown in FIG. 5,
[0118] After the receiving end receives the data stream sent by the sending end, the data stream can be processed, and the processing process of the data stream by the receiving end is the inverse process of the processing process of the data stream by the sending end. Specifically, the chip or optical module of the receiving end can first decode the received data stream based on PAM4 symbols, further, for the data stream after decoding, the pad in the data stream is deleted, the data stream obtained by deleting the pad is subjected to 1:8 bit pair deinterleaving, and the 8-way FEC decoder is used to respectively perform FEC decoding on the FEC codewords corresponding to the deinterleaved data stream.
[0119] In one example, the transmitting end can also perform 8:1 bit pair interleaving on the 8-way FEC codeword obtained by FEC encoding based on dual polarization 16-state quadrature amplitude modulation (DP-16QAM) symbols. In this scenario, after performing the pad insertion operation on the data stream, the transmitting end can further perform DP-16QAM encoding on the data stream to which the pad is inserted, and transmit the data stream after the DP-16QAM encoding to the receiving end through the channel. Correspondingly, the chip or optical module of the receiving end can first perform DP-16QAM decoding on the received data stream, further delete the pad in the decoded data stream, perform 1:8 bit pair deinterleaving on the data stream after the pad is deleted, and use the 8-way FEC decoder to perform FEC decoding on the FEC codeword corresponding to each of the deinterleaved data streams.
[0120] In one example, Figure 1 The receiving end and the transmitting end shown can be a server, a network device, a network card, or a single board with specific functions. The network device mentioned herein includes but is not limited to a router or a switch.
[0121] In another example, Figure 1 The receiving end and the transmitting end shown can be different modules (such as different chips) in the same server or network device.
[0122] Figure 1 The chip shown in the above can include but is not limited to a network processor (NP) or an application specific integrated circuit (ASIC).
[0123] In one example, burst error is one of the indicators for evaluating the communication quality provided by the transmission channel. The burst error occurs in multiple places in a short length of data. With the increase of the communication transmission rate, the influence of the burst error on the reliability of the transmission system is also increasing. As a specific example, the burst error can reduce the reliability of the transmission system and make the transmission system more prone to failure. Therefore, to ensure the reliability of the transmission system, the detection of the burst error is particularly important. For example, after detecting the burst error, corresponding processing measures can be taken to enable the data to be normally transmitted through the transmission system. In one example, the data statistical method provided by the embodiments of the present application can perform statistics on related parameters based on the received data stream, and detect the burst error based on the statistical parameters.
[0124] In yet another example, the error rate of the data stream transmitted in the transmission channel is one of the indicators for evaluating the communication quality provided by the transmission channel. The error rate includes, but is not limited to, one or more of CER, BER, SER, and FLR. In one example, the data statistical method provided by the embodiments of the present application can be used to statistically analyze the relevant parameters based on the received data stream, and determine the error rate of the data stream transmitted in the transmission channel based on the statistical parameters.
[0125] In another example, the receiving end needs to synchronize the data stream before deinterleaving the received data stream. If the data stream synchronization error occurs, it will cause abnormal results of the subsequent operations of the receiving end device, such as deinterleaving and FEC decoding. In one example, the data statistical method provided by the embodiments of the present application can be used to statistically analyze the relevant parameters based on the received data stream, and determine whether the data stream synchronization error occurs based on the statistical parameters. If the synchronization error is found, the error information needs to be reported in time.
[0126] Next, the data statistical method provided by the embodiments of the present application will be introduced in combination with the accompanying drawings.
[0127] Referring to Figure 2 , the figure is a flowchart of a data statistical method provided by the embodiments of the present application. Figure 2 The method shown can be applied to a receiving end device. The receiving end device mentioned in the embodiments of the present application can correspond to Figure 1 The receiving end shown can be a chip or an optical module in the receiving end, or can be the receiving end itself, that is, the receiving end device can also be a network device or a server. The server mentioned here can be a server in a data center for storing data and performing related calculations. In addition, the receiving end device can also be a network card.
[0128] Figure 2 The method shown includes the following S101-S102.
[0129] S101: receiving a data stream.
[0130] The receiving end device can receive the data stream sent by the sending end, and the data stream includes one or more bits. In one example, the data stream can be obtained by interleaving the FEC code word obtained by encoding the multi-path FEC encoder and encoding the multi-path FEC encoder. In one example, the FEC code word obtained by encoding the multi-path FEC encoder can be interleaved based on the PAM4 symbol.
[0131] S102: P counters respectively record the number of code words in the data stream that are corrected by different numbers of bits or symbols, and P is greater than or equal to 3.
[0132] In the embodiment of the present application, the receiving end device is provided with P counters, which are used to record the number of code words with different number of corrected bits or symbols in the data stream according to the number of corrected bits or symbols of each code word included in the data stream. The code word mentioned in the embodiment of the present application can be an FEC code word, and the two can be used alternately. The FEC code word can be an FEC outer code word, and in the case of concatenated code, the FEC code word can also be an FEC inner code word. In an example, the counter can also be understood as a register.
[0133] In an example, the code word in the embodiment of the present application can be a BCH code, for example, BCH (126, 110) code or BCH (128, 120) code. In another example, the code word in the embodiment of the present application can be a Hamming code or a systematic binary (128, 120) code obtained by Hamming encoding.
[0134] In the embodiment of the present application, if the P counters are used to record the number of code words with different number of corrected bits in the data stream respectively, the number of corrected bits corresponding to any two counters in the P counters is different.
[0135] In a specific example, the number of corrected bits corresponding to the P counters is continuous, for example, 0 to P-2 and more than P-2 respectively. For example:
[0136] When P is equal to 3, the number of corrected bits corresponding to the three counters can be 0, 1 and more than 1 respectively.
[0137] When P is equal to 4, the number of corrected bits corresponding to the four counters can be 0, 1, 2 and more than 2 respectively.
[0138] When P is equal to 5, the number of corrected bits corresponding to the five counters can be 0, 1, 2, 3 and more than 3 respectively.
[0139] And so on.
[0140] The more than 3 mentioned this time refers to greater than 3.
[0141] The embodiment of the present application does not specifically limit the specific value of P, and P can be greater than or equal to 3.
[0142] In one example, the value of P can be determined according to the maximum error correction capability of the receiving end device, wherein the maximum error correction capability of the receiving end device refers to the maximum number of bits that can be corrected by the receiving end device for a code word to be corrected, in other words, when the number of bits with errors in a code word is greater than the maximum error correction capability of the receiving end device, the receiving end device cannot correct the code word. In one specific example, the value of P can be the maximum error correction capability of the receiving end device + 2. In this scenario, the code word whose number of corrected bits exceeds P-2 is actually a code word that cannot be corrected.
[0143] In yet another specific example, the number of corrected bits corresponding to the aforementioned P counters can also be discontinuous, for example, when P equals 3, the number of corrected bits corresponding to the three counters can be 0, 1, and 3, respectively.
[0144] In one example, after the receiving end device receives the data stream, the data stream can be synchronized, and then the synchronized data stream can be de-interleaved, for example, based on PAM4 symbols, to obtain a plurality of code words. Further, each code word in the plurality of code words can be subjected to FEC correction to determine the number of corrected bits in each code word, thereby updating the value of at least one of the aforementioned P counters. As a specific example, for any code word, after determining the number of corrected bits in the code word, the counter corresponding to the number of bits can be incremented by 1. For example:
[0145] P equals 5, and the P counters are P0, P1, P2, P3, and P3+, respectively. P0 is used to record the number of code words with 0 corrected bits, P1 is used to record the number of code words with 1 corrected bit, P2 is used to record the number of code words with 2 corrected bits, P3 is used to record the number of code words with 3 corrected bits, and P3+ is used to record the number of code words with more than 3 corrected bits. For code word 1 in the data stream, after FEC correction, it is determined that code word 1 has 2 corrected bits, and then the counter P2 is incremented by 1.
[0146] In the embodiments of the present application, if the P counters are used to record the number of code words with different numbers of corrected symbols in the data stream, respectively, then any two counters in the P counters correspond to different numbers of corrected symbols.
[0147] In one specific example, the number of corrected symbols corresponding to the P counters is continuous, for example, 0 to P-2, and more than P-2, respectively. For example:
[0148] When P equals 3, the number of corrected symbols corresponding to the three counters can be 0, 1, and more than 1, respectively.
[0149] When P equals 4, the number of corrected symbols corresponding to the 4 counters can be: 0, 1, 2, and more than 2.
[0150] When P equals 5, the number of corrected symbols corresponding to the 5 counters can be: 0, 1, 2, 3, and more than 3.
[0151] And so on.
[0152] The more than 3 mentioned above refers to greater than 3.
[0153] The embodiment of the present application does not specifically limit the specific value of P, and P can be greater than or equal to 3.
[0154] In an example, the value of P can be determined according to the maximum error correction capability of the receiving end device, wherein the maximum error correction capability of the receiving end device refers to the maximum number of symbols that can be corrected by the receiving end device for a code word to be corrected, in other words, when the number of error symbols in a code word is greater than the maximum error correction capability of the receiving end device, the receiving end device cannot correct the code word. In a specific example, the value of P can be the maximum error correction capability of the receiving end device + 2. In this scenario, the code word with the number of corrected symbols greater than P-2 is actually an uncorrectable code word. The maximum number of symbols that can be corrected by the receiving end device can be equal to the maximum number of bits that can be corrected by the receiving end device.
[0155] In another specific example, the number of corrected symbols corresponding to the P counters can also be discontinuous, for example, when P equals 3, the number of corrected symbols corresponding to the 3 counters can be: 0, 1, and 3.
[0156] In an example, after the receiving end device receives the data stream, the data stream can be synchronized, and then the data stream after synchronization can be deinterleaved, for example, based on PAM4 symbols to obtain a plurality of code words. Further, each code word in the plurality of code words is subjected to FEC error correction to determine the number of corrected symbols in each code word, thereby updating the value of at least one of the P counters. As a specific example, for any code word, after determining the number of corrected symbols in the code word, the counter corresponding to the number of symbols can be incremented by 1. For example:
[0157] P equals to 5, and the P counters are P0, P1, P2, P3, and P3+ respectively. P0 is used to record the number of code words with 0 corrected symbols, P1 is used to record the number of code words with 1 corrected symbol, P2 is used to record the number of code words with 2 corrected symbols, P3 is used to record the number of code words with 3 corrected symbols, and P3+ is used to record the number of code words with more than 3 corrected symbols. For a code word 1 in the data stream, it is determined by FEC correction that the code word 1 is corrected by 2 symbols, and then the counter P2 is increased by 1.
[0158] As an example, for any code word, the code word can be decoded by using an FEC decoder, the FEC decoder decodes the code word and corrects the code word, and accordingly, based on the decoding of the code word by the FEC decoder, the number of corrected bits or the number of corrected symbols in the code word can be determined.
[0159] Taking the determination of the number of corrected bits in the code word as an example, it can be understood with reference to Figure 3 Figure 3 A schematic diagram of a data processing process provided by an embodiment of the present application. As shown in Figure 3 After the receiving end device receives the data stream, it can first perform deinterleaving decoding based on PAM4 symbols, further synchronize the data stream after decoding, then delete the pad in the data stream after synchronization, and perform 1:8 bit pair deinterleaving on the data stream after deleting the pad. One deinterleaving can obtain 8 FEC code words, which correspond to Figure 3 FEC code word 0 to FEC code word 7 as shown. In addition, the receiving end device includes 8 FEC decoders for decoding the 8 FEC code words obtained by one deinterleaving. In other words, after one deinterleaving obtains 8 FEC code words, the 8 FEC code words are FEC decoded by using the 8 FEC decoders FEC decoder 0 to FEC decoder 7 respectively, so as to obtain the number of corrected bits in each of the 8 FEC code words FEC code word 0 to FEC code word 7.
[0160] In an example, after using P counters to record the number of code words with different numbers of corrected bits in the data stream respectively, the burst error can be further detected based on the values recorded by the P counters respectively. The detection of the burst error mentioned here can be the detection of whether the burst error occurs in the data stream, the detection of the number of times of the burst error occurring in the data stream, the detection of the corresponding data length when the burst error occurs in the data stream, etc. How to use the number recorded by the P counters respectively to detect the burst error is not limited in the embodiments of the present application.
[0161] In yet another example, after the P counters respectively record the number of codewords in the data stream that are corrected by different number of bits, the error rate can be further calculated based on the values respectively recorded by the P counters. For the error rate, reference can be made to the description of the error rate above, which will not be repeated here. For how to calculate the error rate by using the number respectively recorded by the P counters, the embodiments of the present application are not limited in particular.
[0162] In another example, after the P counters respectively record the number of codewords in the data stream that are corrected by different number of bits, the error rate can be further calculated based on the values respectively recorded by the P counters. For the error rate, reference can be made to the description of the error rate above, which will not be repeated here. For how to calculate the error rate by using the number respectively recorded by the P counters, the embodiments of the present application are not limited in particular.
[0163] In one example, after the P counters respectively record the number of codewords in the data stream that are corrected by different number of bits, the error rate can be further calculated based on the values respectively recorded by the P counters. For the error rate, reference can be made to the description of the error rate above, which will not be repeated here. For how to calculate the error rate by using the number respectively recorded by the P counters, the embodiments of the present application are not limited in particular.
[0164] In yet another example, after the P counters respectively record the number of codewords in the data stream that are corrected by different number of bits, the error rate can be further calculated based on the values respectively recorded by the P counters. For the error rate, reference can be made to the description of the error rate above, which will not be repeated here. For how to calculate the error rate by using the number respectively recorded by the P counters, the embodiments of the present application are not limited in particular.
[0165] In another example, after the P counters respectively record the number of codewords in the data stream that are corrected by different number of bits, the error rate can be further calculated based on the values respectively recorded by the P counters. For the error rate, reference can be made to the description of the error rate above, which will not be repeated here. For how to calculate the error rate by using the number respectively recorded by the P counters, the embodiments of the present application are not limited in particular.
[0166] As can be seen from the above description, the embodiment of the present application provides a new data statistics method. The receiving end device can use P counters to record the number of codewords with different numbers of corrected bits or symbols in the data stream. Optionally, the values recorded by the P counters can be analyzed subsequently to determine the communication quality provided by the transmission channel (for example, to detect burst errors or calculate the error rate). Alternatively, the values recorded by the P counters can be analyzed subsequently to determine whether the data processing operation (for example, the data stream synchronization operation) of the receiving end device is abnormal.
[0167] The embodiment of the present application also provides another data statistics method. Next, the data statistics method will be introduced in combination with the accompanying drawings.
[0168] Referring to Figure 4 The figure is a flowchart of another data statistics method provided by the embodiment of the present application. Figure 4 The method shown can be applied to a receiving end device. The description of the receiving end device can refer to the description in the foregoing description section, which will not be repeated here.
[0169] Figure 4 The method shown includes the following S201-S203.
[0170] S201: receiving a data stream.
[0171] The receiving end device can receive the data stream sent by the sending end, and the data stream includes one or more bits. In an example, the data stream can be obtained by interleaving the FEC codeword encoded by the multi-path FEC encoder. In an example, the FEC codeword encoded by the multi-path FEC encoder can be interleaved based on PAM4 symbols.
[0172] S202: obtaining at least one codeword group from the data stream, each codeword group in the at least one codeword group including Q codewords obtained by deinterleaving, Q being greater than or equal to 2.
[0173] In an example, after the receiving end device receives the data stream, the receiving end device can perform PAM4 decoding, pad deletion, and data stream synchronization operation on the data stream in sequence, and then deinterleaves the data stream after synchronization to obtain a plurality of codewords. For example, the receiving end device can deinterleave the data stream after synchronization based on PAM4 symbols to obtain a plurality of codewords. Further, the at least one codeword group is obtained based on the plurality of codewords. For each codeword group in the at least one codeword group, the codeword group includes Q codewords obtained by deinterleaving one or more times, and Q is an integer greater than or equal to 2. For example, in an example, the receiving end device can deinterleave the data stream after synchronization based on PAM4 symbols to obtain a plurality of codewords, and then obtain the at least one codeword group based on the plurality of codewords. Figure 1In the illustrated scenario, one deinterleaving can obtain 8 FEC codewords, and when a codeword group includes Q codewords obtained by one deinterleaving, the value of Q can be 2, 3, 4, 5, 6, 7, or 8. For example, when the value of Q is equal to 8, the 8 FEC codewords obtained by one deinterleaving constitute a codeword group. When a codeword group includes Q codewords obtained by multiple deinterleavings, the value of Q can be greater than 8, for example. The codeword mentioned in the embodiments of the present application can be an FEC codeword, and the two terms can be used interchangeably. The FEC codeword can be an FEC outer code codeword, and in the scenario of a concatenated code, the FEC codeword can also be an FEC inner code codeword.
[0174] S203: Count the number of codeword groups in which different numbers of bits or symbols are corrected in the at least one codeword group.
[0175] In one example, after obtaining the at least one codeword group, for any one codeword group, error correction (for example, FEC error correction) can be performed on each codeword in the codeword group to determine the number of bits corrected for each codeword. Further, in one example, the number of bits corrected for each codeword group can be summed to obtain the number of bits corrected for the codeword group. For example, a codeword group includes 8 codewords, and each of the 8 codewords is corrected by 1 bit, so the number of bits corrected for the codeword group is 8. In yet another example, the number of symbols corrected for each codeword group can be summed to obtain the number of symbols corrected for the codeword group. For example, a codeword group includes 8 codewords, and each of the 8 codewords is corrected by 1 symbol, so the number of symbols corrected for the codeword group is 8.
[0176] In one example, the receiving end device is provided with R counters. As one example, the R counters are used to record the number of codeword groups in which different numbers of bits are corrected in the at least one codeword group according to the number of bits corrected for each codeword group in the at least one codeword group. As another example, the R counters are used to record the number of codeword groups in which different numbers of symbols are corrected in the at least one codeword group according to the number of symbols corrected for each codeword group in the at least one codeword group. R can be a positive integer greater than or equal to 3.
[0177] In the case where the R counters are used to record the number of codeword groups in which different numbers of bits are corrected in the at least one codeword group, any two counters of the R counters correspond to different numbers of bits corrected.
[0178] In one specific example, the numbers of bits corrected corresponding to the R counters are consecutive, for example, 0 to R-2, and more than R-2, respectively. For example:
[0179] When R equals 3, the 3 counters respectively correspond to the number of corrected bits which can be: 0, 1 and more than 1;
[0180] When R equals 4, the 4 counters respectively correspond to the number of corrected bits which can be: 0, 1, 2 and more than 2;
[0181] When R equals 5, the 5 counters respectively correspond to the number of corrected bits which can be: 0, 1, 2, 3 and more than 3;
[0182] And so on.
[0183] The embodiment of the present application does not specifically limit the specific value of R, and R can be greater than or equal to 3.
[0184] In one example, the value of R can be determined according to the maximum error correction capability of the receiving end device and the number Q of codewords included in one codeword group. In one specific example, the value of R can be the product of the maximum error correction capability of the receiving end device and Q plus 2. For example, the value of Q is 8, the maximum error correction capability of the receiving end device is 3 bits, and the value of R can be 26. In this scenario, the codeword group in which the number of corrected bits is more than R-2 is actually a codeword group in which all the Q included codewords cannot be corrected.
[0185] The maximum error correction capability of the receiving end device can be referred to the relevant description above, which is not repeated here.
[0186] In yet another specific example, the number of corrected bits corresponding to the aforementioned R counters can also be discontinuous. For example, R equals 3, and the 3 counters respectively correspond to the number of corrected bits which can be: 0, 8, 16.
[0187] In the scenario of recording the number of codeword groups in which different numbers of bits are corrected in the at least one codeword group by using R counters, for any one codeword group, after determining the number of corrected bits in the codeword group, the counter corresponding to the number of bits can be added by 1. For example:
[0188] R equals 26, and the R counters are R0, R1, R2, R3, …, R24 and R24+. R0 is used to record the number of codeword groups in which 0 bits are corrected, R1 is used to record the number of codeword groups in which 1 bit is corrected, R2 is used to record the number of codeword groups in which 2 bits are corrected, R3 is used to record the number of codeword groups in which 3 bits are corrected, and so on, R24 is used to record the number of codeword groups in which 24 bits are corrected, and R24+ is used to record the number of codeword groups in which more than 24 bits are corrected. For codeword group 1 in the at least one codeword group, after error correction, it is determined that 8 bits in the codeword group 1 are corrected, and then the counter R8 is added by 1.
[0189] In the case that the R counters are used to record the number of code word groups in the at least one code word group that have different number of corrected symbols, any two counters of the R counters correspond to different number of corrected symbols.
[0190] In one specific example, the number of corrected symbols corresponding to the R counters are consecutive, for example, 0 to R-2, and more than R-2, respectively. For example:
[0191] When R equals 3, the number of corrected symbols corresponding to the 3 counters can be 0, 1, and more than 1, respectively.
[0192] When R equals 4, the number of corrected symbols corresponding to the 4 counters can be 0, 1, 2, and more than 2, respectively.
[0193] When R equals 5, the number of corrected symbols corresponding to the 5 counters can be 0, 1, 2, 3, and more than 3, respectively.
[0194] And so on.
[0195] The embodiments of the present application do not specifically limit the specific value of R, and R can be greater than or equal to 3.
[0196] In one example, the value of R can be determined according to the maximum error correction capability of the receiving end device and the number Q of code words included in a code word group. In one specific example, the value of R can be the product of the maximum error correction capability of the receiving end device and Q plus 2. For example, the value of Q is 8, the maximum error correction capability of the receiving end device is 3 symbols, and the value of R can be 26. In this scenario, the code word group with the number of corrected symbols more than R-2 is actually a code word group in which all the Q code words included therein cannot be corrected.
[0197] The maximum error correction capability of the receiving end device can refer to the related description above, which is not repeated here.
[0198] In yet another specific example, the number of corrected symbols corresponding to the aforementioned R counters can also be discontinuous. For example, R equals 3, and the number of corrected symbols corresponding to the 3 counters can be 0, 8, and 16, respectively.
[0199] In the scenario of recording the number of code word groups in the at least one code word group that have different number of corrected symbols by using R counters, for any code word group, after determining the number of corrected symbols in the code word group, the counter corresponding to the number of corrected symbols can be incremented by 1. For example:
[0200] R is equal to 26, and the R counters are R0, R1, R2, R3, ..., R24, and R24+. R0 is used to record the number of codeword groups corrected by 0 symbols, R1 is used to record the number of codeword groups corrected by 1 symbol, R2 is used to record the number of codeword groups corrected by 2 symbols, R3 is used to record the number of codeword groups corrected by 3 symbols, and so on. R24 is used to record the number of codeword groups corrected by 24 symbols, and R24+ is used to record the number of codeword groups corrected by more than 24 symbols. For codeword group 1 in the at least one codeword group, if error correction determines that codeword group 1 has been corrected by 8 symbols, then counter R8 is incremented by 1.
[0201] As an example, for any codeword, the codeword can be decoded using an FEC decoder. When the FEC decoder decodes the codeword, it will perform FEC error correction on the codeword. Accordingly, based on the decoding of the codeword by the FEC decoder, the number of corrected bits or symbols in the codeword can be determined.
[0202] For example, to determine the number of corrected bits in a codeword, refer to Figure 5 To understand, Figure 5 This is a schematic diagram of a data processing flow provided in an embodiment of the present application. Figure 5 As shown, after receiving the data stream, the receiving end device can first perform deinterleaving decoding based on the PAM4 symbol, further synchronize the decoded data stream, and then delete the pad in the synchronized data stream, and perform 1:8 bit deinterleaving on the data stream obtained by deleting the pad. One deinterleaving can obtain 8 FEC codewords, corresponding to Figure 5 FEC codeword 0 to FEC codeword 7 are shown. In one example, the eight FEC codewords FEC codeword 0 to FEC codeword 7 can constitute a codeword group. Furthermore, each codeword in the codeword group can be error corrected separately. Specifically, the receiving end device includes eight FEC decoders for decoding the eight FEC codewords obtained by one deinterleaving. When the FEC decoders decode the FEC codewords, they perform error correction on the FEC codewords. In other words, after one deinterleaving obtains eight FEC codewords, the eight FEC decoders FEC decoder 0 to FEC decoder 7 are used to perform FEC decoding on FEC codeword 0 to FEC codeword 7, respectively. The number of corrected bits for each of the eight FEC codewords FEC codeword 0 to FEC codeword 7 can be obtained. Correspondingly, the number of corrected bits for each of the eight FEC codewords FEC codeword 0 to FEC codeword 7 can be summed to obtain the number of corrected bits for the codeword group.
[0203] In an embodiment of the present application, the method for counting the number of codeword groups in which different numbers of bits or symbols are corrected in the at least one codeword group is not limited to the aforementioned R counters. Any method that can perform quantity statistics can be used to count the number of codeword groups in which different numbers of bits or symbols are corrected in the at least one codeword group, and they are not listed one by one here.
[0204] In a specific example, the receiving end device may further be provided with at least one of a codeword group quantity counter, a codeword quantity counter, and a bit quantity counter.
[0205] The codeword group quantity counter is used to record the total number of codeword groups included in the data stream. In one example, the receiving device increases the codeword group quantity counter by 1 each time it obtains a codeword group based on the deinterleaved codeword.
[0206] The codeword quantity counter is used to record the total number of codewords included in the data stream. In one example, when the receiving end device deinterleaves K codewords, the codeword quantity counter is incremented by K. The value of K can be a positive integer, for example, Figure 1 In the scenario shown, the value of K is 8. In one example, the value of the codeword quantity counter may be the product of the value of the codeword group quantity counter and the number Q of codewords included in each codeword group.
[0207] The bit quantity counter is used to record the total number of bits included in the data stream. In one example, the receiving device may increment the bit quantity counter by 1 each time a bit is received. In one example, the value of the bit quantity counter may be the product of the value of the codeword quantity counter and the number of bits included in each codeword.
[0208] In one example, after counting the number of codeword groups with different numbers of bits corrected in the at least one codeword group, burst errors can be detected based on the statistical results. As a specific example, after using R counters to respectively record the number of codeword groups with different numbers of bits corrected in the at least one codeword group, burst errors can be further detected based on the values respectively recorded by the R counters. The detection of burst errors mentioned here can be detecting whether a burst error has occurred in the data stream, or detecting the number of burst errors occurring in the data stream, or detecting the data length corresponding to the burst error occurring in the data stream, etc. The embodiments of the present application do not specifically limit how to detect burst errors using the numbers respectively recorded by the R counters.
[0209] In the case that the receiving end device is further provided with at least one of the code word group number counter, the code word number counter and the bit number counter, the receiving end device can detect the burst error in combination with the values recorded by the at least one of the code word group number counter, the code word number counter and the bit number counter, and the values recorded by the R counters respectively.
[0210] In another example, after counting the number of code word groups in the at least one code word group in which different numbers of bits are corrected, the error rate can be calculated according to the counting result. As a specific example, after the R counters record the number of code word groups in the at least one code word group in which different numbers of bits are corrected respectively, the error rate can be further calculated based on the values recorded by the R counters respectively. For the error rate, reference can be made to the foregoing description of the error rate, which will not be repeated here. For how to calculate the error rate by using the numbers recorded by the R counters respectively, the embodiments of the present application are not specifically limited.
[0211] In the case that the receiving end device is further provided with at least one of the code word group number counter, the code word number counter and the bit number counter, the receiving end device can calculate the error rate in combination with the values recorded by the at least one of the code word group number counter, the code word number counter and the bit number counter, and the values recorded by the R counters respectively.
[0212] In another example, after counting the number of code word groups in the at least one code word group in which different numbers of bits are corrected, the error rate can be calculated according to the counting result. As a specific example, after the R counters record the number of code word groups in the at least one code word group in which different numbers of bits are corrected respectively, the error rate can be further calculated based on the values recorded by the R counters respectively. For the error rate, reference can be made to the foregoing description of the error rate, which will not be repeated here. For how to calculate the error rate by using the numbers recorded by the R counters respectively, the embodiments of the present application are not specifically limited.
[0213] In the case that the receiving end device is further provided with at least one of the code word group number counter, the code word number counter and the bit number counter, the receiving end device can detect the burst error in combination with the values recorded by the at least one of the code word group number counter, the code word number counter and the bit number counter, and the values recorded by the R counters respectively.
[0214] In one example, after counting the number of code word groups with different number of corrected symbols in the at least one code word group, the burst error can be detected according to the counting result. As a specific example, after using the R counters to record the number of code word groups with different number of corrected symbols in the at least one code word group respectively, the burst error can be further detected based on the values recorded by the R counters respectively. The detection of the burst error mentioned herein can be the detection of whether the burst error occurs in the data stream, the detection of the number of times of the burst error occurring in the data stream, the detection of the data length corresponding to the burst error occurring in the data stream, etc. The application embodiments do not make specific limitation on how to use the number recorded by the R counters respectively to detect the burst error.
[0215] In the case that the receiving end device is further provided with at least one of the code word group number counter, the code word number counter and the symbol number counter, the receiving end device can detect the burst error in combination with the values recorded by the at least one of the code word group number counter, the code word number counter and the symbol number counter, and the values recorded by the R counters respectively.
[0216] In another example, after counting the number of code word groups with different number of corrected symbols in the at least one code word group, the error rate can be calculated according to the counting result. As a specific example, after using the R counters to record the number of code word groups with different number of corrected symbols in the at least one code word group respectively, the error rate can be further calculated based on the values recorded by the R counters respectively. The error rate can be referred to the description of the error rate in the foregoing description part, which will not be repeated herein. The application embodiments do not make specific limitation on how to use the number recorded by the R counters respectively to calculate the error rate.
[0217] In the case that the receiving end device is further provided with at least one of the code word group number counter, the code word number counter and the symbol number counter, the receiving end device can calculate the error rate in combination with the values recorded by the at least one of the code word group number counter, the code word number counter and the symbol number counter, and the values recorded by the R counters respectively.
[0218] In another example, after counting the number of code word groups with different number of corrected symbols in the at least one code word group, the receiving end device can detect whether the data stream is in synchronization error according to the counting result. As a specific example, after using the R counters to record the number of code word groups with different number of corrected symbols in the at least one code word group respectively, the receiving end device can further detect whether the data stream is in synchronization error based on the values recorded by the R counters respectively. For the data stream synchronization, refer to the foregoing description, which will not be repeated here. For how to use the number recorded by the R counters to detect whether the data stream is in synchronization error, the embodiments of the present application are not limited in particular.
[0219] In the case that the receiving end device is further provided with at least one of the code word group number counter, the code word number counter and the symbol number counter, the receiving end device can detect whether the data stream is in synchronization error in combination with the values recorded by the at least one of the code word group number counter, the code word number counter and the symbol number counter, and the values recorded by the R counters respectively.
[0220] As can be seen from the foregoing description, the embodiments of the present application provide a new data counting method, and the receiving end device can use the R counters to record the number of code word groups with different number of corrected bits or symbols in the at least one code word group respectively. Optionally, the values recorded by the R counters can be analyzed subsequently to determine the communication quality provided by the transmission channel (for example, to detect burst error or to calculate error rate). Alternatively, the values recorded by the R counters can be analyzed subsequently to determine whether the data processing operation (for example, data stream synchronization operation) of the receiving end device is abnormal.
[0221] In one example, for the receiving end device, at least one of the R counters of the foregoing P counters can be provided, and optionally, at least one of the code word group number counter, the code word number counter and the bit number counter can also be provided. Correspondingly, the receiving end device can use the values recorded by the counters provided by itself to perform one or more of the following operations: detecting burst error, calculating error rate, and detecting whether the data stream is in synchronization error.
[0222] The data counting method provided by the embodiments of the present application is introduced above, and next, the scheme of the embodiments of the present application will be introduced in combination with the architecture of the receiving end device.
[0223] Referring to Figure 6 FIG. 1 is a structural schematic diagram of a receiving end device provided by an embodiment of the present application. Figure 6The receiving end device 600 shown includes a PAM4 decoding module 601, a data stream synchronization module 602, a pad deletion module 603, a deinterleaving module 604, and an error correction module 605, and the data statistics device 600 is configured to execute the data statistics method executed by the receiving end device provided in the above method embodiments. Wherein:
[0224] The PAM4 decoding module 601 is configured to perform PAM4 decoding on the received data stream, and the data stream obtained by performing PAM4 decoding is transmitted to the data stream synchronization module.
[0225] The data stream synchronization module 602 is configured to synchronize the data stream transmitted by the PAM4 decoding module 601, and transmit the data stream after synchronization to the pad deletion module 603.
[0226] The pad deletion module 603 is configured to perform a pad deletion operation on the data stream transmitted by the data stream synchronization module 602, and transmit the data stream obtained after performing the pad deletion operation to the deinterleaving module 604.
[0227] The deinterleaving module 604 is configured to deinterleave the data stream transmitted by the pad deletion module 603 based on PAM4 symbols to obtain at least one codeword.
[0228] The error correction module 605 is configured to correct each codeword to determine the number of bits or symbols corrected in each codeword.
[0229] In one example, the error correction module 605 can include at least one FEC decoder, for example, can include 8 FEC decoders. In one example, the receiving end device can update the aforementioned P counters based on the number of bits or symbols corrected in each codeword.
[0230] In another example, the receiving end device can further determine the number of bits or symbols corrected in the codeword group based on the number of bits or symbols corrected in each codeword belonging to the same codeword group, thereby updating the number of codeword groups with different numbers of corrected bits or symbols, for example, updating the aforementioned R counters.
[0231] Based on the data statistics method provided in the above embodiments, the present application further provides a corresponding device, and next, the device will be introduced in combination with the drawings.
[0232] Referring to Figure 7 , the figure is a structural schematic diagram of a data statistics device provided in an embodiment of the present application. Figure 7The illustrated data statistics device 700 includes a receiving unit 701 and a processing unit 702, and is configured to perform the data statistics method performed by the receiving end device in the above method embodiments.
[0233] In a possible implementation, the receiving end device includes a chip, an optical module, a network card, a network device, or a server.
[0234] In a specific example, the device 700 is configured to perform at least the above method embodiments and the corresponding data statistics method. Figure 2 For this case:
[0235] The receiving unit 701 is configured to receive a data stream.
[0236] The processing unit 702 is configured to record, by P counters respectively, the number of codewords with different numbers of corrected bits or symbols in the data stream, where P is greater than or equal to 3.
[0237] In a possible implementation, the processing unit 702 is further configured to: detect burst errors according to the values recorded by the P counters respectively; or calculate an error rate according to the values recorded by the P counters respectively, or detect whether the data stream is out of synchronization according to the values recorded by the P counters respectively.
[0238] In a possible implementation, the numbers of corrected bits or symbols corresponding to the P counters are 0 to P-2 and more than P-2 respectively.
[0239] In a possible implementation, when the number of corrected bits or symbols in a codeword in the data stream is determined, the counter corresponding to the number of bits or symbols is incremented by 1.
[0240] In a possible implementation, the processing unit 702 is further configured to: obtain at least one codeword group from the data stream, each codeword group in the at least one codeword group including Q deinterleaved codewords, where Q is greater than or equal to 2; and count the number of codeword groups with different numbers of corrected bits or symbols in the at least one codeword group.
[0241] In a possible implementation, the processing unit 702 is further configured to perform at least one of the following: detect burst errors according to the number of codeword groups with different numbers of corrected bits or symbols in the at least one codeword group; or calculate an error rate according to the number of codeword groups with different numbers of corrected bits or symbols in the at least one codeword group, or detect whether the data stream is out of synchronization according to the number of codeword groups with different numbers of corrected bits or symbols in the at least one codeword group.
[0242] In a possible implementation, the R counters respectively record the number of code word groups in the at least one code word group that are corrected for different numbers of bits or symbols, and R is greater than or equal to 3.
[0243] In a possible implementation, the R counters respectively correspond to the numbers of bits or symbols that are corrected for 0 to R-2, and more than R-2.
[0244] In a possible implementation, when determining the number of bits or symbols that are corrected in one code word group in the at least one code word group, the counter corresponding to the number of bits or symbols is incremented by 1.
[0245] In a possible implementation, the processing unit 702 is further configured to perform at least one of the following: a code word group number counter records the total number of code word groups included in the data stream; a code word number counter records the total number of code words included in the data stream; and a bit number counter records the total number of bits included in the data stream.
[0246] In yet another specific example, the apparatus 700 is configured to perform at least the above method embodiments and the corresponding data statistics method. Figure 4 For this case:
[0247] The receiving unit 701 is configured to receive a data stream.
[0248] The processing unit 702 is configured to obtain at least one code word group from the data stream, each code word group in the at least one code word group including Q code words obtained through deinterleaving, and Q is greater than or equal to 2; and to count the number of code word groups in the at least one code word group that are corrected for different numbers of bits or symbols.
[0249] In a possible implementation, the processing unit 702 is further configured to: detect a burst error according to the number of code word groups in the at least one code word group that are corrected for different numbers of bits or symbols; or calculate an error rate according to the number of code word groups in the at least one code word group that are corrected for different numbers of bits or symbols; or detect whether the data stream is out of synchronization according to the number of code word groups in the at least one code word group that are corrected for different numbers of bits or symbols.
[0250] In a possible implementation, the R counters respectively record the number of code word groups in the at least one code word group that are corrected for different numbers of bits or symbols, and R is greater than or equal to 3.
[0251] In a possible implementation, the R counters respectively correspond to the numbers of bits or symbols that are corrected for 0 to R-2, and more than R-2.
[0252] In a possible implementation, when determining the number of bits or the number of symbols corrected in one of the at least one code word group, a counter corresponding to the number of bits or the number of symbols is incremented by 1.
[0253] In a possible implementation, the processing unit 702 is further configured to perform at least one of the following: a code word group number counter records a total number of code word groups included in the data stream; a code word number counter records a total number of code words included in the data stream; and a bit number counter records a total number of bits included in the data stream.
[0254] In a possible implementation, the processing unit 702 is further configured to: P counters respectively record numbers of code words in the data stream that are corrected for different numbers of bits or symbols, where P is greater than or equal to 3.
[0255] In a possible implementation, the processing unit 702 is further configured to: detect a burst error according to values respectively recorded by the P counters; or calculate an error rate according to values respectively recorded by the P counters, or detect whether the data stream is out of synchronization according to values respectively recorded by the P counters.
[0256] In a possible implementation, the P counters respectively correspond to numbers of corrected bits or symbols that are 0 to P-2, and more than P-2.
[0257] In a possible implementation, when determining the number of bits or the number of symbols corrected in one of the at least one code word group, a counter corresponding to the number of bits or the number of symbols is incremented by 1.
[0258] In a possible implementation, the code word includes a forward error correction (FEC) code word.
[0259] In a possible implementation, the FEC code word includes an FEC inner code code word, or an FEC outer code code word.
[0260] Referring to Figure 8 FIG. 1 is a structural schematic diagram of an apparatus provided by an embodiment of the present application. Figure 8 The apparatus 800 shown includes an interface circuit 801 and a processing circuit 802. The interface circuit 801 is configured to receive and / or send data, and the processing circuit 802 is configured to perform data processing.
[0261] In one example, the apparatus 800 can be applied to the receiving end device described above, and is configured to perform the method performed by the receiving end device provided by the method embodiments described above.
[0262] In a specific example, the device 800 is used to perform the above Figure 2 The corresponding method for this situation:
[0263] The interface circuit 801 is used to receive a data stream; the processing circuit 802 is used to use P counters to respectively record the number of code words with different numbers of bits or symbols corrected in the data stream, where P is greater than or equal to 3.
[0264] In another specific example, the device 800 is used to perform the above Figure 4 The corresponding method for this situation:
[0265] The interface circuit 801 is used to receive a data stream; the processing circuit 802 is used to obtain at least one codeword group based on the data stream, each codeword group in the at least one codeword group includes Q codewords obtained by deinterleaving, where Q is greater than or equal to 2; and count the number of codeword groups in the at least one codeword group that have different numbers of bits or symbols corrected.
[0266] See also Figure 9 , which is a structural schematic diagram of a device provided in an embodiment of the present application.
[0267] In one example, Figure 9 The device 900 shown may correspond to the receiving end device mentioned in the above embodiment, and is used to execute the method performed by the receiving end device provided in the above method embodiment.
[0268] See also Figure 9 As shown, the device 900 includes: a processor 910 and a communication interface 920. The number of processors 910 in the device 900 can be one or more. Figure 9 A processor is used as an example.
[0269] The communication interface 920 is used to receive and / or send data. The processor 910 is used to process the data. For example, when the device 900 is used to execute Figure 2 When the device 900 is used to execute the method corresponding to Figure 4In the corresponding method, the communication interface 920 is configured to receive a data stream. The processor 910 is configured to obtain at least one code word group from the data stream, each code word group in the at least one code word group including Q code words obtained by deinterleaving, Q being greater than or equal to 2; and count a number of code word groups in the at least one code word group that are corrected by different numbers of bits or symbols. The processor 910 can be a central processing unit (CPU), an NP, or a combination of a CPU and an NP. The processor 910 can further include a hardware chip. The hardware chip can be an ASIC, a programmable logic device (PLD), or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0270] In one example, the device 900 further includes a memory 930. The memory 930 can include a volatile memory (e.g., a random-access memory (RAM)), a non-volatile memory (e.g., a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD)), or a combination thereof. The memory 930 can store, for example, values recorded by the aforementioned P counters and / or R counters.
[0271] Optionally, the memory 930 stores an operating system and programs, executable modules, or data structures, or a subset thereof, or an extended set thereof, where the programs can include various operation instructions for implementing various operations. The operating system can include various system programs for implementing various basic services and processing hardware-based tasks. The processor 910 can read the programs in the memory 930 to implement the methods provided in the embodiments of the present application.
[0272] In one example, the processor 910, the communication interface 920, and the memory 930 can be connected through a bus system or other means. Figure 9 For example, the processor 910, the communication interface 920, and the memory 930 are connected through the bus system 940.
[0273] The bus system 940 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus system 940 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 Only one thick line is used to represent the bus in the figure, but it does not mean that there is only one bus or only one type of bus.
[0274] Referring to Figure 10 The figure is a structural schematic diagram of a chip or optical module provided by an embodiment of the present application. Figure 10 The chip or optical module 1000 shown includes an interface circuit 1001 and a processing circuit 1002. The interface circuit 1001 is configured to receive and / or send data, and the processing circuit 1002 is configured to perform data processing.
[0275] In one example, the chip or optical module 1000 can be applied to the above receiving end device to perform the method performed by the receiving end device provided by the above method embodiment.
[0276] In one specific example, the chip or optical module 1000 is configured to perform the above method corresponding to Figure 2 For this case:
[0277] The interface circuit 1001 is configured to receive a data stream, and the processing circuit 1002 is configured to record the number of code words with different numbers of corrected bits or symbols in the data stream by P counters respectively, P being greater than or equal to 3.
[0278] In yet another specific example, the chip or optical module 1000 is configured to perform the above method corresponding to Figure 4 For this case:
[0279] The interface circuit 1001 is configured to receive a data stream, and the processing circuit 1002 is configured to obtain at least one code word group from the data stream, each code word group in the at least one code word group including Q code words obtained by deinterleaving, Q being greater than or equal to 2, and count the number of code word groups with different numbers of corrected bits or symbols in the at least one code word group.
[0280] The embodiment of the present application provides a computer readable storage medium including instructions or a computer program, which, when running on a computer, causes the computer to perform the method described in the above method embodiment.
[0281] The embodiment of the present application provides a computer program product containing instructions or a computer program, which, when running on a computer, causes the computer to execute the method described in the above method embodiment.
[0282] The terms "first", "second", "third", "fourth" and the like in the description of the specification and claims of the present application and the above-mentioned drawings, if any, are used to distinguish similar objects, and do not necessarily have to be used to describe a particular order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0283] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0284] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical business division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0285] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0286] In addition, each business unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or software business unit.
[0287] If the integrated unit is implemented in the form of a software service unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0288] Those skilled in the art should realize that, in one or more examples described above, the services described in the present application can be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these services can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. The computer-readable medium includes a computer storage medium and a communication medium, wherein the communication medium includes any medium that facilitates the transfer of a computer program from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0289] The above detailed description of the specific embodiments of the present application has further explained the purposes, technical solutions, and beneficial effects of the present application. It should be understood that the above is only a specific embodiment of the present application.
[0290] The above, the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A data statistics method, characterized by, The method comprises: receiving a data stream; P counters respectively record the number of codewords with different number of corrected bits in the data stream, and P is greater than or equal to 3.
2. The method of claim 1, wherein, The method further comprises: detecting burst error according to the values recorded by the P counters respectively; or, calculating error rate according to the values recorded by the P counters respectively; or, detecting whether the data stream is synchronous error according to the values recorded by the P counters respectively.
3. The method according to claim 1 or 2, characterized in that, The number of corrected bits corresponding to the P counters respectively are 0 to P-2 and more than P-2.
4. The method according to any one of claims 1 to 3, characterized in that, When the number of corrected bits in a codeword in the data stream is determined, the counter corresponding to the number of bits is added by 1.
5. The method according to any one of claims 1 to 4, characterized in that, The method further comprises: obtaining at least one codeword group from the data stream, each codeword group in the at least one codeword group comprising Q codewords obtained by deinterleaving, and Q is greater than or equal to 2; counting the number of codeword groups with different number of corrected bits in the at least one codeword group.
6. The method of claim 5, wherein, The method further comprises: detecting burst error according to the values of the codeword groups with different number of corrected bits in the at least one codeword group; or, calculating error rate according to the values of the codeword groups with different number of corrected bits in the at least one codeword group; or, detecting whether the data stream is synchronous error according to the values of the codeword groups with different number of corrected bits in the at least one codeword group.
7. The method according to claim 5 or 6, characterized in that, R counters respectively record the number of codeword groups with different number of corrected bits in the at least one codeword group, and R is greater than or equal to 3.
8. The method of claim 7, wherein, The number of corrected bits corresponding to the R counters respectively are 0 to R-2 and more than R-2.
9. The method according to claim 7 or 8, characterized in that, When the number of corrected bits in a codeword group in the at least one codeword group is determined, the counter corresponding to the number of bits is added by 1.
10. The method according to any one of claims 1 to 9, characterized in that, The method further comprises at least one of the following: a codeword group number counter records the total number of codeword groups included in the data stream; a codeword number counter records the total number of codewords included in the data stream; a bit number counter records the total number of bits included in the data stream.
11. The method of claim 2 or 6, wherein, The error rate comprises: one or more of bit error rate, codeword error rate, symbol error rate and frame loss rate.
12. A data statistics method, characterized by, The method applied to a communication device comprises: receiving a data stream; obtaining at least one codeword group from the data stream, each codeword group in the at least one codeword group comprising Q codewords obtained by deinterleaving, and Q is greater than or equal to 2; counting the number of codeword groups with different number of corrected bits in the at least one codeword group.
13. The method of claim 12, wherein, The method further comprises: detecting burst error according to the values of the codeword groups with different number of corrected bits in the at least one codeword group; or, calculating error rate according to the values of the codeword groups with different number of corrected bits in the at least one codeword group; or, detecting whether the data stream is synchronous error according to the values of the codeword groups with different number of corrected bits in the at least one codeword group.
14. The method according to claim 12 or 13, characterized in that, R counters respectively record the number of codeword groups with different number of corrected bits in the at least one codeword group, and R is greater than or equal to 3.
15. The method of claim 14, wherein, The R counters respectively correspond to the number of corrected bits being 0 to R-2 and more than R-2.
16. The method according to claim 14 or 15, characterized in that When determining the number of corrected bits in one code word group in the at least one code word group, the counter corresponding to the number of bits is added by 1.
17. The method according to any one of claims 12-16, characterized by, The method further comprises at least one of the following: A code word group number counter records the total number of code word groups included in the data stream. A code word number counter records the total number of code words included in the data stream. A bit number counter records the total number of bits included in the data stream.
18. The method according to any one of claims 12-17, characterized by, The method further comprises: P counters respectively record the number of code words in the data stream having different numbers of corrected bits, and P is greater than or equal to 3.
19. The method of claim 18, wherein, The method further comprises: According to the values recorded by the P counters respectively, detecting burst errors; or, According to the values recorded by the P counters respectively, calculating error rates, or, According to the values recorded by the P counters respectively, detecting whether the data stream has synchronization errors.
20. The method of claim 18 or 19, wherein, The P counters respectively correspond to the number of corrected bits being 0 to P-2 and more than P-2.
21. The method of any one of claims 18-20, wherein, When determining the number of corrected bits in one code word in the data stream, the counter corresponding to the number of bits is added by 1.
22. The method of claim 13 or 19, wherein, The error rate comprises: One or more of a bit error rate, a code word error rate, a symbol error rate, and a frame loss rate.
23. The method according to any one of claims 1 to 22, characterized in that The code word comprises: A forward error correction (FEC) code word.
24. The method of claim 23, wherein, The FEC code word comprises: An FEC inner code code word, or an FEC outer code code word.
25. A data statistics apparatus, characterized by comprising: The apparatus comprises units for performing the method of any of claims 1 to 24.
26. The apparatus of claim 25, the apparatus comprising: A chip, an optical module, a network card, a network device, or a server.
27. A data statistics apparatus, characterized by comprising: An interface circuit for receiving and sending signals, and a processor for performing the method of any of claims 1 to 24.
28. A chip, characterized by The chip comprises a processor for performing the method of any of claims 1 to 24.
29. A computer program product, characterised in that, Program instructions for performing the method of any of claims 1 to 24 when the computer program product is executed.