WO2022012354A1 - 一种速率适配方法及装置 - Google Patents
一种速率适配方法及装置 Download PDFInfo
- Publication number
- WO2022012354A1 WO2022012354A1 PCT/CN2021/104241 CN2021104241W WO2022012354A1 WO 2022012354 A1 WO2022012354 A1 WO 2022012354A1 CN 2021104241 W CN2021104241 W CN 2021104241W WO 2022012354 A1 WO2022012354 A1 WO 2022012354A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- code block
- code
- rate adaptation
- blocks
- block
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
- H04L1/0041—Arrangements at the transmitter end
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0002—Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission rate
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0006—Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
- H04L1/0007—Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format by modifying the frame length
- H04L1/0008—Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format by modifying the frame length by supplementing frame payload, e.g. with padding bits
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0009—Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the channel coding
- H04L1/0013—Rate matching, e.g. puncturing or repetition of code symbols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
- H04L1/0045—Arrangements at the receiver end
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2852—Metropolitan area networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4604—LAN interconnection over a backbone network, e.g. Internet, Frame Relay
- H04L12/462—LAN interconnection over a bridge based backbone
- H04L12/4625—Single bridge functionality, e.g. connection of two networks over a single bridge
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0015—Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
- H04L1/0056—Systems characterized by the type of code used
- H04L1/0067—Rate matching
Definitions
- the present application relates to the field of Internet technologies, and in particular, to a rate adaptation method and device.
- Metro Transport Network is a network layer located in the code block domain in the Physical Coding Sublayer (PCS) of Ethernet, and its data processing granularity is all code blocks.
- PCS Physical Coding Sublayer
- MTN when data passes through a sending node, an intermediate node or a receiving node, there may be a requirement for rate adaptation.
- MTN performs rate adaptation, it uses code blocks as the granularity. For example, by identifying the boundary of the message, finding the position of the Inter Packet Gap (IPG), and adding/adding the IDLE code block at the IPG position. to increase or decrease the rate.
- IPG Inter Packet Gap
- this method starts adding/deleting IDLE code blocks as long as the tail (T) code block is identified, which often leads to incorrect interpretation of messages near the IDLE code block addition/deletion position at the sink end.
- Embodiments of the present application provide a rate adaptation method and apparatus, which are used to improve the reliability of rate adaptation.
- a rate adaptation method including: acquiring a first code block stream, where the first code block stream includes adjacent first code blocks and second code blocks; Whether the code block relationship of the second code block satisfies the preset condition; when the code block relationship between the first code block and the second code block satisfies the preset condition and there is a rate adaptation requirement, in the At least one rate adaptation code block is inserted between the first code block and the second code block.
- the rate adaptation code block when rate adaptation is performed using code blocks as the granularity, the rate adaptation code block is only inserted between the first code block and the second code block whose code block relationship satisfies the preset condition, so as to avoid the possibility of causing alarms.
- the rate adaptation code block is inserted into the position of the code block where the message reception and interpretation error occurs, thereby ensuring that the interpretation of the received message by the receiving side (sink end) is not affected by the rate adaptation.
- the first code block is a T code block or a code block following the T code block, wherein the T code block is an end-of-frame code block;
- the second code block is an S code block or A code block preceding an S code block, where the S code block is a start of frame code block. That is, at least one rate adaptation code block is inserted in the frame gap position.
- the preset condition may have multiple implementation manners.
- Example 1 The code block relationship between the first code block and the second code block is not a code block relationship that will cause errors in packet interpretation after the rate adaptation code block is inserted.
- the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block, T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block. It should be understood that the above are only examples of the preset conditions, but not limitations.
- Mode 2 The code block relationship between the first code block and the second code block is a code block relationship that will not cause errors in packet interpretation after the rate adaptation code block is inserted.
- the code block relationship between the first code block and the second code block is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein, the IPG code block includes one or more of idle IDLE code block, O code block, E code block or D code block. It should be understood that the above are only examples of the preset conditions, but not limitations.
- various specific code block positions that cannot be inserted into the rate adaptation code block and various specific code block positions that can be inserted into the rate adaptation code block are provided.
- rate adaptation code blocks it is only necessary to avoid the position of code blocks that cannot be inserted into rate adaptation code blocks to insert rate adaptation code blocks, and/or to find code blocks that can be inserted into rate adaptation code blocks
- rate adaptation code block By inserting the rate adaptation code block at the position, it can well ensure that the interpretation of the message in the first code block stream by the receiving side is not affected by the rate adaptation, and the implementation method is simple and reliable.
- judging whether the code block relationship between the first code block and the second code block satisfies the preset condition includes: sequentially detecting in the first code block stream according to the code block order. The type of each code block; when any code block in the frame gap is detected, the code block is used as the first code block, and the adjacent code block after the code block is used as the second code block , judging whether the code block relationship between the first code block and the second code block satisfies the preset condition.
- the judgment operation is only started when the position where the frame gap starts is found, which can improve the efficiency of rate adaptation.
- the method before inserting at least one rate adaptation code block between the first code block and the second code block, the method further includes: decoding the first code block stream , obtain a first character stream; insert at least one rate adaptation code block between the first code block and the second code block, including: characters corresponding to the first code block and the second code block Characters corresponding to at least one rate adaptation code block are inserted between the characters corresponding to the blocks.
- rate adaptation when rate adaptation is provided using the character as the granularity, only the character corresponding to the rate adaptation code block is inserted between the characters corresponding to the first code block and the second code block whose code block relationship satisfies the preset condition, It can avoid inserting characters corresponding to rate adaptation at character positions that may cause errors in packet reception and interpretation, thereby ensuring that the receiving side (sink end) interprets received packets without being affected by rate adaptation.
- the method before decoding the first code block stream, the method further includes: checking the code block format and code block order on the first code block stream, if there is a code block If the format and/or the sequence of the code blocks do not conform to the specified code blocks, the code blocks whose format and/or the sequence of the code blocks do not meet the specified requirements are replaced with the E code blocks.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- code block combinations that may cause errors in message reception and interpretation can be reduced as much as possible in the code stream.
- decoding the first code block stream includes: decoding other code blocks except a preset code block, where the preset code block includes an O code block.
- the correct code block can be prevented from being mistaken, for example, the O code block is regarded as the wrong code block and processed, and the loss of OAM information in the O code block can be avoided.
- the method further comprises: inserting the at least one character corresponding to the code block.
- a character stream obtained after a character corresponding to a rate adaptation code block is encoded to obtain a second code block stream; and the preset code block is inserted into the second code block stream.
- a rate adaptation method including: acquiring a first code block stream, where the first code block stream includes adjacent first code blocks, at least two rate adaptation code blocks, and a second code block ; Judge whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block does not meet the preset condition And when there is a rate adaptation requirement, at least one rate adaptation code block in the at least two rate adaptation code blocks is deleted, and after deletion, at least one rate adaptation code block is included between the first code block and the second code block.
- Adaptation code block including: acquiring a first code block stream, where the first code block stream includes adjacent first code blocks, at least two rate adaptation code blocks, and a second code block ; Judge whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block does not meet the preset condition And when there is a rate adaptation requirement, at least one
- rate adaptation When rate adaptation is performed using code blocks as the granularity in this embodiment of the present application, if the code block relationship between the first code block and the second code block does not meet the preset condition, then delete the code block between the first code block and the second code block.
- rate adaptation code block it must be ensured that at least one rate adaptation code block is included between the first code block and the second code block after deletion, so as to avoid the adjacent first code block and the second code block after deletion, that is, The code block combination that may cause errors in the reception and interpretation of the message is avoided, thereby ensuring that the interpretation of the received message by the receiving side is not affected by the rate adaptation, and the reliability of the rate adaptation can be improved.
- the first code block is a T code block or a code block following the T code block, wherein the T code block is an end-of-frame code block;
- the second code block is an S code block or A code block preceding an S code block, where the S code block is a start of frame code block.
- the preset condition includes: the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block , T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block; and/or, the first code block and the second code block
- the code block relationship of is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein , the IPG code block includes one or more of an idle IDLE code block, an O code block, an E code block or a D code block.
- judging whether the code block relationship between the first code block and the second code block satisfies a preset condition includes: sequentially detecting each code block in the first code block stream according to the code block sequence. Type of code block; when any code block in the frame gap is detected, the code block is used as the first code block, and the code block is separated from the code block by at least two The code block of the rate adaptation code block is used as the second code block, and it is judged whether the code block relationship between the first code block and the second code block satisfies the preset condition.
- the method before deleting at least one rate adaptation code block in the at least two rate adaptation code blocks, the method further includes: decoding the first code block stream to obtain the first code block stream.
- a character stream; deleting at least one rate adaptation code block in the at least two rate adaptation code blocks includes: deleting at least one rate adaptation code block in the characters corresponding to the at least two rate adaptation code blocks the corresponding character.
- the method before decoding the first code block stream, the method further includes: checking the code block format and code block order on the first code block stream, if there is a code block If the format and/or the sequence of the code blocks do not conform to the specified code blocks, the code blocks whose format and/or the sequence of the code blocks do not meet the specified requirements are replaced with the E code blocks.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- decoding the first code block stream includes: decoding other code blocks except a preset code block, where the preset code block includes an O code block.
- the method further includes:
- At least one rate adaptation code block in the at least two rate adaptation code blocks is deleted, and after deletion, all rate adaptation code blocks are deleted. There is no rate adaptation code block or at least one rate adaptation code block is included between the first code block and the second code block.
- the method further includes: deleting the at least one rate adaptation code block.
- the character stream obtained after the character corresponding to the block is encoded to obtain a third code block stream; the preset code block is inserted into the second code block stream.
- a rate adaptation method including: acquiring a first code block stream, where the first code block stream includes adjacent first code blocks, at least two rate adaptation code blocks, and a second code block ; determine whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the preset condition and When there is a rate adaptation requirement, delete at least one rate adaptation code block in the at least two rate adaptation code blocks, and after deletion, there is no rate adaptation code between the first code block and the second code block block or include at least one rate adaptation code block.
- rate adaptation is performed using code blocks as the granularity in this embodiment of the present application, if it is identified that the code block relationship between the first code block and the second code block satisfies the preset condition, then delete the first code block and the second code block between the deletion of the code block.
- the rate adaptation code block is set, the rate adaptation code block between the first code block and the second code block can be deleted in whole or in part, and the interpretation of the received packet by the receiving side is not affected by the rate adaptation. Influenced by the rate adaptation, the flexibility of deleting rate adaptation code blocks is improved while ensuring the reliability of rate adaptation.
- the first code block is a T code block or a code block following the T code block, wherein the T code block is an end-of-frame code block;
- the second code block is an S code block or A code block preceding an S code block, where the S code block is a start of frame code block.
- the preset condition includes: the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block , T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block; and/or, the first code block and the second code block
- the code block relationship of is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein , the IPG code block includes one or more of an idle IDLE code block, an O code block, an E code block or a D code block.
- judging whether the code block relationship between the first code block and the second code block satisfies a preset condition includes: sequentially detecting each code block in the first code block stream according to the code block sequence. Type of code block; when any code block in the frame gap is detected, the code block is used as the first code block, and the code block is separated from the code block by at least two The code block of the rate adaptation code block is used as the second code block, and it is judged whether the code block relationship between the first code block and the second code block satisfies the preset condition.
- the method before deleting at least one rate adaptation code block in the at least two rate adaptation code blocks, the method further includes: decoding the first code block stream to obtain the first code block stream.
- a character stream; deleting at least one rate adaptation code block in the at least two rate adaptation code blocks includes: deleting at least one rate adaptation code block in the characters corresponding to the at least two rate adaptation code blocks the corresponding character.
- the method before decoding the first code block stream, the method further includes: checking the code block format and code block order on the first code block stream, if there is a code block If the format and/or the sequence of the code blocks do not conform to the specified code blocks, the code blocks whose format and/or the sequence of the code blocks do not meet the specified requirements are replaced with the E code blocks.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- decoding the first code block stream includes: decoding other code blocks except a preset code block, where the preset code block includes an O code block.
- the method further includes: deleting the at least one rate adaptation code block.
- the character stream obtained after the character corresponding to the block is encoded to obtain a third code block stream; the preset code block is inserted into the second code block stream.
- a rate adaptation method comprising: acquiring a first code block stream, the first code block stream including adjacent first code blocks, rate adaptation code blocks and second code blocks; Whether the code block relationship between the first code block and the second code block satisfies the preset condition; when the code block relationship between the first code block and the second code block satisfies the preset condition and there is a rate suitable When matching requirements are met, the rate adaptation code block is deleted.
- rate adaptation is performed using code blocks as the granularity in this embodiment of the present application, if there is only one rate adaptation code block between the first code block and the second code block, only the code blocks between the first code block and the second code block are The rate adaptation code block between the first code block and the second code block can be deleted only when the relationship satisfies the preset conditions, so as to prevent the first code block and the second code block from being adjacent to each other after deletion, that is, to avoid the possibility of causing alarms.
- the combination of code blocks with errors in the message reception and interpretation occurs, thereby ensuring that the interpretation of the received message by the receiving side is not affected by the rate adaptation, and the reliability of the rate adaptation is improved.
- the first code block is a T code block or a code block following the T code block, wherein the T code block is an end-of-frame code block;
- the second code block is an S code block or A code block preceding an S code block, where the S code block is a start of frame code block.
- the preset condition includes: the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block , T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block; and/or, the first code block and the second code block
- the code block relationship of is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein , the IPG code block includes one or more of an idle IDLE code block, an O code block, an E code block or a D code block.
- judging whether the code block relationship between the first code block and the second code block satisfies a preset condition includes: sequentially detecting each code block in the first code block stream according to the code block sequence. The type of code block; when any code block in the frame gap is detected, the code block is used as the first code block, and the code block after the code block is separated from the code block by a rate suitable for The code block with the code block is used as the second code block, and it is judged whether the code block relationship between the first code block and the second code block satisfies the preset condition.
- the method before deleting the rate adaptation code block, further includes: decoding the first code block stream to obtain a first character stream; deleting the rate adaptation code block , including: deleting the character corresponding to the rate adaptation code block.
- the method before decoding the first code block stream, the method further includes: checking the code block format and code block order on the first code block stream, if there is a code block If the format and/or the sequence of the code blocks do not conform to the specified code blocks, the code blocks whose format and/or the sequence of the code blocks do not meet the specified requirements are replaced with the E code blocks.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- decoding the first code block stream includes: decoding other code blocks except a preset code block, where the preset code block includes an O code block.
- the method further includes: encoding the character stream obtained after deleting the character corresponding to the rate adaptation code block to obtain a third code block stream; insert the preset code block in the second code block stream.
- a fifth aspect provides a rate adaptation method, comprising: acquiring a first character stream, where the first character stream includes adjacent characters corresponding to the first code block and characters corresponding to the second code block; When matching requirements, determine whether the code block relationship between the first code block and the second code block satisfies the preset condition; when the code block relationship between the first code block and the second code block satisfies the preset condition, in the A character corresponding to at least one rate adaptation code block is inserted between the character corresponding to the first code block and the character corresponding to the second code block.
- rate adaptation when rate adaptation is performed using characters as the granularity, only the characters corresponding to the rate adaptation code block are inserted between the characters corresponding to the first code block and the second code block whose code block relationship satisfies the preset condition, and then the characters corresponding to the rate adaptation code block can be inserted. Avoid inserting rate adaptation characters at character positions that may cause errors in packet reception and interpretation, thereby ensuring that the receiving side's interpretation of received packets is not affected by rate adaptation, which improves the reliability of rate adaptation.
- the method before acquiring the first character stream, further includes: acquiring a first code block stream, where the first code block stream includes adjacent first code blocks and second code blocks; Check the code block format and code block order on the first code block stream, and if there is a code block whose code block format and/or code block order do not conform to the regulations, then change the code block format and/or code block order
- the code blocks that do not meet the requirements are replaced with E code blocks to obtain an error-corrected first code block stream; and the error-corrected first code block stream is decoded to obtain a first character stream.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- code block combinations that may cause errors in message reception and interpretation can be reduced as much as possible in the code stream.
- decoding the error-corrected first code block stream includes: decoding other code blocks except the preset code blocks in the error-corrected first code block stream. decoding, wherein the preset code block includes an O code block.
- the correct code block can be prevented from being mistaken, for example, the O code block is regarded as the wrong code block and processed, and the loss of OAM information in the O code block can be avoided.
- the first code block is a T code block or a code block following the T code block, wherein the T code block is an end-of-frame code block;
- the second code block is an S code block or A code block preceding an S code block, where the S code block is a start of frame code block.
- the preset condition includes: the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block , T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block; and/or, the first code block and the second code block
- the code block relationship of is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein , the IPG code block includes one or more of an idle IDLE code block, an O code block, an E code block or a D code block.
- a sixth aspect provides a rate adaptation method, comprising: acquiring a first character stream, where the first character stream includes characters corresponding to adjacent first code blocks, characters corresponding to at least two rate adaptation code blocks, and character corresponding to the second code block; determine whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block When the preset condition is not satisfied and there is a rate adaptation requirement, delete the character corresponding to at least one rate adaptation code block in the characters corresponding to the at least two rate adaptation code blocks, and delete the first code block after deletion.
- a character corresponding to at least one rate adaptation code block is included between the corresponding character and the character corresponding to the second code block.
- rate adaptation is performed using characters as the granularity in this embodiment of the present application, if the code block relationship between the first code block and the second code block does not satisfy the preset condition, the character corresponding to the first code block and the corresponding second code block are deleted.
- the characters corresponding to the rate-adapted code block between the characters are deleted, it is necessary to ensure that at least one character corresponding to the rate-adapted code block is included between the character corresponding to the first code block and the character corresponding to the second code block after deletion.
- the characters corresponding to the first code block and the characters corresponding to the second code block are avoided to be adjacent to each other, that is, to avoid the occurrence of code block combinations that may cause errors in the reception and interpretation of the message, thereby ensuring that the receiving side interprets the received message. Not affected by rate adaptation, the reliability of rate adaptation can be improved.
- the method before acquiring the first character stream, further includes: acquiring a first code block stream, where the first code block stream includes adjacent first code blocks, at least two rate suitable A code block and a second code block are allocated; the code block format and code block order are checked on the first code block stream, and if there is a code block whose code block format and/or code block order does not meet The code blocks whose code block format and/or code block sequence do not meet the requirements are replaced with E code blocks to obtain the first code block stream after error correction; the first code block stream after error correction is decoded to obtain the first code block stream. character stream.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- decoding the error-corrected first code block stream includes: decoding other code blocks except the preset code blocks in the error-corrected first code block stream. decoding, wherein the preset code block includes an O code block.
- the first code block is a T code block or a code block following the T code block, wherein the T code block is an end-of-frame code block;
- the second code block is an S code block or A code block preceding an S code block, where the S code block is a start of frame code block.
- the preset condition includes: the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block , T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block; and/or, the first code block and the second code block
- the code block relationship of is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein , the IPG code block includes one or more of an idle IDLE code block, an O code block, an E code block or a D code block.
- a seventh aspect provides a rate adaptation method, comprising: acquiring a first character stream, where the first character stream includes characters corresponding to adjacent first code blocks, characters corresponding to at least two rate adaptation code blocks, and character corresponding to the second code block; determine whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block When the preset condition is satisfied and there is a rate adaptation requirement, delete the character corresponding to at least one rate adaptation code block in the characters corresponding to the at least two rate adaptation code blocks, and after deletion, the first code block corresponds to There is no character corresponding to a rate adaptation code block or a character corresponding to at least one rate adaptation code block is included between the character corresponding to the second code block and the character corresponding to the second code block.
- rate adaptation is performed using characters as the granularity in this embodiment of the present application, if it is recognized that the code block relationship between the first code block and the second code block satisfies the preset condition, the character corresponding to the first code block and the second code block are deleted.
- the characters corresponding to the rate adaptation code blocks between the corresponding characters all the characters corresponding to the rate adaptation code blocks between the characters corresponding to the first code block and the characters corresponding to the second code block may be deleted, or part of the characters may be deleted.
- the interpretation of the received message by the receiving side is not affected by the rate adaptation, which improves the flexibility of deleting the rate adaptation code block while ensuring the reliability of the rate adaptation.
- the method before acquiring the first character stream, further includes: acquiring a first code block stream, where the first code block stream includes adjacent first code blocks, at least two rate suitable A code block and a second code block are allocated; the code block format and code block order are checked on the first code block stream, and if there is a code block whose code block format and/or code block order does not meet The code blocks whose code block format and/or code block sequence do not meet the requirements are replaced with E code blocks to obtain the first code block stream after error correction; the first code block stream after error correction is decoded to obtain the first code block stream. character stream.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- decoding the error-corrected first code block stream includes: decoding other code blocks except the preset code blocks in the error-corrected first code block stream. decoding, wherein the preset code block includes an O code block.
- the first code block is a T code block or a code block following the T code block, wherein the T code block is an end-of-frame code block;
- the second code block is an S code block or A code block preceding an S code block, where the S code block is a start of frame code block.
- the preset condition includes: the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block , T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block; and/or, the first code block and the second code block
- the code block relationship of is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein , the IPG code block includes one or more of an idle IDLE code block, an O code block, an E code block or a D code block.
- a rate adaptation method comprising: acquiring a first character stream, where the first code block stream includes characters corresponding to adjacent first code blocks, characters corresponding to rate adaptation code blocks, and second character corresponding to the code block; determine whether the code block relationship between the first code block and the second code block satisfies the preset condition; when the code block relationship between the first code block and the second code block satisfies the When the preset condition is met and there is a rate adaptation requirement, the character corresponding to the rate adaptation code block is deleted.
- rate adaptation is performed using the character as the granularity in the embodiment of the present application, if there is only one character corresponding to the rate adaptation code block between the character corresponding to the first code block and the character corresponding to the second code block, then only the character corresponding to the first code block.
- the character corresponding to the rate-adapted code block between the character corresponding to the first code block and the character corresponding to the second code block can be deleted only when the code block relationship with the second code block satisfies the preset conditions, so as to avoid the first code block after deletion.
- the characters corresponding to one code block are adjacent to the characters corresponding to the second code block, that is, the combination of code blocks that may cause errors in the reception and interpretation of the message can be avoided, thereby ensuring that the interpretation of the received message by the receiving side is not affected by the rate adaptation. This improves the reliability of rate adaptation.
- the method before acquiring the first character stream, further includes: acquiring a first code block stream, where the first code block stream includes adjacent first code blocks, rate adaptation code blocks and a second code block; check the code block format and code block order on the first code block stream, if there is a code block whose code block format and/or code block order does not meet the requirements, then the code block format And/or the code blocks whose code block sequence does not meet the requirements are replaced with E code blocks to obtain an error-corrected first code block stream; and the error-corrected first code block stream is decoded to obtain a first character stream.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- decoding the error-corrected first code block stream includes: decoding other code blocks except the preset code blocks in the error-corrected first code block stream. decoding, wherein the preset code block includes an O code block.
- the first code block is a T code block or a code block following the T code block, wherein the T code block is an end-of-frame code block;
- the second code block is an S code block or A code block preceding an S code block, where the S code block is a start of frame code block.
- the preset condition includes: the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block , T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block; and/or, the first code block and the second code block
- the code block relationship of is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein , the IPG code block includes one or more of an idle IDLE code block, an O code block, an E code block or a D code block.
- a rate adaptation apparatus may be a network device, or may be a chip inside the network device. The functions/modules of the method described.
- the apparatus includes:
- an acquisition unit configured to acquire a first code block stream, where the first code block stream includes adjacent first code blocks and second code blocks;
- a processing unit configured to judge whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the When a preset condition exists and there is a rate adaptation requirement, at least one rate adaptation code block is inserted between the first code block and the second code block.
- a rate adaptation apparatus may be a network device, or may be a chip inside the network device, and the apparatus includes a method for implementing the second aspect or any possible implementation manner of the second aspect. The functions/modules of the method described.
- the apparatus includes:
- an acquisition unit configured to acquire a first code block stream, where the first code block stream includes adjacent first code blocks, at least two rate adaptation code blocks, and a second code block;
- a processing unit configured to judge whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block does not satisfy the predetermined condition
- the preset condition exists and there is a rate adaptation requirement
- at least one rate adaptation code block in the at least two rate adaptation code blocks is deleted, and after deletion, the space between the first code block and the second code block is deleted.
- At least one rate adaptation code block is included.
- a rate adaptation apparatus may be a network device, or may be a chip inside the network device.
- the apparatus includes the third aspect or any possible implementation manner of the third aspect. The functions/modules of the methods described in .
- the apparatus includes:
- an acquisition unit configured to acquire a first code block stream, where the first code block stream includes adjacent first code blocks, at least two rate adaptation code blocks, and a second code block;
- a processing unit configured to judge whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the When a preset condition exists and there is a rate adaptation requirement, at least one rate adaptation code block in the at least two rate adaptation code blocks is deleted, and there is no space between the first code block and the second code block after deletion.
- the rate adaptation code block or includes at least one rate adaptation code block.
- a twelfth aspect provides a rate adaptation apparatus, the apparatus may be a network device, or may be a chip inside the network device, and the apparatus includes the fourth aspect or any possible implementation manner of the fourth aspect.
- the apparatus includes:
- an acquisition unit configured to acquire a first code block stream, where the first code block stream includes adjacent first code blocks, rate adaptation code blocks, and second code blocks;
- a processing unit configured to judge whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the When a preset condition exists and there is a rate adaptation requirement, the rate adaptation code block is deleted.
- a thirteenth aspect provides a rate adaptation apparatus, the apparatus may be a network device, or may be a chip inside the network device, and the apparatus includes the fifth aspect or any possible implementation manner of the fifth aspect.
- the apparatus includes:
- an acquisition unit for acquiring a first character stream, the first character stream comprising adjacent characters corresponding to the first code block and characters corresponding to the second code block;
- a processing unit configured to determine whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the preset condition and there is a rate
- a processing unit configured to determine whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the preset condition and there is a rate
- a fourteenth aspect provides a rate adaptation apparatus, the apparatus may be a network device, or may be a chip inside the network device, and the apparatus includes any possible implementation manner for implementing the sixth aspect or the sixth aspect The functions/modules of the methods described in .
- the apparatus includes:
- an acquisition unit configured to acquire a first character stream, where the first character stream includes characters corresponding to adjacent first code blocks, characters corresponding to at least two rate adaptation code blocks, and characters corresponding to the second code blocks;
- a processing unit configured to judge whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block does not satisfy the predetermined condition
- the preset condition and there is a rate adaptation requirement delete the character corresponding to at least one rate adaptation code block in the characters corresponding to the at least two rate adaptation code blocks, and delete the character corresponding to the first code block.
- Characters corresponding to at least one rate adaptation code block are included between the characters corresponding to the second code block.
- a fifteenth aspect provides a rate adaptation apparatus, the apparatus may be a network device, or may be a chip inside the network device, and the apparatus includes any possible implementation manner for implementing the seventh aspect or the seventh aspect The functions/modules of the methods described in .
- the apparatus includes:
- an acquisition unit configured to acquire a first character stream, where the first character stream includes characters corresponding to adjacent first code blocks, characters corresponding to at least two rate adaptation code blocks, and characters corresponding to the second code blocks;
- a processing unit configured to judge whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the When a preset condition exists and there is a rate adaptation requirement, delete the character corresponding to at least one rate adaptation code block in the characters corresponding to the at least two rate adaptation code blocks, and delete the character corresponding to the first code block and There is no character corresponding to a rate adaptation code block among the characters corresponding to the second code block or a character corresponding to at least one rate adaptation code block is included.
- a sixteenth aspect provides a rate adaptation apparatus, the apparatus may be a network device, or may be a chip inside the network device, and the apparatus includes the eighth aspect or any possible implementation manner of the eighth aspect.
- the apparatus includes:
- an obtaining unit configured to obtain a first character stream, where the first code block stream includes characters corresponding to adjacent first code blocks, characters corresponding to rate adaptation code blocks, and characters corresponding to second code blocks;
- a processing unit configured to judge whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the When a preset condition exists and there is a rate adaptation requirement, the character corresponding to the rate adaptation code block is deleted.
- a seventeenth aspect provides a network device, comprising: at least one processor; the at least one processor causes the apparatus to perform the possible execution of any one of the first to eighth aspects by executing instructions stored in a memory. method described in the implementation.
- the memory is located outside the device.
- the apparatus includes the memory connected to the at least one processor, the memory storing instructions executable by the at least one processor.
- a computer-readable storage medium comprising a program or an instruction, when the program or instruction is executed on a computer, as described in any possible implementation manner of the first aspect to the eighth aspect The method described above is executed.
- a nineteenth aspect provides a chip, which is coupled to a memory and configured to read and execute program instructions stored in the memory, so that as in any possible implementation manner of the first aspect to the eighth aspect The method is executed.
- a twentieth aspect provides a computer program product comprising instructions which, when run on a computer, cause the method as described in any of the possible implementations of the first to eighth aspects to be performed.
- Fig. 1 is the structural schematic diagram of 100GBASE-R Ethernet interface
- FIG. 2 is a schematic structural diagram of a code block in the 64B/66B encoding format
- Fig. 4 is the schematic diagram of O code block
- 5A is a schematic diagram of a legal code block sequence
- 5B is a schematic diagram of a frame gap (Inter Packet Gap, IPG);
- 6A is a schematic structural diagram of a sending state machine
- 6B is a schematic structural diagram of a receiving state machine
- FIG. 7 is a schematic structural diagram of a Metro Transport Network (MTN).
- MTN Metro Transport Network
- Fig. 8 is the positional relationship diagram of MTN and IEE 802.3 model
- Fig. 9 is the network schematic diagram of MTN service flow transmission
- 10A to 10T are schematic diagrams of error code block relationships and results of rate adaptation in the error code block relationships
- FIG. 11 is a schematic diagram of a network architecture to which an embodiment of the application is applied.
- FIG. 14 is a schematic diagram of adjacent first code blocks, at least two rate adaptation code blocks, and second code blocks;
- FIG. 15 is a flowchart of another rate adaptation method provided by an embodiment of the present application.
- FIG. 19 is a schematic structural diagram of a rate adaptation apparatus 1900 provided by an embodiment of the present application.
- FIG. 20 is a schematic structural diagram of another rate adaptation apparatus 2000 provided by an embodiment of the present application.
- FIG. 21 is a schematic structural diagram of another rate adaptation apparatus 2100 provided by an embodiment of the present application.
- FIG. 22 is a schematic structural diagram of another rate adaptation apparatus 2200 provided by an embodiment of the present application.
- FIG. 23 is a schematic structural diagram of another rate adaptation apparatus 2300 provided by an embodiment of the present application.
- FIG. 24 is a schematic structural diagram of another rate adaptation apparatus 2400 provided by an embodiment of the present application.
- FIG. 25 is a schematic structural diagram of another rate adaptation apparatus 2500 provided by an embodiment of the present application.
- FIG. 26 is a schematic structural diagram of another rate adaptation apparatus 2600 provided by an embodiment of the present application.
- FIG. 27 is a schematic structural diagram of a network device 2700 according to an embodiment of the present application.
- Figure 1 shows a schematic diagram of the structure of the 100GBASE-R Ethernet interface, as shown in Figure 1, including other high-level (HIGHER LAYERS), logical link control layer (Logic Link Control, LLC), medium access control (MAC Control) , Media Access Control (MAC), Reconciliation Sublayer (RS), 100GBASE-R Physical Coding Sublayer (PCS), Solomon Coding Sublayer (REED-SOLOMON) FORWARD ERROR, RS-FEC), PHYSICAL MEDIUM ATTACHMENT (PMA), PHYSICAL MEDIUM DEPENDENT (PMD), AUTO-NEGOTATION (AN), medium (Medium).
- HOGHER LAYERS high-level
- Logic Link Control, LLC logical link control layer
- MAC Control Media Access Control
- RS Media Access Control
- PCS 100GBASE-R Physical Coding Sublayer
- REED-SOLOMON Solomon Coding Sublayer
- PMA PHYSICAL MEDIUM ATTACHMENT
- PMD PHYSICAL MEDIUM DEP
- the Ethernet interface is designed with the Ethernet PHY carrying a MAC data stream.
- the MAC data flow is transmitted through the interface, which involves the processing of MAC, RS, PCS, RS-FEC, PMA, and PMD in sequence from top to bottom, and finally manifests as a signal sent to the link medium.
- the receiving direction involves its inverse process. The signal is received from the link medium, and then processed by PMD, PMA, RS-FEC, and PCS in sequence to recover the MAC data stream.
- the embodiment of the present application uses the 64B/66B encoding format as an example, and other encoding formats are also applicable.
- the relevant attributes of the code blocks defined in the standards in the embodiments of this application the code blocks that match the relevant attributes of the code blocks defined in the standards are called legal code blocks, and the code blocks that do not match the relevant attributes of the code blocks defined in the standards are called legal code blocks.
- the blocks are called illegal code blocks.
- the relevant attributes of the code block may include various types, such as the structural form of the code block, the positional relationship of the code block, and the like.
- Figure 2 shows a schematic diagram of the structure of the code block in the 64B/66B encoding format defined in the standard.
- the code block is defined by the IEEE Std 802.3-2018.IEEE Standard for Ethenet SECTION SIX standard, where 64B, That is, 8 characters of 8B (bit) are input as encoding, and 66B are output as encoding.
- the synchronization header area of the code block includes the 0th bit and the first bit of the code block. There are two cases of the synchronization header area of the code block, which are 01 and 10 respectively.
- the code block whose synchronization header is 01 is called data code block, and the data code block can be written as D code block; the code block whose synchronization header is 10 is called control code block.
- the field D0 of the control code block occupies 8 bits, which can be called the type field of the control code block (the type field can be written as the type field).
- rate adaptation is required because there is a rate deviation between the MAC layer and the PHY layer.
- FIG. 3 is a schematic diagram of Ethernet rate adaptation, and Ethernet rate adaptation is performed in units of characters/octets (character/octet).
- the left side of Figure 3 shows the rate adaptation operation in the sending direction.
- the PCS will use the T_TYPE function to group every 8 characters into a group to check the format and sequence before encoding, which must meet the established rules.
- control (C) block the 8 characters must contain a valid control character, such as /O/, /S/, /T/, /LI/, and any one other than the /E/ control character
- a valid control character, or control (C) block is a valid O-block (ordered set).
- the O code block is a special control code block.
- the O code block consists of one control character, three data characters and four zero data characters, as shown in Figure 4. It should be understood that the value of the block type of the O code block in FIG. 4 is 0x4B, and the O code is 0xC, which is only an example and not a limitation, and may also be other values in actual implementation.
- the first character of the 8 characters must be /S/, and the following 7 characters must be data characters.
- the tail (T) code block 8 characters One of the characters must be /T/ characters, and the characters before the /T/ character must be data characters, and the characters after it must be characters other than /O/, /S/ and /T/.
- the PCS encoding (encode) function encodes the data in a group of 8 characters into 64b/66b code blocks, and checks the sequence of the corresponding code blocks according to the sending state machine. Under normal circumstances, the legal sequence of code blocks corresponding to one message data is SDDDDD...T, for example, as shown in FIG. 5A, wherein the number of D code blocks is not limited.
- this interval is the IPG.
- Figure 6A is a schematic diagram of the structure of the sending state machine. As shown in Figure 6A, when sending, starting from the initial state, the PCS encodes each 8 characters received as a group; When the code block sequence is irregular, the corresponding code block will be replaced with an error (error, E) code block.
- E error
- the right side of Figure 3 shows the rate adaptation operation in the receiving direction.
- the PCS receives the 64b/66b encoded code block, it will use the R_TYPE function to verify the code block format, and use the receiving state machine to perform sequential verification.
- the code block format or code block sequence is inconsistent, the E code block will be used to replace the corresponding code block.
- the 64b/66b code block is decoded into 8 characters using the PCS decoding (decode) function, and the PCS will perform rate adaptation according to the rate deviation between the PHY and the MAC before sending it up to the RS.
- FIG. 6B is a schematic structural diagram of the receiving state machine. As shown in FIG. 6B , when receiving, starting from the initial state, the PCS checks the character format and sequence according to each code block received. When an irregular code block sequence occurs, the corresponding code block will be replaced with an E code block. After that, the decoding operation is performed again.
- FIG 7 exemplarily shows a schematic diagram of the structure of a Metro Transport Network (MTN).
- MTN Metro Transport Network
- the MTN technology mainly consists of two layers, the channel layer and the segment layer.
- ITU-T International Telecommunication Union
- the inverted trapezoid below the ellipse is the adaptation function from the channel layer to the segment layer, where the data streams (in the form of 64B/66B code block streams) of each MAC will be interleaved into one 64B/66B code block stream.
- MTN is a network layer located in the code block domain in PCS encode/decode, as shown in Figure 8, all the data processing units of MTN are code blocks, or the granularity of data processing is code blocks.
- Rate adaptation may be required due to the rate difference between the channel layer and the segment layer; Rate adaptation is also required; at the receiving node, when the stream of client traffic blocks is sent from the segment layer to the channel layer, rate adaptation may also be required.
- Figure 9 shows a schematic diagram of the 1.5 layer forwarding of the MTN network.
- the intermediate node after the code block flow flows from one port, it reaches the MTN connection channel layer, that is, the 1.5 layer (the ellipse in Figure 9 represents the MTN connection. After the channel layer), it is no longer transmitted up, but sent out through another port.
- the MTN network can usually perform rate adaptation in the form of a buffer (buffer) first-in, first-out (FIFO).
- buffer buffer first-in, first-out
- a specific implementation method is to set a certain waterline according to the depth of the cache.
- the incoming IDLE code block is deleted.
- the IDLE block is inserted.
- this method ignores the relationship between the positions of the rate adaptation IDLE additions and deletions and the corresponding code blocks of the message data. If inserted in the middle of the message, it will affect customer service data. In addition, it will also cause the sink to interpret the packet. For example, the correct packet was originally sent, but the correct packet is interpreted as an incorrect packet because the rate adaptation IDLE is added or deleted before reaching the sink.
- Another specific implementation method is to process the whole packet on the basis of using the buffered FIFO waterline, that is, when performing rate adaptation, the boundary of the message will be identified, and the IDLE code block will be performed after the T code block.
- the additions and deletions come from rate adaptation.
- this method can avoid inserting or deleting the IDLE code block in the middle of the message, but this method starts to add and delete the IDLE code block as long as the T code block is seen.
- T code block and T code block, T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block, etc. if any of these combinations Inserting or deleting the IDLE code block in the middle of a combination will cause the adjacent packets to be interpreted as erroneous packets by PCS decode, and then replaced with the error code block E for processing. Therefore, this method still has the risk that the correct packet is interpreted as an incorrect packet by the sink.
- Example 1 T-block and errors caused by T-block.
- the original code block stream sent by the sender is the first line of code block streams. If the rate adaptation IDLE is not added or deleted in the middle, the sink end checks the sequence of code blocks according to the receiving state machine, and decodes the code blocks. The stream is the second line code block stream. Because there is an E-block, the first packet is wrong and will be discarded by the MAC when the FCS check fails.
- the original code block stream sent by the sender is the code block stream of the first line.
- IDLE is not deleted, the message code block stream received by the sink end is interpreted as the state of the second line, that is, the second line message error.
- the original code block stream sent by the sender is the code block stream in the first row.
- the message status received and interpreted by the sink end is as shown in the second row. line, that is, both messages are in error.
- the original code block stream sent by the sender is the code block stream in the first row.
- the message status interpreted by the sink end is shown in the second row. That is, the second message is wrong.
- the sender deletes the IDLE code block between the T and E code blocks in the original code block stream, and the deleted state is the first row in Figure 10H
- the status of the packets received and interpreted by the sink is shown in the second row of Figure 10H, that is, both packets are in error.
- the original code block stream sent by the sender is the code block stream in the first row.
- the message status interpreted by the sink end is shown in the second row. , that is, both packets are in error.
- the transmitting end inserts the IDLE code block between the T code block and the D code block in the original code block stream, as shown in the first row of Figure 10J,
- the packet status interpreted by the sink is shown in the second row of Figure 10J, that is, the second packet has an error, which is inconsistent with the actual situation that both packets have errors.
- the original code block stream sent by the sender is the code block stream in the first row. If the IDLE code block deletion rate adaptation is not performed, the message status interpreted by the sink end is shown in the second row. That is, the second message is wrong.
- the sender deletes the IDLE code block between the T code block and the D code block in the original code block stream, as shown in the first row of Figure 10L , the packet status interpreted by the sink end is shown in the second row of Figure 10L, that is, both packets are in error, which is inconsistent with the actual situation that the second packet is in error.
- the original code block stream sent by the sender is the code block stream in the first row. If the IDLE code block is not inserted for rate adaptation, the message status interpreted by the sink terminal is shown in the second row. , that is, the second message has an error.
- the transmitting end inserts an IDLE code block between the D code block and the S code block in the original code block stream, as shown in the first row of Figure 10N , the packet status interpreted by the sink end is shown in the second row of Figure 10N, that is, there is no packet error, which is inconsistent with the actual situation of the second packet error.
- the original code block stream sent by the sender is the code block stream in the first row.
- the message state interpreted by the sink terminal is shown in the second row. That is, there is no message error.
- the transmitting end deletes the DILE code block between the D code block and the S code block of the original code block stream, as shown in the first row of Figure 10P, the sink
- the packet status interpreted by the terminal is shown in the second row of Figure 10P, that is, the second packet has an error, which is inconsistent with the actual situation where there is no packet error.
- the original code block stream sent by the sender is the code block stream in the first row.
- the message status interpreted by the sink end is shown in the second row. , that is, the second message has an error.
- the original code block stream sent by the sender is the code block stream in the first row. If the IDLE code block deletion rate adaptation is not performed, the message status interpreted by the sink terminal is shown in the second row. That is, there is no message error.
- an embodiment of the present application provides a rate adaptation scheme.
- rate adaptation is required, the location of the message is identified, and the combination of code block relationships that may cause errors in the reception and interpretation of the message is identified in advance, and then the rate adaptation is performed. Avoid these code block positions that may cause interpretation errors during adaptation, and then insert or delete rate adaptation code blocks at the correct code block positions, which can ensure that the sink end, that is, the receiving side, interprets the received packets without being affected by the rate.
- rate adaptation The specific scheme will be introduced in detail later.
- the embodiments of the present application are applicable to all scenarios that require rate adaptation, for example, can be used for all existing 1.5-layer technologies, such as a network using a flexible Ethernet (Flex Ethernet, FlexE) technology, or a Slicing Packet network (Slicing Packet) Network, SPN) technology, and the current MTN network technology that is being standardized by ITU-T Study Group 15 Work Party 3 Question Group 11 (Study group 15 work party 3 question 11, SG15 WP3 Q11).
- a network using a flexible Ethernet (Flex Ethernet, FlexE) technology or a Slicing Packet network (Slicing Packet) Network, SPN) technology
- SPN Slicing Packet network
- FIG. 11 is a network architecture to which the embodiments of the present application may be applied.
- the network includes a sending node (sending end) and a receiving node (receiving end, or sinking end), and the sending node may send a stream of code blocks to the receiving node.
- the receiving node can receive the code block stream from the sending node.
- the network may further include an intermediate node (not shown in FIG. 11 ), which may be configured to receive the code block stream from the sending node and send it to the receiving node, so as to forward the code block stream.
- the technical solutions provided by the embodiments of the present application can be implemented on both the intermediate node and the receiving node, or when any node in the network needs to perform rate adaptation, or the nodes with receiving ports can implement the embodiments of the present application, thereby solving the problem of Rate adaptation affects the correct reception of packets.
- the technical solutions provided in the embodiments of the present application may be applied to an intermediate node, an Ethernet port or a switch on a receiving node.
- the solutions provided by the embodiments of the present application can perform hardware upgrades at the physical layer (including applying new chips, refreshing Field Programmable Gate Array (FPGA) codes, etc.) to the original switches or network cards to accomplish.
- FPGA Field Programmable Gate Array
- system and “network” in the embodiments of the present application may be used interchangeably.
- At least one means one or more, and “plurality” means two or more.
- “And/or”, which describes the relationship of the associated objects, indicates that there can be three kinds of relationships, for example, A and/or B, it can indicate that A exists alone, A and B exist at the same time, and B exists alone, where A, B can be singular or plural.
- the character “/" generally indicates that the associated objects are an "or” relationship.
- At least one of the following items refers to any combination of these items, including any combination of single item(s) or plural items(s), such as at least one of a, b or c (a), can mean: a, or b, or c, or a and b, or b and c, or a and c, or a and b and c.
- the ordinal numbers such as “first” and “second” mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, sequence, priority or priority of multiple objects. Importance.
- the first priority criterion and the second priority criterion are only for distinguishing different criteria, and do not indicate the difference in content, priority, or importance of the two criteria.
- a flow chart of a rate adaptation method provided by an embodiment of the present application is provided.
- the method can be applied to the network architecture shown in FIG. 11 .
- the method can be specifically executed by an intermediate node or a receiving node, or other It needs to be performed by the node that performs rate adaptation.
- Methods include:
- the code block stream may also be called a code stream, which refers to a data stream composed of code blocks.
- the first code block is located before the second code block
- the second code block is located after the first code block
- the first code block stream is obtained, and a specific implementation manner may be: a code block stream read from a cache.
- the reading method may be reading according to the first-in, first-out rule. Further optionally, a code block stream of a preset length is read each time.
- rate adaptation requirement involved in this article refers to the rate deviation between the receiving port and the transmitting port.
- the deviation of the clock frequency of the receive port and the transmit port refers to the rate deviation between the receiving port and the transmitting port.
- the rate deviation can be reflected in the bandwidth deviation between the receiving port and the transmitting port. For example, when the bandwidth of the receiving port is greater than the bandwidth of the transmitting port, the rate of the receiving port is greater than that of the transmitting port. Therefore, rate adaptation needs to be inserted into the first code block stream. code block, the time code stream satisfies the bandwidth of the receiving port.
- the rate deviation can also be expressed as the frequency deviation between the receiving port and the transmitting port.
- the receiving port works at +100ppm frequency
- the transmitting port works at -100ppm frequency
- the result is that the frequency deviation between the two ports is 200ppm.
- the frequency deviation of 200ppm needs to be adapted by the rate adaptation method in the present invention.
- the buffer watermark state can be set in the buffer corresponding to the receiving port.
- the current data stream enters the buffer at a too slow rate and the current buffer data is lower than the watermark that has been set, it is determined that there is a rate adaptation requirement.
- a rate adaptation code block needs to be inserted into the first code stream to increase the data inflow rate.
- the adjacent first code block and second code block may be two adjacent code blocks at any position in the first code block stream, for example, the first code block and the second code block are both adjacent. is located in the first packet, or the first code block is located in the first packet and the second code block is located in the frame gap (Inter Packet Gap, IPG) after the first packet, or the first code block is located in the first packet In the previous frame gap, the second code block is located in the first packet.
- IPG Inter Packet Gap
- the judgment position for judging whether the code block relationship between the first code block and the second code block satisfies the preset condition may be any position in the first code block stream.
- a possible design is to start from the first code block of the first code block stream, and judge backwards in sequence according to the code block sequence, and the judgment position traverses all code block positions in the first code block stream.
- the first code block in the first code block stream is used as the first code block
- the second code block is used as the second code block
- the current first code block and the current second code block are determined. Whether the block meets the preset conditions
- the judgment can also start from other positions of the first code block stream, such as starting from the middle position of the first code block stream, and judge forward and backward respectively, or It starts from the last code block of the first code block stream, and judges forward in sequence, etc., which is not limited here.
- the adjacent first code block and the second code block may be adjacent code blocks at preset positions in the first code block stream.
- the adjacent first code block and the second code block are two adjacent code blocks located in the frame gap in the first code block stream.
- the first code block may be a T code block or a code block after the T code block, where the T code block is an end-of-frame code block
- the second code block may be an S code block or a code block before the S code block.
- the S code block is a frame start code block.
- the judgment position for judging whether the code block relationship between the first code block and the second code block satisfies the preset condition may be any position in the IPG of the first code block stream.
- a possible design is to detect the type of each code block in the first code block stream in sequence according to the code block sequence.
- the legal code block sequence is the sequence of repeated SDDDDDTC SDDDDDTC, as shown in After the start code block of an IPG (that is, the last code block of a certain message is detected, generally a T code block), starting from the start code block of any frame gap, the code blocks are judged backwards in sequence until The end code block of the IPG (that is, the position of the first code block of the next packet, generally the S code block).
- the T code block of the first packet in the first code block stream is the m th code block in the first code block stream
- the second packet is the n th code block in the first code block stream. , where n>m.
- judging whether the code block relationship between the first code block and the second code block satisfies the preset condition may include:
- Detect the type of each code block in the first code block stream in turn according to the code block sequence.
- the code block type of the mth code block is identified, it is determined that the mth code block is a T code block, and the first code block stream
- the m th code block in is used as the first code block
- the m+1 th code block is used as the second code block, and then starts to judge whether the current first code block and the current second code block meet the preset conditions
- the judgment can also start from other positions of the IPG, such as the middle position of the IPG, and judge forward and backward respectively, and go forward to the T code block. Then to the S code block; or starting from the first code block (ie the S code block) after the end position of the IPG, and then judge forward in turn, until the first code block of the IPG (ie the T code block), etc.
- positions of the IPG such as the middle position of the IPG, and judge forward and backward respectively, and go forward to the T code block.
- the S code block or starting from the first code block (ie the S code block) after the end position of the IPG, and then judge forward in turn, until the first code block of the IPG (ie the T code block), etc.
- the preset position may also be other positions, for example, the preset position may be a part of the IPG, or the coverage area is larger than the preset position of the IPG, etc., which is not limited here.
- a code block in an illegal code block sequence if a code block in an illegal code block sequence is detected, it can be replaced with an error code block for processing, or it can be handed over to the sending node or the receiving node for processing.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- the preset conditions include but are not limited to the following two:
- the first preset condition is that the code block relationship between the first code block and the second code block is not a code block relationship that will cause errors in packet interpretation after the rate adaptation code block is inserted, such as the first code block and the second code block.
- the code block relationship is not any of the following code block relationships:
- the first code block is a T code block
- the second code block is a T code block
- the first code block is a T code block, and the second code block is a D code block;
- the first code block is a T code block, and the second code block is an E code block;
- the first code block is a D code block, and the second code block is an S code block;
- the first code block is an E code block
- the second code block is an S code block
- ⁇ first code block, second code block ⁇ to represent the code block relationship between the first code block and the second code block, then ⁇ first code block, second code block ⁇ means that it is not any of the following code block relationships : ⁇ T,T ⁇ , ⁇ T,D ⁇ , ⁇ T,E ⁇ , ⁇ E,S ⁇ .
- the second preset condition, the code block relationship between the first code block and the second code block is the code block relationship that will not cause errors in packet interpretation after the rate adaptation code block is inserted, such as the first code block and the second code block.
- the code block relationship of is any of the following code block relationships:
- the first code block is a T code block, and the second code block is an IPG code block;
- the first code block is an IPG code block, and the second code block is an S code block;
- the first code block is a T code block, and the second code block is an S code block;
- the first code block is an IPG code block
- the second code block is an IPG code block
- the code block relationship between the first code block and the second code block (represented by ⁇ first code block, second code block ⁇ ) is any one of the following code block relationships: ⁇ T,I ⁇ , ⁇ T,S ⁇ , ⁇ I,I ⁇ , ⁇ O,I ⁇ , ⁇ I,O ⁇ , ⁇ I,S ⁇ , ⁇ O,S ⁇ , ⁇ O,O ⁇ .
- the IPG code block here refers to a code block located at the IPG position, including one or more of an IDLE code block, an O code block, an E code block or a D code block.
- a D code block may appear at the IPG position, and the IPG code block may include a D code block.
- first preset condition and the second preset condition can also be real-time at the same time, that is, it is necessary to judge whether the code block relationship between the first code block and the second code block needs to satisfy the first preset condition and the second preset condition at the same time. 2 preset conditions.
- the specific judgment methods include but are not limited to the following two:
- the first method is to judge the first code block first, and then judge the second code block.
- the first code block is not any one of the T code block, the D code block, and the E code block, it is directly determined that the first code block and the second code block satisfy the preset condition;
- the first code block is a T code block, a D code block, and E is one of the code blocks, for example, the first code block is a D code block
- the first code block is a T code block or an IPG code block
- the first code block is a T code block
- the second type is to judge the first code block and the second code block at the same time.
- ⁇ first code block, second code block ⁇ is any of the following code block combinations: ⁇ T,T ⁇ , ⁇ T,D ⁇ , ⁇ T,E ⁇ , ⁇ E,S ⁇ ; if so One of them is to determine that the code block relationship between the first code block and the second code block does not meet the preset condition, and if it is not any of the above code block combinations, then determine the code block of the first code block and the second code block. The block relationship satisfies the preset conditions.
- ⁇ first code block, second code block ⁇ is any of the following code block combinations: ⁇ T,I ⁇ , ⁇ T,S ⁇ , ⁇ I,I ⁇ , ⁇ O,I ⁇ , ⁇ I ,O ⁇ , ⁇ I,S ⁇ , ⁇ O,S ⁇ , ⁇ O,O ⁇ ; if it is one of them, it is determined that the code blocks of the first code block and the second code block meet the preset conditions, if not In any of the above code block combinations, it is determined that the code block relationship between the first code block and the second code block does not satisfy the preset condition.
- the above S1202 is to judge whether the code block relationship between the first code block and the second code block satisfies a preset condition when there is a rate adaptation requirement.
- the judgment can also be performed when there is no rate adaptation requirement (that is, the code block relationship between the first code block and the second code block can be always judged after the first code block stream is acquired. Whether the preset condition is met), when the preset condition is met and there is a rate adaptation requirement, S1203 is performed again.
- the rate adaptation code block includes an IDLE code block, but other possibilities are not excluded, for example, a self-defined code block for adjusting the rate may also be included, which is not limited here.
- inserting at least one rate adaptation code block between the first code block and the second code block may specifically include: determining, according to the rate deviation between the receiving port and the transmitting port, whether the first code block and the second code block The number of rate-adapted code blocks inserted between the first code block and the second code block, wherein, the greater the rate deviation, the greater the number of rate-adapted code blocks inserted between the first code block and the second code block; Then, when the code block relationship satisfies all A corresponding number of rate adaptation code blocks are inserted between the first code block and the second code block of the preset condition.
- At least one rate-adaptive rate is inserted between the first code block and the second code block.
- the code block can also be inserted between the first code block and the second code block when the code block relationship between the first code block and the second code block does not satisfy another preset condition.
- At least one rate adaptation code block is inserted between the first code block and the second code block when the code block relationship between the first code block and the second code block does not satisfy another preset condition.
- another preset condition may be opposite to the above preset condition.
- the code block relationship between the first code block and the second code block is any one of the following code block relationships: the first code block is a T code block, the second code block is a T code block; the first code block is The T code block, the second code block is the D code block; the first code block is the T code block, the second code block is the E code block; the first code block is the D code block, the second code block is the S code block; The first code block is the E code block and the second code block is the S code block.
- code block relationship between the first code block and the second code block is not any of the following code block relationships:
- the first code block is a T code block, and the second code block is an IPG code block;
- the first code block is an IPG code block, and the second code block is an S code block;
- the first code block is a T code block, and the second code block is an S code block;
- the first code block is an IPG code block
- the second code block is an IPG code block
- the above-mentioned related embodiment shown in FIG. 12 introduces a rate adaptation method with a code block as the granularity in a scenario where the rate of a receiving port needs to be increased.
- the following describes the rate adaptation method with the granularity of code blocks in the scenario where the receiving port rate needs to be reduced.
- FIG. 13 a flowchart of another rate adaptation method provided in this embodiment of the present application, the method can be applied to the network architecture shown in FIG. 11 , and the method can be specifically executed by an intermediate node or a receiving node, or Other nodes need to perform rate adaptation.
- Methods include:
- the adjacent first code blocks, at least two rate adaptation code blocks and second code blocks in this document mean that the at least two rate adaptation code blocks are consecutive in the first code stream, or sequential.
- the first code block is located before at least two rate adaptation code blocks, and there are no other code blocks between the first code block and the at least two rate adaptation code blocks
- the second code block is After at least two rate adaptation code blocks, and there are no other code blocks between the second code block and the at least two rate adaptation code blocks, it should be understood that the at least two rate adaptation code blocks are also continuous or in sequence of.
- FIG. 14 a schematic diagram of the adjacent first code block, three rate adaptation code blocks and the second code block is shown.
- the first code block stream is obtained, and a specific implementation manner may be: a code block stream read from a cache.
- the reading method may be reading according to the first-in, first-out rule. Further optionally, a code block stream of a preset length is read each time.
- the buffer waterline state can be set in the buffer corresponding to the receiving port, and when the current data stream enters the buffer at a too fast rate, causing the current buffer data to be higher than the watermark that has been set, determine the existing rate.
- Adaptation requirements The rate adaptation code block needs to be deleted from the first code stream to reduce the data inflow rate.
- the adjacent first code block, the at least two rate adaptation code blocks, and the second code block may be code blocks at any position in the first code block stream, such as the first code block, at least Both rate adaptation code blocks and the second code block are in the first message, or the first code block is in the first message and at least two rate adaptation code blocks and the second code block are in the first message
- the following frame gap, or the first code block and at least two rate adaptation code blocks are located in the frame gap before the first packet, and the second code block is located in the first packet.
- the judgment position for judging whether the code block relationship between the first code block and the second code block satisfies the preset condition may be any position in the first code block stream.
- a possible design is to start from the first code block of the first code block stream, and judge backwards in sequence according to the code block sequence, and the judgment position traverses all code block positions in the first code block stream.
- the code block after the rate adaptation code block is used as the second code block, and then it is judged whether the current first code block and the current second code block meet the preset conditions;
- the first code block take the third code block as the first code block, and determine whether there are at least two rate adaptation code blocks after the first code block, and if so, determine whether the at least two rate adaptation code blocks exist after the first code block.
- the code block after the rate adaptation code block is used as the second code block, and then it is judged whether the current first code block and the current second code block meet the preset conditions;
- the judgment can also start from other positions of the first code block stream, such as starting from the middle position of the first code block stream, and judge forward and backward respectively, or It starts from the last code block of the first code block stream, and judges forward in sequence, etc., which is not limited here.
- the adjacent first code block and the second code block may be adjacent code blocks at preset positions in the first code block stream.
- the adjacent first code block and the second code block are two adjacent code blocks located in the frame gap position in the first code block stream.
- the first code block may be a T code block or a code block after the T code block, where the T code block is an end-of-frame code block
- the second code block may be an S code block or a code block before the S code block.
- the S code block is a frame start code block.
- the judgment position for judging whether the code block relationship between the first code block and the second code block satisfies the preset condition may be any position in the IPG of the first code block stream.
- a possible design is to detect the type of each code block in the first code block stream in sequence according to the code block sequence.
- the legal code block sequence is the sequence of repeated SDDDDDTC SDDDDDTC, as shown in After a T code block (that is, the last code block of a message is detected, or the start code block of a certain IPG is detected), from any T code block (that is, the position of the last code block of the message) , or the start code block of the IPG), and judge backwards in the order of the code blocks until the S code block (that is, the position of the first code block of the next message, or until the end code block of the IPG) .
- the T code block of the first packet in the first code block stream is the m th code block in the first code block stream
- the second packet is the n th code block in the first code block stream. , where n>m.
- judging whether the code block relationship between the first code block and the second code block satisfies the preset condition may include:
- Detect the type of each code block in the first code block stream in turn according to the code block sequence.
- the code block type of the mth code block is identified, it is determined that the mth code block is a T code block, and the first code block stream The m-th code block in is used as the first code block, and then it is judged whether there are at least two rate adaptation code blocks after the first code block;
- execute 1304; or re-determine the first code block take the m+1 th code block as the first code block, and then judge whether there are at least two rate adaptation code blocks after the first code block;
- the judgment can also start from other positions of the IPG, such as the middle position of the IPG, and judge forward and backward respectively, and go forward to the T code block. Then to the S code block; or starting from the first code block (ie the S code block) after the end position of the IPG, and then judge forward in turn, until the first code block of the IPG (ie the T code block), etc.
- positions of the IPG such as the middle position of the IPG, and judge forward and backward respectively, and go forward to the T code block.
- the S code block or starting from the first code block (ie the S code block) after the end position of the IPG, and then judge forward in turn, until the first code block of the IPG (ie the T code block), etc.
- the preset position may also be other positions, for example, the preset position may be a part of the IPG, or the preset position whose coverage is larger than the IPG, etc., which is not limited here.
- the detected code block if it does not conform to the legal code block sequence, it can be replaced with an E code block for processing, or it can be handed over to the sending node or the receiving node for processing.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- the specific judgment methods include but are not limited to the following two: The first code block is judged, and then the second code block is judged; in the second type, the first code block and the second code block are judged at the same time.
- the first code block is judged, and then the second code block is judged; in the second type, the first code block and the second code block are judged at the same time.
- the above S1302 is to judge whether the code block relationship between the first code block and the second code block satisfies a preset condition when there is a rate adaptation requirement.
- the judgment can also be performed when there is no rate adaptation requirement (that is, the code block relationship between the first code block and the second code block can be always judged after the first code block stream is acquired. Whether the preset condition is met), when the preset condition is not met and there is a rate adaptation requirement, perform S1303 again.
- the PCS decode at the receiving end is interpreted as a combination of erroneous code block streams, such as T and T, T and D, T and E, E and S, etc.
- the first code block and the second code block are any of the following code block relationships: ⁇ T,T ⁇ , ⁇ T,D ⁇ , ⁇ T,E ⁇ , ⁇ E,S ⁇ , ⁇ D, S ⁇ , after deletion, at least one rate adaptation code block should be reserved between the first code block and the second code block to avoid ⁇ T,T ⁇ , ⁇ T,D ⁇ , ⁇ T,E ⁇ , ⁇ E,S ⁇ , ⁇ D,S ⁇ and other combinations.
- the first code block and the second code block that satisfy the preset condition if all rate adaptation code blocks between the first code block and the second code block that satisfy the preset condition are deleted, it will also cause the first code block to be deleted.
- a code block is adjacent to the second code block, but there will not be a combination of code block streams that cause adjacent packets to be interpreted as errors by the PCS decode at the receiving end. For example, T and T, T and D, T and T do not appear. Combinations of E, E and S etc.
- first code block and the second code block are not any of ⁇ T,T ⁇ , ⁇ T,D ⁇ , ⁇ T,E ⁇ , ⁇ E,S ⁇ , ⁇ D,S ⁇ , or the The first code block and the second code block are ⁇ T,I ⁇ , ⁇ T,S ⁇ , ⁇ I,I ⁇ , ⁇ O,I ⁇ , ⁇ I,O ⁇ , ⁇ I,S ⁇ , ⁇ O,S ⁇ , any of ⁇ O,O ⁇ , then there will be no ⁇ T,T ⁇ ,D ⁇ between the first code block and the second code block after deletion, regardless of whether the rate adaptation code block is reserved or not. , ⁇ T,E ⁇ , ⁇ E,S ⁇ and other combinations.
- rate adaptation code blocks may include IDLE code blocks.
- IDLE code blocks may include IDLE code blocks.
- custom code block for adjusting the rate may also be included, which is not limited here.
- deleting at least one rate adaptation code block between the first code block and the second code block may specifically include: according to the rate deviation between the receiving port and the transmitting port, determining that the first code block and the second code block need to be used in the first code block and the second code block.
- the deletion rate is appropriate when the rate adaptation is required.
- allocating code blocks avoid the combination of these code block relationships as much as possible, which can ensure that the receiving side's interpretation of received packets is not affected by rate adaptation, and can improve the reliability of rate adaptation.
- the related embodiment shown in FIG. 13 describes that in the scenario where the receiving port rate needs to be reduced, when there are multiple rate adaptation code blocks between the first code block and the second code block, the rate adaptation code block with the granularity of the code block is used. match method.
- the following describes a rate adaptation method using code blocks as granularity when there is only one rate adaptation code block between the first code block and the second code block in a scenario where the rate of the receiving port needs to be reduced.
- FIG. 15 it is a flowchart of another rate adaptation method provided by this embodiment of the present application.
- the method can be applied to the network architecture shown in FIG. 11. Specifically, the method can be executed by an intermediate node or a receiving node, or Other nodes need to perform rate adaptation. Methods include:
- the PCS decode at the receiving end is interpreted as a combination of erroneous code block streams, such as T and T, T and D, T and E, E and S, etc.
- the first code block and the second code block are any of the following code block relationships: ⁇ T,T ⁇ , ⁇ T,D ⁇ , ⁇ T,E ⁇ , ⁇ E,S ⁇ , the rate adaptation code block between the first code block and the second code block cannot be deleted to avoid ⁇ T,T ⁇ , ⁇ T,D ⁇ , ⁇ T,E ⁇ , ⁇ E,S ⁇ and other combinations.
- the rate adaptation code block between the first code block and the second code block that meets the preset condition is deleted, it will also cause the first code block to be deleted.
- the code block is adjacent to the second code block, but there will not be a combination of code block streams that cause adjacent packets to be interpreted as errors by the PCS decode at the receiving end, such as T and T, T and D, T and E will not appear , E and S combinations.
- the rate adaptation code block between the first code block and the second code block can be deleted.
- rate adaptation code blocks may include IDLE code blocks.
- IDLE code blocks may include IDLE code blocks.
- custom code block for adjusting the rate may also be included, which is not limited here.
- FIGS. 11 to 15 introduce rate adaptation schemes with code blocks as an example. Based on the same technical concept, the embodiments of the present application also provide rate adaptation schemes with characters as an example.
- FIG. 16 a flowchart of another rate adaptation method provided in this embodiment of the present application, the method may be applied to the network architecture shown in FIG. 11 , and the method may be specifically performed by an intermediate node or a receiving node, or Other nodes need to perform rate adaptation.
- Methods include:
- the specific implementation manner of the first code block and the second code block may refer to the specific implementation manner of the first code block and the second code block in S1201 above, which will not be repeated here.
- the method before acquiring the first character stream, the method further includes: acquiring a first code block stream, where the first code block stream includes adjacent first code blocks and second code blocks; decoding the first code block stream , to obtain the first character stream.
- the code block format and code block order can also be checked on the first code block stream. Then, the code blocks whose code block format and/or code block sequence do not meet the requirements are replaced with E code blocks to obtain the error-corrected first code block stream. After that, the error-corrected first code block stream is decoded to obtain a first character stream.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- decoding the error-corrected first code block stream includes: decoding other code blocks except the preset code block in the error-corrected first code block stream, where the preset code block may be Is the O code block, or other custom code blocks.
- the preset code block is a code block that appears in MTN but has not yet appeared in Ethernet. In this way, the correct code block can be prevented from being mistakenly (eg, the O code block) is treated as an incorrect code block, and the OAM information in the O code block can be avoided from being lost.
- the rate adaptation code block includes an IDLE code block, but other possibilities are not excluded, for example, a self-defined code block for adjusting the rate may also be included, which is not limited here.
- the characters corresponding to the rate adaptation code block include IDLE characters, but other possibilities are not excluded, such as custom characters used for rate adjustment, which are not limited here.
- the following rate adaptation characters take IDLE characters as an example, and the IDLE characters are inserted as a group of 8 consecutive DILE characters, and a group of DILE characters corresponds to an IDLE code block.
- a character corresponding to at least one rate adaptation code block is inserted between the character corresponding to the first code block and the multiple characters corresponding to the second code block, including but not limited to the following implementations:
- the first code block is a T7 code block (the last line in Figure 2, the corresponding character is "DDDDDDDT", and the block type is 0xFF), and the second code block is an S code block (the 10th code block from the bottom in Figure 2, corresponding to The character is "SDDDDDDD” and the block type is 0x78), then insert at least one character corresponding to the rate adaptation code block after the character "T" of the T7 code block and before the character "S" of the S code block, such as N*8 IDLE characters, where every 8 IDLE characters corresponds to an IDLE code block, and N is a positive integer greater than 1.
- At least one IDLE code block corresponding to the second code block can be inserted at any position after the last non-IDLE character of the first code block and before the first character of the second code block. character of. In other words, IDLE characters can be inserted at the position of the last few IDLE characters of the first code block.
- the character combination formed after inserting the IDLE character is the same as the last character corresponding to the first code block.
- the character combination formed by inserting the IDLE character is the same, so it is equivalent to the first character after the last character corresponding to the first code block and the first character corresponding to the second code block. Insert IDLE characters before.
- the first code block is a T4 code block (the 4th row from the bottom in Figure 2, the block type is 0xCC), and the second code block is an S code block (the 10th row from the bottom in Figure 2, the block type is 0x78), for convenience Expression, this article uses "I” to represent the IDLE character, then the first code block, the corresponding character is "DDDDTIII", the second code block, the corresponding character is "SDDDDDDD, then there are the following ways to insert ILDE characters:
- the first character stream after the IDLE character is inserted is also encoded to form a second code block stream.
- the code block stream finally generated in this way is consistent with the effect of the code block stream formed after the rate adaptation code block is inserted in the embodiment shown in FIG. 12 .
- the related embodiment shown in FIG. 16 introduces a rate adaptation method with a character as the granularity in a scenario where the rate of a receiving port needs to be increased.
- the following describes the rate adaptation method with character as the granularity in the scenario where the rate of the receiving port needs to be reduced.
- FIG. 17 it is a flowchart of another rate adaptation method provided in this embodiment of the present application.
- the method can be applied to the network architecture shown in FIG. 11 , and the method can be specifically executed by an intermediate node or a receiving node, or Other nodes need to perform rate adaptation.
- Methods include:
- the characters corresponding to the adjacent first code blocks, the characters corresponding to the at least two rate adaptation code blocks, and the characters corresponding to the second code blocks refer to the adjacent first code blocks, at least two rate adaptation code blocks.
- the difference is only that there is a difference between the character corresponding to the first code block and the character corresponding to the second code block. Characters corresponding to at least two rate adaptation code blocks.
- the specific implementation manner of S1703 is similar to the above-mentioned S1303, the only difference is that the deletion is performed in a character manner. Specifically, after all rate adaptation characters between the first code block and the second code block that do not meet the preset conditions are deleted, and the deleted first character stream is re-encoded, the first code block and the second code block will be re-encoded.
- the two code blocks are adjacent, and there may be combinations of code block streams that cause adjacent packets to be interpreted as errors by the PCS decode at the receiving end, such as combinations of T and T, T and D, T and E, and E and S. Therefore, it is necessary to reserve at least one character corresponding to the rate adaptation code block, so as to prevent the first code block and the second code block from being adjacent to each other after re-encoding.
- S1704 is similar to the above-mentioned S1304, the only difference is that the deletion is performed in a character manner. Specifically, after all rate adaptation code blocks between the first code block and the second code block that satisfy the preset conditions are deleted, and the deleted first character stream is re-encoded, the first code block and the second code block will be re-encoded. The two code blocks are adjacent, but there will not be a combination of code block streams that cause adjacent packets to be interpreted as errors by the PCS decode at the receiving end, such as T and T, T and D, T and E, E and S will not appear. Therefore, after deletion, there may be no characters corresponding to the rate adaptation code block or characters corresponding to the rate adaptation code block between the characters corresponding to the first code block and the characters corresponding to the second code block.
- the rate adaptation code block includes an IDLE code block, but other possibilities are not excluded, for example, a self-defined code block for adjusting the rate may also be included, which is not limited here.
- the characters corresponding to the rate adaptation code block include IDLE characters, but other possibilities are not excluded, such as custom characters used for rate adjustment, which are not limited here.
- the following text takes IDLE characters as an example, and delete characters are deleted by a group of 8 consecutive DILE characters (8 DILE characters correspond to one IDLE code block).
- the character corresponding to at least one rate adaptation code block is deleted between the character corresponding to the first code block and the multiple characters corresponding to the second code block, including but not limited to the following implementations:
- the character corresponding to at least one rate adaptation code block is deleted among the multiple first characters corresponding to the second code block.
- the first character stream includes "DDDDDDTIIIIIIIIIIIIISDDDDDDD", wherein the first code block is a T7 code block, corresponding to the character "DDDDDDDT", and the second code block is an S code block, corresponding to the character "SDDDDDDD”, then the T7 code block can be After the character "T7", delete at least one character corresponding to the rate adaptation code block before the character "S0" of the S code block, such as deleting ""IIIIIIIIIIIIIIII"", the character combination formed by the deleted characters is "DDDDDTSDDDDDDD".
- At least one IDLE code block corresponding to any position can be deleted after the last non-IDLE character of the first code block and before the first character of the second code block. character of. In other words, IDLE characters can be deleted at the positions of the last few IDLE characters of the first code block.
- the character combination formed after deleting the IDLE character is the same as the last character corresponding to the first code block.
- the character combination formed by deleting the IDLE character is the same, so it is equivalent to after the last character corresponding to the first code block and the first character corresponding to the second code block. Remove the IDLE character before.
- the first character stream includes "DDDDTIIIIIIIIIIIIIIIISDDDDDDD", where the first code block is a T4 code block, corresponding to the character "DDDDTIII”, and the second code block is an S code block, corresponding to the character "SDDDDDDD”, the following types of deletions of ILDE are possible.
- Character way :
- the first character stream after the IDLE characters are deleted is also encoded to form a second code block stream.
- the code block stream finally generated in this way is consistent with the effect of the code block stream formed after the rate adaptation code block is deleted in the embodiment shown in FIG. 13 .
- the related embodiment shown in FIG. 17 describes the rate adaptation with the granularity of characters when there are multiple rate adaptation code blocks between the first code block and the second code block in a scenario where the receiving port rate needs to be reduced method.
- the following describes a rate adaptation method using characters as a granularity when there is only one rate adaptation code block between the first code block and the second code block in a scenario where the receiving port rate needs to be reduced.
- FIG. 18 it is a flowchart of another rate adaptation method provided by this embodiment of the present application.
- the method can be applied to the network architecture shown in FIG. 11 , and the method can be specifically executed by an intermediate node or a receiving node, or Other nodes need to perform rate adaptation.
- Methods include:
- S1803 is similar to the above-mentioned S1503, the only difference is that the deletion is performed in a character manner.
- S1803 is similar to the above-mentioned S1703, except that there is only one character corresponding to the rate adaptation code block between the character corresponding to the first code block and the character corresponding to the second code block.
- the characters corresponding to at least one rate adaptation code block should be retained, that is, the characters corresponding to the rate adaptation code blocks cannot be deleted.
- the characters corresponding to the code block can be deleted, so the characters corresponding to the rate adaptation code block can be deleted.
- the rate adaptation characters between the characters corresponding to the first code block and the characters corresponding to the second code block are deleted, the deleted If a character stream is re-encoded, the first code block and the second code block will be adjacent, and there may be a combination of code block streams that cause adjacent packets to be interpreted as errors by the PCS decode at the receiving end, such as T and T, Combinations of T and D, T and E, E and S, etc.
- the first code block and the second code block are any of the following code block relationships: ⁇ T,T ⁇ , ⁇ T,D ⁇ , ⁇ T,E ⁇ , ⁇ E,S ⁇ , the rate adaptation characters between the characters corresponding to the first code block and the characters corresponding to the second code block cannot be deleted to avoid the occurrence of ⁇ T,T ⁇ , ⁇ T,D ⁇ , ⁇ T,E ⁇ , ⁇ E,S ⁇ and other combinations.
- the rate adaptation character between the character corresponding to the first code block and the character corresponding to the second code block can be delete.
- the first character stream after the IDLE characters are deleted is also encoded to form a second code block stream.
- the code block stream finally generated in this way is consistent with the effect of the code block stream formed after the rate adaptation code block is deleted in the embodiment shown in FIG. 15 .
- an embodiment of the present application further provides a rate adaptation apparatus 1900, and the apparatus 1900 includes:
- an obtaining unit 1901 configured to obtain a first code block stream, where the first code block stream includes adjacent first code blocks and second code blocks;
- a processing unit 1902 configured to determine whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the predetermined condition; When the preset condition is satisfied and there is a rate adaptation requirement, at least one rate adaptation code block is inserted between the first code block and the second code block.
- the first code block is a T code block or a code block after the T code block, wherein the T code block is an end-of-frame code block;
- the second code block is an S code block or a code block preceding the S code block, wherein the S code block is a frame start code block.
- the preset conditions include:
- the code block relationship of the first code block and the second code block is not any of the following code block relationships: T code block and T code block, T code block and D code block, T code block and E code blocks, D-code blocks and S-code blocks, E-code blocks and S-code blocks; and/or,
- the code block relationship between the first code block and the second code block is any one of the following code block relationships: a T code block and a frame gap IPG code block, an IPG code block and an S code block, a T code block and S code block, IPG code block and IPG code block; wherein, the IPG code block includes one or more of idle IDLE code block, O code block, E code block or D code block.
- the processing unit 1902 when judging whether the code block relationship between the first code block and the second code block satisfies the preset condition, is specifically configured to:
- the code block When any code block in the frame gap is detected, the code block is used as the first code block, and the adjacent code block after the code block is used as the second code block to determine the first code block. Whether the code block relationship between the block and the second code block satisfies the preset condition.
- processing unit 1902 is further configured to: decode the first code block stream before inserting at least one rate adaptation code block between the first code block and the second code block, get the first character stream;
- the processing unit 1902 is specifically configured to:
- a character corresponding to at least one rate adaptation code block is inserted between the character corresponding to the first code block and the character corresponding to the second code block.
- processing unit 1902 is further configured to:
- processing unit 1902 when the processing unit 1902 decodes the first code block stream, it is specifically configured to:
- Code blocks other than preset code blocks are decoded, wherein the preset code blocks include O code blocks.
- processing unit 1902 is further configured to:
- the characters corresponding to the at least one rate adaptation code block are inserted.
- the obtained character stream is encoded to obtain a second code block stream; the preset code block is inserted into the second code block stream.
- an embodiment of the present application further provides a rate adaptation apparatus 2000, including:
- an obtaining unit 2001 configured to obtain a first code block stream, where the first code block stream includes adjacent first code blocks, at least two rate adaptation code blocks and a second code block;
- a processing unit 2002 configured to determine whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block does not satisfy When the preset condition exists and there is a rate adaptation requirement, at least one rate adaptation code block in the at least two rate adaptation code blocks is deleted, and after deletion, the first code block and the second code block are deleted.
- the interval includes at least one rate adaptation code block.
- the first code block is a T code block or a code block after the T code block, wherein the T code block is an end-of-frame code block;
- the second code block is an S code block or a code block preceding the S code block, wherein the S code block is a frame start code block.
- the preset conditions include:
- the code block relationship of the first code block and the second code block is not any of the following code block relationships: T code block and T code block, T code block and D code block, T code block and E code blocks, D-code blocks and S-code blocks, E-code blocks and S-code blocks; and/or,
- the code block relationship between the first code block and the second code block is any one of the following code block relationships: a T code block and a frame gap IPG code block, an IPG code block and an S code block, a T code block and S code block, IPG code block and IPG code block; wherein, the IPG code block includes one or more of idle IDLE code block, O code block, E code block or D code block.
- the processing unit 2002 when judging whether the code block relationship between the first code block and the second code block satisfies a preset condition, is specifically configured to:
- any code block in the frame gap When any code block in the frame gap is detected, use the code block as the first code block, and use the code block after the code block and spaced from the code block by at least two rate adaptation code blocks
- the code block is regarded as the second code block, and it is judged whether the code block relationship between the first code block and the second code block satisfies the preset condition.
- processing unit 2002 is further configured to: before deleting at least one rate adaptation code block in the at least two rate adaptation code blocks, decode the first code block stream to obtain the first code block stream. character stream;
- the processing unit 2002 is specifically configured to: delete at least one of the characters corresponding to the at least two rate adaptation code blocks The character corresponding to the rate adaptation code block.
- processing unit 2002 is further configured to:
- the processing unit 2002 when the processing unit 2002 decodes the first code block stream, it is specifically configured to: decode other code blocks except the preset code block, wherein the preset code block includes 0 code block.
- processing unit 2002 is further configured to:
- the character stream obtained after deleting the character corresponding to the at least one rate adaptation code block is performed. encoding to obtain a third code block stream; inserting the preset code block into the second code block stream.
- processing unit 2002 is further configured to:
- At least one rate adaptation code block in the at least two rate adaptation code blocks is deleted, and after deletion, all rate adaptation code blocks are deleted. There is no rate adaptation code block or at least one rate adaptation code block is included between the first code block and the second code block.
- an embodiment of the present application further provides a rate adaptation apparatus 2100, and the apparatus 2100 includes:
- an obtaining unit 2101 configured to obtain a first code block stream, where the first code block stream includes adjacent first code blocks, at least two rate adaptation code blocks, and second code blocks;
- the processing unit 2102 is configured to determine whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the predetermined condition; When the preset condition exists and there is a rate adaptation requirement, at least one rate adaptation code block in the at least two rate adaptation code blocks is deleted, and after deletion, the space between the first code block and the second code block is deleted. There is no rate adaptation code block or at least one rate adaptation code block is included.
- the first code block is a T code block or a code block after the T code block, where the T code block is an end-of-frame code block; the second code block is an S code block or before the S code block.
- the preset condition includes: the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block, T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block; and/or, the code block relationship between the first code block and the second code block is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein, the IPG code block
- the code blocks include one or more of idle IDLE code blocks, O code blocks, E code blocks, or D code blocks.
- the processing unit 2102 is specifically configured to: sequentially detect the first code block according to the code block sequence. The type of each code block in the block stream; when any code block in the frame gap is detected, the code block is used as the first code block, and the code block after the code block and the code block is used as the first code block.
- a code block with a block interval of at least two rate adaptation code blocks is used as the second code block, and it is judged whether the code block relationship between the first code block and the second code block satisfies the preset condition.
- the processing unit 2102 is further configured to: before deleting at least one rate adaptation code block in the at least two rate adaptation code blocks, decode the first code block stream to obtain the first code block stream. character stream; deleting at least one rate adaptation code block in the at least two rate adaptation code blocks includes: deleting at least one rate adaptation code block corresponding to the characters corresponding to the at least two rate adaptation code blocks character of.
- the processing unit 2102 is further configured to: before decoding the first code block stream, check the code block format and code block sequence on the first code block stream, if there is a code block format And/or the code block sequence does not conform to the specified code block, the code block whose code block format and/or code block sequence does not conform to the specified code block is replaced with an E code block.
- E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- the processing unit 2102 when the processing unit 2102 decodes the first code block stream, it is specifically configured to: decode other code blocks except a preset code block, where the preset code block includes an O code piece.
- the processing unit 2102 is further configured to: after deleting the character corresponding to at least one rate adaptation code block among the characters corresponding to the at least two rate adaptation code blocks, delete the character corresponding to the at least one rate adaptation code block.
- the character stream obtained after matching the character corresponding to the code block is encoded to obtain a third code block stream; and the preset code block is inserted into the second code block stream.
- an embodiment of the present application further provides a rate adaptation apparatus 2200, and the apparatus 2200 includes:
- an obtaining unit 2201 configured to obtain a first code block stream, where the first code block stream includes adjacent first code blocks, rate adaptation code blocks and second code blocks;
- a processing unit 2202 configured to determine whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the predetermined condition; When the preset conditions are met and there is a rate adaptation requirement, the rate adaptation code block is deleted.
- the first code block is a T code block or a code block after the T code block, where the T code block is an end-of-frame code block; the second code block is an S code block or before the S code block.
- the preset condition includes: the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block, T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block; and/or, the code block relationship between the first code block and the second code block is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein, the IPG code block
- the code blocks include one or more of idle IDLE code blocks, O code blocks, E code blocks, or D code blocks.
- the processing unit 2202 is specifically configured to: sequentially detect the first code according to the code block sequence. The type of each code block in the block stream; when any code block in the frame gap is detected, the code block is used as the first code block, and the code block after the code block and the code block is used as the first code block. A code block at a block interval of one rate adaptation code block is used as the second code block, and it is judged whether the code block relationship between the first code block and the second code block satisfies the preset condition.
- the processing unit 2202 is further configured to: before deleting the rate adaptation code block, decode the first code block stream to obtain a first character stream; delete the rate adaptation code block, Including: deleting the character corresponding to the rate adaptation code block.
- the processing unit 2202 is further configured to: before decoding the first code block stream, check the code block format and code block sequence on the first code block stream, if there is a code block format And/or the code block sequence does not conform to the specified code block, the code block whose code block format and/or code block sequence does not conform to the specified code block is replaced with an E code block.
- E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- the processing unit 2202 when the processing unit 2202 decodes the first code block stream, it is specifically configured to: decode other code blocks except a preset code block, where the preset code block includes an O code piece.
- the processing unit 2202 is further configured to: after deleting the character corresponding to the rate adaptation code block, encode the character stream obtained after deleting the character corresponding to the rate adaptation code block, to obtain the first character stream. A stream of three code blocks; inserting the preset code block in the second stream of code blocks.
- an embodiment of the present application further provides a rate adaptation apparatus 2300, the apparatus 2300 includes:
- Obtaining unit 2301 is used to obtain a first character stream, the first character stream including the characters corresponding to the adjacent first code blocks and the characters corresponding to the second code blocks;
- a processing unit 2302 configured to determine whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the preset condition and exists When rate adaptation is required, insert at least one character corresponding to the rate adaptation code block between the character corresponding to the first code block and the character corresponding to the second code block.
- the obtaining unit 2301 is further configured to: before obtaining the first character stream, obtain a first code block stream, where the first code block stream includes adjacent first code blocks and second code blocks;
- the first code block stream is checked for the code block format and code block order, and if there is a code block whose code block format and/or code block order does not conform to the regulations, the code block format and/or code block order is not in accordance with the regulations.
- the code blocks that meet the requirements are replaced with E code blocks to obtain an error-corrected first code block stream; the error-corrected first code block stream is decoded to obtain a first character stream.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- the obtaining unit 2301 decodes the error-corrected first code block stream, and is specifically configured to: decode other code blocks except the preset code blocks in the error-corrected first code block stream. Code blocks are decoded, wherein the preset code blocks include O code blocks.
- the first code block is a T code block or a code block after the T code block, where the T code block is an end-of-frame code block; the second code block is an S code block or before the S code block.
- the preset condition includes: the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block, T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block; and/or, the code block relationship between the first code block and the second code block is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein, the IPG code block
- the code blocks include one or more of idle IDLE code blocks, O code blocks, E code blocks, or D code blocks.
- an embodiment of the present application further provides a rate adaptation apparatus 2400, and the apparatus 2400 includes:
- Obtaining unit 2401 configured to obtain a first character stream, where the first character stream includes characters corresponding to adjacent first code blocks, characters corresponding to at least two rate adaptation code blocks, and characters corresponding to second code blocks;
- a processing unit 2402 configured to determine whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block does not satisfy When the preset condition exists and there is a rate adaptation requirement, delete the character corresponding to at least one rate adaptation code block in the characters corresponding to the at least two rate adaptation code blocks, and delete the character corresponding to the first code block.
- a character corresponding to at least one rate adaptation code block is included between the character and the character corresponding to the second code block.
- the obtaining unit 2401 is further configured to: before obtaining the first character stream, obtain a first code block stream, where the first code block stream includes adjacent first code blocks, at least two rate adaptations code block and second code block; check the code block format and code block order on the first code block stream, if there is a code block whose code block format and/or code block order do not meet the requirements, then the code block
- the code blocks whose block format and/or code block sequence do not meet the requirements are replaced with E code blocks to obtain the first code block stream after error correction; the first code block stream after error correction is decoded to obtain the first character flow.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- the obtaining unit 2401 when the obtaining unit 2401 decodes the error-corrected first code block stream, it is specifically configured to: decode the error-corrected first code block stream except for the preset code block. Other code blocks are decoded, wherein the preset code blocks include O code blocks.
- the first code block is a T code block or a code block after the T code block, where the T code block is an end-of-frame code block; the second code block is an S code block or before the S code block.
- the preset condition includes: the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block, T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block; and/or, the code block relationship between the first code block and the second code block is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein, the IPG code block
- the code blocks include one or more of idle IDLE code blocks, O code blocks, E code blocks, or D code blocks.
- an embodiment of the present application further provides a rate adaptation apparatus 2500, and the apparatus 2500 includes:
- an acquisition unit 2501 configured to acquire a first character stream, where the first character stream includes characters corresponding to adjacent first code blocks, characters corresponding to at least two rate adaptation code blocks, and characters corresponding to the second code block;
- the processing unit 2502 is configured to determine whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the predetermined condition; When the preset condition and there is a rate adaptation requirement, delete the character corresponding to at least one rate adaptation code block in the characters corresponding to the at least two rate adaptation code blocks, and delete the character corresponding to the first code block. There is no character corresponding to a rate adaptation code block among the characters corresponding to the second code block, or a character corresponding to at least one rate adaptation code block is included.
- the obtaining unit 2501 is further configured to: before obtaining the first character stream, obtain a first code block stream, where the first code block stream includes adjacent first code blocks, at least two rate adaptations code block and second code block; check the code block format and code block order on the first code block stream, if there is a code block whose code block format and/or code block order do not meet the requirements, then the code block The code blocks whose block format and/or code block sequence do not meet the requirements are replaced with E code blocks, and the first code block stream after error correction is obtained; the first code block stream after error correction is decoded to obtain the first character flow.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- the obtaining unit 2501 when the obtaining unit 2501 decodes the error-corrected first code block stream, it is specifically configured to: decode the error-corrected first code block stream except for the preset code blocks. Other code blocks are decoded, wherein the preset code blocks include O code blocks.
- the first code block is a T code block or a code block after the T code block, where the T code block is an end-of-frame code block; the second code block is an S code block or before the S code block.
- the preset condition includes: the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block, T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block; and/or, the code block relationship between the first code block and the second code block is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein, the IPG code block
- the code blocks include one or more of idle IDLE code blocks, O code blocks, E code blocks, or D code blocks.
- an embodiment of the present application further provides a rate adaptation apparatus 2600, and the apparatus 2600 includes:
- Obtaining unit 2601 configured to obtain a first character stream, where the first code block stream includes characters corresponding to adjacent first code blocks, characters corresponding to rate adaptation code blocks, and characters corresponding to second code blocks;
- a processing unit 2602 configured to determine whether the code block relationship between the first code block and the second code block satisfies a preset condition; when the code block relationship between the first code block and the second code block satisfies the predetermined condition; When the preset condition is met and there is a rate adaptation requirement, the character corresponding to the rate adaptation code block is deleted.
- the obtaining unit 2601 is further configured to: before obtaining the first character stream, obtain a first code block stream, where the first code block stream includes adjacent first code blocks, rate adaptation code blocks and second code block; check the code block format and code block order on the first code block stream, if there is a code block whose code block format and/or code block order does not meet the requirements, then the code block format and code block order /or a code block whose code block sequence does not meet the requirements is replaced with an E code block to obtain a first code block stream after error correction; decode the first code block stream after error correction to obtain a first character stream.
- the replacement with the E code block here is only an example and not a limitation. In actual implementation, it can also be replaced with other code blocks, such as self-defined code blocks.
- the obtaining unit 2601 when the obtaining unit 2601 decodes the error-corrected first code block stream, it is specifically configured to: decode the error-corrected first code block stream except for the preset code block. Other code blocks are decoded, wherein the preset code blocks include O code blocks.
- the first code block is a T code block or a code block after the T code block, where the T code block is an end-of-frame code block; the second code block is an S code block or before the S code block.
- the preset condition includes: the code block relationship between the first code block and the second code block is not any one of the following code block relationships: T code block and T code block, T code block and D code block, T code block and E code block, D code block and S code block, E code block and S code block; and/or, the code block relationship between the first code block and the second code block is any one of the following code block relationships: T code block and frame gap IPG code block, IPG code block and S code block, T code block and S code block, IPG code block and IPG code block; wherein, the IPG code block
- the code blocks include one or more of idle IDLE code blocks, O code blocks, E code blocks, or D code blocks.
- an embodiment of the present application further provides a network device 2700, including:
- At least one processor 2701 causes the apparatus to execute the method described in the embodiment shown in FIG. 12 , 13 , 15 , 16 , 17 or 18 by executing the instructions stored in the memory 2702 .
- the network device 2700 further includes a communication interface 2703 that is communicatively connected to the at least one processor 2701 .
- the memory 2702 is located outside the network device 2700 .
- the network device 2700 includes the memory 2702 , the memory 2702 is connected to the at least one processor 2701 , and the memory 2702 stores instructions executable by the at least one processor 2701 .
- the memory 2702 is located outside the network device 2700 .
- the network device 2700 includes the memory 2702 , the memory 2702 is connected to the at least one processor 2701 , and the memory 2702 stores instructions executable by the at least one processor 2701 .
- Figure 27 shows with dashed lines that the memory 2702 and the communication interface 2703 are optional to the network device 2700.
- processor 2701 and the memory 2702 may be coupled through an interface circuit, or may be integrated together, which is not limited here.
- the specific connection medium between the processor 2701, the memory 2702, and the communication interface 2703 is not limited in the embodiments of the present application.
- the processor 2701, the memory 2702, and the communication interface 2703 are connected through a bus 2704 in FIG. 27.
- the bus is represented by a thick line in FIG. 27, and the connection between other components is only for illustration. Sexual descriptions are not intended to be limiting.
- the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is shown in FIG. 27, but it does not mean that there is only one bus or one type of bus.
- the processor mentioned in the embodiments of the present application may be implemented by hardware or software.
- the processor When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like.
- the processor When implemented in software, the processor may be a general-purpose processor implemented by reading software codes stored in memory.
- the processor may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC) , Off-the-shelf Programmable Gate Array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
- a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
- the memory mentioned in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
- the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically programmable read-only memory (Erasable PROM, EPROM). Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
- Volatile memory may be Random Access Memory (RAM), which acts as an external cache.
- RAM Static RAM
- DRAM Dynamic RAM
- SDRAM Synchronous DRAM
- SDRAM double data rate synchronous dynamic random access memory
- Double Data Eate SDRAM DDR SDRAM
- enhanced SDRAM ESDRAM
- synchronous link dynamic random access memory Synchlink DRAM, SLDRAM
- Direct Rambus RAM Direct Rambus RAM
- the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components
- the memory storage module
- memory described herein is intended to include, but not be limited to, these and any other suitable types of memory.
- the embodiments of the present application further provide a computer-readable storage medium, including a program or an instruction, when the program or instruction is run on a computer, such that as shown in FIG. 12 , 13 , 15 , 16 , 17 or 18 The method described in the illustrated embodiment is performed.
- an embodiment of the present application further provides a chip, which is coupled to a memory and used to read and execute program instructions stored in the memory, such that as shown in Figure 12, 13, 15, 16, 17 or The method described in the embodiment shown in 18 is performed.
- the embodiments of the present application also provide a computer program product, including instructions, which, when run on a computer, make the program as described in the embodiment shown in FIG. 12 , 13 , 15 , 16 , 17 or 18 . method is executed.
- the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
- 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 instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
- the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
- the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, from a website site, computer, server, or data center via Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.) means.
- the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
- the available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, digital versatile discs (DVDs)), or semiconductor media (eg, solid state disks (SSDs) ))Wait.
- magnetic media eg, floppy disks, hard disks, magnetic tapes
- optical media eg, digital versatile discs (DVDs)
- semiconductor media eg, solid state disks (SSDs)
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Detection And Prevention Of Errors In Transmission (AREA)
Abstract
本申请实施例涉及一种速率适配方法及装置。其中方法包括:当存在速率适配需求时,只在码块关系满足预设条件的两个相邻码块之间插入速率适配码块,或者只删除码块关系满足预设条件的两个码块之间的速率适配码块。这样,可以保证接收侧接收报文后对报文解读的正确性不受速率适配的影响,进而提高速率适配的可靠性。
Description
相关申请的交叉引用
本申请要求在2020年07月13日提交中国专利局、申请号为202010670874.3、申请名称为“一种速率适配方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及互联网技术领域,尤其涉及一种速率适配方法及装置。
城域传输网络(Metro Transport Network,MTN)是位于以太网的物理编码子层(Physical Coding Sublayer,PCS)之中的码块域中的网络层次,其数据处理粒度全部为码块。
在MTN中,数据在经过的发送节点、中间节点或接收节点时,均可能存在速率适配的需求。MTN在执行速率适配时,是以码块为粒度进行的,比如通过识别报文的边界,找到帧间隙(Inter Packet Gap,IPG)位置,在IPG位置进行空闲(IDLE)码块的增/删来实现速率的增加或降低。然而,这种方法是只要识别到尾(T)码块就开始进行IDLE码块的增/删,常常导致IDLE码块增/删位置附近报文在宿端被错误解读。
可见,现有技术中的速率适配方法会影响报文解读的正确性,存在可靠性低的问题。
发明内容
本申请实施例提供一种速率适配方法及装置,用于提高速率适配的可靠性。
第一方面,提供一种速率适配方法,包括:获取第一码块流,所述第一码块流包括相邻的第一码块和第二码块;判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,在所述第一码块和所述第二码块之间插入至少一个速率适配码块。
本申请实施例以码块为粒度进行速率适配时,只在码块关系满足预设条件的第一码块和第二码块之间插入速率适配码块,可以避开在可能引起报文接收解读出现错误的码块位置插入速率适配码块,进而可以保证接收侧(宿端)对接收到报文的解读不受到速率适配的影响。
一种可能的实施方式中,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。也即,在该帧间隙位置插入至少一个速率适配码块。
这样,可以避免在报文中间插入速率适配码块,进而避免对客户业务数据造成影响,进一步保证接收侧对报文的解读的准确性。
一种可能的实施方式中,所述预设条件可以有多种实现方式。
示例1、第一码块和第二码块的码块关系不是插入速率适配码块后会导致报文解读出错的码块关系。
比如,所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块。应理解,以上仅为预设条件的示例,而非限定。
方式2、第一码块和第二码块的码块关系是插入速率适配码块后不会导致报文解读出错的码块关系。
比如,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。应理解,以上仅为预设条件的示例,而非限定。
该实施方式,提供了多种具体的不能被插入速率适配码块的码块位置,以及多种具体的可以被插入速率适配码块的码块位置。这样在插入速率适配码块时,只需要避开不能被插入速率适配码块的码块位置进行速率适配码块的插入,和/或找到可以被插入速率适配码块的码块位置进行速率适配码块的插入,就可以很好地保证接收侧对第一码块流中的报文的解读不受到速率适配的影响,实现方式简单可靠。
一种可能的实施方式中,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件,包括:按照码块顺序依次检测所述第一码块流中每个码块的类型;当检测到帧间隙的任一码块后,将所述任一码块作为第一码块,将所述任一码块之后的相邻码块作为第二码块,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件。
该实施方式中,在找到帧间隙开始的位置时,才开始执行判断操作,可以提高速率适配的效率。
一种可能的实施方式中,在所述第一码块和所述第二码块之间插入至少一个速率适配码块之前,所述方法还包括:对所述第一码块流进行解码,获得第一字符流;在所述第一码块和所述第二码块之间插入至少一个速率适配码块,包括:在所述第一码块对应的字符和所述第二码块对应字符之间插入至少一个速率适配码块对应的字符。
该实施方式中,提供以字符为粒度进行速率适配时,只在码块关系满足预设条件的第一码块和第二码块对应的字符之间插入速率适配码块对应的字符,可以避开在可能引起报文接收解读出现错误的字符位置插入速率适配对应的字符,进而可以保证接收侧(宿端)对接收到报文的解读不受到速率适配的影响。
一种可能的实施方式中,在对所述第一码块流进行解码之前,所述方法还包括:对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
这样,可以尽可能地减少码流中出现会引起报文接收解读错误的码块组合。
一种可能的实施方式中,对所述第一码块流进行解码,包括:对除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
这样,可以避免正确的码块被误,如O码块,被认为错误的码块而被处理,避免损失O码块中的OAM信息。
一种可能的实施方式中,在所述第一码块对应的字符和所述第二码块对应字符之间插入至少一个速率适配码块对应的字符之后,还包括:对插入所述至少一个速率适配码块对 应的字符后所获得的字符流进行编码,获得第二码块流;在所述第二码块流中插入所述预设码块。
这样,可以避免丢失原码块流中的信息,进一步提高速率适配方案的可靠性。
第二方面,提供一种速率适配方法,包括:获取第一码块流,所述第一码块流包括相邻的第一码块、至少两个速率适配码块以及第二码块;判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系不满足所述预设条件且存在速率适配需求时,删除所述至少两个速率适配码块中的至少一个速率适配码块,删除后所述第一码块和所述第二码块之间包括至少一个速率适配码块。
本申请实施例以码块为粒度进行速率适配时,如果第一码块和第二码块的码块关系不满足预设条件,则在删除第一码块和第二码块之间的速率适配码块时,要保证删除后第一码块和第二码块之间包括至少一个速率适配码块,这样可以避免删除后第一码块和第二码块相邻,也即避免可能引起报文接收解读出现错误的码块组合出现,进而可以保证接收侧对接收到报文的解读不受到速率适配的影响,可以提高速率适配的可靠性。
一种可能的实施方式中,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
一种可能的实施方式中,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
一种可能的实施方式中,判断所述第一码块和所述第二码块的码块关系是否满足预设条件,包括:按照码块顺序依次检测所述第一码块流中每个码块的类型;当检测到帧间隙的任一码块后,将所述任一码块作为第一码块,将所述任一码块之后且与所述任一码块间隔至少两个速率适配码块的码块作为第二码块,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件。
一种可能的实施方式中,在删除所述至少两个速率适配码块中的至少一个速率适配码块之前,所述方法还包括:对所述第一码块流进行解码,获得第一字符流;删除所述至少两个速率适配码块中的至少一个速率适配码块,包括:删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符。
一种可能的实施方式中,在对所述第一码块流进行解码之前,所述方法还包括:对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
一种可能的实施方式中,对所述第一码块流进行解码,包括:对除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
一种可能的实施方式中,所述方法还包括:
当所述第一码块和所述第二码块的码块关系满足所述预设条件时,删除所述至少两个 速率适配码块中的至少一个速率适配码块,删除后所述第一码块和所述第二码块之间没有速率适配码块或包括至少一个速率适配码块。
一种可能的实施方式中,在删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符之后,还包括:对删除所述至少一个速率适配码块对应的字符之后所获得的字符流进行编码,获得第三码块流;在所述第二码块流中插入所述预设码块。
这样,可以避免丢失原码块流中的信息,进一步提高速率适配方案的可靠性。
第三方面,提供一种速率适配方法,包括:获取第一码块流,所述第一码块流包括相邻的第一码块、至少两个速率适配码块以及第二码块;判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,删除所述至少两个速率适配码块中的至少一个速率适配码块,删除后所述第一码块和所述第二码块之间没有速率适配码块或包括至少一个速率适配码块。
本申请实施例以码块为粒度进行速率适配时,如果识别到第一码块和第二码块的码块关系满足预设条件,则在删除第一码块和第二码块之间的速率适配码块时,可以将第一码块和第二码块之间的速率适配码块全部删除,也可以部分删除,而接收侧对接收到报文的解读不受到速率适配的影响,在保证速率适配的可靠性的同时,提高了删除速率适配码块的灵活性。
一种可能的实施方式中,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
一种可能的实施方式中,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
一种可能的实施方式中,判断所述第一码块和所述第二码块的码块关系是否满足预设条件,包括:按照码块顺序依次检测所述第一码块流中每个码块的类型;当检测到帧间隙的任一码块后,将所述任一码块作为第一码块,将所述任一码块之后且与所述任一码块间隔至少两个速率适配码块的码块作为第二码块,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件。
一种可能的实施方式中,在删除所述至少两个速率适配码块中的至少一个速率适配码块之前,所述方法还包括:对所述第一码块流进行解码,获得第一字符流;删除所述至少两个速率适配码块中的至少一个速率适配码块,包括:删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符。
一种可能的实施方式中,在对所述第一码块流进行解码之前,所述方法还包括:对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
一种可能的实施方式中,对所述第一码块流进行解码,包括:对除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
一种可能的实施方式中,在删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符之后,还包括:对删除所述至少一个速率适配码块对应的字符之后所获得的字符流进行编码,获得第三码块流;在所述第二码块流中插入所述预设码块。
第四方面,提供一种速率适配方法,包括:获取第一码块流,所述第一码块流包括相邻的第一码块、速率适配码块以及第二码块;判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,删除所述速率适配码块。
本申请实施例以码块为粒度进行速率适配时,如果第一码块和第二码块之间只有一个速率适配码块,那么只有在第一码块和第二码块的码块关系满足预设条件时才可以删除第一码块和第二码块之间的速率适配码块,这样可以避免删除后第一码块和第二码块相邻,也即避免可能引起报文接收解读出现错误的码块组合出现,进而可以保证接收侧对接收到报文的解读不受到速率适配的影响,提高了速率适配的可靠性。
一种可能的实施方式中,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
一种可能的实施方式中,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
一种可能的实施方式中,判断所述第一码块和所述第二码块的码块关系是否满足预设条件,包括:按照码块顺序依次检测所述第一码块流中每个码块的类型;当检测到帧间隙的任一码块后,将所述任一码块作为第一码块,将所述任一码块之后且与所述任一码块间隔一个速率适配码块的码块作为第二码块,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件。
一种可能的实施方式中,在删除所述速率适配码块之前,所述方法还包括:对所述第一码块流进行解码,获得第一字符流;删除所述速率适配码块,包括:删除所述速率适配码块对应的字符。
一种可能的实施方式中,在对所述第一码块流进行解码之前,所述方法还包括:对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
一种可能的实施方式中,对所述第一码块流进行解码,包括:对除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
一种可能的实施方式中,在删除所述速率适配码块对应的字符之后,还包括:对删除所述速率适配码块对应的字符之后所获得的字符流进行编码,获得第三码块流;在所述第 二码块流中插入所述预设码块。
第五方面,提供一种速率适配方法,包括:获取第一字符流,所述第一字符流包括相邻的第一码块对应的字符和第二码块对应的字符;当存在速率适配需求时,判断所述第一码块和第二码块的码块关系是否满足预设条件;当所述第一码块和第二码块的码块关系满足预设条件时,在所述第一码块对应的字符和所述第二码块对应的字符之间插入至少一个速率适配码块对应的字符。
本申请实施例以字符为粒度进行速率适配时,只在码块关系满足预设条件的第一码块和第二码块对应的字符之间插入速率适配码块对应的字符,继而可以避开在可能引起报文接收解读出现错误的字符位置插入速率适配字符,进而可以保证接收侧对接收到报文的解读不受到速率适配的影响,提高了速率适配的可靠性。
一种可能的实施方式中,在获取第一字符流之前,所述方法还包括:获取第一码块流,所述第一码块流包括相邻的第一码块和第二码块;对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块,获得纠错后的第一码块流;对所述纠错后的第一码块流进行解码,获得第一字符流。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
这样,可以尽可能地减少码流中出现会引起报文接收解读错误的码块组合。
一种可能的实施方式中,对所述纠错后的第一码块流进行解码,包括:对所述纠错后的第一码块流中除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
这样,可以避免正确的码块被误,如O码块,被认为错误的码块而被处理,避免损失O码块中的OAM信息。
一种可能的实施方式中,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
一种可能的实施方式中,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
应理解,以上仅为预设条件的示例,而非限定。
第六方面,提供一种速率适配方法,包括:获取第一字符流,所述第一字符流包括相邻的第一码块对应的字符、至少两个速率适配码块对应的字符和第二码块对应的字符;判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系不满足所述预设条件且存在速率适配需求时,删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符,删除后所述第一码块对应的字符和所述第二码块对应的字符之间包括至少一个速率适配码块对应的字符。
本申请实施例以字符为粒度进行速率适配时,如果第一码块和第二码块的码块关系不满足预设条件,则在删除第一码块对应的字符和第二码块对应的字符之间的速率适配码块对应的字符时,要保证删除后第一码块对应的字符和第二码块对应的字符之间包括至少一 个速率适配码块对应的字符,这样可以避免删除后第一码块对应的字符和第二码块对应的字符相邻,也即避免可能引起报文接收解读出现错误的码块组合出现,进而可以保证接收侧对接收到报文的解读不受到速率适配的影响,可以提高速率适配的可靠性。
一种可能的实施方式中,在获取第一字符流之前,所述方法还包括:获取第一码块流,所述第一码块流包括相邻的第一码块、至少两个速率适配码块和第二码块;对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块,获得纠错后的第一码块流;对所述纠错后的第一码块流进行解码,获得第一字符流。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
一种可能的实施方式中,对所述纠错后的第一码块流进行解码,包括:对所述纠错后的第一码块流中除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
一种可能的实施方式中,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
一种可能的实施方式中,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
第七方面,提供一种速率适配方法,包括:获取第一字符流,所述第一字符流包括相邻的第一码块对应的字符、至少两个速率适配码块对应的字符和第二码块对应的字符;判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符,删除后所述第一码块对应的字符和所述第二码块对应的字符之间没有速率适配码块对应的字符或包括至少一个速率适配码块对应的字符。
本申请实施例以字符为粒度进行速率适配时,如果识别到第一码块和第二码块的码块关系满足预设条件,则在删除第一码块对应的字符和第二码块对应的字符之间的速率适配码块对应的字符时,可以将第一码块对应的字符和第二码块对应的字符之间的速率适配码块对应的字符全部删除,也可以部分删除,而接收侧对接收到报文的解读不受到速率适配的影响,在保证速率适配的可靠性的同时,提高了删除速率适配码块的灵活性。
一种可能的实施方式中,在获取第一字符流之前,所述方法还包括:获取第一码块流,所述第一码块流包括相邻的第一码块、至少两个速率适配码块和第二码块;对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块,获得纠错后的第一码块流;对所述纠错后的第一码块流进行解码,获得第一字符流。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
一种可能的实施方式中,对所述纠错后的第一码块流进行解码,包括:对所述纠错后的第一码块流中除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
一种可能的实施方式中,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
一种可能的实施方式中,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
第八方面,提供一种速率适配方法,包括:获取第一字符流,所述第一码块流包括相邻的第一码块对应的字符、速率适配码块对应的字符以及第二码块对应的字符;判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,删除所述速率适配码块对应的字符。
本申请实施例以字符为粒度进行速率适配时,如果第一码块对应的字符和第二码块对应的字符之间只有一个速率适配码块对应的字符,那么只有在第一码块和第二码块的码块关系满足预设条件时才可以删除第一码块对应的字符和第二码块对应的字符之间的速率适配码块对应的字符,这样可以避免删除后第一码块对应的字符和第二码块对应的字符相邻,也即避免可能引起报文接收解读出现错误的码块组合出现,进而可以保证接收侧对接收到报文的解读不受到速率适配的影响,提高了速率适配的可靠性。
一种可能的实施方式中,在获取第一字符流之前,所述方法还包括:获取第一码块流,所述第一码块流包括相邻的第一码块、速率适配码块和第二码块;对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块,获得纠错后的第一码块流;对所述纠错后的第一码块流进行解码,获得第一字符流。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
一种可能的实施方式中,对所述纠错后的第一码块流进行解码,包括:对所述纠错后的第一码块流中除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
一种可能的实施方式中,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
一种可能的实施方式中,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
第九方面,提供一种速率适配装置,该装置可以是网络设备,或者可以是网络设备内部的芯片,该装置包括用于执行上述第一方面或第一方面任一种可能的实施方式中所述的方法的功能/模块。
示例的,该装置包括:
获取单元,用于获取第一码块流,所述第一码块流包括相邻的第一码块和第二码块;
处理单元,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,在所述第一码块和所述第二码块之间插入至少一个速率适配码块。
第十方面,提供一种速率适配装置,该装置可以是网络设备,或者可以是网络设备内部的芯片,该装置包括用于执行上述第二方面或第二方面任一种可能的实施方式中所述的方法的功能/模块。
示例的,该装置包括:
获取单元,用于获取第一码块流,所述第一码块流包括相邻的第一码块、至少两个速率适配码块以及第二码块;
处理单元,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系不满足所述预设条件且存在速率适配需求时,删除所述至少两个速率适配码块中的至少一个速率适配码块,删除后所述第一码块和所述第二码块之间包括至少一个速率适配码块。
第十一方面,提供一种速率适配装置,该装置可以是网络设备,或者可以是网络设备内部的芯片,该装置包括用于执行上述第三方面或第三方面任一种可能的实施方式中所述的方法的功能/模块。
示例的,该装置包括:
获取单元,用于获取第一码块流,所述第一码块流包括相邻的第一码块、至少两个速率适配码块以及第二码块;
处理单元,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,删除所述至少两个速率适配码块中的至少一个速率适配码块,删除后所述第一码块和所述第二码块之间没有速率适配码块或包括至少一个速率适配码块。
第十二方面,提供一种速率适配装置,该装置可以是网络设备,或者可以是网络设备内部的芯片,该装置包括用于执行上述第四方面或第四方面任一种可能的实施方式中所述的方法的功能/模块。
示例的,该装置包括:
获取单元,用于获取第一码块流,所述第一码块流包括相邻的第一码块、速率适配码块以及第二码块;
处理单元,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,删除所述速率适配码块。
第十三方面,提供一种速率适配装置,该装置可以是网络设备,或者可以是网络设备内部的芯片,该装置包括用于执行上述第五方面或第五方面任一种可能的实施方式中所述的方法的功能/模块。
示例的,该装置包括:
获取单元,用于获取第一字符流,所述第一字符流包括相邻的第一码块对应的字符和第二码块对应的字符;
处理单元,用于判断所述第一码块和第二码块的码块关系是否满足预设条件;当所述 第一码块和第二码块的码块关系满足预设条件且存在速率适配需求时,在所述第一码块对应的字符和所述第二码块对应的字符之间插入至少一个速率适配码块对应的字符。
第十四方面,提供一种速率适配装置,该装置可以是网络设备,或者可以是网络设备内部的芯片,该装置包括用于执行上述第六方面或第六方面任一种可能的实施方式中所述的方法的功能/模块。
示例的,该装置包括:
获取单元,用于获取第一字符流,所述第一字符流包括相邻的第一码块对应的字符、至少两个速率适配码块对应的字符和第二码块对应的字符;
处理单元,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系不满足所述预设条件且存在速率适配需求时,删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符,删除后所述第一码块对应的字符和所述第二码块对应的字符之间包括至少一个速率适配码块对应的字符。
第十五方面,提供一种速率适配装置,该装置可以是网络设备,或者可以是网络设备内部的芯片,该装置包括用于执行上述第七方面或第七方面任一种可能的实施方式中所述的方法的功能/模块。
示例的,该装置包括:
获取单元,用于获取第一字符流,所述第一字符流包括相邻的第一码块对应的字符、至少两个速率适配码块对应的字符和第二码块对应的字符;
处理单元,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符,删除后所述第一码块对应的字符和所述第二码块对应的字符之间没有速率适配码块对应的字符或包括至少一个速率适配码块对应的字符。
第十六方面,提供一种速率适配装置,该装置可以是网络设备,或者可以是网络设备内部的芯片,该装置包括用于执行上述第八方面或第八方面任一种可能的实施方式中所述的方法的功能/模块。
示例的,该装置包括:
获取单元,用于获取第一字符流,所述第一码块流包括相邻的第一码块对应的字符、速率适配码块对应的字符以及第二码块对应的字符;
处理单元,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,删除所述速率适配码块对应的字符。
第十七方面,提供一种网络设备,包括:至少一个处理器;所述至少一个处理器通过执行存储器存储的指令,使得所述装置执行如第一方面至第八方面中任一种可能的实现方式中所述方法。
可选的,所述存储器位于所述装置之外。
可选的,所述装置包括所述存储器,所述存储器与所述至少一个处理器相连,所述存储器存储有可被所述至少一个处理器执行的指令。
第十八方面,提供一种计算机可读存储介质,包括程序或指令,当所述程序或指令在 计算机上运行时,使得如第一方面至第八方面中任一种可能的实现方式中所述方法被执行。
第十九方面,提供一种芯片,所述芯片与存储器耦合,用于读取并执行所述存储器中存储的程序指令,使得如第一方面至第八方面中任一种可能的实现方式中所述方法被执行。
第二十方面,提供一种计算机程序产品,包括指令,当其在计算机上运行时,使得如第一方面至第八方面中任一种可能的实现方式中所述方法被执行。
图1为100GBASE-R以太网接口的结构示意图;
图2为64B/66B编码格式的码块的结构示意图;
图3为以太网速率适配的示意图;
图4为O码块的示意图;
图5A为合法码块顺序的示意图;
图5B为帧间隙(Inter Packet Gap,IPG)的示意图;
图6A为发送状态机的结构示意图;
图6B为接收状态机的结构示意图;
图7为城域传输网络(Metro Transport Network,MTN)的结构示意图;
图8为MTN与IEE 802.3模型的位置关系图;
图9为MTN业务流传输的网络示意图;
图10A至图10T为错误码块关系、以及在错误码块关系中进行速率适配后的结果示意图;
图11为本申请实施例适用的一种网络架构的示意图;
图12为本申请实施例提供的一种速率适配方法的流程图;
图13为本申请实施例提供的另一种速率适配方法的流程图;
图14为相邻的第一码块、至少两个速率适配码块以及第二码块的示意图;
图15为本申请实施例提供的另一种速率适配方法的流程图;
图16为本申请实施例提供的另一种速率适配方法的流程图;
图17为本申请实施例提供的另一种速率适配方法的流程图;
图18为本申请实施例提供的另一种速率适配方法的流程图;
图19为本申请实施例提供的一种速率适配装置1900的结构示意图;
图20为本申请实施例提供的另一种速率适配装置2000的结构示意图;
图21为本申请实施例提供的另一种速率适配装置2100的结构示意图;
图22为本申请实施例提供的另一种速率适配装置2200的结构示意图;
图23为本申请实施例提供的另一种速率适配装置2300的结构示意图;
图24为本申请实施例提供的另一种速率适配装置2400的结构示意图;
图25为本申请实施例提供的另一种速率适配装置2500的结构示意图;
图26为本申请实施例提供的另一种速率适配装置2600的结构示意图;
图27为本申请实施例提供的一种网络设备2700的结构示意图。
图1示出了100GBASE-R以太网接口的结构示意图,如图1所示,包括其他高层次(HIGHER LAYERS)、逻辑链路控制层(Logic Link Control,LLC)、媒质访问控制(MAC Control),媒质访问控制层(Media Access Control,MAC),协调子层(Reconciliation Sublayer,RS),100GBASE-R物理编码子层(Physical Coding Sublayer,PCS),里的索罗门编码子层(REED-SOLOMON FORWARD ERROR,RS-FEC),物理介质附加层(PHYSICAL MEDIUM ATTACHMENT,PMA),物理介质依附层(PHYSICAL MEDIUM DEPENDENT,PMD),自动协商(AUTO-NEGOTATION,AN),介质(Medium)。
以太网接口在设计时考虑的是以太网PHY承载一个MAC数据流。
具体的,在发送方向上,MAC数据流经过接口进行传输,自上而下依次涉及MAC、RS、PCS、RS-FEC、PMA和PMD的处理,最后体现为发送到链路媒质上的信号。接收方向涉及其逆过程,信号被从链路媒质上接收,依次经PMD、PMA、RS-FEC、PCS最后处理,恢复出MAC数据流。
在以太网的FEC层,会涉及到编码格式的转换。本申请实施例以64B/66B编码格式举例说明,其它编码格式也可以适用。本申请实施例中标准中定义码块的相关属性,将与标准中定义的码块的相关属性相符的码块称为合法码块,将与标准中定义的码块的相关属性不相符的码块称为非法码块。码块的相关属性可以包括多种,比如码块的结构形式,码块的位置关系等。
图2示出了标准中定义的64B/66B编码格式的码块的结构示意图,如图2所示,该码块为IEEE Std 802.3-2018.IEEE Standard for Ethenet SECTION SIX标准所定义,其中64B,即8个8B(bit)的字符作为编码输入,66B作为编码输出。如图2所示,码块的同步头区域包括码块的第0比特和第1比特,码块的同步头区域有两种情况,分别为01和10。同步头为01的码块称为数据码块,数据码块可以写为D码块;同步头为10的称为控制码块。控制码块的字段D0占用8比特,可以称为控制码块的类型域(类型域可以写为type域)。
当数据从RS层发送到PCS编码子层时,因为MAC层和PHY层之间存在速率偏差,所以需要进行速率适配。
图3是以太网速率适配的示意图,以太网速率适配是以字符/字节(character/octet)为单位进行的。
图3左侧示意的是发送方向上速率适配操作,当RS发送characters到达PCS后,PCS内部会使用T_TYPE功能对每8个character为一组,进行编码前的格式和顺序检查,其必须符合已经规定的规则。
例如,对于控制(C)码块,8个character中必须包含有一个效的控制字符,比如/O/,/S/,/T/,/LI/,以及/E/控制字符以外的任意一个有效的控制字符,或者控制(C)码块是一个有效的O码块(ordered set)。
O码块是一个特殊的控制码块,在XLGMII/CGMII上,O码块由一个控制字符、三个数据字符和四个零数据字符组成,如图4所示。应理解,图4中O码块块类型的值为0x4B,O code是0xC,仅为示例而非限定,在实际实施时,也可以为其他值。
例如,对于头码块(S)码块,8个字符中必须第一个字符是/S/,随后的7个character都必须是数据字符data characters.对于尾(T)码块,8个字符中必须有1个字符是/T/字符,而且在/T/字符之前的字符必须是数据字符,在其后的字符必须是/O/,/S/和/T/之外的字符。
例如,对于低功耗(LI)码块,8个字符都必须是/LI/字符。当需要进行速率适配时,PCS会以8个IDLE字符为一组进行增加或删除操作。这种增加或删除操作是在帧间隙(Inter Packet Gap,IPG)中进行,即不能在报文中进行。
在速率适配之后,PCS编码(encode)功能会对8个字符为一组的数据进行编码为64b/66b码块,并按照发送状态机进行对应码块顺序的校验。正常情况下,一个报文数据对应的码块合法顺序是SDDDDD…T,例如图5A所示,其中D码块的数量不做限制。
相邻报文编码序列之间会有间隔,如图5B所示,这个间隔即是IPG。IPG中通常会是一些控制码块,比如IDLE码块,O码块等。
图6A是发送状态机的结构示意图,如图6A所示,发送时,由初始状态开始,PCS按照收到的每8个字符为一组,进行编码;同时检查字符的格式和顺序,当出现不合规则的码块顺序时,会将对应码块替换为错误(error,E)码块。
图3右侧示意的是接收方向上速率适配操作,当PCS收到64b/66b编码的码块后,会使用R_TYPE功能进行码块格式的校验,并采用接收状态机进行顺序校验。当码块格式或码块顺序出现不合规情况时,会使用E码块将对应的码块进行替换。之后,使用PCS解码(decode)功能将64b/66b码块解码成8个字符,在向上发送给RS之前,PCS会根据PHY和MAC间速率偏差进行速率适配。
图6B是接收状态机的结构示意图,如图6B所示,接收时,由初始状态开始,PCS按照收到的每个码块,进行字符格式和顺序的检查。当出现不合规则的码块顺序时,会将对应码块替换为E码块。之后,再进行解码操作。
此外,当需要对S码块进行对齐,即前导码(preamble)第一个字节(Byte,B)进行8B对齐时,也需要进行IDLE字符的增删来实现。
图7示例性示出了一种城域传输网络(Metro Transport Network,MTN)的结构示意图,如图7所示,MTN技术主要有2个层次构成,通道层和段层,图7是采用国际电信联盟技术组(Telecommunication standardization sector of International Telecommunication Union,ITU-T)的表示风格。值得注意的是,图7中的椭圆部分是进行1.5层转发的位置,即在该地方找到出入端口的对应关系,从而找到出端口。在椭圆之下的倒梯形是通道层到段层的适配功能,在该处各路MAC的数据流(64B/66B码块流的形式)会进行交织成一路64B/66B码块流。
在通道层到段层适配的功能模块中,需要进行速率适配。由于MTN是位于PCS encode/decode之中码块域中的网络层次,如图8所示,所以MTN的数据处理单元全部为码块,或者说数据处理的粒度为码块。
在发送节点,当通道层业务发送到段层时,可能因为通道层和段层速率有偏差而需要进行速率适配;在中间节点,因为入端口和出端口间时钟频率可能存在速率偏差,所以也需要进行速率适配;在接收节点,当客户业务码块流从段层发送到通道层时,可能也需要进行速率适配。如图9所示,示出了MTN网络1.5层转发的示意图,其中对于中间节点,码块流从一个端口流入后,往上到达MTN连接通道层即1.5层(图9中椭圆图形表示MTN连接通道层)后,就不再往上传输,而是通过另一个端口发送出去。
在具体实现中,MTN网络通常可以采用缓存(buffer)先进先出(FIFO)的形式来进行速率适配。
一种具体的实现方法是,根据缓存的深度设定一定的水线,在当前的数据流进入缓存 速率过快导致当前缓存数据高于已经设定的水线时,则删除到来的IDLE码块;当速率过慢,缓存数据容量低于水线时,则插入IDLE码块。
但是,当该方法忽视了速率适配IDLE增删的位置与报文数据对应码块的关系。若插入在报文中间,则会影响客户业务数据。此外,也会导致宿端对报文的解读,比如原本发送的是正确的报文,因为到达宿端之前进行了速率适配IDLE增删而导致正确的报文被解读为错误的报文了。
另一种具体的实现方法是,在采用缓存FIFO水线的基础上,进行整包处理,也即是在进行速率适配时会去识别报文的边界,在T码块之后进行IDLE码块的增删来速率适配。
相比前面一种方法,该方法可以避免在报文中间插入或删除IDLE码块,但是该方法只要看到T码块就开始进行IDLE码块增删,如果T码块之后,也即IPG位置上出现T码块和T码块,T码块和D码块,T码块和E码块,D码块和S码块,E码块和S码块等组合时,如果在这些组合中任何一个组合中间插入或删除IDLE码块,都会导致相邻的报文被PCS decode解读为出错的报文,进而进行替换为错误码块E处理。因而这种方法仍然存在正确的报文被宿端解读为错误的报文的风险。
下面例举几个具体的示例。
示例1、T码块和T码块导致的错误。
(1)IDLE插入位置不当导致的错误:
如图10A所示,发送端发送的原始码块流为第一行码块流,假如中间未经过速率适配IDLE增删,那么宿端根据接收状态机进行码块顺序检查,解读后的码块流为第二行码块流。因为存在E码块,所以第一个报文是出错的,并会被MAC在FCS校验失败时进行丢弃。
如图10B所示,如果在发送端发送的原始码块流中T码块和T码块之间进行了IDLE插入后,因为插在了T码块和T码块之间,改变了原始码块流中错误码块间关系,如图10B中第一行所示,进而导致宿端接收后解读出的报文为第二个报文出错,如图10B中第二行所示,与实际情况第一个报文错误不符。
(2)IDLE删除位置不当导致的错误:
如图10C所示,发送端发送的原始码块流为第一行码块流,在未进行IDLE删除时,宿端收到的报文码块流解读为第二行的状态,即第二个报文错误。
但如图10D所示,如果在发送端发送的原始码块流中T码块和T码块之间删除IDLE码块,如图10D中第一行所示,那么宿端收到的报文码块流解读为图10D中第二行的状态,即第一个报文出错,与实际情况第二个报文错误不符。
示例2、T码块和E码块导致的错误。
(1)IDLE插入位置不当导致的错误:
如图10E所示,发送端发送的原始码块流为第一行码块流,在未进行速率适配IDLE码块插入的情况下,宿端收到并解读到的报文状况如第二行所示,即两个报文全部出错。
如图10F所示,因为进行速率适配时IDLE码块插入到了原始码块流的T和E码块之间,则插入码块后的状态如图10F第一行所示,进而导致宿端收到的报文解读为图10F第二行状态,即第二个报文出错,与实际情况两个报文全部出错不符。
(2)IDLE删除位置不当导致的错误:
如图10G所示,发送端发送的原始码块流为第一行码块流,在未进行IDLE码块删除 速率适配的情况下,宿端解读的报文状态如第二行所示,即第二个报文出错。
如图10H所示,在进行IDLE码块删除速率适配的情况下,发送端将原始码块流中T和E码块之间的IDLE码块删除,删除后的状态为图10H第一行所示宿端收到解读的报文状态则如图10H第二行所示,即两个报文都出错。
示例3、T码块和D码块导致的错误。
(1)IDLE插入位置不当导致的错误:
如图10I所示,发送端发送的原始码块流为第一行码块流,在未进行IDLE码块插入进行速率适配的情况下,宿端解读的报文状态如第二行所示,即两个报文都出错。
如图10J所示,在进行IDLE码块插入进行速率适配的情况下,发送端在原始码块流T码块和D码块之间插入IDLE码块,如图10J第一行所示,则宿端解读的报文状态如图10J第二行所示,即第二个报文出错,与实际情况两个报文都出错不符。
(2)IDLE删除位置不当导致的错误:
如图10K所示,发送端发送的原始码块流为第一行码块流,在未进行IDLE码块删除速率适配的情况下,宿端解读的报文状态如第二行所示,即第二个报文出错。
如图10L所示,在进行IDLE码块删除速率适配的情况下,发送端将原始码块流中T码块和D码块之间的IDLE码块删除,如图10L第一行所示,则宿端解读的报文状态如图10L第二行所示,即两个报文都出错,与实际情况第二个报文出错不符。
示例4、D码块和S码块导致的错误。
(1)IDLE插入位置不当导致的错误:
如图10M所示,发送端发送的原始码块流为第一行码块流,在未进行IDLE码块插入进行速率适配的情况下,宿端解读的报文状态如第二行所示,即第二个报文出错。
如图10N所示,在进行IDLE码块插入进行速率适配的情况下,发送端在原始码块流中D码块和S码块之间插入IDLE码块,如图10N第一行所示,则宿端解读的报文状态如图10N第二行所示,即没有报文出错,与实际情况第二个报文出错不符。
(2)IDLE删除位置不当导致的错误:
如图10O所示,发送端发送的原始码块流为第一行码块流,在未进行IDLE码块删除速率适配的情况下,宿端解读的报文状态如第二行所示,即没有报文出错。
如图10P所示,在进行IDLE码块删除速率适配的情况下,发送端删除原始码块流D码块和S码块之间的DILE码块,如图10P第一行所示则宿端解读的报文状态如图10P第二行所示,即第二个报文出错,与实际情况没有报文出错不符。
示例5、E码块和S码块导致的错误。
(1)IDLE插入位置不当导致的错误:
如图10Q所示,发送端发送的原始码块流为第一行码块流,在未进行IDLE码块插入进行速率适配的情况下,宿端解读的报文状态如第二行所示,即第二个报文出错。
如图10R所示,如果在发送端发送的原始码块流的E码块和S码块之间插入IDLE码块,则为图10R中的第一行码块流,在进行IDLE码块插入进行速率适配的情况下,宿端解读的报文状态如图10R中第二行所示,即没有报文出错,与实际情况第二个报文出错不符,宿端解读出错。
(2)IDLE删除位置不当导致的错误:
如图10S所示,发送端发送的原始码块流为第一行码块流,在未进行IDLE码块删除 速率适配的情况下,宿端解读的报文状态如第二行所示,即没有报文出错。
如图10T所示,在进行IDLE码块删除速率适配的情况下,将发送端发送的原始码块流中E码块和S码块之间的IDLE码块删除,则删除后的码流为图10S中第一行的状态,宿端解读的报文状态如图10S中第二行所示,即第二个报文出错,与实际情况没有报文出错不符,宿端解读出错。
由此可见,当上述码块关系存在时,如果在该些码块关系对应的码块组合之间进行IDEL码块的增/删,将导致增/删位置附件的原报文格式被宿端误解为其它报文格式,造成宿端报文解读错误。
鉴于此,本申请实施例提供一种速率适配方案,需要进行速率适配时,识别报文的位置,并预先识别出会引起报文接收解读出现错误的码块关系组合,进而在进行速率适配时避开这些可能引起解读错误的码块位置,进而在正确的码块位置进行速率适配码块的插入或删除,可以保证宿端即接收侧对接收到报文的解读不受到速率适配的影响。具体方案将在后文详细介绍。
本申请实施例适用于所有需要进行速率适配的场景,例如可以用于现存的所有1.5层的技术,如使用灵活以太网(Flex Ethernet,FlexE)技术的网络,或使用切片分组网络(Slicing Packet Network,SPN)技术,及当前ITU-T第15研究组第3工作小组第11问题组(Study group 15 work party 3 question 11,SG15 WP3 Q11)正在标准化的MTN网络技术。
示例地,图11为本申请实施例可以适用的一种网络架构,该网络包括发送节点(发送端)和接收节点(接收端,或者叫宿端),发送节点可以向接收节点发送码块流,接收节点可以接收来自发送节点的码块流。另外,网络还可以包括中间节点(图11中未示出),可以用于从发送节点接收码块流,并发送给接收节点,起到对码块流进行转发的作用。
本申请实施例提供的技术方案在中间节点和接收节点都可以实施,或者说网络中任意一个节点需要进行速率适配时,或者说具有接收端口的节点,均可以实施本申请实施例,从而解决速率适配影响报文正确接收的问题。
更为具体的,本申请实施例提供的技术方案可以应用于中间节点、接收节点上的以太网端口或交换机。本申请实施例提供的方案可以对原有的交换机或网卡,进行物理层的硬件升级(包括应用新的芯片,刷入新现场可编程逻辑门阵列(Field Programmable Gate Array,FPGA)代码等)来实现。
为了使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施例的技术方案作进一步地详细描述。
本申请实施例中的术语“系统”和“网络”可被互换使用。“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合,例如a、b或c中的至少一项(个),可以表示:a,或b,或c,或a和b,或b和c,或a和c,或a和b和c。
以及,除非有相反的说明,本申请实施例提及“第一”、“第二”等序数词是用于对多个对象进行区分,不用于限定多个对象的顺序、时序、优先级或者重要程度。例如,第一优先级准则和第二优先级准则,只是为了区分不同的准则,而并不是表示这两种准则的内 容、优先级或者重要程度等的不同。
此外,本申请实施例和权利要求书及附图中的术语“包括”和“具有”不是排他的。例如,包括了一系列步骤或模块的过程、方法、系统、产品或设备,不限定于已列出的步骤或模块,还可以包括没有列出的步骤或模块。
如图12所示,为本申请实施例提供的一种速率适配方法的流程图,该方法可以应用于图11所示的网络架构,该方法具体可以是中间节点或接收节点执行,或者其它需要进行速率适配的节点来执行。方法包括:
S1201、获取第一码块流,第一码块流包括相邻的第一码块和第二码块。
其中,码块流又可称为码流,是指由码块组成的数据流。
按照第一码块流的码块顺序,第一码块位于第二码块之前,第二码块位于第一码块之后,且第一码块和第二码块之间没有其他码块。
可选的,获取第一码块流,具体实现方式可以是:从缓存中读取的码块流。
可选的,读取方式可以是按照先进先出的规则读取。进一步可选的,每次读取预设长度的码块流。
S1202、当存在速率适配需求时,判断第一码块和第二码块的码块关系是否满足预设条件。
应理解,本文所涉及的速率适配需求,是指接收端口和发送端口的速率偏差,该速率偏差具体可以是指码流在接收端口的传输速率和在发送端口的传输速率的偏差,或者是接收端口和发送端口的时钟频率的偏差。
该速率偏差可以体现为接收端口和发送端口的带宽偏差,例如接收端口的带宽大于发送端口的带宽时,接收端口的速率大于发送端口的速率,因此需要在第一码块流中插入率适配码块,以时码流满足接收端口的带宽。
该速率偏差还可以体现为,接收端口和发送端口的频率偏差,例如,接收端口以+100ppm频率工作,而发送端口以-100ppm频率工作,结果就是两个端口间的频率偏差为200ppm。这200ppm的频率偏差需要进行本发明中的速率适配方法进行适配。
在具体实现时,可以通过在接收端口对应的缓存中设置buffer水线状态,在当前的数据流进入缓存速率过慢导致当前缓存数据低于已经设定的水线时,确定存在速率适配需求:需要在第一码流中插入速率适配码块,以提高数据流入速率。
可选的,所述相邻的第一码块和第二码块,可以是第一码块流中任意位置处的相邻的两个码块,比如第一码块和第二码块均位于第一报文中,或者第一码块位于第一报文中而第二码块位于第一报文之后的帧间隙(Inter Packet Gap,IPG),或者第一码块位于第一报文之前的帧间隙,第二码块位于第一报文中。
相应的,判断第一码块和第二码块的码块关系是否满足预设条件的判断位置可以是在第一码块流的任意位置。
一种可能的设计是,从第一码块流的第一个码块开始,按照码块顺序依次向后判断,判断位置遍历第一码块流中的所有码块位置。
示例性地,首先将第一码块流中的第1个码块作为第一码块、将第2个码块作为第二码块,然后判断当前的第一码块和当前的第二码块是否满足预设条件;
如果满足,则执行S1203;
否则,重新确定第一码块和第二码块,将第2个码块作为第一码块、将第3个码块作为第二码块,然后判断当前的第一码块和当前的第二码块是否满足预设条件;
如果满足,则执行S1203;
否则,重新确定第一码块和第二码块,将第3个码块作为第一码块、将第4个码块作为第二码块,然后判断当前的第一码块和当前的第二码块是否满足预设条件;
……
依次类推,直至查找到满足预设条件的第一码块和第二码块为止,然后执行S1203;或者直至查找到第一码块流的最后一个码块都没有满足预设条件的第一码块和第二码块为止,然后回到S1201,重新获取码块流。
当然,上述方式仅为举例而非限定,在实际实施时,也可以从第一码块流的其它位置开始判断,比如第一码块流的中间位置开始,分别向前和向后判断,或者从第一码块流的最后一个码块开始,依次向前判断等,这里不做限定。
可选的,所述相邻的第一码块和第二码块,可以是该第一码块流中处于预设位置的相邻的码块。
一种可能的设计是,所述相邻的第一码块和第二码块是第一码块流中位于帧间隙的相邻的两个码块。换而言之,第一码块可以是T码块或者T码块之后的码块,其中T码块是帧结束码块,第二码块可以是S码块或者S码块之前的码块,所述S码块是帧开始码块。
相应的,判断第一码块和第二码块的码块关系是否满足预设条件的判断位置可以在第一码块流的IPG中的任意位置。
一种可能的设计是,按照码块顺序依次检测第一码块流中每个码块的类型,比如合法的码块顺序是重复的SDDDDDTC SDDDDDDTC的序列,如图5B所示;当检测到任意一个IPG的开始码块(即检测到某个报文的最后一个码块,一般为T码块)后,从该任意一个帧间隙的开始码块开始,按照码块顺序依次向后判断,直至该IPG的结束码块(即下一个报文的第一个码块位置,一般为S码块)。
示例性地,假设第一码块流中第一个报文的T码块为第一码块流中第m个码块,第二个报文为第一码块流中第n个码块,其中n>m。则判断第一码块和第二码块的码块关系是否满足预设条件可以包括:
按照码块顺序依次检测第一码块流中每个码块的类型,在识别到第m个码块的码块类型时,确定第m码块为T码块,则将第一码块流中的第m个码块作为第一码块、将第m+1个码块作为第二码块,然后开始判断当前的第一码块和当前的第二码块是否满足预设条件;
如果满足,则执行S1203;
否则,重新确定第一码块和第二码块,将第m+1个码块作为第一码块、将第m+2个码块作为第二码块,然后判断当前的第一码块和当前的第二码块是否满足预设条件;
……
依次类推,直至查找到满足预设条件的第一码块和第二码块为止,然后执行S1203;或者直至识别到第一码块流中第n个码块,即S码块,都没有满足预设条件的第一码块和第二码块,然后暂停判断操作,继续往后识别码块类型,直至识别到下一个报文的T码块(假设为第o个码块)时,继续执行判断操作。
当然,上述方式仅为举例而非限定,在实际实施时,也可以从IPG的其它位置开始判断,比如IPG的中间位置开始,分别向前和向后判断,向前到T码块为止,向后到S码块 为止;或者从IPG结束位置后的第一个码块(即S码块)开始,依次向前判断,直至IPG的第一个码块(即T码块)为止等,这里不做限定。
另外,在实际实施时,该预设位置还可以是其它位置,例如预设位置可以是IPG中一部分,或者覆盖范围大于IPG的预设位置等,这里不做限制。
可选的,在检测码块类型的过程中,如果检测到的不合法码块顺序的码块,可以选择对其替换为错误码块进行处理,也可以交由发送节点或接收节点进行处理。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
在本申请实施例中,所述预设条件包括但不限于以下2种:
第1种预设条件、第一码块和第二码块的码块关系不是插入速率适配码块后会导致报文解读出错的码块关系,例如第一码块和第二码块的码块关系不是以下码块关系中的任何一种:
第一码块是T码块,第二码块是T码块;
第一码块是T码块,第二码块是D码块;
第一码块是T码块,第二码块是E码块;
第一码块是D码块,第二码块是S码块;
第一码块是E码块,第二码块是S码块。
用{第一码块,第二码块}表示第一码块和第二码块的码块关系,则{第一码块,第二码块}表示不是以下码块关系中的任意一种:{T,T},{T,D},{T,E},{E,S}。
参见图10A至图10T,当第一码块和第二码块的码块关系以上任一种时,在第一码块和第二码块之间插入IDLE码块容易导致报文解读出错,因此要避开这些错误的码块关系。
当然,上述仅为举例而非限定,在实际实施时,如果还存在其它码块关系在插入速率适配码块后会导致前/后报文解读出错,则该其它码块关系也应包含在上述第1种预设条件的范围内,这里不进行穷举。
第2种预设条件、第一码块和第二码块的码块关系是插入速率适配码块后不会导致报文解读出错的码块关系,例如第一码块和第二码块的码块关系是以下码块关系中的任意一种:
第一码块是T码块,第二码块是IPG码块;
第一码块是IPG码块,第二码块是S码块;
第一码块是T码块,第二码块是S码块;
第一码块是IPG码块,第二码块是IPG码块。
一种可能的示例,第一码块和第二码块的码块关系(用{第一码块,第二码块}表示)是以下码块关系中的任意一种:{T,I},{T,S},{I,I},{O,I},{I,O},{I,S},{O,S},{O,O}。
当第一码块和第二码块的码块关系以上任一种时,在第一码块和第二码块之间插入IDLE码块不会导致报文解读出错,因此可以在这些码块关系的位置插入IDLE码块,进而保证码块解读的准确性。
应理解,这里的IPG码块是指位于IPG位置上码块,包括IDLE码块、O码块、E码块或D码块中的一种或多种。其中,当第一码块流出错时,IPG位置上可能出现D码块,则IPG码块可能包括D码块。
当然,上述仅为举例而非限定,在实际实施时,如果还存在其它码块关系在插入IDLE码块时不会导致前/后报文解读出错,则该其它码块关系也应包含在上述第2种预设条件的 范围内,这里不穷举。
此外,上述第1种预设条件和第2种预设条件还可以同时实时,即需要判断第一码块和第二码块的码块关系需要是否同时满足上述第1种预设条件和第2种预设条件。
在本申请实施例中,在判断第一码块和第二码块的码块关系是否满足预设条件时,具体的判断方式包括但不限于以下两种:
第1种、先判断第一码块,再判断第二码块。
(1)以上述第1种预设条件为例:
先确定第一码块是否是T码块、D码块、E码块;
如果第一码块不是T码块、D码块、E是码块中的任一种,则直接确定第一码块和第二码块满足预设条件;
如果第一码块是T码块、D码块、E是码块中的一种,例如第一码块是D码块,则进一步判断第二码块是否是S码块;如果第二码块不是S码块,则确定第一码块和第二码块满足预设条件,否则确定第一码块和第二码块不满足预设条件。
(2)以上述第2种预设条件为例:
例如,先确定第一码块是否是T码块或IPG码块;如果第一码块既不是T码块也不是IPG码块,则直接确定第一码块和第二码块不满足预设条件;
如果第一码块是T码块或IPG码块,例如第一码块是T码块,则进一步判断第二码块是否是S码块或IPG码块;如果第二码块既不是S码块也不是IPG码块,则确定第一码块和第二码块不满足预设条件,否则确定第一码块和第二码块满足预设条件。
第2种、同时判断第一码块和第二码块。
(1)以上述第1种预设条件为例:
判断{第一码块,第二码块}是否是以下码块组合中的任意一种:{T,T},{T,D},{T,E},{E,S};如果是其中一种,则确定第一码块和第二码块的码块关系不满足预设条件,如果不是以上码块组合中的任何一种,则确定第一码块和第二码块的码块关系满足预设条件。
(2)以上述第2种预设条件为例:
判断{第一码块,第二码块}是否是以下码块组合中的任意一种:{T,I},{T,S},{I,I},{O,I},{I,O},{I,S},{O,S},{O,O};如果是其中一种,则确定第一码块和第二码块的码块关满足预设条件,如果不是以上码块组合中的任何一种,则确定第一码块和第二码块的码块关系不满足预设条件。
另外,上述S1202是当存在速率适配需求时,再判断第一码块和第二码块的码块关系是否满足预设条件。在具体实施时,在获取第一码块流之后,不存在速率适配需求时也可以执行判断(即获取第一码块流之后可以一直判断第一码块和第二码块的码块关系是否满足预设条件),当满足预设条件且存在速率适配需求时,再执行S1203。
S1203、当第一码块和第二码块的码块关系满足所述预设条件时,在第一码块和第二码块之间插入至少一个速率适配码块。
可选的,速率适配码块包括IDLE码块,但不排除还有其它可能性,比如还可以包括自定义的用于调整速率的码块,这里不做限制。
可选的,在第一码块和第二码块之间插入至少一个速率适配码块,具体可以包括:根据接收端口和发送端口的速率偏差,确定在第一码块和第二码块之间插入的速率适配码块的数量,其中,速率偏差越大,第一码块和第二码块之间插入的速率适配码块的数量越多; 然后,在码块关系满足所述预设条件的第一码块和第二码块之间插入相应数量的速率适配码块。
需要说明的是,图12所示实施例,是在第一码块和第二码块的码块关系满足预设条件时,在第一码块和第二码块之间插入至少一个速率适配码块,在实际实施时,也可以是在当第一码块和第二码块的码块关系不满足另外一种预设条件时,在第一码块和第二码块之间插入至少一个速率适配码块。
可选的,另外一种预设条件可以与上述预设条件相反。
比如为:第一码块和第二码块的码块关系是以下码块关系中的任意一种:第一码块是T码块,第二码块是T码块;第一码块是T码块,第二码块是D码块;第一码块是T码块,第二码块是E码块;第一码块是D码块,第二码块是S码块;第一码块是E码块,第二码块是S码块。
比如为:第一码块和第二码块的码块关系不是以下码块关系中的任何一种:
第一码块是T码块,第二码块是IPG码块;
第一码块是IPG码块,第二码块是S码块;
第一码块是T码块,第二码块是S码块;
第一码块是IPG码块,第二码块是IPG码块。
应理解,无论是判断“满足”还是“不满足”预设条件,或者是其它描述方式,只要最终获得的技术方案实质是相同的,或者说技术构思是相同的,那么均在本申请的保护范围之内。
通过上述可知,本申请实施例在通过对第一码块流进行识别和检测,在需要进行速率适配时,基于预先识别出会引起报文接收出现错误的码块关系组合,避开这些可能引起错误的码块位置,进而在正确的码块位置进行速率适配码块的插入,可以保证码块流接收侧(宿端)对接收到报文的解读不受到速率适配的影响,可以提高速率适配的可靠性。
上述图12所示的相关实施例介绍的是在需要提高接收端口速率的场景下以码块为粒度的速率适配方法。下面介绍需要降低接收端口速率的场景下以码块为粒度的速率适配方法。
如图13所示,为本申请实施例提供的另一种速率适配方法的流程图,该方法可以应用于图11所示的网络架构,该方法具体可以是中间节点或接收节点执行,或者其它需要进行速率适配的节点来执行。方法包括:
S1301、获取第一码块流,第一码块流包括相邻的第一码块、至少两个速率适配码块以及第二码块。
应理解,本文中相邻的第一码块、至少两个速率适配码块以及第二码块是指,该至少两个速率适配码块在第一码流中是连续的,或者说序列的。换而言之,按照码块顺序,第一码块位于至少两个速率适配码块之前,且第一码块和至少两个速率适配码块之间没有其他码块,第二码块位于至少两个速率适配码块之后,且第二码块和至少两个速率适配码块之间没有其他码块,应理解,该至少两个速率适配码块也是连续的或者说序列的。如图14所示,示出了相邻的第一码块、3个速率适配码块以及第二码块的示意图。
可选的,获取第一码块流,具体实现方式可以是:从缓存中读取的码块流。
可选的,读取方式可以是按照先进先出的规则读取。进一步可选的,每次读取预设长 度的码块流。
S1302、当存在速率适配需求时,判断第一码块和第二码块的码块关系是否满足预设条件。
类似的,在具体实现时,可以通过在接收端口对应的缓存中设置buffer水线状态,在当前的数据流进入缓存速率过快导致当前缓存数据高于已经设定的水线时,确定存在速率适配需求:需要在第一码流中删除速率适配码块,以降低数据流入速率。
可选的,所述相邻的第一码块、至少两个速率适配码块以及第二码块,可以是第一码块流中任意位置处的码块,比如第一码块、至少两个速率适配码块以及第二码块均位于第一报文中,或者第一码块位于第一报文中而至少两个速率适配码块以及第二码块位于第一报文之后的帧间隙,或者第一码块、至少两个速率适配码块位于第一报文之前的帧间隙,第二码块位于第一报文中。
相应的,判断第一码块和第二码块的码块关系是否满足预设条件的判断位置可以是在第一码块流的任意位置。
一种可能的设计是,从第一码块流的第一个码块开始,按照码块顺序依次向后判断,判断位置遍历第一码块流中的所有码块位置。
示例性地,首先将第一码块流中的第1个码块作为第一码块,判断第一码块之后是否有至少两个速率适配码块,如果有,则将该至少两个速率适配码块之后的码块作为第二码块,然后判断当前的第一码块和当前的第二码块是否满足预设条件;
如果不满足,则执行S1303;
否则,执行1304;或者重新确定第一码块,将第2个码块作为第一码块,判断第一码块之后是否有至少两个速率适配码块,如果有,则将该至少两个速率适配码块之后的码块作为第二码块,然后判断当前的第一码块和当前的第二码块是否满足预设条件;
如果不满足,则执行S1303;
否则,执行1304;或者重新确定第一码块,将第3个码块作为第一码块,判断第一码块之后是否有至少两个速率适配码块,如果有,则将该至少两个速率适配码块之后的码块作为第二码块,然后判断当前的第一码块和当前的第二码块是否满足预设条件;
……
依次类推,直至查找到不满足预设条件的第一码块和第二码块为止,然后执行S1303;或者直至查找到第一码块流最后一个码块都没有不满足预设条件的第一码块和第二码块为止,然后回到S1301,重新获取码块流。
当然,上述方式仅为举例而非限定,在实际实施时,也可以从第一码块流的其它位置开始判断,比如第一码块流的中间位置开始,分别向前和向后判断,或者从第一码块流的最后一个码块开始,依次向前判断等,这里不做限定。
可选的,所述相邻的第一码块和第二码块,可以是该第一码块流中处于预设位置的相邻的码块。
一种可能的设计是,所述相邻的第一码块和第二码块是第一码块流中位于帧间隙位置上的相邻的两个码块。换而言之,第一码块可以是T码块或者T码块之后的码块,其中T码块是帧结束码块,第二码块可以是S码块或者S码块之前的码块,所述S码块是帧开始码块。
相应的,判断第一码块和第二码块的码块关系是否满足预设条件的判断位置可以在第 一码块流的IPG中的任意位置。
一种可能的设计是,按照码块顺序依次检测第一码块流中每个码块的类型,比如合法的码块顺序是重复的SDDDDDTC SDDDDDDTC的序列,如图5B所示;当检测到任意一个T码块(即检测到某个报文的最后一个码块,或者说检测到某个IPG的开始码块)后,从该任意一个T码块(即该报文的最后一个码块位置,或者说该IPG的开始码块)开始,按照码块顺序依次向后判断,直至S码块为止(即下一个报文的第一个码块位置,或者说直至该IPG的结束码块)。
示例性地,假设第一码块流中第一个报文的T码块为第一码块流中第m个码块,第二个报文为第一码块流中第n个码块,其中n>m。则判断第一码块和第二码块的码块关系是否满足预设条件可以包括:
按照码块顺序依次检测第一码块流中每个码块的类型,在识别到第m个码块的码块类型时,确定第m码块为T码块,则将第一码块流中的第m个码块作为第一码块,然后判断第一码块之后是否有至少两个速率适配码块;
如果有,则将该至少两个速率适配码块之后的码块作为第二码块,然后判断当前的第一码块和当前的第二码块是否满足预设条件,如果不满足,则执行S1303;
否则,执行1304;或者重新确定第一码块,将第m+1个码块作为第一码块,然后判断第一码块之后是否有至少两个速率适配码块;
……
依次类推,直至查找到不满足预设条件的第一码块和第二码块为止,然后执行S1303;或者直至识别到第一码块流中第n个码块,即S码块,都没有不满足预设条件的第一码块和第二码块,然后暂停判断操作,继续往后识别码块类型,直至识别到第二个报文的T码块(假设为第o个码块),从第o个码块重新开始判断操作。
当然,上述方式仅为举例而非限定,在实际实施时,也可以从IPG的其它位置开始判断,比如IPG的中间位置开始,分别向前和向后判断,向前到T码块为止,向后到S码块为止;或者从IPG结束位置后的第一个码块(即S码块)开始,依次向前判断,直至IPG的第一个码块(即T码块)为止等,这里不做限定。
另外,在实际实施时,预设位置还可以是其它位置,例如预设位置可以是IPG中一部分,或者覆盖范围大于IPG的预设位置等,这里不做限制。
可选的,在检测码块类型的过程中,如果检测到的不符合合法码块顺序的码块,可以选择对其替换为E码块进行处理,也可以交由发送节点或接收节点进行处理。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
在本申请实施例中,在每个判断位置判断第一码块和第二码块的码块关系是否满足预设条件时,具体的判断方式包括但不限于以下两种:第1种、先判断第一码块,再判断第二码块;第2种、同时判断第一码块和第二码块。以上两种方式的具体实现可以参考上文S1202中的相关内容,这里不再赘述。
另外,上述S1302是当存在速率适配需求时,再判断第一码块和第二码块的码块关系是否满足预设条件。在具体实施时,在获取第一码块流之后,不存在速率适配需求时也可以执行判断(即获取第一码块流之后可以一直判断第一码块和第二码块的码块关系是否满足预设条件),当不满足预设条件且存在速率适配需求时,再执行S1303。
S1303、当第一码块和第二码块的码块关系不满足预设条件时,删除至少两个速率适配码块中的至少一个速率适配码块,删除后第一码块和第二码块之间包括至少一个速率适配码块。
如果将不满足预设条件的第一码块和第二码块之间的全部速率适配码块删除,将导致第一码块和第二码块相邻,并出现导致相邻的报文被接收端的PCS decode解读为出错的码块流的组合,如T和T、T和D、T和E、E和S等。因此,如果第一码块和第二码块是以下码块关系中的任意一种:{T,T},{T,D},{T,E},{E,S},{D,S}则删除后第一码块和第二码块之间至少要保留一个速率适配码块,来避免{T,T},{T,D},{T,E},{E,S},{D,S}等组合的出现。
S1304、当第一码块和第二码块的码块关系满足预设条件时,删除至少两个速率适配码块中的至少一个速率适配码块,删除后第一码块和第二码块之间没有速率适配码块或包括至少一个速率适配码块。
相反地,对于满足预设条件的第一码块和第二码块,如果将满足预设条件的第一码块和第二码块之间的全部速率适配码块删除,也将导致第一码块和第二码块相邻,但是不会出现导致相邻的报文被接收端的PCS decode解读为出错的码块流的组合,如不会出现T和T、T和D、T和E、E和S等组合。因此,如果第一码块和第二码块不是{T,T},{T,D},{T,E},{E,S},{D,S}中的任何一种,或者第一码块和第二码块是{T,I},{T,S},{I,I},{O,I},{I,O},{I,S},{O,S},{O,O}中的任意一种,则删除后第一码块和第二码块之间无论是否保留速率适配码块,都不会有{T,T},{T,D},{T,E},{E,S}等组合的出现。
类似的,速率适配码块可以包括IDLE码块。但不排除还有其它可能性,比如还可以包括自定义的用于调整速率的码块,这里不做限制。
类似的,删除第一码块和第二码块之间的至少一个速率适配码块,具体可以包括:根据接收端口和发送端口的速率偏差,确定需要在第一码块和第二码块之间删除的速率适配码块的数量,其中,速率偏差越大,需要删除的速率适配码块的数量越多;然后,在码块关系满足所述预设条件的第一码块和第二码块之间删除相应数量的速率适配码块。
类似的,上述描述方式“满足”和“不满足”也可以相互置换,相应的预设条件也可以置换。但无论是“判断满足预设条件”还是“判断不满足预设条件”,或者是其它描述方式,只要最终获得的技术方案实质是相同的,或者说技术构思是相同的,那么均在本申请的保护范围之内。
通过上述可知,本申请实施例在通过对第一码块流进行识别和检测,在需要进行速率适配时,基于预先识别出会引起报文接收出现错误的码块关系组合,在删除速率适配码块时,尽可能地避免这些码块关系组合出现,可以保证接收侧对接收到报文的解读不受到速率适配的影响,可以提高速率适配的可靠性。
图13所示的相关实施例介绍的是在需要降低接收端口速率的场景下,第一码块和第二码块之间有多个速率适配码块时,以码块为粒度的速率适配方法。下面介绍在需要降低接收端口速率的场景下,第一码块和第二码块之间只有一个速率适配码块时,以码块为粒度的速率适配方法。
如图15所示,为本申请实施例提供的另一种速率适配方法的流程图,该方法可以应用于图11所示的网络架构,该方法具体可以是中间节点或接收节点执行,或者其它需要进 行速率适配的节点来执行。方法包括:
S1501、获取第一码块流,第一码块流包括相邻的第一码块、速率适配码块以及第二码块。
S1501的具体实现方式可以参考上文中S1301的具体实现方式,不同之处仅在于这里的第一码块和第二码块之间仅有一个速率适配码块,而S1301中第一码块和第二码块之间有多个速率适配码块。
S1502、当存在速率适配需求时,判断第一码块和第二码块的码块关系是否满足预设条件。
S1502的具体实现方式可以参考上文中S1301的具体实现方式,不同之处仅在于这里的第一码块和第二码块之间仅有一个速率适配码块,而S1301中第一码块和第二码块之间有多个速率适配码块。
S1503、当第一码块和第二码块的码块关系满足预设条件时,删除该速率适配码块,删除后第一码块和第二码块之间没有速率适配码块。
因为将不满足预设条件的第一码块和第二码块之间的速率适配码块删除,将导致第一码块和第二码块相邻,并出现导致相邻的报文被接收端的PCS decode解读为出错的码块流的组合,如T和T、T和D、T和E、E和S等。因此,如果第一码块和第二码块的码块关系不满足预设条件,例如第一码块和第二码块是以下码块关系中的任意一种:{T,T},{T,D},{T,E},{E,S},第一码块和第二码块之间的速率适配码块不能被删除,以避免{T,T},{T,D},{T,E},{E,S}等组合的出现。
相反地,对于满足预设条件的第一码块和第二码块,如果将满足预设条件的第一码块和第二码块之间的速率适配码块删除,也将导致第一码块和第二码块相邻,但是不会出现导致相邻的报文被接收端的PCS decode解读为出错的码块流的组合,如不会出现T和T、T和D、T和E、E和S等组合。因此,如果第一码块和第二码块的码块关系满足预设条件,例如第一码块和第二码块不是{T,T},{T,D},{T,E},{E,S}中的任何一种,或者第一码块和第二码块是{T,I},{T,S},{I,I},{O,I},{I,O},{I,S},{O,S},{O,O}中的任意一种,则可以删除第一码块和第二码块之间的速率适配码块。
类似的,速率适配码块可以包括IDLE码块。但不排除还有其它可能性,比如还可以包括自定义的用于调整速率的码块,这里不做限制。
类似的,上述描述方式“满足”也可以置换为“不满足”,相应的预设条件也可以置换。但无论是“判断满足预设条件”还是“判断不满足预设条件”,或者是其它描述方式,只要最终获得的技术方案实质是相同的,或者说技术构思是相同的,那么均在本申请的保护范围之内。
通过上述可知,本申请实施例在通过对第一码块流进行识别和检测,在需要进行速率适配时,基于预先识别出会引起报文接收出现错误的码块关系组合,避开这些可能引起错误的码块位置,进而在正确的码块位置进行速率适配码块的删除,可以保证接受侧对接受到报文的解读不受到速率适配的影响,提高了速率适配的可靠性。
以上图11~图15所示的相关实施例介绍的是以码块为例度的速率适配方案,基于相同的技术构思,本申请实施例还提供以字符为例度的速率适配方案。
如图16所示,为本申请实施例提供的另一种速率适配方法的流程图,该方法可以应 用于图11所示的网络架构,该方法具体可以是中间节点或接收节点执行,或者其它需要进行速率适配的节点来执行。方法包括:
S1601、获取第一字符流,第一字符流包括相邻的第一码块对应的字符和第二码块对应的字符。
其中,第一码块和第二码块的具体实现方式可以参考上文S1201中第一码块和第二码块的具体实现方式,这里不再赘述。
可选的,在获取第一字符流之前,方法还包括:获取第一码块流,第一码块流包括相邻的第一码块和第二码块;对第一码块流进行解码,获得第一字符流。
进一步可选的,在获取第一字符流之前,还可以对第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将码块格式和/或码块顺序不符合规定的码块替换为E码块,获得纠错后的第一码块流。之后,再对纠错后的第一码块流进行解码,获得第一字符流。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
这样,可以尽可能地减少码流中出现会引起报文接收解读错误的码块关系组合。
可选的,对纠错后的第一码块流进行解码,包括:对纠错后的第一码块流中除预设码块之外的其它码块进行解码,其中预设码块可以是O码块,或者其它自定义的码块。一种可能的设计是:该预设码块是MTN中出现而以太网中还未出现的码块。这样,可以避免正确的码块被误(如O码块)被认为错误的码块而被处理,避免损失O码块中的OAM信息。
S1602、当存在速率适配需求时,判断第一码块和第二码块的码块关系是否满足预设条件。
具体实现方式可以参考上文S1201中的具体实现方式,这里不再赘述。
S1603、当第一码块和第二码块的码块关系满足预设条件时,在第一码块对应的字符和第二码块对应的字符之间插入至少一个速率适配码块对应的字符。
可选的,速率适配码块包括IDLE码块,但不排除还有其它可能性,比如还可以包括自定义的用于调整速率的码块,这里不做限制。相应的,速率适配码块对应的字符(简称速率适配字符)包括IDLE字符,但不排除还有其它可能性,比如还可以包括自定义的用于调整速率的字符,这里不做限制。后文速率适配字符以IDLE字符为例,且插入IDLE字符是以8个连续的DILE字符为一组进行插入,一组DILE字符对应一个IDLE码块。
在本申请实施例中,在第一码块对应的字符和第二码块对应多个字符之间插入至少一个速率适配码块对应的字符,包括但不限于以下几种实现方式:
1)在第一码块对应的最后一个字符之后,第二码块对应多个第一个字符之间插入至少一个速率适配码块对应的字符。
例如,第一码块为T7码块(图2中最后一行,对应字符为“DDDDDDDT”,块类型为0xFF),第二码块为S码块(图2中倒数第10行码块,对应字符为“SDDDDDDD”,块类型为0x78),则在T7码块的字符“T”之后,S码块的字符“S”之前插入至少一个速率适配码块对应的字符,如N*8个IDLE字符,其中每8个IDLE字符对应一个IDLE码块,N为大于1的正整数。
2)若第一码块最后几个字符均为IDLE字符,则可以在第一码块最后一个非IDLE字符之后,第二码块的第一个字符之前的任意位置插入至少一个IDLE码块对应的字符。换而言之,IDLE字符可以在第一码块的最后几个IDLE字符所在位置进行插入。
虽然插入的位置并非是在第一码块对应的最后一个字符之后以及第二码块对应的第一个字符之前,但是插入IDLE字符后形成的字符组合与在第一码块对应的最后一个字符之后以及第二码块对应的第一个字符之前插入IDLE字符后形成的字符组合是相同的,所以等同于是在第一码块对应的最后一个字符之后以及第二码块对应的第一个字符之前插入IDLE字符。
例如,第一码块是T4码块(图2中倒数第4行,块类型为0xCC),第二码块是S码块(图2中倒数第10行,块类型为0x78),为了便于表述,本文用“I”表示IDLE字符,则第一码块,对应字符为“DDDDTIII”,第二码块,对应字符为“SDDDDDDD,则可以有以下几种插入ILDE字符的方式:
在第一码块对应的最后一个字符之后以及第二码块对应的第一个字符之前插入一个IDLE码块的字符,即“DDDDTIII”+“IIIIIIII”+“SDDDDDDD”,插入后的字符为“DDDDTIIIIIIIIIIISDDDDDDD”;
在第一码块对应的倒数第二个字符之后以及第一码块对应的最后一个字符之前插入一个IDLE码块的字符,即“DDDDTII”+“IIIIIIII”+“I”+“SDDDDDDD”,插入后的字符为“DDDDTIIIIIIIIIIISDDDDDDD”;
在第一码块对应的倒数第三个字符之后以及第一码块对应的倒数第二个字符之前插入一个IDLE码块的字符,即“DDDDTI”+“IIIIIIII”+“II”+“SDDDDDDD”,插入后的字符为“DDDDTIIIIIIIIIIISDDDDDDD”;
在第一码块对应的倒数第四个字符(即最后一个非IDLE字符)之后以及第一码块对应的倒数第三个字符之前插入一个IDLE码块的字符,即“DDDDT”+“IIIIIIII”+“III”+“SDDDDDDD”,插入后的字符为“DDDDTIIIIIIIIIIISDDDDDDD”。
可见,上述四种插入方式最终的结果是一致的。
进一步的,在IDLE字符插入完成后,还对插入IDLE字符后的第一字符流进行编码,形成第二码块流。这样最终生成的码块流和图12所示实施例插入速率适配码块后形成的码块流的效果是一致的。
应理解,如果在对第一码块流进行解码时是对除预设码块之外的其它码块进行解码,那么这里在对插入字符后所获得的字符流进行编码之后,还需要在第二码块流中插入该预设码块,以避免原码块流中的信息缺失,保证速率适配的可靠性。
类似的,上述描述方式“满足”可以置换为“不满足”,相应的预设条件也可以置换。但无论是“判断满足预设条件”还是“判断不满足预设条件”,或者是其它描述方式,只要最终获得的技术方案实质是相同的,或者说技术构思是相同的,那么均在本申请的保护范围之内。
通过上述可知,本申请实施例在通过对第一码块流进行识别和检测,在需要进行速率适配时,基于预先识别出会引起报文接收出现错误的码块关系组合对应的字符,避开这些可能引起错误的字符位置,进而在正确的字符位置进行速率适配字符的插入,可以保证接收侧对接收到报文的解读不受到速率适配的影响,提高了速率适配的可靠性。
图16所示的相关实施例介绍的是在需要提高接收端口速率的场景下,以字符为粒度的速率适配方法。下面介绍需要降低接收端口速率的场景下,以字符为粒度的速率适配方法。
如图17所示,为本申请实施例提供的另一种速率适配方法的流程图,该方法可以应用于图11所示的网络架构,该方法具体可以是中间节点或接收节点执行,或者其它需要进行速率适配的节点来执行。方法包括:
S1701、获取第一字符流,第一字符流包括相邻的第一码块对应的字符、至少两个速率适配码块对应的字符和第二码块对应的字符。
应理解,这里相邻的第一码块对应的字符、至少两个速率适配码块对应的字符和第二码块对应的字符,是指相邻的第一码块、至少两个速率适配码块以及第二码块对应的字符,关于相邻的第一码块、至少两个速率适配码块以及第二码块的介绍请参见上文S1301中的相关解释,这里不再赘述。
第一码块和第二码块的具体实现方式可以参考上文S1301中第一码块和第二码块的具体实现方式,这里不再赘述。
获取第一字符流的具体实现方式可以参考上文S1601中获取第一字符流的具体实现方式,不同之处仅在于这里第一码块对应的字符和第二码块对应的字符之间还有至少两个速率适配码块对应的字符。
S1702、当存在速率适配需求时,判断第一码块和第二码块的码块关系是否满足预设条件。
S1702的具体实现方式可以参见上文S1302的具体实现方式,这里不再赘述。
S1703、当第一码块和第二码块的码块关系不满足预设条件时,删除至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符,删除后第一码块对应的字符和第二码块对应的字符之间包括至少一个速率适配码块对应的字符。
S1703的具体实现方式与上述S1303类似,不同之处仅在于删除是以字符方式进行。具体的,对于不满足预设条件的第一码块和第二码块之间的全部速率适配字符删除后,对删除后的第一字符流重新编码,则将导致第一码块和第二码块相邻,且可能出现导致相邻的报文被接收端的PCS decode解读为出错的码块流的组合,如T和T、T和D、T和E、E和S等组合。因此需要至少保留至少一个速率适配码块对应的字符,以避免重编码后第一码块和第二码块相邻。
S1704、当第一码块和第二码块的码块关系满足预设条件时,删除至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符,删除后第一码块对应的字符和第二码块对应的字符之间没有速率适配码块对应的字符或者包括至少一个速率适配码块对应的字符。
S1704的具体实现方式与上述S1304类似,不同之处仅在于删除是以字符方式进行。具体的,对于满足预设条件的第一码块和第二码块之间的全部速率适配码块删除后,对删除后的第一字符流重新编码,则将导致第一码块和第二码块相邻,但是不会出现导致相邻的报文被接收端的PCS decode解读为出错的码块流的组合,如不会出现T和T、T和D、T和E、E和S等组合,所以删除后第一码块对应的字符和第二码块对应的字符之间可以没有速率适配码块对应的字符,也可以有速率适配码块对应的字符。
类似的,速率适配码块包括IDLE码块,但不排除还有其它可能性,比如还可以包括自定义的用于调整速率的码块,这里不做限制。相应的,速率适配码块对应的字符(简称速率适配字符)包括IDLE字符,但不排除还有其它可能性,比如还可以包括自定义的用于调整速率的字符,这里不做限制。后文以IDLE字符为例,且删除字符是以8个连续的 DILE字符为一组进行删除(8个DILE字符对应一个IDLE码块)。
在本申请实施例中,在第一码块对应的字符和第二码块对应多个字符之间删除至少一个速率适配码块对应的字符,包括但不限于以下几种实现方式:
1)在第一码块对应的最后一个字符之后,第二码块对应多个第一个字符之间删除至少一个速率适配码块对应的字符。
例如,第一字符流包括“DDDDDDDTIIIIIIIIIIIIIIIISDDDDDDD”,其中,第一码块为T7码块,对应字符“DDDDDDDT”,第二码块为S码块,对应字符“SDDDDDDD”,则可以在T7码块的字符“T7”之后,则在S码块的字符“S0”之前删除至少一个速率适配码块对应的字符,如删除““IIIIIIIIIIIIIIII””,删除后字符形成的字符组合为“DDDDDDDTSDDDDDDD”。
2)若第一码块最后几个字符均为IDLE字符,则可以在第一码块最后一个非IDLE字符之后,第二码块的第一个字符之前的任意位置删除至少一个IDLE码块对应的字符。换而言之,可以在第一码块的最后几个IDLE字符所在位置删除IDLE字符。
虽然删除的位置并非是在第一码块对应的最后一个字符之后以及第二码块对应的第一个字符之前,但是删除IDLE字符后形成的字符组合与在第一码块对应的最后一个字符之后以及第二码块对应的第一个字符之前删除IDLE字符后形成的字符组合是相同的,所以等同于是在第一码块对应的最后一个字符之后以及第二码块对应的第一个字符之前删除IDLE字符。
例如,第一字符流包括“DDDDTIIIIIIIIIIIIIIIIIIISDDDDDDD”,其中第一码块是T4码块,对应字符“DDDDTIII”,第二码块是S码块,对应字符“SDDDDDDD”,则可以有以下几种删除ILDE字符的方式:
1)在第一码块对应的最后一个字符之后以及第二码块对应的第一个字符之前删除两个IDLE码块,即删除““DDDDTIII(IIIIIIIIIIIIIIII)SDDDDDDD”中用“()”标识的部分,删除后的字符为“DDDDTIIISDDDDDDD”;
2)在第一码块对应的倒数第二个字符之后删除两个IDLE码块的字符,即删除“DDDDTII(IIIIIIIIIIIIIIII)ISDDDDDDD”中用“()”标识的部分,删除后的字符为“DDDDTIIISDDDDDDD”;
3)在第一码块对应的倒数第三个字符之后删除两个IDLE码块的字符,即删除“DDDDTI(IIIIIIIIIIIIIIII)IISDDDDDDD”中用“()”标识的部分,删除后的字符为“DDDDTIIISDDDDDDD”;
4)在第一码块对应的倒数第四个字符(即最后一个非IDLE字符)之后删除两个IDLE码块的字符,即删除“DDDDT(IIIIIIIIIIIIIIII)IIISDDDDDDD”中用“()”标识的部分,删除后的字符为“DDDDTIIISDDDDDDD”。
可见,上述四种删除方式最终的结果是一致的。
进一步的,在删除IDLE字符完成后,还对删除IDLE字符后的第一字符流进行编码,形成第二码块流。这样最终生成的码块流和图13所示实施例删除速率适配码块后形成的码块流的效果是一致的。
应理解,如果在对第一码块流进行解码时是对除预设码块之外的其它码块进行解码,那么这里在对删除字符后所获得的字符流进行编码之后,需要在重编码后获得的第二码块流中插入该预设码块,以避免原码块流中的信息缺失,保证速率适配的可靠性。
类似的,上述描述方式“满足”和“不满足”也可以相互置换,相应的预设条件也可以置换。但无论是“判断满足预设条件”还是“判断不满足预设条件”,或者是其它描述方式,只要最终获得的技术方案实质是相同的,或者说技术构思是相同的,那么均在本申请的保护范围之内。
通过上述可知,本申请实施例在通过对第一字符流进行识别和检测,在需要进行速率适配时,基于预先识别出会引起报文接收解读出现错误的码块关系组合对应的字符,避开这些可能引起错误的字符位置,进而在正确的字符位置进行速率适配字符的删除,可以保证接收侧对接收到报文的解读不受到速率适配的影响,可以提高速率适配的可靠性。
图17所示的相关实施例介绍的是在需要降低接收端口速率的场景下,第一码块和第二码块之间有多个速率适配码块时,以字符为粒度的速率适配方法。下面介绍在需要降低接收端口速率的场景下,第一码块和第二码块之间只有一个速率适配码块时,以字符为粒度的速率适配方法。
如图18所示,为本申请实施例提供的另一种速率适配方法的流程图,该方法可以应用于图11所示的网络架构,该方法具体可以是中间节点或接收节点执行,或者其它需要进行速率适配的节点来执行。方法包括:
S1801、获取第一字符流,第一码块流包括相邻的第一码块对应的字符、速率适配码块对应的字符以及第二码块对应的字符。
S1801的具体实现方式可以参考上述S1601、S1701等的具体实现方式,不同之处仅在于,S1801中第一码块对应的字符和第二码块对应的字符之间只有一个速率适配码块对应的字符。
S1802、当存在速率适配需求时,判断第一码块和第二码块的码块关系是否满足预设条件。
S1802的具体实现方式可以参考上述S1602、S1702的具体实现方式,不同之处仅在于,S1802中第一码块对应的字符和第二码块对应的字符之间只有一个速率适配码块对应的字符。
S1803、当第一码块和第二码块的码块关系满足预设条件时,删除速率适配码块对应的字符。
S1803的具体实现方式与上述S1503类似,不同之处仅在于删除是以字符方式进行。
或者说,S1803的具体实现方式与上述S1703类似,不同之处仅在于这里第一码块对应的字符和第二码块对应的字符之间只有一个速率适配码块对应的字符。
在不满足预设条件的情况下,要保留至少一个速率适配码块对应的字符,即不能删除速率适配码块对应的字符,而在满足预设条件的情况下,可以不保留速率适配码块对应的字符,所以可以删除速率适配码块对应的字符。
因为对于不满足预设条件的第一码块和第二码块,如果将第一码块对应的字符和第二码块对应的字符之间的速率适配字符删除后,对删除后的第一字符流重新编码,则将导致第一码块和第二码块相邻,且可能出现导致相邻的报文被接收端的PCS decode解读为出错的码块流的组合,如T和T、T和D、T和E、E和S等组合。因此,如果第一码块和第二码块的码块关系不满足预设条件,例如第一码块和第二码块是以下码块关系中的任意一种:{T,T},{T,D},{T,E},{E,S},第一码块对应的字符和第二码块对应的字符之间的速率适配 字符不能被删除,以避免重编码后出现{T,T},{T,D},{T,E},{E,S}等组合。
相反地,对于满足预设条件的第一码块和第二码块,如果将满足预设条件的第一码块对应的字符和第二码块对应的字符之间的速率适配字符删除,重编码后也将导致第一码块和第二码块相邻,但不会出现导致相邻的报文被接收端的PCS decode解读为出错的码块流的组合,如不会出现T和T、T和D、T和E、E和S等组合。因此,如果第一码块和第二码块的码块关系满足预设条件,例如第一码块和第二码块不是{T,T},{T,D},{T,E},{E,S}中的任何一种,或者第一码块和第二码块是{T,I},{T,S},{I,I},{O,I},{I,O},{I,S},{O,S},{O,O}中的任意一种,则第一码块对应的字符和第二码块对应的字符之间的速率适配字符可以被删除。
进一步的,在删除IDLE字符完成后,还对删除IDLE字符后的第一字符流进行编码,形成第二码块流。这样最终生成的码块流和图15所示实施例删除速率适配码块后形成的码块流的效果是一致的。
应理解,如果在对第一码块流进行解码时是对除预设码块之外的其它码块进行解码,那么这里在对删除字符后所获得的字符流进行编码之后,需要在重编码后获得的第二码块流中插入该预设码块,以避免原码块流中的信息缺失,保证速率适配的可靠性。
类似的,上述描述方式“满足”也可以置换为“不满足”,相应的预设条件也可以置换。但无论是“判断满足预设条件”还是“判断不满足预设条件”,或者是其它描述方式,只要最终获得的技术方案实质是相同的,或者说技术构思是相同的,那么均在本申请的保护范围之内。
通过上述可知,本申请实施例在通过对第一字符流进行识别和检测,在需要进行速率适配时,基于预先识别出会引起报文接收出现错误的码块关系组合所对应的字符,避开这些可能引起错误的字符位置,进而在正确的字符位置进行速率适配字符的删除,可以保证接收侧对接收到报文的解读不受到速率适配的影响,提高了速率适配的可靠性。
应理解,本申请实施例中的各个实施方式可以相互结合以实现不同的技术效果。
参见图19,基于同一技术构思,本申请实施例还提供一种速率适配装置1900,所述装置1900包括:
获取单元1901,用于获取第一码块流,所述第一码块流包括相邻的第一码块和第二码块;
处理单元1902,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,在所述第一码块和所述第二码块之间插入至少一个速率适配码块。
可选的,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;
所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
可选的,所述预设条件包括:
所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,
所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
可选的,所述处理单元1902在判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件时,具体用于:
按照码块顺序依次检测所述第一码块流中每个码块的类型;
当检测到帧间隙的任一码块后,将所述任一码块作为第一码块,将所述任一码块之后的相邻码块作为第二码块,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件。
可选的,所述处理单元1902还用于:在所述第一码块和所述第二码块之间插入至少一个速率适配码块之前,对所述第一码块流进行解码,获得第一字符流;
所述处理单元1902在所述第一码块和所述第二码块之间插入至少一个速率适配码块时,具体用于:
在所述第一码块对应的字符和所述第二码块对应字符之间插入至少一个速率适配码块对应的字符。
可选的,所述处理单元1902还用于:
在对所述第一码块流进行解码之前,对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块。
可选的,所述处理单元1902在对所述第一码块流进行解码时,具体用于:
对除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
可选的,所述处理单元1902还用于:
在所述第一码块对应的字符和所述第二码块对应字符之间插入至少一个速率适配码块对应的字符之后,对插入所述至少一个速率适配码块对应的字符后所获得的字符流进行编码,获得第二码块流;在所述第二码块流中插入所述预设码块。
参见图20,基于同一技术构思,本申请实施例还提供一种速率适配装置2000,包括:
获取单元2001,用于获取第一码块流,所述第一码块流包括相邻的第一码块、至少两个速率适配码块以及第二码块;
处理单元2002,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系不满足所述预设条件且存在速率适配需求时,删除所述至少两个速率适配码块中的至少一个速率适配码块,删除后所述第一码块和所述第二码块之间包括至少一个速率适配码块。
可选的,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;
所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
可选的,所述预设条件包括:
所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,
所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
可选的,所述处理单元2002在判断所述第一码块和所述第二码块的码块关系是否满足预设条件时,具体用于:
按照码块顺序依次检测所述第一码块流中每个码块的类型;
当检测到帧间隙的任一码块后,将所述任一码块作为第一码块,将所述任一码块之后且与所述任一码块间隔至少两个速率适配码块的码块作为第二码块,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件。
可选的,所述处理单元2002还用于:在删除所述至少两个速率适配码块中的至少一个速率适配码块之前,对所述第一码块流进行解码,获得第一字符流;
所述处理单元2002在删除所述至少两个速率适配码块中的至少一个速率适配码块时,具体用于:删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符。
可选的,所述处理单元2002还用于:
在对所述第一码块流进行解码之前,对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块。
可选的,所述处理单元2002在对所述第一码块流进行解码时,具体用于:对除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
可选的,所述处理单元2002还用于:
在删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符之后,对删除所述至少一个速率适配码块对应的字符之后所获得的字符流进行编码,获得第三码块流;在所述第二码块流中插入所述预设码块。
可选的,所述处理单元2002还用于:
当所述第一码块和所述第二码块的码块关系满足所述预设条件时,删除所述至少两个速率适配码块中的至少一个速率适配码块,删除后所述第一码块和所述第二码块之间没有速率适配码块或包括至少一个速率适配码块。
参见图21,基于同一技术构思,本申请实施例还提供一种速率适配装置2100,该装置2100包括:
获取单元2101,用于获取第一码块流,所述第一码块流包括相邻的第一码块、至少两个速率适配码块以及第二码块;
处理单元2102,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,删除所述至少两个速率适配码块中的至少一个速率适配码块,删除后所述第一码块和所述第二码块之间没有速率适配码块或包括至少一个速率适配码块。
可选的,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
可选的,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
可选的,所述处理单元2102在判断所述第一码块和所述第二码块的码块关系是否满 足预设条件时,具体用于:按照码块顺序依次检测所述第一码块流中每个码块的类型;当检测到帧间隙的任一码块后,将所述任一码块作为第一码块,将所述任一码块之后且与所述任一码块间隔至少两个速率适配码块的码块作为第二码块,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件。
可选的,所述处理单元2102还用于:在删除所述至少两个速率适配码块中的至少一个速率适配码块之前,对所述第一码块流进行解码,获得第一字符流;删除所述至少两个速率适配码块中的至少一个速率适配码块,包括:删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符。
可选的,所述处理单元2102还用于:在对所述第一码块流进行解码之前,对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
可选的,所述处理单元2102对所述第一码块流进行解码时,具体用于:对除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
可选的,所述处理单元2102还用于:在删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符之后,对删除所述至少一个速率适配码块对应的字符之后所获得的字符流进行编码,获得第三码块流;在所述第二码块流中插入所述预设码块。
参见图22,基于同一技术构思,本申请实施例还提供一种速率适配装置2200,该装置2200包括:
获取单元2201,用于获取第一码块流,所述第一码块流包括相邻的第一码块、速率适配码块以及第二码块;
处理单元2202,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,删除所述速率适配码块。
可选的,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
可选的,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
可选的,所述处理单元2202在判断所述第一码块和所述第二码块的码块关系是否满足预设条件时,具体用于:按照码块顺序依次检测所述第一码块流中每个码块的类型;当检测到帧间隙的任一码块后,将所述任一码块作为第一码块,将所述任一码块之后且与所述任一码块间隔一个速率适配码块的码块作为第二码块,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件。
可选的,所述处理单元2202还用于:在删除所述速率适配码块之前,对所述第一码块流进行解码,获得第一字符流;删除所述速率适配码块,包括:删除所述速率适配码块 对应的字符。
可选的,所述处理单元2202还用于:在对所述第一码块流进行解码之前,对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
可选的,所述处理单元2202对所述第一码块流进行解码时,具体用于:对除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
可选的,所述处理单元2202还用于:在删除所述速率适配码块对应的字符之后,对删除所述速率适配码块对应的字符之后所获得的字符流进行编码,获得第三码块流;在所述第二码块流中插入所述预设码块。
参见图23,基于同一技术构思,本申请实施例还提供一种速率适配装置2300,该装置2300包括:
获取单元2301,用于获取第一字符流,所述第一字符流包括相邻的第一码块对应的字符和第二码块对应的字符;
处理单元2302,用于判断所述第一码块和第二码块的码块关系是否满足预设条件;当所述第一码块和第二码块的码块关系满足预设条件且存在速率适配需求时,在所述第一码块对应的字符和所述第二码块对应的字符之间插入至少一个速率适配码块对应的字符。
可选的,所述获取单元2301还用于:在获取第一字符流之前,获取第一码块流,所述第一码块流包括相邻的第一码块和第二码块;对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块,获得纠错后的第一码块流;对所述纠错后的第一码块流进行解码,获得第一字符流。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
可选的,所述获取单元2301对所述纠错后的第一码块流进行解码,具体用于:对所述纠错后的第一码块流中除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
可选的,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
可选的,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
参见图24基于同一技术构思,本申请实施例还提供一种速率适配装置2400,该装置2400包括:
获取单元2401,用于获取第一字符流,所述第一字符流包括相邻的第一码块对应的字符、至少两个速率适配码块对应的字符和第二码块对应的字符;
处理单元2402,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系不满足所述预设条件且存在速率适配需求时, 删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符,删除后所述第一码块对应的字符和所述第二码块对应的字符之间包括至少一个速率适配码块对应的字符。
可选的,所述获取单元2401还用于:在获取第一字符流之前,获取第一码块流,所述第一码块流包括相邻的第一码块、至少两个速率适配码块和第二码块;对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块,获得纠错后的第一码块流;对所述纠错后的第一码块流进行解码,获得第一字符流。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
可选的,所述获取单元2401对所述纠错后的第一码块流进行解码时,具体用于:对所述纠错后的第一码块流中除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
可选的,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
可选的,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
参见图25,基于同一技术构思,本申请实施例还提供一种速率适配装置2500,该装置2500包括:
获取单元2501,用于获取第一字符流,所述第一字符流包括相邻的第一码块对应的字符、至少两个速率适配码块对应的字符和第二码块对应的字符;
处理单元2502,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符,删除后所述第一码块对应的字符和所述第二码块对应的字符之间没有速率适配码块对应的字符或包括至少一个速率适配码块对应的字符。
可选的,所述获取单元2501还用于:在获取第一字符流之前,获取第一码块流,所述第一码块流包括相邻的第一码块、至少两个速率适配码块和第二码块;对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块,获得纠错后的第一码块流;对所述纠错后的第一码块流进行解码,获得第一字符流。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
可选的,所述获取单元2501对所述纠错后的第一码块流进行解码时,具体用于:对所述纠错后的第一码块流中除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
可选的,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
可选的,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
参见图26,基于同一技术构思,本申请实施例还提供一种速率适配装置2600,该装置2600包括:
获取单元2601,用于获取第一字符流,所述第一码块流包括相邻的第一码块对应的字符、速率适配码块对应的字符以及第二码块对应的字符;
处理单元2602,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,删除所述速率适配码块对应的字符。
可选的,所述获取单元2601还用于:在获取第一字符流之前,获取第一码块流,所述第一码块流包括相邻的第一码块、速率适配码块和第二码块;对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块,获得纠错后的第一码块流;对所述纠错后的第一码块流进行解码,获得第一字符流。当然,这里的替换为E码块仅为示例而非限定,实际实施时,还可以替换为其它码块,如自定义的码块。
可选的,所述获取单元2601对所述纠错后的第一码块流进行解码时,具体用于:对所述纠错后的第一码块流中除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
可选的,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
可选的,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
基于同一技术构思,参见图27,本申请实施例还提供一种网络设备2700,包括:
至少一个处理器2701;所述至少一个处理器2701通过执行存储器2702存储的指令,使得所述装置执行如图12、13、15、16、17或18所示实施例中所述的方法。
可选的,网络设备2700还包括与所述至少一个处理器2701通信连接的通信接口2703。
可选的,所述存储器2702位于所述网络设备2700之外。
可选的,所述网络设备2700包括所述存储器2702,所述存储器2702与所述至少一个处理器2701相连,所述存储器2702存储有可被所述至少一个处理器2701执行的指令。
可选的,所述存储器2702位于所述网络设备2700之外。
可选的,所述网络设备2700包括所述存储器2702,所述存储器2702与所述至少一个处理器2701相连,所述存储器2702存储有可被所述至少一个处理器2701执行的指令。附图27用虚线表示存储器2702和通信接口2703对于网络设备2700是可选的。
其中,所述处理器2701和所述存储器2702可以通过接口电路耦合,也可以集成在一起,这里不做限制。
本申请实施例中不限定上述处理器2701、存储器2702以及通信接口2703之间的具体连接介质。例如,本申请实施例在图27中以处理器2701、存储器2702以及通信接口2703之间通过总线2704连接,总线在图27中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图27中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
应理解,本申请实施例中提及的处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
示例性的,处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
应理解,本申请实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Eate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。
需要说明的是,当处理器为通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件时,存储器(存储模块)可以集成在处理器中。
应注意,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
基于同一技术构思,本申请实施例还提供一种计算机可读存储介质,包括程序或指令,当所述程序或指令在计算机上运行时,使得如图12、13、15、16、17或18所示实施例中所述的方法被执行。
基于同一技术构思,本申请实施例还提供一种芯片,所述芯片与存储器耦合,用于读取并执行所述存储器中存储的程序指令,使得如图12、13、15、16、17或18所示实施例中所述的方法被执行。
基于同一技术构思,本申请实施例还提供一种计算机程序产品,包括指令,当其在计 算机上运行时,使得如图12、13、15、16、17或18所示实施例中所述的方法被执行。
本申请实施例是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,数字通用光盘(digital versatile disc,DVD))、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。
Claims (36)
- 一种速率适配方法,其特征在于,所述方法包括:获取第一码块流,所述第一码块流包括相邻的第一码块和第二码块;判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,在所述第一码块和所述第二码块之间插入至少一个速率适配码块。
- 如权利要求1所述的方法,其特征在于,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
- 如权利要求1所述的方法,其特征在于,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
- 如权利要求1-3任一项所述的方法,其特征在于,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件,包括:按照码块顺序依次检测所述第一码块流中每个码块的类型;当检测到帧间隙的任一码块后,将所述任一码块作为第一码块,将所述任一码块之后的相邻码块作为第二码块,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件。
- 如权利要求1-3任一项所述的方法,其特征在于,在所述第一码块和所述第二码块之间插入至少一个速率适配码块之前,所述方法还包括:对所述第一码块流进行解码,获得第一字符流;在所述第一码块和所述第二码块之间插入至少一个速率适配码块,包括:在所述第一码块对应的字符和所述第二码块对应字符之间插入至少一个速率适配码块对应的字符。
- 如权利要求5所述的方法,其特征在于,在对所述第一码块流进行解码之前,所述方法还包括:对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块。
- 如权利要求5所述的方法,其特征在于,对所述第一码块流进行解码,包括:对除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
- 如权利要求7所述的方法,其特征在于,在所述第一码块对应的字符和所述第二码块对应字符之间插入至少一个速率适配码块对应的字符之后,还包括:对插入所述至少一个速率适配码块对应的字符后所获得的字符流进行编码,获得第二码块流;在所述第二码块流中插入所述预设码块。
- 一种速率适配方法,其特征在于,包括:获取第一码块流,所述第一码块流包括相邻的第一码块、至少两个速率适配码块以及第二码块;判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系不满足所述预设条件且存在速率适配需求时,删除所述至少两个速率适配码块中的至少一个速率适配码块,删除后所述第一码块和所述第二码块之间包括至少一个速率适配码块。
- 如权利要求9所述的方法,其特征在于,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
- 如权利要求9所述的方法,其特征在于,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
- 如权利要求9-11任一项所述的方法,其特征在于,判断所述第一码块和所述第二码块的码块关系是否满足预设条件,包括:按照码块顺序依次检测所述第一码块流中每个码块的类型;当检测到帧间隙的任一码块后,将所述任一码块作为第一码块,将所述任一码块之后且与所述任一码块间隔至少两个速率适配码块的码块作为第二码块,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件。
- 如权利要求9-11任一项所述的方法,其特征在于,在删除所述至少两个速率适配码块中的至少一个速率适配码块之前,所述方法还包括:对所述第一码块流进行解码,获得第一字符流;删除所述至少两个速率适配码块中的至少一个速率适配码块,包括:删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符。
- 如权利要求13所述的方法,其特征在于,在对所述第一码块流进行解码之前,所述方法还包括:对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块。
- 如权利要求13所述的方法,其特征在于,对所述第一码块流进行解码,包括:对除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
- 如权利要求15所述的方法,其特征在于,在删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符之后,还包括:对删除所述至少一个速率适配码块对应的字符之后所获得的字符流进行编码,获得第三码块流;在所述第二码块流中插入所述预设码块。
- 如权利要求9-11任一项所述的方法,其特征在于,还包括:当所述第一码块和所述第二码块的码块关系满足所述预设条件时,删除所述至少两个速率适配码块中的至少一个速率适配码块,删除后所述第一码块和所述第二码块之间没有 速率适配码块或包括至少一个速率适配码块。
- 一种速率适配装置,其特征在于,所述装置包括:获取单元,用于获取第一码块流,所述第一码块流包括相邻的第一码块和第二码块;处理单元,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系满足所述预设条件且存在速率适配需求时,在所述第一码块和所述第二码块之间插入至少一个速率适配码块。
- 如权利要求18所述的装置,其特征在于,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
- 如权利要求18所述的装置,其特征在于,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
- 如权利要求18-20任一项所述的装置,其特征在于,所述处理单元在判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件时,具体用于:按照码块顺序依次检测所述第一码块流中每个码块的类型;当检测到帧间隙的任一码块后,将所述任一码块作为第一码块,将所述任一码块之后的相邻码块作为第二码块,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件。
- 如权利要求18-20任一项所述的装置,其特征在于,所述处理单元还用于:在所述第一码块和所述第二码块之间插入至少一个速率适配码块之前,对所述第一码块流进行解码,获得第一字符流;所述处理单元在所述第一码块和所述第二码块之间插入至少一个速率适配码块时,具体用于:在所述第一码块对应的字符和所述第二码块对应字符之间插入至少一个速率适配码块对应的字符。
- 如权利要求22所述的装置,其特征在于,所述处理单元还用于:在对所述第一码块流进行解码之前,对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块。
- 如权利要求22所述的装置,其特征在于,所述处理单元在对所述第一码块流进行解码时,具体用于:对除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
- 如权利要求24所述的装置,其特征在于,所述处理单元还用于:在所述第一码块对应的字符和所述第二码块对应字符之间插入至少一个速率适配码块对应的字符之后,对插入所述至少一个速率适配码块对应的字符后所获得的字符流进行编码,获得第二码块流;在所述第二码块流中插入所述预设码块。
- 一种速率适配装置,其特征在于,包括:获取单元,用于获取第一码块流,所述第一码块流包括相邻的第一码块、至少两个速率适配码块以及第二码块;处理单元,用于判断所述第一码块和所述第二码块的码块关系是否满足预设条件;当所述第一码块和所述第二码块的码块关系不满足所述预设条件且存在速率适配需求时,删除所述至少两个速率适配码块中的至少一个速率适配码块,删除后所述第一码块和所述第二码块之间包括至少一个速率适配码块。
- 如权利要求26所述的装置,其特征在于,所述第一码块是T码块或者T码块之后的码块,其中所述T码块是帧结束码块;所述第二码块是S码块或者S码块之前的码块,其中所述S码块是帧开始码块。
- 如权利要求26所述的装置,其特征在于,所述预设条件包括:所述第一码块和所述第二码块的码块关系不是以下码块关系中的任何一种:T码块和T码块、T码块和D码块、T码块和E码块、D码块和S码块、E码块和S码块;和/或,所述第一码块和所述第二码块的码块关系是以下码块关系中的任意一种:T码块和帧间隙IPG码块、IPG码块和S码块、T码块和S码块、IPG码块和IPG码块;其中,所述IPG码块包括空闲IDLE码块、O码块、E码块或D码块中的一种或多种。
- 如权利要求26-28任一项所述的装置,其特征在于,所述处理单元在判断所述第一码块和所述第二码块的码块关系是否满足预设条件时,具体用于:按照码块顺序依次检测所述第一码块流中每个码块的类型;当检测到帧间隙的任一码块后,将所述任一码块作为第一码块,将所述任一码块之后且与所述任一码块间隔至少两个速率适配码块的码块作为第二码块,判断所述第一码块和所述第二码块的码块关系是否满足所述预设条件。
- 如权利要求26-28任一项所述的装置,其特征在于,所述处理单元还用于:在删除所述至少两个速率适配码块中的至少一个速率适配码块之前,对所述第一码块流进行解码,获得第一字符流;所述处理单元在删除所述至少两个速率适配码块中的至少一个速率适配码块时,具体用于:删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符。
- 如权利要求30所述的装置,其特征在于,所述处理单元还用于:在对所述第一码块流进行解码之前,对所述第一码块流进行码块格式和码块顺序的检查,如果存在码块格式和/或码块顺序不符合规定的码块,则将所述码块格式和/或码块顺序不符合规定的码块替换为E码块。
- 如权利要求30所述的装置,其特征在于,所述处理单元在对所述第一码块流进行解码时,具体用于:对除预设码块之外的其它码块进行解码,其中所述预设码块包括O码块。
- 如权利要求32所述的装置,其特征在于,所述处理单元还用于:在删除所述至少两个速率适配码块对应的字符中的至少一个速率适配码块对应的字符之后,对删除所述至少一个速率适配码块对应的字符之后所获得的字符流进行编码,获得第三码块流;在所述第二码块流中插入所述预设码块。
- 如权利要求26-28任一项所述的装置,其特征在于,所述处理单元还用于:当所述第一码块和所述第二码块的码块关系满足所述预设条件时,删除所述至少两个速率适配码块中的至少一个速率适配码块,删除后所述第一码块和所述第二码块之间没有 速率适配码块或包括至少一个速率适配码块。
- 一种网络设备,其特征在于,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器、通信接口;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述至少一个处理器通过执行所述存储器存储的指令,使得所述装置通过所述通信接口执行如权利要求1-17中任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,包括程序或指令,当所述程序或指令在计算机上运行时,使得如权利要求1-17中任一项所述的方法被执行。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP21841533.9A EP4175210A4 (en) | 2020-07-13 | 2021-07-02 | Rate adaptation method and apparatus |
| US18/153,411 US12567923B2 (en) | 2020-07-13 | 2023-01-12 | Rate adaptation method and apparatus |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010670874.3A CN113938245A (zh) | 2020-07-13 | 2020-07-13 | 一种速率适配方法及装置 |
| CN202010670874.3 | 2020-07-13 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US18/153,411 Continuation US12567923B2 (en) | 2020-07-13 | 2023-01-12 | Rate adaptation method and apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022012354A1 true WO2022012354A1 (zh) | 2022-01-20 |
Family
ID=79273559
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2021/104241 Ceased WO2022012354A1 (zh) | 2020-07-13 | 2021-07-02 | 一种速率适配方法及装置 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US12567923B2 (zh) |
| EP (1) | EP4175210A4 (zh) |
| CN (1) | CN113938245A (zh) |
| WO (1) | WO2022012354A1 (zh) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117579220A (zh) * | 2022-08-08 | 2024-02-20 | 华为技术有限公司 | 一种故障码块处理方法及装置 |
| CN118041487A (zh) * | 2022-11-07 | 2024-05-14 | 中兴通讯股份有限公司 | 64b/66b编码信号的处理方法、通信设备和存储介质 |
| CN119030658A (zh) * | 2023-05-25 | 2024-11-26 | 中兴通讯股份有限公司 | 数据的处理方法、网络侧设备及存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106301678A (zh) * | 2015-06-08 | 2017-01-04 | 华为技术有限公司 | 一种数据处理的方法、通信设备及通信系统 |
| CN109995455A (zh) * | 2017-12-29 | 2019-07-09 | 华为技术有限公司 | 一种数据传输方法、通信设备及存储介质 |
| CN109995434A (zh) * | 2017-12-29 | 2019-07-09 | 华为技术有限公司 | 一种数据传输方法、通信设备及存储介质 |
| CN111092686A (zh) * | 2019-11-28 | 2020-05-01 | 中兴通讯股份有限公司 | 一种数据传输方法、装置、终端设备和存储介质 |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9270299B2 (en) * | 2011-02-11 | 2016-02-23 | Qualcomm Incorporated | Encoding and decoding using elastic codes with flexible source block mapping |
| CN111147185B (zh) * | 2015-01-22 | 2025-05-02 | 华为技术有限公司 | 一种利用以太网信道传输业务信号的方法及通信设备 |
| CN107438029B (zh) * | 2016-05-27 | 2021-02-09 | 华为技术有限公司 | 转发数据的方法和设备 |
| CN113300810B (zh) * | 2016-12-23 | 2023-03-10 | 华为技术有限公司 | 一种传输速率的调整方法及网络设备 |
| CN110430010B (zh) * | 2017-01-05 | 2020-08-07 | 华为技术有限公司 | 信息处理的方法和设备 |
| WO2019015462A1 (zh) * | 2017-07-18 | 2019-01-24 | 华为技术有限公司 | 一种检测块发送和接收的方法、网络设备和系统 |
| CN109391461B (zh) * | 2017-08-11 | 2021-08-13 | 华为技术有限公司 | 透传业务频率的方法和设备 |
| WO2020230008A1 (en) * | 2019-05-14 | 2020-11-19 | Telefonaktiebolaget Lm Ericsson (Publ) | Code block group (cbg) based retransmission on configured grant resources |
-
2020
- 2020-07-13 CN CN202010670874.3A patent/CN113938245A/zh active Pending
-
2021
- 2021-07-02 WO PCT/CN2021/104241 patent/WO2022012354A1/zh not_active Ceased
- 2021-07-02 EP EP21841533.9A patent/EP4175210A4/en active Pending
-
2023
- 2023-01-12 US US18/153,411 patent/US12567923B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106301678A (zh) * | 2015-06-08 | 2017-01-04 | 华为技术有限公司 | 一种数据处理的方法、通信设备及通信系统 |
| CN109995455A (zh) * | 2017-12-29 | 2019-07-09 | 华为技术有限公司 | 一种数据传输方法、通信设备及存储介质 |
| CN109995434A (zh) * | 2017-12-29 | 2019-07-09 | 华为技术有限公司 | 一种数据传输方法、通信设备及存储介质 |
| CN111092686A (zh) * | 2019-11-28 | 2020-05-01 | 中兴通讯股份有限公司 | 一种数据传输方法、装置、终端设备和存储介质 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4175210A4 * |
Also Published As
| Publication number | Publication date |
|---|---|
| US20230155715A1 (en) | 2023-05-18 |
| CN113938245A (zh) | 2022-01-14 |
| EP4175210A4 (en) | 2023-12-06 |
| US12567923B2 (en) | 2026-03-03 |
| EP4175210A1 (en) | 2023-05-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2022012354A1 (zh) | 一种速率适配方法及装置 | |
| US11108895B2 (en) | Method for providing path signal overhead in the 64B/66B character stream of an itu-t metro transport network using micro-packets | |
| JP5155330B2 (ja) | 66bシステムにおいて順方向誤り訂正を適用するための方法と装置 | |
| US7890840B2 (en) | Enhancing the Ethernet FEC state machine to strengthen correlator performance | |
| US9337960B2 (en) | Encoding and decoding methods and apparatuses of ethernet physical layer | |
| US20110149970A1 (en) | Method of transmitting ethernet frame in network bridge and the bridge | |
| JP4739332B2 (ja) | Fecコード化されたイーサネット(登録商標)フレームにおけるデータをデリニエートするための方法および装置 | |
| WO2008083627A1 (fr) | Procédé, système et dispositif destinés à retransmettre des données | |
| JP2025023173A (ja) | 符号語同期方法、受信器、ネットワークデバイス、およびネットワークシステム | |
| CN114257334A (zh) | 一种数据编码方法、数据解码方法及通信装置 | |
| WO2023098430A1 (zh) | 一种数据包的处理方法、通信装置及通信系统 | |
| JP2005143098A (ja) | 入力データパケットを転送および回復する方法および装置 | |
| CN112511266A (zh) | 传输方法、检测方法及装置、获取方法、网络设备及系统 | |
| CN113517949A (zh) | 码字同步方法、接收器、网络设备及网络系统 | |
| WO2021196774A1 (zh) | 发送和处理信息的方法、以太网设备、计算机可读介质 | |
| CN102341784B (zh) | MoCA中发生错误时快速MAP恢复的方法 | |
| CN119628798A (zh) | 一种数据重传方法、装置和系统 | |
| JPH10178419A (ja) | 誤り訂正方法および装置 | |
| CN106656416B (zh) | 基于网络编码和路径保护的光网络单链路故障保护方法 | |
| WO2019184998A1 (zh) | 一种通信方法、通信设备及存储介质 | |
| WO2023016265A1 (zh) | 一种数据编码方法、数据译码方法及相关设备 | |
| WO2025025760A1 (zh) | 低延时同步时钟及数据传输方法 | |
| JP2655099B2 (ja) | シリアル通信方法 | |
| WO2025050806A1 (zh) | 处理数据的方法及装置、通信系统 | |
| US20020162071A1 (en) | Forward error control of redundantly-transmitted codewords |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21841533 Country of ref document: EP Kind code of ref document: A1 |
|
| ENP | Entry into the national phase |
Ref document number: 2021841533 Country of ref document: EP Effective date: 20230126 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |