Data processing method and second communication device

By determining the synchronization status in the second communication device and transmitting the indication information to the fourth communication device, the problem of a longer data synchronization time in the existing Ethernet technology is solved, and more efficient data transmission is achieved.

CN119420461AActive Publication Date: 2025-02-11HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411296136.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-03-08
Publication Date
2025-02-11
Estimated Expiration
2042-03-08

AI Technical Summary

Technical Problem

In the existing Ethernet technology, the data synchronization time is long, resulting in an increase in transmission delay and cannot meet the high throughput requirements.

Method used

By receiving data from the first communication device in the second communication device, the synchronization loss and synchronization lock state are determined, and the instruction information is transmitted to the fourth communication device, the duration of data synchronization is reduced. The specific method includes replacing part of the data using a preset sequence so that the second host can quickly synchronize.

Benefits of technology

It effectively reduces the time of data synchronization, reduces the calculation overhead and wait time, and improves the efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420461A_ABST
    Figure CN119420461A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and a second communication device, which are used for solving the problem of long data synchronization time in the prior art. The method can be applied to the fields of augmented reality (AR), virtual reality (VR), artificial intelligence (AI), cloud application and the like. The data processing method comprises the following steps: a second optical module receives first data from a first optical module, and determines synchronous lock loss according to the first data; the second optical module sends first indication information used for indicating synchronous lock losing of the second optical module to a second host; and the second optical module receives the second data from the first optical module, determines synchronous locking according to the second data, and sends second indication information for indicating that the second optical module is synchronously locked to the second host. And the second optical module indicates the synchronization state of the second optical module to the second host through the first indication information and the second indication information, so that the second host can quickly start (or enter) the synchronization process without waiting for a long time, and the data synchronization duration can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the application filed with the China Intellectual Property Office with an application date of March 8, 2022, application number 202210220031.2, and invention name “A data processing method and a second communication device”. Technical Field

[0002] The present application relates to the field of data processing technology, and in particular to a data processing method and a second communication device. Background Art

[0003] With the continuous and rapid growth of data traffic, the capacity of communication equipment is also increasing rapidly, and the requirements for Ethernet transmission rate are getting higher and higher. The International Standards Organization has defined the Institute of Electrical and Electronics Engineers (IEEE) 802.3 Ethernet protocol, which defines the interface protocols of 100 Gigabit Ethernet (GE), 200GE, and 400GE. However, 400GE network port technology can no longer meet the demand, and the next generation of Ethernet technology with a throughput rate exceeding 400 Gbit per second (Gbps) (such as 800Gbps or 1.6Tbps) is urgently needed.

[0004] However, the increase in Ethernet transmission rate will increase the bit error rate of transmission, and the data needs to be synchronized and aligned first during the data transmission process. At present, the synchronization alignment mechanism of 400GE is mainly through capturing the alignment marker (AM) sequence. Usually, an AM subsequence can be found every 163840×257 bits. After two consecutive AMs can be correctly matched, the data is determined to be synchronized; after five consecutive AM subsequences cannot be correctly matched, the data is determined to be not synchronized. Due to the large interval between AM subsequences, data synchronization will take a long time, thereby increasing the data transmission delay.

[0005] In summary, how to reduce the duration of data synchronization is a technical problem that needs to be solved urgently. Summary of the invention

[0006] The present application provides a data processing method and a second communication device for reducing the duration of data synchronization.

[0007] In a first aspect, the present application provides a data processing method, which includes a second communication device receiving first data from a first communication device, and determining, based on the first data, that synchronization is lost (or called unsynchronized, misaligned, or unsynchronized aligned, etc.); sending first indication information to a fourth communication device, the first indication information being used to indicate that synchronization of the second communication device has been lost; the second communication device receiving second data from the first communication device, and determining, based on the second data, that synchronization is locked (or called synchronized, aligned, or synchronized aligned, etc.), and sending second indication information to the fourth communication device, the second indication information being used to indicate that the second communication device has been synchronized locked.

[0008] Based on the above scheme, after the second communication device determines that the synchronization is lost, it sends the first indication information for indicating that the second communication device has lost the synchronization to the fourth communication device, which can enable the fourth communication device to determine that the first data is invalid data, thereby helping to save the calculation overhead of the fourth communication device. Further, after the second communication device determines that the synchronization is locked, it sends the second indication information for indicating that the second communication device has been synchronized and locked to the fourth communication device, so that the fourth communication device can quickly start (or enter) the synchronization process without waiting for a long time, thereby helping to reduce the duration of data synchronization.

[0009] In a possible implementation manner, the second communication device includes a second optical module, the first communication device includes a first optical module, and the fourth communication device includes a second host.

[0010] In order to facilitate the description of the solution, the following description takes the second communication device as the second optical module, the first communication device as the first optical module, the third communication device as the first host, and the fourth communication device as the second host. In other words, the first optical module in the following description can be replaced by the first communication device, the second optical module can be replaced by the second communication device, the first host can be replaced by the third communication device, and the second host can be replaced by the fourth communication device.

[0011] In a possible implementation, the second optical module sends third data to the second host, where the third data is obtained by replacing part of the second data with a first preset sequence, and the first preset sequence is used for synchronization of the second host.

[0012] By replacing part of the second data with the first preset sequence, it helps to save bandwidth between the second optical module and the second host; moreover, the second host can be synchronized based on the first preset sequence in the third data, without having to wait for a long time for the first host to insert an AM subsequence in the second data at a larger interval to determine whether to be synchronized, thereby helping to further reduce the synchronization time of the data.

[0013] In a possible implementation manner, the first preset sequence is at least one subsequence in an AM group, which may be referred to as an AM subsequence.

[0014] In one possible implementation, the second optical module may send the second indication information to the second host through the indication signal path of the attachment unit interface (AUI). Alternatively, the second optical module may send the second indication information to the second host through the management data input / output (MDIO) interface. The indication signal path may be, for example, inst:IS_SIGNAL.indication, where inst represents an instance. For example, if inst is the FEC sublayer, the indication signal path may be represented as FEC:IS_SIGNAL.indication. inst:IS_SIGNAL.indication is generated by a set of signal indication logic (SIL) to report the validity of the signal received from the lower layer processing unit. The various detection indication signals generated by the second optical module are integrated into the inst:IS_SIGNAL.indication path through the signal indication logic SIL and sent to the second host.

[0015] The second optical module can send the second indication information to the second host in real time and at high speed through the indication signal path of AUI; through the MDIO interface, the second indication information can be sent to the second host without changing the processing flow of the existing data stream.

[0016] In a possible implementation, the second optical module may send the third data to the second host through the first data flow path of the AUI, wherein the first data flow path may be, for example, inst:IS_UNITDATA.indication.

[0017] In a possible implementation manner, the second optical module may send the first indication information to the second host through the indication signal path of the AUI.

[0018] In a possible implementation manner, the second optical module may send the first data to the second host through the first data flow path of the AUI.

[0019] As follows, three possible ways of replacing part of the second data with the first preset sequence are exemplarily shown.

[0020] Mode A: replacing the complete second codeword with the first preset sequence.

[0021] In a possible implementation, the second data includes N second code words, where N is an integer greater than 1; the second optical module replaces w of the N second code words with the first preset sequence to obtain third data, where w is a positive integer less than or equal to N. Further, w is a positive integer greater than 1 and less than or equal to N.

[0022] Furthermore, the length of the first preset sequence is equal to a positive integer multiple of the code length of a second codeword.

[0023] By replacing the complete second codeword with the first preset, the second host can quickly determine the boundary of each second codeword of the received second data, thereby reducing the time required for synchronization and reducing the complexity of synchronization calculation on the second host side.

[0024] Mode B: The second overhead block in the second codeword is replaced by the first preset sequence.

[0025] In one possible implementation, the second data includes N second codewords, the second codewords include a second information block and a second overhead block, and N is an integer greater than 1; the second optical module replaces the second overhead blocks of w second codewords among the N second codewords with a first preset sequence to obtain third data.

[0026] Furthermore, the length of the first preset sequence is less than or equal to the length of a second overhead block.

[0027] By replacing the second overhead block in the second codeword with the first preset sequence, the normal transmission of valid data may not be affected. Further, when the length of the first preset sequence is equal to the length of a second overhead block, the second host can quickly determine the boundary of the second codeword of the received second data, thereby reducing the time required for synchronization.

[0028] Mode C: replacing the second information block in the second codeword with the first preset sequence.

[0029] In one possible implementation, the second data includes N second codewords, the second codewords include a second information block and a second overhead block, and N is an integer greater than 1; the second optical module replaces the first information blocks of w second codewords among the N second codewords with a first preset sequence to obtain third data.

[0030] Furthermore, the length of the first preset sequence is less than or equal to the length of one second information block.

[0031] When the second optical module needs to discard the second overhead block, the second information block is replaced by the first preset sequence, so that the second host can be synchronized according to the first preset sequence, which helps to reduce the time required for the second host synchronization.

[0032] In a possible implementation, the w second codewords are w consecutive or w non-consecutive ones of the N second codewords. The intervals of the w non-consecutive second codewords may be the same or different. For example, a second codeword may be replaced with the first preset sequence at every interval of 2×j×5440 / PCSL / L, where L represents the length of the second information block of the second codeword, PCSL represents the number of physical coding sublayer channels, and j may be a positive integer such as 1, 2, 3, or 4.

[0033] The continuous w first preset sequences can enable the second host to quickly detect the w first preset sequences, thereby further shortening the time required for synchronization. The non-continuous w can prevent the data from being partially lost during the transmission process, causing the second host to be unable to detect the first preset sequence. Further, when w is greater than 2, it can prevent the second host from being unable to accurately determine the synchronization state due to the partial loss of the second data during the transmission process, thereby helping to improve the accuracy of the second host synchronization.

[0034] In one possible implementation, the second data may include a second preset sequence, and the second optical module may replace the second codeword with the first preset sequence starting from the boundary position of any second codeword of the N second codewords, and stop replacing after detecting that the second preset sequence matches the second known preset sequence of the second optical module at least once, thereby obtaining third data.

[0035] When the second data includes a second preset sequence, the second optical module may stop replacing after detecting that the second preset sequence matches the second known preset sequence of the second optical module at least once, thereby helping the second optical module to reduce the number of replaced second codewords.

[0036] In a possible implementation manner, the second preset sequence is at least one subsequence in the AM group.

[0037] The second preset sequence is set as at least one subsequence in the AM group, which can be compatible with the existing AM synchronization mechanism.

[0038] As follows, two possible implementations of synchronization according to the second data are exemplarily shown.

[0039] Implementation A

[0040] In one possible implementation, the second data includes N second code words, where N is an integer greater than 1; the second optical module decodes the second data according to a preset bit number sliding window, and after determining that at least one decoding is successful, decodes according to a code length sliding window of the second code word, and counts the number of successful decodings in the second decoding result. If the number of successful decodings in the second decoding result is greater than a third threshold, synchronization lock is determined, where the preset bit number is less than the code length of the second code word.

[0041] Since the second optical module needs to track the synchronization status of the received data in real time, the above implementation mode A can be compatible with the existing synchronization mechanism, thereby simplifying the complexity of the second optical module in processing the received data.

[0042] Implementation method B

[0043] In one possible implementation, the second data includes N second codewords, the second codewords include a second information block and a second overhead block, the second overhead block includes a third preset sequence, and the second optical module detects within a preset time window that the number of third preset sequences is greater than a fifth threshold, and determines synchronization lock.

[0044] The synchronization lock is determined by detecting the number of the third preset sequence within the preset time window, without decoding, and the implementation is relatively simple. Moreover, the third preset sequence occupies part of the bits in the first overhead block, so the amount of transmitted data will not be increased.

[0045] As follows, two possible implementations of determining the synchronization state of the second optical module according to the first data are exemplarily shown.

[0046] Implementation method 1: determining the synchronization state based on the decoding result.

[0047] In a possible implementation, the second optical module decodes the first data to obtain M first decoding results, where the first decoding results include decoding success or decoding failure, and M is an integer greater than 1; if the number of decoding failures in the M first decoding results is greater than a first threshold, it is determined that the synchronization is lost. Alternatively, if the number of decoding successes in the M first decoding results is greater than a second threshold, it is determined that the synchronization is locked.

[0048] Implementation method 2: determining synchronization based on a third preset sequence included in the first overhead block of the first codeword.

[0049] In a possible implementation, the first data includes Q first codewords, the first codeword includes a first information block and a first overhead block, the first overhead block includes a third preset sequence, and Q is an integer greater than 1; if the second optical module detects that the number of the third preset sequence is less than a fifth threshold value within a preset time window, it is determined that the synchronization is lost. If the second optical module detects that the number of the third preset sequence is greater than or equal to the fifth threshold value within the preset time window, it is determined that the synchronization is locked.

[0050] In a possible implementation manner, the second optical module receives third indication information from the second host through the MDIO interface, where the third indication information is used to indicate that synchronization of the second host is lost.

[0051] In one possible implementation, the second optical module includes a second physical medium access (PMA) sublayer, or includes a second PMA sublayer and a second forward error correction (FEC) sublayer, and the second host includes a second physical coding sublayer (PCS), or includes a second PCS and a fourth FEC sublayer.

[0052] In a second aspect, the present application provides a data processing method, which includes a second host receiving first indication information from a second optical module, the first indication information being used to indicate that the second optical module has lost synchronization lock; the second host determining the loss of synchronization based on the first indication information; the second host receiving second indication information from the second optical module, the second indication information being used to indicate that the second optical module has been locked synchronously; and the second host starting synchronization based on the second indication information.

[0053] Based on the above scheme, after the second host receives the first indication information indicating that the second optical module has lost synchronization lock, it can be determined that the received first data is invalid data; and, it can be determined that the second host has lost synchronization lock; further, the second host receives the second indication information indicating that the second optical module has been synchronously locked, and can quickly start (or enter) synchronization without waiting for a long time, thereby helping to reduce the duration of data synchronization.

[0054] In a possible implementation, the second host may receive the first indication information from the second optical module through the MDIO interface; or, the second host may receive the first indication information from the second optical module through the indication signal path of the AUI.

[0055] In a possible implementation, the second host may receive the second indication information from the second optical module through the MDIO interface; or, the second host may receive the second indication information from the second optical module through the indication signal path of the AUI.

[0056] In a possible implementation, the method also includes a second host receiving third data from a second optical module, the third data is obtained by replacing part of the second data with a first preset sequence, and the third data includes a second preset sequence, the second data is received by the second optical module from the first optical module, the second host detects at least once that the first preset sequence matches the first known preset sequence of the second host, and detects at least once that the second preset sequence matches the fourth known preset sequence of the second host, indicating that AM is locked; further, for each physical coding sublayer channel, the second host determines that the number of second preset sequences is 1, indicating that the conditions for channel rearrangement are met; further, the second host rearranges m physical coding word layer channels, where m is an integer greater than 1.

