WO2024113449A1 - Flexible ethernet data block processing method and apparatus, storage medium, and electronic device - Google Patents

Flexible ethernet data block processing method and apparatus, storage medium, and electronic device Download PDF

Info

Publication number
WO2024113449A1
WO2024113449A1 PCT/CN2022/143204 CN2022143204W WO2024113449A1 WO 2024113449 A1 WO2024113449 A1 WO 2024113449A1 CN 2022143204 W CN2022143204 W CN 2022143204W WO 2024113449 A1 WO2024113449 A1 WO 2024113449A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
beat
channels
block
channel
Prior art date
Application number
PCT/CN2022/143204
Other languages
French (fr)
Chinese (zh)
Inventor
杨宇
Original Assignee
苏州异格技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 苏州异格技术有限公司 filed Critical 苏州异格技术有限公司
Publication of WO2024113449A1 publication Critical patent/WO2024113449A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/34Flow control; Congestion control ensuring sequence integrity, e.g. using sequence numbers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path

Definitions

  • the present application relates to the field of data communications, and in particular to a flexible Ethernet data block processing method, device, storage medium and electronic device.
  • Flexible Ethernet is a FlexE Shim layer inserted into the PCS layer (Physical Coding Sublayer) of high-speed Ethernet. It can cut the large-bandwidth data of the MAC (Media Access Control) layer into multiple small-bandwidth data streams, and insert overhead blocks into the data stream to transmit configuration information.
  • the receiver recovers the small-bandwidth data stream into a large-bandwidth data stream by extracting the configuration information.
  • the insertion of the overhead block is done after Flexible Ethernet distributes the data on the Calendar log (which is the mechanism for the FlexE Shim layer to handle mapping and demapping) to each PHY channel, and then inserts the overhead block. The locking of the overhead block is done before multiple PHY layer channels are sent to the Calendar log.
  • the data is aggregated to the upper layer of the Calendar log.
  • the location of the next overhead block can be predicted and the information of the overhead block can be extracted.
  • the configuration information is used in the FlexE Shim layer, and the configuration information extracted from the overhead block is used to demap the data from the Calendar log.
  • Overhead blocks do not appear on all channels at the same time, so a method is needed to rearrange the data while deleting the overhead blocks so that the order of valid data is not disrupted.
  • the instance of Flexible Ethernet 100G data is distributed on multiple data channels for transmission, and the overhead blocks may appear on any channel. It is difficult to locate and extract them, resulting in difficulty in restoring the order of valid data in the data stream.
  • the main purpose of the present application is to provide a flexible Ethernet data block processing method, device, storage medium and electronic device to solve the problem in the related art that there are data blocks in the data stream of the flexible Ethernet, the data blocks do not appear at the same time, and are difficult to locate and extract, resulting in the difficulty in restoring the order of valid data in the data stream.
  • a method for processing data blocks of a flexible Ethernet comprising: receiving a data stream of multi-channel concurrent transmission of a physical layer, wherein the data stream comprises a plurality of data frames, the data frame comprises a plurality of data beats, the data beat comprises a data unit of at least one data section, and a data block inserted between the data units, the data block being used to identify configuration information of the data stream; searching for the data block inserted in the data beat according to a counter; in the case of finding the data block, extracting the data block of a target channel in the multi-channel, and sending the data unit of the previous data beat that matches the target channel in the cache and that has not been sent, wherein the target channel is the channel where the located data block is located; transmitting the matched target data unit through other channels other than the target channel in the multi-channel, wherein the target data unit is the earliest data unit in the order of the data unit that matches the other channels in
  • transmitting the matching target data unit through other channels other than the target channel in the multiple channels includes: reading the data unit of the previous data beat cached in the cache; allocating the data unit in the cache to matching channels in the other channels for transmission; and transmitting the matching data unit in the data beat currently received through the channels in the other channels that are not allocated with the cached data unit.
  • the method further includes: when each channel of the multiple channels completes the extraction of a data block once, concurrently sending a blank block through the multiple channels; wherein the blank block is used to instruct the receiving end of the data stream to isolate the restoration process of the data beat.
  • searching for the data blocks inserted in the data beat according to the counter includes: recording the beat number of the currently received data beat in the current restoration process by a first counter, and recording the block number of the located data block in the restoration process by a second counter, wherein the number of data units or data blocks contained in the data beat is the same as the number of channels of the multi-channels, and the number of data blocks in the restoration process is the same as the number of channels of the channels; determining the position of the currently located data block according to the beat number and the block number.
  • receiving data beats of a data stream of a multi-channel concurrent transmission of a flexible Ethernet includes: receiving a bit code data stream sent by a physical layer to a logical layer of the flexible Ethernet, wherein the bit code data stream is sent in beats.
  • the method further includes: when no data block is found, reading data units of the previous data beat of the cache from the cache; allocating the data units in the cache to matching channels in the multiple channels for transmission; and when no channels in the multiple channels match the data units in the cache, transmitting the matching data units in the data beat currently received.
  • caching the data beats of the currently received data stream includes: caching the data beats of the currently received data stream into a register; caching the unsent data units in the currently received data beat includes: caching the unsent data units in the currently received data beat into the register.
  • a data block processing device for flexible Ethernet comprising: a receiving module, used to receive a data stream of multi-channel concurrent transmission of a physical layer, wherein the data stream comprises a plurality of data frames, the data frame comprises a plurality of data beats, the data beat comprises a data unit of at least one data frame, and a data block inserted between the data units, the data block is used to identify the configuration information of the data stream; a search module, used to search for the data block inserted in the data beat according to a counter; an extraction module, used to extract the data block of a target channel in the multi-channel when a data block is found; A row extractor is used to extract and send the data unit that has not been sent in the previous data beat that matches the target channel in the cache, wherein the target channel is the channel where the located data block is located; a transmission module is used to transmit the matched target data unit through other channels other than the target channel in the multiple channels,
  • a computer-readable storage medium is provided, wherein the storage medium is used to store computer-readable program instructions, wherein when the computer-readable program instructions are executed by a processor, any one of the above-mentioned methods for processing data blocks of a flexible Ethernet is implemented.
  • an electronic device comprising one or more processors and a memory, wherein the memory is used to store computer-readable program instructions, wherein when the computer-readable program instructions are executed by the one or more processors, the one or more processors implement the method for processing data blocks of a flexible Ethernet as described in any one of the above.
  • the present application After receiving the data beat in the data frame of the data stream, the present application searches whether the data beat contains a data block. If found, it means that the data beat includes a data block.
  • the data block is extracted through the target channel used to transmit the data block, and the matching target data unit is transmitted through other channels used to transmit the data beat. Specifically, for other channels, if there is a data unit of the previous beat in the cache, the data unit of the previous beat is obtained and output from the exchange. If there is no matching data unit in the cache, the matching data unit is directly obtained from the received data beat and sent. The purpose of this is to correct the misalignment of the order of the data units of the valid data caused by the insertion of data blocks when the data stream is generated.
  • the unsent data units in the received data beat are cached and combined with some data units of the next beat to restore the valid data of the beat.
  • the purpose of continuously searching and extracting data blocks is achieved.
  • the effective data misalignment caused by data block insertion is accurately corrected, and the technical effect of accurately locating and extracting data blocks and restoring valid data is achieved.
  • FIG1 is a flow chart of a method for processing a data block of a flexible Ethernet according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a multi-channel data stream structure with inserted data blocks provided according to an embodiment of the present application
  • FIG3 is a schematic diagram of a data stream after extracting data blocks according to an embodiment of the present application.
  • FIG4 is a schematic diagram of data block locations in a multi-channel data stream according to an embodiment of the present application.
  • FIG5 is a schematic diagram of a data block processing device of a flexible Ethernet according to an embodiment of the present application.
  • FIG6 is a schematic diagram of an electronic device provided according to an embodiment of the present application.
  • FIG. 1 is a flow chart of a method for processing a data block of a flexible Ethernet according to an embodiment of the present application. As shown in FIG. 1 , the method includes the following steps:
  • Step S101 receiving a data stream of multi-channel concurrent transmission at the physical layer, wherein the data stream includes multiple data frames, the data frame includes multiple data beats, the data beat includes a data unit of at least one data frame, and data blocks inserted between the data units, the data blocks are used to identify configuration information of the data stream.
  • Step S102 searching for the data block inserted in the data beat according to the counter.
  • Step S103 when a data block is found, extract the data block of the target channel in the multiple channels, and send the unsent data unit of the previous data beat that matches the target channel in the cache, wherein the target channel is the channel where the located data block is located.
  • Step S104 transmitting the matched target data unit through other channels other than the target channel in the multi-channel, wherein the target data unit is the data unit matched in the cache of other channels and the data unit matched in the data beat, the earliest data unit in the order, and the cache contains the data unit in the previous beat of the data beat that was not sent in the previous beat.
  • Step S105 Buffer the unsent data units in the currently received data beat.
  • the above steps search whether the data beat contains a data block after receiving the data beat of the data frame in the data stream. If found, it means that the data beat includes a data block.
  • the data block is extracted through the target channel used to transmit the data block, and the matching target data unit is transmitted through other channels used to transmit the data beat. Specifically, for other channels, if there is a data unit of the previous beat in the cache, the data unit of the previous beat is obtained and output from the exchange. If there is no matching data unit in the cache, the matching data unit is directly obtained from the received data beat and sent. The purpose of this is to correct the misalignment of the order of the data units of the valid data caused by the insertion of data blocks when the data stream is generated.
  • the unsent data units in the received data beat are cached and combined with some data units of the next beat to restore the valid data of the beat.
  • the purpose of continuously searching and extracting data blocks is achieved.
  • the effective data misalignment caused by data block insertion is accurately corrected, and the technical effect of accurately locating and extracting data blocks and restoring valid data is achieved.
  • the execution subject of the above steps may be a flexible Ethernet, which may be set on a processor, a calculator or a controller to perform data processing to execute the data processing operations in the above steps, such as steps S101 to S105.
  • the above-mentioned flexible Ethernet is set between the media access control layer MAC and the physical layer PHY, and is used for signal data conversion between the MAC layer and the PHY layer.
  • the data stream is converted into a physical pulse signal, or a digital signal.
  • the data unit is first sent to the physical layer, and data is transmitted through the virtual channel of the physical layer.
  • the above data block may be an overhead block (OverHead), which is a data block for transmitting configuration information between the transmitter and the receiver in Flexible Ethernet 1.0.
  • OverHead is a data block for transmitting configuration information between the transmitter and the receiver in Flexible Ethernet 1.0.
  • the above data stream is sent in a multi-channel concurrent manner. Specifically, the data stream is divided into multiple data frames, as shown in FIG2 , different columns represent different beats, and multiple data units and/or data blocks of the same beat are received simultaneously, different grayscales represent different data nodes, and each data node includes multiple data units, which is the square area corresponding to the same grayscale column and multiple channels in FIG2 .
  • the data belonging to the data frame in the data stream is also valid data.
  • Each column in Figure 2 represents a data beat in the data stream, which is a concept different from a data frame and a data section.
  • a data frame is actually essentially a plurality of data sections arranged in a sequential order.
  • a data beat is relative to multiple channels.
  • a multi-channel transmission or reception is called a beat action.
  • the multiple data units sent or received are collectively referred to as a data beat.
  • the order of the original data beat corresponding to a data section has been disrupted.
  • the original data beat that is, the data unit of the same grayscale, is called a data section.
  • the data in the first column from the right is the data unit of the same beat.
  • the second column from the right is the data beat carrying the data block, which is the data unit of the same beat transmitted in other channels after the data block is inserted.
  • the third column from the right includes data units of two data sections. The data unit with a heavier grayscale is the same section as the data unit in the previous beat, and the data unit with a lighter grayscale is the same section as the data unit in the next beat.
  • the search can be performed through a counter, by counting the number of beats counted by the first counter and the number of data blocks counted by the second counter.
  • searching for data blocks inserted in data beats according to counters includes: recording the beat number of the currently received data beat in the current restoration process by a first counter, and recording the block number of the located data block in the restoration process by a second counter, wherein the number of data units or data blocks included in the data beat is the same as the number of channels of the multi-channel, and the number of data blocks in the restoration process is the same as the number of channels of the channel; determining the position of the currently located data block according to the beat number and the block number.
  • PCS has 20 channels, and that section transmits 20 code blocks of data. Therefore, an overhead block needs to be inserted into each beat, so the first data beat inserts the first overhead block on Channel0, the second data beat inserts the second overhead block on Channel1, and the fifth data beat inserts the fifth overhead block on Channel5.
  • the data channel for transmitting the data block that is, the target channel
  • the data channel for transmitting the data block that is, the target channel
  • the data block of the target channel in the multiple channels is extracted, and the data unit of the previous data beat that is matched by the target channel in the cache and not sent is sent.
  • the data block when inserting a data block, is transmitted through a target channel in the multi-channel, wherein the target channel is determined by traversing the multi-channel in a predetermined order, and the data block is used to identify the configuration information of the flexible Ethernet.
  • the data unit that should be transmitted is transmitted by delaying one beat. Specifically, the data unit matching the target channel is cached and transmitted in the next beat, while the data unit of the data beat that should be transmitted in the next beat is postponed to the next beat for transmission. In this way, the data unit of each data beat of the target channel after the transmission process will be delayed by one beat for transmission.
  • this embodiment adopts a method of caching all the received data beats for one beat. In this way, if it is detected that the target channel transmits a data block, the channel will directly send the matching data unit in the received data beat, and combine it with the data unit of the previous beat in the buffer sent by other channels that have not transmitted data blocks, so as to restore the data node.
  • the matching target data unit is transmitted through other channels other than the target channel in the multi-channels, wherein the target data unit is the earliest data unit in the data unit that is matched by other channels in the cache and the data unit that is matched in the data beat, and the cache caches the data unit that has not been sent in the previous data beat.
  • the data unit with the earliest sequence mentioned above refers to the data unit with the earliest sequence in the data beat.
  • the unsent data units in the currently received data beat are data units of the same section as some data units in the next beat.
  • the unsent data units in the currently received data beat are cached so that the data units in the next beat can be combined into the same data section.
  • the purpose of continuously searching and extracting data blocks is achieved, and at the same time, the effective data dislocation caused by the insertion of data blocks is accurately corrected, so that the technical effect of accurately locating and extracting data blocks and restoring effective data is achieved, thereby solving the problem in the related technology that there are data blocks in the data stream of flexible Ethernet, the data blocks do not appear at the same time, and it is difficult to locate and extract them, resulting in the order of effective data in the data stream being difficult to restore.
  • transmitting the matching target data unit through other channels other than the target channel in the multi-channel includes: reading the data unit of the previous data beat cached in the cache; allocating the data unit in the cache to matching channels in other channels for transmission; and transmitting the matching data unit in the currently received data beat to the channels in other channels that are not allocated with the cached data unit.
  • the data channel is divided into a first channel and a second channel according to whether the data block has been transmitted.
  • the first channel is a channel that has not transmitted a data block in a predetermined sequence
  • the second channel is a channel that has transmitted a data block in a predetermined sequence.
  • the data channel of the distributed data unit is the first channel, and the data unit distributed by the cache can be directly sent.
  • the data channel that is not distributed is the second channel, and the data unit matching in the received data beat can be directly sent.
  • the data units transmitted are all the matching data units in the previous data beat obtained from the cache, and for the second channel, the data units transmitted are all the matching data units in the currently received data beat. In this way, the data nodes can be restored and transmitted in an orderly and regular manner.
  • the method further includes: when each channel of the multiple channels completes the extraction of the data block once, issuing a blank block through the multiple channels; wherein the blank block is used to instruct the receiving end of the data stream to isolate the restoration process of the data beat.
  • the data of one restore process is also isolated from the data of another restore process, and after receiving the blank block, the data in a restore process that has been successfully received can be processed, including the rearrangement and restoration of the data sections.
  • receiving data beats of a data stream of a multi-channel concurrent transmission of the flexible Ethernet includes: receiving a bit code data stream sent by a physical layer to a logical layer of the flexible Ethernet, wherein the bit code data stream is sent in beats.
  • the flexible Ethernet is set between the media access control layer MAC and the physical layer PHY for signal data conversion between the MAC layer and the PHY layer.
  • the flexible Ethernet may be FlexE
  • the logic layer may be a FlexE Shim layer.
  • the processing method is that the physical layer restores and rearranges the bit code data stream sent by the logic layer to the flexible Ethernet.
  • the method also includes: when no data block is found, reading the data unit of the previous data beat in the cache from the cache; allocating the data units in the cache to matching channels in the multiple channels for transmission; when no channel in the multiple channels matches the data units in the cache, transmitting the matching data units in the currently received data beat.
  • the first channel in the multiple channels is a channel that has not transmitted a data block in the predetermined sequence
  • the second channel is a channel that has transmitted a data block in the predetermined sequence
  • the data unit cached in the previous shot can also be directly read from the cache, and the data unit cached in the cache can be directly distributed to the corresponding data channel.
  • the data channel that has not been distributed is the first channel mentioned above, and the matching data unit in the received data shot can be directly sent.
  • the data channel of the distributed data unit is the second channel mentioned above, and the data unit distributed by the cache can be directly sent.
  • caching data beats of the currently received data stream includes: caching data beats of the currently received data stream into a register; caching unsent data units in the currently received data beat includes: caching unsent data units in the currently received data beat into a register.
  • the above cache can be cached by registers. Only a single register is needed to complete the operation. No large-area storage unit is needed to store data, which not only saves area but also ensures the speed.
  • This embodiment provides a method for extracting valid data after locking the overhead block at a flexible Ethernet receiving end, so as to solve the above technical problem.
  • an overhead block which is the above data block, is inserted into the physical layer PHY channel. Therefore, the bandwidth of the data stream containing the overhead block received by the receiving side is greater than the valid data stream.
  • the MAC layer Media Access Control
  • the overhead block is transmitted to the PCS layer, the configuration information has been extracted and deleted.
  • FlexE usually needs to use multiple channels to transmit data in parallel. For example, if 10 channels are used to process 10 channels of 64-bit data in parallel, the clock frequency only needs to meet 160MHz, which is completely in line with the actual design requirements compared to the 1.6GHz working clock.
  • the overhead block is an additional code block inserted by Flexible Ethernet to transmit configuration information. It occupies the bandwidth of valid data, so it needs to be deleted before the data is sent to the MAC layer user end. The deletion of the overhead block is after the overhead block configuration information is extracted.
  • the instances on the flexible Ethernet 100G data are distributed and transmitted on multiple data channels, and the overhead blocks may appear on any channel. Therefore, according to the channel number where the overhead block is located, it is difficult to take out valid data blocks from the corresponding positions of multiple data channels to form a complete instance.
  • Valid data refers to the data required by the user (data transmitted to the MAC layer).
  • the overhead block is only for transmitting configuration information, not the data required by the user.
  • the overhead block is inserted into the valid data according to the protocol (the protocol specifies the insertion position) and is transmitted together with the valid data. Therefore, after the overhead block configuration information is extracted at the receiving end, it needs to be deleted to prevent the user from reading wrong data.
  • a complete instance refers to the complete data stream required by the user side. If the overhead block is not identified, the valid data required by the user cannot be correctly extracted.
  • This embodiment receives the data stream transmitted concurrently by multiple channels at the physical layer, uses a counter to locate the data block position information after the first data block appears, wherein the position information includes which channel and when it appears, uses a register to store data, and uses a signal to control the output logic, and extracts the data scattered in multiple channels, wherein each channel has a register, and the signal indicates whether the data block is found, and the output logic uses the signal to read and send data units from different positions, and the position is a register or input data.
  • FIG2 is a schematic diagram of a multi-channel data stream structure with inserted data blocks provided according to an embodiment of the present application.
  • the real data blocks that should be carried in the same clock cycle on the PHY channel the numbers on the top indicate the order of transmitted data, the numbers 1 to N below indicate the number of inserted overhead blocks, N indicates the number of channels, and blocks of different grayscales indicate valid data to be transmitted, and the same grayscale indicates the same data beat. If the data beat is not corrected, the data is extracted normally, and the transmission of valid data after deleting the overhead block is still not output in parallel on the same beat.
  • the first beat reads the grayscale data of the first beat.
  • the data is complete, but there is an overhead block in one channel of the data of the second beat, so this beat can only read N-1 data.
  • the read data is incomplete, so data rearrangement is required.
  • FIG3 is a schematic diagram of a data stream after extracting a data block according to an embodiment of the present application. As shown in FIG3 , the solution provided by this embodiment is as follows:
  • Each channel uses a register to cache the data transmitted in the previous beat. After completing the locking of the overhead on the FlexE Ethernet PHY, the channel number of the overhead block is used to determine whether to output the data in the register to the FlexE Shim layer or to output the input data (from the descrambling module) to the FlexE Shim layer. When the channel does not output the overhead block, the data in the register is output. When the channel determines that the overhead block has been input based on the location information of the overhead block, the channel outputs the input data at the beginning of the next section.
  • the first channel caches the first beat data into the register, and the second beat detects the input of the overhead block.
  • the data in the register is sent, that is, the data with heavier grayscale in the rightmost column in Figure 3.
  • the third beat directly sends the input data, that is, the data with heavier grayscale in the second column from the right.
  • the first beat of the second channel also caches the data with heavier grayscale in the rightmost column into the register.
  • the second beat reads the data with heavier grayscale in the rightmost column in the register, and caches the data with heavier grayscale in the second column from the right into the register.
  • the third beat outputs the data with heavier grayscale in the second column from the right in the register.
  • the data output by each beat of the first and second channels are data of the same grayscale, ensuring that the order of the data will not be disordered.
  • all channels When all channels have input the overhead block, all channels output one beat of Ethernet idle IDLE in parallel (replacing the overhead block with the idle block), and the next beat re-outputs the data in the register. In this way, the valid data after the multi-channel overhead blocks are locked can be correctly extracted.
  • Another difficulty of this embodiment is to determine the location of other overhead blocks in the FlexE overhead beat, in order to correctly extract the valid data behind the overhead block and replace the overhead block with the Ethernet idle block.
  • When performing overhead locking in the FlexE instance on the Ethernet PHY only the first overhead block in the FlexE overhead beat is identified. The location of other overhead blocks in the FlexE overhead beat is not specified.
  • the FlexE 1.0 protocol stipulates that the insertion interval of the overhead block is to insert an overhead block every 1023*20 code blocks.
  • the position of the overhead block on the PHY channel is fixed. Once locked, the position of the subsequent overhead block can be known.
  • PHY generally adopts multi-channel transmission. The position of all overhead blocks inserted into each channel is difficult to determine.
  • This embodiment will introduce two counters, cycle counter counter1023 (counting the transmitted code blocks, 1023 code blocks as a cycle) and counter1023countNum (counting the number of cycles completed by counter1023) to determine the position of other overhead blocks in the FlexE overhead beat in multi-channel transmission.
  • the PCS layer has 20 channels, and that section transmits 20 code blocks of data, then 1023 frames need to insert an overhead block, so the first 1023 beats insert the first overhead block on channel Channel0, the second 1023 beats insert the second overhead block on Channel1, and the fifth 1023 beats insert the fifth overhead block on Channel5. That is, the first counter counts the beat of data, and the second counter counts the inserted overhead block.
  • Figure 4 is a schematic diagram of the position of data blocks in a multi-channel data stream provided according to an embodiment of the present application. As shown in Figure 4, the black color is the position of each channel overhead block, and the position of each channel overhead block can be calculated based on the number of channels and the period counter of the code block.
  • This embodiment uses registers to cache data, extracts valid data after the overhead block, and keeps the order of valid data in order. This can be accomplished using only registers, avoiding the use of too many storage units, saving area and ensuring speed. It avoids cumbersome data rearrangement design.
  • FIG5 is a schematic diagram of a data block processing device for a flexible Ethernet according to an embodiment of the present application.
  • the embodiment of the present application also provides a data block processing device for a flexible Ethernet.
  • the data block processing device for a flexible Ethernet according to the embodiment of the present application can be used to execute the data block processing method for a flexible Ethernet provided in the embodiment of the present application.
  • the data block processing device for a flexible Ethernet provided in the embodiment of the present application is described below.
  • the device includes: a receiving module 51, a search module 52, an extraction module 53, a transmission module 54, and a cache module 55, as follows.
  • the receiving module 51 is used to receive a data stream of multi-channel concurrent transmission at the physical layer, wherein the data stream includes multiple data frames, the data frame includes multiple data beats, the data beat includes at least one data unit of the data frame, and a data block inserted between the data units, and the data block is used to identify the configuration information of the data stream;
  • the search module 52 is connected to the above-mentioned receiving module 51, and is used to search for the data block inserted in the data beat according to the counter;
  • the extraction module 53 is connected to the above-mentioned search module 52, and is used to extract the data block of the target channel in the multi-channel when the data block is found, and send the last matched data block of the target channel in the cache.
  • the data units that have not been sent in the data beat are captured, wherein the target channel is the channel where the located data block is located; a transmission module 54, connected to the above-mentioned extraction module 53, is used to transmit the matching target data units through other channels other than the target channel in the multi-channels, wherein the target data units are the data units that match in the cache of other channels and the data units that match in the data beat, the earliest data units in the order, and the cache contains the data units that have not been sent in the previous beat of the data beat; a cache module 55, connected to the above-mentioned transmission module 54, is used to cache the data units that have not been sent in the currently received data beat.
  • the data beat of the data stream After receiving the data beat of the data stream, it searches whether the data beat contains a data block. If it is found, it means that the data beat includes a data block.
  • the data block is extracted through the target channel used to transmit the data block, and the matching target data unit is transmitted through other channels used to transmit the data beat. Specifically, for other channels, if the data unit of the previous beat exists in the cache, the data unit of the previous beat is obtained and output from the exchange. If the matching data unit does not exist in the cache, the matching data unit is directly obtained from the received data beat and sent. The purpose of this is to correct the misalignment of the order of the data units of the valid data caused by the insertion of data blocks when the data stream is generated.
  • the unsent data units in the received data beat are cached and combined with some data units of the next beat to restore the valid data of the beat.
  • the purpose of continuously searching and extracting data blocks is achieved, and at the same time, the effective data misalignment caused by data block insertion is accurately corrected, and the technical effect of accurately locating and extracting data blocks and restoring valid data is achieved, thereby solving the problem in the related technology that there are data blocks in the data stream of flexible Ethernet, and the data blocks do not appear at the same time, making it difficult to locate and extract, resulting in the difficulty of restoring the order of valid data in the data stream.
  • the data block processing device of the flexible Ethernet includes a processor and a memory.
  • the above-mentioned receiving module 51, search module 52, extraction module 53, transmission module 54, cache module 55, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
  • the processor includes a kernel, which calls the corresponding program unit from the memory.
  • One or more kernels can be set, and the problem in the related art that the user cannot determine whether the capacitive pen that is not originally provided with the capacitive screen is compatible when used is solved by adjusting the kernel parameters.
  • the memory may include non-permanent memory in a computer-readable medium, in the form of random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash random access memory
  • An embodiment of the present application provides a computer-readable storage medium on which computer-readable program instructions are stored.
  • the computer-readable program instructions are executed by a processor, any of the above-mentioned methods for processing data blocks of a flexible Ethernet is implemented.
  • An embodiment of the present application provides a processor, which is used to execute computer-readable program instructions, wherein when the computer-readable program instructions are executed, any of the above-mentioned methods for processing data blocks of the flexible Ethernet is implemented.
  • FIG6 is a schematic diagram of an electronic device provided according to an embodiment of the present application.
  • an embodiment of the present application provides an electronic device 60, the device including a processor, a memory, and computer-readable program instructions stored in the memory and executable by the processor.
  • the processor executes the computer-readable program instructions, the steps of the method for processing a data block of any flexible Ethernet described above are implemented:
  • the devices in this article can be servers, PCs, PADs, mobile phones, etc.
  • the present application also provides a computer program product, which can implement a program having any of the above method steps when it is executed on a data block processing device for flexible Ethernet.
  • the embodiments of the present application may be provided as methods, systems, or computer program products, etc. Therefore, the present application may adopt a fully hardware embodiment, a fully software embodiment, or an embodiment in the form of a combination of software and hardware. In addition, the present application may also adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-readable program instructions.
  • a computer-readable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable flexible Ethernet data block processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable flexible Ethernet data block electronic device generate a device for implementing the functions specified in one process or multiple processes in the flowchart and/or one box or multiple boxes in the block diagram.
  • These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable electronic device for flexible Ethernet data blocks to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
  • These computer program instructions can also be loaded onto a computer or other programmable electronic device for data block of Flexible Ethernet, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
  • a computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
  • processors CPU
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and/or non-volatile memory in the form of read-only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information.
  • Information can be computer readable instructions, data structures, program modules or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
  • computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
  • the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a fully hardware embodiment, a fully software embodiment or a combination of software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-readable program instructions.
  • a computer-readable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed in the present application are a flexible Ethernet data block processing method and apparatus, a storage medium, and an electronic device. The method comprises: receiving a data stream concurrently transmitted by multiple channels of a physical layer; on the basis of a counter, searching for a data block inserted in a data beat; when the data block is found, extracting the data block of a target channel among the multiple channels, and sending a data unit in a cache which is matched with the target channel and which has not been sent in the previous data beat; by means of other channels excepting the target channel among the multiple channels, transmitting a matched target data unit; and caching data units which have not been sent in the currently received data beat.

Description

灵活以太网数据块处理方法、装置、存储介质及电子设备Flexible Ethernet data block processing method, device, storage medium and electronic device
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求在2022年12月01日提交中国专利局、申请号为202211530781.6、发明名称为“灵活以太网的数据块的处理方法、装置、存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application filed with the Chinese Patent Office on December 1, 2022, with application number 202211530781.6 and invention name “Method, device, and storage medium for processing data blocks of flexible Ethernet”, the entire contents of which are incorporated by reference in this application.
技术领域Technical Field
本申请涉及数据通信领域,具体而言,涉及灵活以太网数据块处理方法、装置、存储介质及电子设备。The present application relates to the field of data communications, and in particular to a flexible Ethernet data block processing method, device, storage medium and electronic device.
背景技术Background technique
灵活以太网是高速以太网的PCS层(物理编码子层Physical Coding Sublayer)中***一层FlexE Shim层。其可以将MAC(介质访问控制)层的大带宽数据切割成多个小带宽数据流,并在数据流中***开销块来传递配置信息,接收端通过提取配置信息将小带宽数据流恢复成大带宽数据流。开销块的***是在灵活以太网将Calendar日志(是FlexE Shim层处理映射和反映射处理的机制)上的数据分发到各PHY通道后再***开销块,开销块的锁定是在多条PHY层通道发送到Calendar日志上前进行锁定,将多条PHY层上的开销块锁定后再将数据汇聚到Calendar日志上层中。锁定开销块后便可以预知接下来开销块的位置,并提取开销块的信息,配置信息的使用在FlexE Shim层中,利用开销块提取的配置信息将数据从Calendar日志上解映射出来。Flexible Ethernet is a FlexE Shim layer inserted into the PCS layer (Physical Coding Sublayer) of high-speed Ethernet. It can cut the large-bandwidth data of the MAC (Media Access Control) layer into multiple small-bandwidth data streams, and insert overhead blocks into the data stream to transmit configuration information. The receiver recovers the small-bandwidth data stream into a large-bandwidth data stream by extracting the configuration information. The insertion of the overhead block is done after Flexible Ethernet distributes the data on the Calendar log (which is the mechanism for the FlexE Shim layer to handle mapping and demapping) to each PHY channel, and then inserts the overhead block. The locking of the overhead block is done before multiple PHY layer channels are sent to the Calendar log. After locking the overhead blocks on multiple PHY layers, the data is aggregated to the upper layer of the Calendar log. After locking the overhead block, the location of the next overhead block can be predicted and the information of the overhead block can be extracted. The configuration information is used in the FlexE Shim layer, and the configuration information extracted from the overhead block is used to demap the data from the Calendar log.
开销块并不是同一时间出现在所有通道上,所以在删除开销块的同时需要一种方法将数据重排,使得有效数据的顺序不会错乱。例如在接收端中,灵活以太网100G数据上的实例被分发在多个数据通道上传输,开销块可能出现在任意通道上。难以进行定位和提取,导致数据流中有效数据的顺序难以还原。Overhead blocks do not appear on all channels at the same time, so a method is needed to rearrange the data while deleting the overhead blocks so that the order of valid data is not disrupted. For example, at the receiving end, the instance of Flexible Ethernet 100G data is distributed on multiple data channels for transmission, and the overhead blocks may appear on any channel. It is difficult to locate and extract them, resulting in difficulty in restoring the order of valid data in the data stream.
针对相关技术中灵活以太网的数据流中存在数据块,数据块并不是同一时间出现,难以进行定位和提取,导致数据流中有效数据的顺序难以还原的问题,目前尚未提出有效的解决方案。There are data blocks in the data stream of flexible Ethernet in related technologies. The data blocks do not appear at the same time, making it difficult to locate and extract them, which makes it difficult to restore the order of valid data in the data stream. No effective solution has been proposed yet.
发明内容Summary of the invention
本申请的主要目的在于提供灵活以太网数据块处理方法、装置、存储介质及电子设备,以解决相关技术中灵活以太网的数据流中存在数据块,数据块并不是同一时间出现,难以进行定位和提取,导致数据流中有效数据的顺序难以还原的问题。The main purpose of the present application is to provide a flexible Ethernet data block processing method, device, storage medium and electronic device to solve the problem in the related art that there are data blocks in the data stream of the flexible Ethernet, the data blocks do not appear at the same time, and are difficult to locate and extract, resulting in the difficulty in restoring the order of valid data in the data stream.
为了实现上述目的,根据本申请的一个方面,提供了一种灵活以太网的数据块的处理方法,所述方法包括:接收物理层的多通道并发传输的数据流,其中,所述数据流包括多个数据帧,所述数据帧包括多个数据拍,所述数据拍包括至少一个数据节的数据单元,以及***在数据单元之间的数据块,所述数据块用于标识所述数据流的配置信息;根据计数器对所述数据拍中***的数据块进行查找;在查找到数据块的情况下,对所述多通道中的目标通道的所述数据块进行提取,并发送所述缓存中所述目标通道匹配的上一拍数据拍未发送的数据单元,其中,所述目标通道为定位到的数据块所在的通道;通过所述多通道中所述目标通道之外的其他通道,对相匹配的目标数据单元进行传输,其中,所述目标数据单元为所述其他通道在缓存中相匹配的数据单元,和所述数据拍中相匹配的数据单元,中顺序最早的数据单元,所述缓存中缓存有上一拍数据拍中在上一拍未发送的数据单元;将当前接收的所述数据拍中未发送的数据单元进行缓存。To achieve the above-mentioned purpose, according to one aspect of the present application, a method for processing data blocks of a flexible Ethernet is provided, the method comprising: receiving a data stream of multi-channel concurrent transmission of a physical layer, wherein the data stream comprises a plurality of data frames, the data frame comprises a plurality of data beats, the data beat comprises a data unit of at least one data section, and a data block inserted between the data units, the data block being used to identify configuration information of the data stream; searching for the data block inserted in the data beat according to a counter; in the case of finding the data block, extracting the data block of a target channel in the multi-channel, and sending the data unit of the previous data beat that matches the target channel in the cache and that has not been sent, wherein the target channel is the channel where the located data block is located; transmitting the matched target data unit through other channels other than the target channel in the multi-channel, wherein the target data unit is the earliest data unit in the order of the data unit that matches the other channels in the cache and the data unit that matches the data beat, and the cache has the data unit that has not been sent in the previous data beat in the previous data beat; caching the data unit that has not been sent in the currently received data beat.
可选地,通过所述多通道中所述目标通道之外的其他通道,对相匹配的目标数据单元进行传输包括:读取缓存中缓存的上一数据拍的数据单元;将所述缓存中的数据单元,分配给所述其他通道中的相匹配各个通道进行传输;在所述其他通道中未分配到缓存的数据单元的通道,将当前接收的所述数据拍中相匹配的数据单元进行传输。Optionally, transmitting the matching target data unit through other channels other than the target channel in the multiple channels includes: reading the data unit of the previous data beat cached in the cache; allocating the data unit in the cache to matching channels in the other channels for transmission; and transmitting the matching data unit in the data beat currently received through the channels in the other channels that are not allocated with the cached data unit.
可选地,所述方法还包括:在所述多通道的每个通道均完成一次对数据块的提取的情况下,通过所述多通道并发一次空白块;其中,所述空白块用于指示所述数据流的接收端对数据拍的还原进程进行隔离。Optionally, the method further includes: when each channel of the multiple channels completes the extraction of a data block once, concurrently sending a blank block through the multiple channels; wherein the blank block is used to instruct the receiving end of the data stream to isolate the restoration process of the data beat.
可选地,根据计数器对所述数据拍中***的数据块进行查找包括:通过第一计数器记录当前接收的数据拍的在当前还原进程中的拍数,通过第二计数器记录定位的数据块在所述还原进程中的块数,其中,所述数据拍包含的数据单元或数据块的数量与所述多通道的通道数量相同,所述还原进程内的数据块的块数与所述通道的通道数量相同;根据所述拍数和所述块数,确定当前定位的数据块的位置。Optionally, searching for the data blocks inserted in the data beat according to the counter includes: recording the beat number of the currently received data beat in the current restoration process by a first counter, and recording the block number of the located data block in the restoration process by a second counter, wherein the number of data units or data blocks contained in the data beat is the same as the number of channels of the multi-channels, and the number of data blocks in the restoration process is the same as the number of channels of the channels; determining the position of the currently located data block according to the beat number and the block number.
可选地,接收灵活以太网的多通道并发传输的数据流的数据拍包括:接收物理层向所述灵活以太网的逻辑层,发送的比特码数据流,其中,所述比特码数据流是按拍进行发送的。Optionally, receiving data beats of a data stream of a multi-channel concurrent transmission of a flexible Ethernet includes: receiving a bit code data stream sent by a physical layer to a logical layer of the flexible Ethernet, wherein the bit code data stream is sent in beats.
可选地,所述方法还包括:在没有查找到数据块的情况下,从所述缓存中读取缓存的上一数据拍的数据单元;将所述缓存中的数据单元,分配给所述多通道中的相匹配各个通道进行传输;在所述多通道中的通道与所述缓存中的数据单元均不匹配的情况下,将当前接收的所述数据拍中相匹配的数据单元进行传输。Optionally, the method further includes: when no data block is found, reading data units of the previous data beat of the cache from the cache; allocating the data units in the cache to matching channels in the multiple channels for transmission; and when no channels in the multiple channels match the data units in the cache, transmitting the matching data units in the data beat currently received.
可选地,将当前接收的所述数据流的数据拍进行缓存包括:将当前接收的所述数据流的数据拍缓存至寄存器中;将当前接收的所述数据拍中未发送的数据单元进行缓存包括:将当前接收的所述数据拍中未发送的数据单元缓存至所述寄存器中。Optionally, caching the data beats of the currently received data stream includes: caching the data beats of the currently received data stream into a register; caching the unsent data units in the currently received data beat includes: caching the unsent data units in the currently received data beat into the register.
为了实现上述目的,根据本申请的另一方面,提供了一种灵活以太网的数据块的处理装置,包括:接收模块,用于接收物理层的多通道并发传输的数据流,其中,所述数据流包括多个数据帧,所述数据帧包括多个数据拍,所述数据拍包括至少一个数据帧的数据单元,以及***在数据单元之间的数据块,所述数据块用于标识所述数据流的配置信息;查找模块,用于根据计数器对所述数据拍中***的数据块进行查找;提取模块,用于在查找到数据块的情况下,对所述多通道中的目标通道的所述数据块进行提取,并发送所述缓存中所述目标通道匹配的上一拍数据拍未发送的数据单元,其中,所述目标通道为定位到的数据块所在的通道;传输模块,用于通过所述多通道中所述目标通道之外的其他通道,对相匹配的目标数据单元进行传输,其中,所述目标数据单元为所述其他通道在缓存中相匹配的数据单元,和所述数据拍中相匹配的数据单元,中顺序最早的数据单元,所述缓存中缓存有上一拍数据拍中在上一拍未发送的数据单元;缓存模块,用于将当前接收的所述数据拍中未发送的数据单元进行缓存。To achieve the above-mentioned purpose, according to another aspect of the present application, a data block processing device for flexible Ethernet is provided, comprising: a receiving module, used to receive a data stream of multi-channel concurrent transmission of a physical layer, wherein the data stream comprises a plurality of data frames, the data frame comprises a plurality of data beats, the data beat comprises a data unit of at least one data frame, and a data block inserted between the data units, the data block is used to identify the configuration information of the data stream; a search module, used to search for the data block inserted in the data beat according to a counter; an extraction module, used to extract the data block of a target channel in the multi-channel when a data block is found; A row extractor is used to extract and send the data unit that has not been sent in the previous data beat that matches the target channel in the cache, wherein the target channel is the channel where the located data block is located; a transmission module is used to transmit the matched target data unit through other channels other than the target channel in the multiple channels, wherein the target data unit is the earliest data unit in the order of the data unit that matches the other channels in the cache and the data unit that matches the data beat, and the cache caches the data unit that has not been sent in the previous data beat; a cache module is used to cache the data unit that has not been sent in the data beat currently received.
为了实现上述目的,根据本申请的另一方面,提供了一种计算机可读存储介质,所述存储介质用于存储计算机可读程序指令,其中,所述计算机可读程序指令被处理器执行时,实现上述中任意一项所述的灵活以太网的数据块的处理方法。In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium is used to store computer-readable program instructions, wherein when the computer-readable program instructions are executed by a processor, any one of the above-mentioned methods for processing data blocks of a flexible Ethernet is implemented.
为了实现上述目的,根据本申请的另一方面,提供了一种电子设备,包括一个或多个处理器和存储器,所述存储器用于存储计算机可读程序指令,其中,当所述计算机可读程序指令被所述一个或多个处理器执行时,使得所述一个或多个处理器实现上述中任意一项所述的灵活以太网的数据块的处理方法。In order to achieve the above-mentioned purpose, according to another aspect of the present application, an electronic device is provided, comprising one or more processors and a memory, wherein the memory is used to store computer-readable program instructions, wherein when the computer-readable program instructions are executed by the one or more processors, the one or more processors implement the method for processing data blocks of a flexible Ethernet as described in any one of the above.
本申请通过接收到数据流的数据帧中的数据拍后,对数据拍是否包含有数据块进行查找,在查找到的情况下,说明该数据拍包括了数据块,通过用来传输该数据块的目标通道对数据块进行提取,通过用来传输该数据拍的其他通道,则对相匹配的目标数据单元进行传输,具体对于其他通道,在缓存中存在上一拍的数据单元,则从换从中获取并输出上一拍的数据单元,在缓存中不存在其匹配的数据单元,则直接从接收的数据拍中获取匹配的数据单元进行发送。这样做的目的是为了修正数据流在生成时,由于***数据块导致的有效数据的数据单元的顺序发生了错位。After receiving the data beat in the data frame of the data stream, the present application searches whether the data beat contains a data block. If found, it means that the data beat includes a data block. The data block is extracted through the target channel used to transmit the data block, and the matching target data unit is transmitted through other channels used to transmit the data beat. Specifically, for other channels, if there is a data unit of the previous beat in the cache, the data unit of the previous beat is obtained and output from the exchange. If there is no matching data unit in the cache, the matching data unit is directly obtained from the received data beat and sent. The purpose of this is to correct the misalignment of the order of the data units of the valid data caused by the insertion of data blocks when the data stream is generated.
然后将接收的数据拍中未发送的数据单元进行缓存,用来与下一拍的部分数据单元进行组合,还原该拍有效数据。达到了持续对数据块查找和提取的目的,与此同时对数据块***引起的有效数据错位,进行准确校正,实现了对数据块进行准确定位和提取的同时,对有效数据进行复原的技术效果,进而解决了相关技术中灵活以太网的数据流中存在数据块,数据块并不是同一时间出现,难以进行定位和提取,导致数据流中有效数据的顺序难以还原的问题。Then, the unsent data units in the received data beat are cached and combined with some data units of the next beat to restore the valid data of the beat. The purpose of continuously searching and extracting data blocks is achieved. At the same time, the effective data misalignment caused by data block insertion is accurately corrected, and the technical effect of accurately locating and extracting data blocks and restoring valid data is achieved. This solves the problem in the related technology that there are data blocks in the data stream of flexible Ethernet, and the data blocks do not appear at the same time, making it difficult to locate and extract them, resulting in the difficulty in restoring the order of valid data in the data stream.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
构成本申请的一部分的附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
图1是根据本申请实施例提供的一种灵活以太网的数据块的处理方法的流程图;FIG1 is a flow chart of a method for processing a data block of a flexible Ethernet according to an embodiment of the present application;
图2是根据本申请实施例提供的***数据块的多通道数据流结构的示意图;2 is a schematic diagram of a multi-channel data stream structure with inserted data blocks provided according to an embodiment of the present application;
图3是根据本申请实施例提供的数据流提取数据块后的示意图;FIG3 is a schematic diagram of a data stream after extracting data blocks according to an embodiment of the present application;
图4是根据本申请实施例提供的多通道数据流中数据块位置的示意图;FIG4 is a schematic diagram of data block locations in a multi-channel data stream according to an embodiment of the present application;
图5是根据本申请实施例提供的一种灵活以太网的数据块的处理装置的示意图;FIG5 is a schematic diagram of a data block processing device of a flexible Ethernet according to an embodiment of the present application;
图6是根据本申请实施例提供的一种电子设备的示意图。FIG6 is a schematic diagram of an electronic device provided according to an embodiment of the present application.
具体实施方式Detailed ways
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、***、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
下面结合可选的实施步骤对本申请进行说明,图1是根据本申请实施例提供的一种灵活以太网的数据块的处理方法的流程图,如图1所示,该方法包括如下步骤:The present application is described below in conjunction with optional implementation steps. FIG. 1 is a flow chart of a method for processing a data block of a flexible Ethernet according to an embodiment of the present application. As shown in FIG. 1 , the method includes the following steps:
步骤S101,接收物理层的多通道并发传输的数据流,其中,数据流包括多个数据帧,数据帧包括多个数据拍,数据拍包括至少一个数据帧的数据单元,以及***在数据单元之间的数据块,数据块用于标识数据流的配置信息。Step S101, receiving a data stream of multi-channel concurrent transmission at the physical layer, wherein the data stream includes multiple data frames, the data frame includes multiple data beats, the data beat includes a data unit of at least one data frame, and data blocks inserted between the data units, the data blocks are used to identify configuration information of the data stream.
步骤S102,根据计数器对数据拍中***的数据块进行查找。Step S102: searching for the data block inserted in the data beat according to the counter.
步骤S103,在查找到数据块的情况下,对多通道中的目标通道的数据块进行提取,并发送缓存中目标通道匹配的上一拍数据拍未发送的数据单元,其中,目标通道为定位到的数据块所在的通道。Step S103, when a data block is found, extract the data block of the target channel in the multiple channels, and send the unsent data unit of the previous data beat that matches the target channel in the cache, wherein the target channel is the channel where the located data block is located.
步骤S104,通过多通道中目标通道之外的其他通道,对相匹配的目标数据单元进行传输,其中,目标数据单元为其他通道在缓存中相匹配的数据单元,和数据拍中相匹配的数据单元,中顺序最早的数据单元,缓存中缓存有上一拍数据拍中在上一拍未发送的数据单元。Step S104, transmitting the matched target data unit through other channels other than the target channel in the multi-channel, wherein the target data unit is the data unit matched in the cache of other channels and the data unit matched in the data beat, the earliest data unit in the order, and the cache contains the data unit in the previous beat of the data beat that was not sent in the previous beat.
步骤S105,将当前接收的数据拍中未发送的数据单元进行缓存。Step S105: Buffer the unsent data units in the currently received data beat.
上述步骤通过接收到数据流中数据帧的数据拍后,对数据拍是否包含有数据块进行查找,在查找到的情况下,说明该数据拍包括了数据块,通过用来传输该数据块的目标通道对数据块进行提取,通过用来传输该数据拍的其他通道,则对相匹配的目标数据单元进行传输,具体对于其他通道,在缓存中存在上一拍的数据单元,则从换从中获取并输出上一拍的数据单元,在缓存中不存在其匹配的数据单元,则直接从接收的数据拍中获取匹配的数据单元进行发送。这样做的目的是为了修正数据流在生成时,由于***数据块导致的有效数据的数据单元的顺序发生了错位。The above steps search whether the data beat contains a data block after receiving the data beat of the data frame in the data stream. If found, it means that the data beat includes a data block. The data block is extracted through the target channel used to transmit the data block, and the matching target data unit is transmitted through other channels used to transmit the data beat. Specifically, for other channels, if there is a data unit of the previous beat in the cache, the data unit of the previous beat is obtained and output from the exchange. If there is no matching data unit in the cache, the matching data unit is directly obtained from the received data beat and sent. The purpose of this is to correct the misalignment of the order of the data units of the valid data caused by the insertion of data blocks when the data stream is generated.
然后将接收的数据拍中未发送的数据单元进行缓存,用来与下一拍的部分数据单元进行组合,还原该拍有效数据。达到了持续对数据块查找和提取的目的,与此同时对数据块***引起的有效数据错位,进行准确校正,实现了对数据块进行准确定位和提取的同时,对有效数据进行复原的技术效果,进而解决了相关技术中灵活以太网的数据流中存在数据块,数据块并不是同一时间出现,难以进行定位和提取,导致数据流中有效数据的顺序难以还原的问题。Then, the unsent data units in the received data beat are cached and combined with some data units of the next beat to restore the valid data of the beat. The purpose of continuously searching and extracting data blocks is achieved. At the same time, the effective data misalignment caused by data block insertion is accurately corrected, and the technical effect of accurately locating and extracting data blocks and restoring valid data is achieved. This solves the problem in the related technology that there are data blocks in the data stream of flexible Ethernet, and the data blocks do not appear at the same time, making it difficult to locate and extract them, resulting in the difficulty in restoring the order of valid data in the data stream.
上述步骤的执行主体可以为灵活以太网,该灵活以太网可以设置在处理器、计算器或控制器上进行数据处理,来执行上述步骤中的数据处理操作,例如步骤S101-步骤S105。The execution subject of the above steps may be a flexible Ethernet, which may be set on a processor, a calculator or a controller to perform data processing to execute the data processing operations in the above steps, such as steps S101 to S105.
上述灵活以太网就设置在介质访问控制层MAC,与物理层PHY之间,用于MAC层与PHY层之间的信号数据转换。在从MAC层到PHY层的过程中,将数据流转换为物理脉冲信号,或者称为数字信号。将数据单元先发送到物理层上,通过物理层的虚通道,进行数据传输。The above-mentioned flexible Ethernet is set between the media access control layer MAC and the physical layer PHY, and is used for signal data conversion between the MAC layer and the PHY layer. In the process from the MAC layer to the PHY layer, the data stream is converted into a physical pulse signal, or a digital signal. The data unit is first sent to the physical layer, and data is transmitted through the virtual channel of the physical layer.
上述数据块可以为开销块(OverHead),在灵活以太网1.0中为发送端和接收端传递配置信息的数据块。上述数据流在发送过程中为了降低对时钟频率的要求,同时也为了提高数据流发送的效率,采用多通道并发的方式进行发送。具体的,将数据流分为多个数据帧,如图2所示,不同列表示不同拍,同一拍的多个数据单元和/或数据块同时接收,不同灰度表示不同的数据节,每个数据节包括多个数据单元,在图2中也即是同一灰度列与多个通道channel对应的方块区域。属于数据流中数据帧的数据也即是有效数据。The above data block may be an overhead block (OverHead), which is a data block for transmitting configuration information between the transmitter and the receiver in Flexible Ethernet 1.0. In order to reduce the requirement for clock frequency during the transmission process and to improve the efficiency of data stream transmission, the above data stream is sent in a multi-channel concurrent manner. Specifically, the data stream is divided into multiple data frames, as shown in FIG2 , different columns represent different beats, and multiple data units and/or data blocks of the same beat are received simultaneously, different grayscales represent different data nodes, and each data node includes multiple data units, which is the square area corresponding to the same grayscale column and multiple channels in FIG2 . The data belonging to the data frame in the data stream is also valid data.
图2中的每一列表示数据流中的一个数据拍,是区分于数据帧和数据节的概念。需要说明的是,数据帧实际上本质就是按照先后顺序排列的多个数据节,数据拍是相对于多通道而言,多通道发送或接收一次,称作一拍动作,其发送或接收的多个数据单元统称为一个数据拍,在本申请中考虑到数据流是重排后的,原来的数据拍对应一个数据节的顺序已 经被打乱,为了与数据流实际的数据拍做以区分,将原来的数据拍,也即是同一灰度的数据单元,称为数据节。Each column in Figure 2 represents a data beat in the data stream, which is a concept different from a data frame and a data section. It should be noted that a data frame is actually essentially a plurality of data sections arranged in a sequential order. A data beat is relative to multiple channels. A multi-channel transmission or reception is called a beat action. The multiple data units sent or received are collectively referred to as a data beat. In this application, considering that the data stream is rearranged, the order of the original data beat corresponding to a data section has been disrupted. In order to distinguish it from the actual data beat of the data stream, the original data beat, that is, the data unit of the same grayscale, is called a data section.
在图中可以体现为右起第一列的数据,该数据为同一拍的数据单元。右起第二列为携带有数据块的数据拍,是经过数据块***导致的,其他通道中传输的同一拍数据的数据单元。右起第三列就包括两个数据节的数据单元,灰度较重的数据单元与上一拍中的数据单元同一节,灰度较轻的数据单元与下一拍中的数据单元同一节。In the figure, the data in the first column from the right is the data unit of the same beat. The second column from the right is the data beat carrying the data block, which is the data unit of the same beat transmitted in other channels after the data block is inserted. The third column from the right includes data units of two data sections. The data unit with a heavier grayscale is the same section as the data unit in the previous beat, and the data unit with a lighter grayscale is the same section as the data unit in the next beat.
在接收数据流的数据拍后,对数据拍中是否***了数据块进行查找。具体的,可以通过计数器进行查找。通过对第一计数器统计的拍数,以及第二计数器统计的数据块的块数。After receiving the data beat of the data stream, it is checked whether a data block is inserted into the data beat. Specifically, the search can be performed through a counter, by counting the number of beats counted by the first counter and the number of data blocks counted by the second counter.
可选地,根据计数器对数据拍中***的数据块进行查找包括:通过第一计数器记录当前接收的数据拍的在当前还原进程中的拍数,通过第二计数器记录定位的数据块在还原进程中的块数,其中,数据拍包含的数据单元或数据块的数量与多通道的通道数量相同,还原进程内的数据块的块数与通道的通道数量相同;根据拍数和块数,确定当前定位的数据块的位置。Optionally, searching for data blocks inserted in data beats according to counters includes: recording the beat number of the currently received data beat in the current restoration process by a first counter, and recording the block number of the located data block in the restoration process by a second counter, wherein the number of data units or data blocks included in the data beat is the same as the number of channels of the multi-channel, and the number of data blocks in the restoration process is the same as the number of channels of the channel; determining the position of the currently located data block according to the beat number and the block number.
例如,PCS有20个通道,那一节传输20个码块的数据,则每一拍就需要***一个开销块,所以第一个数据拍在Channel0上***第一个开销块,第2个数据拍在Channel1上***第2个开销块,第5个数据拍在Channel5上***第5个开销块。For example, PCS has 20 channels, and that section transmits 20 code blocks of data. Therefore, an overhead block needs to be inserted into each beat, so the first data beat inserts the first overhead block on Channel0, the second data beat inserts the second overhead block on Channel1, and the fifth data beat inserts the fifth overhead block on Channel5.
在查找到数据块的情况下,就可以确定传输数据块的数据通道,也即是上述目标通道。对多通道中的目标通道的数据块进行提取,并发送缓存中目标通道匹配的上一拍数据拍未发送的数据单元。When a data block is found, the data channel for transmitting the data block, that is, the target channel, can be determined. The data block of the target channel in the multiple channels is extracted, and the data unit of the previous data beat that is matched by the target channel in the cache and not sent is sent.
需要说明的是,从图2可以看出在***数据块时,是通过多通道中的目标通道传输数据块,其中,目标通道是按照预定顺序对多通道进行遍历确定的,数据块用于标识灵活以太网的配置信息。It should be noted that, as can be seen from FIG. 2 , when inserting a data block, the data block is transmitted through a target channel in the multi-channel, wherein the target channel is determined by traversing the multi-channel in a predetermined order, and the data block is used to identify the configuration information of the flexible Ethernet.
对传输数据块的目标通道,将本应传输的数据单元采用延迟一拍传输的方式。具体的,将目标通道匹配的数据单元进行缓存,在下一拍进行传输,而下一拍应该传输的数据拍的数据单元,就会推迟到下下拍进行传输。这样就目标通道在该传输进程之后的每拍数据拍的数据单元都会延迟一拍传输。For the target channel of the data block, the data unit that should be transmitted is transmitted by delaying one beat. Specifically, the data unit matching the target channel is cached and transmitted in the next beat, while the data unit of the data beat that should be transmitted in the next beat is postponed to the next beat for transmission. In this way, the data unit of each data beat of the target channel after the transmission process will be delayed by one beat for transmission.
为了对数据拍进行重排,本实施例采用将接收到的数据拍都缓存一拍的方式,这样如果检测到了目标通道传输数据块之后,该通道将直接发送接收的数据拍中相匹配的数据单元,与其他没有传输过数据块的通道发送缓存中的上一拍的数据单元结合,刚好可以还原数据节。In order to re-arrange the data beats, this embodiment adopts a method of caching all the received data beats for one beat. In this way, if it is detected that the target channel transmits a data block, the channel will directly send the matching data unit in the received data beat, and combine it with the data unit of the previous beat in the buffer sent by other channels that have not transmitted data blocks, so as to restore the data node.
也即是在目标通道发送缓存中目标通道匹配的上一拍数据拍未发送的数据单元的情况下,通过多通道中目标通道之外的其他通道,对相匹配的目标数据单元进行传输,其中, 目标数据单元为其他通道在缓存中相匹配的数据单元,和数据拍中相匹配的数据单元,中顺序最早的数据单元,缓存中缓存有上一拍数据拍中在上一拍未发送的数据单元。That is, when the target channel sends a data unit that has not been sent in the previous data beat that is matched by the target channel in the sending cache, the matching target data unit is transmitted through other channels other than the target channel in the multi-channels, wherein the target data unit is the earliest data unit in the data unit that is matched by other channels in the cache and the data unit that is matched in the data beat, and the cache caches the data unit that has not been sent in the previous data beat.
需要说明的是,上述顺序最早的数据单元,指的是数据拍顺序最早的数据单元。It should be noted that the data unit with the earliest sequence mentioned above refers to the data unit with the earliest sequence in the data beat.
则当前接收的数据拍中未发送的数据单元,为与下一拍部分数据单元为同一节的数据单元。将当前接收的数据拍中未发送的数据单元进行缓存,以便于下一拍的数据单元组合成同一数据节。The unsent data units in the currently received data beat are data units of the same section as some data units in the next beat. The unsent data units in the currently received data beat are cached so that the data units in the next beat can be combined into the same data section.
达到了持续对数据块查找和提取的目的,与此同时对数据块***引起的有效数据错位,进行准确校正,实现了对数据块进行准确定位和提取的同时,对有效数据进行复原的技术效果,进而解决了相关技术中灵活以太网的数据流中存在数据块,数据块并不是同一时间出现,难以进行定位和提取,导致数据流中有效数据的顺序难以还原的问题。The purpose of continuously searching and extracting data blocks is achieved, and at the same time, the effective data dislocation caused by the insertion of data blocks is accurately corrected, so that the technical effect of accurately locating and extracting data blocks and restoring effective data is achieved, thereby solving the problem in the related technology that there are data blocks in the data stream of flexible Ethernet, the data blocks do not appear at the same time, and it is difficult to locate and extract them, resulting in the order of effective data in the data stream being difficult to restore.
可选地,通过多通道中目标通道之外的其他通道,对相匹配的目标数据单元进行传输包括:读取缓存中缓存的上一数据拍的数据单元;将缓存中的数据单元,分配给其他通道中的相匹配各个通道进行传输;在其他通道中未分配到缓存的数据单元的通道,将当前接收的数据拍中相匹配的数据单元进行传输。Optionally, transmitting the matching target data unit through other channels other than the target channel in the multi-channel includes: reading the data unit of the previous data beat cached in the cache; allocating the data unit in the cache to matching channels in other channels for transmission; and transmitting the matching data unit in the currently received data beat to the channels in other channels that are not allocated with the cached data unit.
在其他通道对相匹配的目标数据单元进行传输时,可以直接从缓存中读取上一拍缓存的数据单元,而每拍数据拍的数据单元与多通道都是有匹配关系的,将缓存中缓存的数据单元直接分发给对应的数据通道。When other channels transmit matching target data units, they can directly read the data units cached in the previous beat from the cache, and the data units of each data beat are matched with multiple channels, and the data units cached in the cache are directly distributed to the corresponding data channels.
根据数据通道是否传输过数据块,而划分为第一通道和第二通道,第一通道为预定顺序中没有传输过数据块的通道,第二通道为预定顺序中已经传输过数据块的通道。The data channel is divided into a first channel and a second channel according to whether the data block has been transmitted. The first channel is a channel that has not transmitted a data block in a predetermined sequence, and the second channel is a channel that has transmitted a data block in a predetermined sequence.
分发到的数据单元的数据通道就是上述第一通道,就直接发送缓存分发的数据单元即可。而没有分发到的数据通道就是上述第二通道,就直接发送接收的数据拍中匹配的数据单元即可。The data channel of the distributed data unit is the first channel, and the data unit distributed by the cache can be directly sent. The data channel that is not distributed is the second channel, and the data unit matching in the received data beat can be directly sent.
这样只需要对传输的数据块进行计数,就可以知道预定顺序中序号大于当前数据块的计数的数据通道,则属于第一通道,否则,预定顺序中序号小于等于当前数据块的计数的数据通道,则属于第二通道。In this way, we only need to count the transmitted data blocks to know that the data channel whose sequence number in the predetermined order is greater than the count of the current data block belongs to the first channel, otherwise, the data channel whose sequence number in the predetermined order is less than or equal to the count of the current data block belongs to the second channel.
对于第一通道,其传输的数据单元都是从缓存中获取的上一拍数据拍中相匹配的数据单元,对于第二通道,其传输的数据单元都是当前接收的数据拍中相匹配的数据单元。这样就可以有序,按照规则对数据节进行还原和传输。For the first channel, the data units transmitted are all the matching data units in the previous data beat obtained from the cache, and for the second channel, the data units transmitted are all the matching data units in the currently received data beat. In this way, the data nodes can be restored and transmitted in an orderly and regular manner.
可选地,方法还包括:在多通道的每个通道均完成一次对数据块的提取的情况下,通过多通道并发一次空白块;其中,空白块用于指示数据流的接收端对数据拍的还原进程进行隔离。Optionally, the method further includes: when each channel of the multiple channels completes the extraction of the data block once, issuing a blank block through the multiple channels; wherein the blank block is used to instruct the receiving end of the data stream to isolate the restoration process of the data beat.
在多通道的每个通道均完成一次对数据块的提取的情况下,说明本次还原进程已经完成,可以通过多通道并发一次空白块与下一次还原进程相隔离。方便后续对数据流进行处理。When each channel of the multi-channel completes the extraction of the data block once, it means that the current restoration process has been completed, and the blank block can be isolated from the next restoration process through the multi-channel concurrent transmission, which is convenient for the subsequent processing of the data stream.
具体地,后续对数据流进行处理时,一个还原进程与另一还原进程的数据也是隔离的,并且接收到这个空白块,就可以对已经成功接收的一个还原进程中的数据进行处理,包括对数据节的重排和复原。Specifically, when the data stream is subsequently processed, the data of one restore process is also isolated from the data of another restore process, and after receiving the blank block, the data in a restore process that has been successfully received can be processed, including the rearrangement and restoration of the data sections.
可选地,接收灵活以太网的多通道并发传输的数据流的数据拍包括:接收物理层向灵活以太网的逻辑层,发送的比特码数据流,其中,比特码数据流是按拍进行发送的。Optionally, receiving data beats of a data stream of a multi-channel concurrent transmission of the flexible Ethernet includes: receiving a bit code data stream sent by a physical layer to a logical layer of the flexible Ethernet, wherein the bit code data stream is sent in beats.
如上,上述灵活以太网就设置在介质访问控制层MAC,与物理层PHY之间,用于MAC层与PHY层之间的信号数据转换。上述灵活以太网可以为FlexE,上述逻辑层可以为FlexE Shim层。上述处理方法就是上述物理层向灵活以太网将逻辑层发送的比特码数据流进行复原和重排。As mentioned above, the flexible Ethernet is set between the media access control layer MAC and the physical layer PHY for signal data conversion between the MAC layer and the PHY layer. The flexible Ethernet may be FlexE, and the logic layer may be a FlexE Shim layer. The processing method is that the physical layer restores and rearranges the bit code data stream sent by the logic layer to the flexible Ethernet.
可选地,方法还包括:在没有查找到数据块的情况下,从缓存中读取缓存的上一数据拍的数据单元;将缓存中的数据单元,分配给多通道中的相匹配各个通道进行传输;在多通道中的通道与缓存中的数据单元均不匹配的情况下,将当前接收的数据拍中相匹配的数据单元进行传输。Optionally, the method also includes: when no data block is found, reading the data unit of the previous data beat in the cache from the cache; allocating the data units in the cache to matching channels in the multiple channels for transmission; when no channel in the multiple channels matches the data units in the cache, transmitting the matching data units in the currently received data beat.
在同一还原进程中,由于没有提取过数据块的数据通道,在提取数据块之前的每一数据拍的发送都会延迟一拍。因此,在一些没有查找到数据块的场景下,也需要对多通道中的通道做以区分。In the same restore process, since the data channel that has not extracted the data block will delay the sending of each data beat before extracting the data block. Therefore, in some scenarios where the data block is not found, it is also necessary to distinguish the channels in the multi-channel.
区分原则与上述相同,也即是多通道中的第一通道为预定顺序中没有传输过数据块的通道,第二通道为预定顺序中已经传输过数据块的通道。The distinguishing principle is the same as above, that is, the first channel in the multiple channels is a channel that has not transmitted a data block in the predetermined sequence, and the second channel is a channel that has transmitted a data block in the predetermined sequence.
在具体实施时,也可以采用直接从缓存中读取上一拍缓存的数据单元,将缓存中缓存的数据单元直接分发给对应的数据通道的方式。没有分发到的数据通道就是上述第一通道,就直接发送接收的数据拍中匹配的数据单元即可。而分发到的数据单元的数据通道就是上述第二通道,直接发送缓存分发的数据单元即可。In specific implementation, the data unit cached in the previous shot can also be directly read from the cache, and the data unit cached in the cache can be directly distributed to the corresponding data channel. The data channel that has not been distributed is the first channel mentioned above, and the matching data unit in the received data shot can be directly sent. The data channel of the distributed data unit is the second channel mentioned above, and the data unit distributed by the cache can be directly sent.
可选地,将当前接收的数据流的数据拍进行缓存包括:将当前接收的数据流的数据拍缓存至寄存器中;将当前接收的数据拍中未发送的数据单元进行缓存包括:将当前接收的数据拍中未发送的数据单元缓存至寄存器中。Optionally, caching data beats of the currently received data stream includes: caching data beats of the currently received data stream into a register; caching unsent data units in the currently received data beat includes: caching unsent data units in the currently received data beat into a register.
上述缓存可以由寄存器进行缓存,只需要单个寄存器,即可完成操作,不需要大面积的存储单元存储数据,不仅节省了面积而且还保证了速率。The above cache can be cached by registers. Only a single register is needed to complete the operation. No large-area storage unit is needed to store data, which not only saves area but also ensures the speed.
需要说明的是,在附图的流程图中示出的步骤可以在诸如一组计算机可执行指令的计算机***中执行,虽然在流程图中示出了步骤执行逻辑顺序,但是在某些情况下,这些步骤可以按照不同于流程图中的顺序而执行。It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. Although the logical order of step execution is shown in the flowchart, in some cases, these steps can be executed in an order different from that in the flowchart.
需要说明的是,本申请还提供了一种可选的实施例,下面对该实施例进行详细说明。It should be noted that the present application also provides an optional embodiment, which is described in detail below.
本实施例提供了一种灵活以太网接收端开销块锁定后有效数据提取的方法,以解决上述技术问题。This embodiment provides a method for extracting valid data after locking the overhead block at a flexible Ethernet receiving end, so as to solve the above technical problem.
在灵活以太网FlexE的Shim逻辑层将Calendar日志上面的数据分发到各个物理层PHY通道后,在物理层PHY通道上***开销块,也即是上述数据块。所以接收侧接收到的包含开销块的数据流带宽大于有效数据流,需要在数据传输到MAC层(媒体介入控制层,Media Access Control)之前,识别并删除开销块,将开销块后的有效数据提取出来,使得传到MAC层的只有纯用户数据,开销块在传输到PCS层时,已经提取了配置信息且被删除。After the Shim logical layer of the flexible Ethernet FlexE distributes the data on the Calendar log to each physical layer PHY channel, an overhead block, which is the above data block, is inserted into the physical layer PHY channel. Therefore, the bandwidth of the data stream containing the overhead block received by the receiving side is greater than the valid data stream. Before the data is transmitted to the MAC layer (Media Access Control), it is necessary to identify and delete the overhead block and extract the valid data after the overhead block, so that only pure user data is transmitted to the MAC layer. When the overhead block is transmitted to the PCS layer, the configuration information has been extracted and deleted.
灵活以太网在完成开销锁定之后,从该开销块往后的数据块才是需要的有效数据块,只有正确识别出开销块,才能将后边的有效数据拼接起来。但是,由于FlexE的带宽都超过100G,在PCS子层编码时,如果输入端考虑以64bit为单位的码块数据流,对应100Gb/s的数据流量,其时钟频率将高达1.6GHz,这样的工作时钟在FPGA(Field Programmable Gate Array,现场可编程逻辑门阵列)设计中很难实现。After Flexible Ethernet completes overhead locking, the data blocks after the overhead block are the required valid data blocks. Only by correctly identifying the overhead block can the valid data behind it be spliced together. However, since the bandwidth of FlexE exceeds 100G, when encoding the PCS sublayer, if the input end considers the code block data stream in units of 64bit, corresponding to the data flow of 100Gb/s, its clock frequency will be as high as 1.6GHz. Such a working clock is difficult to implement in FPGA (Field Programmable Gate Array) design.
所以FlexE通常需要用多通道并行传输数据。例如,利用10条通道并行处理10路64bit数据,则时钟频率只需满足160MHz,相比1.6GHz的工作时钟,完全符合现实设计要求。开销块是灵活以太网为了传输配置信息而***的额外码块,占用了有效数据的带宽,所以在数据发送到MAC层用户端前需要将其删除,开销块的删除即在提取完开销块配置信息之后。Therefore, FlexE usually needs to use multiple channels to transmit data in parallel. For example, if 10 channels are used to process 10 channels of 64-bit data in parallel, the clock frequency only needs to meet 160MHz, which is completely in line with the actual design requirements compared to the 1.6GHz working clock. The overhead block is an additional code block inserted by Flexible Ethernet to transmit configuration information. It occupies the bandwidth of valid data, so it needs to be deleted before the data is sent to the MAC layer user end. The deletion of the overhead block is after the overhead block configuration information is extracted.
在接收端中,灵活以太网100G数据上的实例被分发在多个数据通道上传输,开销块可能出现在任意通道上。因此,根据开销块所在的通道号,从多个数据通道对应位置取出有效数据块拼成一个完整的实例是本实施例的难点。In the receiving end, the instances on the flexible Ethernet 100G data are distributed and transmitted on multiple data channels, and the overhead blocks may appear on any channel. Therefore, according to the channel number where the overhead block is located, it is difficult to take out valid data blocks from the corresponding positions of multiple data channels to form a complete instance.
有效数据指的是用户需要的数据(传到MAC层中的数据),开销块只是为了传递配置信息,不是用户需要的数据,开销块按协议***(协议规定了***位置)到有效数据中跟有效数据共同传输,所以在接收端提取出开销块配置信息后需要将其删掉,避免用户读取到错误的数据,完整的实例指的是用户侧需要的完整数据流,如果没有识别出开销块,就无法正确提取出用户需要的有效数据。Valid data refers to the data required by the user (data transmitted to the MAC layer). The overhead block is only for transmitting configuration information, not the data required by the user. The overhead block is inserted into the valid data according to the protocol (the protocol specifies the insertion position) and is transmitted together with the valid data. Therefore, after the overhead block configuration information is extracted at the receiving end, it needs to be deleted to prevent the user from reading wrong data. A complete instance refers to the complete data stream required by the user side. If the overhead block is not identified, the valid data required by the user cannot be correctly extracted.
本实施例通过接收物理层的多通道并发传输的数据流,利用计数器定位第一个数据块出现后的数据块位置信息,其中位置信息包括在哪个通道,什么时间出现,利用寄存器寄存数据,并用信号控制输出逻辑,将分散在多个通道的数据拍提取出来,其中每一个通道都有一个寄存器,信号为是否查找到数据块,输出逻辑为利用发出信号从不同位置读取数据单元并发送,位置为寄存器或输入进来的数据。This embodiment receives the data stream transmitted concurrently by multiple channels at the physical layer, uses a counter to locate the data block position information after the first data block appears, wherein the position information includes which channel and when it appears, uses a register to store data, and uses a signal to control the output logic, and extracts the data scattered in multiple channels, wherein each channel has a register, and the signal indicates whether the data block is found, and the output logic uses the signal to read and send data units from different positions, and the position is a register or input data.
解决两个问题:解决了相关技术中灵活以太网的数据流中存在数据块,导致数据流中有效数据的顺序难以还原的问题。解决了在多通道传输时数据块并不是同一时间出现,难以进行定位和提取的问题。Solve two problems: solve the problem that the data blocks in the data stream of flexible Ethernet in the related technology make it difficult to restore the order of valid data in the data stream. Solve the problem that the data blocks do not appear at the same time during multi-channel transmission, making it difficult to locate and extract.
图2是根据本申请实施例提供的***数据块的多通道数据流结构的示意图,如图2所示,PHY通道上同一时钟周期应该承载的真实数据块,上边的数字表示传输数据的顺序, 下边的数字1~N表示***的开销块数量,N表示通道数,不同灰度的方块表示需要传输的有效数据,同一灰度表示同一数据拍。若不对数据拍进行校正,就正常提取数据,删除开销块后有效数据的传输仍然不在同一拍上并行输出。FIG2 is a schematic diagram of a multi-channel data stream structure with inserted data blocks provided according to an embodiment of the present application. As shown in FIG2, the real data blocks that should be carried in the same clock cycle on the PHY channel, the numbers on the top indicate the order of transmitted data, the numbers 1 to N below indicate the number of inserted overhead blocks, N indicates the number of channels, and blocks of different grayscales indicate valid data to be transmitted, and the same grayscale indicates the same data beat. If the data beat is not corrected, the data is extracted normally, and the transmission of valid data after deleting the overhead block is still not output in parallel on the same beat.
例如,第一拍读取第1拍灰度的数据,此时数据是完整的,但第2拍的数据有一个通道存在开销块,所以这一拍只能读N-1个数据,有1个数据需要在下一拍读出,读出的数据不完整,所以需要进行数据重排。For example, the first beat reads the grayscale data of the first beat. At this time, the data is complete, but there is an overhead block in one channel of the data of the second beat, so this beat can only read N-1 data. There is 1 data that needs to be read out in the next beat. The read data is incomplete, so data rearrangement is required.
图3是根据本申请实施例提供的数据流提取数据块后的示意图,如图3所示,本实施例提供的解决方法如下:FIG3 is a schematic diagram of a data stream after extracting a data block according to an embodiment of the present application. As shown in FIG3 , the solution provided by this embodiment is as follows:
每个通道都使用一个寄存器将上一拍传输的数据进行缓存。在完成FlexE以太网PHY上开销的锁定后,根据开销块的所在通道号的位置信息,判断选择是将寄存器中的数据输出到FlexE Shim层还是将输入数据(来自解扰码模块)输出到FlexE Shim层。当该通道未输出开销块时,则输出寄存器中的数据,当该通道根据开销块所在的位置信息判断开销块已经输入,则在下一节开始,该通道输出输入进来的数据。Each channel uses a register to cache the data transmitted in the previous beat. After completing the locking of the overhead on the FlexE Ethernet PHY, the channel number of the overhead block is used to determine whether to output the data in the register to the FlexE Shim layer or to output the input data (from the descrambling module) to the FlexE Shim layer. When the channel does not output the overhead block, the data in the register is output. When the channel determines that the overhead block has been input based on the location information of the overhead block, the channel outputs the input data at the beginning of the next section.
例如,第一个通道将第一拍数据缓存到寄存器中,第2拍检测到开销块输入,此时发送寄存器的数据,即图3中最右一列灰度较重的数据,第3拍直接发送输入进来的数据即右起第二列灰度较重的数据,而第2个通道第一拍也是将最右一列灰度较重的数据缓存到寄存器中,第2拍读取寄存器中的最右一列灰度较重的数据,并将右起第二列灰度较重的数据缓存到寄存器中,第三拍输出寄存器中的右起第二列灰度较重的数据,通过这样的方法,第1和第2通道每一拍输出的数据都是同一灰度的数据,保证数据的顺序不会错乱,当所有通道都输入了开销块后,所有通道并行输出一拍以太网空闲IDLE(将开销块替换成空闲块),下一拍重新输出寄存器中的数据,通过这样的方法便可正确提取多通道开销块锁定后的有效数据。For example, the first channel caches the first beat data into the register, and the second beat detects the input of the overhead block. At this time, the data in the register is sent, that is, the data with heavier grayscale in the rightmost column in Figure 3. The third beat directly sends the input data, that is, the data with heavier grayscale in the second column from the right. The first beat of the second channel also caches the data with heavier grayscale in the rightmost column into the register. The second beat reads the data with heavier grayscale in the rightmost column in the register, and caches the data with heavier grayscale in the second column from the right into the register. The third beat outputs the data with heavier grayscale in the second column from the right in the register. In this way, the data output by each beat of the first and second channels are data of the same grayscale, ensuring that the order of the data will not be disordered. When all channels have input the overhead block, all channels output one beat of Ethernet idle IDLE in parallel (replacing the overhead block with the idle block), and the next beat re-outputs the data in the register. In this way, the valid data after the multi-channel overhead blocks are locked can be correctly extracted.
本实施例的另外一个难点是FlexE开销拍中其他开销块位置的确定,目的是正确提取开销块后面的有效数据并把开销块替换成以太网空闲块。在进行以太网PHY上FlexE实例中开销锁定时,识别的仅仅是FlexE开销拍中的第一个开销块。对于FlexE开销拍中的其他开销块的位置并且没有指出。Another difficulty of this embodiment is to determine the location of other overhead blocks in the FlexE overhead beat, in order to correctly extract the valid data behind the overhead block and replace the overhead block with the Ethernet idle block. When performing overhead locking in the FlexE instance on the Ethernet PHY, only the first overhead block in the FlexE overhead beat is identified. The location of other overhead blocks in the FlexE overhead beat is not specified.
在FlexE 1.0协议规定开销块的***间距是每隔1023*20个码块便要***一个开销块,PHY通道上的开销块位置是固定的,一旦锁定就可以知道后边开销块的位置,但是为了降低频率,PHY一般会采用多通道传输,所有开销块***到各个通道上的位置难以确定,本实施例将引入周期计数器counter1023(对传输的码块进行计数,1023个码块为一个周期)和counter1023countNum(对counter1023完成的周期次数进行计数)两个计数器来确定FlexE的开销拍中其他开销块在多通道传输中的位置。The FlexE 1.0 protocol stipulates that the insertion interval of the overhead block is to insert an overhead block every 1023*20 code blocks. The position of the overhead block on the PHY channel is fixed. Once locked, the position of the subsequent overhead block can be known. However, in order to reduce the frequency, PHY generally adopts multi-channel transmission. The position of all overhead blocks inserted into each channel is difficult to determine. This embodiment will introduce two counters, cycle counter counter1023 (counting the transmitted code blocks, 1023 code blocks as a cycle) and counter1023countNum (counting the number of cycles completed by counter1023) to determine the position of other overhead blocks in the FlexE overhead beat in multi-channel transmission.
例如,PCS层有20个通道,那一节传输20个码块的数据,则1023帧就需要***一个开销块,所以第一个1023拍在通道Channel0上***第一个开销块,第2个1023拍在 Channel1上***第2个开销块,第5个1023拍在Channel5上***第5个开销块。即第一个计数器计数第几拍数据,第2个计数器计数这是***的第几个开销块。图4是根据本申请实施例提供的多通道数据流中数据块位置的示意图,如图4所示,黑色为每条通道开销块所在的位置,每个通道开销块的位置都可以根据通道数和对码块的周期计数器计算出来。For example, the PCS layer has 20 channels, and that section transmits 20 code blocks of data, then 1023 frames need to insert an overhead block, so the first 1023 beats insert the first overhead block on channel Channel0, the second 1023 beats insert the second overhead block on Channel1, and the fifth 1023 beats insert the fifth overhead block on Channel5. That is, the first counter counts the beat of data, and the second counter counts the inserted overhead block. Figure 4 is a schematic diagram of the position of data blocks in a multi-channel data stream provided according to an embodiment of the present application. As shown in Figure 4, the black color is the position of each channel overhead block, and the position of each channel overhead block can be calculated based on the number of channels and the period counter of the code block.
本实施例通过寄存器缓存数据,将开销块后的有效数据提取出来同时使得有效数据的顺序不会错乱。仅用寄存器即可完成,避免了使用过多的存储单元,既节省了面积,也保证了速度。避免了繁琐的数据重排设计。This embodiment uses registers to cache data, extracts valid data after the overhead block, and keeps the order of valid data in order. This can be accomplished using only registers, avoiding the use of too many storage units, saving area and ensuring speed. It avoids cumbersome data rearrangement design.
图5是根据本申请实施例提供的一种灵活以太网的数据块的处理装置的示意图,如图5所示,本申请实施例还提供了一种灵活以太网的数据块的处理装置,需要说明的是,本申请实施例的灵活以太网的数据块的处理装置可以用于执行本申请实施例所提供的用于灵活以太网的数据块的处理方法。以下对本申请实施例提供的灵活以太网的数据块的处理装置进行说明。该装置包括:接收模块51,查找模块52,提取模块53,传输模块54,缓存模块55,具体如下。FIG5 is a schematic diagram of a data block processing device for a flexible Ethernet according to an embodiment of the present application. As shown in FIG5 , the embodiment of the present application also provides a data block processing device for a flexible Ethernet. It should be noted that the data block processing device for a flexible Ethernet according to the embodiment of the present application can be used to execute the data block processing method for a flexible Ethernet provided in the embodiment of the present application. The data block processing device for a flexible Ethernet provided in the embodiment of the present application is described below. The device includes: a receiving module 51, a search module 52, an extraction module 53, a transmission module 54, and a cache module 55, as follows.
接收模块51,用于接收物理层的多通道并发传输的数据流,其中,数据流包括多个数据帧,数据帧包括多个数据拍,数据拍包括至少一个数据帧的数据单元,以及***在数据单元之间的数据块,数据块用于标识数据流的配置信息;查找模块52,与上述接收模块51相连,用于根据计数器对数据拍中***的数据块进行查找;提取模块53,与上述查找模块52相连,用于在查找到数据块的情况下,对多通道中的目标通道的数据块进行提取,并发送缓存中目标通道匹配的上一拍数据拍未发送的数据单元,其中,目标通道为定位到的数据块所在的通道;传输模块54,与上述提取模块53相连,用于通过多通道中目标通道之外的其他通道,对相匹配的目标数据单元进行传输,其中,目标数据单元为其他通道在缓存中相匹配的数据单元,和数据拍中相匹配的数据单元,中顺序最早的数据单元,缓存中缓存有上一拍数据拍中在上一拍未发送的数据单元;缓存模块55,与上述传输模块54相连,用于将当前接收的数据拍中未发送的数据单元进行缓存。The receiving module 51 is used to receive a data stream of multi-channel concurrent transmission at the physical layer, wherein the data stream includes multiple data frames, the data frame includes multiple data beats, the data beat includes at least one data unit of the data frame, and a data block inserted between the data units, and the data block is used to identify the configuration information of the data stream; the search module 52 is connected to the above-mentioned receiving module 51, and is used to search for the data block inserted in the data beat according to the counter; the extraction module 53 is connected to the above-mentioned search module 52, and is used to extract the data block of the target channel in the multi-channel when the data block is found, and send the last matched data block of the target channel in the cache. The data units that have not been sent in the data beat are captured, wherein the target channel is the channel where the located data block is located; a transmission module 54, connected to the above-mentioned extraction module 53, is used to transmit the matching target data units through other channels other than the target channel in the multi-channels, wherein the target data units are the data units that match in the cache of other channels and the data units that match in the data beat, the earliest data units in the order, and the cache contains the data units that have not been sent in the previous beat of the data beat; a cache module 55, connected to the above-mentioned transmission module 54, is used to cache the data units that have not been sent in the currently received data beat.
通过接收到数据流的数据拍后,对数据拍是否包含有数据块进行查找,在查找到的情况下,说明该数据拍包括了数据块,通过用来传输该数据块的目标通道对数据块进行提取,通过用来传输该数据拍的其他通道,则对相匹配的目标数据单元进行传输,具体对于其他通道,在缓存中存在上一拍的数据单元,则从换从中获取并输出上一拍的数据单元,在缓存中不存在其匹配的数据单元,则直接从接收的数据拍中获取匹配的数据单元进行发送。这样做的目的是为了修正数据流在生成时,由于***数据块导致的有效数据的数据单元的顺序发生了错位。After receiving the data beat of the data stream, it searches whether the data beat contains a data block. If it is found, it means that the data beat includes a data block. The data block is extracted through the target channel used to transmit the data block, and the matching target data unit is transmitted through other channels used to transmit the data beat. Specifically, for other channels, if the data unit of the previous beat exists in the cache, the data unit of the previous beat is obtained and output from the exchange. If the matching data unit does not exist in the cache, the matching data unit is directly obtained from the received data beat and sent. The purpose of this is to correct the misalignment of the order of the data units of the valid data caused by the insertion of data blocks when the data stream is generated.
然后将接收的数据拍中未发送的数据单元进行缓存,用来与下一拍的部分数据单元进行组合,还原该拍有效数据。达到了持续对数据块查找和提取的目的,与此同时实现了对 数据块***引起的有效数据错位,进行准确校正,实现了对数据块进行准确定位和提取的同事,对有效数据进行复原的技术效果,进而解决了相关技术中灵活以太网的数据流中存在数据块,数据块并不是同一时间出现,难以进行定位和提取,导致数据流中有效数据的顺序难以还原的问题。Then, the unsent data units in the received data beat are cached and combined with some data units of the next beat to restore the valid data of the beat. The purpose of continuously searching and extracting data blocks is achieved, and at the same time, the effective data misalignment caused by data block insertion is accurately corrected, and the technical effect of accurately locating and extracting data blocks and restoring valid data is achieved, thereby solving the problem in the related technology that there are data blocks in the data stream of flexible Ethernet, and the data blocks do not appear at the same time, making it difficult to locate and extract, resulting in the difficulty of restoring the order of valid data in the data stream.
灵活以太网的数据块的处理装置包括处理器和存储器,上述接收模块51,查找模块52,提取模块53,传输模块54,缓存模块55等均作为程序单元存储在存储器中,由处理器执行存储在存储器中的上述程序单元来实现相应的功能。The data block processing device of the flexible Ethernet includes a processor and a memory. The above-mentioned receiving module 51, search module 52, extraction module 53, transmission module 54, cache module 55, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
处理器中包含内核,由内核去存储器中调取相应的程序单元。内核可以设置一个或以上,通过调整内核参数来解决了相关技术中非电容屏原配的电容笔在使用时,用户无法确定是否适配的问题。The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the problem in the related art that the user cannot determine whether the capacitive pen that is not originally provided with the capacitive screen is compatible when used is solved by adjusting the kernel parameters.
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM),存储器包括至少一个存储芯片。The memory may include non-permanent memory in a computer-readable medium, in the form of random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
本申请实施例提供了一种计算机可读存储介质,其上存储有计算机可读程序指令,该计算机可读程序指令被处理器执行时实现上述任一灵活以太网的数据块的处理方法。An embodiment of the present application provides a computer-readable storage medium on which computer-readable program instructions are stored. When the computer-readable program instructions are executed by a processor, any of the above-mentioned methods for processing data blocks of a flexible Ethernet is implemented.
本申请实施例提供了一种处理器,所述处理器用于执行计算机可读程序指令,其中,所述计算机可读程序指令被执行时,实现上述任一灵活以太网的数据块的处理方法。An embodiment of the present application provides a processor, which is used to execute computer-readable program instructions, wherein when the computer-readable program instructions are executed, any of the above-mentioned methods for processing data blocks of the flexible Ethernet is implemented.
图6是根据本申请实施例提供的一种电子设备的示意图,如图6所示,本申请实施例提供了一种电子设备60,设备包括处理器、存储器及存储在存储器上并可由处理器上执行的计算机可读程序指令,处理器执行计算机可读程序指令时实现上述任一灵活以太网的数据块的处理方法的步骤:FIG6 is a schematic diagram of an electronic device provided according to an embodiment of the present application. As shown in FIG6 , an embodiment of the present application provides an electronic device 60, the device including a processor, a memory, and computer-readable program instructions stored in the memory and executable by the processor. When the processor executes the computer-readable program instructions, the steps of the method for processing a data block of any flexible Ethernet described above are implemented:
本文中的设备可以是服务器、PC、PAD、手机等。The devices in this article can be servers, PCs, PADs, mobile phones, etc.
本申请还提供了一种计算机程序产品,当其在用于灵活以太网的数据块的处理设备上被执行时,可实现有上述任一方法步骤的程序。The present application also provides a computer program product, which can implement a program having any of the above method steps when it is executed on a data block processing device for flexible Ethernet.
本领域内的技术人员应明白,本申请的实施例可提供为方法、***、或计算机程序产品等。因此,本申请可采用完全硬件化的实施例、完全软件化的实施例、或软、硬件结合形式的实施例。此外,本申请还可采用在一个或多个其中包含有计算机可读程序指令的计算机可读存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products, etc. Therefore, the present application may adopt a fully hardware embodiment, a fully software embodiment, or an embodiment in the form of a combination of software and hardware. In addition, the present application may also adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-readable program instructions.
本申请是参照根据本申请实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程灵活以太网的数据块的处理设备的处理器以产生一个机器,使得通过计算机或其他可编程灵活以太网的数据块的 电子设备的处理器执行的指令产生用于实现在流程图中的一个流程或多个流程和/或方框图中的一个方框或多个方框中指定的功能的装置。The present application is described with reference to the flowcharts and/or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and/or box in the flowchart and/or block diagram, as well as the combination of the processes and/or boxes in the flowchart and/or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable flexible Ethernet data block processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable flexible Ethernet data block electronic device generate a device for implementing the functions specified in one process or multiple processes in the flowchart and/or one box or multiple boxes in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程的用于灵活以太网的数据块的电子设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图中的一个流程或多个流程和/或方框图中的一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable electronic device for flexible Ethernet data blocks to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程的用于灵活以太网的数据块的电子设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而使得在计算机或其他可编程设备上执行的指令提供用于实现在流程图中的一个流程或多个流程和/或方框图中的一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable electronic device for data block of Flexible Ethernet, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。存储器是计算机可读介质的示例。Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and/or non-volatile memory in the form of read-only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
本领域技术人员应明白,本申请的实施例可提供为方法、***或计算机程序产品。因此,本申请可采用完全硬件化的实施例、完全软件化的实施例或软、硬件结合的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可读程序指令的计算机可读存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a fully hardware embodiment, a fully software embodiment or a combination of software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-readable program instructions.
以上仅为本申请的示例性实施例,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above are only exemplary embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

  1. 一种灵活以太网的数据块的处理方法,其特征在于,所述方法包括:A method for processing a data block of a flexible Ethernet, characterized in that the method comprises:
    接收物理层的多通道并发传输的数据流,其中,所述数据流包括多个数据帧,所述数据帧包括多个数据拍,所述数据拍包括至少一个数据节的数据单元,以及***在数据单元之间的数据块,所述数据块用于标识所述数据流的配置信息;Receiving a data stream of multi-channel concurrent transmission of a physical layer, wherein the data stream includes a plurality of data frames, the data frame includes a plurality of data beats, the data beat includes a data unit of at least one data node, and a data block inserted between the data units, the data block is used to identify configuration information of the data stream;
    根据计数器对所述数据拍中***的数据块进行查找;Searching for the data block inserted in the data beat according to the counter;
    在查找到数据块的情况下,对所述多通道中的目标通道的所述数据块进行提取,并发送所述缓存中所述目标通道匹配的上一拍数据拍未发送的数据单元,其中,所述目标通道为定位到的数据块所在的通道;In the case where a data block is found, the data block of the target channel in the multiple channels is extracted, and the data unit of the previous data beat that matches the target channel in the cache and is not sent is sent, wherein the target channel is the channel where the located data block is located;
    通过所述多通道中所述目标通道之外的其他通道,对相匹配的目标数据单元进行传输,其中,所述目标数据单元为所述其他通道在缓存中相匹配的数据单元,和所述数据拍中相匹配的数据单元,中顺序最早的数据单元,所述缓存中缓存有上一拍数据拍中在上一拍未发送的数据单元;Transmitting a matched target data unit through other channels other than the target channel in the multiple channels, wherein the target data unit is the earliest data unit in the order of the matched data units in the cache of the other channels and the matched data units in the data beat, and the cache has the data units in the previous beat of the data beat that were not sent in the previous beat;
    将当前接收的所述数据拍中未发送的数据单元进行缓存。The unsent data units in the currently received data beat are cached.
  2. 根据权利要求1所述的方法,其特征在于,通过所述多通道中所述目标通道之外的其他通道,对相匹配的目标数据单元进行传输包括:The method according to claim 1, characterized in that transmitting the matching target data unit through other channels other than the target channel in the multiple channels comprises:
    读取缓存中缓存的上一数据拍的数据单元;Read the data unit of the previous data beat cached in the cache;
    将所述缓存中的数据单元,分配给所述其他通道中的相匹配各个通道进行传输;Allocating the data units in the cache to the matching channels in the other channels for transmission;
    在所述其他通道中未分配到缓存的数据单元的通道,将当前接收的所述数据拍中相匹配的数据单元进行传输。The channels that are not allocated with the cached data units in the other channels transmit the matching data units in the currently received data beats.
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, characterized in that the method further comprises:
    在所述多通道的每个通道均完成一次对数据块的提取的情况下,通过所述多通道并发一次空白块;When each channel of the multiple channels completes extracting a data block once, a blank block is sent through the multiple channels simultaneously;
    其中,所述空白块用于指示所述数据流的接收端对数据拍种不同的数据节的还原进程进行隔离。The blank block is used to instruct the receiving end of the data stream to isolate the restoration process of data nodes of different data types.
  4. 根据权利要求3所述的方法,其特征在于,根据计数器对所述数据拍中***的数据块进行查找包括:The method according to claim 3, characterized in that searching for the data block inserted in the data beat according to the counter comprises:
    通过第一计数器记录当前接收的数据拍的在当前还原进程中的拍数,通过第二计数器记录定位的数据块在所述还原进程中的块数,其中,所述数据拍包含的数据单元或数据块的数量与所述多通道的通道数量相同,所述还原进程内的数据块的块数与所述通道的通道数量相同;Recording the number of the currently received data beat in the current restoration process through a first counter, and recording the number of the located data block in the restoration process through a second counter, wherein the number of data units or data blocks included in the data beat is the same as the number of channels of the multi-channels, and the number of data blocks in the restoration process is the same as the number of channels of the channels;
    根据所述拍数和所述块数,确定当前定位的数据块的位置。The position of the currently located data block is determined according to the beat number and the block number.
  5. 根据权利要求3所述的方法,其特征在于,接收灵活以太网的多通道并发传输的数据流的数据拍包括:The method according to claim 3 is characterized in that receiving data beats of data streams concurrently transmitted by multiple channels of Flexible Ethernet comprises:
    接收物理层向所述灵活以太网的逻辑层,发送的比特码数据流,其中,所述比特码数据流是按拍进行发送的。A bit code data stream is sent from the receiving physical layer to the logical layer of the flexible Ethernet, wherein the bit code data stream is sent in beats.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 5, characterized in that the method further comprises:
    在没有查找到数据块的情况下,从所述缓存中读取缓存的上一数据拍的数据单元;If no data block is found, read the data unit of the last data beat in the cache from the cache;
    将所述缓存中的数据单元,分配给所述多通道中的相匹配各个通道进行传输;Allocating the data units in the cache to the matching channels in the multiple channels for transmission;
    在所述多通道中的通道与所述缓存中的数据单元均不匹配的情况下,将当前接收的所述数据拍中相匹配的数据单元进行传输。In the case that none of the channels in the multiple channels matches the data units in the cache, the matching data units in the currently received data beat are transmitted.
  7. 根据权利要求6所述的方法,其特征在于,将当前接收的所述数据流的数据拍进行缓存包括:The method according to claim 6, characterized in that caching the data beats of the currently received data stream comprises:
    将当前接收的所述数据流的数据拍缓存至寄存器中;Buffering the data of the data stream currently received into a register;
    将当前接收的所述数据拍中未发送的数据单元进行缓存包括:Buffering the unsent data units in the currently received data beat includes:
    将当前接收的所述数据拍中未发送的数据单元缓存至所述寄存器中。The unsent data units in the currently received data beat are cached in the register.
  8. 一种灵活以太网的数据块的处理装置,其特征在于,包括:A device for processing data blocks of a flexible Ethernet, characterized by comprising:
    接收模块,用于接收物理层的多通道并发传输的数据流,其中,所述数据流包括多个数据帧,所述数据帧包括多个数据拍,所述数据拍包括至少一个数据节的数据单元,以及***在数据单元之间的数据块,所述数据块用于标识所述数据流的配置信息;A receiving module, configured to receive a data stream of multi-channel concurrent transmission of a physical layer, wherein the data stream includes a plurality of data frames, the data frame includes a plurality of data beats, the data beat includes a data unit of at least one data node, and a data block inserted between the data units, the data block is used to identify configuration information of the data stream;
    查找模块,用于根据计数器对所述数据拍中***的数据块进行查找;A search module, used for searching the data block inserted in the data beat according to the counter;
    提取模块,用于在查找到数据块的情况下,对所述多通道中的目标通道的所述数据块进行提取,并发送所述缓存中所述目标通道匹配的上一拍数据拍未发送的数据单元,其中,所述目标通道为定位到的数据块所在的通道;An extraction module, configured to extract the data block of a target channel in the multiple channels when a data block is found, and send the unsent data unit of the previous data beat matched by the target channel in the cache, wherein the target channel is the channel where the located data block is located;
    传输模块,用于通过所述多通道中所述目标通道之外的其他通道,对相匹配的目标数据单元进行传输,其中,所述目标数据单元为所述其他通道在缓存中相匹配的数据单元,和所述数据拍中相匹配的数据单元,中顺序最早的数据单元,所述缓存中缓存有上一拍数据拍中在上一拍未发送的数据单元;A transmission module, configured to transmit a matched target data unit through other channels other than the target channel in the multiple channels, wherein the target data unit is the earliest data unit in the order of the matched data units in the cache of the other channels and the matched data units in the data beat, and the cache has the data units in the previous beat of the data beat that were not sent in the previous beat;
    缓存模块,用于将当前接收的所述数据拍中未发送的数据单元进行缓存。The cache module is used to cache the unsent data units in the currently received data beat.
  9. 一种计算机可读存储介质,其特征在于,所述存储介质用于存储计算机可读程序指令,其中,所述程序指令被处理器执行时,实现权利要求1至7中任意一项所述的灵活以太网的数据块的处理方法。A computer-readable storage medium, characterized in that the storage medium is used to store computer-readable program instructions, wherein when the program instructions are executed by a processor, the method for processing data blocks of a flexible Ethernet as described in any one of claims 1 to 7 is implemented.
  10. 一种电子设备,其特征在于,包括一个或多个处理器和存储器,所述存储器用于存储计算机可读程序指令,其中,当所述计算机可读程序指令被所述一个或多个处理器执行时,使得所述一个或多个处理器实现权利要求1至7中任意一项所述的灵活以太网的数据块的处理方法。An electronic device, characterized in that it includes one or more processors and a memory, wherein the memory is used to store computer-readable program instructions, wherein when the computer-readable program instructions are executed by the one or more processors, the one or more processors implement the method for processing data blocks of a flexible Ethernet as described in any one of claims 1 to 7.
