Data receiving method, device and system
By using the reference position and duration of a fixed sequence to determine the search for a fixed sequence within the target range after the data stream transmission is interrupted, the problem of low efficiency in bit-by-bit comparison in multi-channel parallel data transmission is solved, and rapid data stream recovery and service recovery are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2024-11-14
- Publication Date
- 2026-05-15
AI Technical Summary
In multi-channel parallel data transmission scenarios, comparing codeword flags or alignment flags bit by bit in the data stream is inefficient, resulting in excessively long data stream recovery time and affecting business continuity.
By using the reference position and fixed duration of a fixed sequence to determine the search for a fixed sequence within the target range when data transmission is resumed after an interruption, the amount of search data is reduced and the search efficiency is improved.
After a data stream is interrupted, a fixed sequence can be quickly locked, reducing the amount of data to be searched, improving search efficiency, and ensuring rapid business recovery.
Smart Images

Figure CN122052978A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a data receiving method, apparatus and system. Background Technology
[0002] Ethernet interfaces typically transmit data through a single physical channel (i.e., a single channel) or through multiple physical channels in parallel.
[0003] In a single-channel scenario, the sending end of the data stream can insert codeword markers (CWMs) into the data stream. The receiving end, upon receiving the data stream, can perform a bit-by-bit comparison of the data to search for (or lock) the CWMs in the data stream and determine the codeword boundaries based on the CWMs. In scenarios where multiple physical channels transmit data in parallel, skew can easily occur between the data streams transmitted in parallel across multiple physical channels. Therefore, the sending end of the data stream needs to insert alignment markers (AMs) into the data streams transmitted across multiple physical channels. The receiving end, upon receiving the data stream, can perform a bit-by-bit comparison of the data in the data stream to search for AMs in the data stream. Then, the receiving end can align the data streams transmitted across multiple physical channels based on the found AMs, thereby accurately acquiring the data.
[0004] However, comparing data bit by bit in the data stream described above using a search method that involves CWM or AM is inefficient. Summary of the Invention
[0005] This application provides a data receiving method, apparatus, and system that can solve the technical problem of low efficiency in comparing data in a data stream bit by bit to search for CWM or AM.
[0006] Firstly, a data receiving method is provided, comprising: a first module receiving a data stream transmitted by a second module. The data stream includes multiple fixed sequences, with a fixed interval between adjacent fixed sequences, the fixed sequences being used for data alignment or determining codeword boundaries. After the data stream transmission is interrupted and then resumed, the first module searches for fixed sequences within a target range in the resumed data stream. The target range is determined based on a reference position of the fixed sequences, which is determined by the first module within the resumed data stream based on a fixed duration corresponding to a fixed interval. For example, the fixed duration can be equal to the transmission duration of data within that fixed interval. For example, the first module is a receiving module, and the second module is a transmitting module.
[0007] Understandably, in scenarios where data transmission is interrupted and then resumed, the actual position of a fixed sequence in the resumed data stream may deviate from its original position when the data stream was uninterrupted. Based on the fixed interval between two adjacent fixed sequences in the data stream, a reference position (or hypothetical position or original position) of the fixed sequence can be determined in the resumed data stream. This reference position has a small deviation from the actual position (or true position) of the fixed sequence in the resumed data stream. Searching around this reference position increases the probability of finding the fixed sequence. Therefore, within the target range determined based on this reference position, the first module can quickly search for the fixed sequence, effectively improving the search efficiency.
[0008] Optionally, the target range includes data received before the reference position. Accordingly, the first module is able to search for a fixed sequence from the bits or symbols at the reference position to the earlier received bits or symbols, i.e., the first module is able to search forward.
[0009] Optionally, in scenarios where the target range includes data received before the reference position, the clock frequency of the first module is lower than or equal to the clock frequency of the second module.
[0010] Understandably, if the clock frequency of the first module at the receiving end is lower than the clock frequency of the second module at the transmitting end, the transmission duration calculated by the first module based on its clock frequency will be shorter than the actual transmission duration. Consequently, the reference position of the fixed sequence estimated by the first module based on its clock frequency will lag behind the actual position of the fixed sequence. Therefore, the first module can search for the fixed sequence in data received before the reference position, i.e., search forward from the reference position, thereby ensuring a faster search for the fixed sequence.
[0011] Optionally, the target range includes data received after the reference position. Accordingly, the first module is capable of searching a fixed sequence from the bit or symbol at the reference position to the later received bits or symbols, i.e., the first module is capable of searching backward.
[0012] Optionally, in scenarios where the target range includes data received after the reference position, the clock frequency of the first module is higher than or equal to the clock frequency of the second module.
[0013] Understandably, if the clock frequency of the first module at the receiving end is higher than the clock frequency of the second module at the transmitting end, the transmission duration calculated by the first module based on its clock frequency will be shorter than the actual transmission duration. Correspondingly, the reference position of the fixed sequence estimated by the first module based on its clock frequency will be earlier than the actual position of the fixed sequence. Therefore, the first module can search for the fixed sequence in data received before the reference position, i.e., search for the fixed sequence backward from the reference position, thereby ensuring a faster search for the fixed sequence.
[0014] Optionally, the target range is determined based on a reference position of a fixed sequence, including: the target range is determined based on a reference point. The reference point is determined by the first module in the data stream after transmission is resumed, based on the reference position, frequency deviation, and the duration of the data stream interruption. The frequency deviation is the difference between the clock frequency of the first module and the clock frequency of the second module.
[0015] Because of the frequency deviation between the first module at the receiving end and the second module at the transmitting end, after a certain period of interruption in data transmission, the reference position determined by the first module at the receiving end will deviate from the actual position of the fixed sequence. Therefore, based on the reference position, frequency deviation, and the duration of the data transmission interruption, the first module can determine a reference point that is closer to the actual position of the fixed sequence. Consequently, the first module can search for the fixed sequence more quickly within the target range determined based on this reference point.
[0016] Optionally, the target range includes data received before the reference point and data received after the reference point. That is, the first module can search for a fixed sequence both forward and backward, centered on the reference point, to ensure that the fixed sequence can be found quickly.
[0017] Optionally, the reference point is obtained by shifting the reference position by an offset, and correspondingly, there is an offset between the reference point and the reference position. This offset is determined based on the product of the frequency deviation, the duration of the data stream interruption, and the data stream transmission rate. It can be understood that the product of this frequency deviation, the duration of the interruption, and the data stream transmission rate is the theoretical value of the offset between the reference position and the actual position of the fixed sequence. The reference point obtained by correcting the reference position based on this offset is more accurate and ensures a faster search for the fixed sequence.
[0018] Optionally, the clock frequency of the first module is lower than that of the second module, and the reference point is located in the data received before the reference position. As mentioned above, if the clock frequency of the first module at the receiving end is lower than that of the clock frequency of the second module at the transmitting end, the reference position of the fixed sequence estimated by the first module based on its clock frequency will lag behind the actual position of the fixed sequence. Therefore, the first module can shift the reference position forward by an offset to obtain the reference point.
[0019] Optionally, the clock frequency of the first module is higher than that of the second module, and the reference point is located in the data received after the reference position. As mentioned above, if the clock frequency of the first module at the receiving end is higher than that of the clock frequency of the second module at the transmitting end, the reference position of the fixed sequence estimated by the first module based on its clock frequency will be earlier than the actual position of the fixed sequence. Therefore, the first module can shift the reference position backward by an offset to obtain the reference point.
[0020] Optionally, the time interval between the data reception time at the reference position and the reception time of the target fixed sequence is at least a fixed duration. The target fixed sequence is the last fixed sequence searched by the first module of the receiving end before the data stream transmission is interrupted. Furthermore, the reception time of the target fixed sequence can refer to the reception time of the first bit or symbol in the target fixed sequence.
[0021] After a data stream transmission interruption, the first module at the receiving end can assume that the data stream was uninterrupted and continue timing with the reception time of the target fixed sequence as a reference (e.g., by using a counter). After the data stream resumes transmission, if the duration counted by the first module reaches at least one fixed duration at the target time, the first module can determine the position of the data received at that target time within the data stream as a reference position. This reference position is the original position of the fixed sequence if the data stream had not been interrupted. Based on this reference position, the first module can quickly search for the fixed sequence in the resumed data stream.
[0022] Optionally, the interval between the reference position and the starting position of the data stream after recovery is less than a fixed interval. That is, the reference position is the position where the first fixed sequence may appear in the data stream after recovery. Alternatively, it can be understood that the first module can start searching from the first possible position in the data stream after recovery to ensure that the fixed sequence can be quickly searched and locked.
[0023] Optionally, after the data stream is interrupted and then resumed, the first module of the receiving end searches for a fixed sequence within a target range in the resumed data stream, including: after the data stream is interrupted and then resumed, the first module searches for a fixed sequence within a target range in the resumed data stream based on the fact that the duration of the interrupted data stream transmission is less than a duration threshold.
[0024] Understandably, if the data stream interruption duration is short (e.g., in a link flashover scenario), the reference position of the fixed sequence determined by the first module at the receiving end based on a fixed duration is relatively accurate. However, if the data stream interruption duration is greater than or equal to a duration threshold (i.e., the interruption duration is long), the accuracy of the reference position of the fixed sequence determined by the first module at the receiving end based on a fixed duration will decrease. Therefore, in the solution provided in this application, the first module can determine the reference position and search for the fixed sequence based on a fixed duration when the data stream interruption duration is less than the duration threshold, ensuring that the fixed sequence can be found relatively quickly. If the data stream interruption duration is greater than or equal to the duration threshold, the first module can use a blind search (i.e., bit-by-bit search) method to search for the fixed sequence starting from the first bit of the data stream after the interruption.
[0025] Optionally, the product of the duration threshold and the frequency deviation is less than or equal to the fixed duration. That is, if the product of the data stream interruption duration and the frequency deviation is less than the fixed duration, the first module of the receiving end can use the scheme provided in this application to search for a fixed sequence. The frequency deviation is generally expressed as a dimensionless ratio in parts per million (ppm). It is understood that if the product of the interruption duration and the frequency deviation is less than the fixed duration, it can be ensured that the offset between the reference position and the actual position of the fixed sequence determined by the first module based on the fixed duration is less than the fixed interval. Therefore, it can be ensured that the amount of data required by the first module to search for the fixed sequence is also less than the amount of data in the fixed interval, thereby ensuring that the fixed sequence can be found faster than through blind search.
[0026] Optionally, the aforementioned fixed sequence can be an alignment flag (AM) or a codeword flag (CWM). Specifically, if the link between the first module and the second module includes multiple physical channels, the fixed sequence can be an alignment flag used to align data across the multiple physical channels and also to identify codeword boundaries. If the link between the first module and the second module includes only one physical channel (i.e., a single-channel scenario), the fixed sequence can be a codeword flag used to identify codeword boundaries.
[0027] Secondly, a data receiving apparatus is provided, comprising at least one module that can be used to implement the data receiving method provided in the first aspect. Optionally, the at least one module can be implemented by hardware circuitry.
[0028] Thirdly, another data receiving apparatus is provided, which includes a processor and interface circuitry coupled to the processor. The processor is used to perform the data receiving method as provided in the first aspect above.
[0029] Fourthly, a chip is provided for performing the data receiving method as described in the first aspect above.
[0030] Fifthly, an optical module is provided for performing the data receiving method as described in the first aspect above.
[0031] In a sixth aspect, an Ethernet device is provided, the Ethernet device including a first module and a second module, wherein the first module is used to perform the data receiving method as provided in the first aspect above.
[0032] In a seventh aspect, a communication system is provided, comprising: a first Ethernet device and a second Ethernet device. The first Ethernet device is configured to perform the data receiving method as described in the first aspect above. The first Ethernet device can receive data streams transmitted by the second Ethernet device.
[0033] In summary, this application provides a data receiving method, apparatus, and system. In the solution provided by this application, a first module can receive a data stream sent by a second module. After the data stream is interrupted and then resumed, the first module can search for a fixed sequence within a target range in the resumed data stream. This target range is determined based on a reference position of the fixed sequence in the data stream, which is determined by the first module based on a fixed duration within the resumed data stream. It is understandable that in scenarios where the data stream is interrupted and then resumed, the actual position of the fixed sequence in the resumed data stream may deviate from its original position when the data stream was uninterrupted. Based on the fixed interval between two adjacent fixed sequences in the data stream, a reference position (or an imaginary or original position) of the fixed sequence can be determined in the resumed data stream. The deviation between this reference position and the actual position (or the true position) of the fixed sequence in the resumed data stream is small. Searching around this reference position increases the probability of finding the fixed sequence. Therefore, within the target range determined based on this reference position, the first module can quickly search for the fixed sequence. Thus, the method provided in this embodiment can effectively reduce the amount of data required by the first module when searching for the fixed sequence, thereby effectively improving the search efficiency for the fixed sequence. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of the insertion period of an AM provided in an embodiment of this application;
[0035] Figure 2 This is a structural diagram illustrating an application scenario of a data receiving method provided in an embodiment of this application;
[0036] Figure 3 This is a structural diagram illustrating an application scenario of another data receiving method provided in this application embodiment;
[0037] Figure 4 This is a flowchart of a data receiving method provided in an embodiment of this application;
[0038] Figure 5 This is a schematic diagram of data stream transmission provided in an embodiment of this application;
[0039] Figure 6 This is a schematic diagram of another data stream transmission provided in an embodiment of this application;
[0040] Figure 7 This is a schematic diagram of another data stream transmission provided in an embodiment of this application;
[0041] Figure 8This is a schematic diagram of another data stream transmission provided in an embodiment of this application;
[0042] Figure 9 This is a schematic diagram of another data stream transmission provided in an embodiment of this application;
[0043] Figure 10 This is a schematic diagram of another data stream transmission provided in an embodiment of this application;
[0044] Figure 11 This is a schematic diagram of the structure of a data receiving device provided in an embodiment of this application;
[0045] Figure 12 This is a schematic diagram of another data receiving device provided in an embodiment of this application;
[0046] Figure 13 This is a schematic diagram of the structure of an optical module provided in an embodiment of this application. Detailed Implementation
[0047] The data receiving method, apparatus, and system provided in the embodiments of this application are described in detail below with reference to the accompanying drawings.
[0048] Ethernet interfaces are located in Ethernet devices (such as routers, switches, or servers) and are used for interconnection between different Ethernet devices. Ethernet interfaces can also be located in modules within Ethernet devices (such as optical modules, electrical modules, or physical layer chips) and are used for interconnection between different modules within the Ethernet device.
[0049] As Ethernet interface data transmission rates increase, a single Ethernet interface may need to transmit data through multiple physical lanes (or multiple lanes). These multiple physical lanes can transmit data streams in parallel to adapt to the Ethernet interface's data transmission rate. For example, a 400 gigabit Ethernet (GE) interface can transmit data through four physical lanes each with a data transmission rate of 100 gigabits per second (Gbps). The physical form of these physical lanes can be printed circuit board (PCB) traces, copper cables, or fiber optic cables. The specific lane type can be an attachment unit interface (AUI) lane or a physical medium dependent (PMD) lane. PMD lanes can be used to transmit data streams between different Ethernet devices, while AUI lanes can be used to transmit data streams between different modules within the same Ethernet device.
[0050] When data streams are transmitted in parallel through multiple physical channels, skew can occur between the data streams on different physical channels due to various reasons, such as differences in the length of the different physical channels. Skew can refer to the offset of bit positions caused by differences in transmission delays between the data streams on different physical channels. The sending end of the data stream can insert an Access Module (AM) into each data stream. After receiving the data streams through multiple physical channels, the receiving end can search for the AM in the received data streams and align the data streams transmitted from the multiple physical channels based on the position of the found AM in the data stream.
[0051] The process of aligning data streams described above can include operations such as alignment locking and deskew. After aligning multiple data streams, the receiving end can perform subsequent operations on these streams, such as decoding. It can be understood that AM is a fixed sequence of bits inserted at a fixed period; this bit sequence can also be called a bit pattern. AM is also known as alignment marker, alignment symbol, alignment word, or alignment character.
[0052] Understandably, after Ethernet architecture adopted forward error correction (FEC) coding schemes, AM was also used as a method to find the boundaries of FEC codewords. That is, AM can also be used to synchronize or lock FEC codewords. It is also understandable that for single-channel (i.e., a single physical channel) transmission using an Ethernet interface with FEC coding schemes, since no alignment is required, only a fixed bit pattern is needed to identify codeword boundaries. This fixed bit pattern is generally called a codeword marker (CWM). The CWM is also a fixed sequence of bits inserted into the data stream at fixed intervals.
[0053] refer to Figure 1In a 400GE scenario, assuming the FEC codeword is obtained through Reed-Solomon (RS) encoding, the AM insertion period can be 8192 RS(544, 514) codewords, meaning there can be an interval of 8192 RS(544, 514) codewords between two adjacent AMs. The RS-encoded codeword can be represented as RS(k, t). RS() indicates that the codeword is encoded using RS encoding, k represents the number of symbols in the encoded codeword, and t represents the number of symbols corresponding to the data before encoding. For example, RS(544, 514) represents an RS-encoded codeword containing 544 symbols, of which 514 symbols correspond to the data before encoding. Each symbol can include multiple bits, such as 10 bits.
[0054] Understandable, Figure 1 The data stream shown is a 400Gbps data transmission rate within the transmitting end. After inserting AM (Advanced Mode) into this data stream at a period of 8192 RS codewords, the transmitting end performs FEC (Flexible Encoding) encoding and then distributes the encoded RS codewords to multiple Physical Coding Sublayer (PCS) lanes, for example, to 16 PCS lanes. Subsequently, the transmitting end aggregates the data streams from these multiple PCS lanes and sends them to one or more physical channels, for example, one or more AUI (Automatic Interface) physical channels, based on the ratio of the number of PCS lanes to the number of physical channels. Therefore, the AM inserted at a period of 8192 RS codewords is also distributed to the 16 PCS lanes. Each PCS lane can contain 120 bits of AM. Taking an RS codeword consisting of 544 symbols, each symbol comprising 10 bits, as an example, since an RS codeword contains 5440 bits, after distributing AMs to 16 PCS channels, the insertion period of AMs on each PCS channel is 8192*5440 / 16 bits. That is, for the data stream of each PCS channel, the interval between two adjacent AMs is 8192*5440 / 16 bits.
[0055] The following section uses a 400GE scenario and AM as an example to introduce the AM search (also known as locking) process. The CWM search process is similar to AM and can be found in the description below. It is understood that AM search is usually based on PCS channel operation. That is, the receiver performs AM locking on the data stream of each PCS channel. The AM in the data stream of each PCS channel typically includes a common marker (CM) field and a unique marker (UM) field. The CM field is the same in data streams from different PCS channels, while the UM field is different; that is, the UM field can be used to identify the PCS channel to which the data stream belongs. Accordingly, the receiver can identify codeword boundaries by locking the CM and determine the PCS channel to which each data stream belongs through the UM field, in order to reconstruct the original data stream.
[0056] The AM locking process in the data stream of each PCS channel can include the following steps: First, the receiver compares the received data stream bit-by-bit with the AM pattern. If the first valid AM is found, the receiver continues to check for the next valid AM at fixed intervals (e.g., 8192*5440 / 16 bits). If two valid AMs are found consecutively, the AM is considered locked. Subsequently, the receiver continuously monitors the AM in the data stream (i.e., continuously compares the bits in the data stream with the AM pattern at fixed intervals). If multiple (e.g., 5) comparison failures occur consecutively, the link is considered to be out of lock, and the AM locking process is repeated. In other words, the receiver needs to compare the received data stream bit-by-bit again to search for the AM. This method of searching for the AM is also called blind search.
[0057] Understandably, the receiving end can determine that a valid AM has been found when it finds the CM field within the AM. Alternatively, the receiving end can determine that a valid AM has been found when it finds both the CM and UM fields within the AM. For example, assuming both the CM and UM fields in the AM consist of 12 nibbles, if the receiving end finds 9 of the 12 nibbles in the CM field within the data stream, it can determine that the CM field has been found. Similarly, if the receiving end finds 9 of the 12 nibbles in the UM field within the data stream, it can determine that a valid UM field has been found.
[0058] It can also be understood that the aforementioned bit-by-bit comparison refers to the following: After receiving the data stream, the receiving end, starting from the first bit of the received data stream, performs a bit-by-bit comparison on the data within data segments of fixed intervals (e.g., 8192*5440 / 16 bits). This fixed interval corresponds to the AM insertion period. Furthermore, this bit-by-bit comparison can start from the first bit position of the data segment and proceed sequentially according to the bit transmission order, comparing each bit position in the data segment one by one. For each bit position, the receiving end needs to obtain a consecutive m-bit field with that bit position as the first bit, and compare the obtained field with the AM pattern to determine if the field is a valid AM. Here, m is the length of the AM, for example, m can be 120. If the consecutive m-bit field is not a valid AM, the receiving end can move to the next bit position and compare the consecutive m-bit field at the next bit position with the AM pattern until a valid AM is found. Of course, the receiving end can also choose not to compare bit positions one by one according to the transmission order, but can randomly select bit positions for comparison within the data segment with a fixed interval of the above-mentioned length, or select bit positions for comparison according to a preset bit interval within the data segment, or select multiple bit positions for comparison in parallel each time. There are various methods of bit-by-bit comparison, but all of them require traversing multiple bit positions within a data segment, hence they are also called blind search. For example, in a scenario where the interval between AM and AM is 8192*5440 / 16 bits, the receiving end needs to traverse up to 2,785,280 bit positions, and at each bit position, a continuous 120-bit field needs to be compared with the AM pattern, resulting in a large amount of data to be compared by the receiving end and low efficiency of AM search.
[0059] It's also understandable that the receiver's AM lock-up can be lost due to the sender actively shutting down the link (e.g., to conserve energy when there's no traffic on the link) or an unexpected link interruption. Since the AM insertion period is relatively long, approximately 105 microseconds (µs), and two valid AMs are needed to determine AM lock-up, theoretically, the AM locking process takes about 150µs on average. However, in practice, the cost of parallel search implementation on the chip must be considered; traversing all possible AM positions usually takes much longer than 150µs. Because the link between the sender and receiver can sometimes recover quickly after an interruption, while the AM locking process takes a long time, this can lead to severe service disruption.
[0060] The above description uses an Ethernet interface with a data transmission rate of 400Gbps as an example. It is understood that the solution provided in this application can also be applied to scenarios with other data transmission rates. For example, the data transmission rate of the Ethernet interface can also be 100Gbps, 200Gbps, 800Gbps, or 1.6 terabit per second (Tbps), etc.
[0061] Figure 2 This is a schematic diagram illustrating an application scenario of a data receiving method provided in an embodiment of this application. For example... Figure 1 As shown, this application scenario can include a first module 10 and a second module 20, which are communicatively connected. For example, the first module 10 and the second module 20 are communicatively connected through one or more physical channels, meaning the link between the first module 10 and the second module 20 includes one or more physical channels. Exemplarily, the first module 10 is included in a first Ethernet device 100, and the second module 20 is included in a second Ethernet device 200; that is, the first module 10 and the second module 20 belong to different Ethernet devices. Alternatively, the first module 10 and the second module 20 can also be included in the same Ethernet device. Furthermore, the aforementioned Ethernet device can be a network device or other devices containing an Ethernet interface. For example, the Ethernet device can be a network device such as a switch or router, or a terminal device such as a line card or server. (See reference...) Figure 3 Ethernet devices may include a physical layer (PHY) chip, and optical or electrical modules connected to the PHY chip. The optical module may be a pluggable optical module, and the electrical module may be a pluggable electrical module. For example, in a scenario where the first module 10 and the second module 20 are different Ethernet devices, each module in the first module 10 and the second module 20 may be a PHY chip, an optical module, an electrical module, a digital signal processor (DSP) chip, a retimer, or a clock and data recovery (CDR) chip, etc.
[0062] For example, in a scenario where the first module 10 and the second module 20 are included in the same Ethernet device, one of the modules 10 and 20 can be a PHY chip, and the other module can be an optical module or an electrical module. Accordingly, the link between the transmitting end and the receiving end can be a link between the PHY chip and the optical module (or electrical module). Alternatively, both the first module 10 and the second module 20 can be optical modules or electrical modules, and these two modules are connected to different ports (i.e., Ethernet interfaces) of the Ethernet device. Accordingly, the link between the transmitting end and the receiving end can be a link between two ports of the same Ethernet device.
[0063] Figure 4 This is a flowchart of a data receiving method provided in an embodiment of this application. This method can be applied to... Figure 1 or Figure 2 In the application scenario shown, this can be executed by the first module. Furthermore, this embodiment of the application uses the first module as the data stream receiver and the second module as the data stream sender as an example for explanation. Accordingly, the first module can be called the receiver module, and the second module can be called the sender module. Figure 4 As shown, the method includes:
[0064] Step 101: The first module receives the data stream sent by the second module. The data stream includes multiple fixed sequences, and there is a fixed interval between two adjacent fixed sequences.
[0065] The fixed sequence is used for data alignment or to determine codeword boundaries. In this embodiment, the second module, as the sender of the data stream, can send the data stream to the first module (i.e., the receiver of the data stream). It is understood that the link between the first and second modules includes one or more physical channels. If the link between the first and second modules includes only one physical channel, the fixed sequence in the data stream sent by the second module through that one physical channel can be a codeword marker (CWM), which can be used to determine codeword boundaries. If the link between the first and second modules includes multiple physical channels, the fixed sequence in the multiple data streams sent in parallel by the second module through those multiple physical channels can be an alignment marker (AM), which can be used for data alignment (i.e., aligning data from multiple physical channels) and can also be used to determine codeword boundaries. The codeword can refer to an FEC codeword, such as an RS codeword.
[0066] It is also understandable that the second module, as the sender of the data stream, can insert fixed sequences into the data stream at a first fixed interval based on the link's transmission rate (e.g., 400Gbps). Then, the second module can perform FEC encoding and other operations on the data stream after the fixed sequences are inserted, and distribute the encoded FEC codewords (e.g., RS codewords) to n PCS channels, where n is an integer greater than 1. Correspondingly, for the data stream of each PCS channel, there is a second fixed interval between two adjacent fixed sequences. Assuming the first fixed interval includes b1 bits and the second fixed interval includes b2 bits, then b2 can satisfy: b2 = b1 / n. Furthermore, the fixed interval mentioned in step 101 above can be either the first fixed interval or the second fixed interval; this embodiment does not limit this.
[0067] For example, in a 400GE scenario, the transmission rate of the link between the first and second modules is 400Gbps. Figure 1 As shown, the second module can insert AMs into a 400Gbps data stream at a first fixed interval of 8192 RS (544, 514) codewords. Then, the second module performs FEC encoding and distributes the encoded RS codewords to 16 PCS channels, i.e., n=16. The data stream transmission rate on each PCS channel is 25Gbps, and the second fixed interval between two adjacent AMs in each PCS channel's data stream is 8192*5440 / 16 bits.
[0068] It is also understandable that after receiving the data stream sent by the first module, it can search (i.e., lock) a fixed sequence within the received data stream. For example, the first module can use the blind search method described above to search for the fixed sequence. Furthermore, the above process of searching for the fixed sequence is based on PCS channel operations. That is, the first module can acquire data streams from multiple PCS channels, and for each PCS channel's data stream, the first module can use the blind search method to search for the fixed sequence. After the fixed sequences in the data streams of multiple PCS channels are locked, the first module can determine that the link between it and the second module is locked.
[0069] Step 102: After the data stream is interrupted and then resumed, the first module searches for a fixed sequence within the target range of the resumed data stream.
[0070] In this embodiment, if the second module actively shuts down the link (e.g., if there is no service flow in the link, the second module can actively shut down the link to save energy), or if an unexpected link interruption occurs, the data stream transmission will be interrupted. At this time, since the first module cannot receive valid data, it will determine that the fixed sequence is out of lock (e.g., AM is out of lock), and thus determine that the link between the first module and the second module is out of lock. After the link between the first and second modules is restored, the second module can resume transmitting the data stream to the first module. After receiving the restored data stream, the first module can search for the fixed sequence within a target range in the restored data stream. The target range is determined based on the reference position of the fixed sequence in the data stream, which is determined by the first module based on a fixed duration in the restored data stream. This fixed duration corresponds to a fixed interval between two adjacent fixed sequences in the data stream.
[0071] It is understandable that this fixed duration can be equal to the transmission duration of the data in the fixed interval, or it can be considered as the time interval between the transmission times of two adjacent fixed intervals, or the time interval between the reception times of two adjacent fixed intervals. For example, if the transmission rate of the link between the first module and the second module is taken as a reference, then the fixed duration is the quotient of the first fixed interval and the transmission rate of the link. If the transmission rate of the PCS channel is taken as a reference, then the fixed duration is the quotient of the second fixed interval and the transmission rate of the PCS channel. Based on the relationship between the transmission rate of the link and the transmission rate of the PCS channel, it can be seen that regardless of which transmission rate is taken as a reference, the value of the fixed duration is fixed, that is, the time interval between two adjacent fixed sequences in the data stream is fixed. Furthermore, since the fixed duration is equal to the transmission duration of the data in the fixed interval, it can be based on statistics of a specific clock frequency, which can be the clock frequency of the transmitting end of the data transmission or the clock frequency of the receiving end of the data transmission.
[0072] It is also understandable that the length of the aforementioned target range can be less than the length of the fixed interval. Figure 5 This is a schematic diagram of another data stream transmission provided in an embodiment of this application. For example... Figure 5 As shown, the target range can be the data range between the start position of the recovered data stream and the reference position, i.e. Figure 5 The target range is 1. Alternatively, the target range can be the data range between the reference position and the target position, i.e. Figure 5 The target range 2. The interval between this target location and the starting location of the data stream after transmission is restored is a fixed interval. Alternatively, the target range may also include data within a certain range before and after the reference location.
[0073] Figure 6This is a schematic diagram of data stream transmission provided in an embodiment of this application, and Figure 6 The diagram shows the data stream transmitted when the link is running normally (i.e., not shut down), the data stream sent by the second module before and after the link is interrupted, and the data stream received by the first module before and after the link is interrupted. Figure 6 The direction of the middle arrow indicates the direction of data flow transmission, that is... Figure 6 The data on the right side represents the data sent (or received) first, and the data on the left side represents the data sent (or received) later. (See reference.) Figure 6 The process of the first module determining the reference position can also be understood as follows: After the data stream transmission is interrupted, the first module continues to determine the position of the fixed sequence (such as AM) in the data stream based on the local clock frequency and a fixed duration corresponding to a fixed interval. That is, the first module can assume that the link is not interrupted and continue to count the transmission duration of the data stream based on the local clock frequency (for example, by counting with a counter), and continue to determine the position of the fixed sequence according to a fixed duration. After the data stream resumes transmission, the first module continues to count the transmission duration of the data stream and continues to determine the position of the fixed sequence (such as AM) in the resumed data stream according to a fixed duration, i.e., the reference position. This reference position can also be called the position of the assumed fixed sequence (such as the assumed AM), or the position of the original fixed sequence. Furthermore, this reference position can refer to the position of the first bit in the fixed sequence.
[0074] As one possible implementation, such as Figure 6 As shown, the target range (e.g.) Figure 6 The target range 1) can include data received before the reference position. Furthermore, the target range can also include the reference position. Accordingly, the first module can perform a unidirectional forward search of a fixed sequence centered on the reference position. It is understood that in this embodiment, the direction of data flow transmission is considered "forward." That is, searching from the currently received bit or symbol to earlier received bits or symbols is a forward search.
[0075] For example, the first module can start from the reference position and search the fixed sequence bit by bit forward according to the bit transmission order. That is, starting from the reference position, it moves forward one bit position at a time during the search. It can be understood that for each bit position, including the reference position, the first module needs to obtain a field of m consecutive bits with that bit position as the first bit, and compare the obtained field with the pattern of the fixed sequence. Here, m is the length of the fixed sequence, for example, m can be 120. Of course, the first module can also search in a different order than the bit transmission order. For example, the first module can randomly select bit positions within the target range to search the fixed sequence; or, the first module can select bit positions within the target range at preset bit intervals to search the fixed sequence; or, the first module can select multiple bit positions within the target range each time to search the fixed sequence in parallel.
[0076] Based on the above analysis, it can be seen that the first module searches for a fixed sequence within the target range in the same way as the blind search method described above. It can search bit by bit or randomly select bits in order. The difference is that the search range (i.e., the target range) of the first module in this embodiment is smaller, so it can find the fixed sequence faster.
[0077] In this implementation, the clock frequency of the first module can be lower than or equal to the clock frequency of the second module. That is, if the first module detects that its clock frequency is lower than or equal to the clock frequency of the second module, it can search for a fixed sequence in the data received before the reference position. It can be understood that since the first module is the receiver of the data stream, its clock frequency can also be called the receive (RX) frequency. Since the second module is the transmitter of the data stream, its clock frequency can also be called the transmitter (TX) frequency.
[0078] It's also understandable that, in scenarios where the clock frequency of the first module is relatively low, the transmission duration calculated by the first module based on its clock frequency will be shorter than the actual transmission duration. For example, suppose the first module calculates that the data stream has been transmitted for a first duration based on its clock frequency, and within this first duration, the first module can receive x bits (or symbols). However, if the actual transmission duration of the data stream is a second duration (longer than the first duration), the number of bits (or symbols) actually received by the first module within this second duration will be greater than x. Correspondingly, such as... Figure 7As shown, the reference position estimated by the first module based on its clock frequency lags behind the actual position of the fixed sequence. Therefore, the first module can search for the fixed sequence in the data received before the reference position, that is, the first module can search for the fixed sequence (such as AM) forward from the reference position to ensure that the fixed sequence can be found more quickly.
[0079] As another possible implementation, such as Figure 6 As shown, the target range (e.g.) Figure 6 The target range 2) can include data received after the reference position. Furthermore, the target range can also include the reference position. Accordingly, the first module can search for a fixed sequence unidirectionally backward from the reference position. For example, the first module can start from the reference position and search for the fixed sequence bit by bit in the order of bit transmission, that is, starting from the reference position, moving one bit position backward each time. Of course, the first module can also search in a different order than the order of bit transmission. For example, the first module can randomly select bit positions within the target range to search for the fixed sequence; or, the first module can select bit positions within the target range according to a preset bit interval to search for the fixed sequence; or, the first module can select multiple bit positions within the target range each time for parallel comparison. As mentioned above, for each bit position, including the reference position, the first module needs to obtain a field of m consecutive bits with that bit position as the first bit, and compare the obtained field with the pattern of the fixed sequence.
[0080] In this implementation, the clock frequency of the first module can be higher than or equal to the clock frequency of the second module. That is, if the first module detects that its clock frequency is higher than or equal to the clock frequency of the second module, it can search for a fixed sequence in the data received after the reference position.
[0081] Understandably, when the clock frequency of the first module is relatively high, the transmission duration calculated by the first module based on its clock frequency will be longer than the actual transmission duration. For example, suppose the first module calculates that the data stream has been transmitted for a first duration based on its clock frequency, and within this first duration, the first module can receive x bits (or symbols). However, if the actual transmission duration of the data stream is a second duration (less than the first duration), the number of bits (or symbols) actually received by the first module within this second duration will be less than x. Correspondingly, as... Figure 8 As shown, the reference position estimated by the first module based on its clock frequency is ahead of the actual position of the fixed sequence. Therefore, the first module can search for the fixed sequence in data received after the reference position, that is, the first module can search for the fixed sequence (such as AM) backward from the reference position to ensure that the fixed sequence can be found more quickly.
[0082] It is also understandable that, in the scenario where the clock frequency of the first module is equal to the clock frequency of the second module, the transmission duration of the data stream calculated by the first module based on its clock frequency is equal to the actual transmission duration of the data stream. Correspondingly, the reference position estimated by the first module based on its clock frequency is the actual position of the fixed sequence. Therefore, the first module can directly search for the fixed sequence at the reference position in the recovered data stream. That is, the first module can use the bit at the reference position as the first bit to obtain a field of m consecutive bits (e.g., 120 bits) and compare it with the pattern of the fixed sequence. Here, the second to the mth bits in the field of m consecutive bits are the bits received after the reference position. In this embodiment, the position of the fixed sequence (including the reference position and the actual position) can refer to the position of the first bit in the fixed sequence. Optionally, in the scenario where the clock frequency of the first module is equal to the clock frequency of the second module, the target range can be equal to the reference position, that is, the target range can only include the reference position.
[0083] As another possible implementation, such as Figure 9 As shown, after determining the reference position, the first module can also directly use the reference position as the center to search forward and backward simultaneously, that is, search for the fixed sequence bidirectionally in the data received before and after the reference position. Furthermore, for each search direction, the first module can search bit-by-bit according to the bit transmission order. In other words, the first module can gradually expand the target range from the reference position until the fixed sequence is found. As mentioned earlier, in the recovered data stream, the reference position is relatively close to the actual position of the fixed sequence. Therefore, by using the reference position as the center to search forward and backward simultaneously, the first module can quickly find the fixed sequence while gradually expanding the target range; that is, the first module can quickly find the fixed sequence within a target range with a length less than a fixed interval.
[0084] In this implementation, the clock frequency of the first module can be lower, higher, or equal to the clock frequency of the second module. That is, regardless of the relative magnitudes of the clock frequencies of the first and second modules, the first module can directly use the reference position as the center and simultaneously search forward and backward for a fixed sequence. Correspondingly, the target range can include data within a certain range before and after the reference position.
[0085] As another possible implementation, the process of determining the target range based on a fixed sequence of reference positions may include: determining the target range based on a reference point. Here, the reference point is determined by the first module in the data stream after transmission has resumed, based on the reference position, frequency deviation, and the duration of the data stream interruption. This frequency deviation (which can be simply referred to as frequency offset) is the deviation between the clock frequency of the first module and the clock frequency of the second module.
[0086] In this implementation, based on the qualitative impact of the clock frequency relationship between the receiver and transmitter on the positional relationship between the reference position and the actual position of the fixed sequence, the first module can further quantitatively determine the offset of the reference position relative to the actual position of the fixed sequence based on the numerical value of the clock frequency deviation between the receiver and transmitter and the duration of the data stream interruption. Furthermore, as... Figure 10 As shown, the first module can correct the reference position based on the offset to obtain a reference point. That is, the reference point can be obtained by shifting the reference position by an offset. Then, the first module can use the reference point as the center to search for the fixed sequence forward and / or backward. Since the reference point is obtained by correcting the reference position based on the offset, it ensures that the reference point is closer to the actual position of the fixed sequence, meaning the reference point is more accurate, thereby further improving the search efficiency of the fixed sequence.
[0087] Optionally, in this implementation, the target range can include data received before and after the reference point. Furthermore, the target range can include the reference point. That is, the first module can search the fixed sequence simultaneously forward and backward (i.e., bidirectional parallel search) with the reference point as the center. Moreover, for each search direction, the first module can perform a bit-by-bit search according to the bit transmission order, i.e., shifting the search direction by one bit position each time. It is understood that the offset determined based on the frequency deviation and the duration of data stream interruption is a theoretical value. This theoretical value may differ from the actual value of the offset (i.e., the actual deviation between the reference position and the actual position of the fixed sequence). Therefore, the first module can search the fixed sequence simultaneously forward and backward with the reference point as the center to improve search efficiency.
[0088] Optionally, the offset between the reference point and the reference position can be determined by the first module based on the product of the frequency deviation, the duration of the data stream interruption, and the data stream transmission rate. For example, the offset can be equal to the product of the frequency deviation, the duration of the data stream interruption, and the data stream transmission rate. Figure 10 It can be seen that the reference point obtained by the first module based on the offset correction reference position is closer to the actual position of the fixed sequence in the data stream, thus ensuring that the fixed sequence can be searched more quickly based on the reference point.
[0089] For example, assume the data stream interruption lasts for 10 milliseconds (ms), the data stream transmission rate is the PCS channel transmission rate, and the PCS channel transmission rate is 106.25Gbps / 4, or 26.56Gbps. If the frequency deviation between the clock frequency of the first module and the clock frequency of the second module is 10ppm, this 10ppm is a dimensionless ratio to the PCS channel transmission rate of 26.56Gbps. Accordingly, the number of bits included in the above offset can be: 10ppm × 10ms × 26.56Gbps = 2656.
[0090] Understandably, if the clock frequency of the first module is lower than that of the second module, the reference position of the fixed sequence estimated by the first module based on its clock frequency will lag behind the actual position of the fixed sequence. Therefore, the first module can shift the reference position forward by an offset to obtain a reference point. That is, this reference point can be located in the data received before the reference position.
[0091] If the clock frequency of the first module is higher than that of the second module, the reference position of the fixed sequence estimated by the first module based on its clock frequency will be ahead of the actual position of the fixed sequence. Therefore, the first module can shift the reference position backward by an offset to obtain a reference point. That is, this reference point can be located in the data received after the reference position.
[0092] It is also understandable that if the first module directly searches for the fixed sequence based on the reference position, then, as shown in the above example of offset calculation, the deviation between the reference position estimated by the first module and the actual position of the fixed sequence is only about 2600 bits on the PCS channel. Therefore, the first module can find the fixed sequence by searching approximately 2600 bit positions. Compared to blind search, which requires traversing a maximum of 2,785,280 bit positions, the search efficiency of the method provided in this embodiment can be improved by about 1000 times. Furthermore, if the first module searches for the fixed sequence based on the corrected reference point, the search efficiency can be significantly improved even further.
[0093] As described above, in the method provided by this application embodiment, after the data stream transmission is interrupted, the first module can still record the position of the original fixed sequence according to the counter even without receiving valid data. Furthermore, after the data stream transmission resumes (i.e., after receiving a valid signal), the recorded position of the original fixed sequence is used as a reference position to search for fixed sequences in the surrounding area, thereby effectively improving the search efficiency of fixed sequences. The process of determining the reference position and searching for fixed sequences described above can also be called virtual synchronization.
[0094] Optionally, the time of receiving data at the aforementioned reference position can be at least one fixed time interval from the time of receiving the target fixed sequence. This target fixed sequence is the last fixed sequence searched by the first module before the data stream transmission was interrupted. That is, in the scenario where the data stream is not interrupted, the reference position is the location where the fixed sequence appears periodically. Therefore, it can be ensured that the determined reference position is the position of the original fixed sequence. In the scenario where the data stream transmission is interrupted and then resumed, since the position of the original fixed sequence is usually close to the actual position of the fixed sequence in the resumed data stream, the fixed sequence can be quickly searched.
[0095] It is understandable that the first bit or symbol in a fixed sequence can be defined as the reception time of the entire fixed sequence. That is, the reception time of the target fixed sequence (i.e. the last fixed sequence) can refer to the reception time of the first bit or symbol in the target fixed sequence.
[0096] It's also understandable that when the first module searches for a fixed sequence in the data stream, it can determine the fixed interval between two adjacent fixed sequences by using a counter; that is, the fixed duration is determined by the counter's count value. For example, after the first module finds the first fixed sequence in the data stream, it can start counting. When the count value reaches the target value, the first module continues searching for the next fixed sequence in the data stream. Furthermore, the first module can reset the counter's count value to zero and restart counting. This target value corresponds to the fixed duration; that is, the time required for the counter to count from zero to the target value is equal to this fixed duration.
[0097] In this embodiment, after the first module finds the target fixed sequence (i.e., the last fixed sequence), it can count using a counter. After the data stream transmission is interrupted, the counter in the first module continues counting; that is, the counter value is not reset to zero but continues counting according to the existing value. During the interruption of data stream transmission, if the counter value reaches the target value, the first module can reset the counter value and start counting again; if the counter value does not reach the target value, the counter continues counting. After the data stream transmission resumes, the counter in the first module continues counting according to the existing value, and the first module can search for the fixed sequence in the resumed data stream when the counter value reaches the target value again. That is, when the counter value reaches the target value again, the position of the data received by the first module in the resumed data stream is the reference position. Alternatively, it can be understood that if the counter value reaches the target value at a target time, the position of the data received by the first module at that target time is the reference position.
[0098] Optionally, the interval between the aforementioned reference position and the starting position of the data stream after transmission is restored can be less than a fixed interval. That is, the reference position can be the position where the first fixed sequence is estimated by the first module in the data stream after transmission is restored, or it can be called the first possible position. Alternatively, it can be understood that the first module can search for the first fixed sequence in the data stream after transmission is restored to ensure that the fixed sequence can be quickly searched and locked, thereby enabling rapid link locking.
[0099] Optionally, the implementation process of step 102 above may include: after the data stream is interrupted and resumed, the first module searches for a fixed sequence within the target range of the data stream after the data stream resumes, based on the fact that the duration of the interrupted data stream transmission is less than a duration threshold.
[0100] Understandably, if the duration of the data stream interruption is less than the duration threshold (i.e., the interruption is short, such as in a link intermittent interruption scenario), the reference position of the fixed sequence determined by the first module based on the fixed duration is relatively accurate. If the duration of the data stream interruption is greater than or equal to the duration threshold (i.e., the interruption is long), the accuracy of the reference position of the fixed sequence determined by the first module based on the fixed duration will decrease. Therefore, in this embodiment, the first module can use the method provided in this embodiment to search for the fixed sequence when the duration of the data stream interruption is less than the duration threshold, to ensure that the fixed sequence can be found quickly. If the duration of the data stream interruption is greater than or equal to the duration threshold, the first module can use a blind search method to search for the fixed sequence.
[0101] Optionally, the product of the aforementioned duration threshold and frequency deviation can be less than or equal to the fixed duration. That is, if the product of the interruption duration and frequency deviation is less than the fixed duration, the first module can use the method provided in this embodiment to search for a fixed sequence in the data stream after transmission is resumed. It is understood that if the product of the interruption duration and frequency deviation is less than the fixed duration, the offset between the reference position and the actual position of the fixed sequence determined by the first module based on the fixed duration will be less than the fixed interval. Therefore, it can be ensured that the amount of data the first module needs to search for when searching for a fixed sequence is also less than the amount of data in the fixed interval, thereby ensuring that the fixed sequence can be found faster than through blind search.
[0102] The above description uses the second module as the sending module and the first module as the receiving module as an example. It is understood that in some embodiments, the second module can also act as the receiving module, executing the methods performed by the first module.
[0103] In summary, this application provides a data receiving method. After the data stream sent by the second module is interrupted and then resumed, the first module can search for a fixed sequence within a target range in the resumed data stream. This target range is determined based on a reference position of the fixed sequence in the data stream, which is determined by the first module based on a fixed duration within the resumed data stream. It is understood that in scenarios where the data stream is interrupted and then resumed, the actual position of the fixed sequence in the resumed data stream may deviate from its original position when the data stream was uninterrupted. Based on the fixed interval between two adjacent fixed sequences in the data stream, a reference position (or an imaginary or original position) of the fixed sequence can be determined in the resumed data stream. The deviation between this reference position and the actual position (or the true position) of the fixed sequence in the resumed data stream is small. Searching around this reference position increases the probability of finding the fixed sequence. Therefore, within the target range determined based on this reference position, the first module can quickly find the fixed sequence. Therefore, the method provided in this application embodiment can effectively reduce the amount of data that the first module needs to search when searching for a fixed sequence, thereby effectively improving the search efficiency of the fixed sequence.
[0104] This application provides a data receiving device that can be applied in a first module and can implement the data receiving method provided in the above-described method embodiments. For example... Figure 11 As shown, the data receiving device includes:
[0105] The receiving module 201 is used to receive the data stream sent by the second module. The data stream includes multiple fixed sequences, with a fixed interval between adjacent fixed sequences. These fixed sequences are used for data alignment or to determine codeword boundaries. The functionality of the receiving module 201 can be found in the description of step 101 in the above method embodiments.
[0106] Search module 202 is used to search for a fixed sequence within a target range in the data stream after transmission is interrupted and then resumed. The target range is determined based on a reference position of the fixed sequence. This reference position is determined by search module 202 within the data stream after transmission is resumed based on a fixed duration, and this fixed duration corresponds to a fixed interval. The functionality of search module 202 can be found in the description of step 102 in the above method embodiments.
[0107] Optionally, both the receiving module 201 and the searching module 202 can be implemented using hardware circuits; that is, both the receiving module 201 and the searching module 202 can be hardware circuit modules. For example, the hardware circuit can be a complex programmable logical device (CPLD) or a field-programmable gate array (FPGA), etc.
[0108] As a first possible implementation, the target range includes data received prior to the reference position.
[0109] Optionally, in this first implementation, the clock frequency of the data receiving device is lower than the clock frequency of the second module.
[0110] As a second possible implementation, the target range includes data received after the reference position.
[0111] Alternatively, in this second implementation, the clock frequency of the data receiving device is higher than the clock frequency of the second module.
[0112] As a third possible implementation, the target range is determined based on a fixed sequence of reference positions, including: the target range is determined based on a reference point. The reference point is determined by the data receiving device in the data stream after transmission is resumed, based on the reference position, frequency deviation, and the duration of the data stream interruption. The frequency deviation is the difference between the clock frequency of the data receiving device and the clock frequency of the second module.
[0113] Alternatively, in this third implementation, the target range includes data received before the reference point and data received after the reference point.
[0114] Optionally, there is an offset between the reference point and the reference position, which is determined based on the product of frequency deviation, the duration of data stream interruption, and the data stream transmission rate.
[0115] Optionally, the clock frequency of the data receiving device is lower than the clock frequency of the second module, and the reference point is located in the data received before the reference position.
[0116] Optionally, the clock frequency of the data receiving device is higher than the clock frequency of the second module, and the reference point is located in the data received after the reference position.
[0117] Optionally, the time interval between the data reception time at the reference location and the reception time of the target fixed sequence is at least a fixed duration. The target fixed sequence is the last fixed sequence searched by the data receiving device before the data stream transmission is interrupted.
[0118] Optionally, the interval between the reference position and the starting position of the data stream after the transmission is resumed is less than a fixed interval.
[0119] Optionally, the search module 202 can be used to: after the data stream is interrupted and resumed, search for a fixed sequence within the target range of the resumed data stream based on the fact that the duration of the interrupted data stream transmission is less than a duration threshold.
[0120] Optionally, the product of the duration threshold and the frequency deviation is less than or equal to a fixed duration, where the frequency deviation is the deviation between the clock frequency of the data receiving device and the clock frequency of the second module.
[0121] Alternatively, the fixed sequence can be an alignment flag AM or a codeword flag CWM.
[0122] In summary, this application provides a data receiving device. After the data stream sent by the second module is interrupted and then resumed, the data receiving device can search for a fixed sequence within a target range in the resumed data stream. This target range is determined based on a reference position of the fixed sequence in the data stream, which is determined by the data receiving device based on a fixed duration within the resumed data stream. It is understood that in scenarios where the data stream is interrupted and then resumed, the actual position of the fixed sequence in the resumed data stream may deviate from its original position when the data stream was uninterrupted. Based on the fixed interval between two adjacent fixed sequences in the data stream, a reference position (or an imaginary or original position) of the fixed sequence can be determined in the resumed data stream. The deviation between this reference position and the actual position (or the true position) of the fixed sequence in the resumed data stream is small. Searching around this reference position increases the probability of finding the fixed sequence. Therefore, within the target range determined based on this reference position, the first module can quickly find the fixed sequence. Therefore, the solution provided in this application embodiment can effectively reduce the amount of data that the first module needs to search when searching for a fixed sequence, thereby effectively improving the search efficiency of the fixed sequence.
[0123] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the data receiving device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0124] It should be understood that the data receiving device provided in the embodiments of this application can also be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0125] Figure 12 This is a schematic diagram of another data receiving device provided in an embodiment of this application. This data receiving device can be applied in the first module and can implement the data receiving method provided in the above-described method embodiments. Figure 12 As shown, the data receiving device includes a processor 301 and an interface circuit 302.
[0126] The interface circuit 302 can be used to execute the method shown in step 101 of the above method embodiment. The processor 301 can be used to execute the method shown in step 102 of the above method embodiment.
[0127] Optionally, processor 301 may be a central processing unit (CPU), digital signal processor (DSP), network processor (NP), graphics processing unit (GPU), neural-network processing unit (NPU), data processing unit (DPU), microprocessor, or one or more integrated circuits for implementing the methods provided in the embodiments of this application. For example, processor 301 includes application-specific integrated circuit (ASIC), programmable logic device (PLD), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. Processor 301 may implement or execute various logic blocks, modules, and circuits described in connection with the disclosure of the embodiments of this application, or it may be a combination of functions that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0128] Optionally, interface circuit 302 may include at least a wired communication interface circuit, or may also include a wireless communication interface circuit. For example, interface circuit 302 may include an Ethernet interface circuit, a Fast Ethernet (FE) interface circuit, or a Gigabit Ethernet (GE) interface circuit, etc. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof.
[0129] This application also provides a chip that can be used to perform the steps executed by the first module as described in the method embodiments above. For example, the chip may be a PHY chip, an optical digital signal processor (oDSP) in an optical module, or a retimer or CDR chip, etc.
[0130] This application embodiment also provides an optical module that can be used to perform the steps executed by the first module as described in the method embodiments above. For example, such as Figure 13 As shown, the optical module may include an oDSP 401 and an optical receiver 402. The oDSP 401 can be used to perform the steps executed by the first module as described in the above method embodiments, such as performing steps 101 and 102. Alternatively, the optical receiver 402 can be used to perform the method shown in step 101 of the above method embodiments. The oDSP 401 can be used to perform the method shown in step 102 of the above method embodiments.
[0131] It is understood that the optical module may also include an optical transmitter, and the optical transmitter and optical receiver 402 can be integrated, that is, the two can be integrated into an optical transceiver. Alternatively, the optical module may take other specific structural forms, which are not limited here.
[0132] This application also provides an Ethernet device, see reference. Figure 2 The Ethernet device includes a first module 10 and a second module 20. The first module 10 is used to perform the steps described in the method embodiments above. For example, as shown... Figure 3 As shown, one of the first module 10 and the second module 20 can be a PHY chip in an Ethernet device, and the other module can be an optical module or an electrical module in the Ethernet device.
[0133] This application also provides a communication system, such as... Figure 3 As shown, the communication system includes a first Ethernet device 100 and a second Ethernet device 200. The second Ethernet device 200 is used to send a data stream to the first Ethernet device 100. The first Ethernet device 100 can be used to perform the steps executed by the first module in the above method embodiment on the data stream sent by the second Ethernet device 200.
[0134] For example, the second Ethernet device 200 includes a second module, and the first Ethernet device 100 includes a first module. The second module is used to send a data stream to the first module, and the first module can execute the methods provided in the above-described method embodiments on the data stream sent by the second module.
[0135] Optionally, each of the first Ethernet device 100 and the second Ethernet device 200 may be a network device such as a switch or router, or a terminal device such as a line card or server.
[0136] In the embodiments of this application, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. In the embodiments of this application, the term "at least one" refers to one or more, and "multiple" refers to two or more. In the embodiments of this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0137] The above description is merely an optional implementation of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data receiving method, characterized in that, The method includes: The first module receives a data stream sent by the second module. The data stream includes multiple fixed sequences. There is a fixed interval between two adjacent fixed sequences. The fixed sequences are used for data alignment or to determine codeword boundaries. After the data stream is interrupted and then resumed, the first module searches for the fixed sequence within the target range of the data stream after the resumption of transmission. The target range is determined based on the reference position of the fixed sequence. The reference position is determined by the first module in the data stream after the transmission is resumed based on a fixed duration, and the fixed duration corresponds to the fixed interval.
2. The method according to claim 1, characterized in that, The target range includes data received prior to the reference position.
3. The method according to claim 2, characterized in that, The clock frequency of the first module is lower than or equal to the clock frequency of the second module.
4. The method according to claim 1, characterized in that, The target range includes data received after the reference position.
5. The method according to claim 4, characterized in that, The clock frequency of the first module is higher than or equal to the clock frequency of the second module.
6. The method according to claim 1, characterized in that, The target range is determined based on the reference position of the fixed sequence, including: the target range is determined based on a reference point; The reference point is determined by the first module in the data stream after transmission is resumed, based on the reference position, frequency deviation, and the duration of the data stream interruption. The frequency deviation is the deviation between the clock frequency of the first module and the clock frequency of the second module.
7. The method according to claim 6, characterized in that, The target range includes data received before the reference point and data received after the reference point.
8. The method according to claim 6 or 7, characterized in that, The reference point has an offset from the reference position, which is determined based on the product of the frequency deviation, the duration of the data stream interruption, and the data stream transmission rate.
9. The method according to claim 8, characterized in that, The clock frequency of the first module is lower than that of the second module, and the reference point is located in the data received before the reference position.
10. The method according to claim 8, characterized in that, The clock frequency of the first module is higher than that of the second module, and the reference point is located in the data received after the reference position.
11. The method according to any one of claims 1 to 10, characterized in that, The time interval between the data reception time at the reference position and the reception time of the target fixed sequence is at least one fixed duration. The target fixed sequence is the last fixed sequence searched by the first module before the data stream transmission was interrupted.
12. The method according to any one of claims 1 to 11, characterized in that, The interval between the reference position and the starting position of the data stream after the transmission is resumed is less than the fixed interval.
13. The method according to any one of claims 1 to 12, characterized in that, After the data stream transmission is interrupted and then resumed, the first module searches for the fixed sequence within a target range in the resumed data stream, including: After the data stream is interrupted and then resumed, the first module searches for the fixed sequence within the target range of the resumed data stream, based on the fact that the duration of the interrupted data stream transmission is less than a duration threshold.
14. The method according to claim 13, characterized in that, The product of the duration threshold and the frequency deviation is less than or equal to the fixed duration, and the frequency deviation is the deviation between the clock frequency of the first module and the clock frequency of the second module.
15. The method according to any one of claims 1 to 14, characterized in that, The fixed sequence is an alignment flag AM or a codeword flag CWM.
16. A data receiving device, characterized in that, The data receiving device is used to implement the method as described in any one of claims 1 to 15.
17. A chip, characterized in that, The chip is used to perform the method as described in any one of claims 1 to 15.
18. An optical module, characterized in that, The optical module is used to perform the method as described in any one of claims 1 to 15.
19. An Ethernet device, characterized in that, The Ethernet device includes a first module and a second module, wherein the first module is configured to perform the method as described in any one of claims 1 to 15.
20. A communication system, characterized in that, The communication system includes: a first Ethernet device and a second Ethernet device; The first Ethernet device is used to perform the method as described in any one of claims 1 to 15.