[0057] By detecting at least once that the first preset sequence matches the first known preset sequence of the second host, and detecting at least once that the second preset sequence matches the fourth known preset sequence of the second host, there is no need to wait for a long time for the first host to determine whether to be synchronized by inserting an AM subsequence at a larger interval in the second data, thereby reducing the time required for synchronization of the second host.

[0058] In a third aspect, the present application provides a data processing method. The method includes a first optical module receiving fourth data from a first host, the fourth data including k second preset sequences, k being an integer greater than 1; the first optical module determining synchronization loss according to the fourth data, and sending the fourth data to the first host.

[0059] Based on the above solution, the first host receives the fourth data from the first optical module, and can determine that the first optical module is out of synchronization, and enters a loopback mode, which helps to prevent the first optical module from transmitting the out of synchronization data to the second optical module, causing the second optical module to be unable to accurately identify the received data. In addition, it helps to prevent the first optical module from exceeding the allocated processing delay limit.

[0060] Furthermore, the first optical module may also receive fifth data from the first host, where the fifth data includes h second preset sequences, and h is greater than k.

[0061] By inserting the second preset sequence more densely to obtain the fifth data, the first optical module can achieve synchronous locking more quickly.

[0062] In a possible implementation manner, the first optical module may receive fourth indication information from the first host through the MDIO interface, where the fourth indication information is used to indicate that synchronization of the first host is lost.

[0063] By sending the fourth indication information to the first optical module by the first host, the first optical module can quickly enter the loopback mode.

[0064] In a fourth aspect, the present application provides a data processing method, which includes a second optical module receiving sixth data from a first optical module, determining synchronization loss based on the sixth data, replacing part of the data in the seventh data with a fourth preset sequence, and obtaining eighth data, where the seventh data is received by the second optical module from the second host; the second optical module sending eighth data to the first optical module and receiving ninth data from the first optical module, where the ninth data is obtained by the first optical module replacing the tenth data with the fourth preset sequence, and the tenth data is received by the first optical module from the first host; the second optical module detecting at least two fourth preset sequences from the ninth data, replacing the fourth preset sequence in the eighth data with a fifth preset sequence, and obtaining eleventh data, where the fifth preset sequence is different from the fourth preset sequence; the second optical module sending the eleventh data to the first optical module and receiving the twelfth data from the first optical module, where the twelfth data is obtained after the first optical module detects at least two fourth preset sequences from the eighth data and replaces the fourth preset sequence in the ninth data with the fifth preset sequence; the second optical module detects at least two fifth preset sequences and determines synchronization lock.

[0065] Based on the above solution, the synchronization between the first optical module and the second optical module can be independent of the processing flow of the first host and the second host, so there is no need to change the synchronization flow of the existing host.

[0066] As follows, three possible ways of replacing part of the seventh data with the fourth preset sequence are exemplarily shown.

[0067] In a possible implementation, the seventh data includes P third codewords, the third codewords include a third information block and a third overhead block, and P is an integer greater than 1.

[0068] Mode 1: replacing the complete third codeword with the fourth preset sequence.

[0069] In a possible implementation manner, the second optical module replaces z of the P third codewords with a fourth preset sequence to obtain eighth data, where z is a positive integer greater than 1 and less than or equal to P.

[0070] Furthermore, the length of the fourth preset sequence is equal to a positive integer multiple of the code length of the third codeword.

[0071] By replacing the complete third codeword with the fourth preset, the first optical module can quickly determine the boundary of each third codeword of the received eighth data, thereby shortening the time required for synchronization and reducing the complexity of synchronization calculation on the first optical module side.

[0072] Mode 2: replacing the third overhead block in the third codeword with a fourth preset sequence.

[0073] In a possible implementation manner, the second optical module replaces the third overhead blocks of z third code words among the P third code words with a fourth preset sequence to obtain eighth data.

[0074] Furthermore, the length of the fourth preset sequence is less than or equal to the length of a third overhead block.

[0075] By replacing the third overhead block in the third codeword with the fourth preset sequence, the normal transmission of valid data may not be affected. Further, when the length of the fourth preset sequence is equal to the length of one third overhead block, the first optical module can be facilitated to quickly determine the boundary of the third codeword of the received eighth data, thereby reducing the time required for synchronization.

[0076] Mode 3: replacing the third information block in the third codeword with a fourth preset sequence.

[0077] In a possible implementation manner, the second optical module replaces the third information blocks of z third code words among the P third code words with a fourth preset sequence to obtain eighth data.

[0078] Furthermore, the length of the fourth preset sequence is less than or equal to the length of one third information block.

[0079] When the second optical module needs to discard the second overhead block, the third information block is replaced by the fourth preset sequence, so that the first optical module is synchronized according to the fourth preset sequence, which helps to reduce the time required for synchronization of the first optical module.

[0080] In a possible implementation, the z third codewords are z consecutive or z non-consecutive ones of the P third codewords. The intervals of the z non-consecutive third codewords may be the same. For example, a third codeword may be replaced with the first preset sequence at every interval of 2×j×5440 / PCSL / L, where L represents the length of the third information block of the third codeword, PCSL represents the number of physical coding sublayer channels, and j may take the value of 1, 2, 3, 4, or other positive integers. Alternatively, the intervals of the z non-consecutive third codewords may also be different, which is not limited in this application.

[0081] In one possible implementation, when the second optical module detects at least two fifth preset sequences and determines that the synchronization is locked, the second optical module can send second indication information to the second host through the indication signal path of AUI or through the MDIO interface, and send thirteenth data to the second host through the first data flow path of AUI.

[0082] In one possible implementation, after the second optical module determines that synchronization is lost based on the sixth data, the second optical module may send the first indication information to the second host through the indication signal path of AUI or through the MDIO interface, and send the sixth data to the second host through the first data flow path of AUI.

[0083] In one possible implementation, the second optical module includes a second PMA sublayer, or includes a second PMA sublayer and a second FEC sublayer, the second host includes a second PCS, or includes a second PCS and a fourth FEC sublayer, the first optical module includes a first PMA sublayer, or includes a first PMA sublayer and a first FEC sublayer, and the first host includes a first PCS, or includes a first PCS and a first FEC sublayer.

[0084] In a fifth aspect, the present application provides a data processing method, which includes a second layer receiving first data from a first layer, the second layer including a second PMA sublayer, or including a second PMA sublayer and a second FEC sublayer, and the first layer including a first PMA sublayer, or including a first PMA sublayer and a first FEC sublayer; the second layer determines synchronization loss (or called unsynchronized, unaligned, or unsynchronized alignment, etc.) based on the first data; the second layer sends first indication information to a fourth layer, the fourth layer includes a second PCS, or includes a second PCS and a second FEC sublayer, and the first indication information is used to indicate that the second optical module has lost synchronization lock; the second layer receives second data from the first layer, determines synchronization lock (or called synchronized, aligned, or synchronized aligned, etc.) based on the second data, and sends second indication information to the fourth layer, and the second indication information is used to indicate that the second optical module has been synchronized and locked.

[0085] Based on the above scheme, after the second layer determines that the synchronization is lost, it sends the first indication information indicating that the second layer has lost the synchronization to the fourth layer, so that the fourth layer can determine that the first data is invalid data, thereby helping to avoid operation errors of the fourth layer. Further, after the second layer determines that the synchronization is locked, it sends the second indication information indicating that the second layer has been synchronized to the fourth layer, so that the fourth layer can quickly start (or enter) the synchronization process without waiting for a long time, thereby helping to reduce the duration of data synchronization.

[0086] In a possible implementation, the second layer sends third data to the fourth layer, where the third data is obtained by replacing part of the second data with a first preset sequence, and the first preset sequence is used for synchronization of the fourth layer.

[0087] In a possible implementation manner, the first preset sequence is at least one subsequence in the AM group.

[0088] In a possible implementation, the second layer may send the second indication information to the fourth layer through an indication signal path of the AUI. Alternatively, the second layer may send the second indication information to the fourth layer through an MDIO interface.

[0089] In a possible implementation, the second layer may send the third data to the fourth layer through the first data flow path of the AUI.

[0090] In a possible implementation, the second layer may send the first indication information to the fourth layer through an indication signal path of the AUI.

[0091] In a possible implementation, the second layer may send the first data to the fourth layer through the first data flow path of the AUI.

[0092] As follows, three possible ways of replacing part of the second data with the first preset sequence are exemplarily shown.

[0093] Mode A: replacing the complete second codeword with the first preset sequence.

[0094] In a possible implementation, the second data includes N second codewords, where N is an integer greater than 1; the second layer replaces w of the N second codewords with the first preset sequence to obtain third data, where w is a positive integer less than or equal to N. Further, w is a positive integer greater than 1 and less than or equal to N.

[0095] Furthermore, the length of the first preset sequence is equal to a positive integer multiple of the code length of a second codeword.

[0096] Mode B: The second overhead block in the second codeword is replaced by the first preset sequence.

[0097] In one possible implementation, the second data includes N second codewords, the second codewords include a second information block and a second overhead block, and N is an integer greater than 1; the second layer replaces the first information blocks of w second codewords among the N second codewords with a first preset sequence to obtain third data.

[0098] Furthermore, the length of the first preset sequence is less than or equal to the length of one second information block.

[0099] Mode C: replacing the second information block in the second codeword with the first preset sequence.

[0100] In one possible implementation, the second data includes N second codewords, the second codewords include a second information block and a second overhead block, and N is an integer greater than 1; the second layer replaces the second overhead blocks of w second codewords among the N second codewords with a first preset sequence to obtain third data.

[0101] Furthermore, the length of the first preset sequence is less than or equal to the length of a second overhead block.

[0102] In a possible implementation, the w second codewords are w consecutive or w non-consecutive ones of the N second codewords. The intervals of the w non-consecutive second codewords may be the same or different. For example, a second codeword may be replaced with the first preset sequence at every interval of 2×j×5440 / PCSL / L, where L represents the length of the second information block of the second codeword, PCSL represents the number of physical coding sublayer channels, and j may be a positive integer such as 1, 2, 3, or 4.

[0103] In one possible implementation, the second data includes a second preset sequence, and the second layer can replace the second codeword with the first preset sequence starting from the boundary position of any second codeword of the N second codewords, and stop replacing after detecting that the second preset sequence matches the second known preset sequence of the second layer at least once, to obtain third data.

[0104] In a possible implementation manner, the second preset sequence is at least one subsequence in the alignment mark AM group.

[0105] As follows, two possible implementations of synchronization according to the second data are exemplarily shown.

[0106] Implementation A

[0107] In one possible implementation, the second data includes N second code words, where N is an integer greater than 1; the second layer decodes the second data according to a sliding window of a preset number of bits, and after determining that at least one decoding is successful, decodes according to a sliding window of a code length of the second code word, and counts the number of successful decodings in the second decoding result. If the number of successful decodings in the second decoding result is greater than a third threshold, synchronization lock is determined, where the preset number of bits is less than the code length of the second code word.

[0108] Implementation method B

[0109] In one possible implementation, the second data includes N second codewords, the second codewords include a second information block and a second overhead block, the second overhead block includes a third preset sequence, and the second layer detects within a preset time window that the number of third preset sequences is greater than a fifth threshold, thereby determining synchronization lock.

[0110] As follows, two possible implementations of determining second layer synchronization according to first data are exemplarily shown.

[0111] Implementation method 1: determining synchronization based on decoding results.

[0112] In a possible implementation, the second layer decodes the first data to obtain M first decoding results, where the first decoding results include decoding success or decoding failure, and M is an integer greater than 1; if the number of decoding failures in the M first decoding results is greater than a first threshold, it is determined that synchronization is lost. If the number of decoding successes in the M first decoding results is greater than a second threshold, it is determined that synchronization is locked.

[0113] Implementation method 2: determining synchronization based on a third preset sequence included in the first overhead block of the first codeword.

[0114] In a possible implementation, the first data includes Q first codewords, the first codeword includes a first information block and a first overhead block, the first overhead block includes a third preset sequence, and Q is an integer greater than 1; if the second layer is within a preset time window and the number of the third preset sequences is detected to be less than a fifth threshold, it is determined that the synchronization is lost. If the second layer is within a preset time window and the number of the third preset sequences is detected to be greater than or equal to the fifth threshold, it is determined that the synchronization is locked.

[0115] In a possible implementation manner, the second layer receives third indication information from the fourth layer through the MDIO interface, where the third indication information is used to indicate that synchronization of the fourth layer is lost.

[0116] The technical effects that can be achieved in any aspect of the fifth aspect can refer to the description of the beneficial effects in the first aspect, and will not be repeated here.

[0117] In a sixth aspect, the present application provides a data processing method, the method comprising: the fourth layer receiving first indication information from the second layer, the first indication information being used to indicate that the second layer has lost synchronization lock; the fourth layer determining the loss of synchronization based on the first indication information; the fourth layer receiving second indication information from the second layer, the second indication information being used to indicate that the second layer has been synchronized and locked; the fourth layer starting synchronization based on the second indication information, the second layer including a second PMA sublayer, or including a second PMA sublayer and a second FEC sublayer, the fourth layer including a second PCS, or including a second PCS and a second FEC sublayer.

[0118] Based on the above scheme, after the fourth layer receives the first indication information for indicating that the second layer has lost synchronization lock, it can determine that the received first data is invalid data, thereby helping to avoid operational errors of the fourth layer; and, it can determine that the fourth layer has lost synchronization lock; further, the fourth layer receives the second indication information for indicating that the second layer has been synchronously locked, and can quickly start (or enter) the synchronization process without waiting for a long time, thereby helping to reduce the duration of data synchronization.

[0119] In a possible implementation, the fourth layer may receive the first indication information from the second layer through the MDIO interface; or the fourth layer may receive the first indication information from the second layer through the indication signal path of the AUI.

[0120] In a possible implementation, the fourth layer may receive the second indication information from the second layer through the MDIO interface; or the fourth layer may receive the second indication information from the second layer through the indication signal path of the AUI.

[0121] In a possible implementation, the method also includes the fourth layer receiving third data from the second layer, the third data being obtained by replacing part of the second data with the first preset sequence, the second data being received by the second layer from the first layer, and the third data also including the second preset sequence; the fourth layer detects that the first preset sequence matches the first known preset sequence of the fourth layer at least once, and detects that the second preset sequence matches the fourth known preset sequence of the fourth layer at least once, further, determines that the number of second preset sequences is 1, and rearranges m physical coding word layer channels, where m is an integer greater than 1.

[0122] The technical effects that can be achieved in any aspect of the sixth aspect can refer to the description of the beneficial effects in the second aspect, and will not be repeated here.