PCT/CN2022/143204 2022-12-01 2022-12-29 Flexible ethernet data block processing method and apparatus, storage medium, and electronic device WO2024113449A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211530781.6 2022-12-01
CN202211530781.6A CN115865808B (en) 2022-12-01 2022-12-01 Method, device and storage medium for processing data blocks of flexible Ethernet

Publications (1)

Publication Number Publication Date
WO2024113449A1 true WO2024113449A1 (en) 2024-06-06

Family

ID=85668976

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/143204 WO2024113449A1 (en) 2022-12-01 2022-12-29 Flexible ethernet data block processing method and apparatus, storage medium, and electronic device

Country Status (2)

Country Link
CN (1) CN115865808B (en)
WO (1) WO2024113449A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106411454A (en) * 2015-07-30 2017-02-15 华为技术有限公司 Method for data transmission, transmitter and receiver
CN109672560A (en) * 2018-12-13 2019-04-23 Ut斯达康通讯有限公司 Flexible ethernet management channel extended method and equipment
US20200358722A1 (en) * 2019-05-10 2020-11-12 Ciena Corporation FlexE frame format using 256b/257b block encoding
US20210385127A1 (en) * 2019-02-19 2021-12-09 Huawei Technologies Co., Ltd. Flexible ethernet communication method and network device
WO2022042743A1 (en) * 2020-08-31 2022-03-03 中兴通讯股份有限公司 Data transmission method and apparatus, electronic device and computer-readable medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106612203A (en) * 2015-10-27 2017-05-03 中兴通讯股份有限公司 Method and apparatus for processing data flow of flexible Ethernet client
CN109728853B (en) * 2017-10-30 2020-09-11 深圳市中兴微电子技术有限公司 Data processing method, device and storage medium
WO2019119388A1 (en) * 2017-12-22 2019-06-27 Telefonaktiebolaget Lm Ericsson (Publ) Methods and apparatus for configuring a flex ethernet node
CN111788794B (en) * 2017-12-22 2022-07-08 瑞典爱立信有限公司 Method and apparatus for configuring flexible Ethernet nodes

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106411454A (en) * 2015-07-30 2017-02-15 华为技术有限公司 Method for data transmission, transmitter and receiver
CN109672560A (en) * 2018-12-13 2019-04-23 Ut斯达康通讯有限公司 Flexible ethernet management channel extended method and equipment
US20210385127A1 (en) * 2019-02-19 2021-12-09 Huawei Technologies Co., Ltd. Flexible ethernet communication method and network device
US20200358722A1 (en) * 2019-05-10 2020-11-12 Ciena Corporation FlexE frame format using 256b/257b block encoding
WO2022042743A1 (en) * 2020-08-31 2022-03-03 中兴通讯股份有限公司 Data transmission method and apparatus, electronic device and computer-readable medium

