A data statistics method and device
Patent Information
- Application Number
- CN202511013685.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2044-04-24
Smart Images

Figure CN121098455B_ABST
Abstract
Description
[0001] This application is a divisional application of the application filed with the China National Intellectual Property Administration on April 24, 2024, with application number 202410504399.0 and invention title "A Data Statistics Method and Apparatus". Technical Field
[0002] This application relates to the field of communications, and in particular to a data statistics method and apparatus. Background Technology
[0003] Data streams can be transmitted over a network. In some scenarios, after receiving a data stream, the receiving end can statistically analyze relevant parameters of the data stream to facilitate subsequent data processing based on these parameters. For example, statistical parameters can be used to evaluate the communication quality provided by the transmission channel, or to determine whether the data processing operations of the receiving device are abnormal. As a concrete example, in a scenario where the sending end performs forward error correction (FEC) encoding on the transmitted data stream, the receiving end can decode the FEC codewords included in the received data stream and perform statistical analysis of relevant parameters based on the decoding results.
[0004] How to statistically analyze the relevant parameters of the data stream is a problem that remains to be solved. Summary of the Invention
[0005] Firstly, this application provides a data statistics method that can be applied to a receiving device. In the embodiments of this application, considering that the number of bits corrected in a codeword reflects the communication quality provided by the transmission channel and whether the data processing operation of the receiving device is abnormal, this application sets P counters in the receiving device, where P can be an integer greater than or equal to 3. These P counters can count the number of codewords with different corrected bit counts in the data stream based on the number of bits corrected in each codeword. Correspondingly, after receiving the data stream, the receiving device can use the P counters to record the number of codewords with different corrected bit counts in the data stream, so as to facilitate subsequent data processing based on statistical parameters.
[0006] In one possible implementation, considering that the number of codewords with different numbers of corrected bits in the data stream can indicate whether burst errors have occurred, after using P counters to 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 recorded by the P counters. The detection of burst errors mentioned here can be detecting whether burst errors have occurred in the data stream, detecting the number of times burst errors have occurred in the data stream, detecting the data length corresponding to the occurrence of burst errors, etc.
[0007] In one possible implementation, considering that the number of codewords with different numbers of corrected bits in the data stream can reflect the error rate of the data stream transmission, after using P counters to record the number of codewords with different numbers of corrected bits in the data stream, the error rate can be further calculated based on the values recorded by the P counters.
[0008] In one possible implementation, the error rate includes, but is not limited to, one or more of the following: codeword error ratio (CER), bit error ratio (BER), symbol error ratio (SER), and frame loss ratio (FLR). In other words, using the scheme of this application, after recording the number of codewords with different numbers of corrected bits in the data stream using P counters, one or more of CER, BER, SER, and FLR can be further calculated based on the values recorded by the P counters.
[0009] In one possible implementation, considering that the number of codewords with different numbers of corrected bits in the data stream can indicate whether the receiving device has made an error in synchronizing the data stream, after using P counters to record the number of codewords with different numbers of corrected bits in the data stream, the data stream can be further detected for synchronization errors based on the values recorded by the P counters.
[0010] In one possible implementation, any two of the P counters correspond to different numbers of corrected bits. As a concrete example, the number of corrected bits corresponding to the P counters are consecutive, for example, from 0 to P-2 and beyond P-2. Using this method, the distribution of the number of corrected bits in the codewords included in the data stream can be determined.
[0011] In one possible implementation, after receiving the data stream, the receiving device can obtain at least one codeword based on the data stream. Further, error correction is performed on each codeword in the at least one codeword to determine the number of corrected bits in each codeword, thereby updating the value of at least one of the aforementioned P counters. As a concrete example, for any codeword, after determining the number of corrected bits in that codeword, the counter corresponding to that number of bits can be incremented by 1.
[0012] In one possible implementation, the receiving device is provided with R counters, which are used to record the number of codeword groups with different numbers of bits corrected in the at least one codeword group, based on the number of bits corrected in each codeword group in the at least one codeword group. R can be a positive integer greater than or equal to 3.
[0013] In one possible implementation, any two counters among the R counters correspond to different numbers of corrected bits. As a specific example, the number of corrected bits corresponding to the R counters are consecutive, for example, from 0 to R-2 and beyond R-2. Using this method, the distribution of the number of corrected bits in at least one codeword group can be determined.
[0014] In one possible implementation, after receiving the data stream, the receiving device can obtain at least one codeword group based on the data stream. Further, for each codeword group, error correction is performed on each codeword within that codeword group to determine the number of corrected bits in each codeword. The corrected bit counts in each codeword of the codeword group are then summed to obtain the total number of corrected bits in the codeword group, which is used to update the value of at least one of the aforementioned R counters. As a concrete example, for any codeword group, after determining the number of corrected bits, the counter corresponding to that number of bits can be incremented by 1.
[0015] In one possible implementation, the receiving device may further include at least one of a codeword group count counter, a codeword count counter, and a bit count counter. Wherein: the codeword group count counter records the total number of codeword groups included in the data stream; the codeword count counter records the total number of codewords included in the data stream; and the bit count counter records the total number of bits included in the data stream. Optionally, the receiving device may combine the values recorded by at least one of the codeword group count counter, codeword count counter, and bit count counter, and the statistically obtained number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits, to perform one or more of the following: detecting burst errors, calculating the error rate, and detecting whether the data stream has synchronization errors.
[0016] Secondly, this application provides a data statistics method that can be applied to a receiving device. The receiving device receives a data stream and further obtains at least one codeword group based on the data stream. Each codeword group includes Q codewords obtained through deinterleaving, where Q is an integer greater than or equal to 2. Considering the number of corrected bits in the codeword group reflects the communication quality provided by the transmission channel and whether the data processing operation of the receiving device is abnormal. Therefore, in this embodiment, the receiving device can count the number of codeword groups with different numbers of corrected bits in the at least one codeword group to facilitate subsequent data processing based on statistical parameters.
[0017] In one possible implementation, considering that the number of codeword groups with different numbers of corrected bits in the at least one codeword group can indicate whether burst errors have occurred in the data stream, after counting the number of codeword groups with different numbers of corrected bits in the at least one codeword group, burst errors can be further detected based on the statistical results. The detection of burst errors mentioned here can be detecting whether burst errors have occurred in the data stream, detecting the number of times burst errors have occurred in the data stream, detecting the data length corresponding to the occurrence of burst errors in the data stream, etc.
[0018] 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, 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.
[0019] 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 scheme of this 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 of the data stream transmission can be further calculated based on the statistical results.
[0020] 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 the receiving device has made an error in synchronizing the data stream, after counting the number of codeword groups with different numbers of bits corrected in the at least one codeword group, the data stream can be further detected as having a synchronization error based on the statistical results.
[0021] In one possible implementation, the first aspect and any one of the first aspect, and the second aspect and any one of the second aspect, can be combined arbitrarily without conflict.
[0022] In one possible implementation, the codewords described in the first and second aspects above can be FEC codewords, for example, FEC external codewords, or, in a concatenated code scenario, FEC internal codewords.
[0023] Thirdly, this application provides a data statistics method that can be applied to a receiving device. In the embodiments of this application, considering that the number of corrected symbols in a codeword reflects the communication quality provided by the transmission channel and whether the data processing operation of the receiving device is abnormal, this application sets P counters in the receiving device, where P can be an integer greater than or equal to 3. These P counters can count the number of codewords with different numbers of corrected symbols in the data stream based on the number of corrected symbols in each codeword. Correspondingly, after receiving the data stream, the receiving device can use the P counters to record the number of codewords with different numbers of corrected symbols in the data stream, so as to facilitate subsequent data processing based on statistical parameters.
[0024] In one possible implementation, considering that the number of codewords with different numbers of corrected symbols in the data stream can indicate whether burst errors have occurred, after using P counters to record the number of codewords with different numbers of corrected symbols in the data stream, burst errors can be further detected based on the counts recorded by the P counters. The detection of burst errors mentioned here can be detecting whether burst errors have occurred in the data stream, detecting the number of times burst errors have occurred in the data stream, detecting the data length corresponding to the occurrence of burst errors, etc.
[0025] In one possible implementation, considering that the number of codewords with different numbers of corrected symbols in the data stream can reflect the error rate of the data stream transmission, after using P counters to record the number of codewords 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.
[0026] 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 scheme of this application, after using P counters to record the number of codewords with different numbers of corrected symbols in the data stream, one or more of CER, BER, SER, and FLR can be further calculated based on the values recorded by the P counters.
[0027] In one possible implementation, considering that the number of codewords with different numbers of corrected symbols in the data stream can reflect whether the receiving device has made an error in synchronizing the data stream, after using P counters to record the number of codewords with different numbers of corrected symbols in the data stream, the data stream can be further detected for synchronization errors based on the number recorded by the P counters.
[0028] In one possible implementation, any two counters among the P counters correspond to different numbers of corrected symbols. As a concrete example, the number of corrected symbols corresponding to the P counters are consecutive, for example, from 0 to P-2 and beyond P-2. Using this method, the distribution of the number of corrected symbols in the codewords included in the data stream can be determined.
[0029] In one possible implementation, after receiving the data stream, the receiving device can obtain at least one codeword based on the data stream. Further, error correction is performed on each codeword in the at least one codeword to determine the number of corrected symbols in each codeword, thereby updating the value of at least one of the aforementioned P counters. As a concrete example, for any codeword, after determining the number of corrected symbols in that codeword, the counter corresponding to that number of symbols can be incremented by 1.
[0030] In one possible implementation, the receiving device is provided with R counters, which are used to record the number of codeword groups with different numbers of corrected symbols in the at least one codeword group according to the number of symbols corrected in each codeword group in the at least one codeword group. R can be a positive integer greater than or equal to 3.
[0031] In one 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, from 0 to R-2 and beyond R-2. Using this method, the distribution of the number of corrected symbols in at least one codeword group can be determined.
[0032] In one possible implementation, after receiving the data stream, the receiving device can obtain at least one codeword group based on the data stream. Further, for each codeword group, error correction is performed on each codeword within that codeword group to determine the number of corrected symbols in each codeword. The corrected symbol counts in each codeword of the codeword group are then summed to obtain the total number of corrected symbols for that codeword group, facilitating the updating of the value of at least one of the aforementioned R counters. As a concrete example, for any codeword group, after determining the number of corrected symbols, the counter corresponding to that number of symbols can be incremented by 1.
[0033] In one possible implementation, the receiving device may further include at least one of a codeword group count counter, a codeword count counter, and a symbol count counter. Wherein: the codeword group count counter records the total number of codeword groups included in the data stream; the codeword count counter records the total number of codewords included in the data stream; and the symbol count counter records the total number of symbols included in the data stream. Optionally, the receiving device may combine the count values of at least one of the codeword group count counter, codeword count counter, and symbol count counter, and the statistically obtained number of codeword groups with different numbers of corrected symbols in the at least one codeword group, to perform one or more of the following: detecting burst errors, calculating the error rate, and detecting whether the data stream has synchronization errors.
[0034] Fourthly, this application provides a data statistics method applicable to a receiving device. The receiving device receives a data stream and further obtains at least one codeword group based on the data stream. Each codeword group includes Q codewords obtained through deinterleaving, where Q is an integer greater than or equal to 2. Considering the number of corrected symbols in the codeword group reflects the communication quality provided by the transmission channel and whether the data processing operation of the receiving device is abnormal. Therefore, in this embodiment, the receiving device can count the number of codeword groups with different numbers of corrected symbols in the at least one codeword group to facilitate subsequent data processing based on statistical parameters.
[0035] In one possible implementation, considering that the number of codeword groups with different numbers of corrected symbols in the at least one codeword group can indicate whether burst errors have occurred in the data stream, after counting the number of codeword groups with different numbers of corrected symbols in the at least one codeword group, burst errors can be further detected based on the statistical results. The detection of burst errors mentioned here can be detecting whether burst errors have occurred in the data stream, detecting the number of times burst errors have occurred in the data stream, detecting the data length corresponding to the occurrence of burst errors in the data stream, and so on.
[0036] In one possible implementation, considering that the number of codeword groups with different numbers of corrected symbols in the at least one codeword group can reflect the error rate of data stream transmission, after counting the number of codeword groups with different numbers of corrected symbols in the at least one codeword group, the error rate of data stream transmission can be further calculated based on the statistical results.
[0037] 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 scheme of this 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 of the data stream transmission can be further calculated based on the statistical results.
[0038] In one possible implementation, considering that the number of codeword groups with different numbers of corrected symbols in the at least one codeword group can reflect whether the receiving device has made an error in synchronizing the data stream, after counting the number of codeword groups with different numbers of corrected symbols in the at least one codeword group, the data stream can be further detected as having a synchronization error based on the statistical results.
[0039] In one possible implementation, the third aspect and any one of the third aspect, and the fourth aspect and any one of the fourth aspect, can be combined arbitrarily without conflict.
[0040] In one possible implementation, the codewords described in the third and fourth aspects above can be FEC codewords, for example, FEC external codewords, or, in the case of concatenated codes, FEC internal codewords.
[0041] Fifthly, this application provides a data statistics device, the device comprising: a receiving unit for receiving a data stream; and a processing unit for recording, respectively, the number of codewords with different numbers of corrected bits in the data stream by P counters, wherein P is greater than or equal to 3.
[0042] In one possible implementation, the processing unit is further configured to: detect burst errors based on the number recorded by the P counters respectively; or, calculate the error rate based on the number recorded by the P counters respectively; or, detect whether the data stream has a synchronization error based on the number recorded by the P counters respectively.
[0043] In one possible implementation, the number of corrected bits corresponding to the P counters are 0 to P-2, and more than P-2, respectively.
[0044] In one possible implementation, when the number of corrected bits in a codeword in the data stream is determined, a counter corresponding to the number of bits is incremented by 1.
[0045] In one possible implementation, the processing unit is further configured to: obtain at least one codeword group based on the data stream, each codeword group comprising 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 been corrected with different numbers of bits.
[0046] In one possible implementation, the processing unit is further configured to perform at least one of the following: detect burst errors based on the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits; or calculate an error rate based on the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits; or detect whether the data stream has a synchronization error based on the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits.
[0047] In one possible implementation, R counters record the number of codeword groups that have been corrected with different numbers of bits in the at least one codeword group, where R is greater than or equal to 3.
[0048] In one possible implementation, the number of corrected bits corresponding to the R counters are respectively 0 to R-2, and more than R-2.
[0049] In one possible implementation, when the number of corrected bits in one of the at least one codeword groups is determined, a counter corresponding to the number of bits is incremented by 1.
[0050] In one possible implementation, the processing unit is further configured to perform at least one of the following: a codeword group count counter records the total number of codeword groups included in the data stream; a codeword count counter records the total number of codewords included in the data stream; and a bit count counter records the total number of bits included in the data stream.
[0051] Sixthly, this application provides a data statistics device, the device comprising: a receiving unit for receiving a data stream;
[0052] The processing unit is configured to obtain at least one codeword group based on the data stream, each codeword group comprising Q codewords obtained by deinterleaving, where Q is greater than or equal to 2; and to count the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits.
[0053] In one possible implementation, the processing unit is further configured to: detect burst errors based on the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits; or, calculate an error rate based on the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits; or, detect whether the data stream has a synchronization error based on the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits.
[0054] In one possible implementation, R counters record the number of codeword groups that have been corrected with different numbers of bits in the at least one codeword group, where R is greater than or equal to 3.
[0055] In one possible implementation, the number of corrected bits corresponding to the R counters are respectively 0 to R-2, and more than R-2.
[0056] In one possible implementation, when the number of corrected bits in one of the at least one codeword groups is determined, a counter corresponding to the number of bits is incremented by 1.
[0057] In one possible implementation, the processing unit is further configured to perform at least one of the following: a codeword group count counter records the total number of codeword groups included in the data stream; a codeword count counter records the total number of codewords included in the data stream; and a bit count counter records the total number of bits included in the data stream.
[0058] In one possible implementation, the processing unit is further configured to: use P counters to record the number of codewords in the data stream that have been corrected with different numbers of bits, where P is greater than or equal to 3.
[0059] In one possible implementation, the processing unit is further configured to: detect burst errors based on the number recorded by the P counters respectively; or, calculate the error rate based on the number recorded by the P counters respectively; or, detect whether the data stream has a synchronization error based on the number recorded by the P counters respectively.
[0060] In one possible implementation, the number of corrected bits corresponding to the P counters are 0 to P-2, and more than P-2, respectively.
[0061] In one possible implementation, when the number of corrected bits in a codeword in the data stream is determined, a counter corresponding to the number of bits is incremented by 1.
[0062] In one possible implementation, the codewords described in the third and fourth aspects above include: forward error correction (FEC) codewords.
[0063] In one possible implementation, the FEC codeword includes: an FEC internal codeword, or an FEC external codeword.
[0064] In one possible implementation, the data statistics device described in the third and fourth aspects above, wherein the receiving end device includes: a chip, an optical module, a network device, or a server.
[0065] In a seventh aspect, this application provides a data statistics device, the device comprising: a receiving unit for receiving a data stream; and a processing unit for recording, respectively, the number of codewords with different numbers of corrected symbols in the data stream by P counters, wherein P is greater than or equal to 3.
[0066] In one possible implementation, the processing unit is further configured to: detect burst errors based on the number recorded by the P counters respectively; or, calculate the error rate based on the number recorded by the P counters respectively; or, detect whether the data stream has a synchronization error based on the number recorded by the P counters respectively.
[0067] In one possible implementation, the number of corrected symbols corresponding to the P counters are 0 to P-2, and more than P-2, respectively.
[0068] In one possible implementation, when the number of corrected symbols in a codeword of the data stream is determined, a counter corresponding to the number of symbols is incremented by 1.
[0069] In one possible implementation, the processing unit is further configured to: obtain at least one codeword group based on the data stream, each codeword group comprising 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 been corrected with different numbers of symbols.
[0070] In one possible implementation, the processing unit is further configured to perform at least one of the following: detect burst errors based on the number of codeword groups with different numbers of corrected symbols in the at least one codeword group; or calculate the error rate based on the number of codeword groups with different numbers of corrected symbols in the at least one codeword group; or detect whether the data stream has a synchronization error based on the number of codeword groups with different numbers of corrected symbols in the at least one codeword group.
[0071] In one possible implementation, R counters record the number of codeword groups with different numbers of symbols corrected in the at least one codeword group, where R is greater than or equal to 3.
[0072] In one possible implementation, the number of corrected symbols corresponding to the R counters are respectively 0 to R-2 and more than R-2.
[0073] In one possible implementation, when the number of corrected symbols in one of the at least one codeword groups is determined, a counter corresponding to the number of symbols is incremented by 1.
[0074] In one possible implementation, the processing unit is further configured to perform at least one of the following: a codeword group count counter records the total number of codeword groups included in the data stream; a codeword count counter records the total number of codewords included in the data stream; and a symbol count counter records the total number of symbols included in the data stream.
[0075] Eighthly, this application provides a data statistics device, the device comprising: a receiving unit for receiving a data stream;
[0076] The processing unit is configured to obtain at least one codeword group based on the data stream, each codeword group comprising Q codewords obtained by deinterleaving, where Q is greater than or equal to 2; and to count the number of codeword groups in the at least one codeword group that have been corrected with different numbers of symbols.
[0077] In one possible implementation, the processing unit is further configured to: detect burst errors based on the number of codeword groups with different numbers of corrected symbols in the at least one codeword group; or, calculate the error rate based on the number of codeword groups with different numbers of corrected symbols in the at least one codeword group; or, detect whether the data stream has a synchronization error based on the number of codeword groups with different numbers of corrected symbols in the at least one codeword group.
[0078] In one possible implementation, R counters record the number of codeword groups with different numbers of symbols corrected in the at least one codeword group, where R is greater than or equal to 3.
[0079] In one possible implementation, the number of corrected symbols corresponding to the R counters are respectively 0 to R-2 and more than R-2.
[0080] In one possible implementation, when the number of corrected symbols in one of the at least one codeword groups is determined, a counter corresponding to the number of symbols is incremented by 1.
[0081] In one possible implementation, the processing unit is further configured to perform at least one of the following: a codeword group count counter records the total number of codeword groups included in the data stream; a codeword count counter records the total number of codewords included in the data stream; and a symbol count counter records the total number of symbols included in the data stream.
[0082] In one possible implementation, the processing unit is further configured to: use P counters to record the number of codewords with different numbers of corrected symbols in the data stream, where P is greater than or equal to 3.
[0083] In one possible implementation, the processing unit is further configured to: detect burst errors based on the number recorded by the P counters respectively; or, calculate the error rate based on the number recorded by the P counters respectively; or, detect whether the data stream has a synchronization error based on the number recorded by the P counters respectively.
[0084] In one possible implementation, the number of corrected symbols corresponding to the P counters are 0 to P-2, and more than P-2, respectively.
[0085] In one possible implementation, when the number of corrected symbols in a codeword of the data stream is determined, a counter corresponding to the number of symbols is incremented by 1.
[0086] In one possible implementation, the codewords described in the third and fourth aspects above include: forward error correction (FEC) codewords.
[0087] In one possible implementation, the FEC codeword includes: an FEC internal codeword, or an FEC external codeword.
[0088] In one possible implementation, the data statistics device described in the third and fourth aspects above, wherein the receiving end device includes: a chip, an optical module, a network device, or a server.
[0089] Ninthly, this application provides an apparatus. The apparatus includes a processor and a communication interface. The processor is configured to perform data processing operations as described in the first aspect and any one of the methods described in the first aspect above, and the communication interface is configured to perform data transmission and reception operations as described in the first aspect and any one of the methods described in the first aspect above; or, the processor is configured to perform data processing operations as described in the second aspect and any one of the methods described in the second aspect above, and the communication interface is configured to perform data transmission and reception operations as described in the second aspect and any one of the methods described in the second aspect above; or, the processor is configured to perform data processing operations as described in the fourth aspect and any one of the methods described in the fourth aspect above, and the communication interface is configured to perform data transmission and reception operations as described in the fifth aspect and any one of the methods described in the fifth aspect above.
[0090] In one possible implementation, the device further includes a memory for storing instructions or computer programs, and a processor for executing the instructions or computer programs in the memory to trigger the method described in the first aspect and any one of the first aspects above; or, the processor for executing 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. Alternatively, the processor for executing 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. Alternatively, the processor for executing 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.
[0091] In a tenth aspect, this application provides an apparatus including an interface circuit and a processing circuit, wherein the interface circuit is used to receive and / or transmit data, and the processing circuit is used to perform data processing.
[0092] In one example, the device is used to perform the methods described in the first aspect and any one of the first aspects above, in the following case:
[0093] The interface circuit is used to receive a data stream; the processing circuit is used to use P counters to record the number of codewords with different numbers of corrected bits in the data stream, where P is greater than or equal to 3.
[0094] In yet another example, the device is used to perform the methods described in the second aspect and any one of the second aspect above, in this case:
[0095] The interface circuit is used to receive a data stream, and the processing circuit 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. The number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits is counted.
[0096] In another example, the device is used to perform the methods described in the third aspect and any one of the third aspects above, in this case:
[0097] The interface circuit is used to receive a data stream; the processing circuit is used to use P counters to record the number of codewords with different numbers of corrected symbols in the data stream, where P is greater than or equal to 3.
[0098] In yet another example, the device is used to perform the methods described in the fourth aspect and any one of the fourth aspects above, in this case:
[0099] The interface circuit is used to receive a data stream, and the processing circuit 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. The number of codeword groups in the at least one codeword group that have been corrected with different numbers of symbols is counted.
[0100] In one aspect, this application provides a computer-readable storage medium, including instructions or a computer program that, when run on a computer, causes the computer to perform the methods described in the first aspect and any one of the first aspects above, or, when run on a computer, causes the computer to perform the methods described in the second aspect and any one of the second aspects above, or, when run on a computer, causes the computer to perform the methods described in the third aspect and any one of the third aspects above, or, when run on a computer, causes the computer to perform the methods described in the fourth aspect and any one of the fourth aspects above.
[0101] In a twelfth aspect, this application provides a computer program product comprising instructions or a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect and any one of the first aspects above, or causes the computer to perform the methods described in the second aspect and any one of the second aspects above, or causes the computer to perform the methods described in the third aspect and any one of the third aspects above, or causes the computer to perform the methods described in the fourth aspect and any one of the fourth aspects above.
[0102] In a thirteenth aspect, this application provides a chip, including an interface circuit and a processing circuit, the chip being used to perform the method described in the first aspect and any one of the first aspects above; or, to perform the method described in the second aspect and any one of the second aspects above; or, to perform the method described in the third aspect and any one of the third aspects above; or, to perform the method described in the fourth aspect and any one of the fourth aspects above.
[0103] In a fourteenth aspect, this application provides an optical module, including an interface circuit and a processing circuit, wherein the optical module is used to perform the method described in the first aspect and any one of the first aspects above; or, to perform the method described in the second aspect and any one of the second aspects above; or, to perform the method described in the third aspect and any one of the third aspects above; or, to perform the method described in the fourth aspect and any one of the fourth aspects above. Attached Figure Description
[0104] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0105] Figure 1 This is a schematic diagram illustrating an exemplary application scenario provided in an embodiment of this application;
[0106] Figure 2 A flowchart illustrating a data statistics method provided in an embodiment of this application;
[0107] Figure 3 A schematic diagram of a data processing flow provided in an embodiment of this application;
[0108] Figure 4 A flowchart illustrating yet another data statistics method provided in an embodiment of this application;
[0109] Figure 5 A schematic diagram of a data processing flow provided in an embodiment of this application;
[0110] Figure 6 This is a schematic diagram of the structure of a receiving device provided in an embodiment of this application;
[0111] Figure 7 This is a schematic diagram of the structure of a data statistics device provided in an embodiment of this application;
[0112] Figure 8 This is a schematic diagram of the structure of a device provided in an embodiment of this application;
[0113] Figure 9 This is a schematic diagram of the structure of a device provided in an embodiment of this application;
[0114] Figure 10 This is a schematic diagram of the structure of a chip or optical module provided in an embodiment of this application. Detailed Implementation
[0115] This application provides a data statistics method and apparatus that can perform statistics on relevant parameters based on received data streams.
[0116] Before introducing the data statistics method provided in the embodiments of this application, we will first introduce the possible application scenarios of this application.
[0117] See Figure 1 This figure is a schematic diagram of an exemplary application scenario provided by an embodiment of this application.
[0118] like Figure 1 As shown, the chip or optical module at the transmitting end can perform FEC encoding on the data stream to be transmitted, wherein, Figure 1 This demonstrates that the transmitting end can use an 8-channel FEC encoder to perform FEC encoding on the data stream to be transmitted in parallel. The 8 FEC codewords obtained after FEC encoding are then interleaved in an 8:1 bit pair manner. Figure 1 In the scenario shown, the 8 FEC codewords obtained after FEC encoding are interleaved in 8:1 bit pairs based on four-level pulse amplitude modulation (PAM4) symbols. The data stream after 8:1 bit pair interleaving is subjected to pad data insertion. The data stream with the inserted pads is further encoded by PAM4 and then sent to the receiving end through the channel.
[0119] After receiving the data stream from the sender, the receiver can process it. The receiver's processing is the reverse of the sender's processing. Specifically, the receiver's chip or optical module can first decode the received data stream based on PAM4 symbols. Then, for the decoded data stream, pads are removed, and the resulting data stream is de-interleaved in a 1:8 bit ratio. Finally, an 8-channel FEC decoder is used to perform FEC decoding on the corresponding de-interleaved FEC codewords.
[0120] In one example, the transmitter can also perform 8:1 bit-to-bit interleaving on the 8 FEC codewords obtained by FEC encoding based on dual polarization 16-state quadrature amplitude modulation (DP-16QAM) symbols. In this scenario, after performing a pad insertion operation on the data stream, the transmitter can further perform DP-16QAM encoding on the data stream with the inserted pads and then send the DP-16QAM encoded data stream to the receiver through the channel. Correspondingly, the receiver's chip or optical module can first decode the received data stream based on DP-16QAM symbols. Further, for the decoded data stream, the pads in the data stream are removed, and the data stream obtained after removing the pads is de-interleaved 1:8 bit-to-bit. Then, the 8 FEC decoders are used to perform FEC decoding on their corresponding de-interleaved FEC codewords.
[0121] In one example Figure 1 The receiving and sending ends shown can be servers, network devices, network interface cards (NICs), or single-board computers with specific functions. Network devices mentioned here include, but are not limited to, routers or switches.
[0122] In yet another example, Figure 1 The receiver and transmitter shown can be different modules (e.g., different chips) located in the same server or network device.
[0123] Figure 1 The chips shown include, but are not limited to, network processors (NPs) or application-specific integrated circuits (ASICs).
[0124] In one example, burst errors are one indicator for evaluating the communication quality provided by a transmission channel. Burst errors manifest as multiple errors occurring within a short length of data. As communication transmission rates increase, the impact of burst errors on the reliability of the transmission system becomes increasingly significant. As a concrete example, burst errors reduce the reliability of the transmission system, making it more prone to failure. Therefore, detecting burst errors is crucial to ensuring the reliability of the transmission system. For example, after detecting burst errors, appropriate processing measures can be taken to ensure that data can be transmitted normally through the transmission system. In one example, the data statistics method provided in this application embodiment allows the receiving end to perform statistical analysis of relevant parameters based on the received data stream and detect burst errors based on the statistical parameters.
[0125] In another example, the error rate of data stream transmission 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 statistics method provided in this application embodiment allows the receiving end to perform statistics on relevant parameters based on the received data stream, and determine the error rate of the data stream transmission in the transmission channel based on the statistical parameters.
[0126] In another example, the receiving end needs to synchronize the data stream before deinterleaving it. If the data stream synchronization is incorrect, the subsequent "deinterleaving" and "FEC decoding" operations performed by the receiving end device will result in abnormal outcomes. In one example, the data statistics method provided in this application embodiment allows the receiving end to perform statistics on relevant parameters based on the received data stream and determine whether the data stream is synchronized incorrectly based on the statistical parameters. If a synchronization error is detected, the error information needs to be reported promptly.
[0127] Next, with reference to the accompanying drawings, the data statistics method provided in the embodiments of this application will be described.
[0128] See Figure 2 The figure is a flowchart illustrating a data statistics method provided in an embodiment of this application. Figure 2 The method shown can be applied to a receiving device. The receiving device mentioned in the embodiments of this application can correspond to... Figure 1 The receiving end shown can be a chip or optical module within the receiving end, or it 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 could be, for example, a server in a data center used for data storage and related calculations. Alternatively, the receiving end device can also be a network interface card (NIC).
[0129] Figure 2 The method shown includes the following steps S101-S102.
[0130] S101: Receive data stream.
[0131] The receiving device can receive a data stream transmitted by the transmitting end, the data stream comprising one or more bits. In one example, the data stream may be a data stream obtained by encoding via a multi-channel FEC encoder and interleaving the FEC codewords encoded by the multi-channel FEC encoder. In one example, the FEC codewords encoded by the multi-channel FEC encoder may be interleaved based on PAM4 symbols.
[0132] S102: P counters record 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.
[0133] In this embodiment, the receiving device is equipped with P counters. These P counters are used to record the number of codewords in the data stream that have been corrected with different numbers of bits or symbols, based on the number of bits or symbols corrected for each codeword included in the data stream. The codewords mentioned in this embodiment can be FEC codewords, and the two can be used interchangeably. The FEC codeword can be an external FEC codeword, and in a concatenated code scenario, it can also be an internal FEC codeword. In one example, the counters can also be understood as registers.
[0134] In one example, the codeword in this embodiment can be a BCH code, such as a BCH(126, 110) code or a BCH(128, 120) code. In another example, the codeword in this embodiment can be a Hamming code, or a systematic binary (128, 120) code obtained by Hamming encoding.
[0135] In this embodiment of the application, if the P counters are used to record the number of codewords with different numbers of corrected bits in the data stream, then any two counters in the P counters correspond to different numbers of corrected bits.
[0136] In a specific example, the number of corrected bits corresponding to the P counters is consecutive, for example, from 0 to P-2 and beyond P-2. For example:
[0137] When P equals 3, the number of bits to be corrected corresponding to the three counters can be 0, 1, or more than 1.
[0138] When P equals 4, the number of bits to be corrected corresponding to the 4 counters can be 0, 1, 2, or more than 2.
[0139] When P equals 5, the number of bits to be corrected corresponding to the 5 counters can be 0, 1, 2, 3, or more than 3.
[0140] And so on.
[0141] The "more than 3" mentioned here refers to something greater than 3.
[0142] This application does not specifically limit the value of P in the embodiments; P can be greater than or equal to 3.
[0143] In one example, the value of P can be determined based on the maximum error correction capability of the receiving device. The maximum error correction capability refers to the maximum number of bits that the receiving device can correct for a codeword to be corrected. In other words, when the number of erroneous bits in a codeword exceeds the maximum error correction capability of the receiving device, the receiving device cannot correct the codeword. In a specific example, the value of P can be the maximum error correction capability of the receiving device + 2. In this scenario, codewords with more than P-2 corrected bits are actually uncorrectable codewords.
[0144] In another specific example, the number of corrected bits corresponding to the aforementioned P counters may also be discontinuous. For example, if P equals 3, then the number of corrected bits corresponding to the 3 counters may be 0, 1, or 3 respectively.
[0145] In one example, after receiving the data stream, the receiving device can synchronize the data stream and then deinterleave it, for example, based on PAM4 symbols, to obtain several codewords. Further, FEC error correction is performed on each of the codewords to determine the number of corrected bits in each codeword, thereby updating the value of at least one of the aforementioned P counters. As a concrete example, for any codeword, after determining the number of corrected bits, the counter corresponding to that number of bits can be incremented by 1. For example:
[0146] P equals 5, and the P counters are P0, P1, P2, P3, and P3+. P0 records the number of codewords with 0 bits corrected, P1 records the number of codewords with 1 bit corrected, P2 records the number of codewords with 2 bits corrected, P3 records the number of codewords with 3 bits corrected, and P3+ records the number of codewords with more than 3 bits corrected. For codeword 1 in the data stream, if FEC error correction determines that codeword 1 has been corrected by 2 bits, then counter P2 is incremented by 1.
[0147] In this embodiment of the application, if the P counters are used to record the number of codewords with different numbers of corrected symbols in the data stream, then any two counters in the P counters correspond to different numbers of corrected symbols.
[0148] In a specific example, the number of corrected symbols corresponding to the P counters is consecutive, for example, from 0 to P-2 and beyond P-2. For example:
[0149] When P equals 3, the number of corrected symbols corresponding to the three counters can be 0, 1, or more than 1.
[0150] When P equals 4, the number of corrected symbols corresponding to the 4 counters can be 0, 1, 2, or more than 2.
[0151] When P equals 5, the number of corrected symbols corresponding to the 5 counters can be 0, 1, 2, 3, or more than 3.
[0152] And so on.
[0153] The "more than 3" mentioned here refers to something greater than 3.
[0154] This application does not specifically limit the value of P in the embodiments; P can be greater than or equal to 3.
[0155] In one example, the value of P can be determined based on the maximum error correction capability of the receiving device. The maximum error correction capability refers to the maximum number of symbols the receiving device can correct for a codeword to be corrected. In other words, when the number of erroneous symbols in a codeword exceeds the maximum error correction capability of the receiving device, the receiving device cannot correct the codeword. In a specific example, the value of P can be the maximum error correction capability of the receiving device + 2. In this scenario, codewords with more than P-2 corrected symbols are actually uncorrectable codewords. The maximum number of symbols the receiving device can correct can be equal to the maximum number of bits that the receiving device can correct.
[0156] In another specific example, the number of corrected symbols corresponding to the aforementioned P counters may also be discontinuous. For example, if P equals 3, then the number of corrected symbols corresponding to the 3 counters may be 0, 1, or 3 respectively.
[0157] In one example, after receiving the data stream, the receiving device can synchronize the data stream and then deinterleave it, for example, based on PAM4 symbols, to obtain several codewords. Further, FEC error correction is performed on each of the codewords to determine the number of corrected symbols in each codeword, thereby updating the value of at least one of the aforementioned P counters. As a concrete example, for any codeword, after determining the number of corrected symbols, the counter corresponding to that number of symbols can be incremented by 1. For example:
[0158] P equals 5, and the P counters are P0, P1, P2, P3, and P3+. P0 records the number of codewords with corrected 0 symbols, P1 records the number of codewords with corrected 1 symbols, P2 records the number of codewords with corrected 2 symbols, P3 records the number of codewords with corrected 3 symbols, and P3+ records the number of codewords with corrected symbols greater than 3. For codeword 1 in the data stream, if FEC error correction determines that codeword 1 has been corrected for 2 symbols, then counter P2 is incremented by 1.
[0159] As an example, for any codeword, the FEC decoder can be used to decode the codeword. When the FEC decoder decodes the codeword, it will correct the errors in the codeword. Accordingly, based on the decoding of the codeword by the FEC decoder, the number of bits or symbols that have been corrected in the codeword can be determined.
[0160] For example, to determine the number of corrected bits in a codeword, please refer to... Figure 3 To understand, Figure 3 This is a schematic diagram of a data processing flow provided in an embodiment of this application. Figure 3 As shown, after receiving the data stream, the receiving device can first perform deinterleaving and decoding based on PAM4 symbols. Then, it synchronizes the decoded data stream, removes pads from the synchronized data stream, and performs 1:8 bit deinterleaving on the data stream obtained after removing pads. One deinterleaving operation yields 8 FEC codewords, each corresponding to... Figure 3 The diagram shows FEC codewords 0 to 7. Additionally, the receiving device includes eight FEC decoders for decoding the eight FEC codewords obtained from one deinterleaving operation. In other words, after obtaining eight FEC codewords from one deinterleaving operation, each of the eight FEC decoders (0 to 7) is used to perform FEC decoding on FEC codewords 0 to 7, thereby obtaining the number of corrected bits for each of the eight FEC codewords.
[0161] In one example, after using P counters to 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 recorded by the P counters. The detection of burst errors mentioned here can refer to detecting whether a burst error has occurred in the data stream, detecting the number of times a burst error has occurred, detecting the data length corresponding to the occurrence of a burst error, and so on. This application does not specifically limit how to use the counts recorded by the P counters to detect burst errors.
[0162] In another example, after using P counters to record the number of codewords with different numbers of corrected bits in the data stream, the error rate can be further calculated based on the values recorded by the P counters. Regarding the error rate, please refer to the description of the error rate above; it will not be repeated here. This application does not specifically limit how to use the counts recorded by the P counters to calculate the error rate.
[0163] In another example, after using P counters to record the number of codewords with different numbers of corrected bits in the data stream, the data stream can be further detected for synchronization errors based on the values recorded by the P counters. For details on data stream synchronization, please refer to the relevant descriptions above; they will not be repeated here. This application does not specifically limit how to use the counts recorded by the P counters to detect synchronization errors in the data stream.
[0164] In one example, after using P counters to record the number of codewords with different numbers of corrected symbols in the data stream, burst errors can be further detected based on the values recorded by the P counters. The detection of burst errors mentioned here can refer to detecting whether a burst error has occurred in the data stream, detecting the number of burst errors that have occurred in the data stream, detecting the data length corresponding to the occurrence of a burst error, and so on. This application does not specifically limit how to use the counts recorded by the P counters to detect burst errors.
[0165] In another example, after using P counters to record the number of codewords with different numbers of corrected symbols in the data stream, the error rate can be further calculated based on the values recorded by the P counters. Regarding the error rate, please refer to the description of the error rate above; it will not be repeated here. This application does not specifically limit how to use the counts recorded by the P counters to calculate the error rate.
[0166] In another example, after using P counters to record the number of codewords with different numbers of corrected symbols in the data stream, the data stream can be further detected for synchronization errors based on the values recorded by the P counters. Regarding data stream synchronization, please refer to the relevant descriptions above; they will not be repeated here. This application does not specifically limit how to use the counts recorded by the P counters to detect synchronization errors in the data stream.
[0167] As described above, this application provides a novel data statistics method. The receiving 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 to determine the communication quality provided by the transmission channel (e.g., detecting burst errors or calculating the error rate). Alternatively, the values recorded by the P counters can be analyzed to determine whether the data processing operations (e.g., data stream synchronization operations) of the receiving device are abnormal.
[0168] This application also provides another data statistics method, which will be described below with reference to the accompanying drawings.
[0169] See Figure 4 The figure is a flowchart illustrating another data statistics method provided in an embodiment of this application. Figure 4 The method shown can be applied to a receiving device. For a description of the receiving device, please refer to the description section above. It will not be repeated here.
[0170] Figure 4 The method shown includes the following steps S201-S203.
[0171] S201: Receive data stream.
[0172] The receiving device can receive a data stream transmitted by the transmitting end, the data stream comprising one or more bits. In one example, the data stream may be a data stream obtained by encoding via a multi-channel FEC encoder and interleaving the FEC codewords encoded by the multi-channel FEC encoder. In one example, the FEC codewords encoded by the multi-channel FEC encoder may be interleaved based on PAM4 symbols.
[0173] S202: Obtain at least one codeword group based on the data stream, wherein each codeword group comprises Q codewords obtained by deinterleaving, where Q is greater than or equal to 2.
[0174] In one example, after receiving the data stream, the receiving device can sequentially perform PAM4 decoding, pad deletion, and data stream synchronization operations on the data stream. Then, it deinterleaves the synchronized data stream to obtain several codewords. For example, the receiving device can deinterleave the synchronized data stream based on PAM4 symbols to obtain several codewords. Further, it obtains the at least one codeword group based on these codewords. Each codeword group in the at least one codeword group includes Q codewords obtained from one or more deinterleaving operations, where Q is an integer greater than or equal to 2. For example, in... Figure 1In the scenario shown, one deinterleaving operation yields 8 FEC codewords. When a codeword group includes Q codewords obtained from one deinterleaving operation, 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 from one deinterleaving operation constitute a codeword group. When the codeword group includes Q codewords obtained from multiple deinterleaving operations, the value of Q can be, for example, greater than 8. The codewords mentioned in the embodiments of this application can be FEC codewords, and the two can be used interchangeably. The FEC codeword can be an external FEC codeword; in a concatenated code scenario, the FEC codeword can also be an internal FEC codeword.
[0175] S203: Count the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits or symbols.
[0176] In one example, after obtaining the at least one codeword group, for any codeword group, error correction (e.g., FEC error correction) can be performed on each codeword in that codeword group to determine the number of bits corrected in each codeword. Further, in one example, the number of bits corrected in each codeword group can be summed to obtain the total number of bits corrected in the codeword group. For example, if a codeword group includes 8 codewords, and each of those 8 codewords has 1 bit corrected, then the total number of bits corrected in the codeword group is 8. In yet another example, the number of symbols corrected in each codeword group can be summed to obtain the total number of symbols corrected in the codeword group. For example, if a codeword group includes 8 codewords, and each of those 8 codewords has 1 symbol corrected, then the total number of symbols corrected in the codeword group is 8.
[0177] In one example, the receiving device is equipped with R counters. As an example, these R counters are used to record the number of codeword groups in the at least one codeword group that have had different numbers of bits corrected, based on the number of bits corrected in each codeword group. As another example, these R counters are used to record the number of codeword groups in the at least one codeword group that have had different numbers of symbols corrected, based on the number of symbols corrected in each codeword group. R can be a positive integer greater than or equal to 3.
[0178] When the R counters are used to record the number of codeword groups with different numbers of corrected bits in the at least one codeword group, any two of the R counters correspond to different numbers of corrected bits.
[0179] In a specific example, the number of corrected bits corresponding to the R counters is consecutive, for example, from 0 to R-2 and beyond R-2. For example:
[0180] When R equals 3, the number of bits to be corrected corresponding to the three counters can be 0, 1, or more than 1.
[0181] When R equals 4, the number of bits to be corrected corresponding to the 4 counters can be 0, 1, 2, or more than 2.
[0182] When R equals 5, the number of bits to be corrected corresponding to the 5 counters can be 0, 1, 2, 3, or more than 3.
[0183] And so on.
[0184] The embodiments of this application do not specifically limit the specific value of R; R can be greater than or equal to 3.
[0185] In one example, the value of R can be determined based on the maximum error correction capability of the receiving device and the number of codewords Q included in a codeword group. In a specific example, the value of R can be the product of the maximum error correction capability of the receiving device and Q, plus 2. For example, if the value of Q is 8 and the maximum error correction capability of the receiving device is 3 bits, then the value of R can be 26. In this scenario, a codeword group with more than R-2 corrected bits is actually a codeword group in which none of the Q codewords can be corrected.
[0186] For the maximum error correction capability of the receiving device, please refer to the relevant description above, which will not be repeated here.
[0187] In another specific example, the number of corrected bits corresponding to the aforementioned R counters may also be discontinuous. For example, if R equals 3, then the number of corrected bits corresponding to the 3 counters may be 0, 8, or 16 respectively.
[0188] In a scenario where the number of codeword groups with different numbers of corrected bits in the at least one codeword group is recorded using R counters, for any codeword group, after determining the number of corrected bits in that codeword group, the counter corresponding to that number of bits can be incremented by 1. For example:
[0189] R equals 26, and the R counters are R0, R1, R2, R3, ..., R24 and R24+. R0 records the number of codeword groups with 0 bits corrected, R1 records the number of codeword groups with 1 bit corrected, R2 records the number of codeword groups with 2 bits corrected, R3 records the number of codeword groups with 3 bits corrected, and so on. R24 records the number of codeword groups with 24 bits corrected, and R24+ records the number of codeword groups with more than 24 bits corrected. For codeword group 1 in at least one codeword group, if the error correction determines that codeword group 1 has been corrected by 8 bits, then counter R8 is incremented by 1.
[0190] When the R counters are used to record the number of codeword groups with different numbers of corrected symbols in the at least one codeword group, any two of the R counters correspond to different numbers of corrected symbols.
[0191] In a specific example, the number of corrected symbols corresponding to the R counters is consecutive, for example, from 0 to R-2 and beyond R-2. For example:
[0192] When R equals 3, the number of corrected symbols corresponding to the three counters can be 0, 1, or more than 1.
[0193] When R equals 4, the number of corrected symbols corresponding to the 4 counters can be 0, 1, 2, or more than 2.
[0194] When R equals 5, the number of corrected symbols corresponding to the 5 counters can be 0, 1, 2, 3, or more than 3.
[0195] And so on.
[0196] The embodiments of this application do not specifically limit the specific value of R; R can be greater than or equal to 3.
[0197] In one example, the value of R can be determined based on the maximum error correction capability of the receiving device and the number of codewords Q included in a codeword group. In a specific example, the value of R can be the product of the maximum error correction capability of the receiving device and Q, plus 2. For example, if the value of Q is 8 and the maximum error correction capability of the receiving device is 3 symbols, then the value of R can be 26. In this scenario, a codeword group with more than R-2 corrected symbols is actually a codeword group in which none of the Q codewords can be corrected.
[0198] For the maximum error correction capability of the receiving device, please refer to the relevant description above, which will not be repeated here.
[0199] In another specific example, the number of corrected symbols corresponding to the aforementioned R counters may also be discontinuous. For example, if R equals 3, then the number of corrected symbols corresponding to the 3 counters may be 0, 8, or 16 respectively.
[0200] In a scenario where the number of codeword groups with different numbers of corrected symbols in the at least one codeword group is recorded using R counters, for any codeword group, after determining the number of corrected symbols in that codeword group, the counter corresponding to that number of symbols can be incremented by 1. For example:
[0201] R equals 26, and the R counters are R0, R1, R2, R3, ..., R24 and R24+. R0 records the number of codeword groups with corrected 0 symbols, R1 records the number of codeword groups with corrected 1 symbols, R2 records the number of codeword groups with corrected 2 symbols, R3 records the number of codeword groups with corrected 3 symbols, and so on. R24 records the number of codeword groups with corrected 24 symbols, and R24+ records the number of codeword groups with corrected more than 24 symbols. For codeword group 1 in at least one codeword group, if the error correction determines that codeword group 1 has been corrected for 8 symbols, then counter R8 is incremented by 1.
[0202] As an example, for any codeword, the FEC decoder can be used to decode the codeword. 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 bits or symbols in the codeword that have been corrected can be determined.
[0203] For example, to determine the number of corrected bits in a codeword, please refer to... Figure 5 To understand, Figure 5 This is a schematic diagram of a data processing flow provided in an embodiment of this application. Figure 5 As shown, after receiving the data stream, the receiving device can first perform deinterleaving and decoding based on PAM4 symbols. Then, it synchronizes the decoded data stream, removes pads from the synchronized data stream, and performs 1:8 bit deinterleaving on the data stream obtained after removing pads. One deinterleaving operation yields 8 FEC codewords, each corresponding to... Figure 5 The diagram shows FEC codewords 0 to 7. In one example, these eight FEC codewords can form a codeword group. Further, error correction can be performed on each codeword in this codeword group separately. Specifically, the receiving device includes eight FEC decoders for decoding the eight FEC codewords obtained from one deinterleaving operation. The FEC decoders perform error correction on the FEC codewords during decoding. In other words, after obtaining eight FEC codewords from one deinterleaving operation, FEC decoding of FEC codewords 0 to 7 is performed using the eight FEC decoders (FEC decoders 0 to 7) to obtain the number of bits corrected for each of the eight FEC codewords. Correspondingly, summing the number of corrected bits for each of the eight FEC codewords (FEC decoders 0 to 7) yields the total number of corrected bits for the codeword group.
[0204] In the embodiments of this application, the method of counting the number of codeword groups with different numbers of corrected bits or symbols in the at least one codeword group is not limited to the aforementioned R counters. Any method that can perform quantity counting can be used to count the number of codeword groups with different numbers of corrected bits or symbols in the at least one codeword group. They will not be listed here.
[0205] In a specific example, the receiving device may further include at least one of a codeword group count counter, a codeword count counter, and a bit count counter. Wherein:
[0206] The codeword group count counter is used to record the total number of codeword groups included in the data stream. In one example, the receiving device increments the codeword group count counter by 1 for each codeword group obtained based on the deinterleaved codewords.
[0207] The codeword count counter is used to record the total number of codewords included in the data stream. In one example, the receiving device increments the codeword count counter by K every time it deinterleaves and obtains K codewords. The value of K can be a positive integer, for example, in... Figure 1 In the scenario shown, K is 8. In one example, the value of the codeword count counter can be the product of the codeword group count counter and the number of codewords Q included in each codeword group.
[0208] The bit count 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 count counter by 1 each time it receives a bit. In another example, the value of the bit count counter may be the product of the codeword count counter and the number of bits included in each codeword.
[0209] In one example, after counting the number of codeword groups with different numbers of corrected bits 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 record the number of codeword groups with different numbers of corrected bits in the at least one codeword group, burst errors can be further detected based on the values 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, detecting the number of times a burst error has occurred in the data stream, detecting the data length corresponding to the occurrence of a burst error, etc. This application does not specifically limit how to use the counts recorded by the R counters to detect burst errors.
[0210] If the receiving device is further provided with at least one of a codeword group number counter, a codeword number counter, and a bit number counter, the receiving device can detect burst errors by combining the values recorded by at least one of the codeword group number counter, codeword number counter, and bit number counter, as well as the values recorded by the R counters respectively.
[0211] In another example, after counting the number of codeword groups with different numbers of corrected bits in the at least one codeword group, the error rate can be calculated based on the statistical results. As a specific example, after using R counters to record the number of codeword groups with different numbers of corrected bits in the at least one codeword group, the error rate can be further calculated based on the values recorded by the R counters. Regarding the error rate, please refer to the description of the error rate above; it will not be repeated here. This application does not specifically limit how to use the counts recorded by the R counters to calculate the error rate.
[0212] If the receiving device is further provided with at least one of a codeword group count counter, a codeword count counter, and a bit count counter, the receiving device can calculate the error rate by combining the values recorded by at least one of the codeword group count counter, the codeword count counter, and the bit count counter, as well as the values recorded by the R counters respectively.
[0213] In another example, after counting the number of codeword groups with different numbers of corrected bits in the at least one codeword group, the data stream synchronization error can be detected based on the statistical results. As a specific example, after using R counters to record the number of codeword groups with different numbers of corrected bits in the at least one codeword group, the data stream synchronization error can be further detected based on the values recorded by the R counters. Regarding data stream synchronization, please refer to the relevant descriptions above; they will not be repeated here. This application does not specifically limit how to use the counts recorded by the R counters to detect whether the data stream is synchronized.
[0214] If the receiving device is further provided with at least one of a codeword group count counter, a codeword count counter, and a bit count counter, the receiving device can combine the values recorded by at least one of the codeword group count counter, the codeword count counter, and the bit count counter, as well as the values recorded by the R counters respectively, to detect whether the data stream has a synchronization error.
[0215] In one example, after counting the number of codeword groups with different numbers of corrected symbols 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 record the number of codeword groups with different numbers of corrected symbols in the at least one codeword group, burst errors can be further detected based on the values 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, detecting the number of times a burst error has occurred in the data stream, detecting the data length corresponding to the occurrence of a burst error, etc. This application does not specifically limit how to use the counts recorded by the R counters to detect burst errors.
[0216] If the receiving device is further provided with at least one of a codeword group number counter, a codeword number counter, and a symbol number counter, the receiving device can detect burst errors by combining the values recorded by at least one of the codeword group number counter, codeword number counter, and symbol number counter, as well as the values recorded by the R counters respectively.
[0217] In another example, after counting the number of codeword groups with different numbers of corrected symbols in the at least one codeword group, the error rate can be calculated based on the statistical results. As a specific example, after using R counters to record the number of codeword groups with different numbers of corrected symbols in the at least one codeword group, the error rate can be further calculated based on the values recorded by the R counters. Regarding the error rate, please refer to the description of the error rate above; it will not be repeated here. This application does not specifically limit how to use the counts recorded by the R counters to calculate the error rate.
[0218] If the receiving device is further provided with at least one of a codeword group count counter, a codeword count counter, and a symbol count counter, the receiving device can calculate the error rate by combining the values recorded by at least one of the codeword group count counter, the codeword count counter, and the symbol count counter, as well as the values recorded by the R counters respectively.
[0219] In another example, after counting the number of codeword groups with different numbers of corrected symbols in the at least one codeword group, the data stream synchronization error can be detected based on the statistical results. As a specific example, after using R counters to record the number of codeword groups with different numbers of corrected symbols in the at least one codeword group, the data stream synchronization error can be further detected based on the values recorded by the R counters. Regarding data stream synchronization, please refer to the relevant descriptions above; they will not be repeated here. This application does not specifically limit how to use the counts recorded by the R counters to detect whether the data stream is synchronized.
[0220] If the receiving device is further provided with at least one of a codeword group count counter, a codeword count counter, and a symbol count counter, the receiving device can combine the values recorded by at least one of the codeword group count counter, the codeword count counter, and the symbol count counter, as well as the values recorded by the R counters respectively, to detect whether the data stream has a synchronization error.
[0221] As described above, this application provides a novel data statistics method. The receiving device can use R counters to record the number of codeword groups in at least one codeword group that have been corrected with different numbers of bits or symbols. Optionally, the values recorded by the R counters can be analyzed subsequently to determine and evaluate the communication quality provided by the transmission channel (e.g., detecting burst errors or calculating the error rate). Alternatively, the values recorded by the R counters can be analyzed subsequently to determine whether the data processing operations (e.g., data stream synchronization operations) of the receiving device are abnormal.
[0222] In one example, the receiving device may be equipped with at least one of the aforementioned P counters among the R counters. Optionally, it may also be equipped with at least one of the aforementioned codeword group count counter, codeword count counter, and bit count counter. Accordingly, the receiving device may combine the values recorded by its own counters to perform one or more of the following: detecting burst errors, calculating the error rate, and detecting whether the data stream has synchronization errors.
[0223] The data statistics method provided in the embodiments of this application has been described above. Next, the solution of the embodiments of this application will be described in conjunction with the architecture of the receiving end device.
[0224] See Figure 6 The figure is a schematic diagram of the structure of a receiving device provided in an embodiment of this 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. This data statistics device 600 is used to execute the data statistics method performed by the receiving end device as provided in the above method embodiments. Wherein:
[0225] The PAM4 decoding module 601 is used to perform PAM4 decoding on the received data stream, and the data stream obtained by PAM4 decoding is transmitted to the data stream synchronization module.
[0226] The data stream synchronization module 602 is used to synchronize the data stream transmitted by the PAM4 decoding module 601 and then transmit the synchronized data stream to the pad deletion module 603.
[0227] The pad deletion module 603 is used to perform a pad deletion operation on the data stream transmitted by the data stream synchronization module 602, and then transmit the data stream obtained after the pad deletion operation to the deinterleaving module 604.
[0228] The deinterleaving module 604 is used to deinterleave the data stream transmitted by the pad deletion module 603 based on PAM4 symbols to obtain at least one codeword.
[0229] The error correction module 605 is used to correct errors in each codeword to determine the number of bits or symbols that are corrected in each codeword.
[0230] In one example, the error correction module 605 may include at least one FEC decoder, for example, it may include eight FEC decoders. In one example, the receiving device may update the aforementioned P counters based on the number of bits or symbols corrected in each codeword.
[0231] In another example, the receiving 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 bits or symbols corrected, for example, updating the aforementioned R counters.
[0232] Based on the data statistics method provided in the above embodiments, this application also provides a corresponding device, which will be described below with reference to the accompanying drawings.
[0233] See Figure 7 The figure is a schematic diagram of the structure of a data statistics device provided in an embodiment of this application. Figure 7The data statistics device 700 shown includes a receiving unit 701 and a processing unit 702. The data statistics device 700 is used to execute the data statistics method performed by the receiving device provided in the above method embodiments.
[0234] In one possible implementation, the receiving device includes: a chip, an optical module, a network interface card (NIC), a network device, or a server.
[0235] In a specific example, the device 700 is used in at least the above method embodiments with Figure 2 The corresponding data statistics methods. For this situation:
[0236] The receiving unit 701 is used to receive data streams;
[0237] The processing unit 702 is used to record the number of codewords with different numbers of corrected bits or symbols in the data stream using P counters, where P is greater than or equal to 3.
[0238] In one possible implementation, the processing unit 702 is further configured to: detect burst errors based on the values recorded by the P counters respectively; or, calculate the error rate based on the values recorded by the P counters respectively; or, detect whether the data stream has a synchronization error based on the values recorded by the P counters respectively.
[0239] In one possible implementation, the number of corrected bits or symbols corresponding to the P counters is 0 to P-2, and exceeds P-2.
[0240] In one possible implementation, when the number of corrected bits or symbols in a codeword of the data stream is determined, a counter corresponding to the number of bits or symbols is incremented by 1.
[0241] In one possible implementation, the processing unit 702 is further configured to: obtain at least one codeword group based on the data stream, each codeword group comprising 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 been corrected with different numbers of bits or symbols.
[0242] In one possible implementation, the processing unit 702 is further configured to perform at least one of the following: detect burst errors based on the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits or symbols; or calculate an error rate based on the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits or symbols; or detect whether the data stream has a synchronization error based on the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits or symbols.
[0243] In one possible implementation, R counters record the number of codeword groups that have been corrected with different numbers of bits or symbols in the at least one codeword group, where R is greater than or equal to 3.
[0244] In one possible implementation, the number of corrected bits or symbols corresponding to the R counters are respectively 0 to R-2, and more than R-2.
[0245] In one possible implementation, when the number of corrected bits or symbols in one of the at least one codeword groups is determined, a counter corresponding to the number of bits or symbols is incremented by 1.
[0246] In one possible implementation, the processing unit 702 is further configured to perform at least one of the following: a codeword group count counter records the total number of codeword groups included in the data stream; a codeword count counter records the total number of codewords included in the data stream; and a bit count counter records the total number of bits included in the data stream.
[0247] In yet another specific example, the device 700 is used in at least the above method embodiments in conjunction with Figure 4 The corresponding data statistics methods. For this situation:
[0248] The receiving unit 701 is used to receive data streams;
[0249] Processing unit 702 is configured to obtain at least one codeword group based on the data stream, each codeword group comprising Q codewords obtained by deinterleaving, where Q is greater than or equal to 2; and to count the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits or symbols.
[0250] In one possible implementation, the processing unit 702 is further configured to: detect burst errors based on the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits or symbols; or calculate the error rate based on the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits or symbols; or detect whether the data stream has a synchronization error based on the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits or symbols.
[0251] In one possible implementation, R counters record the number of codeword groups that have been corrected with different numbers of bits or symbols in the at least one codeword group, where R is greater than or equal to 3.
[0252] In one possible implementation, the number of corrected bits or symbols corresponding to the R counters are respectively 0 to R-2, and more than R-2.
[0253] In one possible implementation, when the number of corrected bits or symbols in one of the at least one codeword groups is determined, a counter corresponding to the number of bits or symbols is incremented by 1.
[0254] In one possible implementation, the processing unit 702 is further configured to perform at least one of the following: a codeword group count counter records the total number of codeword groups included in the data stream; a codeword count counter records the total number of codewords included in the data stream; and a bit count counter records the total number of bits included in the data stream.
[0255] In one possible implementation, the processing unit 702 is further configured to: use P counters to record the number of codewords in the data stream that have been corrected with different numbers of bits or symbols, where P is greater than or equal to 3.
[0256] In one possible implementation, the processing unit 702 is further configured to: detect burst errors based on the values recorded by the P counters respectively; or, calculate the error rate based on the values recorded by the P counters respectively; or, detect whether the data stream has a synchronization error based on the values recorded by the P counters respectively.
[0257] In one possible implementation, the number of corrected bits or symbols corresponding to the P counters is 0 to P-2, and exceeds P-2.
[0258] In one possible implementation, when the number of corrected bits or symbols in a codeword of the data stream is determined, a counter corresponding to the number of bits or symbols is incremented by 1.
[0259] In one possible implementation, the codeword includes a forward error correction (FEC) codeword.
[0260] In one possible implementation, the FEC codeword includes either an FEC internal codeword or an FEC external codeword.
[0261] See Figure 8 The figure is a schematic diagram of the structure of a device provided in an embodiment of this application. Figure 8 The device 800 shown includes an interface circuit 801 and a processing circuit 802. The interface circuit 801 is used to receive and / or transmit data, and the processing circuit 802 is used to perform data processing.
[0262] In one example, the device 800 can be applied to the above-described receiving device to perform the method provided in the above-described method embodiments by the receiving device.
[0263] In a specific example, the device 800 is used to perform the above and Figure 2 The corresponding method for this situation is:
[0264] The interface circuit 801 is used to receive a data stream; the processing circuit 802 is used to record the number of codewords with different numbers of corrected bits or symbols in the data stream using P counters, where P is greater than or equal to 3.
[0265] In yet another specific example, the device 800 is used to perform the above and Figure 4 The corresponding method for this situation is:
[0266] The interface circuit 801 is used to receive a data stream; the processing circuit 802 is used to obtain at least one codeword group according to 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 to count the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits or symbols.
[0267] See Figure 9 The figure is a schematic diagram of the structure of a device provided in an embodiment of this application.
[0268] In one example Figure 9 The device 900 shown can correspond to the receiving end device mentioned in the above embodiments, and is used to execute the method provided by the receiving end device in the above method embodiments.
[0269] Please see Figure 9 As shown, device 900 includes a processor 910 and a communication interface 920. The number of processors 910 in device 900 can be one or more. Figure 9 Let's take a processor as an example.
[0270] Communication interface 920 is used to receive and / or send data. Processor 910 is used to process the data. For example, when the device 900 is used to perform operations related to... Figure 2 In the corresponding method, the communication interface 920 is used to receive a data stream. The processor 910 uses P counters to record 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. When the device 900 is used to perform... Figure 4In the corresponding method, the communication interface 920 is used to receive a data stream. The processor 910 is used to obtain at least one codeword group according to the data stream, each codeword group including Q codewords obtained by deinterleaving, where Q is greater than or equal to 2; and to count the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits or symbols. The processor 910 may be a central processing unit (CPU), an NP, or a combination of CPU and NP. The processor 910 may further include a hardware chip. The hardware chip may be an ASIC, a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0271] In one example, the device 900 further includes a memory 930. The memory 930 may include volatile memory, such as random-access memory (RAM); the memory 930 may also include non-volatile memory, such as flash memory, hard disk drive (HDD), or solid-state drive (SSD); the memory 930 may also include combinations of the above types of memory. The memory 930 may, for example, store the values recorded by the aforementioned P counters and / or R counters.
[0272] Optionally, the memory 930 stores an operating system and programs, executable modules, or data structures, or subsets thereof, or extended sets thereof. The programs may include various operation instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and handling hardware-based tasks. The processor 910 can read the programs from the memory 930 to implement the methods provided in the embodiments of this application.
[0273] In one example, the processor 910, communication interface 920, and memory 930 may be connected via a bus system or other means, wherein... Figure 9 Taking the connection between China and Israel via the 940 bus system as an example.
[0274] 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 address bus, data bus, control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0275] See Figure 10 The figure is a schematic diagram of the structure of a chip or optical module provided in an embodiment of this 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 used to receive and / or transmit data, and the processing circuit 1002 is used to perform data processing.
[0276] In one example, the chip or optical module 1000 can be applied to the above-mentioned receiving device to execute the method provided by the receiving device in the above-mentioned method embodiments.
[0277] In a specific example, the chip or optical module 1000 is used to perform the above-mentioned functions. Figure 2 The corresponding method for this situation is:
[0278] The interface circuit 1001 is used to receive a data stream; the processing circuit 1002 is used to record the number of codewords with different numbers of corrected bits or symbols in the data stream using P counters, where P is greater than or equal to 3.
[0279] In yet another specific example, the chip or optical module 1000 is used to perform the above-mentioned tasks. Figure 4 The corresponding method for this situation is:
[0280] The interface circuit 1001 is used to receive a data stream; the processing circuit 1002 is used to obtain at least one codeword group according to 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 to count the number of codeword groups in the at least one codeword group that have been corrected with different numbers of bits or symbols.
[0281] This application provides a computer-readable storage medium, including instructions or a computer program, which, when run on a computer, causes the computer to perform the methods described in the above method embodiments.
[0282] This application provides a computer program product containing instructions or computer programs, which, when run on a computer, causes the computer to perform the methods described in the above method embodiments.
[0283] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0284] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0285] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical business division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0286] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0287] Furthermore, the various business units in the embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software business unit.
[0288] If the integrated unit is implemented as a software business 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 solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0289] Those skilled in the art will recognize that, in one or more of the examples above, the services described in this invention can be implemented using 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 code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium accessible to general-purpose or special-purpose computers.
[0290] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention.
[0291] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A data statistics method, characterized in that, The method is executed by the optical module, and the method includes: Receive data stream; The data stream is de-padded and de-interleaved using a 1:8 bit pair to obtain 8 processed data streams; Forward error correction (FEC) decoding is performed on the eight processed data streams; P counters record the number of codewords that have been corrected by different numbers of bits in the 8 processed data streams, where P equals 4, and the number of bits corrected corresponding to the P counters are 0, 1, 2, and more than 2, respectively.
2. The method according to claim 1, characterized in that, The number of corrected bits corresponding to the P counters is continuous.
3. The method according to claim 1 or 2, characterized in that, Counter P0 is used to record the number of codewords that have been corrected to 0 bits, counter P1 is used to record the number of codewords that have been corrected to 1 bit, counter P2 is used to record the number of codewords that have been corrected to 2 bits, and counter P3 is used to record the number of codewords that have been corrected to more than 2 bits.
4. The method according to claim 1 or 2, characterized in that, The method further includes: The number of bits included in the data stream is recorded using a bit count counter.
5. The method according to claim 1 or 2, characterized in that, The codeword is the internal codeword in the concatenated code.
6. The method according to claim 1 or 2, characterized in that, The codeword is BCH (126, 110) code, BCH (128, 120) code, Hamming code, or systematic binary (128, 120) code.
7. The method according to claim 1 or 2, characterized in that, The method further includes: Based on the values recorded by the P counters, burst errors are detected; or, Calculate the error rate based on the values recorded by the P counters, or... Based on the values recorded by the P counters, the system detects whether the data stream has a synchronization error.
8. The method according to claim 7, characterized in that, The error rate includes: One or more of the following: bit error rate, codeword error rate, symbol error rate, and frame drop rate.
9. The method according to claim 1 or 2, characterized in that, The P counters respectively record the number of codewords in the data stream that have been corrected with different numbers of bits, including: The P counters respectively record the number of codewords with different numbers of bits corrected in the data stream after FEC decoding.
10. A data statistics device, characterized in that, The device includes a receiving unit and a processing unit. The receiving unit is used to receive data streams; The processing unit is used to perform deletion, padding, and 1:8 bit deinterleaving on the data stream to obtain 8 processed data streams. Forward error correction (FEC) decoding is performed on the eight processed data streams; The number of codewords with different numbers of bits corrected in the 8 processed data streams is recorded by P counters, where P equals 4, and the number of bits corrected corresponding to the P counters are 0, 1, 2, and more than 2, respectively.
11. The apparatus according to claim 10, characterized in that, The number of corrected bits corresponding to the P counters is continuous.
12. The apparatus according to claim 10 or 11, characterized in that, Counter P0 is used to record the number of codewords that have been corrected to 0 bits, counter P1 is used to record the number of codewords that have been corrected to 1 bit, counter P2 is used to record the number of codewords that have been corrected to 2 bits, and counter P3 is used to record the number of codewords that have been corrected to more than 2 bits.
13. The apparatus according to claim 10 or 11, characterized in that, The processing unit is also used for: The number of bits included in the data stream is recorded using a bit count counter.
14. The apparatus according to claim 10 or 11, characterized in that, The codeword is the internal codeword in the concatenated code.
15. The apparatus according to claim 10 or 11, characterized in that, The codeword is BCH (126, 110) code, BCH (128, 120) code, Hamming code, or systematic binary (128, 120) code.
16. The apparatus according to claim 10 or 11, characterized in that, The processing unit is also used for: Based on the values recorded by the P counters, burst errors are detected; or, Calculate the error rate based on the values recorded by the P counters, or... Based on the values recorded by the P counters, the system detects whether the data stream has a synchronization error.
17. The apparatus according to claim 16, characterized in that, The error rate includes: One or more of the following: bit error rate, codeword error rate, symbol error rate, and frame drop rate.
18. The apparatus according to claim 10 or 11, characterized in that, The processing unit is also used for: Before performing deletion padding and 1:8 bit deinterleaving on the data stream, the data stream is also subjected to four-level pulse amplitude modulation decoding and data synchronization processing.
19. The apparatus according to claim 10, characterized in that, The device includes an optical module.
20. A chip, characterized in that, The chip includes a processor for performing the method as described in any one of claims 1 to 9.
21. A computer program product, characterized in that, It includes program instructions that, when the computer program product is executed, perform the method described in any one of claims 1-9 above.
Citation Information
Patent Citations
Techniques for link partner error reporting
US20190215008A1