[0123] In a seventh aspect, the present application provides a data processing method. The method includes a first layer receiving fourth data from a third layer, the fourth data including k second preset sequences, k being an integer greater than 1; the first layer determining synchronization loss according to the fourth data, and sending the fourth data to the third layer, wherein the first layer includes a first PMA sublayer, or includes the first PMA sublayer and a first FEC sublayer, and the third layer includes a first PCS, or includes the first PCS and the first FEC sublayer.

[0124] In a possible implementation, the first layer may also receive fifth data from the third layer, where the fifth data includes h second preset sequences, where h is greater than k.

[0125] In a possible implementation, the first layer may receive fourth indication information from the third layer through the MDIO interface, where the fourth indication information is used to indicate that synchronization of the third layer is lost.

[0126] The technical effects that can be achieved in any aspect of the seventh aspect can refer to the description of the beneficial effects in the third aspect, and will not be repeated here.

[0127] In an eighth aspect, the present application provides a data processing method, the method comprising: the second layer receiving sixth data from the first layer, determining synchronization loss based on the sixth data, replacing part of the data in the seventh data with a fourth preset sequence, and obtaining eighth data, the seventh data is received by the second layer from the fourth layer; the second layer sending eighth data to the first layer and receiving ninth data from the first layer, the ninth data is obtained by the first layer replacing the tenth data with the fourth preset sequence, and the tenth data is received by the first layer from the third layer; the second layer detects at least two fourth preset sequences from the ninth data, replaces the fourth preset sequence in the eighth data with a fifth preset sequence, and obtains eleventh data, the fifth preset sequence is different from the fourth preset sequence The second layer sends the eleventh data to the first layer and receives the twelfth data from the first layer, and the twelfth data is obtained after the first layer detects at least two fourth preset sequences from the eighth data and replaces the fourth preset sequence in the ninth data with the fifth preset sequence; the second layer detects at least two fifth preset sequences and determines the synchronization lock; wherein the first layer includes the first PMA sublayer, or includes the first PMA sublayer and the first FEC sublayer, the second layer includes the second PMA sublayer, or includes the second PMA sublayer and the second FEC sublayer, the third layer includes the first PCS, or includes the first PCS and the first FEC sublayer, and the fourth layer includes the second PCS, or includes the second PCS and the second FEC sublayer.

[0128] As follows, three possible ways of replacing part of the seventh data with the fourth preset sequence are exemplarily shown.

[0129] In a possible implementation, the seventh data includes P third codewords, the third codewords include a third information block and a third overhead block, and P is an integer greater than 1.

[0130] Mode 1: replacing the complete third codeword with the fourth preset sequence.

[0131] In a possible implementation, the second layer replaces z of P third codewords with a fourth preset sequence to obtain eighth data, where z is a positive integer less than or equal to P.

[0132] Furthermore, the length of the fourth preset sequence is equal to a positive integer multiple of the code length of the third codeword.

[0133] Mode 2: replacing the third overhead block in the third codeword with a fourth preset sequence.

[0134] In a possible implementation manner, the second layer replaces the third information blocks of z third code words among P third code words with a fourth preset sequence to obtain eighth data.

[0135] Furthermore, the length of the fourth preset sequence is less than or equal to the length of one third information block.

[0136] Mode 3: replacing the third information block in the third codeword with a fourth preset sequence.

[0137] In a possible implementation manner, the second layer replaces the third overhead block of z third codewords among P third codewords with a fourth preset sequence to obtain eighth data.

[0138] Furthermore, the length of the fourth preset sequence is less than or equal to the length of a third overhead block.

[0139] In a possible implementation, the z third codewords are z consecutive or z non-consecutive ones of the P third codewords. The intervals of the z non-consecutive third codewords may be the same. For example, a third codeword may be replaced with the first preset sequence at every interval of 2×j×5440 / PCSL / L, where L represents the length of the third information block of the third codeword, PCSL represents the number of physical coding sublayer channels, and j may take the value of 1, 2, 3, 4, or other positive integers. Alternatively, the intervals of the z non-consecutive third codewords may also be different, which is not limited in this application.

[0140] In one possible implementation, when the second layer detects at least two fifth preset sequences and determines that the synchronization is locked, the second layer can send second indication information to the fourth layer through the indication signal path of AUI or through the MDIO interface, and send thirteenth data to the fourth layer through the first data flow path of AUI.

[0141] In one possible implementation, after the second layer determines that synchronization is lost based on the sixth data, the second layer may send the first indication information to the fourth layer through the indication signal path of the AUI or through the MDIO interface, and send the sixth data to the fourth layer through the first data flow path of the AUI.

[0142] In one possible implementation, the second layer includes a second PMA sublayer, or includes a second PMA sublayer and a second FEC sublayer, the fourth layer includes a second PCS, or includes a second PCS and a fourth FEC sublayer, the first layer includes a first PMA sublayer, or includes a first PMA sublayer and a first FEC sublayer, and the third layer includes a first PCS, or includes a first PCS and a first FEC sublayer.

[0143] The technical effects that can be achieved in any aspect of the eighth aspect can refer to the description of the beneficial effects in the fourth aspect, and will not be repeated here.

[0144] In the ninth aspect, the present application provides a communication device, which is used to implement the method in the first aspect or any possible implementation of the first aspect, or to implement the method in the second aspect or any possible implementation of the second aspect, or to implement the method in the third aspect or any possible implementation of the third aspect, or to implement the method in the fourth aspect or any possible implementation of the fourth aspect, or to implement the method in the fifth aspect or any possible implementation of the fifth aspect, or to implement the method in the sixth aspect or any possible implementation of the sixth aspect, or to implement the method in the seventh aspect or any possible implementation of the seventh aspect, or to implement the method in the eighth aspect or any possible implementation of the eighth aspect, including corresponding functional modules, respectively used to implement the steps in the above methods. The functions can be implemented by hardware, or the corresponding software can be implemented by hardware. The hardware or software includes one or more modules corresponding to the above functions.

[0145] In one possible implementation, the communication device may be a second optical module. The beneficial effects can be found in the description of the first aspect above, which will not be repeated here. The communication device may include: an interface circuit and a processor. The processor is used to implement the corresponding functions of the first aspect above through a logic circuit or execution code instructions, and the interface circuit is used to receive signals from other communication devices outside the communication device and transmit them to the processor or send signals from the processor to other communication devices outside the communication device. Among them, the interface circuit may be an interface circuit with integrated transceiver functions. Optionally, the communication device may also include a memory, which may be coupled to the processor, and which stores program instructions and data necessary for the communication device.

[0146] Among them, the interface circuit is used to receive first data from the first optical module; the processor is used to determine synchronization loss based on the first data; the interface circuit is also used to send first indication information to the second host and receive second data from the first optical module, the first indication information is used to indicate that the second optical module has been synchronized and locked; the processor is also used to determine synchronization lock based on the second data, and send second indication information to the second host through the interface circuit, and the second indication information is used to indicate that the second optical module has been synchronized and locked.

[0147] In a possible implementation, the interface circuit is further used to send third data to the second host, where the third data is obtained by replacing part of the second data with a first preset sequence, and the first preset sequence is used for synchronization of the second host.

[0148] In a possible implementation manner, the interface circuit is specifically configured to send the third data to the second host through the first data flow path of the AUI.

[0149] In a possible implementation manner, the interface circuit is specifically configured to send the first data to the second host through the first data flow path of the AUI.

[0150] In a possible implementation manner, the interface circuit is specifically configured to send the second indication information to the second host through an indication signal path of the AUI or an MDIO interface.

[0151] In a possible implementation, the second data includes N second code words, where N is an integer greater than 1; the processor is further configured to replace w of the N second code words with the first preset sequence to obtain third data, where w is a positive integer less than or equal to N. Further, w is a positive integer greater than 1 and less than or equal to N.

[0152] In a possible implementation manner, the length of the first preset sequence is equal to a positive integer multiple of the code length of a second codeword.

[0153] In one possible implementation, the second data includes N second codewords, the second codewords include a second information block and a second overhead block, and N is an integer greater than 1; the processor is also used to replace the first information blocks of w second codewords among the N second codewords with a first preset sequence to obtain third data.

[0154] In a possible implementation manner, the length of the first preset sequence is less than or equal to the length of one second information block.

[0155] In one possible implementation, the second data includes N second codewords, the second codewords include a second information block and a second overhead block, and N is an integer greater than 1; the processor is also used to replace the second overhead blocks of w second codewords among the N second codewords with a first preset sequence to obtain third data.

[0156] In a possible implementation manner, the length of the first preset sequence is less than or equal to the length of a second overhead block.

[0157] In a possible implementation, the w second codewords are w consecutive or w non-consecutive ones of the N second codewords. The intervals of the w non-consecutive second codewords may be the same or different. For example, a second codeword may be replaced with the first preset sequence at every interval of 2×j×5440 / PCSL / L, where L represents the length of the second information block of the second codeword, PCSL represents the number of physical coding sublayer channels, and j may be a positive integer such as 1, 2, 3, or 4.

[0158] In one possible implementation, the second data includes a second preset sequence; the processor is also used to replace the second code word with the first preset sequence starting from the boundary position of any second code word of the N second code words, and stop replacing after detecting that at least one second preset sequence matches the second known preset sequence of the second optical module, to obtain third data.

[0159] In a possible implementation manner, the second preset sequence is at least one subsequence in the AM group.

[0160] In one possible implementation, the second data includes N second code words, where N is an integer greater than 1; the processor is specifically used to decode the second data according to a preset bit number sliding window, where the preset bit number is less than the code length of the second code word; after determining that at least one decoding is successful, the second code word is decoded according to the code length sliding window, and the number of successful decodings in the second decoding result is counted; it is determined that the number of successful decodings in the second decoding result is greater than a third threshold, and synchronization is determined to be locked.

[0161] In one possible implementation, the second data includes N second codewords, the second codewords include a second information block and a second overhead block, the second overhead block includes a third preset sequence, and the processor is specifically used to detect within a preset time window that the number of third preset sequences is greater than a fifth threshold, and determine synchronization lock.

[0162] In a possible implementation manner, the first preset sequence is at least one subsequence in the AM group.

[0163] In one possible implementation, the processor is specifically used to decode the first data to obtain M first decoding results, where the first decoding results include decoding success or decoding failure, and M is an integer greater than 1; if the number of decoding failures in the M first decoding results is greater than a first threshold, it is determined that synchronization is lost.

[0164] In one possible implementation, the first data includes Q first codewords, the first codewords include a first information block and a first overhead block, the first overhead block includes a third preset sequence, Q is an integer greater than 1, and the processor is specifically used to detect within a preset time window that the number of third preset sequences is less than a fifth threshold, and determine that synchronization is lost.

[0165] In a possible implementation manner, the interface circuit is further used to receive third indication information from the second host through the MDIO interface, where the third indication information is used to indicate that the second host is out of synchronization lock.

[0166] In another possible implementation, the communication device may also be a first optical module, which may include an interface circuit and a processor, and may execute the corresponding functions of the first optical module in the above method example. For details, please refer to the detailed description in the method example, which will not be repeated here.

[0167] In another possible implementation, the communication device may also be a second host, which may include an interface circuit and a processor, and may execute the corresponding functions of the second host in the above method example. Please refer to the detailed description in the method example for details, which will not be repeated here.

[0168] In the tenth aspect, the present application provides a communication device, which is used to implement the method in the first aspect or any possible implementation of the first aspect, or to implement the method in the second aspect or any possible implementation of the second aspect, or to implement the method in the third aspect or any possible implementation of the third aspect, or to implement the method in the fourth aspect or any possible implementation of the fourth aspect, or to implement the method in the fifth aspect or any possible implementation of the fifth aspect, or to implement the method in the sixth aspect or any possible implementation of the sixth aspect, or to implement the method in the seventh aspect or any possible implementation of the seventh aspect, or to implement the method in the eighth aspect or any possible implementation of the eighth aspect, including corresponding functional modules, respectively used to implement the steps in the above methods. The functions can be implemented by hardware, or the corresponding software can be implemented by hardware. The hardware or software includes one or more modules corresponding to the above functions.

[0169] In a possible implementation, the communication device may be a second optical module, which may include a processing unit and a transceiver unit, which may perform the corresponding functions of the second optical module in the above method example. Please refer to the detailed description in the method example for details, which will not be repeated here.

[0170] In another possible implementation, the communication device may also be a first optical module, which may include a transceiver unit and a processing unit, which may perform the corresponding functions of the first optical module in the above method example. Please refer to the detailed description in the method example for details, which will not be repeated here.

[0171] In another possible implementation, the communication device may also be a second host, which may include a transceiver unit and a processing unit, which may perform the corresponding functions of the second host in the above method example. Please refer to the detailed description in the method example for details, which will not be repeated here.

[0172] In an eleventh aspect, the present application provides a communication system, which includes a first optical module, a second optical module, and a second host. The second optical module can be used to execute the method in the first aspect or any possible implementation of the first aspect, the second host can be used to execute the method in the second aspect or any possible implementation of the second aspect, and the first optical module can be used to execute the method in the third aspect or any possible implementation of the third aspect. Alternatively, the communication system may also include a first optical module and a second optical module, the second optical module can be used to execute the method in the fourth aspect or any possible implementation of the fourth aspect, and the first optical module can be used to execute the method in the fifth aspect or any possible implementation of the fifth aspect.

[0173] In a twelfth aspect, the present application provides a chip, comprising at least one processor and an interface circuit. Further, optionally, the chip may also include a memory, and the processor is used to execute a computer program or instruction stored in the memory, so that the chip executes the method in the first aspect or any possible implementation of the first aspect, or the chip executes the method in the second aspect or any possible implementation of the second aspect, or the chip executes the method in the third aspect or any possible implementation of the third aspect, or the chip executes the method in the fourth aspect or any possible implementation of the fourth aspect, or the chip executes the method in the fifth aspect or any possible implementation of the fifth aspect, or the chip executes the method in the sixth aspect or any possible implementation of the sixth aspect, or the chip executes the method in the seventh aspect or any possible implementation of the seventh aspect, or the chip executes the method in the eighth aspect or any possible implementation of the eighth aspect.

[0174] In the thirteenth aspect, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a communication device, the communication device executes the method in the first aspect or any possible implementation of the first aspect, or the communication device executes the method in the second aspect or any possible implementation of the second aspect, or the communication device executes the method in the third aspect or any possible implementation of the third aspect, or the communication device executes the method in the fourth aspect or any possible implementation of the fourth aspect, or the communication device executes the method in the fifth aspect or any possible implementation of the fifth aspect, or the communication device executes the method in the sixth aspect or any possible implementation of the sixth aspect, or the communication device executes the method in the seventh aspect or any possible implementation of the seventh aspect, or the communication device executes the method in the eighth aspect or any possible implementation of the eighth aspect.

[0175] In a fourteenth aspect, the present application provides a computer program product, comprising a computer program or instructions. When the computer program or instructions are executed by a communication device, the communication device executes the method in the first aspect or any possible implementation of the first aspect, or the communication device executes the method in the second aspect or any possible implementation of the second aspect, or the communication device executes the method in the third aspect or any possible implementation of the third aspect, or the communication device executes the method in the fourth aspect or any possible implementation of the fourth aspect, or the communication device executes the method in the fifth aspect or any possible implementation of the fifth aspect, or the communication device executes the method in the sixth aspect or any possible implementation of the sixth aspect, or the communication device executes the method in the seventh aspect or any possible implementation of the seventh aspect, or the communication device executes the method in the eighth aspect or any possible implementation of the eighth aspect.

[0176] The technical effects that can be achieved in any of the above-mentioned aspects 9 to 14 can be referred to the description of the beneficial effects in the corresponding methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0177] Figure 1 A schematic diagram of the architecture of a communication system provided for this application;

[0178] Figure 2a A schematic diagram of the structure of an optical module provided in this application;

[0179] Figure 2b A schematic diagram of the structure of another optical module provided in this application;

[0180] Figure 2c A schematic diagram of the structure of a host provided for this application;

[0181] Figure 3 A schematic diagram of communication between an optical module and a host provided in this application;

[0182] Figure 4 A schematic diagram of communication between optical modules provided in this application;

[0183] Figure 5 A method flow chart of a data processing method provided in this application;

[0184] Figure 6a A schematic flow chart of a method for a first optical module to obtain first data provided in the present application;

[0185] Figure 6bA schematic flow chart of another method for obtaining first data by a first optical module provided in the present application;

[0186] Figure 7a A schematic diagram of the structure of data to be sent by a host provided in this application;

[0187] Figure 7b A schematic diagram of the structure of data after inserting a second preset sequence provided by the present application;

[0188] Figure 7c A schematic diagram of the structure of data after a first host processes data to be sent provided by the present application;

[0189] Figure 7d A schematic diagram of the structure of an AM subsequence provided in this application;

[0190] Figure 8a A schematic diagram of the structure of a first data provided by this application;

[0191] Figure 8b A schematic diagram of another first data structure provided by this application;

[0192] Fig. 9 A flowchart of a method for determining synchronization status provided by the present application;

[0193] Fig.10 A flowchart of another method for determining synchronization provided by the present application;

[0194] Fig.11 A schematic diagram of another structure of first data provided by this application;

[0195] Fig.12a A method flow chart of another data processing method provided by the present application;

[0196] Figure 12b A method flow chart of another data processing method provided by the present application;

[0197] Fig.13 A schematic diagram of a method flow of another data processing method provided in this application;

[0198] Fig.14 A method flow chart of another data processing method provided by the present application;

[0199] Fig.15 A method flow chart of another data processing method provided by the present application;

[0200] Fig.16 A method flow chart of another data processing method provided by the present application;

[0201] Fig.17 A schematic diagram of the structure of a communication device provided by the present application;

[0202] Fig.18 A schematic diagram of the structure of a communication device provided in this application. DETAILED DESCRIPTION

[0203] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0204] Figure 1 It is a schematic diagram of the architecture of a communication system applicable to the present application. The communication system may include a transmitting end 101 and a receiving end 102. Further, optionally, the transmitting end 101 may include a first communication device 1011 and a third communication device 1012, and the third communication device 1012 may be referred to as a next-level communication device of the first communication device 1011. The receiving end 102 may include a second communication device 1021 and a fourth communication device 1022, and the fourth communication device 1022 may be referred to as a next-level communication device of the second communication device 1021, and the second communication device 1021 may be referred to as a next-level communication device of the first communication device 1011. Among them, the first communication device 1011 and the third communication device 1012 may be integrated into one, or may be two independent physical entities. The second communication device 1021 and the fourth communication device 1022 may be integrated into one, or may be two independent physical entities. The communication system may be, for example, an Ethernet communication system (both the transmitter 101 and the receiver 102 support the IEEE802.3 Ethernet protocol), an optical transmission communication system, an optical access communication system, a fifth-generation (5th-Generation, 5G) fronthaul communication system, or other communication systems using FEC coding.

[0205] The first communication device 1011 and the second communication device 1021 may both be optical modules. Figure 2a , is a schematic diagram of the structure of an optical module provided by the present application. The optical module may include a physical media dependent (PMD) sublayer and a physical medium attachment (PMA) sublayer. Further, the PMA sublayer includes a unit that can implement the functions of the Inner-FEC sublayer. It can also be understood that the functions of the Inner-FEC sublayer are integrated in the PMA sublayer. Please refer to Figure 2b , is a schematic diagram of the structure of another optical module provided by the present application. The optical module may include a PMD sublayer, a PMA sublayer and an Inner-FEC sublayer. It can also be understood that the Inner-FEC sublayer and the PMA sublayer are two independent sublayers.

[0206] The third communication device 1012 and the fourth communication device 1022 may both be hosts, for example. Figure 2c , is a schematic diagram of the structure of a host provided by the present application. The host may include a physical coding sublayer (PCS) and an Inner-FEC sublayer. Alternatively, the host may include a PCS, and the PCS includes a unit that implements the function of the Inner-FEC sublayer.

[0207] Based on the above, please refer to Figure 3 , is a schematic diagram of communication between an optical module and a host provided in this application. The optical module in this example is as described above Figure 2b Taking the structure shown as an example, the optical module and the host can communicate through the AUI between the PMA sublayer of the optical module and the PCS of the host. Furthermore, the AUI between the PMA sublayer of the optical module and the PCS of the host includes a first data flow path, a second data flow channel and an indication signal path (or a data validity indication signal path), wherein the first data flow path is a path for the optical module to send data to the host, the second data flow path is a path for the host to send data to the optical module, and the indication signal path is a path for the optical module to send indication information to the host. The first data flow path is, for example, inst:IS_UNITDATA.indication; the second data flow path is, for example, inst:IS_UNITDATA.request; if the next level of the PCS is connected to the FEC sublayer, the second data flow path of the AUI, inst:IS_UNITDATA.request, can be expressed as FEC:IS_UNITDATA.request. The indication signal path is, for example, inst:IS_SIGNAL.indication. It should be noted that the AUI between the host and the optical module can also be called a serializer / deserializer (SerDes) interface when the product is implemented. Furthermore, optionally, an MDIO interface can also be included between the optical module and the host, and the optical module and the host can also exchange indication information or data through the MDIO interface. In the optical internetworking forum (OIF), an international standards organization, the MDIO interface is also called the common management interface specification (CMIS) interface. Usually, it is called the MDIO interface from the perspective of the host side and the CMIS interface from the perspective of the optical module side.

[0208] See also Figure 4, is a schematic diagram of communication between optical modules provided in the present application. In this example, the optical module at the transmitting end can be referred to as the first optical module, and the optical module at the receiving end can be referred to as the second optical module. The first optical module and the second optical module in this example are both Figure 2b Taking the structure shown as an example, the first optical module and the second optical module can be connected through a transmission medium (such as an optical fiber, a backplane, a copper cable, an active optical cable, etc.). Specifically, the PMD sublayer of the first optical module can communicate with the PMD sublayer of the second optical module through the transmission medium. For example, the first optical module can load the data to be transmitted on the optical carrier, and couple it into the optical fiber, and transmit it to the PMD sublayer of the second optical module through the optical fiber. Further, the PMD sublayer can be transmitted to the PMA sublayer.

[0209] It should be noted that the above Figure 3 or Figure 4 The communication shown may be independent duplex communication, or may be duplex communication with feedback, which is not limited in the present application.

[0210] The above communication system can be applied to multiple fields, for example, augmented reality / virtual reality (AR / VR), artificial intelligence (AI), data center, or cloud application.

[0211] It should be noted that the system architecture described in this application is intended to more clearly illustrate the technical solution of this application and does not constitute a limitation on the technical solution provided by this application.

[0212] As described in the background art, the currently used data synchronization method takes a long time, resulting in a large data delay.

[0213] In view of this, the present application proposes a data processing method that helps to reduce data synchronization time.

[0214] Based on the above content, the following Figure 5 To Attachment Fig.16 , the data processing method proposed in this application is explained in detail.

[0215] In order to facilitate the description of the solution, the following description takes the second communication device as the second optical module, the first communication device as the first optical module, the third communication device as the first host, and the fourth communication device as the second host. In other words, the first optical module in the following description can be replaced by the first communication device, the second optical module can be replaced by the second communication device, the first host can be replaced by the third communication device, and the second host can be replaced by the fourth communication device.

[0216] Embodiment 1

[0217] See also Figure 5 , is a schematic diagram of a method flow of a data processing method provided by the present application. The first optical module in the method can be the above Figure 1 The first communication device 1011 in the embodiment, the second optical module may be the above Figure 1 The specific structures of the first optical module and the second optical module can be seen in the above Figure 2a or Figure 2b The method comprises the following steps:

[0218] Step 501: A first optical module sends first data to a second optical module. Correspondingly, the second optical module receives the first data from the first optical module.

[0219] Combined with the above Figure 4 , the first optical module can send the first data to the second optical module through the transmission medium. The data sent by the first optical module to the second optical module can be an optical signal, the transmission medium can also be called an optical channel, and the second optical module can convert the received optical signal into an electrical signal, and then convert the electrical signal into a digital signal, and then perform subsequent processing according to the digital signal.

[0220] The method for the first optical module to obtain the first data can be referred to as follows Figure 6a and Figure 6b The introduction in will not be repeated here.

[0221] Step 502: The second optical module determines a synchronization state according to the first data.

[0222] The synchronization state includes synchronization loss or synchronization lock. If it is determined that the synchronization is lost, the following steps 503 to 505 are executed; if it is determined that the synchronization is locked, the second optical module sends the second indication information to the second host.

[0223] Synchronous lock loss can also be called data misalignment, data block misalignment, codeword boundary misalignment, inner code word boundary misalignment, or Hamming codeword boundary misalignment, etc. Since the second optical module is synchronized by the inner code word, synchronous lock loss can also be called inner code block lock loss, inner code block synchronous lock loss, etc. Synchronous lock can also be called data alignment, data block alignment, codeword boundary alignment, inner code block lock, inner code block synchronous lock, or Hamming codeword boundary misalignment, etc.

[0224] For the process of the second optical module determining the synchronization state according to the first data, please refer to the following possible implementation method 1 ( Fig. 9 ) and implementation method 2 ( Fig.10 )’s introduction.

[0225] Step 503: The second optical module sends the first indication information to the second host. Correspondingly, the second host receives the first indication information from the second optical module.

[0226] The first indication information is used to indicate that the second optical module is out of synchronization.

[0227] Can be combined with the above Figure 3 In one possible implementation, the second optical module may send the first indication information to the second host through the indication signal path of AUI, and the indication signal path may be, for example, inst:IS_SIGNAL.indication. In another possible implementation, the second optical module may also send the first indication information to the second host through the MDIO interface (or CMIS interface).

[0228] The specific form of the first indication information may be specified by the protocol, or may be pre-agreed upon by the second optical module and the second host, which is not limited in this application. For example, the first indication information is represented by "0".

[0229] Step 504: The first optical module sends the second data to the second optical module. Correspondingly, the second optical module receives the second data from the first optical module.

[0230] The second data and the first data belong to the same data stream. In other words, the first optical module sends a data stream to the second optical module, and the first data and the second data are two parts of the data stream. It should be noted that the way the first optical module obtains the second data is the same as the way the first optical module obtains the first data. For details, please refer to the following Figure 6a and Figure 6b The introduction in will not be repeated here.

[0231] It should be noted that there is no order between the above step 503 and step 504. Step 503 may be performed first and then step 504, or step 504 may be performed first and then step 503, or step 503 and step 504 may be performed simultaneously. Figure 5 Just one possible example.

[0232] Step 505: The second optical module determines synchronization lock according to the second data, and sends second indication information to the second host.

[0233] The second indication information is used to indicate that the second optical module has been synchronously locked. It should be noted that the specific form of the second indication information may be specified by the protocol, or may be pre-agreed between the second optical module and the second host, and this application does not limit this. For example, the second indication information is represented by "1".

[0234] Can be combined with the above Figure 3In one possible implementation, the second optical module may send the second indication information to the second host through the indication signal path of AUI, and the indication signal path may be, for example, inst:IS_SIGNAL.indication. In another possible implementation, the second optical module may also send the second indication information to the second host through the MDIO interface (or CMIS interface).

[0235] In a possible implementation, the second optical module may first be synchronized according to the second data until the synchronization is locked. The second data may include N second codewords, where N is an integer greater than 1. The second codeword may be, for example, an FEC codeword. The structure of the FEC codeword may be (N, K, m), where N is the number of bits contained in the code length of the FEC codeword, K is the number of bits contained in the information bit, and m is the order of the Galois field where the FEC codeword is located. This application does not consider the value of m. In order to facilitate the description of the scheme later, the FEC codeword is represented by (N, K). Specifically, the FEC codeword may include, but is not limited to, a Hamming codeword, or a (Bose, Ray-Chaudhuri and Hocquenghem, BCH) codeword. Among them, the Hamming codeword may include, but is not limited to, a Hamming codeword (128, 120) or a Hamming codeword (180, 170).

[0236] Specifically: the second optical module can decode the second data according to a preset bit number sliding window, and the preset bit number is less than the code length of the second codeword included in the second data. Further, after the second optical module determines that at least one decoding is successful, it slides the window according to the code length of the second codeword and counts the number of second decoding results (including decoding successes and decoding failures); if the number of decoding successes in the second decoding result is greater than the third threshold, it is determined that the synchronization is locked; or, if the number of decoding failures in the second decoding result is greater than the fourth threshold, it is determined that the synchronization is lost, and synchronization can continue to be performed according to the new data received from the first optical module (i.e., other parts of the data that belong to the same data stream as the first data and the second data). Further, the second decoding result may be an identification of successful decoding or an identification of failed decoding output by the decoder; or it may also be an intermediate parameter (or syndrome) generated during the decoding process, for example, it may be represented by 8 bits, 00000000 indicates successful decoding, and if a non-zero bit appears in the 8 bits, it indicates a decoding failure; or it may be other representations that can distinguish between successful decoding or failed decoding, which is not limited in this application. If the second decoding result is an identification of successful decoding or an identification of failed decoding output by the decoder, it is possible to count whether the number of identifications of successful decoding is greater than a third threshold, and whether the number of identifications of failed decoding is greater than a fourth threshold. If the second decoding result is a syndrome generated during the decoding process, it is possible to count whether the number of 8 bits of all 0 is greater than the third threshold, and whether the number of non-zero bits in the 8 bits is greater than the fourth threshold.