Also Published As

Publication number Publication date
CN115865808A (en) 2023-03-28
CN115865808B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
JP5863076B2 (en) Method, apparatus, and system for reconstructing and reordering packets
US8949500B2 (en) Non-blocking processor bus bridge for network processors or the like
KR20210086420A (en) Neural network data processing apparatus, method and electronic device
CN109255057B (en) Block generation method, device, equipment and storage medium
US8161205B1 (en) Packet buffer management apparatus and method
US10205673B2 (en) Data caching method and device, and storage medium
CN102195874A (en) Pre-fetching of data packets
CN112035388B (en) High-performance encryption and decryption method based on PCI-e channel
US7783823B2 (en) Hardware device data buffer
US9838500B1 (en) Network device and method for packet processing
CN105573922B (en) Method and device for realizing data format conversion
CN114584560A (en) Fragmented frame recombination method and device
CN112612855B (en) High-availability database log receiving queue, synchronization method and device
WO2024113449A1 (en) Flexible ethernet data block processing method and apparatus, storage medium, and electronic device
CN111181874A (en) Message processing method, device and storage medium
CN102629235A (en) Method for increasing read-write speed of double data rate (DDR) memory
CN110912841B (en) SRIO protocol control character and data packet separation system facing 128bit width
CN117440053A (en) Multistage cross die access method and system
US20030005344A1 (en) Synchronizing data with a capture pulse and synchronizer
US9137158B2 (en) Communication apparatus and communication method
CN109145397B (en) External memory arbitration system supporting parallel running water access
CN103442091A (en) Data transmission method and device
US8270404B2 (en) System, method, and computer program product for improved distribution of data
CN106209370A (en) Elliptic curve cipher device, system and data cache control method
CN111694777B (en) DMA transmission method based on PCIe interface

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: 22967033

Country of ref document: EP

Kind code of ref document: A1