WO2020200304A1 - Method and apparatus for data transmission - Google Patents

Method and apparatus for data transmission Download PDF

Info

Publication number
WO2020200304A1
WO2020200304A1 PCT/CN2020/083147 CN2020083147W WO2020200304A1 WO 2020200304 A1 WO2020200304 A1 WO 2020200304A1 CN 2020083147 W CN2020083147 W CN 2020083147W WO 2020200304 A1 WO2020200304 A1 WO 2020200304A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
adaptation
preset
target service
bit
Prior art date
Application number
PCT/CN2020/083147
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 WO2020200304A1 publication Critical patent/WO2020200304A1/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
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received

Definitions

  • This application relates to the field of communication technology, and in particular to a method and device for data transmission.
  • the transmitted data is often divided into several data units for transmission.
  • the data units can be data frames, data packets, or data blocks.
  • the intermediate node needs to replace some data bits in certain data units with downstream link number information (that is, the aforementioned target service data).
  • the source network device node performs protection check on the data unit, calculates the check value of the field to be checked in the data unit, and protects the check.
  • the data unit that has undergone protection verification can carry the check value.
  • CRC Cyclic Redundancy Check
  • Reed-Solomon Forward Error Correction RS-FEC check
  • the data unit that has undergone protection verification can carry the check value.
  • the check value of the field to be checked of the data unit is calculated again. If the calculated check value is compared with the current If the check value is inconsistent, the data unit will be discarded.
  • the intermediate node replaces some data bits in the field to be verified of the data unit with the target service data, and then transmits the data unit to the downstream node, the downstream node needs the field to be verified of the data unit Calculate the check value again, then the calculated check value will not be the same as the check value carried in the data unit, and the data unit will be discarded.
  • intermediate nodes that need to replace some of the data to be verified in the data unit with target service data are equipped with a protection check function. Then, every time the target service data is inserted, the data can be calculated again. The check value of the field to be checked in the data unit, and replace the check value originally carried by the data unit with the recalculated check value.
  • a data transmission method including:
  • the data unit may be a data block, a data frame, or a data frame in different application scenarios.
  • the data acquisition unit may be a data unit sent by an upstream device, or a data unit that has been received by an intermediate node and stored locally, and it is acquired when processing is needed. Then, the predetermined data is used to replace the data of the preset data bits in the data to be verified in the data unit.
  • the preset data bit may be preset by the source network device and notified to the intermediate node. After the intermediate node completes the replacement process, it forwards the data unit to the next node.
  • the method further includes:
  • the data replacing the preset data bits in the data to be verified of the data unit includes:
  • the target service data is data determined by the intermediate node in order to meet certain service requirements, and is used to replace the data in the preset data bits.
  • the adaptation data needs to be determined according to the target business data, and replace the data in the preset data bits together with the target business data. Since replacing the data of the preset data bits with the target service data alone will cause the check value of the data unit to change, the adaptation data is introduced so that the adaptation data and target service data are used to replace the preset data bits at the same time The check value of the data unit remains unchanged.
  • the determining adaptation data based on the target service data includes:
  • the adaptation data is determined, where the first data is that the network device that sends the data unit communicates with the target in the data unit. Data written in a preset data bit corresponding to the service data, and the second data is written by the network device sending the data unit in the preset data bit corresponding to the adaptation data in the data unit data.
  • the source network device writes different data in the preset data of different data units. Then, when determining the adaptation data, it is necessary to consider the source network device's Data written by the preset data bits of the data unit. Based on the source network device writing data and target service data in the preset data bits, the adaptation data is jointly determined.
  • the using the target service data and the adaptation data to replace the data of the preset data bits in the data to be verified of the data unit includes:
  • the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are adjacent to the M preset data bits.
  • the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are not adjacent to the M preset data bits.
  • the data unit is an extended definition code block
  • the target service data is a bit-interleaved parity BIP check value
  • the determining target service data includes:
  • the target service data may be a BIP check value.
  • the BIP check value may be a BIP-8 check value, a BIP-16 check value or a BIP-32 check value Wait.
  • a BIP check value of the data segment to be checked can be written in the extended definition code block.
  • the data segment to be verified may correspond to an extended definition code block.
  • the determining adaptation data based on the target service data includes:
  • the corresponding adaptation data is determined.
  • a table look-up method may be used. Since the target service data can be determined before the data unit is received, the adaptation data can be determined by looking up the table before the data unit is received, which can meet the real-time requirements.
  • the determining the corresponding adaptation data based on the correspondence between the pre-stored service data and the adaptation data, and the target service data includes:
  • the pre-stored first First data and second data determine the corresponding adaptation data, wherein the first data is written by the network device sending the data unit in the preset data bits corresponding to the target service data in the data unit
  • the second data is the data written by the network device that sends the data unit in a preset data bit corresponding to the adaptation data in the data unit.
  • the data written by the source network device in different data units may be different, so when the correspondence table is established, four corresponding tables must be established.
  • the intermediate node Before receiving the data unit, the intermediate node can learn the data of the preset data bit in the data unit, and then look up the table based on the data of the preset data bit and the target service data to obtain the adapted data.
  • the correspondence relationship between the data in the preset data bits corresponding to the service data, the data in the preset data bits corresponding to the adaptation data, and the adaptation data is based on the pre-stored service data, and
  • the target service data, pre-stored first data and second data, and determining corresponding adaptation data include:
  • the adjustment data of the data in the preset data bits corresponding to the service data Based on the adjustment data of the pre-stored service data, the adjustment data of the data in the preset data bits corresponding to the service data, the correspondence between the adjustment data of the data in the preset data bits corresponding to the adaptation data and the adaptation data, and The adjustment data of the target service data, the adjustment data of the first data, and the adjustment data of the second data determine the corresponding adaptation data.
  • the determining adaptation data based on the target service data includes:
  • the value corresponding to each bit of the adaptation data is determined to obtain the adaptation data, wherein the adaptation data
  • the input parameter of the algorithm formula corresponding to each bit of the configuration data is a value corresponding to at least one bit of the target service data.
  • the algorithm formula corresponding to each bit of the query adaptation data can also be used to determine the adaptation data. To a certain extent, the generated delay is also small.
  • the algorithm formula corresponding to each bit of the adaptation data is determined based on the target service data and the pre-stored adaptation data to obtain the corresponding value of each bit of the adaptation data.
  • the value corresponding to each bit of the adaptation data is determined to obtain
  • the first data is data written by the network device sending the data unit in a preset data bit corresponding to the target service data in the data unit
  • the second Data is data written by the network device sending the data unit in the preset data bits corresponding to the adaptation data in the data unit
  • each bit of the adaptation data corresponds to the input of the algorithm formula
  • the parameter is a value corresponding to at least one bit of the target service data, a value corresponding to at least one bit of the first data, and a value corresponding to at least one bit of the second data.
  • the data written by the source network device in different data units can be different. Then, when establishing the algorithm formula corresponding to each bit of the adapted data, the data of the preset data bit should be considered Inside.
  • the determining adaptation data based on the target service data includes:
  • the unknown is solved, and the adapted data is determined based on the value of the obtained unknown.
  • the unknown is the adaptation data to be determined.
  • the determining the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data includes:
  • the number of bits of the preset adaptation data, the position of each preset data bit corresponding to the target service data, the position of each preset data bit corresponding to the adaptation data, and pre-stored Determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data, wherein the first data is the network device that sends the data unit The data written in the preset data bits corresponding to the target service data in the data unit, and the second data is that the network device that sends the data unit matches the adaptation data in the data unit The data written in the corresponding preset data bit.
  • the check value is a cyclic redundancy check CRC check value.
  • the CRC check value may be a CRC-4 check value, a CRC-8 check value, and the like.
  • a data transmission device in a second aspect, includes:
  • An acquisition module for acquiring a data unit, wherein the data unit includes data to be verified
  • the replacement module is used to replace the data of the preset data bits in the data to be verified in the data unit, wherein the verification value of the data to be verified before the replacement processing is the same as the data to be verified after the replacement processing;
  • the forwarding module is used to forward the data unit after replacement processing.
  • the device further includes:
  • the determining module is used for determining target business data, and determining adaptation data based on the target business data;
  • the replacement module is used for:
  • the determining module is configured to:
  • the adaptation data is determined, where the first data is that the network device that sends the data unit communicates with the target in the data unit. Data written in a preset data bit corresponding to the service data, and the second data is written by the network device sending the data unit in the preset data bit corresponding to the adaptation data in the data unit data.
  • the replacement module is used for:
  • the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are adjacent to the M preset data bits.
  • the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are not adjacent to the M preset data bits.
  • the data unit is an extended definition code block
  • the target service data is a bit-interleaved parity BIP check value
  • the determining module is configured to:
  • the determining module is configured to:
  • the corresponding adaptation data is determined.
  • the determining module is configured to:
  • the pre-stored first First data and second data determine the corresponding adaptation data, wherein the first data is written by the network device sending the data unit in the preset data bits corresponding to the target service data in the data unit
  • the second data is the data written by the network device that sends the data unit in a preset data bit corresponding to the adaptation data in the data unit.
  • the determining module is configured to:
  • the adjustment data of the data in the preset data bits corresponding to the service data Based on the adjustment data of the pre-stored service data, the adjustment data of the data in the preset data bits corresponding to the service data, the correspondence between the adjustment data of the data in the preset data bits corresponding to the adaptation data and the adaptation data, and The adjustment data of the target service data, the adjustment data of the first data, and the adjustment data of the second data determine the corresponding adaptation data.
  • the determining module is configured to:
  • the value corresponding to each bit of the adaptation data is determined to obtain the adaptation data, wherein the adaptation data
  • the input parameter of the algorithm formula corresponding to each bit of the configuration data is a value corresponding to at least one bit of the target service data.
  • the determining module is configured to:
  • the value corresponding to each bit of the adaptation data is determined to obtain
  • the first data is data written by the network device sending the data unit in a preset data bit corresponding to the target service data in the data unit
  • the second Data is data written by the network device sending the data unit in the preset data bits corresponding to the adaptation data in the data unit
  • each bit of the adaptation data corresponds to the input of the algorithm formula
  • the parameter is a value corresponding to at least one bit of the target service data, a value corresponding to at least one bit of the first data, and a value corresponding to at least one bit of the second data.
  • the determining module is configured to:
  • the unknown is solved, and the adapted data is determined based on the value of the obtained unknown.
  • the determining module is configured to:
  • the number of bits of the preset adaptation data, the position of each preset data bit corresponding to the target service data, the position of each preset data bit corresponding to the adaptation data, and pre-stored Determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data, wherein the first data is the network device that sends the data unit The data written in the preset data bits corresponding to the target service data in the data unit, and the second data is that the network device that sends the data unit matches the adaptation data in the data unit The data written in the corresponding preset data bit.
  • the check value is a cyclic redundancy check CRC check value.
  • a data transmission device in a third aspect, includes a processor and a memory; the memory stores one or more programs, and the one or more programs are configured to be executed by the processor, Instructions for implementing the method according to any one of the above-mentioned first aspects.
  • a computer-readable storage medium includes instructions that, when the computer-readable storage medium runs on a device, cause the device to execute the method described in the first aspect.
  • a computer program product containing instructions which when the computer program product runs on a device, causes the device to execute the method described in the first aspect.
  • the network device after acquiring the data unit, replaces the data of the preset data bits in the data unit, and the data to be verified before the replacement process and the data to be verified after the replacement process
  • the check value is the same, so the device does not need to recalculate the check value of the data to be checked after the replacement process, and the resulting delay is small.
  • Figure 1 is a schematic diagram of a network device structure provided by an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a method for replacing data in a data unit provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of an extended definition code block structure provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a method for replacing data in a data unit provided by an embodiment of the present application
  • FIG. 5 is a schematic structural diagram of a data unit provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a data unit provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a data unit provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a data unit provided by an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of a method for replacing data in a data unit provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a scene of replacing data in a data unit provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of an apparatus for replacing data in a data unit provided by an embodiment of the present application.
  • the embodiment of this application provides a data transmission method, which can be implemented by a network device, and the network device can be a core router configured with a flexible Ethernet (Flex Ethernet, FlexE) interface, and an IP radio access network (IP Radio). Routing equipment in Access Network (IPRAN), box-type or box-type switch equipment in Packet Transport Network (PTN).
  • IPRAN IP radio access network
  • PDN Packet Transport Network
  • the above-mentioned various possible network devices can all serve as intermediate nodes in the network, and can have the function of forwarding data in the network where they are located.
  • This solution can be implemented in the following scenarios.
  • the source network device sends a data unit to an intermediate node, and the intermediate node needs to replace some of the data to be verified in the data unit with target business data to meet business requirements. Then you can use this program for data replacement.
  • Fig. 1 is a schematic diagram of a network device 100 provided by an embodiment of the present application.
  • the network device 100 can be used as an intermediate node and applied in a data transmission path to execute the method provided in the embodiment of the present application.
  • the network device 100 may include a processor 110, a memory 120 coupled to the processor 110, and a transceiver 130.
  • the processor 110 may be a CPU.
  • the processor 110 may refer to one processor, or may include multiple processors.
  • the memory 120 may include a volatile memory, such as RAM; the memory may also include a nonvolatile memory, such as ROM, flash memory, etc.; the memory may also include a combination of the foregoing types of memory.
  • the memory 120 may refer to one memory, or may include multiple memories.
  • computer-readable instructions are stored in the memory 120, and the computer-readable instructions may include multiple software modules, such as a processing module 121 and a sending module 122.
  • the processor 110 executes each software module, it can perform corresponding operations according to the instructions of each software module.
  • an operation performed by a software module actually refers to an operation performed by the processor 110 according to an instruction of the software module.
  • the sending module 122 is used to forward data units.
  • the processing module 121 is used to replace data of preset data bits in the data to be verified in the data unit.
  • the processing flow shown in FIG. 2 will be described in detail below in conjunction with specific implementations.
  • the method is implemented by a network device as an intermediate node.
  • the specific content may be as follows:
  • the embodiment of the present application provides a method for replacing data in a data unit, which is described below with reference to FIG. 2.
  • Step 201 Obtain a data unit.
  • the data unit includes data to be verified, and may also include a verification value corresponding to the data to be verified.
  • the intermediate node obtains the data unit sent by the source network device.
  • the data unit can also be different.
  • the data unit can be an Extended Defined Block (EDB) based on 64B/66B.
  • EDB Extended Defined Block
  • the format of the EDB code block is shown in the figure As shown in 3, the identification bit of the header occupies 2 bits, the data to be verified occupies 60 bits and the check value corresponding to the data to be verified occupies the last 4 bits, and 8 bits of the data to be verified are BIP -8 check value.
  • the source network device when the source network device sends a data stream to an intermediate node, it will replace the IDLE code block in the data stream with an EDB code block in a preset period, so that the intermediate node will pass a period of time Receive an EDB code block.
  • Step 202 Replace the data with preset data bits in the data to be verified in the data unit.
  • the data bit of the data to be replaced in the data unit is preset, or the intermediate node is temporarily notified by the source network device.
  • the intermediate node can replace the data in the preset data bit with the preset data.
  • the intermediate node here can replace the data in the preset data bit with the number of downstream links.
  • Step 203 Forward the replaced data unit.
  • the data unit is forwarded to the next node, and the next node processes the data unit.
  • the embodiment of the present application also provides a data transmission method in which target service data and adaptation data are used to replace the data of the preset data bits in the data to be verified of the data unit, which is described below with reference to FIG. 4.
  • Step 401 Determine target business data.
  • the target business data is different according to different business requirements.
  • the processing of this step can be executed before the data unit is acquired or after the data unit is acquired according to actual application scenarios.
  • the source network device needs to send a data stream to the destination network device.
  • the data stream to be sent there can be an extended definition code block based on 64B/66B.
  • each EDB code block has a BIP check value, which corresponds to a data section to be checked in the data stream.
  • the intermediate node B Before receiving the EDB code block, the intermediate node B will first receive the code block in the corresponding data section to be verified. Then the intermediate node B can perform the data area to be verified before receiving the EDB code block.
  • the code blocks in the segment are subjected to BIP verification, and the new BIP verification value of the data segment to be verified is obtained.
  • the target service data there are multiple choices for the target service data, and two of them are listed below for explanation.
  • the target service data may be the new BIP check value of the corresponding data section to be checked calculated by the intermediate node before receiving the EDB code block.
  • the calculated BIP check value is 0b10010111 (0b represents binary and is not part of the data)
  • the target service data is 0b10010111. It can be seen that the BIP check value is directly used as the target service data, and there is no need to calculate the target service data after receiving the EDB code block, which can ensure the real-time transmission of the data stream.
  • the target service data may be the number of code blocks in which the data segment to be verified calculated by the intermediate node B is sent from the source network device A to the local node (ie, the intermediate node B). Specifically, before receiving the EDB code block, the intermediate node calculates the new BIP check value of the corresponding data segment to be checked, and then after receiving the EDB code block, the new BIP check value and the EDB code The BIP check value carried in the block is compared bit by bit, and the number of different bits between the two is obtained, that is, the number of code blocks in which the data segment to be checked is sent from the source network device A to the node with errors. The number of code blocks with errors is the target service data.
  • the calculated BIP check value is 0b10010111
  • the BIP check value carried in the EDB code block is 0b10010110
  • the two bits are compared to determine that one bit is different, then the data area to be checked
  • the code block in the segment is sent from the source network device A to the node, and there is a module that sends an error code, then the target service data is 0b0001.
  • the BIP check value in the above-mentioned EDB code block can be a BIP-8 check value.
  • the BIP check value can also be a BIP-16 check value, BIP -32 check value, etc.
  • the embodiment of this application does not limit the specific check data section check method.
  • the target business data determined above can be stored and retrieved when used.
  • Step 402 Determine adaptation data based on the target service data.
  • the adaptation data is used to make the check value of the data to be verified before the replacement process and after the replacement process the same, and the replacement process is to replace the data to be verified in the data unit with the determined target service data and the adaptation data.
  • the data of the preset data bits are used to make the check value of the data to be verified before the replacement process and after the replacement process the same.
  • step 402 specifically, the following processing may also be performed: determining the adaptation data based on the target service data and the pre-stored first data and second data.
  • the first data is the data written in the preset data bits corresponding to the target service data in the data unit by the network device that sends the data unit
  • the second data is the data that the network device that sends the data unit matches with the adaptation data in the data unit.
  • the network device may be the source network device or other network devices. The source network device is used for description below, and other situations are similar, so we will not repeat them here.
  • the source network device may number all possible situations of the first data and the second data and notify the intermediate node, or a technician may input the first data and the second data and the corresponding numbers in the intermediate node.
  • the source network device may first send the serial number of the first data and the second data written in the data unit to the intermediate node, and the intermediate node can determine the pre-stored first data according to the serial number And the second data, the intermediate node can also directly notify the first data and the second data to the intermediate node, and the intermediate node stores it after receiving it.
  • the technician can directly enter the first data and the second data in the intermediate node, and the intermediate node will store it, and the same can also be used by the intermediate node.
  • the source network device notifies the intermediate node of the values of the first data and the second data, and the intermediate node stores it. In this way, before receiving the data unit, the intermediate node can determine the adaptation data according to the pre-stored first data and second data and the target service data.
  • the method for determining the adaptation data is determined by querying the relationship table. Accordingly, the processing in step 402 may be as follows: determining the corresponding adaptation data based on the pre-stored correspondence relationship between the service data and the adaptation data, and the target service data.
  • the correspondence table between the service data and the adaptation data can be established in advance.
  • the data bits corresponding to the target service data and the adaptation data in the data unit sent by the source network device are both To be preset, the preset data bits corresponding to the target service data and adaptation data in each data unit are the same, and the data in each preset data bit is also preset, and each data unit The data of the corresponding preset data bit in the same is also the same.
  • the target service data should correspond to 8 preset data bits in the data unit
  • the adaptation data should correspond to 4 preset data bits in the data unit
  • the target service data corresponds to
  • the 8 preset data bits are continuous
  • the 4 preset data bits corresponding to the adaptation data are continuous
  • the data written by the source network device in the preset data bits of each data unit are all 0,
  • the target business data corresponds to
  • the target service data must correspond to 4 preset data bits in the data unit, and the adaptation data must correspond to 4 preset data bits in the data unit, and the target service data corresponds to 4 Two preset data bits are continuous, the 4 preset data bits corresponding to the adaptation data are continuous, and the data written by the source network device in the preset data bits of each data unit are all 0, and the preset data corresponding to the target business data There is no interval data bit between the data bit and the preset data bit corresponding to the adapted data. Then, in this case, there may only be two items of business data and adaptation data in the correspondence table, and the specific form may be as shown in Table 2.
  • the corresponding adaptation data can be determined by querying the correspondence table.
  • the data in the preset data bits corresponding to the service data and the data in the preset data bits corresponding to the adaptation data may also be included in the pair relationship table.
  • the processing can be as follows : Based on the pre-stored service data, the data in the preset data bits corresponding to the service data, the correspondence between the data in the preset data bits corresponding to the adaptation data and the adaptation data, and the target service data, the pre-stored first The data and the second data determine the corresponding adaptation data.
  • the correspondence table between pre-stored service data, data in the preset data bits corresponding to the service data, and data in the preset data bits corresponding to the adaptation data and the adaptation data can be established in advance.
  • the data bits corresponding to the target service data and adaptation data in the data unit sent by the source network device are preset, but the source network device’s preset data bits in different data units are written
  • the data may be different.
  • the target service data should correspond to 8 preset data bits in the data unit
  • the adaptation data should correspond to 4 preset data bits in the data unit
  • the target service data corresponds to The 8 preset data bits of the data are continuous
  • the 4 preset data bits corresponding to the adapted data are continuous.
  • the data in these data bits are predetermined, but the source network device writes in the preset data bits of different data units
  • the data may be different. There are 10 data bits between the preset data bits corresponding to the target service data and the preset data bits corresponding to the adaptation data.
  • the source network device Before the source network device sends the data unit to the intermediate node, it can first send the first data and second data written in the data unit to the intermediate node, and the intermediate node can perform processing on the received first data and second data. Stored for table lookup. Then, in this case, there may be four items in the correspondence table: business data, data in the preset data bits corresponding to the business data, data in the preset data bits corresponding to the adaptation data, and adaptation data, in specific forms It can be as shown in Table 3.
  • the target service data should correspond to 4 preset data bits in the data unit
  • the adaptation data should correspond to 4 preset data bits in the data unit
  • the target service data corresponds to 4
  • Two preset data bits are continuous
  • the 4 preset data bits corresponding to the adaptation data are continuous, and there is no interval data bit between the preset data bits corresponding to the target service data and the preset data bits corresponding to the adaptation data, but the source network device
  • the data written in the preset data bits of different data units may be different.
  • the correspondence table may contain business data, data in the preset data bits corresponding to the business data, and data corresponding to the adaptation data. There are four items of data and adaptation data in the preset data bits, and the specific form can be shown in Table 4.
  • the corresponding adaptation data can be queried in the correspondence table.
  • the preset data bits in the data unit sent by the source network device may be discontinuous.
  • the processing may be as follows: Obtain the pre-stored first data and second data. Data, adjust the target business data, the first data and the second data based on the preset data adjustment method to obtain the adjustment data of the target business data, the adjustment data of the first data and the adjustment data of the second data; based on the pre-stored data
  • the data, the adjustment data of the first data, and the adjustment data of the second data determine the corresponding adaptation data.
  • the preset data bits in the data unit may not be continuous, so the first data, the second data and the target service data need to be adjusted.
  • several possible positional relationships of preset data bits can be preset and stored according to the labels, and then a table can be created for the positional relationships of each kind of preset data bits.
  • the source network device may first send the positional relationship number of the preset data bits in the data unit and the data written in each preset data bit to the intermediate node. After the intermediate node determines the target service data , Adjust the first data, second data and target business data according to the preset data adjustment method.
  • the 4 preset data bits corresponding to the adapted data are continuous, and among the 4 preset data bits corresponding to the target service data, there is one data bit spaced between every two adjacent preset data bits. , And there is no interval data bit between the preset data bit corresponding to the adaptation data and the service data corresponding to the target service data (the difference between each preset data bit corresponding to the adaptation data and each preset data bit corresponding to the target service data The minimum interval data bit) determines that the target service data is 1111, then the target service data is adjusted to 1010101, and the preset data bits corresponding to the adaptation data are continuous, so there is no need to adjust the second data. In the same way, the first data can be adjusted.
  • One data is adjusted to obtain the adjusted first data.
  • the four preset data bits corresponding to the adaptation data are not continuous, wherein the first three preset data bits are continuous, and there is at least one data bit spaced from the fourth preset data bit, There is no interval data bit between the fourth preset data bit and the first one of the preset data bits corresponding to the target service data.
  • the preset data bits corresponding to the target service data are continuous.
  • the second data is 1111. At this time, the second data should be adjusted to 1110.
  • the first data in the preset data bits corresponding to the target service data is 0101, and then it should be adjusted to 10101. According to the determined adjustment data of the first data, the adjustment data of the second data, and the target service data, the adaptation data can be determined in the corresponding correspondence table.
  • the method of determining the adaptation data is determined by querying the algorithm formula corresponding to each bit of the adaptation data.
  • the processing of step 402 can be as follows: Based on the target service data and each bit of the pre-stored adaptation data respectively corresponding The algorithm formula determines the value corresponding to each bit of the adapted data to obtain the adapted data.
  • the input parameter of the algorithm formula corresponding to each bit of the adaptation data is a value corresponding to at least one bit of the target service data.
  • the intermediate node may predetermine and store the algorithm formula corresponding to each bit of the adaptation data.
  • the data written by the source network device in each preset data bit is the same and is 0.
  • the algorithm formula may not include the source network device writing in the preset data bit The data.
  • the target service data in the data unit sent by the source network device should correspond to 8 preset data bits in the data unit, and the adaptation data should correspond to 4 preset data bits in the data unit, and the target service data corresponds to The 8 preset data bits are continuous, and the 4 preset data bits corresponding to the adaptation data are continuous.
  • the data written by the source network device in the preset data bits of each data unit is all 0, and the preset data corresponding to the target business data There are 10 data bits between the data bits and the preset data bits corresponding to the adapted data.
  • the algorithm formula corresponding to each bit of the adapted data can be as follows:
  • a 0 to A 4 respectively represent 4 bits of adaptation data
  • I 0 to I 7 represent 7 bits of target service data.
  • the target service data in the data unit sent by the source network device should correspond to 4 preset data bits in the data unit, and the adaptation data should correspond to 4 preset data bits in the data unit, and the target service data corresponds to
  • the 4 preset data bits corresponding to the adaptation data are continuous
  • the 4 preset data bits corresponding to the adaptation data are continuous
  • the source network device writes 0 in the preset data bits of each data unit
  • the target service data corresponds to the preset data bits. It is assumed that there is no interval data bit between the data bit and the preset data bit corresponding to the adapted data.
  • the algorithm formula corresponding to each bit of the adapted data can be as follows:
  • the intermediate node After the intermediate node obtains the target business data, it can substitute the value of each bit into the above algorithm formula to obtain the value of each bit of the adaptation data, thereby determining the adaptation data.
  • the data written by the network device in the preset data bits of different data units is different.
  • the second method mentioned above can be processed as follows: based on the target service data, the pre-stored first data and second data, And the algorithm formula corresponding to each bit of the pre-stored adaptation data is determined, and the value corresponding to each bit of the adaptation data is determined to obtain the adaptation data.
  • the input parameters of the algorithm formula corresponding to each bit of the adaptation data are the value corresponding to at least one bit of the target business data, the value corresponding to at least one bit of the first data, and the value corresponding to at least one bit of the second data. .
  • the intermediate node may pre-store an algorithm formula corresponding to each bit of the adaptation data.
  • the source network device differs in the data written by the preset data bits in the data unit.
  • the algorithm formula can have the following forms.
  • the target service data in the data unit sent by the source network device should correspond to 8 preset data bits in the data unit, and the adaptation data should correspond to 4 preset data bits in the data unit, and the target service data corresponds to The 8 preset data bits are continuous, and the 4 preset data bits corresponding to the adapted data are continuous.
  • the data in these data bits are all predetermined, the preset data bits corresponding to the target business data and the preset data corresponding to the adapted data There are 10 data bits between the bits.
  • the algorithm formula corresponding to each bit of the adapted data can be as follows:
  • a 0 I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +I 3 +RI 3 +I 7 +RI 7 +RA 0
  • a 1 I 0 +RI 0 +I 4 +RI 4 +I 7 +RI 7 +RA 1
  • a 2 I 0 +RI 0 +I 1 +RI 1 +I 5 +RI 5 +RA 1
  • a 3 I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +I 6 +RI 6 +RA 3
  • RI 0 to RI 7 respectively represent 8 bits of the first data
  • RA 0 to RA 4 respectively represent 4 bits of the second data
  • the target service data in the data unit sent by the source network device should correspond to 4 preset data bits in the data unit, and the adaptation data should correspond to 4 preset data bits in the data unit, and the target service data corresponds to The 4 preset data bits corresponding to the adapted data are continuous, and the 4 preset data bits corresponding to the adapted data are continuous.
  • the data in these data bits are predetermined.
  • the preset data bits corresponding to the target business data and the preset corresponding to the adapted data There is no space between data bits.
  • the algorithm formula corresponding to each bit of the adapted data can be as follows:
  • a 0 I 1 +RI 1 +I 2 +RI 2 +I 3 +RI 3 +RA 0
  • a 0 I 0 +RI 0 +I 1 +RI 1 +RA 1
  • a 0 I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +RA 2
  • a 0 I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +I 3 +RI 3 +RA 3
  • the intermediate node After obtaining the target service data, the intermediate node can substitute the target service data, the first data, and the second data into the above algorithm formula to obtain the value of each bit of adaptation data, thereby obtaining the adaptation data.
  • the processing in step 402 may be as follows: determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adapted data; based on the first data polynomial and the second data
  • the generator polynomial corresponding to the verification method of the polynomial and the data unit is solved for the unknown number, and the adapted data is determined based on the value of the unknown number obtained by the solution.
  • the third method can be used as a method for directly calculating the adaptation data, or as a derivation method for the above-mentioned methods one and two.
  • the coefficient of the term corresponding to any bit of the adaptation data in the second data polynomial includes the unknown number to be solved.
  • the equation for calculating the adaptation data can be derived based on the following method.
  • Case 1 The length of the data bit sequence corresponding to the target service data is less than or equal to the data bit length corresponding to the adaptation data.
  • the polynomial corresponding to the data to be verified except the data in the preset data bits is d(x)
  • the polynomial corresponding to the remainder of CRC-N Is c(x)
  • the generator polynomial of CRC-N is g(x).
  • (I N-1 +RI N-1 )x N-1 +(I N-2 +RI N-2 )x N-2 +...+(I 0 +RI 0 ) is the first data polynomial
  • (A N-1 +RA N-1 )x 2N-1 +(A N-2 +RA N-2 )x 2N-2 +...+(A 0 +RA 0 )x N is the second data Polynomial
  • N is the length of the data bit sequence corresponding to the adaptation data.
  • Each term in the first data polynomial corresponds to each data bit in the data bit sequence corresponding to the target service data, and if the data bit is not a preset data bit, the coefficient of the corresponding term is 0.
  • Each term in the second data polynomial corresponds to each data bit in the data bit sequence corresponding to the adapted data, and if the data bit is not a preset data bit, the coefficient of the corresponding term is 0.
  • Case 2 The length of the data bit sequence corresponding to the target service data is less than or equal to the data bit length corresponding to the adaptation data.
  • the specific derivation process of the equation is similar to the above method, so I won’t repeat it here.
  • (I N-1 +RI N-1 )x N-1 +(I N-2 +RI N-2 )x N-2 +...+(I 0 +RI 0 ) is the first data polynomial a part of, Is the other part of the first data polynomial, Is the second data polynomial, and N s is the length of the data bit sequence corresponding to the target service data.
  • each term in the first data polynomial corresponds to each data bit in the data bit sequence corresponding to the target service data. If the data bit is not a preset data bit, the coefficient of the corresponding term is 0.
  • Each term in the second data polynomial corresponds to each data bit in the data bit sequence corresponding to the adapted data, and if the data bit is not a preset data bit, the coefficient of the corresponding term is 0.
  • the first data polynomial and the second data polynomial can be determined based on the following processing. Specifically, based on the target service data, the preset number of bits of the adaptation data, and the preset data bits corresponding to the target service data. The position, the position of each preset data bit corresponding to the adaptation data, the pre-stored first data and the second data, the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data are determined.
  • the data bits can be reserved data bits.
  • the source network device may notify the intermediate node of the first data and the second data in advance, and the intermediate node stores them, or the technician enters the values of the first data and the second data in the intermediate node, and the intermediate node performs storage.
  • the intermediate node can directly obtain the first data and the second data.
  • determine whether the preset data bits are sufficient to carry the target service data and adaptation data that is, the number of preset data bits must meet the following conditions: N r ⁇ max(N s , N)+N, where N r is the number of preset data bits, N s is the number of target business data, and N is the number of adaptive data. If this condition is met, the following steps can be performed.
  • S3 If the length of the data bit sequence corresponding to the target service data is less than the preset number of bits of the adaptation data, determine the difference S between the number of bits of the adaptation data and the above length, and compare the data bit sequence corresponding to the target service data with The S data bits between the data bit sequence corresponding to the adaptation data are added to the data bit sequence corresponding to the target service data to update the data bit sequence corresponding to the target service data.
  • S5 Determine the first data polynomial corresponding to the target business data based on the data bit sequence corresponding to the target business data, the first data in the preset data bits corresponding to the target business data, and the target business data, based on the data bits corresponding to the adaptation data
  • the second data in the preset data bits corresponding to the sequence and the adaptation data determines the second data polynomial corresponding to the adaptation data.
  • the coefficients of the first data polynomial and the second data polynomial determined above can be determined according to the following method:
  • the coefficients of each item in the first data polynomial corresponding to the target business data are determined, based on the adaptation data
  • the corresponding data bit sequence and the second data in the preset data bit corresponding to the adaptation data determine the coefficients of each item in the corresponding second data polynomial of the adaptation data.
  • the data bit sequence corresponding to the target service data Each data bit corresponds to each item in the first data polynomial in the preset data bit corresponding to the target service data in order.
  • Each data bit in the data bit sequence corresponding to the adapted data corresponds to Each item in the second data polynomial corresponds, and the coefficient of each item corresponding to each preset data bit corresponding to the target business data is the value of each bit in the target business data and the first data in the preset data bit corresponding to the target business data.
  • Add the values of each bit of the adaptation data, and the coefficients of the items corresponding to each preset data bit corresponding to the adaptation data are respectively the unknown number to be solved and the value of each bit of the second data in the preset data bit corresponding to the adaptation data.
  • the coefficients of items corresponding to data bits other than the preset data bits respectively corresponding to the target service data and adaptation data are 0.
  • first data polynomial and the second data polynomial, and the coefficients of each item After obtaining the first data polynomial and the second data polynomial, and the coefficients of each item, they can be brought into according to the relationship between the length of the data bit sequence corresponding to the target service data and the length of the data bit sequence corresponding to the adaptation data Equation (1) or equation (2) solves the unknown number, and further obtains the adapted data.
  • a 0 I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +I 3 +RI 3 +I 7 +RI 7 +RA 0
  • a 1 I 0 +RI 0 +I 4 +RI 4 +I 7 +RI 7 +RA 1
  • a 2 I 0 +RI 0 +I 1 +RI 1 +I 5 +RI 5 +RA 1
  • a 3 I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +I 6 +RI 6 +RA 3
  • a 0 I 1 +RI 1 +I 2 +RI 2 +I 3 +RI 3 +RA 0
  • a 0 I 0 +RI 0 +I 1 +RI 1 +RA 1
  • a 0 I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +RA 2
  • a 0 I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +I 3 +RI 3 +RA 3
  • the target business data, the first data, and the second data are substituted into the above relational expressions to obtain the adapted data.
  • the adaptation data can be obtained as 0001.
  • Case three as shown in Figure 7, in the data unit, the 4 preset data bits corresponding to the target service data are not continuous, the 4 preset data bits corresponding to the adaptation data are continuous, and the preset data bits corresponding to the adaptation data are continuous. There are no data bits between the preset data bits corresponding to the target service data, and the data written in the preset data bits in the source network device is all 0.
  • the length of the data bit sequence corresponding to the target service data is 6, and the length of the data bit sequence corresponding to the adaptation data is 4. It can be seen that the length of the data bit sequence corresponding to the target service data is equal to the length of the data bit sequence corresponding to the adaptation data, then the above equation ( 2) To solve the problem, the following relationship can be obtained:
  • the target business data is 1111
  • the available adaptation data is 1001.
  • the target business data is 1111
  • the available adaptation data is 1100.
  • the verification methods of the data unit in the above four cases are all CRC-4 verification, and this method is also suitable for other verification methods such as CRC-8, RS-FEC, etc.
  • Case 5 The check method is CRC-8 check.
  • the 8 preset data bits corresponding to the target service data are continuous
  • the 8 preset data bits corresponding to the adapted data are continuous
  • the preset data bits corresponding to the adapted data are continuous. It is assumed that there is no interval data bit between the data bit and the preset data bit corresponding to the target service data, and the data written in the preset data bit by the source network device is all 0.
  • the length of the data bit sequence corresponding to the target service data is 8, and the length of the data bit sequence corresponding to the adaptation data is 8. It can be seen that the length of the data bit sequence corresponding to the target service data is equal to the length of the data bit sequence corresponding to the adaptation data, then the above equation ( 1) Solving, the following relationship can be obtained:
  • the target business data is 011010000
  • the available adaptation data is 11111011.
  • the verification method is RS-FEC verification
  • a data bit contains a symbol data
  • the 16 preset data bits corresponding to the target business data are continuous, and the 16 preset data corresponding to the adaptation data
  • the data bits are continuous, there is no interval data bit between the preset data bit corresponding to the adaptation data and the preset data bit corresponding to the target service data, and the data written in the preset data bit by the source network device is all 0.
  • the length of the data bit sequence corresponding to the target service data is 16, and the length of the data bit sequence corresponding to the adaptation data is 16. It can be seen that the length of the data bit sequence corresponding to the target service data is equal to the length of the data bit sequence corresponding to the adaptation data, then the above equation ( 1) Solve.
  • the adaptation data is 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.
  • Step 403 Obtain a data unit.
  • the data acquiring unit may be a receiving data unit, or storing the received data unit in advance, and then acquiring the data unit for processing here.
  • Step 404 Use the target service data and the adaptation data to replace the data of the preset data bits in the data to be verified in the data unit.
  • the target service data is used to replace the data of N preset data bits in the data to be verified in the data unit
  • the adaptation data is used to replace the data of M preset data bits in the data to be verified in the data unit.
  • Case 1 N preset data bits are continuous, M preset data bits are continuous, and N preset data bits are adjacent to M preset data bits.
  • Case 4 The N preset data bits are not continuous, the M preset data bits are not continuous, and the N preset data bits are adjacent to the M preset data bits.
  • Case 5 The N preset data bits are not continuous, the M preset data bits are not continuous, and the N preset data bits are not adjacent to the M preset data bits.
  • Step 405 Forward the replaced data unit.
  • the data unit is forwarded to the next node, and the next node will process the data unit according to actual business needs. Take the part of the path error monitoring service listed in step 401 as an example.
  • the intermediate node C calculates the BIP check value of the data segment to be checked corresponding to the EDB code block, and after receiving the EDB code block, reads the target service data therein (intermediate node B The calculated BIP check value of the corresponding data segment to be checked), and then, the newly calculated BIP check value is compared with the target service data bit by bit, and the two different bits can be obtained, which is the The number of code blocks in which the data segment to be verified is transmitted from the intermediate node B to the intermediate node C with errors.
  • the intermediate node C calculates the BIP check value of the data segment to be checked corresponding to the EDB code block. After receiving the EDB code block, it reads the BIP check value carried therein, and then Comparing the two bitwise, it can be concluded that the difference between the two is the number of bits, which is the number of code blocks in which the data segment to be verified is transmitted from the source network device to the intermediate node C, and then the target service data ( The data segment to be verified is transmitted from the source network device to the intermediate node B (the number of code blocks with errors), and the newly calculated data segment to be verified is transmitted from the source network device to the intermediate node C with errors. By subtracting the target service data from the number of code blocks, the number of code blocks in which the data segment to be verified is transmitted from the intermediate node B to the intermediate node C can be obtained.
  • the embodiment of the present application also provides a data transmission method, in which the target service data is the BIP check value of the data section to be checked in the data stream, and the data unit is an extended definition code block. Description will be given below in conjunction with FIG. 9.
  • Step 901 Determine the BIP check value of the data section to be checked in the data stream.
  • the source network device A wants to send a data stream to the destination network device D.
  • an extended definition code block based on 64B/66B, which can be called EDB here.
  • EDB extended definition code block
  • each EDB code block has a BIP check value
  • the BIP check value corresponds to a data section to be checked in the data stream.
  • the EDB code block on the left side carries the BIP check value corresponding to the data section to be checked, as shown in the figure.
  • the intermediate node B Before receiving the EDB code block, the intermediate node B will receive the corresponding code block in the data section to be verified, and then the intermediate node B can perform the data section before receiving the EDB code block.
  • the inner code block performs BIP verification to obtain the new BIP verification value of the data section to be verified.
  • the target service data is the new BIP check value.
  • the calculated BIP check value is 0b10010111 (0b represents binary and is not part of the data), then the target service data is 0b10010111. It can be seen that the BIP check value is directly used as the target service data, and there is no need to calculate the target service data after receiving the EDB code block, which can ensure the real-time transmission of the data stream.
  • Step 902 Determine adaptation data based on the determined BIP check value of the data segment to be checked in the data stream.
  • the intermediate node B before receiving the EDB code block, the intermediate node B has learned from the source network device the position of the preset data bit in the EDB code block and the data written in the preset data bit by the source network device. Yes, there are 8 preset data bits corresponding to the newly calculated BIP check value (target service data) and are continuous, and 4 preset data bits corresponding to the adapted data are continuous.
  • the preset data corresponding to the target service data There are 10 data bits between the bits and the preset data bits corresponding to the adapted data. Then, you can look up the table to get the adaptation data based on Table 3 above.
  • the calculated new BIP check value is 10010111
  • the data written by the source network device in the preset data bit corresponding to the target service data is 10101010
  • the data written in the preset data bit corresponding to the adaptation data If it is 1110, it can be obtained by referring to Table 3.
  • the adaptation data is 1111.
  • Step 903 Receive an extended definition code block.
  • Step 904 Use the determined BIP check value and adaptation data of the data section to be checked in the data stream to replace the data in the preset data bits in the extended definition code block.
  • Step 905 Forward the extended definition code block after the replacement process to the next node.
  • the intermediate node B sends the EDB code block after the replacement process to the intermediate node C.
  • the intermediate node C calculates the BIP check value of the data segment to be checked corresponding to the EDB code block, and after receiving the EDB code block, reads the target service data therein (intermediate node B The calculated BIP check value of the corresponding data segment to be checked), and then, the newly calculated BIP check value is compared with the target service data bit by bit, and the two different bits can be obtained, which is the The number of code blocks in which the data segment to be verified is transmitted from the intermediate node B to the intermediate node C with errors.
  • an embodiment of the present application also provides a data transmission device.
  • the device includes: an acquisition module 1101, a replacement module 1102, and a forwarding module 1103, where:
  • the obtaining module 1101 is used to obtain the data unit, where the data sheet includes the data to be verified, which can specifically realize the obtaining function in step 201 and other implicit steps;
  • the replacement module 1102 is used to replace the data of the preset data bits in the data to be verified in the data unit, wherein the data to be verified before the replacement process has the same check value as the data to be verified after the replacement process.
  • the replacement function in step 202 above and other implicit steps can be realized;
  • the forwarding module 1103 is used for forwarding the data unit after the replacement processing, and can specifically implement the replacement function in step 203 and other implicit steps.
  • the device further includes:
  • the determining module is used for determining target business data, and determining adaptation data based on the target business data;
  • the replacement module 1102 is used to:
  • the determining module is used to:
  • the adaptation data is determined, where the first data is that the network device that sends the data unit communicates with the target in the data unit. Data written in a preset data bit corresponding to the service data, and the second data is written by the source network device that sends the data unit in the preset data bit corresponding to the adaptation data in the data unit The data.
  • the replacement module 1102 is used to:
  • the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are adjacent to the M preset data bits.
  • the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are not adjacent to the M preset data bits.
  • the data unit is an extended definition code block
  • the target service data is a bit-interleaved parity BIP check value
  • the determining module is configured to:
  • the determining module is used to:
  • the corresponding adaptation data is determined.
  • the determining module is used to:
  • the data in the preset data bits corresponding to the service data Based on the pre-stored service data, the data in the preset data bits corresponding to the service data, the correspondence between the data in the preset data bits corresponding to the adaptation data and the adaptation data, and the target service data, the pre-stored first First data and second data, determine the corresponding adaptation data, wherein the first data is written by the network device sending the data unit in the preset data bits corresponding to the target service data in the data unit
  • the second data is the data written in the preset data bit corresponding to the adaptation data in the data unit by the source network device that sends the data unit.
  • the determining module is used to:
  • the adjustment data of the data in the preset data bits corresponding to the service data Based on the adjustment data of the pre-stored service data, the adjustment data of the data in the preset data bits corresponding to the service data, the correspondence between the adjustment data of the data in the preset data bits corresponding to the adaptation data and the adaptation data, and The adjustment data of the target service data, the adjustment data of the first data, and the adjustment data of the second data determine the corresponding adaptation data.
  • the determining module is used to:
  • the value corresponding to each bit of the adaptation data is determined to obtain the adaptation data, wherein the adaptation data
  • the input parameter of the algorithm formula corresponding to each bit of the configuration data is a value corresponding to at least one bit of the target service data.
  • the determining module is used to:
  • the value corresponding to each bit of the adaptation data is determined to obtain
  • the first data is data written by the network device sending the data unit in a preset data bit corresponding to the target service data in the data unit
  • the second Data is data written by the network device sending the data unit in the preset data bits corresponding to the adaptation data in the data unit
  • each bit of the adaptation data corresponds to the input of the algorithm formula
  • the parameter is a value corresponding to at least one bit of the target service data, a value corresponding to at least one bit of the first data, and a value corresponding to at least one bit of the second data.
  • the determining module is used to:
  • the unknown is solved, and the adapted data is determined based on the value of the obtained unknown.
  • the determining module is used to:
  • the number of bits of the preset adaptation data, the position of each preset data bit corresponding to the target service data, the position of each preset data bit corresponding to the adaptation data, and pre-stored Determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data, wherein the first data is the network device that sends the data unit The data written in the preset data bits corresponding to the target service data in the data unit, and the second data is that the network device that sends the data unit matches the adaptation data in the data unit The data written in the corresponding preset data bit.
  • the check value is a cyclic redundancy check CRC check value.
  • the device for replacing data in the data unit provided in the above embodiment replaces data
  • only the division of the above functional modules is used as an example.
  • the above functions can be assigned to different functions according to needs.
  • Module completion means dividing the internal structure of the network device into different functional modules to complete all or part of the functions described above.
  • the device for replacing data in a data unit provided in the above-mentioned embodiment and the embodiment of the method for replacing data in a data unit belong to the same concept. For the specific implementation process, please refer to the method embodiment, which will not be repeated here.
  • the computer program product includes one or more computer instructions, and when the computer program instructions are loaded and executed on a device, the processes or functions described in the embodiments of the present application are generated in whole or in part.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by the device or a data storage device such as a server or data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (such as a floppy disk, a hard disk, and a magnetic tape), an optical medium (such as a digital video disk (Digital Video Disk, DVD), etc.), or a semiconductor medium (such as a solid-state hard disk, etc.).

Landscapes

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

Abstract

The embodiments of the present application pertain to the technical field of communications, and disclosed thereby are a method and apparatus for data transmission. The method comprises: acquiring a data unit, wherein the data unit comprises data to be checked; replacing the data of preset data bits in the data to be checked of the data unit, wherein the data to be checked before and after the replacement have the same checksum; and forwarding the post-replacement data unit. By employing the present application, the delay caused by the data replacement in the data unit may be reduced.

Description

一种数据传输的方法和装置Method and device for data transmission
本申请要求于2019年04月04日提交的申请号为201910271706.4、发明名称为“一种数据传输的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on April 4, 2019 with the application number 201910271706.4 and the invention title "A method and device for data transmission", the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请涉及通信技术领域,特别涉及一种数据传输的方法和装置。This application relates to the field of communication technology, and in particular to a method and device for data transmission.
背景技术Background technique
在数据传输中,往往要将传输的数据切分为若干数据单元进行传输,数据单元可以为数据帧、数据包或数据块等。在数据单元的传输过程中,由于某些业务需求,可能要在将特定数据单元中的一些数据位中的数据替换为可以满足业务需求的目标业务数据。例如,在有组播传输业务需求的场景下,中间节点需要将某些数据单元中的一些数据位的数据替换为下游链路个数信息(即上述目标业务数据)。然而,目前多数数据传输路径都会有误码检测机制,源网络设备节点在发送数据前,先对数据单元进行保护校验,计算出该数据单元中待校验字段的校验值,保护校验可以为循环冗余校验(Cyclic Redundancy Check,CRC)、里德-所罗门向前纠错(Reed-Solomon Forward Error Correction,RS-FEC)校验等。经过保护校验的数据单元中可以携带有校验值,当下游节点接收到该数据单元后,再次计算该数据单元的待校验字段的校验值,如果计算出的校验值与当前的校验值不一致,则会将该数据单元丢弃。基于上述,如果中间节点将数据单元的待校验字段中一些数据位的数据替换成了目标业务数据,然后,将该数据单元传输到下游节点,下游节点要对该数据单元的待校验字段再次计算校验值,那么,所计算出的校验值与该数据单元中携带的校验值基本不会相同,则该数据单元就会被丢弃。In data transmission, the transmitted data is often divided into several data units for transmission. The data units can be data frames, data packets, or data blocks. During the transmission of the data unit, due to certain business requirements, it may be necessary to replace the data in some data bits in the specific data unit with target business data that can meet the business requirements. For example, in a scenario where there is a demand for a multicast transmission service, the intermediate node needs to replace some data bits in certain data units with downstream link number information (that is, the aforementioned target service data). However, most data transmission paths currently have error detection mechanisms. Before sending data, the source network device node performs protection check on the data unit, calculates the check value of the field to be checked in the data unit, and protects the check. It can be cyclic redundancy check (Cyclic Redundancy Check, CRC), Reed-Solomon Forward Error Correction (Reed-Solomon Forward Error Correction, RS-FEC) check, etc. The data unit that has undergone protection verification can carry the check value. When the downstream node receives the data unit, the check value of the field to be checked of the data unit is calculated again. If the calculated check value is compared with the current If the check value is inconsistent, the data unit will be discarded. Based on the above, if the intermediate node replaces some data bits in the field to be verified of the data unit with the target service data, and then transmits the data unit to the downstream node, the downstream node needs the field to be verified of the data unit Calculate the check value again, then the calculated check value will not be the same as the check value carried in the data unit, and the data unit will be discarded.
在相关技术中,在需要将数据单元的待校验数据中的一些数据替换为目标业务数据的中间节点都配置上保护校验功能,则每次在插入目标业务数据后,都可以再次计算该数据单元的待校验字段的校验值,并将该数据单元原来携带的校验值替换为重新计算出的校验值。In related technologies, intermediate nodes that need to replace some of the data to be verified in the data unit with target service data are equipped with a protection check function. Then, every time the target service data is inserted, the data can be calculated again. The check value of the field to be checked in the data unit, and replace the check value originally carried by the data unit with the recalculated check value.
在实现本申请的过程中,发明人发现相关技术至少存在以下问题:In the process of implementing this application, the inventor found that the related technology has at least the following problems:
相关技术中对只要中间节点将数据单元的待校验字段中的一些数据位的数据替换为目标业务数据,就要重新计算该待校验字段的校验值,计算过程繁琐,会产生较大的时延。In the related art, as long as the intermediate node replaces the data of some data bits in the field to be verified of the data unit with the target service data, the verification value of the field to be verified must be recalculated. The calculation process is cumbersome and will cause a lot of Time delay.
发明内容Summary of the invention
为了解决相关技术中业务处理失败的问题,本申请实施例提供了一种数据传输的方法和装置。所述技术方案如下:In order to solve the problem of service processing failure in related technologies, embodiments of the present application provide a data transmission method and device. The technical solution is as follows:
第一方面,提供了一种数据传输的方法,所述方法包括:In a first aspect, a data transmission method is provided, the method including:
获取数据单元,其中,所述数据单元包括待校验数据;Acquiring a data unit, wherein the data unit includes data to be verified;
替换所述数据单元的待校验数据中预设数据位的数据,其中,替换处理前的待校验数据与替换处理后的待校验数据的校验值相同;Replacing data with preset data bits in the to-be-verified data of the data unit, wherein the to-be-verified data before the replacement process has the same check value as the to-be-verified data after the replacement process;
转发替换处理后的数据单元。Forward and replace the processed data unit.
其中,数据单元在不同的应用场景下,可以为数据块、数据帧或者数据帧等。Among them, the data unit may be a data block, a data frame, or a data frame in different application scenarios.
本申请实施例所示的方案,获取数据单元可以为接收上游设备发送的数据单元,也可以为中间节点已经接收到并存储在本地的数据单元,在有要进行处理时,再进行获取。然后,使用预先确定好的数据替换数据单元的待校验数据中预设数据位的数据。该预设数据位可以为源网络设备所预先设置,并通知中间节点的。中间节点完成替换处理后,将该数据单元转发至下一节点。In the solution shown in the embodiment of the present application, the data acquisition unit may be a data unit sent by an upstream device, or a data unit that has been received by an intermediate node and stored locally, and it is acquired when processing is needed. Then, the predetermined data is used to replace the data of the preset data bits in the data to be verified in the data unit. The preset data bit may be preset by the source network device and notified to the intermediate node. After the intermediate node completes the replacement process, it forwards the data unit to the next node.
在一种可能的实现方式,所述方法还包括:In a possible implementation manner, the method further includes:
确定目标业务数据;Determine target business data;
基于所述目标业务数据,确定适配数据;Determine adaptation data based on the target service data;
所述替换所述数据单元的待校验数据中预设数据位的数据,包括:The data replacing the preset data bits in the data to be verified of the data unit includes:
使用所述目标业务数据和所述适配数据,替换所述数据单元的待校验数据中预设数据位的数据。Use the target service data and the adaptation data to replace the data of the preset data bits in the data to be verified of the data unit.
本申请实施例所示的方案,目标业务数据是中间节点为了满足某些业务需求,而确定出的数据,用来替换预设数据位中的数据。适配数据需要根据目标业务数据确定,并和目标业务数据一起来替换预设数据位中的数据。由于单独使用目标业务数据替换预设数据位的数据会导致该数据单元的校验值发生变化,则引入该适配数据,以使在使用适配数据与目标业务数据同时替换预设数据位中的数据时,该数据单元的校验值不变。In the solution shown in the embodiment of the present application, the target service data is data determined by the intermediate node in order to meet certain service requirements, and is used to replace the data in the preset data bits. The adaptation data needs to be determined according to the target business data, and replace the data in the preset data bits together with the target business data. Since replacing the data of the preset data bits with the target service data alone will cause the check value of the data unit to change, the adaptation data is introduced so that the adaptation data and target service data are used to replace the preset data bits at the same time The check value of the data unit remains unchanged.
在一种可能的实现方式,所述基于所述目标业务数据,确定适配数据,包括:In a possible implementation manner, the determining adaptation data based on the target service data includes:
基于所述目标业务数据、以及预先存储的第一数据和第二数据,确定适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the target service data and pre-stored first data and second data, the adaptation data is determined, where the first data is that the network device that sends the data unit communicates with the target in the data unit. Data written in a preset data bit corresponding to the service data, and the second data is written by the network device sending the data unit in the preset data bit corresponding to the adaptation data in the data unit data.
本申请实施例所示的方案,在一些场景下,源网络设备在不同数据单元的预设数据所写入的数据是不同的,那么,在确定适配数据时,就要考虑源网络设备在数据单元的预设数据位写入的数据。基于源网络设备在预设数据位中写入数据和目标业务数据,来共同确定适配数据。In the solution shown in the embodiment of this application, in some scenarios, the source network device writes different data in the preset data of different data units. Then, when determining the adaptation data, it is necessary to consider the source network device's Data written by the preset data bits of the data unit. Based on the source network device writing data and target service data in the preset data bits, the adaptation data is jointly determined.
在一种可能的实现方式,所述使用所述目标业务数据和所述适配数据,替换所述数据单元的待校验数据中预设数据位的数据,包括:In a possible implementation manner, the using the target service data and the adaptation data to replace the data of the preset data bits in the data to be verified of the data unit includes:
使用所述目标业务数据,替换所述数据单元的待校验数据中N个预设数据位的数据,使用所述适配数据,替换所述数据单元的待校验数据中M个预设数据位的数据。Use the target service data to replace the data of N preset data bits in the data to be verified of the data unit, and use the adaptation data to replace M preset data in the data to be verified of the data unit Bit data.
本申请实施例所示的方案,每个数据单元中哪些预设数据为用来承载适配数据,哪些预设数据单元用来承载目标业务数据可以预先进行设置,那么,中间节点便不用再临时确定哪些预设数据单元用来承载目标业务数据。In the solution shown in the embodiment of this application, which preset data in each data unit is used to carry adaptation data and which preset data units are used to carry target service data can be set in advance, so the intermediate node does not need to temporarily Determine which preset data units are used to carry target service data.
在一种可能的实现方式,所述N个预设数据位连续,所述M个预设数据位连续,所述N个预设数据位与所述M个预设数据位相邻。In a possible implementation manner, the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are adjacent to the M preset data bits.
在一种可能的实现方式,所述N个预设数据位连续,所述M个预设数据位连续,所述N个预设数据位与所述M个预设数据位不相邻。In a possible implementation manner, the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are not adjacent to the M preset data bits.
在一种可能的实现方式,所述数据单元为扩展定义码块,所述目标业务数据为比特交错 奇偶BIP校验值,所述确定目标业务数据,包括:In a possible implementation manner, the data unit is an extended definition code block, the target service data is a bit-interleaved parity BIP check value, and the determining target service data includes:
确定数据流中待校验数据区段的BIP校验值,其中,所述待校验数据区段包括多个码块。Determine the BIP check value of the data segment to be verified in the data stream, where the data segment to be verified includes multiple code blocks.
本申请实施例所示的方案,目标业务数据可以为BIP校验值,根据不同的应用,BIP校验值可以为BIP-8校验值、BIP-16校验值或者BIP-32校验值等。源网络设备在发送扩展定义码块时,在扩展定义码块中可以写入一个待校验数据区段的BIP校验值。待校验数据区段可以对应有一个扩展定义码块。In the solution shown in the embodiment of this application, the target service data may be a BIP check value. According to different applications, the BIP check value may be a BIP-8 check value, a BIP-16 check value or a BIP-32 check value Wait. When the source network device sends the extended definition code block, a BIP check value of the data segment to be checked can be written in the extended definition code block. The data segment to be verified may correspond to an extended definition code block.
在一种可能的实现方式,所述基于所述目标业务数据,确定适配数据,包括:In a possible implementation manner, the determining adaptation data based on the target service data includes:
基于预先存储的业务数据与适配数据的对应关系,以及所述目标业务数据,确定对应的适配数据。Based on the correspondence between the pre-stored service data and the adaptation data, and the target service data, the corresponding adaptation data is determined.
本申请实施例所示的方案,在确定适配数据时,可以采用查表的方式。由于目标业务数据可以在接收到数据单元前确定,那么,在接收到数据单元之前,便可以通过查表的方式,确定出适配数据,可以满足实时性要求。In the solution shown in the embodiment of the present application, when determining the adaptation data, a table look-up method may be used. Since the target service data can be determined before the data unit is received, the adaptation data can be determined by looking up the table before the data unit is received, which can meet the real-time requirements.
在一种可能的实现方式,所述基于预先存储的业务数据与适配数据的对应关系,以及所述目标业务数据,确定对应的适配数据,包括:In a possible implementation manner, the determining the corresponding adaptation data based on the correspondence between the pre-stored service data and the adaptation data, and the target service data, includes:
基于预先存储的业务数据、业务数据对应的预设数据位中的数据、适配数据对应的预设数据位中的数据与适配数据的对应关系,以及所述目标业务数据、预先存储的第一数据和第二数据,确定对应的适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the pre-stored service data, the data in the preset data bits corresponding to the service data, the correspondence between the data in the preset data bits corresponding to the adaptation data and the adaptation data, and the target service data, the pre-stored first First data and second data, determine the corresponding adaptation data, wherein the first data is written by the network device sending the data unit in the preset data bits corresponding to the target service data in the data unit The second data is the data written by the network device that sends the data unit in a preset data bit corresponding to the adaptation data in the data unit.
本申请实施例所示的方案,源网络设备在不同的数据单元中所写入的数据可以不同,那么,在建立对应关系表时,就要建立四项对应的表。中间节点在接收到数据单元之前,可以获知数据单元中预设数据位的数据,然后基于预设数据位的数据和目标业务数据来查表,得到适配数据。In the solution shown in the embodiment of the present application, the data written by the source network device in different data units may be different, so when the correspondence table is established, four corresponding tables must be established. Before receiving the data unit, the intermediate node can learn the data of the preset data bit in the data unit, and then look up the table based on the data of the preset data bit and the target service data to obtain the adapted data.
在一种可能的实现方式,所述基于预先存储的业务数据、业务数据对应的预设数据位中的数据、适配数据对应的预设数据位中的数据与适配数据的对应关系,以及所述目标业务数据、预先存储的第一数据和第二数据,确定对应的适配数据,包括:In a possible implementation manner, the correspondence relationship between the data in the preset data bits corresponding to the service data, the data in the preset data bits corresponding to the adaptation data, and the adaptation data is based on the pre-stored service data, and The target service data, pre-stored first data and second data, and determining corresponding adaptation data include:
获取预先存储的第一数据和第二数据,基于预设的数据调整方式对所述目标业务数据、所述第一数据和所述第二数据进行调整,得到目标业务数据的调整数据、第一数据的调整数据和第二数据的调整数据;Acquire pre-stored first data and second data, adjust the target service data, the first data, and the second data based on a preset data adjustment method, to obtain adjustment data, first data of the target service data The adjustment data of the data and the adjustment data of the second data;
基于预先存储的业务数据的调整数据、业务数据对应的预设数据位中的数据的调整数据、适配数据对应的预设数据位中的数据的调整数据与适配数据的对应关系,以及所述目标业务数据的调整数据、所述第一数据的调整数据、所述第二数据的调整数据,确定对应的适配数据。Based on the adjustment data of the pre-stored service data, the adjustment data of the data in the preset data bits corresponding to the service data, the correspondence between the adjustment data of the data in the preset data bits corresponding to the adaptation data and the adaptation data, and The adjustment data of the target service data, the adjustment data of the first data, and the adjustment data of the second data determine the corresponding adaptation data.
在一种可能的实现方式,所述基于所述目标业务数据,确定适配数据,包括:In a possible implementation manner, the determining adaptation data based on the target service data includes:
基于所述目标业务数据、以及预先存储的适配数据的每一位分别对应的算法公式,确定所述适配数据的每一位对应的数值,得到所述适配数据,其中,所述适配数据的每一位分别对应的算法公式的输入参数为所述目标业务数据的至少一位对应的数值。Based on the target service data and the algorithm formula corresponding to each bit of the pre-stored adaptation data, the value corresponding to each bit of the adaptation data is determined to obtain the adaptation data, wherein the adaptation data The input parameter of the algorithm formula corresponding to each bit of the configuration data is a value corresponding to at least one bit of the target service data.
本申请实施例所示的方案,还可以采用查询适配数据的每一位分别对应的算法公式,来确定适配数据,在一定程度上,产生的延时也较小。In the solution shown in the embodiment of the present application, the algorithm formula corresponding to each bit of the query adaptation data can also be used to determine the adaptation data. To a certain extent, the generated delay is also small.
在一种可能的实现方式,所述基于所述目标业务数据、以及预先存储的适配数据的每一位分别对应的算法公式,确定所述适配数据的每一位对应的数值,得到所述适配数据,其中,所述适配数据的每一位分别对应的算法公式的输入参数为所述目标业务数据的至少一位对应的数值,包括:In a possible implementation, the algorithm formula corresponding to each bit of the adaptation data is determined based on the target service data and the pre-stored adaptation data to obtain the corresponding value of each bit of the adaptation data. The adaptation data, wherein the input parameter of the algorithm formula corresponding to each bit of the adaptation data is a value corresponding to at least one bit of the target service data, including:
基于所述目标业务数据、预先存储的第一数据和第二数据、以及预先存储的适配数据的每一位分别对应的算法公式,确定所述适配数据的每一位对应的数值,得到所述适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据,所述适配数据的每一位分别对应的算法公式的输入参数为所述目标业务数据的至少一位对应的数值、所述第一数据的至少一位对应的数值、所述第二数据的至少一位对应的数值。Based on the target service data, the pre-stored first data and second data, and the algorithm formula corresponding to each bit of the pre-stored adaptation data, the value corresponding to each bit of the adaptation data is determined to obtain In the adaptation data, the first data is data written by the network device sending the data unit in a preset data bit corresponding to the target service data in the data unit, and the second Data is data written by the network device sending the data unit in the preset data bits corresponding to the adaptation data in the data unit, and each bit of the adaptation data corresponds to the input of the algorithm formula The parameter is a value corresponding to at least one bit of the target service data, a value corresponding to at least one bit of the first data, and a value corresponding to at least one bit of the second data.
本申请实施例所示的方案,源网络设备在不同的数据单元中所写入的数据可以不同,那么,建立适配数据每一位对应的算法公式时,要将预设数据位的数据考虑在内。In the solution shown in the embodiment of this application, the data written by the source network device in different data units can be different. Then, when establishing the algorithm formula corresponding to each bit of the adapted data, the data of the preset data bit should be considered Inside.
在一种可能的实现方式,所述基于所述目标业务数据,确定适配数据,包括:In a possible implementation manner, the determining adaptation data based on the target service data includes:
确定所述目标业务数据对应的第一数据多项式和所述适配数据对应的第二数据多项式,其中,所述第二数据多项式中与所述适配数据的任一位相对应的项的系数包括待求解的未知数;Determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data, wherein the coefficient of the term corresponding to any bit of the adaptation data in the second data polynomial includes Unknowns to be solved;
基于所述第一数据多项式、所述第二数据多项式和所述数据单元的校验方法所对应的生成多项式,进行未知数求解,基于求解得到的未知数的值,确定所述适配数据。Based on the first data polynomial, the second data polynomial, and the generator polynomial corresponding to the data unit verification method, the unknown is solved, and the adapted data is determined based on the value of the obtained unknown.
其中,未知数即为待确定的适配数据。Among them, the unknown is the adaptation data to be determined.
在一种可能的实现方式,所述确定所述目标业务数据对应的第一数据多项式和所述适配数据对应的第二数据多项式,包括:In a possible implementation manner, the determining the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data includes:
基于所述目标业务数据、预设的适配数据的位数、所述目标业务数据对应的各预设数据位的位置、所述适配数据对应的各预设数据位的位置、以及预先存储的第一数据和第二数据,确定所述目标业务数据对应的第一数据多项式和所述适配数据对应的第二数据多项式,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the target service data, the number of bits of the preset adaptation data, the position of each preset data bit corresponding to the target service data, the position of each preset data bit corresponding to the adaptation data, and pre-stored Determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data, wherein the first data is the network device that sends the data unit The data written in the preset data bits corresponding to the target service data in the data unit, and the second data is that the network device that sends the data unit matches the adaptation data in the data unit The data written in the corresponding preset data bit.
在一种可能的实现方式,所述校验值为循环冗余校验CRC校验值。In a possible implementation manner, the check value is a cyclic redundancy check CRC check value.
本申请实施例所示的方案,CRC校验值可以为CRC-4校验值、CRC-8校验值等。In the scheme shown in the embodiment of the present application, the CRC check value may be a CRC-4 check value, a CRC-8 check value, and the like.
第二方面,提供了一种数据传输的装置,所述装置包括:In a second aspect, a data transmission device is provided, and the device includes:
获取模块,用于获取数据单元,其中,所述数据单元包括待校验数据;An acquisition module for acquiring a data unit, wherein the data unit includes data to be verified;
替换模块,用于替换所述数据单元的待校验数据中预设数据位的数据,其中,替换处理前的待校验数据与替换处理后的待校验数据的校验值相同;The replacement module is used to replace the data of the preset data bits in the data to be verified in the data unit, wherein the verification value of the data to be verified before the replacement processing is the same as the data to be verified after the replacement processing;
转发模块,用于转发替换处理后的数据单元。The forwarding module is used to forward the data unit after replacement processing.
在一种可能的实现方式中,所述装置还包括:In a possible implementation manner, the device further includes:
确定模块,用于确定目标业务数据,基于所述目标业务数据,确定适配数据;The determining module is used for determining target business data, and determining adaptation data based on the target business data;
所述替换模块,用于:The replacement module is used for:
使用所述目标业务数据和所述适配数据,替换所述数据单元的待校验数据中预设数据位 的数据。Use the target service data and the adaptation data to replace the data of the preset data bits in the to-be-verified data of the data unit.
在一种可能的实现方式中,所述确定模块,用于:In a possible implementation manner, the determining module is configured to:
基于所述目标业务数据、以及预先存储的第一数据和第二数据,确定适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the target service data and pre-stored first data and second data, the adaptation data is determined, where the first data is that the network device that sends the data unit communicates with the target in the data unit. Data written in a preset data bit corresponding to the service data, and the second data is written by the network device sending the data unit in the preset data bit corresponding to the adaptation data in the data unit data.
在一种可能的实现方式中,所述替换模块,用于:In a possible implementation manner, the replacement module is used for:
使用所述目标业务数据,替换所述数据单元的待校验数据中N个预设数据位的数据,使用所述适配数据,替换所述数据单元的待校验数据中M个预设数据位的数据。Use the target service data to replace the data of N preset data bits in the data to be verified of the data unit, and use the adaptation data to replace M preset data in the data to be verified of the data unit Bit data.
在一种可能的实现方式中,所述N个预设数据位连续,所述M个预设数据位连续,所述N个预设数据位与所述M个预设数据位相邻。In a possible implementation manner, the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are adjacent to the M preset data bits.
在一种可能的实现方式中,所述N个预设数据位连续,所述M个预设数据位连续,所述N个预设数据位与所述M个预设数据位不相邻。In a possible implementation manner, the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are not adjacent to the M preset data bits.
在一种可能的实现方式中,所述数据单元为扩展定义码块,所述目标业务数据为比特交错奇偶BIP校验值,所述确定模块,用于:In a possible implementation manner, the data unit is an extended definition code block, the target service data is a bit-interleaved parity BIP check value, and the determining module is configured to:
确定数据流中待校验数据区段的BIP校验值,其中,所述待校验数据区段包括多个码块。Determine the BIP check value of the data segment to be verified in the data stream, where the data segment to be verified includes multiple code blocks.
在一种可能的实现方式中,所述确定模块,用于:In a possible implementation manner, the determining module is configured to:
基于预先存储的业务数据与适配数据的对应关系,以及所述目标业务数据,确定对应的适配数据。Based on the correspondence between the pre-stored service data and the adaptation data, and the target service data, the corresponding adaptation data is determined.
在一种可能的实现方式中,所述确定模块,用于:In a possible implementation manner, the determining module is configured to:
基于预先存储的业务数据、业务数据对应的预设数据位中的数据、适配数据对应的预设数据位中的数据与适配数据的对应关系,以及所述目标业务数据、预先存储的第一数据和第二数据,确定对应的适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the pre-stored service data, the data in the preset data bits corresponding to the service data, the correspondence between the data in the preset data bits corresponding to the adaptation data and the adaptation data, and the target service data, the pre-stored first First data and second data, determine the corresponding adaptation data, wherein the first data is written by the network device sending the data unit in the preset data bits corresponding to the target service data in the data unit The second data is the data written by the network device that sends the data unit in a preset data bit corresponding to the adaptation data in the data unit.
在一种可能的实现方式中,所述确定模块,用于:In a possible implementation manner, the determining module is configured to:
获取预先存储的第一数据和第二数据,基于预设的数据调整方式对所述目标业务数据、所述第一数据和所述第二数据进行调整,得到目标业务数据的调整数据、第一数据的调整数据和第二数据的调整数据;Acquire pre-stored first data and second data, adjust the target service data, the first data, and the second data based on a preset data adjustment method, to obtain adjustment data, first data of the target service data The adjustment data of the data and the adjustment data of the second data;
基于预先存储的业务数据的调整数据、业务数据对应的预设数据位中的数据的调整数据、适配数据对应的预设数据位中的数据的调整数据与适配数据的对应关系,以及所述目标业务数据的调整数据、所述第一数据的调整数据、所述第二数据的调整数据,确定对应的适配数据。Based on the adjustment data of the pre-stored service data, the adjustment data of the data in the preset data bits corresponding to the service data, the correspondence between the adjustment data of the data in the preset data bits corresponding to the adaptation data and the adaptation data, and The adjustment data of the target service data, the adjustment data of the first data, and the adjustment data of the second data determine the corresponding adaptation data.
在一种可能的实现方式中,所述确定模块,用于:In a possible implementation manner, the determining module is configured to:
基于所述目标业务数据、以及预先存储的适配数据的每一位分别对应的算法公式,确定所述适配数据的每一位对应的数值,得到所述适配数据,其中,所述适配数据的每一位分别对应的算法公式的输入参数为所述目标业务数据的至少一位对应的数值。Based on the target service data and the algorithm formula corresponding to each bit of the pre-stored adaptation data, the value corresponding to each bit of the adaptation data is determined to obtain the adaptation data, wherein the adaptation data The input parameter of the algorithm formula corresponding to each bit of the configuration data is a value corresponding to at least one bit of the target service data.
在一种可能的实现方式中,所述确定模块,用于:In a possible implementation manner, the determining module is configured to:
基于所述目标业务数据、预先存储的第一数据和第二数据、以及预先存储的适配数据的 每一位分别对应的算法公式,确定所述适配数据的每一位对应的数值,得到所述适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据,所述适配数据的每一位分别对应的算法公式的输入参数为所述目标业务数据的至少一位对应的数值、所述第一数据的至少一位对应的数值、所述第二数据的至少一位对应的数值。Based on the target service data, the pre-stored first data and second data, and the algorithm formula corresponding to each bit of the pre-stored adaptation data, the value corresponding to each bit of the adaptation data is determined to obtain In the adaptation data, the first data is data written by the network device sending the data unit in a preset data bit corresponding to the target service data in the data unit, and the second Data is data written by the network device sending the data unit in the preset data bits corresponding to the adaptation data in the data unit, and each bit of the adaptation data corresponds to the input of the algorithm formula The parameter is a value corresponding to at least one bit of the target service data, a value corresponding to at least one bit of the first data, and a value corresponding to at least one bit of the second data.
在一种可能的实现方式中,所述确定模块,用于:In a possible implementation manner, the determining module is configured to:
确定所述目标业务数据对应的第一数据多项式和所述适配数据对应的第二数据多项式,其中,所述第二数据多项式中与所述适配数据的任一位相对应的项的系数包括待求解的未知数;Determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data, wherein the coefficient of the term corresponding to any bit of the adaptation data in the second data polynomial includes Unknowns to be solved;
基于所述第一数据多项式、所述第二数据多项式和所述数据单元的校验装置所对应的生成多项式,进行未知数求解,基于求解得到的未知数的值,确定所述适配数据。Based on the first data polynomial, the second data polynomial, and the generator polynomial corresponding to the verification device of the data unit, the unknown is solved, and the adapted data is determined based on the value of the obtained unknown.
在一种可能的实现方式中,所述确定模块,用于:In a possible implementation manner, the determining module is configured to:
基于所述目标业务数据、预设的适配数据的位数、所述目标业务数据对应的各预设数据位的位置、所述适配数据对应的各预设数据位的位置、以及预先存储的第一数据和第二数据,确定所述目标业务数据对应的第一数据多项式和所述适配数据对应的第二数据多项式,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the target service data, the number of bits of the preset adaptation data, the position of each preset data bit corresponding to the target service data, the position of each preset data bit corresponding to the adaptation data, and pre-stored Determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data, wherein the first data is the network device that sends the data unit The data written in the preset data bits corresponding to the target service data in the data unit, and the second data is that the network device that sends the data unit matches the adaptation data in the data unit The data written in the corresponding preset data bit.
在一种可能的实现方式中,所述校验值为循环冗余校验CRC校验值。In a possible implementation manner, the check value is a cyclic redundancy check CRC check value.
第三方面,提供了一种数据传输的设备,所述设备包括处理器和存储器;所述存储器存储有一个或多个程序,所述一个或多个程序被配置成由所述处理器执行,用于实现如上述第一方面中任一项所述的方法的指令。In a third aspect, a data transmission device is provided, the device includes a processor and a memory; the memory stores one or more programs, and the one or more programs are configured to be executed by the processor, Instructions for implementing the method according to any one of the above-mentioned first aspects.
第四方面,提供了一种计算机可读存储介质,计算机可读存储介质包括指令,当所述计算机可读存储介质在设备上运行时,使得所述设备执行上述第一方面所述的方法。In a fourth aspect, a computer-readable storage medium is provided, and the computer-readable storage medium includes instructions that, when the computer-readable storage medium runs on a device, cause the device to execute the method described in the first aspect.
第五方面,提供了一种包含指令的计算机程序产品,当所述计算机程序产品在设备上运行时,使得所述设备执行上述第一方面所述的方法。In a fifth aspect, a computer program product containing instructions is provided, which when the computer program product runs on a device, causes the device to execute the method described in the first aspect.
本申请实施例提供的技术方案带来的有益效果是:The beneficial effects brought about by the technical solutions provided by the embodiments of this application are:
本申请实施例中,网络设备在获取到数据单元后,将该数据单元中预设数据位的数据进行替换,而且,该替换处理前的待校验数据和替换处理后的待校验数据的校验值相同,这样设备便无需对替换处理后的待校验数据的校验值进行重新计算,产生的时延很小。In the embodiment of the present application, after acquiring the data unit, the network device replaces the data of the preset data bits in the data unit, and the data to be verified before the replacement process and the data to be verified after the replacement process The check value is the same, so the device does not need to recalculate the check value of the data to be checked after the replacement process, and the resulting delay is small.
附图说明Description of the drawings
图1是本申请实施例提供的一种网络设备结构示意图;Figure 1 is a schematic diagram of a network device structure provided by an embodiment of the present application;
图2是本申请实施例提供的一种数据单元中替换数据的方法流程示意图;2 is a schematic flowchart of a method for replacing data in a data unit provided by an embodiment of the present application;
图3是本申请实施例提供的一种扩展定义码块结构示意图;FIG. 3 is a schematic diagram of an extended definition code block structure provided by an embodiment of the present application;
图4是本申请实施例提供的一种数据单元中替换数据的方法流程示意图;4 is a schematic flowchart of a method for replacing data in a data unit provided by an embodiment of the present application;
图5是本申请实施例提供的一种数据单元的结构示意图;FIG. 5 is a schematic structural diagram of a data unit provided by an embodiment of the present application;
图6是本申请实施例提供的一种数据单元的结构示意图;FIG. 6 is a schematic structural diagram of a data unit provided by an embodiment of the present application;
图7是本申请实施例提供的一种数据单元的结构示意图;FIG. 7 is a schematic structural diagram of a data unit provided by an embodiment of the present application;
图8是本申请实施例提供的一种数据单元的结构示意图;FIG. 8 is a schematic structural diagram of a data unit provided by an embodiment of the present application;
图9是本申请实施例提供的一种数据单元中替换数据的方法流程示意图;9 is a schematic flowchart of a method for replacing data in a data unit provided by an embodiment of the present application;
图10是本申请实施例提供的一种数据单元中替换数据的场景示意图;FIG. 10 is a schematic diagram of a scene of replacing data in a data unit provided by an embodiment of the present application;
图11是本申请实施例提供的一种数据单元中替换数据的装置结构示意图。FIG. 11 is a schematic structural diagram of an apparatus for replacing data in a data unit provided by an embodiment of the present application.
具体实施方式detailed description
本申请实施例提供了一种数据传输的方法,该方法可以由网络设备实现,网络设备可以为配置有灵活以太网(Flex Ethernet,FlexE)接口的核心路由器、IP化无线接入网(IP Radio Access Network,IPRAN)中的路由设备、分组传输网络(Packet Transport Network,PTN)中的盒式或框式交换机设备。上述各种可能的网络设备均可以作为网络中的中间节点,在其所处的网络中可以具有转发数据的作用。本方案可以在如下场景下实施,源网络设备向中间节点发送数据单元,中间节点需要将该数据单元的待校验数据中的一些数据替换为目标业务数据,以此来满足业务需求,此时便可以采用本方案进行数据替换。The embodiment of this application provides a data transmission method, which can be implemented by a network device, and the network device can be a core router configured with a flexible Ethernet (Flex Ethernet, FlexE) interface, and an IP radio access network (IP Radio). Routing equipment in Access Network (IPRAN), box-type or box-type switch equipment in Packet Transport Network (PTN). The above-mentioned various possible network devices can all serve as intermediate nodes in the network, and can have the function of forwarding data in the network where they are located. This solution can be implemented in the following scenarios. The source network device sends a data unit to an intermediate node, and the intermediate node needs to replace some of the data to be verified in the data unit with target business data to meet business requirements. Then you can use this program for data replacement.
图1是本申请实施例提供的一种网络设备100的示意图。该网络设备100可以做为中间节点,应用于数据传输路径中以执行本申请实施例所提供的方法。如图1所示,网络设备100可以包括处理器110,与所述处理器110耦合连接的存储器120,收发器130。处理器110可以是CPU。处理器110可以是指一个处理器,也可以包括多个处理器。存储器120可以包括易失性存储器,例如RAM;存储器也可以包括非易失性存储器,例如ROM,快闪存储器,等;存储器还可以包括上述种类的存储器的组合。存储器120可以是指一个存储器,也可以包括多个存储器。在一个实施方式中,存储器120中存储有计算机可读指令,所述计算机可读指令可以包括多个软件模块,例如处理模块121和发送模块122。处理器110执行各个软件模块后可以按照各个软件模块的指示进行相应的操作。在本实施例中,一个软件模块所执行的操作实际上是指处理器110根据所述软件模块的指示而执行的操作。例如,发送模块122用于转发数据单元。处理模块121用于替换数据单元的待校验数据中预设数据位的数据。Fig. 1 is a schematic diagram of a network device 100 provided by an embodiment of the present application. The network device 100 can be used as an intermediate node and applied in a data transmission path to execute the method provided in the embodiment of the present application. As shown in FIG. 1, the network device 100 may include a processor 110, a memory 120 coupled to the processor 110, and a transceiver 130. The processor 110 may be a CPU. The processor 110 may refer to one processor, or may include multiple processors. The memory 120 may include a volatile memory, such as RAM; the memory may also include a nonvolatile memory, such as ROM, flash memory, etc.; the memory may also include a combination of the foregoing types of memory. The memory 120 may refer to one memory, or may include multiple memories. In one embodiment, computer-readable instructions are stored in the memory 120, and the computer-readable instructions may include multiple software modules, such as a processing module 121 and a sending module 122. After the processor 110 executes each software module, it can perform corresponding operations according to the instructions of each software module. In this embodiment, an operation performed by a software module actually refers to an operation performed by the processor 110 according to an instruction of the software module. For example, the sending module 122 is used to forward data units. The processing module 121 is used to replace data of preset data bits in the data to be verified in the data unit.
下面将结合具体实施方式,对图2所示的处理流程进行详细的说明,该方法由作为中间节点的网络设备实现,具体内容可以如下:The processing flow shown in FIG. 2 will be described in detail below in conjunction with specific implementations. The method is implemented by a network device as an intermediate node. The specific content may be as follows:
本申请实施例提供了一种数据单元中替换数据的方法,下面结合图2进行说明。The embodiment of the present application provides a method for replacing data in a data unit, which is described below with reference to FIG. 2.
步骤201,获取数据单元。Step 201: Obtain a data unit.
其中,数据单元包括待校验数据,还可以包括有待校验数据对应的校验值。Wherein, the data unit includes data to be verified, and may also include a verification value corresponding to the data to be verified.
在实施中,中间节点获取源网络设备发送的数据单元。在不同的业务场景下,该数据单元也可以不同,例如在一些数据传输网络中该数据单元可以为基于64B/66B的扩展定义码块(Extended Defined Block,EDB),该EDB码块格式如图3所示,头部的标识位占用2个比特,待校验数据占用60个比特和待校验数据对应的校验值占用最后的4个比特,待校验数据中有8个比特为BIP-8校验值。In implementation, the intermediate node obtains the data unit sent by the source network device. In different business scenarios, the data unit can also be different. For example, in some data transmission networks, the data unit can be an Extended Defined Block (EDB) based on 64B/66B. The format of the EDB code block is shown in the figure As shown in 3, the identification bit of the header occupies 2 bits, the data to be verified occupies 60 bits and the check value corresponding to the data to be verified occupies the last 4 bits, and 8 bits of the data to be verified are BIP -8 check value.
在上述数据传输网络中,源网络设备在向中间节点发送数据流时,会以预设周期将数据流中的空闲(IDLE)码块替换为EDB码块,这样中间节点就会每过一段时间接收一个EDB码块。In the above-mentioned data transmission network, when the source network device sends a data stream to an intermediate node, it will replace the IDLE code block in the data stream with an EDB code block in a preset period, so that the intermediate node will pass a period of time Receive an EDB code block.
步骤202,替换数据单元的待校验数据中预设数据位的数据。Step 202: Replace the data with preset data bits in the data to be verified in the data unit.
在实施中,数据单元中要被替换的数据的数据位为预先设置好,或者是由源网络设备临时通知中间节点的。中间节点在接收到该数据单元后,可以使用预设的数据替换预设数据位中的数据。例如,在组播场景下,此处中间节点可以使用下游链路条数替换预设数据位中的数据。In implementation, the data bit of the data to be replaced in the data unit is preset, or the intermediate node is temporarily notified by the source network device. After receiving the data unit, the intermediate node can replace the data in the preset data bit with the preset data. For example, in a multicast scenario, the intermediate node here can replace the data in the preset data bit with the number of downstream links.
步骤203,转发替换处理后的数据单元。Step 203: Forward the replaced data unit.
在实施中,中间节点完成替换处理后,将该数据单元转发至下一节点,由下一节点对该数据单元进行处理。In implementation, after the intermediate node completes the replacement process, the data unit is forwarded to the next node, and the next node processes the data unit.
本申请实施例还提供了一种数据传输的方法,该方法中使用目标业务数据和适配数据来替换数据单元的待校验数据中预设数据位的数据,下面结合图4进行说明。The embodiment of the present application also provides a data transmission method in which target service data and adaptation data are used to replace the data of the preset data bits in the data to be verified of the data unit, which is described below with reference to FIG. 4.
步骤401,确定目标业务数据。Step 401: Determine target business data.
在实施中,根据不同的业务需求,该目标业务数据也不相同。另外,对于该步骤的处理来说,根据实际应用场景,可以在获取数据单元之前执行,也可以在获取到数据单元之后执行。In the implementation, the target business data is different according to different business requirements. In addition, the processing of this step can be executed before the data unit is acquired or after the data unit is acquired according to actual application scenarios.
具体的,例如,在部分路径误码监测场景中,源网络设备要向目的网络设备发送数据流,在要发送的该数据流中,可以有基于64B/66B的扩展定义码块,此处可称为EDB码块,每个EDB码块有BIP校验值,该BIP校验值对应数据流中的一个待校验数据区段。中间节点B在接收到该EDB码块之前,会先接到其对应的待校验数据区段内的码块,则中间节点B可以在接收到EDB码块之前就对该待校验数据区段内的码块进行BIP校验,得到该待校验数据区段的新的BIP校验值。在这种情况下,为了满足部分路径的误码监测需求,目标业务数据可以有多种选择,以下列举其中两种进行说明。Specifically, for example, in a partial path error detection scenario, the source network device needs to send a data stream to the destination network device. In the data stream to be sent, there can be an extended definition code block based on 64B/66B. Called EDB code blocks, each EDB code block has a BIP check value, which corresponds to a data section to be checked in the data stream. Before receiving the EDB code block, the intermediate node B will first receive the code block in the corresponding data section to be verified. Then the intermediate node B can perform the data area to be verified before receiving the EDB code block. The code blocks in the segment are subjected to BIP verification, and the new BIP verification value of the data segment to be verified is obtained. In this case, in order to meet the bit error monitoring requirements of the partial path, there are multiple choices for the target service data, and two of them are listed below for explanation.
可能的实现方式一,目标业务数据可以为中间节点在接收到EDB码块之前就计算得到的相应的待校验数据区段的新BIP校验值。例如,计算得到的BIP校验值为0b10010111(0b表示二进制,并非数据的一部分),则该目标业务数据为0b10010111。可见,采用该BIP校验值直接作为目标业务数据,无需接收到EDB码块后再进行目标业务数据的计算,可以保证数据流传输的实时性。Possible implementation manner 1: The target service data may be the new BIP check value of the corresponding data section to be checked calculated by the intermediate node before receiving the EDB code block. For example, the calculated BIP check value is 0b10010111 (0b represents binary and is not part of the data), then the target service data is 0b10010111. It can be seen that the BIP check value is directly used as the target service data, and there is no need to calculate the target service data after receiving the EDB code block, which can ensure the real-time transmission of the data stream.
可能的实现方式二,目标业务数据可以为中间节点B计算出来的该待校验数据区段在从源网络设备A发送到本节点(即中间节点B)发生误码的码块数。具体的,中间节点在接收到EDB码块之前就计算得到了相应的待校验数据区段的新BIP校验值,然后在接收到EDB码块后,将该新BIP校验值和EDB码块中携带的BIP校验值按位进行比较,得出二者不同的比特个数,即为该待校验数据区段从源网络设备A发送到本节点发生误码的码块数,该发生误码的码块数即为目标业务数据。例如,计算得到的BIP校验值为0b10010111,该EDB码块中携带的BIP校验值为0b10010110,那么将二者按位进行比较,可以确定有一个比特不同,那么,该待校验数据区段中的码块从源网络设备A发送到本节点有1个模块发送误码,则该目标业务数据为0b0001。此处需要说明的是,上述的EDB码块中BIP校验值可以为BIP-8校验值,在其他的数据传输网络中,该BIP校验值还可以为BIP-16校验值、BIP-32校验值等,本申请实施例对具体的校验数据区段的校验方法不做限定。Possible implementation manner 2: The target service data may be the number of code blocks in which the data segment to be verified calculated by the intermediate node B is sent from the source network device A to the local node (ie, the intermediate node B). Specifically, before receiving the EDB code block, the intermediate node calculates the new BIP check value of the corresponding data segment to be checked, and then after receiving the EDB code block, the new BIP check value and the EDB code The BIP check value carried in the block is compared bit by bit, and the number of different bits between the two is obtained, that is, the number of code blocks in which the data segment to be checked is sent from the source network device A to the node with errors. The number of code blocks with errors is the target service data. For example, the calculated BIP check value is 0b10010111, the BIP check value carried in the EDB code block is 0b10010110, then the two bits are compared to determine that one bit is different, then the data area to be checked The code block in the segment is sent from the source network device A to the node, and there is a module that sends an error code, then the target service data is 0b0001. It should be noted here that the BIP check value in the above-mentioned EDB code block can be a BIP-8 check value. In other data transmission networks, the BIP check value can also be a BIP-16 check value, BIP -32 check value, etc. The embodiment of this application does not limit the specific check data section check method.
对于上述确定出的目标业务数据可以进行存储,在使用时再进行获取。The target business data determined above can be stored and retrieved when used.
步骤402,基于目标业务数据确定适配数据。Step 402: Determine adaptation data based on the target service data.
其中,适配数据用于使替换处理前与替换处理后的待校验数据的校验值相同,该替换处理为使用上述确定的目标业务数据和适配数据替换数据单元的待校验数据中预设数据位的数据。Wherein, the adaptation data is used to make the check value of the data to be verified before the replacement process and after the replacement process the same, and the replacement process is to replace the data to be verified in the data unit with the determined target service data and the adaptation data. The data of the preset data bits.
可选的,对于步骤402,具体的,还可以有如下处理:基于目标业务数据、以及预先存储的第一数据和第二数据,确定适配数据。Optionally, for step 402, specifically, the following processing may also be performed: determining the adaptation data based on the target service data and the pre-stored first data and second data.
其中,第一数据是发送数据单元的网络设备在数据单元中与目标业务数据对应的预设数据位中写入的数据,第二数据是发送数据单元的网络设备在数据单元中与适配数据对应的预设数据位中写入的数据,该网络设备可以为源网络设备,也可以为其他的网络设备,以下以源网络设备进行说明,其他情况与之类似,在此不做赘述。Among them, the first data is the data written in the preset data bits corresponding to the target service data in the data unit by the network device that sends the data unit, and the second data is the data that the network device that sends the data unit matches with the adaptation data in the data unit. For the data written in the corresponding preset data bits, the network device may be the source network device or other network devices. The source network device is used for description below, and other situations are similar, so we will not repeat them here.
在实施中,源网络设备可以将第一数据和第二数据的所有可能情况进行编号并通知中间节点,或者,由技术人员在中间节点中输入第一数据和第二数据及对应的编号。源网络设备在向中间节点发送数据单元之前,可以先向中间节点发送该数据单元中写入的第一数据和第二数据的编号,中间节点可以根据该编号,确定出预先存储的第一数据和第二数据,也可以由中间节点直接将第一数据和第二数据通知到中间节点,中间节点接收到后进行存储。另外,第一数据和第二数据可能只有一种情况,那么技术人员可以直接在中间节点中输入第一数据和第二数据的这一种情况,并由中间节点进行存储,同样的也可以由源网络设备通知中间节点第一数据和第二数据为何值,中间节点进行存储。这样,在接收到数据单元之前,中间节点就可以根据预先存储的第一数据和第二数据,以及目标业务数据来确定适配数据。In implementation, the source network device may number all possible situations of the first data and the second data and notify the intermediate node, or a technician may input the first data and the second data and the corresponding numbers in the intermediate node. Before sending the data unit to the intermediate node, the source network device may first send the serial number of the first data and the second data written in the data unit to the intermediate node, and the intermediate node can determine the pre-stored first data according to the serial number And the second data, the intermediate node can also directly notify the first data and the second data to the intermediate node, and the intermediate node stores it after receiving it. In addition, there may only be one case for the first data and the second data, so the technician can directly enter the first data and the second data in the intermediate node, and the intermediate node will store it, and the same can also be used by the intermediate node. The source network device notifies the intermediate node of the values of the first data and the second data, and the intermediate node stores it. In this way, before receiving the data unit, the intermediate node can determine the adaptation data according to the pre-stored first data and second data and the target service data.
对于适配数据的确定可以有多种方法,以下举出其中几种进行说明。There are many ways to determine the adaptation data, some of which are listed below for explanation.
方法一method one
通过查询关系表确定适配数据的方法,相应的,在步骤402的处理可以如下:基于预先存储的业务数据与适配数据的对应关系,以及目标业务数据,确定对应的适配数据。The method for determining the adaptation data is determined by querying the relationship table. Accordingly, the processing in step 402 may be as follows: determining the corresponding adaptation data based on the pre-stored correspondence relationship between the service data and the adaptation data, and the target service data.
在实施中,可以预先建立业务数据和适配数据之间的对应关系表,在一种可能的情况下,源网络设备所发送的数据单元中目标业务数据和适配数据所对应的数据位均为预先设置好的,每个数据单元中目标业务数据和适配数据所对应的预设数据位均相同,并且,每个预设数据位中的数据也为预先设置好的,且各数据单元中相应预设数据位的数据也相同。例如,在上述步骤401可能的实现方式一,目标业务数据要在数据单元对应有8个预设数据位,适配数据要在数据单元中对应有4个预设数据位,且目标业务数据对应的8个预设数据位连续,适配数据对应的4个预设数据位连续,且源网络设备在每个数据单元的预设数据位中写入的数据均为0,目标业务数据对应的预设数据位和适配数据对应的预设数据位之间间隔有10个数据位。那么,在此情况下,对应关系表中可以仅有业务数据和适配数据两项,具体形式可以如表1所示。In the implementation, the correspondence table between the service data and the adaptation data can be established in advance. In a possible situation, the data bits corresponding to the target service data and the adaptation data in the data unit sent by the source network device are both To be preset, the preset data bits corresponding to the target service data and adaptation data in each data unit are the same, and the data in each preset data bit is also preset, and each data unit The data of the corresponding preset data bit in the same is also the same. For example, in the first possible implementation of step 401, the target service data should correspond to 8 preset data bits in the data unit, and the adaptation data should correspond to 4 preset data bits in the data unit, and the target service data corresponds to The 8 preset data bits are continuous, the 4 preset data bits corresponding to the adaptation data are continuous, and the data written by the source network device in the preset data bits of each data unit are all 0, and the target business data corresponds to There are 10 data bits between the preset data bits and the preset data bits corresponding to the adapted data. Then, in this case, there may only be two items of business data and adaptation data in the correspondence table, and the specific form may be as shown in Table 1.
表1Table 1
业务数据Business data 适配数据Adaptation data
0000000000000000 00000000
0000000100000001 11111111
……... ……...
1001011110010111 10101010
……... ……...
在上述步骤401可能的实现方式二,目标业务数据要在数据单元对应有4个预设数据位,适配数据要在数据单元中对应有4个预设数据位,且目标业务数据对应的4个预设数据位连续,适配数据对应的4个预设数据位连续,且源网络设备在每个数据单元的预设数据位中写入的数据均为0,目标业务数据对应的预设数据位和适配数据对应的预设数据位之间没有间隔数据位。那么,在此情况下,对应关系表中也可以仅有业务数据和适配数据两项,具体形式可以如表2所示。In the second possible implementation of step 401, the target service data must correspond to 4 preset data bits in the data unit, and the adaptation data must correspond to 4 preset data bits in the data unit, and the target service data corresponds to 4 Two preset data bits are continuous, the 4 preset data bits corresponding to the adaptation data are continuous, and the data written by the source network device in the preset data bits of each data unit are all 0, and the preset data corresponding to the target business data There is no interval data bit between the data bit and the preset data bit corresponding to the adapted data. Then, in this case, there may only be two items of business data and adaptation data in the correspondence table, and the specific form may be as shown in Table 2.
表2Table 2
业务数据Business data 适配数据Adaptation data
00000000 00000000
00010001 11101110
……... ……...
00110011 00010001
……... ……...
这样,在确定出目标业务数据后,便可以通过查询对应关系表,来确定相应的适配数据。In this way, after the target business data is determined, the corresponding adaptation data can be determined by querying the correspondence table.
可选的,对于上述的查表方法,在对关系表中还可以有业务数据对应的预设数据位中的数据和适配数据对应的预设数据位中的数据,相应的,处理可以如下:基于预先存储的业务数据、业务数据对应的预设数据位中的数据、适配数据对应的预设数据位中的数据与适配数据的对应关系,以及目标业务数据、预先存储的第一数据和第二数据,确定对应的适配数据。Optionally, for the above-mentioned table look-up method, the data in the preset data bits corresponding to the service data and the data in the preset data bits corresponding to the adaptation data may also be included in the pair relationship table. Correspondingly, the processing can be as follows : Based on the pre-stored service data, the data in the preset data bits corresponding to the service data, the correspondence between the data in the preset data bits corresponding to the adaptation data and the adaptation data, and the target service data, the pre-stored first The data and the second data determine the corresponding adaptation data.
在实施中,可以预先建立预先存储的业务数据、业务数据对应的预设数据位中的数据、适配数据对应的预设数据位中的数据与适配数据的对应关系表,在一种可能的情况下,源网络设备所发送的数据单元中目标业务数据和适配数据所对应的数据位是预先设置好的,但是,源网络设备在不同的数据单元中的预设数据位所写入的数据可能不同。例如,在上述步骤401可能的实现方式一,目标业务数据要在数据单元对应有8个预设数据位,适配数据要在数据单元中对应有4个预设数据位,且目标业务数据对应的8个预设数据位连续,适配数据对应的4个预设数据位连续,这些数据位中数据均为预先确定的,但是源网络设备在不同数据单元的预设数据位中写入的数据可能不同,目标业务数据对应的预设数据位和适配数据对应的预设数据位之间间隔有10个数据位。源网络设备在向中间节点发送数据单元之前,可以先向中间节点发送其在该数据单元中写入的第一数据和第二数据,中间节点可以将接收到的第一数据和第二数据进行存储,以供查表使用。那么,在此情况下,对应关系表中可以有业务数据、业务数据对应的预设数据位中的数据、适配数据对应的预设数据位中的数据与适配数据四项,具体的形式可以如表3所示。In implementation, the correspondence table between pre-stored service data, data in the preset data bits corresponding to the service data, and data in the preset data bits corresponding to the adaptation data and the adaptation data can be established in advance. In the case, the data bits corresponding to the target service data and adaptation data in the data unit sent by the source network device are preset, but the source network device’s preset data bits in different data units are written The data may be different. For example, in the first possible implementation of step 401, the target service data should correspond to 8 preset data bits in the data unit, and the adaptation data should correspond to 4 preset data bits in the data unit, and the target service data corresponds to The 8 preset data bits of the data are continuous, and the 4 preset data bits corresponding to the adapted data are continuous. The data in these data bits are predetermined, but the source network device writes in the preset data bits of different data units The data may be different. There are 10 data bits between the preset data bits corresponding to the target service data and the preset data bits corresponding to the adaptation data. Before the source network device sends the data unit to the intermediate node, it can first send the first data and second data written in the data unit to the intermediate node, and the intermediate node can perform processing on the received first data and second data. Stored for table lookup. Then, in this case, there may be four items in the correspondence table: business data, data in the preset data bits corresponding to the business data, data in the preset data bits corresponding to the adaptation data, and adaptation data, in specific forms It can be as shown in Table 3.
表3table 3
Figure PCTCN2020083147-appb-000001
Figure PCTCN2020083147-appb-000001
在上述步骤402可能的实现方式二,目标业务数据要在数据单元对应有4个预设数据位,适配数据要在数据单元中对应有4个预设数据位,且目标业务数据对应的4个预设数据位连续,适配数据对应的4个预设数据位连续,目标业务数据对应的预设数据位和适配数据对应的预设数据位之间没有间隔数据位,但是源网络设备在不同数据单元的预设数据位中写入的数据可能不同,那么,在此情况下,对应关系表中可以有业务数据、业务数据对应的预设数据位中的数据、适配数据对应的预设数据位中的数据与适配数据四项,具体的形式可以如表4所示。In the second possible implementation manner of step 402, the target service data should correspond to 4 preset data bits in the data unit, the adaptation data should correspond to 4 preset data bits in the data unit, and the target service data corresponds to 4 Two preset data bits are continuous, the 4 preset data bits corresponding to the adaptation data are continuous, and there is no interval data bit between the preset data bits corresponding to the target service data and the preset data bits corresponding to the adaptation data, but the source network device The data written in the preset data bits of different data units may be different. In this case, the correspondence table may contain business data, data in the preset data bits corresponding to the business data, and data corresponding to the adaptation data. There are four items of data and adaptation data in the preset data bits, and the specific form can be shown in Table 4.
表4Table 4
Figure PCTCN2020083147-appb-000002
Figure PCTCN2020083147-appb-000002
这样,在确定出目标业务数据后,根据目标业务数据和预先存储的第一数据以及第二数据,便可以在对应关系表中,查询出相应的适配数据。In this way, after determining the target business data, based on the target business data and the pre-stored first data and second data, the corresponding adaptation data can be queried in the correspondence table.
可选的,对于查表确定适配数据的方法中,源网络设备所发送的数据单元中的预设数据位可能不连续,相应的,处理可以如下:获取预先存储的第一数据和第二数据,基于预设的数据调整方式对目标业务数据、第一数据和第二数据进行调整,得到目标业务数据的调整数据、第一数据的调整数据和第二数据的调整数据;基于预先存储的业务数据的调整数据、业务数据对应的预设数据位中的数据的调整数据、适配数据对应的预设数据位中的数据的调整数据与适配数据的对应关系,以及目标业务数据的调整数据、第一数据的调整数据、第二数据的调整数据,确定对应的适配数据。Optionally, in the method for checking the table to determine the adaptation data, the preset data bits in the data unit sent by the source network device may be discontinuous. Correspondingly, the processing may be as follows: Obtain the pre-stored first data and second data. Data, adjust the target business data, the first data and the second data based on the preset data adjustment method to obtain the adjustment data of the target business data, the adjustment data of the first data and the adjustment data of the second data; based on the pre-stored data The adjustment data of the business data, the adjustment data of the data in the preset data bits corresponding to the business data, the correspondence between the adjustment data of the data in the preset data bits corresponding to the adaptation data and the adaptation data, and the adjustment of the target service data The data, the adjustment data of the first data, and the adjustment data of the second data determine the corresponding adaptation data.
在实施中,数据单元中的预设数据位可能不连续,那么需要对第一数据、第二数据和目 标业务数据进行调整。具体的,可以预先设置好几种可能的预设数据位的位置关系按照标号进行存储,然后,可以对于每种预设数据位的位置关系分别建表。源网络设备在发送数据单元之前,可以先将该数据单元中的预设数据位的位置关系编号和每个预设数据位中写入的数据发送给中间节点,中间节点确定出目标业务数据之后,根据预设的数据调整方式对第一数据、第二数据和目标业务数据进行调整。例如,在数据单元中,适配数据对应的4个预设数据位连续,目标业务数据对应的4个预设数据位中,每相邻的两个预设数据位间均间隔有一个数据位,且适配数据对应的预设数据位与目标业务数据对应的业务数据之间没有间隔数据位(适配数据对应的各预设数据位与目标业务数据对应的各预设数据位之间的最小间隔数据位)确定出的目标业务数据为1111,则将目标业务数据调整为1010101,适配数据对应的预设数据位连续,则不用对第二数据进行调整,同样的方法,可以对第一数据进行调整,得到调整后的第一数据。又例如,在数据单元中,适配数据对应的四预设数据位不连续,其中,前三个预设数据位连续,且与第四个预设数据位之间有间隔至少一个数据位,第四个预设数据位与目标业务数据对应的预设数据位的第一个之间没有间隔数据位,目标业务数据对应的预设数据位连续,适配数据对应的预设数据位中的第二数据为1111,这时要将第二数据调整为1110,目标业务数据对应的预设数据位中的第一数据为0101,这时要调整为10101。根据确定出的第一数据的调整数据、第二数据的调整数据和目标业务数据,便可以在相应的对应关系表中确定出适配数据。In the implementation, the preset data bits in the data unit may not be continuous, so the first data, the second data and the target service data need to be adjusted. Specifically, several possible positional relationships of preset data bits can be preset and stored according to the labels, and then a table can be created for the positional relationships of each kind of preset data bits. Before sending the data unit, the source network device may first send the positional relationship number of the preset data bits in the data unit and the data written in each preset data bit to the intermediate node. After the intermediate node determines the target service data , Adjust the first data, second data and target business data according to the preset data adjustment method. For example, in the data unit, the 4 preset data bits corresponding to the adapted data are continuous, and among the 4 preset data bits corresponding to the target service data, there is one data bit spaced between every two adjacent preset data bits. , And there is no interval data bit between the preset data bit corresponding to the adaptation data and the service data corresponding to the target service data (the difference between each preset data bit corresponding to the adaptation data and each preset data bit corresponding to the target service data The minimum interval data bit) determines that the target service data is 1111, then the target service data is adjusted to 1010101, and the preset data bits corresponding to the adaptation data are continuous, so there is no need to adjust the second data. In the same way, the first data can be adjusted. One data is adjusted to obtain the adjusted first data. For another example, in the data unit, the four preset data bits corresponding to the adaptation data are not continuous, wherein the first three preset data bits are continuous, and there is at least one data bit spaced from the fourth preset data bit, There is no interval data bit between the fourth preset data bit and the first one of the preset data bits corresponding to the target service data. The preset data bits corresponding to the target service data are continuous. The second data is 1111. At this time, the second data should be adjusted to 1110. The first data in the preset data bits corresponding to the target service data is 0101, and then it should be adjusted to 10101. According to the determined adjustment data of the first data, the adjustment data of the second data, and the target service data, the adaptation data can be determined in the corresponding correspondence table.
方法二Method Two
通过查询适配数据的每一位分别对应的算法公式确定适配数据的方法,相应的,步骤402的处理可以如下:基于目标业务数据、以及预先存储的适配数据的每一位分别对应的算法公式,确定适配数据的每一位对应的数值,得到适配数据。The method of determining the adaptation data is determined by querying the algorithm formula corresponding to each bit of the adaptation data. Correspondingly, the processing of step 402 can be as follows: Based on the target service data and each bit of the pre-stored adaptation data respectively corresponding The algorithm formula determines the value corresponding to each bit of the adapted data to obtain the adapted data.
其中,适配数据的每一位分别对应的算法公式的输入参数为目标业务数据的至少一位对应的数值。Wherein, the input parameter of the algorithm formula corresponding to each bit of the adaptation data is a value corresponding to at least one bit of the target service data.
在实施中,中间节点可以预先确定适配数据的每一位分别对应的算法公式并存储。在一种可能是情况下,源网络设备在每个预设数据位写入的数据均相同且为0,在这种情况下,算法公式中可以不包括源网络设备在预设数据位写入的数据。In implementation, the intermediate node may predetermine and store the algorithm formula corresponding to each bit of the adaptation data. In one possibility, the data written by the source network device in each preset data bit is the same and is 0. In this case, the algorithm formula may not include the source network device writing in the preset data bit The data.
例如,源网络设备所发送的数据单元中目标业务数据要在数据单元对应有8个预设数据位,适配数据要在数据单元中对应有4个预设数据位,且目标业务数据对应的8个预设数据位连续,适配数据对应的4个预设数据位连续,源网络设备在每个数据单元的预设数据位中写入的数据均为0,目标业务数据对应的预设数据位和适配数据对应的预设数据位之间间隔有10个数据位。在这种情况下,适配数据的每一位所对应的算法公式可以如下:For example, the target service data in the data unit sent by the source network device should correspond to 8 preset data bits in the data unit, and the adaptation data should correspond to 4 preset data bits in the data unit, and the target service data corresponds to The 8 preset data bits are continuous, and the 4 preset data bits corresponding to the adaptation data are continuous. The data written by the source network device in the preset data bits of each data unit is all 0, and the preset data corresponding to the target business data There are 10 data bits between the data bits and the preset data bits corresponding to the adapted data. In this case, the algorithm formula corresponding to each bit of the adapted data can be as follows:
A 0=I 0+I 1+I 2+I 3+I 7 A 0 =I 0 +I 1 +I 2 +I 3 +I 7
A 1=I 0+I 4+I 7 A 1 =I 0 +I 4 +I 7
A 2=I 0+I 1+I 5 A 2 =I 0 +I 1 +I 5
A 3=I 0+I 1+I 2+I 6 A 3 =I 0 +I 1 +I 2 +I 6
其中,A 0到A 4分别表示适配数据的4位,I 0到I 7表示目标业务数据的7位。 Among them, A 0 to A 4 respectively represent 4 bits of adaptation data, and I 0 to I 7 represent 7 bits of target service data.
又例如,源网络设备所发送的数据单元中目标业务数据要在数据单元对应有4个预设数据位,适配数据要在数据单元中对应有4个预设数据位,且目标业务数据对应的4个预设数据位连续,适配数据对应的4个预设数据位连续,源网络设备在每个数据单元的预设数据位 中写入的数据均为0,目标业务数据对应的预设数据位和适配数据对应的预设数据位之间没有间隔数据位。在这种情况下,适配数据的每一位所对应的算法公式可以如下:For another example, the target service data in the data unit sent by the source network device should correspond to 4 preset data bits in the data unit, and the adaptation data should correspond to 4 preset data bits in the data unit, and the target service data corresponds to The 4 preset data bits corresponding to the adaptation data are continuous, the 4 preset data bits corresponding to the adaptation data are continuous, the source network device writes 0 in the preset data bits of each data unit, and the target service data corresponds to the preset data bits. It is assumed that there is no interval data bit between the data bit and the preset data bit corresponding to the adapted data. In this case, the algorithm formula corresponding to each bit of the adapted data can be as follows:
A 0=I 1+I 2+I 3 A 0 =I 1 +I 2 +I 3
A 1=I 0+I 1 A 1 =I 0 +I 1
A 2=I 0+I 1+I 2 A 2 =I 0 +I 1 +I 2
A 3=I 0+I 1+I 2+I 3 A 3 =I 0 +I 1 +I 2 +I 3
中间节点在获取到目标业务数据后,便可以将其各位的数值代入上述算法公式中,即可得到适配数据各位的数值,从而确定出适配数据。After the intermediate node obtains the target business data, it can substitute the value of each bit into the above algorithm formula to obtain the value of each bit of the adaptation data, thereby determining the adaptation data.
可选的,网络设备在不同数据单元的预设数据位中写入的数据不同,相应的,上述方法二,可以进行如下处理:基于目标业务数据、预先存储的第一数据和第二数据、以及预先存储的适配数据的每一位分别对应的算法公式,确定适配数据的每一位对应的数值,得到适配数据。Optionally, the data written by the network device in the preset data bits of different data units is different. Correspondingly, the second method mentioned above can be processed as follows: based on the target service data, the pre-stored first data and second data, And the algorithm formula corresponding to each bit of the pre-stored adaptation data is determined, and the value corresponding to each bit of the adaptation data is determined to obtain the adaptation data.
其中,适配数据的每一位分别对应的算法公式的输入参数为目标业务数据的至少一位对应的数值、第一数据的至少一位对应的数值、第二数据的至少一位对应的数值。The input parameters of the algorithm formula corresponding to each bit of the adaptation data are the value corresponding to at least one bit of the target business data, the value corresponding to at least one bit of the first data, and the value corresponding to at least one bit of the second data. .
在实施中,中间节点可以预先存储有适配数据的每一位分别对应的算法公式。在一种可能的情况下,源网络设备在不同是数据单元中的预设数据位所写入的数据不同。则算法公式可以有如下形式。In implementation, the intermediate node may pre-store an algorithm formula corresponding to each bit of the adaptation data. In a possible situation, the source network device differs in the data written by the preset data bits in the data unit. The algorithm formula can have the following forms.
例如,源网络设备所发送的数据单元中目标业务数据要在数据单元对应有8个预设数据位,适配数据要在数据单元中对应有4个预设数据位,且目标业务数据对应的8个预设数据位连续,适配数据对应的4个预设数据位连续,这些数据位中数据均为预先确定的,目标业务数据对应的预设数据位和适配数据对应的预设数据位之间间隔有10个数据位。在这种情况下,适配数据的每一位所对应的算法公式可以如下:For example, the target service data in the data unit sent by the source network device should correspond to 8 preset data bits in the data unit, and the adaptation data should correspond to 4 preset data bits in the data unit, and the target service data corresponds to The 8 preset data bits are continuous, and the 4 preset data bits corresponding to the adapted data are continuous. The data in these data bits are all predetermined, the preset data bits corresponding to the target business data and the preset data corresponding to the adapted data There are 10 data bits between the bits. In this case, the algorithm formula corresponding to each bit of the adapted data can be as follows:
A 0=I 0+RI 0+I 1+RI 1+I 2+RI 2+I 3+RI 3+I 7+RI 7+RA 0 A 0 =I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +I 3 +RI 3 +I 7 +RI 7 +RA 0
A 1=I 0+RI 0+I 4+RI 4+I 7+RI 7+RA 1 A 1 =I 0 +RI 0 +I 4 +RI 4 +I 7 +RI 7 +RA 1
A 2=I 0+RI 0+I 1+RI 1+I 5+RI 5+RA 1 A 2 =I 0 +RI 0 +I 1 +RI 1 +I 5 +RI 5 +RA 1
A 3=I 0+RI 0+I 1+RI 1+I 2+RI 2+I 6+RI 6+RA 3 A 3 =I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +I 6 +RI 6 +RA 3
其中,RI 0到RI 7分别表示第一数据的8位,RA 0到RA 4分别表示第二数据的4位。 Among them, RI 0 to RI 7 respectively represent 8 bits of the first data, and RA 0 to RA 4 respectively represent 4 bits of the second data.
又例如,源网络设备所发送的数据单元中目标业务数据要在数据单元对应有4个预设数据位,适配数据要在数据单元中对应有4个预设数据位,且目标业务数据对应的4个预设数据位连续,适配数据对应的4个预设数据位连续,这些数据位中数据均为预先确定的,目标业务数据对应的预设数据位和适配数据对应的预设数据位之间没有间隔数据位。在这种情况下,适配数据的每一位所对应的算法公式可以如下:For another example, the target service data in the data unit sent by the source network device should correspond to 4 preset data bits in the data unit, and the adaptation data should correspond to 4 preset data bits in the data unit, and the target service data corresponds to The 4 preset data bits corresponding to the adapted data are continuous, and the 4 preset data bits corresponding to the adapted data are continuous. The data in these data bits are predetermined. The preset data bits corresponding to the target business data and the preset corresponding to the adapted data There is no space between data bits. In this case, the algorithm formula corresponding to each bit of the adapted data can be as follows:
A 0=I 1+RI 1+I 2+RI 2+I 3+RI 3+RA 0 A 0 =I 1 +RI 1 +I 2 +RI 2 +I 3 +RI 3 +RA 0
A 0=I 0+RI 0+I 1+RI 1+RA 1 A 0 =I 0 +RI 0 +I 1 +RI 1 +RA 1
A 0=I 0+RI 0+I 1+RI 1+I 2+RI 2+RA 2 A 0 =I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +RA 2
A 0=I 0+RI 0+I 1+RI 1+I 2+RI 2+I 3+RI 3+RA 3 A 0 =I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +I 3 +RI 3 +RA 3
中间节点在获取到目标业务数据后,可以将该目标业务数据、第一数据和第二数据代入上述算法公式中,即可得到每一位适配数据的数值,从而得到适配数据。After obtaining the target service data, the intermediate node can substitute the target service data, the first data, and the second data into the above algorithm formula to obtain the value of each bit of adaptation data, thereby obtaining the adaptation data.
方法三Method Three
通过方程求解适配数据的方法,相应的,在步骤402的处理可以如下:确定目标业务数据对应的第一数据多项式和适配数据对应的第二数据多项式;基于第一数据多项式、第二数据多项式和数据单元的校验方法所对应的生成多项式,进行未知数求解,基于求解得到的未知数的值,确定适配数据。另外,该方法三可以作为直接计算适配数据的方法,也可以作为上述方法一和方法二的推导方法。According to the method of solving the adapted data by equations, correspondingly, the processing in step 402 may be as follows: determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adapted data; based on the first data polynomial and the second data The generator polynomial corresponding to the verification method of the polynomial and the data unit is solved for the unknown number, and the adapted data is determined based on the value of the unknown number obtained by the solution. In addition, the third method can be used as a method for directly calculating the adaptation data, or as a derivation method for the above-mentioned methods one and two.
其中,第二数据多项式中与适配数据的任一位相对应的项的系数包括待求解的未知数。Wherein, the coefficient of the term corresponding to any bit of the adaptation data in the second data polynomial includes the unknown number to be solved.
在实施中,在离线时,可以基于如下方法推导出计算适配数据的方程。In implementation, when offline, the equation for calculating the adaptation data can be derived based on the following method.
情况一,目标业务数据对应的数据位序列长度小于等于适配数据对应的数据位长度。Case 1: The length of the data bit sequence corresponding to the target service data is less than or equal to the data bit length corresponding to the adaptation data.
设预设数据位的数据未替换为目标业务数据和适配数据之前,除去预设数据位中数据的待校验数据所对应的多项式为d(x),CRC-N余项所对应的多项式为c(x),CRC-N的生成多项式为g(x)。根据CRC校验的编码原则,可以得出:Before the data of the preset data bits are replaced with target service data and adaptation data, the polynomial corresponding to the data to be verified except the data in the preset data bits is d(x), and the polynomial corresponding to the remainder of CRC-N Is c(x), and the generator polynomial of CRC-N is g(x). According to the coding principle of CRC check, we can get:
((d(x)+RI(x)+RA(x))×x N+c(x))mod g(x) ((d(x)+RI(x)+RA(x))×x N +c(x))mod g(x)
当向将预设数据位的数据替换为目标业务数据和适配数据后,仍希望c(x)不发生改变,则有:After replacing the data of the preset data bits with target service data and adaptation data, but still hope that c(x) does not change, then:
((d(x)+RI(x)+RA(x))×x N+c(x))mod g(x)即, ((d(x)+RI(x)+RA(x))×x N +c(x))mod g(x) That is,
(((d(x)+RI(x)+RA(x))×x N+c(x))+((d(x)+I(x)+A(x)×x N)+c(x)))mod g(x)=0 (((d(x)+RI(x)+RA(x))×x N +c(x))+((d(x)+I(x)+A(x)×x N )+c (x)))mod g(x)=0
进一步展开有:Further expand:
(RI(x)+RA(x)+I(x)+A(x))×x Nmod g(x)=0,令: (RI(x)+RA(x)+I(x)+A(x))×x N mod g(x)=0, let:
Y(x)=RI(x)+RA(x)+I(x)+A(x),由于:Y(x)=RI(x)+RA(x)+I(x)+A(x), because:
x Nmod g(x)≠0,故要求: x N mod g(x)≠0, so it requires:
Y(x)mod g(x)=0,展开Y(x)得:Y(x)mod g(x)=0, expand Y(x) to get:
Y(x)=(A N-1+RA N-1)x 2N-1+(A N-2+RA N-2)x 2N-2+...+(A 0+RA 0)x N Y(x)=(A N-1 +RA N-1 )x 2N-1 +(A N-2 +RA N-2 )x 2N-2 +...+(A 0 +RA 0 )x N
+(I N-1+RI N-1)x N-1+(I N-2+RI N-2)x N-2+...+(I 0+RI 0) +(I N-1 +RI N-1 )x N-1 +(I N-2 +RI N-2 )x N-2 +...+(I 0 +RI 0 )
显然:Obviously:
((I N-1+RI N-1)x N-1+(I N-2+RI N-2)x N-2+...+(I 0+RI 0))mod g(x) ((I N-1 +RI N-1 )x N-1 +(I N-2 +RI N-2 )x N-2 +...+(I 0 +RI 0 ))mod g(x)
=(I N-1+RI N-1)x N-1+(I N-2+RI N-2)x N-2+...+(I 0+RI 0) =(I N-1 +RI N-1 )x N-1 +(I N-2 +RI N-2 )x N-2 +...+(I 0 +RI 0 )
因此,要使Y(x)mod g(x)=0,必须有:Therefore, to make Y(x)mod g(x)=0, there must be:
(I N-1+RI N-1)x N-1+(I N-2+RI N-2)x N-2+...+(I 0+RI 0) (I N-1 +RI N-1 )x N-1 +(I N-2 +RI N-2 )x N-2 +...+(I 0 +RI 0 )
=((A N-1+RA N-1)x 2N-1+(A N-2+RA N-2)x 2N-2+...+(A 0+RA 0)x N)mod g(x)      (1) =((A N-1 +RA N-1 )x 2N-1 +(A N-2 +RA N-2 )x 2N-2 +...+(A 0 +RA 0 )x N )mod g (x) (1)
其中,(I N-1+RI N-1)x N-1+(I N-2+RI N-2)x N-2+...+(I 0+RI 0)为第一数据多项式,(A N-1+RA N-1)x 2N-1+(A N-2+RA N-2)x 2N-2+...+(A 0+RA 0)x N为第二数据多项式,N为适配数据对应的数据位序列的长度。第一数据多项式中的每一项分别对应目标业务数据对应的数据位序列中的每一个数据位,如果数据位不是预设数据位则与其对应的一项系数为0。第二数据多项式中的每一项分别对应适配数据对应的数据位序列中的每一个数据位,如果数据位不是预设数据位则与其对应的一项系数为0。 Among them, (I N-1 +RI N-1 )x N-1 +(I N-2 +RI N-2 )x N-2 +...+(I 0 +RI 0 ) is the first data polynomial ,(A N-1 +RA N-1 )x 2N-1 +(A N-2 +RA N-2 )x 2N-2 +...+(A 0 +RA 0 )x N is the second data Polynomial, N is the length of the data bit sequence corresponding to the adaptation data. Each term in the first data polynomial corresponds to each data bit in the data bit sequence corresponding to the target service data, and if the data bit is not a preset data bit, the coefficient of the corresponding term is 0. Each term in the second data polynomial corresponds to each data bit in the data bit sequence corresponding to the adapted data, and if the data bit is not a preset data bit, the coefficient of the corresponding term is 0.
当源网络设备在预设数据位写入的数据均为0时,方程(1)简化为When the data written by the source network device in the preset data bit is all 0, equation (1) is simplified to
I N-1x N-1+I N-2x N-2+...+I 0≡(A N-1x 2N-1+A N-2x 2N-2+...+A 0x N)mod g(x) I N-1 x N-1 +I N-2 x N-2 +...+I 0 ≡(A N-1 x 2N-1 +A N-2 x 2N-2 +...+A 0 x N )mod g(x)
情况二,目标业务数据对应的数据位序列长度小于等于适配数据对应的数据位长度。方程具体推导过程与上述方法类似,在此不做赘述。Case 2: The length of the data bit sequence corresponding to the target service data is less than or equal to the data bit length corresponding to the adaptation data. The specific derivation process of the equation is similar to the above method, so I won’t repeat it here.
Figure PCTCN2020083147-appb-000003
Figure PCTCN2020083147-appb-000003
其中,(I N-1+RI N-1)x N-1+(I N-2+RI N-2)x N-2+...+(I 0+RI 0)为第一数据多项式的一部分,
Figure PCTCN2020083147-appb-000004
为第一数据多项式的另一部分,
Figure PCTCN2020083147-appb-000005
为第二数据多项式,N s为目标业务数据对应的数据位序列的长度。同样的,第一数据多项式中的每一项分别对应目标业务数据对应的数据位序列中的每一个数据位,如果数据位不是预设数据位则与其对应的一项系数为0。第二数据多项式中的每一项分别对应适配数据对应的数据位序列中的每一个数据位,如果数据位不是预设数据位则与其对应的一项系数为0。
Among them, (I N-1 +RI N-1 )x N-1 +(I N-2 +RI N-2 )x N-2 +...+(I 0 +RI 0 ) is the first data polynomial a part of,
Figure PCTCN2020083147-appb-000004
Is the other part of the first data polynomial,
Figure PCTCN2020083147-appb-000005
Is the second data polynomial, and N s is the length of the data bit sequence corresponding to the target service data. Similarly, each term in the first data polynomial corresponds to each data bit in the data bit sequence corresponding to the target service data. If the data bit is not a preset data bit, the coefficient of the corresponding term is 0. Each term in the second data polynomial corresponds to each data bit in the data bit sequence corresponding to the adapted data, and if the data bit is not a preset data bit, the coefficient of the corresponding term is 0.
当源网络设备在预设数据位写入的数据均为0时,方程(2)简化为When the data written by the source network device in the preset data bit is all 0, equation (2) is simplified to
Figure PCTCN2020083147-appb-000006
Figure PCTCN2020083147-appb-000006
此处需要说明的是,上述推导及所得方程对于RS-FEC校验的数据单元仍然适用,不同之处在于上述各多项式的系数不再对应一个比特,而是对应一个symbol(字符),一个symbol所包含的比特数由实际的RS-FEC确定。It should be noted here that the above derivation and obtained equations are still applicable to the data unit of RS-FEC verification. The difference is that the coefficients of the above polynomials no longer correspond to a bit, but to a symbol (character), a symbol The number of bits included is determined by the actual RS-FEC.
在应用中,可以先基于如下处理确定出第一数据多项式和第二数据多项式,具体的,基于目标业务数据、预设的适配数据的位数、目标业务数据对应的各预设数据位的位置、适配数据对应的各预设数据位的位置、预先存储的第一数据和第二数据,确定目标业务数据对应的第一数据多项式和适配数据对应的第二数据多项式,其中,预设数据位可以为预留数据位。In the application, the first data polynomial and the second data polynomial can be determined based on the following processing. Specifically, based on the target service data, the preset number of bits of the adaptation data, and the preset data bits corresponding to the target service data. The position, the position of each preset data bit corresponding to the adaptation data, the pre-stored first data and the second data, the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data are determined. The data bits can be reserved data bits.
具体的,源网络设备可以预先将第一数据和第二数据通知中间节点,中间节点将其进行存储,或者由技术人员在中间节点中输入第一数据和第二数据的值,由中间节点进行存储。在后续计算过程中,中间节点便可以直接获取到第一数据和第二数据。首先,先判断预设数据位是否足够用来携带目标业务数据和适配数据,即,预设数据位的个数要满足如下条件:N r≥max(N s,N)+N,其中N r为预设数据位的个数,N s为目标业务数据的位数,N为适配数据的位数。如果满足该条件,则可以进行如下步骤。 Specifically, the source network device may notify the intermediate node of the first data and the second data in advance, and the intermediate node stores them, or the technician enters the values of the first data and the second data in the intermediate node, and the intermediate node performs storage. In the subsequent calculation process, the intermediate node can directly obtain the first data and the second data. First, determine whether the preset data bits are sufficient to carry the target service data and adaptation data, that is, the number of preset data bits must meet the following conditions: N r ≥ max(N s , N)+N, where N r is the number of preset data bits, N s is the number of target business data, and N is the number of adaptive data. If this condition is met, the following steps can be performed.
S1,如果适配数据对应的各预设数据位的位置连续,则将适配数据对应的各预设数据位组成的序列,确定为适配数据对应的数据位序列;如果适配数据对应的各预设数据位的位置不连续,则以适配数据对应的各预设数据位中的第一个数据位为开始数据位,确定长度等于适配数据的位数的数据位序列,作为适配数据对应的数据位序列。S1: If the positions of the preset data bits corresponding to the adapted data are continuous, the sequence composed of the preset data bits corresponding to the adapted data is determined as the data bit sequence corresponding to the adapted data; if the adapted data corresponds to The position of each preset data bit is not continuous, then the first data bit in each preset data bit corresponding to the adaptation data is used as the starting data bit, and the data bit sequence whose length is equal to the number of bits of the adaptation data is determined as the adaptation data. Match the data bit sequence corresponding to the data.
S2,如果目标业务数据对应的各预设数据位的位置连续,则将目标业务数据对应的各预设数据位组成的序列,确定为目标业务数据对应的数据位序列;如果目标业务数据对应的各预设数据位的位置不连续,则将目标业务数据对应的各预设数据位、以及目标业务数据对应的各预设数据位之间的其它数据位组成的数据位序列,确定为目标业务数据对应的数据位序列。S2: If the positions of the preset data bits corresponding to the target service data are continuous, the sequence composed of the preset data bits corresponding to the target service data is determined as the data bit sequence corresponding to the target service data; if the target service data corresponds to The position of each preset data bit is not continuous, then the data bit sequence composed of each preset data bit corresponding to the target service data and other data bits between each preset data bit corresponding to the target service data is determined as the target service The data bit sequence corresponding to the data.
S3,如果目标业务数据对应的数据位序列的长度小于预设的适配数据的位数,则确定适配数据的位数与上述长度的差值S,将目标业务数据对应的数据位序列与适配数据对应的数据位序列之间的S个数据位,添加到目标业务数据对应的数据位序列中,以更新目标业务数据对应的数据位序列。S3: If the length of the data bit sequence corresponding to the target service data is less than the preset number of bits of the adaptation data, determine the difference S between the number of bits of the adaptation data and the above length, and compare the data bit sequence corresponding to the target service data with The S data bits between the data bit sequence corresponding to the adaptation data are added to the data bit sequence corresponding to the target service data to update the data bit sequence corresponding to the target service data.
S4,如果目标业务数据对应的数据位序列与适配数据对应的数据位序列之间存在至少一个数据位,则将至少一个数据位添加到目标业务数据对应的数据位序列中,以更新目标业务数据对应的数据位序列。S4: If there is at least one data bit between the data bit sequence corresponding to the target service data and the data bit sequence corresponding to the adaptation data, add at least one data bit to the data bit sequence corresponding to the target service data to update the target service The data bit sequence corresponding to the data.
S5,基于目标业务数据对应的数据位序列、目标业务数据对应的预设数据位中的第一数据和目标业务数据,确定目标业务数据对应的第一数据多项式,基于适配数据对应的数据位序列和适配数据对应的预设数据位中的第二数据,确定适配数据对应的第二数据多项式。S5: Determine the first data polynomial corresponding to the target business data based on the data bit sequence corresponding to the target business data, the first data in the preset data bits corresponding to the target business data, and the target business data, based on the data bits corresponding to the adaptation data The second data in the preset data bits corresponding to the sequence and the adaptation data determines the second data polynomial corresponding to the adaptation data.
对于上述确定出的第一数据多项式和第二数据多项式的系数可以按照如下方法确定:The coefficients of the first data polynomial and the second data polynomial determined above can be determined according to the following method:
基于目标业务数据对应的数据位序列、目标业务数据、以及目标业务数据对应的预设数据位中的第一数据,确定目标业务数据对应的第一数据多项式中各项的系数,基于适配数据对应的数据位序列和适配数据对应的预设数据位中的第二数据,确定适配数据的对应的第二数据多项式中各项的系数,其中,目标业务数据对应的数据位序列中的各数据位按顺序和目标业务数据对应的预设数据位中的第一数据的各位与第一数据多项式中的各项相对应,适配数据对应的数据位序列中的各数据位按顺序与第二数据多项式中的各项相对应,目标业务数据对应的各预设数据位对应的项的系数分别为目标业务数据中各位的数值和目标业务数据对应的预设数据位中的第一数据的各位的数值相加,适配数据对应的各预设数据位对应的项的系数分别为待求解的未知数和适配数据对应的预设数据位中的第二数据的各位的数值相加,除目标业务数据和适配数据分别对应的各预设数据位之外的其它数据位对应的项的系数为0。Based on the data bit sequence corresponding to the target business data, the target business data, and the first data in the preset data bits corresponding to the target business data, the coefficients of each item in the first data polynomial corresponding to the target business data are determined, based on the adaptation data The corresponding data bit sequence and the second data in the preset data bit corresponding to the adaptation data determine the coefficients of each item in the corresponding second data polynomial of the adaptation data. Among them, the data bit sequence corresponding to the target service data Each data bit corresponds to each item in the first data polynomial in the preset data bit corresponding to the target service data in order. Each data bit in the data bit sequence corresponding to the adapted data corresponds to Each item in the second data polynomial corresponds, and the coefficient of each item corresponding to each preset data bit corresponding to the target business data is the value of each bit in the target business data and the first data in the preset data bit corresponding to the target business data. Add the values of each bit of the adaptation data, and the coefficients of the items corresponding to each preset data bit corresponding to the adaptation data are respectively the unknown number to be solved and the value of each bit of the second data in the preset data bit corresponding to the adaptation data. The coefficients of items corresponding to data bits other than the preset data bits respectively corresponding to the target service data and adaptation data are 0.
在得出第一数据多项式和第二数据多项式,及其各项的系数后,便可以根据目标业务数据对应的数据位序列长度和适配数据对应的数据位序列的长度关系,将其带入方程(1)或者方程(2)求解未知数,进一步得到适配数据。After obtaining the first data polynomial and the second data polynomial, and the coefficients of each item, they can be brought into according to the relationship between the length of the data bit sequence corresponding to the target service data and the length of the data bit sequence corresponding to the adaptation data Equation (1) or equation (2) solves the unknown number, and further obtains the adapted data.
由上述步骤可以看出,对于目标业务数据所对应的预设数据位的位置和适配数据所对应的预设数据位的位置可以有多种可能情况,以下列举其中几种进行说明。It can be seen from the above steps that there may be many possible situations for the position of the preset data bit corresponding to the target service data and the position of the preset data bit corresponding to the adaptation data, and several of them are listed below for explanation.
情况一,如图5所示,在该数据单元中目标业务数据对应的8个预设数据位连续,适配数据对应的4个预设数据位连续,适配数据对应的预设数据位与目标业务数据对应的预设数据位之间间隔有10个数据位,目标业务数据对应的数据位序列长度为18,而适配数据对应的数据位序列长度为4,可见目标业务数据对应的数据位序列长度大于适配数据对应的数据位序列长度,则选择上述方程(2)进行求解,可得如下关系式:Case 1, as shown in Figure 5, in the data unit, the 8 preset data bits corresponding to the target service data are continuous, the 4 preset data bits corresponding to the adapted data are continuous, and the preset data bits corresponding to the adapted data are continuous with There are 10 data bits between the preset data bits corresponding to the target service data, the length of the data bit sequence corresponding to the target service data is 18, and the data bit sequence length corresponding to the adaptation data is 4, which shows the data corresponding to the target service data The bit sequence length is greater than the data bit sequence length corresponding to the adapted data, then the above equation (2) is selected to solve the problem, and the following relationship can be obtained:
A 0=I 0+RI 0+I 1+RI 1+I 2+RI 2+I 3+RI 3+I 7+RI 7+RA 0 A 0 =I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +I 3 +RI 3 +I 7 +RI 7 +RA 0
A 1=I 0+RI 0+I 4+RI 4+I 7+RI 7+RA 1 A 1 =I 0 +RI 0 +I 4 +RI 4 +I 7 +RI 7 +RA 1
A 2=I 0+RI 0+I 1+RI 1+I 5+RI 5+RA 1 A 2 =I 0 +RI 0 +I 1 +RI 1 +I 5 +RI 5 +RA 1
A 3=I 0+RI 0+I 1+RI 1+I 2+RI 2+I 6+RI 6+RA 3 A 3 =I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +I 6 +RI 6 +RA 3
然后,将目标业务数据、第一数据和第二数据代入上述关系式中,即可得到适配数据,例如,第一数据和第二数据均为0,目标业务数据为10010111,则可以得出适配数据为1010。Then, substituting the target business data, the first data, and the second data into the above relational expressions, you can get the adapted data. For example, if the first data and the second data are both 0 and the target business data is 10010111, you can get The adaptation data is 1010.
情况二,如图6所示,在该数据单元中目标业务数据对应的4个预设数据位连续,适配数据对应的4个预设数据位连续,适配数据对应的预设数据位与目标业务数据对应的预设数 据位之间没有间隔数据位,目标业务数据对应的数据位序列长度为4,适配数据对应的数据位序列长度为4,可见目标业务数据对应的数据位序列长度等于适配数据对应的数据位序列长度,则选择上述方程(1)进行求解,可得如下关系式:Case two, as shown in Figure 6, in the data unit, the 4 preset data bits corresponding to the target service data are continuous, the 4 preset data bits corresponding to the adapted data are continuous, and the preset data bits corresponding to the adapted data are continuous with There are no data bits between the preset data bits corresponding to the target service data. The length of the data bit sequence corresponding to the target service data is 4, and the length of the data bit sequence corresponding to the adaptation data is 4. It can be seen that the length of the data bit sequence corresponding to the target service data Equal to the length of the data bit sequence corresponding to the adapted data, then the above equation (1) is selected to solve, and the following relationship can be obtained:
A 0=I 1+RI 1+I 2+RI 2+I 3+RI 3+RA 0 A 0 =I 1 +RI 1 +I 2 +RI 2 +I 3 +RI 3 +RA 0
A 0=I 0+RI 0+I 1+RI 1+RA 1 A 0 =I 0 +RI 0 +I 1 +RI 1 +RA 1
A 0=I 0+RI 0+I 1+RI 1+I 2+RI 2+RA 2 A 0 =I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +RA 2
A 0=I 0+RI 0+I 1+RI 1+I 2+RI 2+I 3+RI 3+RA 3 A 0 =I 0 +RI 0 +I 1 +RI 1 +I 2 +RI 2 +I 3 +RI 3 +RA 3
然后,将目标业务数据、第一数据和第二数据代入上述关系式中,即可得到适配数据。例如,第一数据和第二数据均为0,目标业务数据为0011,则可以得出适配数据为0001。Then, the target business data, the first data, and the second data are substituted into the above relational expressions to obtain the adapted data. For example, if the first data and the second data are both 0, and the target service data is 0011, then the adaptation data can be obtained as 0001.
情况三,如图7所示,在该数据单元中目标业务数据对应的4个预设数据位不连续,适配数据对应的4个预设数据位连续,适配数据对应的预设数据位与目标业务数据对应的预设数据位之间没有间隔数据位,且在源网络设备在预设数据位中写入的数据均为0。目标业务数据对应的数据位序列长度为6,适配数据对应的数据位序列长度为4,可见目标业务数据对应的数据位序列长度等于适配数据对应的数据位序列长度,则选择上述方程(2)进行求解,可得如下关系式:Case three, as shown in Figure 7, in the data unit, the 4 preset data bits corresponding to the target service data are not continuous, the 4 preset data bits corresponding to the adaptation data are continuous, and the preset data bits corresponding to the adaptation data are continuous. There are no data bits between the preset data bits corresponding to the target service data, and the data written in the preset data bits in the source network device is all 0. The length of the data bit sequence corresponding to the target service data is 6, and the length of the data bit sequence corresponding to the adaptation data is 4. It can be seen that the length of the data bit sequence corresponding to the target service data is equal to the length of the data bit sequence corresponding to the adaptation data, then the above equation ( 2) To solve the problem, the following relationship can be obtained:
A 0=I 1+I 2+I 3 A 0 =I 1 +I 2 +I 3
A 1=I 0+I 1 A 1 =I 0 +I 1
A 2=I 1+I 2 A 2 =I 1 +I 2
A 3=I 0+I 2+I 3 A 3 =I 0 +I 2 +I 3
然后,将目标业务数据代入,即可得到适配数据。例如,目标业务数据为1111,则可得适配数据为1001。Then, substituting the target business data to obtain the adapted data. For example, if the target business data is 1111, the available adaptation data is 1001.
情况四,如图8所示,在该数据单元中目标业务数据对应的4个预设数据位连续,适配数据对应的4个预设数据位不连续,适配数据对应的预设数据位与目标业务数据对应的预设数据位之间没有间隔数据位,且源网络设备在预设数据位中写入的数据均为0。目标业务数据对应的数据位序列长度为6,适配数据对应的数据位序列长度为4,可见目标业务数据对应的数据位序列长度等于适配数据对应的数据位序列长度,则选择上述方程(2)进行求解,可得如下关系式:Case four, as shown in Figure 8, in the data unit, the 4 preset data bits corresponding to the target service data are continuous, the 4 preset data bits corresponding to the adaptation data are not continuous, and the preset data bits corresponding to the adaptation data are discontinuous. There is no interval data bit between the preset data bits corresponding to the target service data, and the data written in the preset data bit by the source network device is all 0. The length of the data bit sequence corresponding to the target service data is 6, and the length of the data bit sequence corresponding to the adaptation data is 4. It can be seen that the length of the data bit sequence corresponding to the target service data is equal to the length of the data bit sequence corresponding to the adaptation data, then the above equation ( 2) To solve the problem, the following relationship can be obtained:
A 0=I 1+I 3 A 0 =I 1 +I 3
A 1=I 0+I 1+I 2+I 3 A 1 =I 0 +I 1 +I 2 +I 3
A 2=I 2 A 2 =I 2
A 3=I 0+I 1+I 2 A 3 =I 0 +I 1 +I 2
然后,将目标业务数据代入,即可得到适配数据。例如,目标业务数据为1111,则可得适配数据为1100。Then, substituting the target business data to obtain the adapted data. For example, if the target business data is 1111, the available adaptation data is 1100.
以上四种情况中的数据单元的校验方法均为CRC-4校验,本放方法还适用于其他校验方法如CRC-8、RS-FEC等。The verification methods of the data unit in the above four cases are all CRC-4 verification, and this method is also suitable for other verification methods such as CRC-8, RS-FEC, etc.
情况五,校验方法为CRC-8校验,在该数据单元中目标业务数据对应的8个预设数据位连续,适配数据对应的8个预设数据位连续,适配数据对应的预设数据位与目标业务数据对应的预设数据位之间没有间隔数据位,且源网络设备在预设数据位中写入的数据均为0。目标业务数据对应的数据位序列长度为8,适配数据对应的数据位序列长度为8,可见目标业务 数据对应的数据位序列长度等于适配数据对应的数据位序列长度,则选择上述方程(1)进行求解,可得如下关系式:Case 5: The check method is CRC-8 check. In this data unit, the 8 preset data bits corresponding to the target service data are continuous, the 8 preset data bits corresponding to the adapted data are continuous, and the preset data bits corresponding to the adapted data are continuous. It is assumed that there is no interval data bit between the data bit and the preset data bit corresponding to the target service data, and the data written in the preset data bit by the source network device is all 0. The length of the data bit sequence corresponding to the target service data is 8, and the length of the data bit sequence corresponding to the adaptation data is 8. It can be seen that the length of the data bit sequence corresponding to the target service data is equal to the length of the data bit sequence corresponding to the adaptation data, then the above equation ( 1) Solving, the following relationship can be obtained:
A 0=I 3+I 4 A 0 =I 3 +I 4
A 1=I 4+I 5 A 1 =I 4 +I 5
A 2=I 0+I 5+I 6 A 2 =I 0 +I 5 +I 6
A 3=I 1+I 6+I 7 A 3 =I 1 +I 6 +I 7
A 4=I 0+I 2+I 3+I 4+I 7 A 4 =I 0 +I 2 +I 3 +I 4 +I 7
A 5=I 0+I 1+I 5 A 5 =I 0 +I 1 +I 5
A 6=I 1+I 2+I 6 A 6 =I 1 +I 2 +I 6
A 7=I 2+I 3+I 7 A 7 =I 2 +I 3 +I 7
然后,将目标业务数据代入,即可得到适配数据。例如,目标业务数据为011010000,则可得适配数据为11111011。Then, substituting the target business data to obtain the adapted data. For example, if the target business data is 011010000, the available adaptation data is 11111011.
情况六,校验方法为RS-FEC校验,一个数据位中有一个symbol的数据,在该数据单元中目标业务数据对应的16个预设数据位连续,适配数据对应的16个预设数据位连续,适配数据对应的预设数据位与目标业务数据对应的预设数据位之间没有间隔数据位,且源网络设备在预设数据位中写入的数据均为0。目标业务数据对应的数据位序列长度为16,适配数据对应的数据位序列长度为16,可见目标业务数据对应的数据位序列长度等于适配数据对应的数据位序列长度,则选择上述方程(1)进行求解。例如,目标业务数据为118 52 103 31 104 126 187 232 17 56 183 49 100 81 44 79,则适配数据为0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1。Case 6, the verification method is RS-FEC verification, a data bit contains a symbol data, in the data unit the 16 preset data bits corresponding to the target business data are continuous, and the 16 preset data corresponding to the adaptation data The data bits are continuous, there is no interval data bit between the preset data bit corresponding to the adaptation data and the preset data bit corresponding to the target service data, and the data written in the preset data bit by the source network device is all 0. The length of the data bit sequence corresponding to the target service data is 16, and the length of the data bit sequence corresponding to the adaptation data is 16. It can be seen that the length of the data bit sequence corresponding to the target service data is equal to the length of the data bit sequence corresponding to the adaptation data, then the above equation ( 1) Solve. For example, if the target business data is 118 52 103 31 104 126 187 232 17 56 183 49 100 81 44 79, then the adaptation data is 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.
步骤403,获取数据单元。Step 403: Obtain a data unit.
在实施中,该获取数据单元可以为接收数据单元,可以为预先将接收到是数据单元进行存储,此处再获取数据单元进行处理。In implementation, the data acquiring unit may be a receiving data unit, or storing the received data unit in advance, and then acquiring the data unit for processing here.
步骤404,使用目标业务数据和适配数据,替换数据单元的待校验数据中预设数据位的数据。Step 404: Use the target service data and the adaptation data to replace the data of the preset data bits in the data to be verified in the data unit.
在实施中,使用目标业务数据,替换数据单元的待校验数据中N个预设数据位的数据,使用适配数据,替换数据单元的待校验数据中M个预设数据位的数据。In implementation, the target service data is used to replace the data of N preset data bits in the data to be verified in the data unit, and the adaptation data is used to replace the data of M preset data bits in the data to be verified in the data unit.
经过上述方法可以看出,预设数据的位置可以有多种情况,以下列举其中几种进行说明。Through the above method, it can be seen that there are many situations where the preset data can be located, and several of them are listed below for explanation.
情况一,N个预设数据位连续,M个预设数据位连续,N个预设数据位与M个预设数据位相邻。Case 1: N preset data bits are continuous, M preset data bits are continuous, and N preset data bits are adjacent to M preset data bits.
情况二,N个预设数据位连续,M个预设数据位连续,N个预设数据位与M个预设数据位不相邻。Case 2: N preset data bits are continuous, M preset data bits are continuous, and N preset data bits are not adjacent to M preset data bits.
情况三,N个预设数据位不连续,M个预设数据位连续,N个预设数据位与M个预设数据位相邻。Case 3: N preset data bits are not continuous, M preset data bits are continuous, and N preset data bits are adjacent to M preset data bits.
情况四,N个预设数据位不连续,M个预设数据位不连续,N个预设数据位与M个预设数据位相邻。Case 4: The N preset data bits are not continuous, the M preset data bits are not continuous, and the N preset data bits are adjacent to the M preset data bits.
情况五,N个预设数据位不连续,M个预设数据位不连续,N个预设数据位与M个预设数据位不相邻。Case 5: The N preset data bits are not continuous, the M preset data bits are not continuous, and the N preset data bits are not adjacent to the M preset data bits.
步骤405,转发替换处理后的数据单元。Step 405: Forward the replaced data unit.
在实施中,中间节点对数据单元进行替换处理后,将该数据单元转发至下一个节点,由 下一个节点根据实际业务需要,再对该数据单元进行处理。以步骤401中列举的部分路径误码监测的业务为例,In implementation, after the intermediate node performs replacement processing on the data unit, the data unit is forwarded to the next node, and the next node will process the data unit according to actual business needs. Take the part of the path error monitoring service listed in step 401 as an example.
对于步骤401中所提到的可能的实现方式一来说。中间节点C接收到EDB码块前,计算出该EDB码块对应的待校验数据区段的BIP校验值,在接收到该EDB码块后,读取其中的目标业务数据(中间节点B计算出的相应待校验数据区段的BIP校验值),然后,将新计算出的BIP校验值与该目标业务数据按位比较,可以得出二者不同的位数,即为该待校验数据区段从中间节点B传输到中间节点C发生误码的码块数。For the first possible implementation manner mentioned in step 401. Before receiving the EDB code block, the intermediate node C calculates the BIP check value of the data segment to be checked corresponding to the EDB code block, and after receiving the EDB code block, reads the target service data therein (intermediate node B The calculated BIP check value of the corresponding data segment to be checked), and then, the newly calculated BIP check value is compared with the target service data bit by bit, and the two different bits can be obtained, which is the The number of code blocks in which the data segment to be verified is transmitted from the intermediate node B to the intermediate node C with errors.
对于步骤401中提到的可能的实现方式二来说。中间节点C接收到EDB码块前,计算出该EDB码块对应的待校验数据区段的BIP校验值,在接收到该EDB码块后,读取其中携带的BIP校验值,然后将二者按位比较,可以得出二者不同是位数,为该待校验数据区段从源网络设备传输到中间节点C发生误码的码块数,然后,读取目标业务数据(该待校验数据区段从源网络设备传输到中间节点B发生误码的码块数),使用新计算出的该待校验数据区段从源网络设备传输到中间节点C发生误码的码块数减去目标业务数据,即可得到该待校验数据区段从中间节点B传输到中间节点C发生误码的码块数。For the second possible implementation manner mentioned in step 401. Before receiving the EDB code block, the intermediate node C calculates the BIP check value of the data segment to be checked corresponding to the EDB code block. After receiving the EDB code block, it reads the BIP check value carried therein, and then Comparing the two bitwise, it can be concluded that the difference between the two is the number of bits, which is the number of code blocks in which the data segment to be verified is transmitted from the source network device to the intermediate node C, and then the target service data ( The data segment to be verified is transmitted from the source network device to the intermediate node B (the number of code blocks with errors), and the newly calculated data segment to be verified is transmitted from the source network device to the intermediate node C with errors. By subtracting the target service data from the number of code blocks, the number of code blocks in which the data segment to be verified is transmitted from the intermediate node B to the intermediate node C can be obtained.
本申请实施例还提供了一种数据传输的方法,该方法中目标业务数据为数据流中待校验数据区段的BIP校验值,数据单元为扩展定义码块。下面结合图9进行说明。The embodiment of the present application also provides a data transmission method, in which the target service data is the BIP check value of the data section to be checked in the data stream, and the data unit is an extended definition code block. Description will be given below in conjunction with FIG. 9.
步骤901,确定数据流中待校验数据区段的BIP校验值。Step 901: Determine the BIP check value of the data section to be checked in the data stream.
在实施中,如图10所示,源网络设备A要向目的网络设备D发送数据流,在要发送的该数据流中,有基于64B/66B的扩展定义码块,此处可称为EDB码块,每个EDB码块中有BIP校验值,该BIP校验值对应数据流中的一个待校验数据区段。在图10中所示的数据流中处于左侧的EDB码块其携带的BIP校验值对应的待校验数据区段如图中标注所示。中间节点B在接收到该EDB码块之前,会接到的对应的待校验数据区段内的码块,则中间节点B可以在接收到EDB码块之前就对该待校验数据区段内的码块进行BIP校验,得到该待校验数据区段的新的BIP校验值。目标业务数据即为该新的BIP校验值。例如,计算得到的BIP校验值为0b10010111(0b表示二进制,并非数据的一部分),则该目标业务数据为0b10010111。可见,采用该BIP校验值直接作为目标业务数据,无需接收到EDB码块后再进行目标业务数据的计算,可以保证数据流传输的实时性。In the implementation, as shown in Figure 10, the source network device A wants to send a data stream to the destination network device D. In the data stream to be sent, there is an extended definition code block based on 64B/66B, which can be called EDB here. Code block, each EDB code block has a BIP check value, and the BIP check value corresponds to a data section to be checked in the data stream. In the data stream shown in FIG. 10, the EDB code block on the left side carries the BIP check value corresponding to the data section to be checked, as shown in the figure. Before receiving the EDB code block, the intermediate node B will receive the corresponding code block in the data section to be verified, and then the intermediate node B can perform the data section before receiving the EDB code block. The inner code block performs BIP verification to obtain the new BIP verification value of the data section to be verified. The target service data is the new BIP check value. For example, the calculated BIP check value is 0b10010111 (0b represents binary and is not part of the data), then the target service data is 0b10010111. It can be seen that the BIP check value is directly used as the target service data, and there is no need to calculate the target service data after receiving the EDB code block, which can ensure the real-time transmission of the data stream.
步骤902,基于确定出的数据流中待校验数据区段的BIP校验值,确定适配数据。Step 902: Determine adaptation data based on the determined BIP check value of the data segment to be checked in the data stream.
在实施中,中间节点B在接收到该EDB码块之前,已经从源网络设备获知该EDB码块中的预设数据位的位置和源网络设备在预设数据位中写入的数据,具体的,新计算的BIP校验值(目标业务数据)所对应的预设数据位有8个且连续,适配数据对应的预设数据位有4个且连续,目标业务数据对应的预设数据位与适配数据对应的预设数据位之间间隔有10个数据位。那么,可以基于上述表3,来查表得到适配数据。例如,计算得到的新的BIP校验值为10010111,源网络设备在目标业务数据对应的预设数据位中写入的数据为10101010,在适配数据对应的预设数据位中写入的数据为1110,则可查表3得到,适配数据为1111。In implementation, before receiving the EDB code block, the intermediate node B has learned from the source network device the position of the preset data bit in the EDB code block and the data written in the preset data bit by the source network device. Yes, there are 8 preset data bits corresponding to the newly calculated BIP check value (target service data) and are continuous, and 4 preset data bits corresponding to the adapted data are continuous. The preset data corresponding to the target service data There are 10 data bits between the bits and the preset data bits corresponding to the adapted data. Then, you can look up the table to get the adaptation data based on Table 3 above. For example, the calculated new BIP check value is 10010111, the data written by the source network device in the preset data bit corresponding to the target service data is 10101010, and the data written in the preset data bit corresponding to the adaptation data If it is 1110, it can be obtained by referring to Table 3. The adaptation data is 1111.
步骤903,接收扩展定义码块。Step 903: Receive an extended definition code block.
步骤904,使用上述确定出的数据流中待校验数据区段的BIP校验值和适配数据,替换扩展定义码块中的预设数据位中的数据。Step 904: Use the determined BIP check value and adaptation data of the data section to be checked in the data stream to replace the data in the preset data bits in the extended definition code block.
步骤905,将替换处理后的扩展定义码块转发至下一节点。Step 905: Forward the extended definition code block after the replacement process to the next node.
在实施中,中间节点B将该替换处理之后的EDB码块发送给中间节点C。中间节点C接收到EDB码块前,计算出该EDB码块对应的待校验数据区段的BIP校验值,在接收到该EDB码块后,读取其中的目标业务数据(中间节点B计算出的相应待校验数据区段的BIP校验值),然后,将新计算出的BIP校验值与该目标业务数据按位比较,可以得出二者不同的位数,即为该待校验数据区段从中间节点B传输到中间节点C发生误码的码块数。In implementation, the intermediate node B sends the EDB code block after the replacement process to the intermediate node C. Before receiving the EDB code block, the intermediate node C calculates the BIP check value of the data segment to be checked corresponding to the EDB code block, and after receiving the EDB code block, reads the target service data therein (intermediate node B The calculated BIP check value of the corresponding data segment to be checked), and then, the newly calculated BIP check value is compared with the target service data bit by bit, and the two different bits can be obtained, which is the The number of code blocks in which the data segment to be verified is transmitted from the intermediate node B to the intermediate node C with errors.
基于相同的技术构思,本申请实施例还提供了一种数据传输的装置,如图11所示,该装置包括:获取模块1101,替换模块1102和转发模块1103,其中:Based on the same technical concept, an embodiment of the present application also provides a data transmission device. As shown in FIG. 11, the device includes: an acquisition module 1101, a replacement module 1102, and a forwarding module 1103, where:
获取模块1101,用于获取数据单元,其中,所述数据单,包括待校验数据,具体可以实现上述步骤201中的获取功能,以及其他隐含步骤;The obtaining module 1101 is used to obtain the data unit, where the data sheet includes the data to be verified, which can specifically realize the obtaining function in step 201 and other implicit steps;
替换模块1102,用于替换所述数据单元的待校验数据中预设数据位的数据,其中,替换处理前的待校验数据与替换处理后的待校验数据的校验值相同,具体可以实现上述步骤202中的替换功能,以及其他隐含步骤;The replacement module 1102 is used to replace the data of the preset data bits in the data to be verified in the data unit, wherein the data to be verified before the replacement process has the same check value as the data to be verified after the replacement process. The replacement function in step 202 above and other implicit steps can be realized;
转发模块1103,用于转发替换处理后的数据单元,具体可以实现上述步骤203中的替换功能,以及其他隐含步骤。The forwarding module 1103 is used for forwarding the data unit after the replacement processing, and can specifically implement the replacement function in step 203 and other implicit steps.
可选的,所述装置还包括:Optionally, the device further includes:
确定模块,用于确定目标业务数据,基于所述目标业务数据,确定适配数据;The determining module is used for determining target business data, and determining adaptation data based on the target business data;
所述替换模块1102,用于:The replacement module 1102 is used to:
使用所述目标业务数据和所述适配数据,替换所述数据单元的待校验数据中预设数据位的数据。Use the target service data and the adaptation data to replace the data of the preset data bits in the data to be verified of the data unit.
可选的,所述确定模块,用于:Optionally, the determining module is used to:
基于所述目标业务数据、以及预先存储的第一数据和第二数据,确定适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的源网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the target service data and pre-stored first data and second data, the adaptation data is determined, where the first data is that the network device that sends the data unit communicates with the target in the data unit. Data written in a preset data bit corresponding to the service data, and the second data is written by the source network device that sends the data unit in the preset data bit corresponding to the adaptation data in the data unit The data.
可选的,所述替换模块1102,用于:Optionally, the replacement module 1102 is used to:
使用所述目标业务数据,替换所述数据单元的待校验数据中N个预设数据位的数据,使用所述适配数据,替换所述数据单元的待校验数据中M个预设数据位的数据。Use the target service data to replace the data of N preset data bits in the data to be verified of the data unit, and use the adaptation data to replace M preset data in the data to be verified of the data unit Bit data.
在一种可能的实现方式中,所述N个预设数据位连续,所述M个预设数据位连续,所述N个预设数据位与所述M个预设数据位相邻。In a possible implementation manner, the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are adjacent to the M preset data bits.
在一种可能的实现方式中,所述N个预设数据位连续,所述M个预设数据位连续,所述N个预设数据位与所述M个预设数据位不相邻。In a possible implementation manner, the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are not adjacent to the M preset data bits.
在一种可能的实现方式中,所述数据单元为扩展定义码块,所述目标业务数据为比特交错奇偶BIP校验值,所述确定模块,用于:In a possible implementation manner, the data unit is an extended definition code block, the target service data is a bit-interleaved parity BIP check value, and the determining module is configured to:
确定数据流中待校验数据区段的BIP校验值,其中,所述待校验数据区段包括多个码块。Determine the BIP check value of the data segment to be verified in the data stream, where the data segment to be verified includes multiple code blocks.
可选的,所述确定模块,用于:Optionally, the determining module is used to:
基于预先存储的业务数据与适配数据的对应关系,以及所述目标业务数据,确定对应的适配数据。Based on the correspondence between the pre-stored service data and the adaptation data, and the target service data, the corresponding adaptation data is determined.
可选的,所述确定模块,用于:Optionally, the determining module is used to:
基于预先存储的业务数据、业务数据对应的预设数据位中的数据、适配数据对应的预设数据位中的数据与适配数据的对应关系,以及所述目标业务数据、预先存储的第一数据和第二数据,确定对应的适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的源网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the pre-stored service data, the data in the preset data bits corresponding to the service data, the correspondence between the data in the preset data bits corresponding to the adaptation data and the adaptation data, and the target service data, the pre-stored first First data and second data, determine the corresponding adaptation data, wherein the first data is written by the network device sending the data unit in the preset data bits corresponding to the target service data in the data unit The second data is the data written in the preset data bit corresponding to the adaptation data in the data unit by the source network device that sends the data unit.
可选的,所述确定模块,用于:Optionally, the determining module is used to:
获取预先存储的第一数据和第二数据,基于预设的数据调整方式对所述目标业务数据、所述第一数据和所述第二数据进行调整,得到目标业务数据的调整数据、第一数据的调整数据和第二数据的调整数据;Acquire pre-stored first data and second data, adjust the target service data, the first data, and the second data based on a preset data adjustment method, to obtain adjustment data, first data of the target service data The adjustment data of the data and the adjustment data of the second data;
基于预先存储的业务数据的调整数据、业务数据对应的预设数据位中的数据的调整数据、适配数据对应的预设数据位中的数据的调整数据与适配数据的对应关系,以及所述目标业务数据的调整数据、所述第一数据的调整数据、所述第二数据的调整数据,确定对应的适配数据。Based on the adjustment data of the pre-stored service data, the adjustment data of the data in the preset data bits corresponding to the service data, the correspondence between the adjustment data of the data in the preset data bits corresponding to the adaptation data and the adaptation data, and The adjustment data of the target service data, the adjustment data of the first data, and the adjustment data of the second data determine the corresponding adaptation data.
可选的,所述确定模块,用于:Optionally, the determining module is used to:
基于所述目标业务数据、以及预先存储的适配数据的每一位分别对应的算法公式,确定所述适配数据的每一位对应的数值,得到所述适配数据,其中,所述适配数据的每一位分别对应的算法公式的输入参数为所述目标业务数据的至少一位对应的数值。Based on the target service data and the algorithm formula corresponding to each bit of the pre-stored adaptation data, the value corresponding to each bit of the adaptation data is determined to obtain the adaptation data, wherein the adaptation data The input parameter of the algorithm formula corresponding to each bit of the configuration data is a value corresponding to at least one bit of the target service data.
可选的,所述确定模块,用于:Optionally, the determining module is used to:
基于所述目标业务数据、预先存储的第一数据和第二数据、以及预先存储的适配数据的每一位分别对应的算法公式,确定所述适配数据的每一位对应的数值,得到所述适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据,所述适配数据的每一位分别对应的算法公式的输入参数为所述目标业务数据的至少一位对应的数值、所述第一数据的至少一位对应的数值、所述第二数据的至少一位对应的数值。Based on the target service data, the pre-stored first data and second data, and the algorithm formula corresponding to each bit of the pre-stored adaptation data, the value corresponding to each bit of the adaptation data is determined to obtain In the adaptation data, the first data is data written by the network device sending the data unit in a preset data bit corresponding to the target service data in the data unit, and the second Data is data written by the network device sending the data unit in the preset data bits corresponding to the adaptation data in the data unit, and each bit of the adaptation data corresponds to the input of the algorithm formula The parameter is a value corresponding to at least one bit of the target service data, a value corresponding to at least one bit of the first data, and a value corresponding to at least one bit of the second data.
可选的,所述确定模块,用于:Optionally, the determining module is used to:
确定所述目标业务数据对应的第一数据多项式和所述适配数据对应的第二数据多项式,其中,所述第二数据多项式中与所述适配数据的任一位相对应的项的系数包括待求解的未知数;Determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data, wherein the coefficient of the term corresponding to any bit of the adaptation data in the second data polynomial includes Unknowns to be solved;
基于所述第一数据多项式、所述第二数据多项式和所述数据单元的校验装置所对应的生成多项式,进行未知数求解,基于求解得到的未知数的值,确定所述适配数据。Based on the first data polynomial, the second data polynomial, and the generator polynomial corresponding to the verification device of the data unit, the unknown is solved, and the adapted data is determined based on the value of the obtained unknown.
可选的,所述确定模块,用于:Optionally, the determining module is used to:
基于所述目标业务数据、预设的适配数据的位数、所述目标业务数据对应的各预设数据位的位置、所述适配数据对应的各预设数据位的位置、以及预先存储的第一数据和第二数据,确定所述目标业务数据对应的第一数据多项式和所述适配数据对应的第二数据多项式,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the target service data, the number of bits of the preset adaptation data, the position of each preset data bit corresponding to the target service data, the position of each preset data bit corresponding to the adaptation data, and pre-stored Determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data, wherein the first data is the network device that sends the data unit The data written in the preset data bits corresponding to the target service data in the data unit, and the second data is that the network device that sends the data unit matches the adaptation data in the data unit The data written in the corresponding preset data bit.
可选的,所述校验值为循环冗余校验CRC校验值。Optionally, the check value is a cyclic redundancy check CRC check value.
需要说明的是:上述实施例提供的数据单元中替换数据的装置在替换数据时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将网络设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的数据单元中替换数据的装置与数据单元中替换数据的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the device for replacing data in the data unit provided in the above embodiment replaces data, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functions according to needs. Module completion means dividing the internal structure of the network device into different functional modules to complete all or part of the functions described above. In addition, the device for replacing data in a data unit provided in the above-mentioned embodiment and the embodiment of the method for replacing data in a data unit belong to the same concept. For the specific implementation process, please refer to the method embodiment, which will not be repeated here.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现,当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令,在设备上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴光缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是设备能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(如软盘、硬盘和磁带等),也可以是光介质(如数字视盘(Digital Video Disk,DVD)等),或者半导体介质(如固态硬盘等)。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof, and when implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions, and when the computer program instructions are loaded and executed on a device, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center. Transmission to another website site, computer, server or data center via wired (such as coaxial optical cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by the device or a data storage device such as a server or data center integrated with one or more available media. The usable medium may be a magnetic medium (such as a floppy disk, a hard disk, and a magnetic tape), an optical medium (such as a digital video disk (Digital Video Disk, DVD), etc.), or a semiconductor medium (such as a solid-state hard disk, etc.).
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the foregoing embodiments can be implemented by hardware, or by a program instructing relevant hardware to be completed. The program can be stored in a computer-readable storage medium. The storage medium mentioned can be a read-only memory, a magnetic disk or an optical disk, etc.
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only exemplary embodiments of this application and are not intended to limit this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the protection of this application. Within range.

Claims (33)

  1. 一种数据传输的方法,其特征在于,所述方法包括:A method of data transmission, characterized in that the method includes:
    获取数据单元,其中,所述数据单元包括待校验数据;Acquiring a data unit, wherein the data unit includes data to be verified;
    替换所述数据单元的待校验数据中预设数据位的数据,其中,替换处理前的待校验数据与替换处理后的待校验数据的校验值相同;Replacing data with preset data bits in the to-be-verified data of the data unit, wherein the to-be-verified data before the replacement process has the same check value as the to-be-verified data after the replacement process;
    转发替换处理后的数据单元。Forward and replace the processed data unit.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    确定目标业务数据;Determine target business data;
    基于所述目标业务数据,确定适配数据;Determine adaptation data based on the target service data;
    所述替换所述数据单元的待校验数据中预设数据位的数据,包括:The data replacing the preset data bits in the data to be verified of the data unit includes:
    使用所述目标业务数据和所述适配数据,替换所述数据单元的待校验数据中预设数据位的数据。Use the target service data and the adaptation data to replace the data of the preset data bits in the data to be verified of the data unit.
  3. 根据权利要求2所述的方法,其特征在于,所述基于所述目标业务数据,确定适配数据,包括:The method according to claim 2, wherein the determining adaptation data based on the target service data comprises:
    基于所述目标业务数据、以及预先存储的第一数据和第二数据,确定适配数据,其中,所述第一数据是发送所述数据单元的源端在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the target service data and pre-stored first data and second data, the adaptation data is determined, where the first data is that the source of the data unit communicates with the target in the data unit. Data written in a preset data bit corresponding to the service data, and the second data is written by the network device sending the data unit in the preset data bit corresponding to the adaptation data in the data unit data.
  4. 根据权利要求2所述的方法,其特征在于,所述使用所述目标业务数据和所述适配数据,替换所述数据单元的待校验数据中预设数据位的数据,包括:The method according to claim 2, wherein the using the target service data and the adaptation data to replace the data of preset data bits in the data to be verified of the data unit comprises:
    使用所述目标业务数据,替换所述数据单元的待校验数据中N个预设数据位的数据,使用所述适配数据,替换所述数据单元的待校验数据中M个预设数据位的数据。Use the target service data to replace the data of N preset data bits in the data to be verified of the data unit, and use the adaptation data to replace M preset data in the data to be verified of the data unit Bit data.
  5. 根据权利要求4所述的方法,其特征在于,所述N个预设数据位连续,所述M个预设数据位连续,所述N个预设数据位与所述M个预设数据位相邻。The method according to claim 4, wherein the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are identical to the M preset data bits Adjacent.
  6. 根据权利要求4所述的方法,其特征在于,所述N个预设数据位连续,所述M个预设数据位连续,所述N个预设数据位与所述M个预设数据位不相邻。The method according to claim 4, wherein the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are identical to the M preset data bits Not adjacent.
  7. 根据权利要求2所述的方法,其特征在于,所述数据单元为扩展定义码块,所述目标业务数据为比特交错奇偶BIP校验值,所述确定目标业务数据,包括:The method according to claim 2, wherein the data unit is an extended definition code block, the target service data is a bit-interleaved parity BIP check value, and the determining the target service data comprises:
    确定数据流中待校验数据区段的BIP校验值,其中,所述待校验数据区段包括多个码块。Determine the BIP check value of the data segment to be verified in the data stream, where the data segment to be verified includes multiple code blocks.
  8. 根据权利要求2所述的方法,其特征在于,所述基于所述目标业务数据,确定适配数据,包括:The method according to claim 2, wherein the determining adaptation data based on the target service data comprises:
    基于预先存储的业务数据与适配数据的对应关系,以及所述目标业务数据,确定对应的适配数据。Based on the correspondence between the pre-stored service data and the adaptation data, and the target service data, the corresponding adaptation data is determined.
  9. 根据权利要求8所述的方法,其特征在于,所述基于预先存储的业务数据与适配数据的对应关系,以及所述目标业务数据,确定对应的适配数据,包括:The method according to claim 8, wherein the determining the corresponding adaptation data based on the pre-stored correspondence between the service data and the adaptation data, and the target service data, comprises:
    基于预先存储的业务数据、业务数据对应的预设数据位中的数据、适配数据对应的预设数据位中的数据与适配数据的对应关系,以及所述目标业务数据、预先存储的第一数据和第 二数据,确定对应的适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the pre-stored service data, the data in the preset data bits corresponding to the service data, the correspondence between the data in the preset data bits corresponding to the adaptation data and the adaptation data, and the target service data, the pre-stored first First data and second data, determine the corresponding adaptation data, wherein the first data is written by the network device sending the data unit in the preset data bits corresponding to the target service data in the data unit The second data is the data written by the network device that sends the data unit in a preset data bit corresponding to the adaptation data in the data unit.
  10. 根据权利要求9所述的方法,其特征在于,所述基于预先存储的业务数据、业务数据对应的预设数据位中的数据、适配数据对应的预设数据位中的数据与适配数据的对应关系,以及所述目标业务数据、预先存储的第一数据和第二数据,确定对应的适配数据,包括:The method according to claim 9, wherein the data and adaptation data are based on pre-stored service data, data in preset data bits corresponding to the service data, and data in preset data bits corresponding to the adaptation data. The corresponding relationship between, and the target service data, pre-stored first data and second data, and determining the corresponding adaptation data include:
    获取预先存储的第一数据和第二数据,基于预设的数据调整方式对所述目标业务数据、所述第一数据和所述第二数据进行调整,得到目标业务数据的调整数据、第一数据的调整数据和第二数据的调整数据;Acquire pre-stored first data and second data, adjust the target service data, the first data, and the second data based on a preset data adjustment method, to obtain adjustment data, first data of the target service data The adjustment data of the data and the adjustment data of the second data;
    基于预先存储的业务数据的调整数据、业务数据对应的预设数据位中的数据的调整数据、适配数据对应的预设数据位中的数据的调整数据与适配数据的对应关系,以及所述目标业务数据的调整数据、所述第一数据的调整数据、所述第二数据的调整数据,确定对应的适配数据。Based on the adjustment data of the pre-stored service data, the adjustment data of the data in the preset data bits corresponding to the service data, the correspondence between the adjustment data of the data in the preset data bits corresponding to the adaptation data and the adaptation data, and The adjustment data of the target service data, the adjustment data of the first data, and the adjustment data of the second data determine the corresponding adaptation data.
  11. 根据权利要求2所述的方法,其特征在于,所述基于所述目标业务数据,确定适配数据,包括:The method according to claim 2, wherein the determining adaptation data based on the target service data comprises:
    基于所述目标业务数据、以及预先存储的适配数据的每一位分别对应的算法公式,确定所述适配数据的每一位对应的数值,得到所述适配数据,其中,所述适配数据的每一位分别对应的算法公式的输入参数为所述目标业务数据的至少一位对应的数值。Based on the target service data and the algorithm formula corresponding to each bit of the pre-stored adaptation data, the value corresponding to each bit of the adaptation data is determined to obtain the adaptation data, wherein the adaptation data The input parameter of the algorithm formula corresponding to each bit of the configuration data is a value corresponding to at least one bit of the target service data.
  12. 根据权利要求11所述的方法,其特征在于,所述基于所述目标业务数据、以及预先存储的适配数据的每一位分别对应的算法公式,确定所述适配数据的每一位对应的数值,得到所述适配数据,其中,所述适配数据的每一位分别对应的算法公式的输入参数为所述目标业务数据的至少一位对应的数值,包括:The method according to claim 11, characterized in that, based on the algorithm formula corresponding to each bit of the target service data and the pre-stored adaptation data, it is determined that each bit of the adaptation data corresponds to To obtain the adaptation data, wherein the input parameter of the algorithm formula corresponding to each bit of the adaptation data is the value corresponding to at least one bit of the target service data, including:
    基于所述目标业务数据、预先存储的第一数据和第二数据、以及预先存储的适配数据的每一位分别对应的算法公式,确定所述适配数据的每一位对应的数值,得到所述适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据,所述适配数据的每一位分别对应的算法公式的输入参数为所述目标业务数据的至少一位对应的数值、所述第一数据的至少一位对应的数值、所述第二数据的至少一位对应的数值。Based on the target service data, the pre-stored first data and second data, and the algorithm formula corresponding to each bit of the pre-stored adaptation data, the value corresponding to each bit of the adaptation data is determined to obtain In the adaptation data, the first data is data written by the network device sending the data unit in a preset data bit corresponding to the target service data in the data unit, and the second Data is data written by the network device sending the data unit in the preset data bits corresponding to the adaptation data in the data unit, and each bit of the adaptation data corresponds to the input of the algorithm formula The parameter is a value corresponding to at least one bit of the target service data, a value corresponding to at least one bit of the first data, and a value corresponding to at least one bit of the second data.
  13. 根据权利要求2所述的方法,其特征在于,所述基于所述目标业务数据,确定适配数据,包括:The method according to claim 2, wherein the determining adaptation data based on the target service data comprises:
    确定所述目标业务数据对应的第一数据多项式和所述适配数据对应的第二数据多项式,其中,所述第二数据多项式中与所述适配数据的任一位相对应的项的系数包括待求解的未知数;Determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data, wherein the coefficient of the term corresponding to any bit of the adaptation data in the second data polynomial includes Unknowns to be solved;
    基于所述第一数据多项式、所述第二数据多项式和所述数据单元的校验方法所对应的生成多项式,进行未知数求解,基于求解得到的未知数的值,确定所述适配数据。Based on the first data polynomial, the second data polynomial, and the generator polynomial corresponding to the data unit verification method, the unknown is solved, and the adapted data is determined based on the value of the obtained unknown.
  14. 根据权利要求13所述的方法,其特征在于,所述确定所述目标业务数据对应的第一数据多项式和所述适配数据对应的第二数据多项式,包括:The method according to claim 13, wherein the determining the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data comprises:
    基于所述目标业务数据、预设的适配数据的位数、所述目标业务数据对应的各预设数据 位的位置、所述适配数据对应的各预设数据位的位置、以及预先存储的第一数据和第二数据,确定所述目标业务数据对应的第一数据多项式和所述适配数据对应的第二数据多项式,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the target service data, the number of bits of the preset adaptation data, the position of each preset data bit corresponding to the target service data, the position of each preset data bit corresponding to the adaptation data, and pre-stored Determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data, wherein the first data is the network device that sends the data unit The data written in the preset data bits corresponding to the target service data in the data unit, and the second data is that the network device that sends the data unit matches the adaptation data in the data unit The data written in the corresponding preset data bit.
  15. 根据权利要求1-14中任一项所述的方法,其特征在于,所述校验值为循环冗余校验CRC校验值。The method according to any one of claims 1-14, wherein the check value is a cyclic redundancy check (CRC) check value.
  16. 一种数据传输的装置,其特征在于,所述装置包括:A data transmission device, characterized in that the device includes:
    获取模块,用于获取数据单元,其中,所述数据单元包括待校验数据;An acquisition module for acquiring a data unit, wherein the data unit includes data to be verified;
    替换模块,用于替换所述数据单元的待校验数据中预设数据位的数据,其中,替换处理前的待校验数据与替换处理后的待校验数据的校验值相同;The replacement module is used to replace the data of the preset data bits in the data to be verified in the data unit, wherein the verification value of the data to be verified before the replacement processing is the same as the data to be verified after the replacement processing;
    转发模块,用于转发替换处理后的数据单元。The forwarding module is used to forward the data unit after replacement processing.
  17. 根据权利要求16所述的装置,其特征在于,所述装置还包括:The device according to claim 16, wherein the device further comprises:
    确定模块,用于确定目标业务数据,基于所述目标业务数据,确定适配数据;The determining module is used for determining target business data, and determining adaptation data based on the target business data;
    所述替换模块,用于:The replacement module is used for:
    使用所述目标业务数据和所述适配数据,替换所述数据单元的待校验数据中预设数据位的数据。Use the target service data and the adaptation data to replace the data of the preset data bits in the data to be verified of the data unit.
  18. 根据权利要求17所述的装置,其特征在于,所述确定模块,用于:The device according to claim 17, wherein the determining module is configured to:
    基于所述目标业务数据、以及预先存储的第一数据和第二数据,确定适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the target service data and pre-stored first data and second data, the adaptation data is determined, where the first data is that the network device that sends the data unit communicates with the target in the data unit. Data written in a preset data bit corresponding to the service data, and the second data is written by the network device sending the data unit in the preset data bit corresponding to the adaptation data in the data unit data.
  19. 根据权利要求17所述的装置,其特征在于,所述替换模块,用于:The device according to claim 17, wherein the replacement module is configured to:
    使用所述目标业务数据,替换所述数据单元的待校验数据中N个预设数据位的数据,使用所述适配数据,替换所述数据单元的待校验数据中M个预设数据位的数据。Use the target service data to replace the data of N preset data bits in the data to be verified of the data unit, and use the adaptation data to replace M preset data in the data to be verified of the data unit Bit data.
  20. 根据权利要求19所述的装置,其特征在于,所述N个预设数据位连续,所述M个预设数据位连续,所述N个预设数据位与所述M个预设数据位相邻。The device according to claim 19, wherein the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are identical to the M preset data bits. Adjacent.
  21. 根据权利要求19所述的装置,其特征在于,所述N个预设数据位连续,所述M个预设数据位连续,所述N个预设数据位与所述M个预设数据位不相邻。The device according to claim 19, wherein the N preset data bits are continuous, the M preset data bits are continuous, and the N preset data bits are identical to the M preset data bits. Not adjacent.
  22. 根据权利要求17所述的装置,其特征在于,所述数据单元为扩展定义码块,所述目标业务数据为比特交错奇偶BIP校验值,所述确定模块,用于:The apparatus according to claim 17, wherein the data unit is an extended definition code block, the target service data is a bit-interleaved parity BIP check value, and the determining module is configured to:
    确定数据流中待校验数据区段的BIP校验值,其中,所述待校验数据区段包括多个码块。Determine the BIP check value of the data segment to be verified in the data stream, where the data segment to be verified includes multiple code blocks.
  23. 根据权利要求17所述的装置,其特征在于,所述确定模块,用于:The device according to claim 17, wherein the determining module is configured to:
    基于预先存储的业务数据与适配数据的对应关系,以及所述目标业务数据,确定对应的适配数据。Based on the correspondence between the pre-stored service data and the adaptation data, and the target service data, the corresponding adaptation data is determined.
  24. 根据权利要求23所述的装置,其特征在于,所述确定模块,用于:The device according to claim 23, wherein the determining module is configured to:
    基于预先存储的业务数据、业务数据对应的预设数据位中的数据、适配数据对应的预设数据位中的数据与适配数据的对应关系,以及所述目标业务数据、预先存储的第一数据和第 二数据,确定对应的适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the pre-stored service data, the data in the preset data bits corresponding to the service data, the correspondence between the data in the preset data bits corresponding to the adaptation data and the adaptation data, and the target service data, the pre-stored first First data and second data, determine the corresponding adaptation data, wherein the first data is written by the network device sending the data unit in the preset data bits corresponding to the target service data in the data unit The second data is the data written by the network device that sends the data unit in a preset data bit corresponding to the adaptation data in the data unit.
  25. 根据权利要求24所述的装置,其特征在于,所述确定模块,用于:The device according to claim 24, wherein the determining module is configured to:
    获取预先存储的第一数据和第二数据,基于预设的数据调整方式对所述目标业务数据、所述第一数据和所述第二数据进行调整,得到目标业务数据的调整数据、第一数据的调整数据和第二数据的调整数据;Acquire pre-stored first data and second data, adjust the target service data, the first data, and the second data based on a preset data adjustment method, to obtain adjustment data, first data of the target service data The adjustment data of the data and the adjustment data of the second data;
    基于预先存储的业务数据的调整数据、业务数据对应的预设数据位中的数据的调整数据、适配数据对应的预设数据位中的数据的调整数据与适配数据的对应关系,以及所述目标业务数据的调整数据、所述第一数据的调整数据、所述第二数据的调整数据,确定对应的适配数据。Based on the adjustment data of the pre-stored service data, the adjustment data of the data in the preset data bits corresponding to the service data, the correspondence between the adjustment data of the data in the preset data bits corresponding to the adaptation data and the adaptation data, and The adjustment data of the target service data, the adjustment data of the first data, and the adjustment data of the second data determine the corresponding adaptation data.
  26. 根据权利要求17所述的装置,其特征在于,所述确定模块,用于:The device according to claim 17, wherein the determining module is configured to:
    基于所述目标业务数据、以及预先存储的适配数据的每一位分别对应的算法公式,确定所述适配数据的每一位对应的数值,得到所述适配数据,其中,所述适配数据的每一位分别对应的算法公式的输入参数为所述目标业务数据的至少一位对应的数值。Based on the target service data and the algorithm formula corresponding to each bit of the pre-stored adaptation data, the value corresponding to each bit of the adaptation data is determined to obtain the adaptation data, wherein the adaptation data The input parameter of the algorithm formula corresponding to each bit of the configuration data is a value corresponding to at least one bit of the target service data.
  27. 根据权利要求26所述的装置,其特征在于,所述确定模块,用于:The device according to claim 26, wherein the determining module is configured to:
    基于所述目标业务数据、预先存储的第一数据和第二数据、以及预先存储的适配数据的每一位分别对应的算法公式,确定所述适配数据的每一位对应的数值,得到所述适配数据,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据,所述适配数据的每一位分别对应的算法公式的输入参数为所述目标业务数据的至少一位对应的数值、所述第一数据的至少一位对应的数值、所述第二数据的至少一位对应的数值。Based on the target service data, the pre-stored first data and second data, and the algorithm formula corresponding to each bit of the pre-stored adaptation data, the value corresponding to each bit of the adaptation data is determined to obtain In the adaptation data, the first data is data written by the network device sending the data unit in a preset data bit corresponding to the target service data in the data unit, and the second Data is data written by the network device sending the data unit in the preset data bits corresponding to the adaptation data in the data unit, and each bit of the adaptation data corresponds to the input of the algorithm formula The parameter is a value corresponding to at least one bit of the target service data, a value corresponding to at least one bit of the first data, and a value corresponding to at least one bit of the second data.
  28. 根据权利要求17所述的装置,其特征在于,所述确定模块,用于:The device according to claim 17, wherein the determining module is configured to:
    确定所述目标业务数据对应的第一数据多项式和所述适配数据对应的第二数据多项式,其中,所述第二数据多项式中与所述适配数据的任一位相对应的项的系数包括待求解的未知数;Determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data, wherein the coefficient of the term corresponding to any bit of the adaptation data in the second data polynomial includes Unknowns to be solved;
    基于所述第一数据多项式、所述第二数据多项式和所述数据单元的校验装置所对应的生成多项式,进行未知数求解,基于求解得到的未知数的值,确定所述适配数据。Based on the first data polynomial, the second data polynomial, and the generator polynomial corresponding to the verification device of the data unit, the unknown is solved, and the adapted data is determined based on the value of the obtained unknown.
  29. 根据权利要求28所述的装置,其特征在于,所述确定模块,用于:The device according to claim 28, wherein the determining module is configured to:
    基于所述目标业务数据、预设的适配数据的位数、所述目标业务数据对应的各预设数据位的位置、所述适配数据对应的各预设数据位的位置、以及预先存储的第一数据和第二数据,确定所述目标业务数据对应的第一数据多项式和所述适配数据对应的第二数据多项式,其中,所述第一数据是发送所述数据单元的网络设备在所述数据单元中与所述目标业务数据对应的预设数据位中写入的数据,所述第二数据是发送所述数据单元的网络设备在所述数据单元中与所述适配数据对应的预设数据位中写入的数据。Based on the target service data, the number of bits of the preset adaptation data, the position of each preset data bit corresponding to the target service data, the position of each preset data bit corresponding to the adaptation data, and pre-stored Determine the first data polynomial corresponding to the target service data and the second data polynomial corresponding to the adaptation data, wherein the first data is the network device that sends the data unit The data written in the preset data bits corresponding to the target service data in the data unit, and the second data is that the network device that sends the data unit matches the adaptation data in the data unit The data written in the corresponding preset data bit.
  30. 根据权利要求1-29中任一项所述的装置,其特征在于,所述校验值为循环冗余校验CRC校验值。The device according to any one of claims 1-29, wherein the check value is a cyclic redundancy check (CRC) check value.
  31. 一种数据传输的设备,其特征在于,所述设备包括处理器和存储器;A data transmission device, characterized in that the device includes a processor and a memory;
    所述存储器存储有一个或多个程序,所述一个或多个程序被配置成由所述处理器执行,用于实现如权利要求1-15中任一项所述的方法的指令。The memory stores one or more programs, and the one or more programs are configured to be executed by the processor for implementing instructions of the method according to any one of claims 1-15.
  32. 一种计算机可读存储介质,其特征在于,包括指令,当所述计算机可读存储介质在设备上运行时,使得所述设备执行所述权利要求1-15中任一权利要求所述的方法。A computer-readable storage medium, characterized by comprising instructions, which when the computer-readable storage medium runs on a device, causes the device to execute the method according to any one of claims 1-15 .
  33. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在设备上运行时,使得所述设备执行所述权利要求1-15中任一权利要求所述的方法。A computer program product containing instructions, characterized in that, when the computer program product runs on a device, the device is caused to execute the method according to any one of the claims 1-15.
PCT/CN2020/083147 2019-04-04 2020-04-03 Method and apparatus for data transmission WO2020200304A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910271706.4 2019-04-04
CN201910271706.4A CN111786743A (en) 2019-04-04 2019-04-04 Data transmission method and device

Publications (1)

Publication Number Publication Date
WO2020200304A1 true WO2020200304A1 (en) 2020-10-08

Family

ID=72664552

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/083147 WO2020200304A1 (en) 2019-04-04 2020-04-03 Method and apparatus for data transmission

Country Status (2)

Country Link
CN (1) CN111786743A (en)
WO (1) WO2020200304A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848055A (en) * 2009-03-23 2010-09-29 华为技术有限公司 Method and device for correcting data
US20110208996A1 (en) * 2010-02-22 2011-08-25 International Business Machines Corporation Read-other protocol for maintaining parity coherency in a write-back distributed redundancy data storage system
CN107710627A (en) * 2015-07-02 2018-02-16 索尼公司 Communication equipment, communication system, communication means and program
CN108270502A (en) * 2017-01-03 2018-07-10 中兴通讯股份有限公司 A kind of transmission time stamp processing method and processing device based on NTP
CN108292978A (en) * 2015-12-01 2018-07-17 瑞典爱立信有限公司 Predictability confirms feedback mechanism

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848055A (en) * 2009-03-23 2010-09-29 华为技术有限公司 Method and device for correcting data
US20110208996A1 (en) * 2010-02-22 2011-08-25 International Business Machines Corporation Read-other protocol for maintaining parity coherency in a write-back distributed redundancy data storage system
CN107710627A (en) * 2015-07-02 2018-02-16 索尼公司 Communication equipment, communication system, communication means and program
CN108292978A (en) * 2015-12-01 2018-07-17 瑞典爱立信有限公司 Predictability confirms feedback mechanism
CN108270502A (en) * 2017-01-03 2018-07-10 中兴通讯股份有限公司 A kind of transmission time stamp processing method and processing device based on NTP

Also Published As

Publication number Publication date
CN111786743A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
US10985942B2 (en) Multicast traffic steering using tree identity in bit indexed explicit replication (BIER)
US9578141B2 (en) Packet flow modification
US8418045B2 (en) Network intermediate device and method thereof
US10103981B2 (en) BIER forwarding validation
US10652024B2 (en) Digital signature systems and methods for network path trace
EP3389310B1 (en) Method for establishing routing table, electronic device and network
US20160254991A1 (en) Failure protection for traffic-engineered bit indexed explicit replication
US8259724B2 (en) Data transmitting apparatus and data retransmitting method
WO2018184487A1 (en) Bier message forwarding method and device
US9774543B2 (en) MAC address synchronization in a fabric switch
CN112448888A (en) Method, equipment and system for forwarding message in SR network
EP3057256B1 (en) Method for processing stream media message, wifi chip and mobile terminal
US20130159510A1 (en) Event Correlation Between Protocol Layers in a Network Device
WO2020200304A1 (en) Method and apparatus for data transmission
US7764692B1 (en) Bypass of routing protocol filtering in a multi-subnet network
US8085777B2 (en) Packet-processing apparatus and method
US11368246B2 (en) Method and device for transmitting or receiving broadcast service in multimedia service system
US20220150167A1 (en) Bier packet processing method, network device, and system
US11863303B2 (en) Link bit error-based processing method and apparatus
EP3806386B1 (en) Multicast fast switching method, device, apparatus, and storage medium
WO2023109616A1 (en) Data transmission method and apparatus, and communication system
US20220052783A1 (en) Packet reconstruction and error correction for network endpoints
US9787434B2 (en) Cyclic redundancy check device and method
US20220294546A1 (en) Using signal quality parameters to adjust data propagation metrics
US20240089202A1 (en) System and method for forwarding network traffic

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20783438

Country of ref document: EP

Kind code of ref document: A1