[0237] Exemplarily, the length of the second data is x*128 bits, x is an integer greater than or equal to 2, the code length of the second codeword included in the second data is 128 bits, the preset number of bits is 1 bit, and a decoder A is taken as an example. Specifically, the 0th to 127th bits of the second data are input to the decoder A, and then a 1-bit sliding window is used, that is, the next input to the decoder A is the 1st to 128th bit, and so on, until at least one decoding is successful, the window is slid according to the code length (128 bits) of the second codeword, and the number of second decoding results (including successful decoding and failed decoding) is counted. For example, the 0th to 127th bits of the second data are input to decoder A, and decoder A outputs decoding failure; then the 1st to 128th bits are input to decoder A, and decoder A outputs decoding failure; then the 2nd to 129th bits are input to decoder A, and decoder A outputs decoding failure; then the 3rd to 130th bits are input to decoder A, and decoder A outputs decoding success, and the second decoding result is counted. For example, the number of successful decodings in the second decoding result can be recorded as 1 (or 0), and then 131st to 258th bits are input to decoder A, and a 128-bit sliding window is used, and so on, to obtain H second decoding results. It can be understood that decoder A outputs decoding success, indicating that the input to decoder A is a complete second codeword in the second data. In other words, the 3rd to 130th bits correspond to a complete second codeword, indicating that the 0th to 255th bits are lost in the process of the first optical module sending the second data to the second optical module.

[0238] Taking two decoders (decoder B and decoder C) as an example, the 0th to 127th bits of the second data are input to decoder B, the 1st to 128th bits are input to decoder C, the 2nd to 129th bits are input to decoder B, the 3rd to 130th bits are input to decoder C, and so on. The bits input to decoder B are sliding windows of 1 bit until at least one decoding is successful, then sliding windows of 128 bits are used, and the second decoding results are counted; the bits input to decoder C are sliding windows of 1 bit until at least one decoding is successful, then sliding windows of 128 bits are used, and the second decoding results are counted. The H second decoding results obtained by decoding the second data are the sum of the number of the second decoding results of decoder B and the number of the second decoding results of decoder C.

[0239] Can be combined with the above Figure 3 In one possible implementation, the second optical module may send the second indication information to the second host through the indication signal path of AUI, and the indication signal path may be, for example, inst:IS_SIGNAL.indication. In another possible implementation, the second optical module may send the second indication information to the second host through the MDIO interface.

[0240] It can be seen from the above steps 501 to 505 that after the second optical module determines that the synchronization is lost, the first indication information for indicating that the second optical module has lost synchronization is sent to the second host, which can enable the second host to determine that the first data is invalid data, thereby helping to save the computing overhead of the second host. Further, after the second optical module determines that the synchronization is locked, the second indication information for indicating that the second optical module has been synchronized and locked is sent to the second host, so that the second host can quickly start (or enter) the synchronization process without waiting for a long time, which helps to reduce the duration of the second host data synchronization, thereby helping to shorten the waiting delay of the communication system.

[0241] Two possible ways in which the first optical module acquires the first data are exemplarily shown below.

[0242] In mode a, the first optical module does not synchronize the data A from the first host.

[0243] See also Figure 6a , is a flow chart of a method for a first optical module to obtain first data provided by the present application. The method comprises the following steps:

[0244] Step 601: The first host processes data a to be sent and obtains data A.

[0245] In a possible implementation, the first host processes data a (see Figure 7a ) to insert a second preset sequence (see Figure 7b ), interleaving and encoding, etc., to obtain data A (see Figure 7c ). It is understandable that the processing of the data a by the first host may also include Gray mapping, etc., which is not limited in the present application.

[0246] Exemplarily, the second preset sequence may be at least one subsequence in the AM group. To facilitate the description of the solution, the second preset sequence is taken as an AM subsequence as an example.

[0247] Specifically: For each physical coding sublayer channel, a corresponding AM subsequence can be inserted into data a, where one physical coding sublayer channel corresponds to one AM subsequence. For example, for physical coding sublayer channel D0, an AM0 subsequence is inserted into data a; for physical coding sublayer channel D1, AM1 is inserted into data a; and so on. An AM subsequence is a sequence in an AM group, and an AM group includes AM0, AM1, ...

[0248] like Figure 7dThe figure shows a schematic diagram of the structure of an AM subsequence provided by the present application. The AM subsequence includes a common marker (CM) and a unique marker (UM). The CM is the first half of the AM subsequence, which is used for AM lock (AM Lock) and channel-to-channel de-delay skew (Deskew); the UM is the second half of the AM subsequence, which is used for physical coding sublayer channel reordering (Re-order).

[0249] Further, the interval between two adjacent AM subsequences may be equal to the total number of codewords of m physical sublayer channels × the length of a codeword / the number of physical sublayer channels m. For example, for each physical coding sublayer channel, an AM subsequence is inserted once every (8192*5440 / 16) bits, where 8192 represents the total number of codewords of 16 physical sublayer channels, 5440 represents the length of a codeword, and 16 represents the number of physical sublayer channels.

[0250] Combined with the above Figure 2c Taking the encoding of 100GE Ethernet as an example, data a from the media access control (MAC) and higher-layer clients will pass through the reconciliation sublayer, which translates the data a from the MAC and higher-layer clients and sends it to the physical coding sublayer (PCS) of 100GBASE-R through the 100G bit per second (bps, b / s) media independent interface (100Gb / s media independent interface, CGMII) interface. PCS inserts AM and other operations on data a and sends it to the Inner-FEC sublayer for encoding. The Inner-FEC sublayer can be, for example, a Reed-Solomon forward error correction (RS-FEC) encoder. The RS-FEC encoder of 100GE Ethernet uses an RS (544,514,10) codeword.

[0251] Take the encoding scheme of 200GE Ethernet as an example: the data from the MAC and higher-layer clients will pass through the modulation sublayer, which will translate the data a from the MAC and higher-layer clients and send it to the PCS of 200GBASE-R through the 200GMII interface. The PCS inserts the data into AM and other operations and sends it to the RS-FEC encoder for encoding. The RS-FEC encoder of 200GE Ethernet uses two RS (544, 514, 10) code words, and the data from the PCS is sent to the two RS code words through 10-bit polling distribution.

[0252] Take the encoding scheme of 400GE Ethernet as an example: the data from the MAC and higher-layer clients will pass through the coordination sublayer, which will translate the data a from the MAC and higher-layer clients and send it to the PCS of 400GBASE-R through the 400GMII interface. The PCS inserts the data a into AM and other operations and sends it to the RS-FEC encoder for encoding. The RS-FEC encoding of 400GE Ethernet uses two RS (544, 514, 10) code words, and the data from the PCS is sent to the two RS code words through 10-bit polling distribution.

[0253] The above-mentioned coding schemes for 100GE, 200GE and 400GE Ethernet all use RS coding in PCS as an example. When Ethernet evolves to 800G, the single wavelength rate increases from 100Gbps of 400GE to 200Gbps. Coding can also be achieved by other methods. This application does not limit the coding method.

[0254] The interleaving may be performed by an interleaver, which may be, for example, e It means that the interleaver π e It may be an interleaver composed of a multiplexer (Mux) and a 10-bit symbol distribution (10-bit symbol distribution).

[0255] Step 602: The first host sends data A to the first optical module. Correspondingly, the first optical module receives data A from the first host.

[0256] In a possible implementation, the first host may send data A to the first optical module through the second data flow path of AUI, and correspondingly, the first optical module may receive data A from the first host through the second data flow path of AUI. Alternatively, the first host may also send data A to the first optical module through the MDIO interface, and correspondingly, the first optical module may receive data A from the first host through the CMIS interface.

[0257] Step 603: The first optical module processes the data A to obtain first data.

[0258] Specifically, the first optical module encodes and interleaves data A to obtain first data. Here, reference can be made to the processing of data a by the first host, and specifically "data a" can be replaced with "data A", which will not be repeated here.

[0259] Based on the above steps 601 to 603, the structure of the first data obtained can be seen in Figure 8a , the first data includes Q first code words, where Q is an integer greater than 1. The first code word includes a first information block and a first overhead block. The first information block is used to carry valid data and can also be called a data bit; the first overhead block is used to correctly recover data and can also be called a check bit. Usually, the first overhead block is added after the first optical module encodes the valid data. It can also be understood that based on the above method a, the AM subsequence in the first data obtained by the first optical module is scattered and distributed.

[0260] Mode b: The first optical module is synchronized based on data A from the first host.

[0261] See also Figure 6b , is a flow chart of another method for obtaining first data by a first optical module provided by the present application. The method comprises the following steps:

[0262] Step 611: The first host processes the data a to be sent and obtains data A.

[0263] The step 611 can refer to the introduction of the above step 601, which will not be repeated here.

[0264] Step 612: The first host sends data A to the first optical module. Correspondingly, the first optical module receives data A from the first host.

[0265] The step 612 can refer to the introduction of the above step 602, which will not be repeated here.

[0266] Step 613: The first optical module is synchronized according to data A.

[0267] Specifically, for each physical coding sublayer channel, it is determined that the CM in the AM subsequence (ie, the second preset sequence) in the data A matches the CM in the known AM subsequence of the first optical module at least once, and the synchronization is determined to be locked. Figure 7d Taking the physical coding sublayer channel D0 as an example, it is detected that the CM in the AM0 subsequence in the data A matches the AM in the known AM0 subsequence of the first optical module at least once, and the synchronization lock is determined. The symbol (10bit) boundary of the RS codeword on the first host side is aligned. The AM subsequence is inserted at the boundary of the RS symbol. Finding the AM subsequence is equivalent to finding the boundary of the RS symbol, and subsequent processing can be performed according to the length of the RS symbol.

[0268] It is understandable that the first optical module does not send valid data to the second optical module during synchronization until the first optical module is synchronously locked.

[0269] It should be noted that if the first optical module has not been able to achieve synchronization according to data A, the first optical module may return data A to the first host. Accordingly, the first host receives data A from the first optical module and decodes data A. If the first host fails to decode data A, it indicates that the AUI between the first host and the first optical module is faulty; if the first host successfully decodes data A, it indicates that the first optical module fails during the synchronization process; further, AM subsequences may be inserted more densely in data a to facilitate synchronization of the first optical module. For example, if an AM0 subsequence is inserted once per interval of 8192×5440 / 16 in the data a of the above step 611, the more dense insertion may be inserting an AM0 subsequence less than once per interval of 8192×5440 / 16.

[0270] Step 614: The first optical module determines synchronization lock and processes data A to obtain first data.

[0271] Specifically, the first optical module removes the AM subsequence (i.e., the second preset sequence) in the data A, interleaves the data A after the AM subsequence is removed, reinserts the removed AM subsequence after interleaving, obtains data B, encodes data B, and obtains the first data. It can also be understood that when the first optical module processes data A including interleaving, the AM subsequence skips the interleaver, so that the AM subsequence is not scattered. It can be understood that the AM subsequence is a fixed sequence before encoding and remains a fixed sequence after encoding.

[0272] Based on the above steps 611 to 614, the structure of the first data obtained can be seen in Figure 8b In other words, based on the above-mentioned method b, the AM subsequence in the first data obtained by the first optical module is not scattered, but is completely distributed in the data.

[0273] Two possible implementations of the second optical module determining the synchronization state according to the first data are exemplarily shown below.

[0274] Implementation method 1: The second optical module determines the synchronization state based on the first decoding result.

[0275] like Fig. 9 FIG. 1 is a flow chart of a method for determining synchronization status provided by the present application. The method comprises the following steps:

[0276] Step 901: The second optical module decodes the first data to obtain M first decoding results.

[0277] In a possible implementation, the first data may include Q first codewords. The first codeword may be, for example, an FEC codeword. The construction of the FEC codeword may refer to the above related introduction, which will not be described in detail here.

[0278] The first decoding result includes decoding success or decoding failure. Specifically, each time a first code word is input into the decoder, the decoder outputs a first decoding result for the first code word. Taking the first code word as the Hamming code word (128, 120) as an example, each 128 bits is input as a first code word into the decoder for decoding, and the decoder outputs a first decoding result for the first code word. By analogy, the first data is decoded, and M first decoding results can be counted.

[0279] Step 902: If the second optical module determines that the number of decoding failures in the M first decoding results is greater than a first threshold, it determines that synchronization is lost.

[0280] Step 903: If the second optical module determines that the number of successful decodings among the M first decoding results is greater than a second threshold, the synchronization is determined to be locked.

[0281] The second threshold is different from the first threshold. For example, the first threshold may be rounded up to M×90%, and the second threshold may be rounded up to M×50%. It should be noted that the present application does not limit the specific values ​​of the first threshold and the second threshold.

[0282] In a possible implementation, the first decoding result may be an identification of successful decoding or an identification of failed decoding output by the decoder; or it may also be an intermediate parameter (or syndrome) generated during the decoding process, for example, it may be represented by 8 bits, 00000000 indicates successful decoding, and if a non-zero bit appears in the 8 bits, it indicates a decoding failure; or it may be other representations that can distinguish between successful decoding or failed decoding, which is not limited in this application. If the first decoding result is an identification of successful decoding or an identification of failed decoding output by the decoder, it is possible to count whether the number of identifications of successful decoding is greater than a first threshold, and whether the number of identifications of failed decoding is greater than a second threshold. If the first decoding result is a syndrome generated during the decoding process, it is possible to count whether the number of 8 bits of all 0 is greater than the first threshold, and whether the number of non-zero bits in the 8 bits is greater than the second threshold.

[0283] Furthermore, in order to improve the accuracy of the determined decoding success or decoding failure. Taking the code length of the first code word as 128 bits as an example, the last 1 bit of the 128 bits of each first code word in the first data can be obtained by performing a first operation on the first 127 bits. After the decoder outputs the first decoding result of successful decoding, the first 127 bits of the 128 bits can be further operated to determine whether the 1 bit obtained by the operation result is consistent with the result of the last 1 bit of the 128 bits input to the decoder; if they are consistent, it is determined that the decoding is successful; if they are inconsistent, it is determined that the decoding fails. For another example, taking the code length of the first code word as 128 bits as an example, the last 3 bits of the 128 bits of each first code word in the first data can be obtained by performing a first operation on the first 125 bits. After the decoder outputs the first decoding result of successful decoding, the first operation can be further performed on the first 125 bits of the 128 bits to determine whether the 3 bits obtained by the operation result are consistent with the result of the last 3 bits of the 128 bits input to the decoder; if they are consistent, it is determined that the decoding is successful; if they are inconsistent, it is determined that the decoding failed. For another example, taking the code length of the first code sub-codeword as 180 bits as an example, the last 2 bits of the 180 bits of each first codeword in the first data can be obtained by performing the first operation on the first 178 bits. After the decoder outputs the first decoding result of successful decoding, the first operation can be further performed on the first 178 bits of the 180 bits to determine whether the 2 bits obtained by the operation result are consistent with the result of the last 2 bits of the 180 bits input to the decoder; if they are consistent, it is determined that the decoding is successful; if they are inconsistent, it is determined that the decoding failed. Among them, the first operation method of the first optical module and the second optical module can be pre-agreed or pre-stored, and this application does not limit this.

[0284] It should be noted that the above steps 902 and 903 do not represent a sequence. If step 902 is executed, step 903 will not be executed; if step 903 is executed, step 902 will not be executed.

[0285] In a second implementation mode, the second optical module determines synchronization based on whether a first overhead block (or referred to as overhead (OH)) of a first codeword included in the first data includes a third preset sequence.

[0286] The preset sequence in the present application refers to a sequence with a fixed length, bit value, etc., and a sequence known to both the transmitting and receiving sides. Exemplarily, the third preset sequence may be, for example, an AM subsequence.

[0287] like Fig.10 FIG. 1 is a flow chart of another method for determining synchronization provided by the present application. The method comprises the following steps:

[0288] Step 1001 , within a preset time window, the second optical module detects whether the number of third preset sequences included in the first data is greater than or equal to a fifth threshold; if greater, execute step 1002 ; if less, execute step 1003 .

[0289] See also Fig.11 , which is a schematic diagram of another structure of inserting first data into a third preset sequence provided by the present application. In this example, the first data is Figure 8a Taking the structure shown as an example, taking the length of a first codeword of 128 bits as an example, the first 120 bits are the first information block, 8 bits are the first overhead block, and the third preset sequence occupies part of the bits in the first overhead block. Exemplarily, the third preset sequence can be 3 bits, such as 001, 100, or 010. For example, the last 3 bits in the first overhead block are the third preset sequence. For another example, the first 3 bits in the first overhead block are the third preset sequence. It can be understood that the third preset sequence can occupy any three bits in the first overhead block. Exemplarily, the third preset sequence can also be 2 bits, such as 01, 10, etc. For example, the last 2 bits in the first overhead block are the third preset sequence. In addition, the third preset sequence can also be more than 3 bits or less than 3 bits, which is not limited in this application.

[0290] There is an association relationship between the preset time window and the fifth threshold. For example, the preset time window may be 200 nanoseconds (ns), and the corresponding fifth threshold may be 128 times. For another example, the preset time window may be 100 ns, and the corresponding fifth threshold may be 64 times. Further, the preset number of bits is equal to the product of the preset time window and the transmission rate.

[0291] Step 1002: The second optical module determines synchronization lock.

[0292] Step 1003: The second optical module determines that synchronization is lost.

[0293] Through the above steps 1001 to 1003, since the third preset sequence occupies part of the bits in the first overhead block, the amount of data transmitted will not be increased. Moreover, the first overhead block is added by the first optical module after encoding the valid data, so the second optical module does not need to decode the first data to determine whether it is synchronized based on the number of the third preset sequences included in the first data, and the implementation method is relatively simple.

[0294] Based on the way in which the first module obtains the first data, two different data processing methods are exemplarily given below.

[0295] Method 1: The first optical module obtains the first data based on the above method a.

[0296] like Fig.12a As shown, it is a method flow diagram of another data processing method provided by the present application. The method is mainly a data processing process on the second optical module side. The method comprises the following steps:

[0297] Step 1201: A first optical module sends first data to a second optical module. Correspondingly, the second optical module receives the first data from the first optical module.

[0298] In this example, the first optical module obtains the first data by adopting the above-mentioned method a. The step 1201 can refer to the introduction of the above-mentioned step 501, which will not be repeated here.

[0299] Step 1202: The second optical module determines a synchronization state according to the first data.

[0300] If it is determined that the synchronization is lost, execute the following steps 1203 to 1206; if the synchronization is locked, execute the following step 1208.

[0301] The step 1202 can refer to the introduction of the aforementioned step 502, which will not be repeated here.

[0302] Step 1203: The second optical module sends the first indication information and the first data to the second host. Correspondingly, the second host receives the first indication information and the first data from the second optical module.

[0303] In a possible implementation, the second optical module may send the first indication information to the second host through the indication signal path of the AUI or through the MDIO interface, and may send the first data to the second host through the first data flow path of the AUI.

[0304] The second optical module can send the first data to the second host through the first data flow path of the AUI. For a detailed description of the second optical module sending the first indication information to the second host, please refer to the description of the aforementioned step 503, which will not be repeated here.

[0305] The second optical module sends the first indication information for indicating that the second optical module is out of synchronization to the second host, indicating that the first data is invalid data. Therefore, after receiving the first indication information, the second host can determine that the first data is invalid data. Further, the first data can be discarded.

[0306] Step 1204: The first optical module sends the second data to the second optical module. Correspondingly, the second optical module receives the second data from the first optical module.

[0307] The step 1204 can refer to the introduction of the aforementioned step 504, which will not be repeated here.

[0308] Step 1205: The second optical module is synchronized according to the second data.

[0309] The step 1205 can refer to the introduction of the aforementioned step 505, which will not be repeated here.

[0310] Step 1206: The second optical module determines that the synchronization is locked, and replaces (or covers, updates, modifies, etc.) part of the second data with the first preset sequence to obtain third data.

[0311] In a possible implementation manner, the second data includes N second codewords, and the second codewords include a second information block and a second overhead block.

[0312] As follows, three possible ways of obtaining the third data are exemplarily shown.

[0313] Mode A: replacing the complete second codeword with the first preset sequence.

[0314] In a possible implementation, on each physical coding sublayer channel, w second codewords among N second codewords are replaced with the first preset sequence, where w is a positive integer less than or equal to N, and further, w is a positive integer greater than 1 and less than or equal to N. When w is greater than 2, it can further prevent the second host from being unable to accurately determine the synchronization state due to partial data loss during the transmission of the second data. In other words, w is greater than 2, which helps to improve the accuracy of the synchronization of the second host.

[0315] Further, optionally, the length of the first preset sequence is equal to a positive integer multiple of the code length of a second code word. For example, the code length of the second code word is 128 bits, and the length of the first preset sequence is also 128 bits. For another example, the code length of the second code word is 128 bits, and the length of the first preset sequence is 2×128 bits.

[0316] By replacing the complete second codeword with the first preset, the second host can quickly determine the boundary of each second codeword of the received second data, thereby reducing the time required for synchronization and reducing the complexity of synchronization calculation on the second host side.

[0317] Mode B: replacing the second overhead block in the second codeword with the first preset sequence.

[0318] In a possible implementation manner, on each physical coding sublayer channel, a second overhead block of w second codewords among N second codewords is replaced with a first preset sequence.

[0319] Further, optionally, the length of the first preset sequence is less than or equal to the length of a second overhead block. For example, the code length of the second codeword is 128 bits, the length of the second information block is 120 bits, the length of the second overhead block is 8 bits, and the length of the first preset sequence may be 8 bits.

[0320] By replacing the second overhead block in the second codeword with the first preset sequence, the normal transmission of valid data may not be affected. Further, when the length of the first preset sequence is equal to the length of a second overhead block, the second host can quickly determine the boundary of the second codeword of the received second data, thereby reducing the time required for synchronization.

[0321] Mode C: replacing the second information block in the second codeword with the first preset sequence.

[0322] In a possible implementation manner, on each physical coding sublayer channel, a second information block of w second code words among N second code words is replaced by a first preset sequence.

[0323] Further, optionally, the length of the first preset sequence may be less than or equal to the length of the second information block of the second codeword. For example, if the code length of the second codeword is 128 bits, the length of the second information block is 120 bits, the length of the second overhead block is 8 bits, and the length of the first preset sequence may be 120 bits.

[0324] When the second optical module needs to discard the second overhead block, the second information block is replaced by the first preset sequence, so that the second host can be synchronized according to the first preset sequence, which helps to reduce the time required for the second host synchronization.

[0325] It should be noted that the replaced w second codewords can be any w of the N second codewords, and these w can be continuous w or non-continuous w, which is not limited in this application. Among them, the intervals of the non-continuous w second codewords can be the same. Further, a second codeword can be replaced with the first preset sequence every 2×j×5440 / PCSL / L, where L represents the length of the second information block of the second codeword, PCSL represents the number of physical coding sublayer channels, and j can take the value of 1, 2, 3, 4, and other positive integers. For example, taking L=170bit and PCSL=16 as an example, a second codeword can be replaced with the first preset sequence every 2×1×5440 / 16 / 170=4 second codewords. For another example, taking L=120bit and PCSL=16 as an example, a second codeword can be replaced with the first preset sequence every 2×3×5440 / 16 / 120=17 second codewords. Alternatively, the intervals between the non-consecutive w second code words may also be different, which is not limited in the present application.

[0326] Step 1207: The second optical module sends second indication information and third data to the second host.

[0327] In a possible implementation, the second optical module may send the second indication information to the second host through the indication signal path of the AUI or through the MDIO interface, and may send the third data to the second host through the first data flow path of the AUI.

[0328] The second optical module sends second indication information for indicating synchronization locking of the second optical module to the second host, indicating that the third data is valid data.

[0329] Step 1208: The second optical module sends the second indication information and the first data to the second host.

[0330] The step 1208 can refer to the introduction of the aforementioned step 1207, which will not be repeated here.

[0331] Through the above steps 1201 to 1208, the time required for data synchronization can be reduced without increasing the bandwidth of the communication system.

[0332] like Figure 12b FIG. 1 is a flow chart of another data processing method provided by the present application. The method is mainly a data processing process on the second host side. The method comprises the following steps:

[0333] Step 1211: The second host detects indication information through the AUI or MDIO interface.

[0334] In a possible implementation, if the second host detects the second indication information through inst:IS_SIGNAL.indication of AUI, receives the third data from the first optical module through inst:IS_UNITDATA.indication of AUI, and executes the following steps 1212 to 1213. If the second host detects the first indication information through inst:IS_SIGNAL.indication of AUI, receives the first data from the second optical module through inst:IS_UNITDATA.indication of AUI, the second host determines that the first data is invalid data.

[0335] Step 1212: The second host performs synchronization according to the third data.

[0336] Since part of the third data may be lost in the process of the second optical module sending the third data to the second host, the second host may perform synchronization according to the third data after receiving the third data.

[0337] In a possible implementation, the second host synchronization includes four processes, namely: process 1, alignment lock (AM) lock; process 2, channel alignment (lane deskew); process 3, determining whether the conditions for channel reorder are met; process 4, channel reorder (lane reorder).

[0338] Process 1, AM lock

[0339] For each physical coding sublayer channel (i.e., within the channel), taking the physical coding sublayer channel D0 as an example, if the first host inserts an AM0 subsequence in the second data, and the first preset sequence is also an AM0 subsequence, the second host can recover the second preset sequence by deinterleaving, and match the CM in the AM0 subsequence detected at least twice in a row in the third data with the CM in the known AM0 subsequence of the second host, to determine that the physical coding sublayer channel D0 has achieved AM Lock. It can be understood that if 16 physical coding sublayer channels are included, process 1 needs to be performed on each physical coding sublayer channel until all 16 physical coding sublayer channels have achieved AM Lock, indicating that the second host has achieved AM Lock. It should be noted that the known AM0 subsequence of the second host can be pre-stored, and this application is not limited to this.

[0340] If the first host inserts an AM0 subsequence into the second data, and the first preset sequence is not an AM0 subsequence, then the first preset sequence detected by the second host from the third data at least once matches the first known preset sequence of the second host, and the CM in the AM0 subsequence detected at least once matches the CM in the known AM0 subsequence of the second host, and it is determined that the physical coding sublayer channel D0 implements AM Lock. It can be understood that the first known preset sequence of the second host and the known AM0 subsequence of the second host can both be pre-stored, and this application does not limit this.

[0341] Since the interval between the first preset sequence and the AM subsequence is closer than that between two consecutive AM subsequences, the second host can help shorten the AM Lock time by matching the first preset sequence and the AM subsequence, thereby helping to speed up the synchronization process of the second host.

[0342] Process 2, Deskew

[0343] Determine the delay caused by the distance difference of the transmission line between each physical coding sublayer channel and eliminate the relative delay. For example, taking the three aligned bits in the second optical module as an example, if the time of arrival through the physical coding sublayer channel D0 is t1, the time of arrival through the physical coding sublayer channel D1 is t2, and the time of arrival through the physical coding sublayer channel D2 is t3, t1 is earlier than t2, and t2 is earlier than t3, t1, t2 and t3 can be unified as t3.

[0344] Step 3: Determine whether the channel reordering conditions are met

[0345] Taking 16 physical coding sublayer channels as an example, the number of AM subsequences on the 16 physical coding sublayer channels (i.e., between channels) is detected. Specifically, among the 16 physical coding sublayer channels, an AM0 subsequence is detected for the physical coding sublayer channel D0, an AM1 is detected for the physical coding sublayer channel D1, and so on, indicating that the channel reordering condition is met. If it is detected that the number of AM subsequences corresponding to any physical coding sublayer channel in the physical coding sublayer channel is greater than or equal to 2, it means that the channel reordering condition is not met, and it is necessary to continue to wait for the next time to see the AM subsequence match the UM sequence in the pre-stored AM subsequence until the channel reordering condition is met.

[0346] Process 4, physical coding sublayer channel reordering (Re-order)

[0347] Since the second host cannot determine the sequence number of the physical coding sublayer channel, it needs to rely on the UM in the AM subsequence, and each UM corresponds to the sequence number of the physical coding sublayer channel one by one, for example, UM0 corresponds to the physical coding sublayer channel D0, UM1 corresponds to the physical coding sublayer channel D1, and so on. Determine each UM in the AM subsequence and correspond the UM to the sequence number of the corresponding physical coding sublayer channel, so that the physical coding sublayer channel can be rearranged.

[0348] Based on the above four processes, the second host performs synchronization until the synchronization is locked.

[0349] Step 1213: The second host determines synchronization lock and processes the third data.

[0350] In a possible implementation, the second host may perform deinterleaving, decoding, and other processing on the third data to recover the data sent by the first host.

[0351] It should be noted that if the second host cannot achieve synchronization lock, that is, the second host determines that the synchronization is lost, a third indication information can be sent to the second optical module, wherein the third indication information is used to indicate that the second host is lost. Further, optionally, the second host sends the third indication information to the second optical module via the MDIO interface.

[0352] Through the above steps 1211 to 1213, data synchronization on the second host side can be achieved by making minor changes on the second host side (adding channel rearrangement conditions). Moreover, by detecting the indication information sent by the second optical module, the synchronization process can be started as soon as possible, thereby helping to reduce the time required for synchronization.

[0353] Based on the above method 1, the time required for the second optical module to synchronize and lock can be called the waiting delay T1, and the time required for the second host to synchronize and lock can be called the waiting delay T2. Since the second host involves m physical coding sublayer channels, the time required for the mutual delay skew alignment between the m physical coding sublayer channels can be called the waiting delay T3. Therefore, the waiting delay T required for the communication system synchronization is sync =T1+T2+T3.

[0354] Method 2: The first optical module obtains the first data based on the above method b.

[0355] like Fig.13 As shown, it is a method flow diagram of another data processing method provided by the present application. The method is mainly a data processing process on the second optical module side. The method comprises the following steps:

[0356] Step 1301: A first optical module sends first data to a second optical module. Correspondingly, the second optical module receives the first data from the first optical module.

[0357] In this example, the first optical module obtains the first data by adopting the above-mentioned method b. The step 1301 can refer to the introduction of the above-mentioned step 501, which will not be repeated here.

[0358] Step 1302: The second optical module determines a synchronization state according to the first data.

[0359] The step 1302 can refer to the introduction of the aforementioned step 1202, which will not be repeated here.

[0360] If it is determined that the synchronization is lost, execute the following steps 1303 to 1307; if it is determined that the synchronization is locked, execute the following step 1308.

[0361] Step 1303: The second optical module sends the first indication information and the first data to the second host.

[0362] The step 1303 can refer to the introduction of the following step 1203, which will not be repeated here.

[0363] Step 1304: The first optical module sends the second data to the second optical module. Correspondingly, the second optical module receives the second data from the first optical module.

[0364] In this example, the first optical module obtains the second data using the above-mentioned method b, and the second data includes a second preset sequence.

[0365] The step 1304 can refer to the introduction of the aforementioned step 1204, which will not be repeated here.

[0366] Step 1305: The second optical module is synchronized according to the second data.

[0367] In a possible implementation, step 1305 may be the same as the process of step 1205, and for details, please refer to the introduction of step 1205. This synchronization process may be referred to as synchronization mechanism 1.

[0368] In another possible implementation, based on the above-mentioned method b, the second preset sequence inserted by the first host into the second data is not broken up, and the second optical module can be synchronized according to the second preset sequence included in the second data. Taking the second preset sequence as an AM subsequence as an example, the CM in the AM subsequence detected by the second optical module from the second data at least twice in a row matches the CM in the known AM subsequence of the second optical module, and the synchronization lock is determined. This synchronization process can be called synchronization mechanism 2.

[0369] It should be noted that the second optical module may also start the synchronization mechanism 1 and the synchronization mechanism 2 at the same time to coordinate with each other for synchronization.

[0370] Step 1306: The second optical module determines that it is in synchronization lock, and replaces part of the second data with the first preset sequence to obtain third data.

[0371] In a possible implementation manner, the second data further includes N second codewords, and the second codewords include a second information block and a second overhead block.

[0372] Three possible ways of obtaining the third data are shown as follows.

[0373] Mode D: replacing the complete second codeword with the first preset sequence.

[0374] In a possible implementation, on each physical coding sublayer channel, the first preset sequence is used to replace from the boundary of any second codeword of the N second codewords until the second preset sequence is detected to match the second known preset sequence of the second optical module at least once and then the replacement is stopped. For example, taking the physical coding sublayer channel D0 as an example, and taking the second preset sequence as the AM0 subsequence as an example, the first preset sequence is used to replace from the boundary of any second codeword of the N second codewords, and the replacement is stopped after directly detecting that the AM0 subsequence matches the known AM0 subsequence of the second optical module at least once. In this way, it is helpful to reduce the number of replacement second codewords.

[0375] It should be noted that the second optical module starts replacing the second codeword with the first preset sequence and the second optical module detects the second preset sequence can be performed synchronously. If the second preset sequence is detected at least once first, w / 2 second codewords can be replaced with the first preset sequence.

[0376] In this method D, the length of the first preset sequence can be found in the introduction of the aforementioned method A, which will not be repeated here.

[0377] Mode E: replacing the second overhead block in the second codeword with the first preset sequence.

[0378] In one possible implementation, on each physical coding sublayer channel, a first preset sequence is used to replace the boundary of a second overhead block of any second codeword among N second codewords until at least one match between the second preset sequence and a second known preset sequence of the second optical module is detected and then the replacement is stopped.

[0379] In this method E, the length of the first preset sequence can refer to the introduction in the above-mentioned method B, which will not be repeated here.

[0380] Mode F, replacing the second information block in the second codeword with the first preset sequence.

[0381] In one possible implementation, on each physical coding sublayer channel, the first preset sequence is used to replace the boundary of the second information block of any second codeword among the N second codewords until at least one match between the second preset sequence and the second known preset sequence of the second optical module is detected and the replacement is stopped.

[0382] In this method F, the length of the first preset sequence can refer to the introduction in the above-mentioned method C, which will not be repeated here.

[0383] Step 1307: The second optical module sends the second indication information and the third data to the second host.

[0384] The step 1307 can refer to the introduction of the aforementioned step 1207, which will not be repeated here.

[0385] Step 1308: The second optical module sends the second indication information and the first data to the second host.

[0386] For step 1308 , please refer to the introduction of the aforementioned step 1208 .

[0387] Through the above steps 1301 to 1308, whether synchronization is performed can be determined without decoding the second data. The implementation process is relatively simple and can help to further reduce the synchronization time of the communication system.

[0388] In a possible implementation, the second host-side data processing method in the above method 2 can be referred to in the above Figure 12b The introduction of will not be repeated here.

[0389] Embodiment 2

[0390] like Fig.14 FIG. 1 is a flow chart of another data processing method provided by the present application. The method comprises the following steps:

[0391] Step 1401: The first host inserts k second preset sequences into the data b to be sent to obtain fourth data.

[0392] It can also be understood that the fourth data includes k second preset sequences, where k is an integer greater than 1.

[0393] Step 1402: The first host sends fourth data to the first optical module. Correspondingly, the first optical module receives the fourth data from the first host.

[0394] In a possible implementation, the first host may send the fourth data to the first optical module through the second data flow path of the AUI; or, the first host may send the fourth data to the first optical module through the MDIO interface.

[0395] Step 1403: The first optical module determines a synchronization state according to the fourth data.

[0396] If it is determined that the synchronization is lost, execute the following steps 1404 to 1409; if it is determined that the synchronization is locked, execute the following step 1410.

[0397] Step 1404: The first optical module sends fourth data to the first host. Correspondingly, the first host receives the fourth data from the first optical module.

[0398] In a possible implementation, the first optical module may send the fourth data to the first host through the first data flow path of the AUI; or, the first optical module may send the fourth data to the first host through the MDIO interface.

[0399] The first host receives the fourth data from the first optical module, and can determine that the first optical module is out of synchronization and enters a loopback mode.

[0400] Step 1405: The first host decodes the fourth data and determines whether the decoding is successful.

[0401] If the first host does not fail to decode the fourth data three times in a row, the first host sends the fourth data and information that there are no decoding failures three times in a row to the first optical module through the MDIO interface; further, the first host automatically enters a warning state after multiple attempts; if the first host fails to decode the fourth data three times in a row, the following step 1406 may be executed, indicating that the first optical module fails in the synchronization process according to the fourth data.

[0402] Step 1406: The first host inserts h second preset sequences into the data c to be sent to obtain fifth data.

[0403] The fifth data includes h second preset sequences, and h is greater than k.

[0404] It can also be understood that the first host can insert a second preset sequence that is denser than data b into the data c to be sent. For example, the first host can insert a second preset sequence into data b at intervals of 8192×5440 / 16, and can insert a second preset sequence into data c at intervals of 8192×5440 / 16 / 2. Data c and data b are two parts of data in the same data stream.

[0405] Step 1407: The first host sends the fifth data to the first optical module. Correspondingly, the first optical module receives the fifth data from the first host.

[0406] In a possible implementation, the first host may send the fifth data to the first optical module through the MDIO interface, or the first host may send the fifth data to the first optical module through the second data flow path.

[0407] Step 1408: The first optical module determines a synchronization state according to the fifth data.

[0408] The step 1408 may refer to the introduction of the aforementioned step 1403. Specifically, the "fourth data" in the step 1403 may be replaced with the "fifth data", which will not be repeated here.

[0409] It should be noted that if the first optical module determines that the synchronization is lost according to the fifth data, it can execute similar steps 1403 to 1406 in a loop. Specifically, the "fourth data" can be replaced with the "fifth data". The first host inserts a second preset sequence that is denser than the above step 1406 into the data after the data c to be sent, obtains new data, and sends the new data to the first optical module.

[0410] Step 1409: The first optical module determines that synchronization is locked and sends the fifth data to the second optical module. Correspondingly, the second optical module receives the fifth data from the fourth optical module.

[0411] Step 1410: The first optical module sends fourth data to the second optical module. Correspondingly, the second optical module receives the fourth data from the first optical module.

[0412] Through the above steps 1401 to 1410, the first host receives the fourth data from the first optical module, and can determine that the first optical module is out of synchronization and enters a loopback mode, which helps to prevent the first optical module from transmitting the out of synchronization data to the second optical module, causing the second optical module to be unable to accurately identify the received data. Moreover, it helps to prevent the first optical module from exceeding the allocated processing delay limit. Further, the first host obtains the fifth data by inserting the second preset sequence more densely, so that the first optical module can achieve synchronization lock faster.

[0413] In a possible implementation, the steps after step 1410 may refer to the introduction of the aforementioned method 1 or method 2. Specifically, the "first data" in the aforementioned method 1 or method 2 may be replaced with the "fifth data", which will not be repeated here.

[0414] It should be noted that when the second host and the second optical module are used as the transmitting end to send data, the above Fig.14 The method shown is also applicable to the second host and the second optical module. Specifically, the above-mentioned "first optical module" can be replaced by the "second optical module", and the "first host" can be replaced by the "second host".

[0415] In a possible implementation, the second embodiment may also be combined with the method b in the first embodiment. Specifically, the "data A" in the method b may be replaced with the "fourth data".

[0416] Embodiment 3

[0417] like Fig.15As shown, it is a method flow diagram of another data processing method provided by the present application. In the method, the first optical module and the second optical module communicate in full-duplex mode. In other words, the first optical module can also receive data while sending data, and the second optical module can also receive data while sending data. The method includes the following steps:

[0418] Step 1501: The first optical module sends sixth data to the second optical module. Correspondingly, the second optical module receives the sixth data from the first optical module.

[0419] The sixth data includes a plurality of fourth code words.

[0420] Step 1502: The second optical module determines a synchronization state according to the sixth data.

[0421] For step 1502, please refer to the introduction of the aforementioned step 502, which will not be repeated here.

[0422] If it is determined that the synchronization is lost, the following steps 1503 to 1509 are executed; if it is determined that the synchronization is locked, the following step 1510 is executed. It can be understood that after the second optical module determines that the synchronization is lost, it determines that the received sixth data is invalid data.

[0423] Step 1503: The second optical module sends the first indication information and the sixth data to the second host.

[0424] The second optical module sends the first indication information to the second host through the indication signal path inst:IS_SIGNAL.indication of AUI or the MDIO interface, and sends the sixth data to the second host through the first data flow path inst:IS_UNITDATA.indication of AUI or the MDIO interface.

[0425] Step 1504: The second optical module replaces part of the seventh data with the fourth preset sequence to obtain eighth data.

[0426] In a possible implementation, the seventh data is sent by the second host to the second optical module, and may be data obtained after the second host processes (such as encodes, interleaves, etc.) the data d to be sent.

[0427] The fourth preset sequence is used to indicate that the second optical module is not synchronously locked.

[0428] In a possible implementation manner, the seventh data may include obtaining P third codewords, where the third codeword includes a third information block and a third overhead block, and P is an integer greater than 1.

[0429] As follows, three possible ways of obtaining the eighth data are exemplarily shown.

[0430] Mode 1: replacing the complete third codeword with the fourth preset sequence.

[0431] In a possible implementation, on each physical coding sublayer channel, z third codewords among P third codewords are replaced with a fourth preset sequence to obtain eighth data, where z is a positive integer greater than 1 and less than or equal to P.

[0432] Further, optionally, the length of the fourth preset sequence may be equal to a positive integer multiple of the code length of the third code word. For example, if the code length of the third code word is 128 bits, the length of the fourth preset sequence is also 128 bits.

[0433] By replacing the complete third codeword with the fourth preset, the first optical module can quickly determine the boundary of each third codeword of the received eighth data, thereby shortening the time required for synchronization and reducing the complexity of synchronization calculation on the first optical module side.

[0434] Mode 2: replacing the third overhead block in the third codeword with a fourth preset sequence.

[0435] In a possible implementation manner, on each physical coding sublayer channel, a third overhead block of z third codewords among P third codewords is replaced with a fourth preset sequence.

[0436] Further, optionally, the length of the fourth preset sequence may be less than or equal to the length of the third overhead block of the third codeword. For example, if the code length of the third codeword is 128 bits, the length of the third information block is 120 bits, the length of the third overhead block is 8 bits, and the length of the fourth preset sequence may be 8 bits.

[0437] By replacing the third overhead block in the third codeword with the fourth preset sequence, the normal transmission of valid data may not be affected. Further, when the length of the fourth preset sequence is equal to the length of one third overhead block, the first optical module can be facilitated to quickly determine the boundary of the third codeword of the received eighth data, thereby reducing the time required for synchronization.

[0438] Mode 3: replacing the third information block in the third codeword with a fourth preset sequence.

[0439] In a possible implementation manner, on each physical coding sublayer channel, a fourth preset sequence is used to replace the third information blocks of z third code words among the P third code words.

[0440] Further, optionally, the length of the fourth preset sequence may be less than or equal to the length of the third information block of the third codeword. For example, if the code length of the third codeword is 128 bits, the length of the third information block is 120 bits, the length of the third overhead block is 8 bits, and the length of the fourth preset sequence may be 120 bits.

[0441] When the second optical module needs to discard the second overhead block, the third information block is replaced by the fourth preset sequence, so that the first optical module is synchronized according to the fourth preset sequence, which helps to reduce the time required for synchronization of the first optical module.

[0442] It should be noted that the z third codewords replaced can be any z of the P third codewords, and these z can be consecutive z or non-consecutive z, which is not limited in this application. Among them, the intervals of the non-consecutive z third codewords can be the same. Further, a third codeword can be replaced with a fourth preset sequence every 2×j×5440 / PCSL / L, where L represents the length of the third information block of the third codeword, PCSL represents the number of physical coding sublayer channels, and j can take values ​​of 1, 2, 3, 4, and other positive integers. For example, taking L=170bit and PCSL=16 as an example, a third codeword can be replaced with a fourth preset sequence every 2×1×5440 / 16 / 170=4 third codewords. For another example, taking L=120bit and PCSL=16 as an example, a third codeword can be replaced with a fourth preset sequence every 2×3×5440 / 16 / 120=17 third codewords. Alternatively, the intervals between the non-consecutive z third code words may also be different, which is not limited in the present application.

[0443] Step 1505: The second optical module sends the eighth data to the first optical module. Correspondingly, the first optical module receives the eighth data from the second optical module.

[0444] In a possible implementation manner, the second optical module may send the eighth data via a transmission medium connected to the first optical module.

[0445] The ninth data is obtained by replacing part of the tenth data with the fourth preset sequence by the first optical module. The specific process is similar to the above step 1504, and specifically, the "seventh data" in step 1504 can be replaced with the "tenth data".

[0446] Step 1506: The first optical module detects at least two fourth preset sequences from the eighth data, and replaces at least two fourth preset sequences in the ninth data with the fifth preset sequence to obtain the eleventh data.

[0447] The fifth preset sequence is different from the fourth preset sequence. For example, the fourth preset sequence may be an S1 sequence, and the fifth preset sequence may be an S2 sequence. Further, optionally, the length of the fourth preset sequence may be the same as the length of the fifth preset sequence. Further, the lengths of the fourth preset sequence and the fifth preset sequence may be equal to the length of the third codeword.

[0448] Step 1507: The first optical module sends the eleventh data to the second optical module. Correspondingly, the second optical module receives the eleventh data from the first optical module.

[0449] Step 1508: The second optical module detects at least two fifth preset sequences from the eleventh data, and determines synchronization lock.

[0450] It should be noted that the second optical module does not need to decode the eleventh data and can directly detect the fifth preset sequence.

[0451] Step 1509: The second optical module sends the second indication information and the eleventh data to the second host.

[0452] Through the above steps 1501 to 1509, the synchronization of the second optical module can be independent of the processing flow of the second host, so there is no need to change the existing synchronization flow of the second host.

[0453] In a possible implementation, the data processing method on the second host side can refer to the above Figure 12b The introduction of will not be repeated here.

[0454] Further, optionally, the second host may send fifth indication information to the second optical module, and the fifth indication information is used to indicate the synchronization state of the second host, and the synchronization state may include synchronization lock or synchronization unlock. In other words, the second optical module can determine the synchronization state of the data from the first optical module and the synchronization state of the data from the second host. Exemplarily, the second host can send the fifth indication information to the second optical module via the MDIO interface.

[0455] like Fig.16 FIG. 1 is a flow chart of another data processing method provided by the present application. The method comprises the following steps:

[0456] Step 1601: The second optical module sends thirteenth data to the first optical module. Correspondingly, the first optical module receives the thirteenth data from the second optical module.

[0457] Step 1602: The first optical module determines a synchronization state according to the thirteenth data.

[0458] The step 1602 can refer to the introduction of the aforementioned step 502, which will not be repeated here.

[0459] If it is determined that the synchronization is lost, execute the following steps 1603 to 1609; if it is determined that the synchronization is locked, execute the following step 1510.

[0460] Step 1603: The first optical module sends the first indication information and the thirteenth data to the first host.

[0461] Step 1604: The first optical module replaces part of the tenth data with the fourth preset sequence to obtain ninth data.

[0462] The step 1604 can refer to the introduction of the aforementioned step 1504, which will not be repeated here.

[0463] Step 1605: The first optical module sends the ninth data to the second optical module. Correspondingly, the second optical module receives the ninth data from the first optical module.

[0464] Step 1606: The second optical module detects at least two fourth preset sequences from the ninth data, and replaces the fourth preset sequence in the eighth data with the fifth preset sequence to obtain the twelfth data.

[0465] Step 1607: The second optical module sends the twelfth data to the first optical module. Correspondingly, the first optical module receives the twelfth data from the second optical module.

[0466] Step 1608: The first optical module detects at least two fifth preset sequences from the twelfth data, and determines synchronization lock.

[0467] Step 1609: the first optical module sends the thirteenth data to the second optical module. Correspondingly, the second optical module receives the thirteenth data from the first optical module.

[0468] The thirteenth data is normal data after the first host processes the data e to be sent, and the normal data does not include the fourth preset sequence and the fifth preset sequence. It can also be understood that the first optical module and the second optical module exchange normal data.

[0469] Through the above steps 1601 to 1609, the synchronization of the first optical module can be independent of the processing flow of the first host, so there is no need to change the existing synchronization flow of the first host.

[0470] Through the above Fig.15 The second optical module can be synchronously locked by Fig.16 The synchronous locking of the first optical module can be achieved. Fig.15 and the above Fig.16 The combination of the methods shown can further reduce the time required for synchronization.

[0471] It should be noted that in the present application, the steps (or processes) executed by the first optical module can also be executed by the first PMA sublayer, or the first PMA sublayer and the first FEC sublayer, which can be referred to as the first layer for the convenience of describing the scheme. The steps (or processes) executed by the second optical module can be executed by the second PMA sublayer, or the second PMA sublayer and the second FEC sublayer, which can be referred to as the second layer for the convenience of describing the scheme. The steps (or processes) executed by the first host can be executed by the first PCS, or the first PCS and the first FEC sublayer, which can be referred to as the third layer for the convenience of describing the scheme. The steps (or processes) executed by the second host can be executed by the second PCS, or the second PCS and the second FEC sublayer, which can be referred to as the fourth layer for the convenience of describing the scheme. In other words, the first optical module described above in the present application can be replaced by the first layer, the second optical module can be replaced by the second layer, the first host can be replaced by the third layer, and the second host can be replaced by the fourth layer. The specific execution process will not be repeated here.

[0472] It is understandable that, in order to realize the functions in the above-mentioned embodiments, the first optical module, the second optical module, the first host, and the second host include hardware structures and / or software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the modules and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0473] Based on the above content and the same idea, Fig.17 and Fig.18 The schematic diagram of the structure of the possible communication device provided in the present application. These communication devices can be used to implement the functions of the first optical module, the second optical module, the first host, or the second host in the above method embodiment, and thus can also achieve the beneficial effects of the above method embodiment. In the present application, the communication device can be as follows Figure 1 The first communication device 1011 , the third communication device 1012 , the second communication device 1021 or the fourth communication device 1022 shown may also be a module (such as a chip) applied to the first communication device 1011 , the third communication device 1012 , the second communication device 1021 or the fourth communication device 1022 .

[0474] like Fig.17 As shown, the communication device 1700 includes a processing unit 1701 and a transceiver unit 1702. The communication device 1700 is used to implement the above Figure 5 , Figure 6a , Figure 6b , Fig. 9 , Fig.10 , Fig.12a , Figure 12b , Fig.13 , Fig.14 , Fig.15 or Fig.16 The method embodiments shown in FIG. 1 include functions of the first optical module, the second optical module, the first host, or the second host.

[0475] When the communication device 1700 is used to implement Figure 5 The functions of the second optical module in the method embodiment shown are as follows: the transceiver unit 1702 is used to receive the first data from the first optical module; the processing unit 1701 is used to determine the synchronization loss according to the first data. The transceiver unit 1702 is also used to send a first indication message to the second host, the first indication message is used to indicate that the second optical module has lost synchronization lock; and receive second data from the first optical module. The processing unit 1701 is also used to determine the synchronization lock according to the second data, and send a second indication message to the second host through the transceiver unit, the second indication message is used to indicate that the second optical module has been synchronized and locked.

[0476] When the communication device 1700 is used to implement Figure 5 The functions of the second host in the method embodiment shown are: the transceiver unit 1702 is used to receive the first indication information from the second optical module, the first indication information is used to indicate that the second optical module is out of synchronization; the processing unit 1701 is used to determine the out of synchronization according to the first indication information. The transceiver unit 1702 is also used to receive the second indication information from the second optical module, the second indication information is used to indicate that the second optical module is in synchronization lock. The processing unit 1701 is also used to start synchronization according to the second indication information.

[0477] For more detailed description of the processing unit 1701 and the transceiver unit 1702, please refer to Figure 5 The relevant descriptions in the method embodiment shown are directly obtained and will not be repeated here.

[0478] It should be understood that the processing unit 1701 in the embodiment of the present application can be implemented by a processor or a processor-related circuit component, and the transceiver unit 1702 can be implemented by an interface circuit or an interface circuit-related circuit component.

[0479] Based on the above content and the same concept, Fig.18As shown, the present application also provides a communication device 1800. The communication device 1800 may include a processor 1801 and an interface circuit 1802. The processor 1801 and the interface circuit 1802 are coupled to each other. It can be understood that the interface circuit 1802 can be an interface circuit or an input-output interface. Optionally, the communication device 1800 may also include a memory 1803 for storing instructions executed by the processor 1801 or storing input data required by the processor 1801 to execute instructions or storing data generated after the processor 1801 executes instructions.

[0480] When the communication device 1800 is used to implement Figure 5 When the method is shown, the processor 1801 is used to execute the function of the above-mentioned processing unit 1701, and the interface circuit 1802 is used to execute the function of the above-mentioned transceiver unit 1702.

[0481] Based on the above content and the same concept, the present application also provides a communication system. The communication system may include the aforementioned second optical module and the second host. Further, it may also include a first optical module and a first host. Among them, the possible implementation methods of the second optical module, the second host and the first optical module can be referred to the above introduction, which will not be repeated here.

[0482] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0483] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a network device or a terminal device. Of course, the processor and the storage medium can also be present in a communication device as discrete components.

[0484] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When a computer program or instruction is loaded and executed on a computer, the process or function of the embodiment of the present application is executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instruction can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a tape; it can also be an optical medium, such as a digital video disc (DVD); it can also be a semiconductor medium, such as a solid state drive (SSD).

[0485] In the various embodiments of the present application, unless otherwise specified or provided in a logical conflict, the terms and / or descriptions between the different embodiments are consistent and may be referenced to each other, and the technical features in the different embodiments may be combined to form new embodiments according to their inherent logical relationships.

[0486] In the present application, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of the present application, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula of the present application, the character " / " indicates that the previous and next associated objects are in a "divided" relationship. In addition, in the present application, the word "exemplary" is used to indicate examples, illustrations or explanations. Any embodiment or design described as an "example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Alternatively, it can be understood that the use of the word "example" is intended to present concepts in a specific way and does not limit this application.

[0487] It is to be understood that the various digital numbers involved in the embodiments of the present application are only for the convenience of description and are not intended to limit the scope of the embodiments of the present application. The size of the sequence number of the above-mentioned processes does not mean the order of execution, and the order of execution of each process should be determined by its function and inherent logic. The terms "first", "second" and similar expressions are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, including a series of steps or modules. Methods, systems, products or equipment are not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or equipment.

[0488] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of protection of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A data processing method, characterized in that: include: The second communication device receives second data from the first communication device; The second communication device determines that inner code block synchronization is locked according to the second data, and generates second indication information, where the second indication information is used to indicate that the second communication device has locked inner code block synchronization.

2. The method according to claim 1, characterized in that The method further comprises: The second communication device receives first data from the first communication device; The second communication device determines that inner code block synchronization is lost according to the first data, and generates first indication information, where the first indication information is used to indicate that the inner code block synchronization is lost by the second communication device.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: The fourth communication device obtains the second indication information through the attachment unit interface AUI or the management data input and output MDIO interface.

4. The method according to claim 2 or 3, characterized in that: The method further comprises: The fourth communication device obtains the first indication information through the AUI or MDIO interface.

5. The method according to any one of claims 1 to 4, characterized in that: The second indication information is 1.

6. The method according to any one of claims 2 to 4, characterized in that: The first indication information is 0.

7. The method according to any one of claims 1 to 6, characterized in that: The second data includes N second code words, where N is an integer greater than 1; The second communication device determines inner code block synchronization lock according to the second data, including: The second communication device decodes the second data according to a preset bit number sliding window; After the second communication device determines that at least one decoding is successful, decoding is performed according to the code length of the second codeword, and the number of successful decodings in the second decoding result is counted; The second communication device determines that the number of successful decodings in the second decoding result is greater than a third threshold, and determines that the inner code block synchronization is locked.

8. The method according to any one of claims 2 to 7, characterized in that The second communication device determines, according to the first data, that inner code block synchronization is lost, including: The second communication device decodes the first data to obtain M first decoding results, where the first decoding results include decoding success or decoding failure, and M is an integer greater than 1; If the number of decoding failures in the M first decoding results is greater than a first threshold, it is determined that the inner code block synchronization is out of lock.

9. The method according to claim 7 or 8, characterized in that The preset number of bits is smaller than a code length of the second codeword.

10. The method according to any one of claims 7 to 9, characterized in that: Decoding the first data or decoding the second data includes generating a syndrome during the decoding process.

11. The method according to any one of claims 1 to 10, characterized in that The second data includes N second codewords, the second codewords include a second information block and a second overhead block, the second overhead block includes a third preset sequence, The second communication device determines inner code block synchronization lock according to the second data, including: The second communication device detects, within a preset time window, that the number of the third preset sequences is greater than or equal to a fifth threshold, and determines that the inner code block synchronization is locked.

12. The method according to any one of claims 1 to 11, characterized in that The method further comprises: The second communication device sends the first data to the fourth communication device through a first data flow path of an attachment unit interface AUI.

13. The method according to any one of claims 1 to 12, characterized in that: The method further comprises: The second communication device receives third indication information from the fourth communication device through the MDIO interface, where the third indication information is used to indicate that the internal code block synchronization of the fourth communication device is lost.

14. The method according to any one of claims 1 to 13, characterized in that The second communication device includes a second optical module, the first communication device includes a first optical module, and the fourth communication device includes a second host.

15. The method according to any one of claims 1 to 14, characterized in that: The second communication device includes a physical medium access (PMA) sublayer, or includes a PMA sublayer and a forward error correction code (FEC) sublayer, and the fourth communication device includes a physical coding sublayer (PCS), or includes a PCS and a FEC sublayer.

16. A communication device, characterized in that: The communication device is used to execute the method according to any one of claims 1-15.

17. A communication system, characterized in that: The communication system includes an optical module and a host. The optical module is used to perform the method according to any one of claims 1-2 and 5-15; The host is used to receive data sent by the optical module.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction. When the computer program or instruction is executed by the communication device, the communication device executes the method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • In-sync and out-of-sync indication reporting method and apparatus, wireless link monitoring method and system

    CN101478816A

  • Sliding window decoding method and system with re-synchronization mechanism

    CN112165336A

  • Method and system for generating SFD timestamp based on Ethernet synchronous code

    CN112187394A

  • Information processing method and device

    CN113381840A

  • Decoding method, device and system

    CN113439402A