WO2023109616A1 - 数据传输的方法、装置和通信系统 - Google Patents

数据传输的方法、装置和通信系统 Download PDF

Info

Publication number
WO2023109616A1
WO2023109616A1 PCT/CN2022/137337 CN2022137337W WO2023109616A1 WO 2023109616 A1 WO2023109616 A1 WO 2023109616A1 CN 2022137337 W CN2022137337 W CN 2022137337W WO 2023109616 A1 WO2023109616 A1 WO 2023109616A1
Authority
WO
WIPO (PCT)
Prior art keywords
data block
verification
payload
payload data
data
Prior art date
Application number
PCT/CN2022/137337
Other languages
English (en)
French (fr)
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 WO2023109616A1 publication Critical patent/WO2023109616A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery

Definitions

  • the present application relates to the technical field of communication, and in particular to a data transmission method, device and communication system.
  • each verification data block is calculated from at least one payload data block in the N payload data blocks, and at least one payload data block of the verification data block is randomly selected, and only the guaranteed Yes, each payload data block participates in the generation of at least one check data block.
  • the sending end also needs to generate the corresponding relationship between the payload data block and the check data block. The sending end sends the N payload data blocks, the M verification data blocks, and the correspondence between the payload data blocks and the verification data blocks to the receiving end.
  • the receiving end verifies that there is a bit error in a certain payload data block, it can determine the corresponding verification data block of the payload data block according to the corresponding relationship between the payload data block and the verification data block, and then pass the verification data block to recover the payload data block.
  • the sending end needs to send the corresponding relationship between the payload data block and the check data block to the receiving end, therefore, the transmission of the corresponding relationship also needs to occupy the effective bandwidth of the link, which affects the transmission of the payload data block efficiency.
  • the embodiments of the present application provide a data transmission method, device and communication system, which can solve the problem in the related art that the effective bandwidth of the link is wasted due to the correspondence between the transmission payload data block and the check data block. Described technical scheme is as follows:
  • a data transmission method includes: the sending end obtains the first payload data block, and the payload data according to the first payload data block, and the locally pre-stored payload data block and checksum The corresponding relationship of the data blocks is to generate the first verification data block corresponding to the first payload data block. Send the first payload data block and the first verification data block to the receiving end.
  • the correspondence between the payload data block and the check data block is pre-agreed and stored at the sending end and the receiving end, that is, the payload data pre-stored at the sending end and the receiving end.
  • the corresponding relationship between the block and the parity data block is the same. In this way, when the sender generates the verification data block, it no longer randomly selects the payload data block for generation, but determines that each payload data block needs to participate in the Generated checksum data block.
  • the sending end does not need to send the verification data block and payload data to the receiving end after generating each verification data block
  • the corresponding relationship between the blocks can save the effective bandwidth of the link.
  • the first payload data block corresponds to one or more first check data blocks.
  • one payload data block may participate in the generation of multiple verification data blocks, and one verification data block may be generated based on multiple payload data blocks.
  • the correspondence between the locally pre-stored payload data blocks and the check data blocks may be the correspondence between the sending order of the payload data blocks and the sending order of the check data blocks.
  • the sending end may first determine the first sending order of the first payload data block in the current payload data sending cycle. And according to the corresponding relationship between the sending order of the payload data blocks and the sending order of the verification data blocks stored in local, determine the sending order of the verification data blocks corresponding to the first sending order as the second sending order. Taking the first verification data block whose sending order is the second sending order in the current verification data block sending cycle as the verification data block corresponding to the first payload data block, wherein each payload data sending cycle corresponds to A check data sending cycle.
  • the sender may preset a payload data sending cycle and a check data sending cycle. Every N consecutively sent payload data blocks is regarded as a payload data sending cycle. Each payload data sending cycle corresponds to a verification data sending cycle, and every M consecutively sent verification data blocks are taken as a verification data sending cycle. The M check data blocks in each check data cycle are generated from the N payload data blocks in the corresponding payload data sending cycle.
  • the processing of determining the first verification data block corresponding to the first payload data block can be as follows:
  • the check data identifier corresponding to the first payload data identifier is used as the verification data block corresponding to the first payload data block.
  • a data transmission method includes: a receiving end receives a payload data block sent by a transmitting end, verifies the payload data block, and obtains a verification result of the payload data block. A first parity data block is received. If the number of verification-failure data blocks in the payload data block corresponding to the first verification data block is 1, perform data recovery on the verification-failure data block, wherein the number is based on the verification result of each payload data block And the corresponding relationship between the locally pre-stored payload data block and the check data block is determined.
  • the receiving end and the sending end store the same correspondence between the payload data block and the verification data block, so that after receiving the verification data block, the receiving end can
  • the corresponding payload data block can be determined according to the relationship, or the corresponding check data can be determined according to the stored corresponding relationship after receiving the payload data block.
  • the number of its corresponding verification failure data blocks can be recorded.
  • the verification result of the payload data block is a verification failure
  • first according to the correspondence between the locally pre-stored payload data block and the verification data block, determine that the payload data block is the first verification data block corresponding The data block failed to verify. Then, add 1 to the number of data blocks that fail verification corresponding to the recorded first verification data block.
  • the number of data blocks that fail to be verified corresponding to the recorded first data blocks that fail to verify is decremented by 1.
  • the number of verification-failure data blocks corresponding to the recorded second verification data block is reduced by 1. If the number of verification-failure data blocks corresponding to the second verification data block is reduced by 1 to 1, perform data recovery on the verification-failure data blocks corresponding to the second verification data block.
  • one payload data block may participate in the generation of multiple verification data blocks, then, after performing data recovery on the verification failed data block, if the verification failed data block is still Corresponding to other verification data blocks, it can be judged whether the current number of verification failure data blocks of other corresponding verification data blocks is 1, if the current number of verification failure data blocks of other corresponding verification data blocks is 1 , then data recovery can be performed on the data blocks that fail to be verified in other corresponding verification data blocks.
  • the corresponding relationship between the payload data block and the verification data block may be the corresponding relationship between the receiving order of the payload data block and the receiving order of the verification data block, and correspondingly, determine the payload data block
  • the processing of the verification-failing data block corresponding to the first verification data block may be as follows: determine the first receiving order of the payload data block in the current payload data sending cycle. According to the corresponding relationship between the receiving order of the locally pre-stored payload data blocks and the receiving order of the verification data blocks, determine the second receiving order of the verification data blocks corresponding to the first receiving order, and use the payload data blocks as the current verification data blocks. In the verification data receiving cycle, the verification failure data block corresponding to the first verification data block whose receiving order is the second receiving order.
  • the sending end sends the payload data block according to the preset payload data sending cycle, and sends the verification data block according to the preset verification data sending cycle, and one payload data sending cycle Corresponding to a check data sending cycle.
  • the first counter can be used to record the receiving sequence of the received payload data blocks in the current payload data sending cycle, and similarly, the second counter can also be used to record the received check data blocks in the current Check the reception sequence in the data transmission cycle.
  • the first counter When the count value of the first counter reaches the number of payload data blocks corresponding to one payload data sending cycle, the first counter is cleared to indicate the end of one payload data sending cycle and the next payload data sending cycle begins. Similarly, when the count value of the second counter reaches the number of verification data blocks corresponding to a verification data sending cycle, the second counter is cleared to indicate that a verification data sending cycle ends and the next verification data sending cycle begins .
  • the corresponding relationship between the payload data block and the check data block may be the corresponding relationship between the payload data identifier of the payload data block and the check data identifier of the check data block, and correspondingly, determine
  • the processing of the payload data block being the verification-failure data block corresponding to the first verification data block is as follows: determine the first payload data identifier carried in the payload data block.
  • the payload data identifier of the payload data block stored in local and the verification data identifier of the verification data block determine the first verification data identifier corresponding to the first payload data identifier, and use the payload data block as The verification-failing data block corresponding to the first verification data block corresponding to the first payload data identifier.
  • the processing can be as follows: in the case of successful verification of the payload data block, according to the correspondence between the locally pre-stored payload data block and the verification data block, the payload data block is used as the first verification data The verification success data corresponding to the block. According to the payload data block, the payload XOR result of the verified first data block corresponding to the recorded first verified data block is updated.
  • the data recovery process for the verification-failure data block may be as follows: according to the payload difference between the first verification data block and the recorded first verification data block corresponding to the verification success data block Or as a result, perform data recovery on the data block that fails to be verified corresponding to the first verification data block.
  • the verification success data block corresponding to the first verification data block can be determined according to the correspondence between the locally pre-stored payload data block and the verification data block. And calculate the payload XOR result of the successfully verified data block corresponding to the first verified data block. According to the XOR result of the payload, data recovery is performed on the data block corresponding to the first verification data block that fails to be verified.
  • the verification of the payload data block can be processed as follows: receive the payload data block sent by the sending end, and check the payload data block according to the verification data carried in the payload data block. The carried payload data is verified.
  • a communication system in a third aspect, includes a sending end and a receiving end, and the sending end and the receiving end are pre-stored with the same correspondence between payload data blocks and check data blocks. ,in,
  • the sending end is configured to obtain the first payload data block, and generate the first payload data block according to the payload data of the first payload data block and the corresponding relationship between the payload data block and the verification data block corresponding to the first verification data block, sending the first payload data block and the first verification data block to the receiving end;
  • the receiving end is configured to receive the first payload data block, verify the first payload data block, and obtain a verification result of the first payload data block, if the received verification data If the number of verification-failure data blocks in the payload data block corresponding to the block is 1, then perform data recovery on the verification-failure data blocks according to the received pair of verification data blocks, wherein the number is based on each The verification results of the payload data blocks and the corresponding relationship between the payload data blocks and the verification data blocks are determined.
  • the sending end is configured to:
  • the sending order of the locally pre-stored payload data blocks determines that the sending order of the verification data blocks corresponding to the first sending order is the second sending order
  • the payload data of the first payload data block According to the payload data of the first payload data block, generate the first verification data block whose transmission order is the second transmission order in the current verification data transmission cycle, wherein each payload data transmission cycle corresponds to one Check the data sending cycle.
  • the sending end is configured to:
  • the verification data identifier of the payload data block stored in advance determines that the verification data identifier corresponding to the first payload data identifier is the second verification data identifier
  • a device for data transmission comprising:
  • An acquisition module configured to acquire the first payload data block
  • a generation module configured to generate the first payload data block corresponding to the first payload data block according to the payload data of the first payload data block and the correspondence between the locally pre-stored payload data block and the verification data block. Check the data block;
  • a sending module configured to send the first payload data block and the first check data block to the receiving end.
  • the first payload data block corresponds to one or more first check data blocks.
  • the generating module is configured to:
  • the sending order of the locally pre-stored payload data blocks determines that the sending order of the verification data blocks corresponding to the first sending order is the second sending order
  • the payload data of the first payload data block According to the payload data of the first payload data block, generate the first verification data block whose transmission order is the second transmission order in the current verification data transmission cycle, wherein each payload data transmission cycle corresponds to one Check the data sending cycle.
  • the sending module is configured to:
  • the first payload data block carries a first payload data identifier
  • the generating module is configured to:
  • the verification data identifier of the payload data block stored in advance determines that the verification data identifier corresponding to the first payload data identifier is the second verification data identifier
  • a device for data transmission comprising:
  • a verification module configured to receive the payload data block sent by the sending end, verify the payload data block, and obtain the verification result of the payload data block;
  • a receiving module configured to receive the first verification data block
  • a recovery module configured to perform data recovery on the verification-failure data block if the number of verification-failure data blocks in the payload data block corresponding to the first verification data block satisfies the data recovery condition, wherein the The number is determined according to the verification result of each payload data block and the corresponding relationship between the locally pre-stored payload data block and the verification data block.
  • the recovery module is also used to:
  • the verification result of the payload data block is a verification failure
  • the recovery module is also used to:
  • the recovery module is used for:
  • the recovery module is also used to:
  • the recorded number of verification-failure data blocks corresponding to the second verification data block is reduced by 1;
  • the recovery module is configured to:
  • the receiving order of the locally pre-stored payload data blocks determines the second receiving order of the verification data blocks corresponding to the first receiving order, and store the payload data blocks As the verification-failure data block corresponding to the first verification data block whose receiving order is the second receiving order in the current verification data receiving cycle.
  • the recovery module is configured to:
  • the first check data identifier corresponding to the first payload data identifier is determined, and the payload The payload data block serves as the verification-failure data block corresponding to the first verification data block corresponding to the first payload data identifier.
  • the recovery module is also used to:
  • the payload data block is used as the first verification data block corresponding Verify successful data block;
  • the payload data block update the recorded payload XOR result of the verification successful data block corresponding to the first verification data block.
  • the recovery module is configured to:
  • the recovery module is also used to:
  • the number of verification-failing data blocks in the payload data blocks corresponding to the first verification data block is determined.
  • the recovery module is configured to:
  • a sending end includes a processor and a memory, at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the above first The method of data transmission described in the aspect.
  • a receiving end includes a processor and a memory, the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the above-mentioned second The method of data transmission described in the aspect.
  • a computer-readable storage medium wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned first or second aspect.
  • the method of data transfer is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned first or second aspect.
  • FIG. 1 is a schematic diagram of a communication system provided by an embodiment of the present application.
  • FIG. 2 is a flow chart of a data transmission method provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a payload data block provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of an Ethernet architecture provided by an embodiment of the present application.
  • Fig. 5 is a schematic diagram of the relationship between a MAC data frame and a payload data block provided by an embodiment of the present application
  • FIG. 6 is a schematic structural diagram of a device for data transmission provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a device for data transmission provided by an embodiment of the present application.
  • Fig. 8 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • the communication system can include a sending end and a receiving end.
  • both the sending end and the receiving end may be communication devices such as computers and servers.
  • the corresponding relationship between the payload data block and the checksum data block is pre-agreed and stored at the sending end and the receiving end, that is, the pre-stored net data at the sending end and the receiving end.
  • the corresponding relationship between the load data block and the check data block is the same.
  • the sender when the sender generates the verification data block, it no longer randomly selects the payload data block for generation, but selects the corresponding payload data block to generate the verification data block according to the corresponding relationship between the stored payload data block and the verification data block. check data block. Because the corresponding relationship between the payload data block and the check data block is also stored at the receiving end, the sending end does not need to send the corresponding relationship to the receiving end, which can save the effective bandwidth of the link.
  • the data transmission method provided by the embodiment of the present application may include the following processing steps.
  • Step 201 the sending end performs fixed-length processing on the data to be sent, and obtains a payload data block corresponding to the data to be sent.
  • the sending end obtains the data to be sent according to actual business requirements, and performs fixed-length processing on the data to be sent.
  • the fixed-length processing may be: the sending end may divide the data to be sent into at least one piece of data with a preset length.
  • splitting can be performed according to the preset sub-length.
  • the preset length is 62 bytes (bytes).
  • the data to be sent is segmented, it can be segmented according to the preset sub-length of 16 bytes, 16 bytes, 16 bytes and 14 bytes in order to obtain a copy of 62 bytes. bytes of data.
  • the length of the data to be sent is not an integer multiple of the preset length.
  • splitting for the remaining data to be sent that is less than the preset length, this part of the data to be sent can be filled to the preset length length.
  • the specific padding method is not limited in this application, for example, zeros may be padded at the end.
  • the sending end For each obtained piece of data with a preset length, the sending end performs check encoding respectively to obtain corresponding check data.
  • the check code may be a cyclic redundancy check (cyclic redundancy check, CRC) code or the like.
  • identification data may also be added to each piece of data with a preset length.
  • the role of the identification data may also be different, which will be specifically introduced in the following embodiments.
  • each piece of data with a preset length corresponds to verification data and identification data.
  • the preset payload data block structure for each piece of data of preset length, the data of the preset length is used as the payload data, and the payload data, corresponding identification data and corresponding verification data are processed. combination to obtain the corresponding payload data block.
  • a payload data block may include three parts: identification data, payload data and check data.
  • the length of the payload data is the above-mentioned preset length, and the brackets of the payload data length are preset sub-lengths.
  • the first row of the payload data length indicates that the payload data length is 62 bytes, and the preset lengths are 16 bytes, 16 bytes, 16 bytes and 14 bytes.
  • the payload data block may also be called a payload data frame, etc., and the embodiment of the present application does not limit its specific name.
  • this embodiment of the present application introduces a shimlayer (shimlayer) into a standard Ethernet architecture.
  • the standard Ethernet architecture includes physical medium dependent (physical medium dependent, PMD) sublayer, physical medium attachment (physical medium attachment, PMA) sublayer, physical coding sublayer (physical coding sublayer) , PCS), media access control (media access control, MAC) sublayer and higher layer (higher layer).
  • the shimlayer is located between the MAC sublayer and the PCS.
  • the data to be sent in the above step 201 may be a MAC data frame encapsulated by the MAC sublayer.
  • Shimlayer performs fixed-length processing on MAC data frames.
  • the MAC data frame may include a frame token (frame token), a header (header), a payload (payload), CRC data and a special format data segment (IDLE).
  • a MAC data frame is divided into X payload data blocks, X is a positive integer, and the value of X is related to the length of the MAC data frame and the preset length.
  • Each payload data block includes identification data, payload data and check data.
  • Step 202 Generate a verification data block corresponding to the payload data block according to the pre-stored correspondence between the payload data block and the verification data block.
  • the sending end may preset a payload data sending cycle and a check data sending cycle. Every N consecutively sent payload data blocks is regarded as a payload data sending cycle. Each payload data sending cycle corresponds to a verification data sending cycle, and every M consecutively sent verification data blocks are taken as a verification data sending cycle. The M check data blocks in each check data cycle are generated from the N payload data blocks in the corresponding payload data sending cycle.
  • the corresponding relationship between the payload data block and the verification data block represents the structural relationship between the verification data block and the payload data block.
  • a payload data transmission cycle includes 2n payload data blocks, and a verification data block
  • the data sending cycle includes m verification data blocks, and several possible structural relationships between the verification data blocks and the payload data blocks are exemplarily listed.
  • p 0 , p 1 ... p m-1 respectively represent the payload data of m verification data blocks
  • d 0 , d 1 ... d 2n-1 represent the payloads of 2n payload data blocks respectively data
  • a check data block may be calculated by the XOR of the payload data of multiple payload data blocks.
  • the generation process of the check data block can be as follows:
  • the sending end can determine the target verification data block corresponding to the payload data block according to the pre-stored correspondence between the payload data block and the verification data block. If the intermediate data of the target verification data block is not cached locally, the payload data of the payload data block is cached as the intermediate data of the target verification data block. If the intermediate data of the target verification data block is cached locally, XOR is performed between the payload data of the payload data block and the intermediate data of the target verification data block, so as to update the intermediate data of the target verification data block. In addition, for each verification data block, the composition number of the intermediate data of the verification data block currently cached can also be recorded, wherein the composition number indicates that the currently cached intermediate data is obtained from several payload data blocks .
  • the completion condition means that the composition number of the intermediate data of the currently cached target check data block is the number of payload data blocks corresponding to the target check data block.
  • check encoding may be performed on the payload data of the check data block to generate corresponding check data.
  • the check code may be CRC code or the like.
  • identification data can also be added on the basis of the payload data.
  • the role of the identification data may also be different, which will be specifically introduced in the following embodiments.
  • a verification data block including identification data, payload data and verification data can be obtained through the above processing.
  • check encoding may not be performed on the payload data of the check data block, that is, the check data may not be included in the generated check data block.
  • the correspondence between the payload data blocks and the check data blocks may be the correspondence between the sending order of the payload data blocks and the sending order of the check data blocks.
  • the sending order of the payload data blocks refers to the sending order of the payload data blocks in a payload data sending cycle
  • the sending order of the verification data blocks refers to the sending order of the verification data blocks in a verification data sending cycle order.
  • the sending end caches the intermediate data of each verification data block in the sending sequence. The generation of the payload data of the verification data block in this implementation manner will be described below through an example.
  • one payload data sending cycle includes four payload data blocks
  • one check data cycle includes three check data blocks.
  • Table 2 The corresponding relationship between the sending order of the four payload data blocks and the sending order of the three check data blocks is shown in Table 2 below.
  • Sending order of payload data blocks Check the sending order of data blocks T0 S0, S1, S2 T1 S2 T2 S1, S2 T3 S2
  • T0, T1, T2, and T3 successively indicate that the sending order is the first, second, third, and fourth.
  • S0, S1, and S2 sequentially indicate that the sending order is the first, second, and third.
  • the first data row from top to bottom in Table 2 indicates that the payload data block whose transmission order is the first is involved in generating the check data blocks whose transmission order is the first, second, and third.
  • the second data row indicates that the payload data block whose sending order is the second rank participates in generating the check data block whose sending order is the third rank.
  • the third data line indicates that: the payload data block whose sending order is the third place participates in generating the check data blocks whose sending order is the second place and the third place.
  • the fourth data line indicates that: the payload data block whose sending order is the fourth place participates in generating the check data block whose sending order is the third place.
  • the check data block whose sending order is the first bit needs to be generated from a payload data block
  • the payload data block is: the payload data block whose sending order is the first bit.
  • the check data block whose sending order is the second bit needs to be generated from two payload data blocks, and these two payload data blocks are: the payload data blocks whose sending order is the first bit and the third bit.
  • the check data block whose sending order is the third needs to be generated from four payload data blocks, and these four payload data blocks are: the first, second, third and fourth payload data blocks load data block.
  • checksum data block the structural relationship between the checksum data block and the payload data block is as follows:
  • p 0 is the payload data of the verification data block whose transmission order is the first
  • p 1 is the payload data of the verification data block whose transmission order is the second
  • p 2 is the payload data of the verification data block whose transmission order is the third
  • d 0 is the payload data of the payload data block whose sending order is the first
  • d 1 is the payload data of the payload data block whose sending order is the second
  • d 2 is the payload data of the payload data block whose sending order is the second Payload data of the payload data block whose transmission order is the third
  • d3 is the payload data of the payload data block whose transmission order is the fourth.
  • p 0 ′, p 1 ′, and p 2 ′ represent the intermediate data of the check data block whose sending order is the first, second, and third respectively.
  • composition number of the currently cached p 0 ′ as 1
  • composition number of the currently cached p 1 ′ as 1
  • composition number of the currently cached p 2 ′ as 1.
  • the sending end determines that the number of components of p 0 ' is 1 and satisfies the corresponding completion condition, and then uses p 0 ' as the payload data of the check data block whose transmission order is the first. In this case, the recorded composition number of p 0 ' can be zeroed.
  • the number of components of each recorded intermediate data may also be updated, specifically, the number of components of the currently cached p 2 ′ may be updated to 2.
  • the number of components of each recorded intermediate data may also be updated, specifically, the number of components of the currently cached p 1 ′ may be updated to 2, and the number of components of the currently cached p 2 ′ may be updated to 3.
  • the sending end determines that the number of components of p 1 ' is 2 and satisfies the corresponding completion condition, and then uses p 1 ' as the payload data of the check data block whose sending order is the second. In this case, the recorded composition number of p 1 ' can be zeroed.
  • the number of components of each recorded intermediate data may also be updated, specifically, the number of components of p 2 ′ currently cached may be updated to 4.
  • the sending end determines that the number of components of p 2 ' is 4 and satisfies the corresponding completion condition, and then uses p 2 ' as the payload data of the check data block whose sending order is the third. In this case, the recorded composition number of p 2 ' can be zeroed.
  • the above-mentioned identification data is used to identify the type of the data block, that is, to distinguish whether the data block is a payload data block or a check data block.
  • the identification data in each payload data block Same, the identification data in each verification data block is the same, and the identification data in the payload data block is different from the identification data in the verification data block.
  • the correspondence between the payload data block and the check data block may be the correspondence between the payload data identifier of the payload data block and the check data identifier of the check data block.
  • N different payload data identifiers may be set.
  • M different check data identifiers may be set.
  • the identification data in the payload data block in step 201 above can be the payload data identification here.
  • the corresponding payload data identifier can be selected according to preset rules.
  • the N payload data identifiers are in one-to-one correspondence with the sending order of the N payload data blocks included in one payload data sending cycle.
  • the N payload data identifiers are in one-to-one correspondence with the sending order of the N payload data blocks included in one payload data sending cycle.
  • random selection without replacement may be performed among N payload data identifiers.
  • the non-returning random selection means that each selection is random selection, and within a payload data sending cycle, if a certain payload data identifier has been selected, the payload data identifier will not be selected again.
  • one payload data sending cycle includes four payload data blocks
  • one check data cycle includes three check data blocks.
  • the corresponding relationship between the payload data identifiers of the four payload data blocks and the check data identifiers of the three check data blocks is shown in Table 3 below.
  • Payload data identifier of the payload data block The checksum data identifier of the checksum data block D0 P0, P1, P2 D1 P2 D2 P1, P2 D3 P2
  • the first data row from top to bottom in Table 3 indicates that the payload data block whose payload data is identified as D0 participates in generating the verification data blocks whose verification data are identified as P0, P1, and P2.
  • the second data row indicates that the payload data block whose payload data is identified as D1 participates in generating the check data block whose check data is identified as P2.
  • the third data line indicates that the payload data block whose payload data is identified as D2 participates in generating the verification data blocks whose verification data are identified as P1 and P2.
  • the fourth data line indicates that the payload data block whose payload data is identified as D3 participates in generating the verification data block whose verification data is identified as P2.
  • the verification data block whose verification data is identified as P0 needs to be generated from a payload data block
  • the payload data block is: the payload data identification is D0 payload data block.
  • the check data block whose check data is identified as P1 needs to be generated from two payload data blocks, and these two payload data blocks are: the payload data blocks whose payload data are identified as D0 and D2.
  • the check data block whose check data is identified as P2 needs to be generated from four payload data blocks, and these four payload data blocks are: the payload data blocks whose payload data are identified as D0, D1, D2 and D3.
  • checksum data block the structural relationship between the checksum data block and the payload data block is as follows:
  • p 0 is the payload data of the verification data block whose verification data is identified as P0
  • p 1 is the payload data of the verification data block whose verification data is identified as P1
  • p 2 is the payload data of the verification data block whose verification data is identified as P0
  • the payload data of the verification data block d 0 is the payload data of the payload data block whose payload data is marked as D0
  • d 1 is the payload data of the payload data block whose payload data is marked as D1
  • d 2 is
  • the payload data is the payload data of the payload data block whose payload data is identified as D2
  • d3 is the payload data of the payload data block whose payload data is identified as D3.
  • p 0 ′, p 1 ′, and p 2 ′ represent the intermediate data of the verification data blocks whose transmission order is P0, P1, and P2 respectively.
  • composition number of the currently cached p 0 ′ as 1
  • composition number of the currently cached p 1 ′ as 1
  • composition number of the currently cached p 2 ′ as 1.
  • the sender determines that the number of components of p 0 ' is 1 and satisfies the corresponding completion condition, and uses p 0 ' as the payload data of the check data block whose check data is identified as P0. In this case, the recorded composition number of p 0 ' can be zeroed.
  • the number of components of each recorded intermediate data may also be updated, specifically, the number of components of the currently cached p 2 ′ may be updated to 2.
  • the number of components of each recorded intermediate data may also be updated, specifically, the number of components of the currently cached p 1 ′ may be updated to 2, and the number of components of the currently cached p 2 ′ may be updated to 3.
  • the sender determines that the number of components of p 1 ' is 2 and satisfies the corresponding completion condition, and then uses p 1 ' as the payload data of the check data block identified as P1. In this case, the recorded composition number of p 1 ' can be zeroed.
  • the number of components of each recorded intermediate data may also be updated, specifically, the number of components of p 2 ′ currently cached may be updated to 4.
  • the sender determines that the number of components of p 2 ′ is 4 and satisfies the corresponding completion condition, and then uses p 2 ′ as the payload data of the verification data block whose verification data is identified as P2. In this case, the recorded composition number of p 2 ' can be zeroed.
  • the identification data carried in the verification data block is a verification data identifier, and the verification data identifiers carried in the verification data blocks belonging to the same verification data sending cycle are different.
  • the identifier data carried in the payload data block is the payload data identifier, and the payload data identifiers carried in the payload data blocks belonging to the same payload data transmission cycle are different.
  • Step 203 the sender sends the payload data block and the check data block.
  • the payload data in the payload data block and the intermediate data of the corresponding verification data block are XORed, they can be sent to the receiving end in the order in which the payload data blocks are sent The payload data block.
  • the verification data block For the sending of the verification data block, it can be sent to the receiving end after the verification data block is generated. Or, send to the receiving end when the link is idle.
  • Link idle means that the link has no payload data blocks to be transmitted. It should be noted that when the link is idle and the verification data block is sent, it is necessary to ensure that the verification data block whose verification data sending cycle is earlier has been sent, and then send the verification data block whose verification data sending cycle is later. data block.
  • Step 204 the receiving end checks the payload data block whenever it receives the payload data block.
  • the receiving end checks the payload data block.
  • the verification method can be as follows:
  • the comparison check data is compared with the check data carried in the payload data block. If the comparison verification data is inconsistent with the verification data carried in the payload data block, it is determined that the verification of the verification data block fails, that is, there is a bit error in the payload data of the verification data block. If the comparison verification data is consistent with the verification data carried in the payload data block, it is determined that the verification of the verification data block is successful.
  • the verification code used by the receiving end when performing verification is the same as the verification code used by the sending end when generating the verification data.
  • Step 205 the receiving end determines the verification data block corresponding to the payload data block according to the correspondence between the payload data block and the verification data block stored in advance locally.
  • the corresponding relationship between the payload data blocks and the check data blocks may be the corresponding relationship between the receiving order of the payload data blocks and the receiving order of the check data blocks.
  • the correspondence between the payload data block and the check data block may be the correspondence between the payload data identifier of the payload data block and the check data identifier of the check data block.
  • step 205 may be performed before step 204, or may be performed after step 204.
  • the corresponding relationship between the payload data block and the check data block can be the corresponding relationship between the receiving order of the payload data block and the receiving order of the check data block
  • the receiving end receives a payload data block
  • the order is the first received order. That is, the verification data block in the first receiving sequence in the current verification data sending cycle is the verification data block corresponding to the payload data block.
  • the receiving end receives a payload data block Afterwards, the target payload data identifier carried by the payload data block is acquired. Then, according to the correspondence between the payload data identifier of the payload data block and the verification data identifier of the check data block stored in local, the target verification data identifier corresponding to the target payload data identifier is determined. That is, the check data corresponding to the target check data identifier is the check data block corresponding to the payload data block.
  • relevant information of the verification data block may be recorded at the receiving end. In this way, after each verification data block is received, the verification-failure data block corresponding to the verification data block can be restored directly according to the recorded relevant information.
  • the relevant information may include the number of verification-failure data blocks corresponding to each verification data block, the identification of the verification-failure data block corresponding to each verification data block, and the verification data block corresponding to each verification data block.
  • the identification of the verification failed data block is the verification failed data block
  • the identification of the verification failure data block is carried Payload data identifier.
  • the identification of the verification data block is the verification data block The identification of the receiving order in the sending cycle of the associated check data.
  • the check data block identifier is the carried checksum Test data identification.
  • the identification of the payload data block is recorded as the identification of the verification failure data block of the corresponding verification data block, and the verification failure data of the corresponding verification data block The number of blocks is incremented by 1.
  • the payload data block B3 corresponds to the verification data block A0, and when the verification of the payload data block B3 fails, B3 is recorded as the identifier of the verification-failing data block of the verification data block A0. And, add 1 to the number of data blocks that fail to be verified corresponding to the verification data block A0. For updated relevant information, see Table 5 below.
  • the payload data block is used as the verification success data block of the corresponding verification data block, and the payload data of the payload data block and the verification data of the corresponding verification data block XOR the payload XOR result of the successfully verified data block.
  • the payload data block B4 corresponds to the verification data block A1 .
  • the payload XOR result of the successful data block is XORed.
  • Table 6 For updated relevant information, see Table 6 below.
  • Step 206 whenever the receiving end receives a verification data block, if the number of verification-failure data blocks corresponding to the verification data block satisfies the recovery condition, perform data processing on the verification-failure data blocks of the verification data block recover.
  • the receiving end queries the relevant information of the verification data block in the recorded relevant information of the verification data block.
  • the receiving end determines a target reception sequence of the verification data block in the current verification data block receiving cycle. Then, in the recorded related information of the verification data block, the related information corresponding to the identification of the target receiving order is queried.
  • the receiving end after receiving the verification data block, acquires the target verification data identifier carried in the verification data block. Then, in the recorded relevant information of the verification data block, the relevant information corresponding to the target verification data identifier is queried.
  • the verification data block After querying the relevant information, it is judged whether the number of verification failed data blocks corresponding to the verification data block is 1, and if the number of verification failed data blocks corresponding to the verification data block is 1, the verification data block can be Perform data recovery on the data block corresponding to the verification failure data block.
  • Block B2 After receiving the verification data block A1, in the relevant information of the verification data block recorded in Table 6 above, if the number of verification identification data blocks of the verification data block A1 is found to be 1, then the verification failed data can be Block B2 is restored.
  • the verification data block needs to be cached first.
  • the number of verification identification data blocks of the verification data block A1 is 2, that is, it is not 1, then you can first The check data block A0 is cached.
  • the data recovery processing of the verification failed data block can be as follows: the payload data in the verification data block is XORed with the payload XOR result of the verification success data block corresponding to the verification data block, and the data can be obtained. The correct payload data of the failed data block. Then, the erroneous data in the verification identification data block can be recovered according to the correct payload data block.
  • the recorded identification of the verification-failure data block is deleted, and the number of verification-failure data blocks of the corresponding verification data block is reduced by 1.
  • the payload data after data recovery of the data block that failed in verification is obtained, and the The obtained payload data is XORed with the payload XOR result of the data block successfully verified in other data blocks corresponding to the verification failed data block.
  • the verification failed data block B2 completes data recovery, delete B2 recorded in Table 6, and reduce the number of verification failed data blocks corresponding to verification data block A0 by 1, and delete the verification data block corresponding to verification data block A1.
  • the number of failed data blocks is reduced by 1.
  • the XOR payload results of the successful verification data blocks corresponding to the verification data block A1 can be deleted.
  • the verification failed data block B2 also corresponds to the verification data block A0.
  • the payload XOR result d 0 of the successfully verified data block is XORed.
  • the verification failure data corresponding to the verification data block A0 can be Block B3 performs data recovery.
  • the receiving end can also record the total number of data blocks that fail verification. Whenever a payload data block that fails verification is received, add 1 to the total number. Whenever a data block that fails verification completes data recovery , minus 1 from that total. When the total number is 0, it indicates that all data blocks that fail to be verified at the receiving end have completed data recovery.
  • the foregoing steps 205 and 206 may be replaced with the following step 207 .
  • Step 207 whenever a verification data block is received, according to the correspondence between the pre-stored payload data block and the verification data block, determine the number of verification failure data blocks corresponding to the received verification data block, If the number of verification-failure data blocks corresponding to the verification data block satisfies the recovery condition, perform data recovery on the verification-failure data blocks of the verification data block.
  • the payload data block is cached as the verification failed data block, and the data of the payload data block is recorded. logo. If the verification of the payload data block is successful, the payload data of the payload data block can be obtained for caching, and the identifier of the payload data block can be recorded. In addition, the identifiers of the payload data blocks that are successfully verified and the identifiers of the payload data blocks that fail to be verified need to be recorded separately.
  • the corresponding relationship between the identifier of the payload data block and the storage location of the corresponding payload data block can be established, and for the payload data block that is successfully verified, the identifier of the payload data block can be established
  • the corresponding relationship with the payload data storage location of the corresponding payload data block is for the payload data block whose verification is successful.
  • the identification of the payload data block in the case where the corresponding relationship between the payload data block and the verification data block is the corresponding relationship between the receiving order of the payload data block and the receiving order of the verification data block, the identification of the payload data block It is the identification of the receiving order of the payload data block in the payload data sending cycle to which it belongs.
  • the identifier of the payload data block is the carried payload Charge data identifier.
  • the number of verification-failed data blocks corresponding to the verification data block is determined according to the pre-stored correspondence between the payload data block and the verification data block. If it is determined that the number of verification-failure data blocks corresponding to the verification data block is 1, data recovery is performed on the verification-failure data blocks corresponding to the verification data block.
  • Case 1 The correspondence between the payload data blocks and the check data blocks is the correspondence between the receiving order of the payload data blocks and the receiving order of the check data blocks.
  • the target receiving order of the check data block in the current check data sending cycle is determined first. Then, in the corresponding relationship between the receiving order of the locally stored payload data blocks and the receiving order of the verification data blocks, the receiving order of the payload data blocks corresponding to the target receiving order is determined. Then, in the identification of the receiving order of the verification failure data blocks received in the current payload data transmission cycle of the record, determine the same number of identifications as the identification of the receiving order of the payload data blocks corresponding to the target receiving order, as The number of verification failed data blocks corresponding to the verification data block.
  • Case 2 The correspondence between the payload data block and the check data block is the correspondence between the payload data identifier of the payload data block and the check data identifier of the check data block.
  • the target verification data identifier carried in the verification data block is acquired first. Then, in the correspondence between the payload data identifier of the locally stored payload data block and the verification data identifier of the check data block, determine the payload data identifier corresponding to the target check data identifier. Then, in the payload data identification of the verification failure data block received in the recorded current payload data transmission cycle, determine the number of identifications that are the same as the payload data identification corresponding to the target verification data identification, as the verification The number of data blocks that fail verification corresponding to the data block.
  • the payload data identification of the verification-successful data block received in the current payload data transmission cycle recorded, query the target verification data identification corresponding to The target payload data identifier for . Then, obtain the cached payload data in the payload data storage location corresponding to the target payload data identifier, and perform XOR on the obtained payload data and the verification data carried in the verification data block to obtain the corresponding verification data block. Verify the correct payload data for the failed data block.
  • the correspondence between the payload data block and the verification data block is pre-agreed and stored at the sending end and the receiving end, that is, the payload data block and the verification data block pre-stored at the sending end and the receiving end
  • the corresponding relationship is the same.
  • the sender when the sender generates the verification data block, it no longer randomly selects the payload data block for generation, but selects the corresponding payload data block to generate the verification data block according to the corresponding relationship between the stored payload data block and the verification data block. check data block. Therefore, the sending end does not need to send the corresponding relationship to the receiving end, which can save the effective bandwidth of the link.
  • the embodiment of the present invention also provides a data transmission device, as shown in Figure 6, the device includes:
  • the acquiring module 610 is configured to acquire the first payload data; specifically, the process of acquiring the payload data block in step 201 may be implemented.
  • the generating module 620 is configured to generate the first payload data block corresponding to the first payload data block according to the payload data of the first payload data block and the correspondence between the locally pre-stored payload data block and the verification data block. Checking the data block; specifically, the process of generating the checking data block in step 202 can be implemented.
  • a sending module 630 configured to send the first payload data block and the first check data block to a receiving end.
  • the sending function in step 203 can be implemented.
  • the first payload data block corresponds to one or more first check data blocks.
  • the generating module 620 is configured to:
  • the sending order of the locally pre-stored payload data blocks determines that the sending order of the verification data blocks corresponding to the first sending order is the second sending order
  • the payload data of the first payload data block According to the payload data of the first payload data block, generate the first verification data block whose transmission order is the second transmission order in the current verification data transmission cycle, wherein each payload data transmission cycle corresponds to one Check the data sending cycle.
  • the sending module 630 is configured to:
  • the first payload data block carries a first payload data identifier
  • the generating module 620 is configured to:
  • the verification data identifier of the payload data block stored in advance determines that the verification data identifier corresponding to the first payload data identifier is the second verification data identifier
  • the data transmission device provided by the above-mentioned embodiment only uses the division of the above-mentioned functional modules as an example when performing data transmission.
  • the above-mentioned function allocation can be completed by different functional modules according to needs. , that is, divide the internal structure of the communication device into different functional modules, so as to complete all or part of the functions described above.
  • the data transmission device and the data transmission method embodiment provided by the above embodiment belong to the same idea, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.
  • the embodiment of the present invention also provides a data transmission device, as shown in Figure 7, the device includes:
  • the verification module 710 is configured to receive the payload data block sent by the sending end, verify the payload data block, and obtain the verification result of the payload data block; specifically, the receiving in step 204 can be realized function and check function.
  • the receiving module 720 is configured to receive the first verification data block; specifically, the receiving function in step 206 can be implemented.
  • the recovery module 730 is configured to perform data recovery on the verification-failure data block if the number of verification-failure data blocks in the payload data block corresponding to the first verification data block satisfies the data recovery condition, wherein the The above number is determined according to the verification result of each payload data block and the correspondence between the locally pre-stored payload data block and the verification data block.
  • the data recovery function in step 206 can be implemented.
  • the restoration module 730 is further configured to:
  • the verification result of the payload data block is a verification failure
  • the restoration module 730 is further configured to:
  • the recovery module is used for:
  • the restoration module 730 is further configured to:
  • the recorded number of verification-failure data blocks corresponding to the second verification data block is reduced by 1;
  • the restoration module 730 is configured to:
  • the receiving order of the locally pre-stored payload data blocks determines the second receiving order of the verification data blocks corresponding to the first receiving order, and store the payload data blocks As the verification-failure data block corresponding to the first verification data block whose receiving order is the second receiving order in the current verification data receiving cycle.
  • the restoration module 730 is configured to:
  • the first check data identifier corresponding to the first payload data identifier is determined, and the payload The payload data block serves as the verification-failure data block corresponding to the first verification data block corresponding to the first payload data identifier.
  • the restoration module 730 is further configured to:
  • the payload data block is used as the first verification data block corresponding Verify successful data block;
  • the payload data block update the recorded payload XOR result of the verification successful data block corresponding to the first verification data block.
  • the restoration module 730 is configured to:
  • the restoration module 730 is further configured to:
  • the number of verification-failing data blocks in the payload data blocks corresponding to the first verification data block is determined.
  • the recovery module is configured to:
  • the data transmission device provided by the above-mentioned embodiment only uses the division of the above-mentioned functional modules as an example when performing data transmission.
  • the above-mentioned function allocation can be completed by different functional modules according to needs. , that is, divide the internal structure of the communication device into different functional modules, so as to complete all or part of the functions described above.
  • the data transmission device and the data transmission method embodiment provided by the above embodiment belong to the same idea, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.
  • the embodiment of the present application also provides a communication device.
  • the communication device 800 may be a sending end or a receiving end in the communication system shown in FIG. 1 .
  • the communication device 800 may include a processor 810 , a memory 820 coupled to the processor 810 , and a transceiver 830 .
  • the processor 810 may be a central processing unit (central processing unit, CPU), a network processor (Network Processor, NP) or a combination of CPU and NP.
  • the processor may further include hardware chips.
  • the aforementioned hardware chip may be an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable logic device (programmable logic device, PLD) or a combination thereof.
  • ASIC Application Specific Integrated Circuit
  • PLD programmable logic device
  • the above-mentioned PLD can be a complex programmable logic device (Complex Programmable logic device, CPLD), a field programmable logic gate array (Field Programmable Gate Array, FPGA), a general logic device (generic array logic, GAL) or any combination thereof.
  • the processor 810 may refer to one processor, or may include multiple processors.
  • the memory 820 may include a volatile memory (volatile memory), such as a random access memory (Random Access Memory, RAM); the memory may also include a non-volatile memory (non-volatile memory), such as a read-only memory (Read-Only Memory).
  • the memory can also include the combination of above-mentioned kinds of memory.
  • the storage 820 may refer to one storage, or may include multiple storages.
  • the memory 820 stores computer-readable instructions, and after the processor 810 executes the computer-readable instructions in the memory 820, it can execute the data transmission as shown in FIG. 2 according to the instructions of the computer-readable instructions. Methods.
  • all or part may be implemented by software, hardware, firmware or any combination thereof, and when software is used, all or part may be implemented in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the device, all or part of the processes or functions according to the embodiments of the present application will be generated.
  • the computer instructions may be stored in 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 by wired (eg, coaxial cable, optical fiber, DSL) or wireless (eg, infrared, wireless, microwave, etc.) means.
  • 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 a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, and a magnetic tape, etc.), 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.).
  • the program can be stored in a computer-readable storage medium.
  • the above-mentioned The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)

Abstract

本申请实施例公开了一种数据传输的方法、装置和系统,属于通信技术领域。所述方法包括: 获取第一净荷数据块,根据第一净荷数据块的净荷数据、以及本地预先存储的净荷数据块和校验数据块的对应关系,生成所述第一净荷数据块对应的第一校验数据块;向接收端发送所述第一净荷数据块和所述第一校验数据块。采用本申请,可以避免由于发送净荷数据块和校验数据块的对应关系而占用链路有效带宽的问题。

Description

数据传输的方法、装置和通信系统
本申请要求于2021年12月16日提交的申请号为202111544176.X、发明名称为“数据传输的方法、装置和通信系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,特别涉及一种数据传输的方法、装置和通信系统。
背景技术
随着互联网业务的不断发展,数据传输链路传输速率也在不断增加。由于数据传输链路损耗、噪声干扰等原因,数据在传输过程中出现错误的情况也常有发生。为了使传输过程中出现错误的数据能在接收端被恢复,相关技术中通常采用如下方法传输数据。
假设发端要发送N个净荷数据块,对应这N个净荷数据块,发送端生成M个校验数据块。其中,每个校验数据块由N个净荷数据块中的至少一个净荷数据块计算得到,且计算得到该校验数据块的至少一个净荷数据块是随机选择的,只需要保证的是,每个净荷数据块至少参与一个校验数据块的生成。此外,发送端还要生成净荷数据块和校验数据块的对应关系。发送端将N个净荷数据块、M个校验数据块以及净荷数据块和校验数据块的对应关系向接收端发送。接收端如果校验某个净荷数据块存在误码,则可以根据净荷数据块和校验数据块的对应关系,确定出该净荷数据块对应的校验数据块,进而通过校验数据块对该净荷数据块进行恢复。
在上述方法中,发送端需要向接收端发送净荷数据块和校验数据块的对应关系,因此,传输该对应关系也就需要占用链路有效带宽,这样便影响了净荷数据块的传输效率。
发明内容
本申请实施例提供了一种数据传输的方法、装置和通信系统,可以解决相关技术中因为传输净荷数据块和校验数据块的对应关系而浪费链路的有效带宽的问题。所述技术方案如下:
第一方面,提供了一种数据传输的方法,方法包括:发送端获取第一净荷数据块,根据第一净荷数据块的净荷数据、以及本地预先存储的净荷数据块和校验数据块的对应关系,生成第一净荷数据块对应的第一校验数据块。向接收端发送第一净荷数据块和第一校验数据块。
在本申请实施例所示的方案中,净荷数据块和校验数据块的对应关系是预先约定并存储在发送端和接收端的,也即是,发送端和接收端预先存储的净荷数据块和校验数据块的对应关系是相同的。这样,发送端在生成校验数据块时,不再随机选择净荷数据块进行生成,而是根据存储的净荷数据块和校验数据块的对应关系,确定每个净荷数据块需要参与生成的校验数据块。这样,因为净荷数据块和校验数据块之间有了明确的对应关系,所以发送端也就无需在生成每个校验数据块后再向接收端发送该校验数据块和净荷数据块的对应关系了,可以节省链路的有效带宽。
在一种可能的实现方式中,第一净荷数据块对应一个或多个第一校验数据块。
在本申请实施例所示的方案中,一个净荷数据块可能会参与多个校验数据块的生成,一个校验数据块可能根据多个净荷数据块生成的。
在一种可能的实现方式中,本地预先存储的净荷数据块和校验数据块的对应关系可以为净荷数据块的发送次序和校验数据块的发送次序的对应关系。相应的,发送端在获取到第一净荷数据后可以先确定第一净荷数据块在当前净荷数据发送周期中的第一发送次序。并根据本地预先存储的净荷数据块的发送次序和校验数据块的发送次序的对应关系,确定第一发送次序对应的校验数据块的发送次序为第二发送次序。将当前校验数据块发送周期中发送次序为所述第二发送次序的第一校验数据块,作为第一净荷数据块对应的校验数据块,其中,每个净荷数据发送周期对应一个校验数据发送周期。
在本申请实施例所示的方案中,发送端可以预先设置有净荷数据发送周期和校验数据发送周期。每N个连续发送的净荷数据块作为一个净荷数据发送周期。每个净荷数据发送周期对应有一个校验数据发送周期,每M个连续发送的校验数据块作为一个校验数据发送周期。每个校验数据周期内的M个校验数据块由对应的净荷数据发送周期中的N个净荷数据块生成。
在一种可能的实现方式中,根据本地预先存储的净荷数据块和校验数据块的对应关系可以为净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,净荷数据块中携带净荷数据标识,相应的,确定第一净荷数据块对应的第一校验数据块的处理可以如下:
根据预先存储的净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定第一净荷数据标识对应的校验数据标识为第二校验数据标识。将第二校验数据标识对应的校验数据块,作为第一净荷数据块对应的校验数据块。
第二方面,提供了一种数据传输的方法,方法包括:接收端接收发送端发送的净荷数据块,对净荷数据块进行校验,得到净荷数据块的校验结果。接收第一校验数据块。如果第一校验数据块对应的净荷数据块中校验失败数据块的数目为1,则对校验失败数据块进行数据恢复,其中,数目是根据每个净荷数据块的校验结果以及本地预先存储的净荷数据块与校验数据块的对应关系确定出的。
在本申请实施例提供的方案中,接收端和发送端存储有相同的净荷数据块与校验数据块的对应关系,这样,接收端在接收到校验数据块后,可以根据存储的对应关系确定出对应的净荷数据块,或者在接收到净荷数据块后,可以根据存储的对应关系确定出对应的校验数据。
在一种可能的实现方式中,对于每个校验数据块可以记录其对应的校验失败数据块的数目,相应的,在接收到净荷数据块并对净荷数据块校验完成后,在净荷数据块的校验结果为校验失败的情况下,先根据本地预先存储的净荷数据块和校验数据块的对应关系,确定净荷数据块为第一校验数据块对应的校验失败数据块。然后,将记录的第一校验数据块对应的校验失败数据块的数目加1。
在一种可能的实现方式中,在对校验失败数据块进行数据恢复之后,将记录的第一校验数据块对应的校验失败数据块的数目减1。在校验失败数据块还对应有第二校验数据块的情况下,将记录的第二校验数据块对应的校验失败数据块的数目减1。如果第二校验数据块对应的校验失败数据块的数目减1后为1,则对第二校验数据块对应的校验失败数据块进行数据恢复。
在本申请实施例所示的方案中,一个净荷数据块可能参与了多个校验数据块的生成,那么,在对校验失败数据块进行数据恢复后,如果该校验失败数据块还对应有其他校验数据块,则可以判断对应的其他校验数据块当前的校验失败数据块的数目是否为1,如果对应的其他校验数据块当前的校验失败数据块的数目为1,则可以对对应的其他校验数据块的校验失败数据块进行数据恢复。
在一种可能的实现方式中,净荷数据块和校验数据块的对应关系可以为净荷数据块的接收次序和校验数据块的接收次序的对应关系,相应的,确定净荷数据块为第一校验数据块对应的校验失败数据块的处理可以如下:确定净荷数据块在当前净荷数据发送周期中的第一接收次序。根据本地预先存储的净荷数据块的接收次序和校验数据块的接收次序的对应关系,确定第一接收次序对应的校验数据块的第二接收次序,将净荷数据块作为在当前校验数据接收周期中接收次序为第二接收次序的第一校验数据块对应的校验失败数据块。
在本申请实施例所示的方案中,发送端按照预设的净荷数据发送周期发送净荷数据块,按照预设的校验数据发送周期发送校验数据块,且一个净荷数据发送周期对应一个校验数据发送周期。
相应的,在接收端可以通过第一计数器来记录接收到净荷数据块在当前净荷数据发送周期中的接收次序,同样的,也可以通过第二计数器来记录接收到校验数据块在当前校验数据发送周期中的接收次序。
当第一计数器的计数值达到一个净荷数据发送周期对应的净荷数据块数目时,将第一计数器清零,表示一个净荷数据发送周期结束,下一个净荷数据发送周期开始。同样的,当第二计数器的计数值达到一个校验数据发送周期对应的校验数据块数目时,将第二计数器清零,表示一个校验数据发送周期结束,下一个校验数据发送周期开始。
在一种可能的实现方式中,净荷数据块和校验数据块的对应关系可以为净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,相应的,确定净荷数据块为第一校验数据块对应的校验失败数据块的处理如下:确定净荷数据块中携带的第一净荷数据标识。根据本地预先存储的净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定第一净荷数据标识对应的第一校验数据标识,将净荷数据块作为第一净荷数据标识所对应的第一校验数据块对应的校验失败数据块。
在一种可能的实现方式中,为了实现对校验失败数据块的恢复,对于每个校验数据块可以记录该校验数据块对应的校验成功数据块的净荷异或结果,具体的,处理可以如下:在净荷数据块校验成功的情况下,根据本地预先存储的净荷数据块和校验数据块的对应关系,将所述净荷数据块作为所述第一校验数据块对应的校验成功数据。根据净荷数据块,更新记录的第一校验数据块对应的校验成功数据块的净荷异或结果。
在一种可能的实现方式中,对校验失败数据块进行数据恢复的处理可以如下:根据第一校验数据块和记录的第一校验数据块对应的校验成功数据块的净荷异或结果,对第一校验数据块对应的校验失败数据块进行数据恢复。
在一种可能的实现方式中,可以不记录每个校验数据块对应的校验失败数据块的数目,而是在接收第一校验数据块之后,根据本地预设存储的净荷数据块和校验数据块的对应关系,确定第一校验数据块对应的净荷数据块中的校验失败数据块的数目。
相应的,在对校验失败数据块进行数据恢复时,可以先根据本地预先存储的净荷数据块 和校验数据块的对应关系,确定第一校验数据块对应的校验成功数据块。并计算第一校验数据块对应的校验成功数据块的净荷异或结果。根据净荷异或结果,对第一校验数据块对应的校验失败数据块进行数据恢复。
在一种可能的实现方式中,对净荷数据块的校验可以有如下处理:接收发送端发送的净荷数据块,根据净荷数据块中携带的校验数据,对净荷数据块中携带的净荷数据进行校验。
第三方面,提供了一种通信系统,所述通信系统包括发送端和接收端,所述发送端和所述接收端中均预先存储有相同的净荷数据块和校验数据块的对应关系,其中,
所述发送端,用于获取第一净荷数据块,根据第一净荷数据块的净荷数据、以及净荷数据块和校验数据块的对应关系,生成所述第一净荷数据块对应的第一校验数据块,向接收端发送所述第一净荷数据块和所述第一校验数据块;
所述接收端,用于接收所述第一净荷数据块,对所述第一净荷数据块进行校验,得到所述第一净荷数据块的校验结果,如果接收的校验数据块对应的净荷数据块中校验失败数据块的数目为1,则根据接收的对所述校验数据块,对所述校验失败数据块进行数据恢复,其中,所述数目是根据每个净荷数据块的校验结果以及所述净荷数据块与校验数据块的对应关系确定出的。
在一种可能的实现方式中,所述发送端,用于:
确定所述第一净荷数据块在当前净荷数据发送周期中的第一发送次序;
根据本地预先存储的净荷数据块的发送次序和校验数据块的发送次序的对应关系,确定所述第一发送次序对应的校验数据块的发送次序为第二发送次序;
根据所述第一净荷数据块的净荷数据,生成当前校验数据发送周期中发送次序为所述第二发送次序的第一校验数据块,其中,每个净荷数据发送周期对应一个校验数据发送周期。
在一种可能的实现方式中,所述发送端,用于:
根据预先存储的净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定所述第一净荷数据标识对应的校验数据标识为第二校验数据标识;
根据所述第一净荷数据块的净荷数据,生成所述第二校验数据标识对应的校验数据块。
第四方面,提供了一种数据传输的装置,所述装置包括:
获取模块,用于获取第一净荷数据块;
生成模块,用于根据所述第一净荷数据块的净荷数据、以及本地预先存储的净荷数据块和校验数据块的对应关系,生成所述第一净荷数据块对应的第一校验数据块;
发送模块,用于向接收端发送所述第一净荷数据块和所述第一校验数据块。
在一种可能的实现方式中,所述第一净荷数据块对应一个或多个第一校验数据块。
在一种可能的实现方式中,所述生成模块,用于:
确定所述第一净荷数据块在当前净荷数据发送周期中的第一发送次序;
根据本地预先存储的净荷数据块的发送次序和校验数据块的发送次序的对应关系,确定所述第一发送次序对应的校验数据块的发送次序为第二发送次序;
根据所述第一净荷数据块的净荷数据,生成当前校验数据发送周期中发送次序为所述第二发送次序的第一校验数据块,其中,每个净荷数据发送周期对应一个校验数据发送周期。
在一种可能的实现方式中,所述发送模块,用于:
根据所述第一净荷数据块在所述当前净荷数据发送周期中的发送次序,发送所述第一净荷数据块;
根据所述第一校验数据块在所述当前校验数据发送周期中的所述第一发送次序,发送所述第一校验数据块。
在一种可能的实现方式中,所述第一净荷数据块中携带第一净荷数据标识,所述生成模块,用于:
根据预先存储的净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定所述第一净荷数据标识对应的校验数据标识为第二校验数据标识;
根据所述第一净荷数据块的净荷数据,生成所述第二校验数据标识对应的校验数据块。
第五方面,提供了一种数据传输的装置,所述装置包括:
校验模块,用于接收发送端发送的净荷数据块,对所述净荷数据块进行校验,得到所述净荷数据块的校验结果;
接收模块,用于接收第一校验数据块;
恢复模块,用于如果所述第一校验数据块对应的净荷数据块中校验失败数据块的数目满足数据恢复条件,则对所述校验失败数据块进行数据恢复,其中,所述数目是根据每个净荷数据块的校验结果以及本地预先存储的净荷数据块与校验数据块的对应关系确定出的。
在一种可能的实现方式中,所述恢复模块,还用于:
在所述净荷数据块的校验结果为校验失败的情况下,根据本地预先存储的净荷数据块和校验数据块的对应关系,确定所述净荷数据块为所述第一校验数据块对应的校验失败数据块。
在一种可能的实现方式中,所述恢复模块,还用于:
将记录的所述第一校验数据块对应的校验失败数据块的数目加1;
所述恢复模块,用于:
如果所述第一校验数据块对应的校验失败数据块的数目为1,则对所述校验失败数据块进行数据恢复。
在一种可能的实现方式中,所述恢复模块,还用于:
将记录的所述第一校验数据块对应的校验失败数据块的数目减1;
在所述校验失败数据块还对应有第二校验数据块的情况下,将记录的所述第二校验数据块对应的校验失败数据块的数目减1;
如果所述第二校验数据块对应的校验失败数据块的数目减1后为1,则对所述第二校验数据块对应的校验失败数据块进行数据恢复。
在一种可能的实现方式中,所述恢复模块,用于:
确定所述净荷数据块在当前净荷数据发送周期中的第一接收次序;
根据本地预先存储的净荷数据块的接收次序和校验数据块的接收次序的对应关系,确定所述第一接收次序对应的校验数据块的第二接收次序,将所述净荷数据块作为在当前校验数据接收周期中接收次序为所述第二接收次序的第一校验数据块对应的校验失败数据块。
在一种可能的实现方式中,所述恢复模块,用于:
确定所述净荷数据块中携带的第一净荷数据标识;
根据本地预先存储的净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定所述第一净荷数据标识对应的第一校验数据标识,将所述净荷数据块作为所述第一净荷数据标识所对应的第一校验数据块对应的校验失败数据块。
在一种可能的实现方式中,所述恢复模块,还用于:
在所述净荷数据块校验成功的情况下,根据本地预先存储的净荷数据块和校验数据块的对应关系,将所述净荷数据块作为所述第一校验数据块对应的校验成功数据块;
根据所述净荷数据块,更新记录的所述第一校验数据块对应的校验成功数据块的净荷异或结果。
在一种可能的实现方式中,所述恢复模块,用于:
根据所述第一校验数据块和记录的所述第一校验数据块对应的校验成功数据块的净荷异或结果,对所述第一校验数据块对应的校验失败数据块进行数据恢复。
在一种可能的实现方式中,所述恢复模块,还用于:
根据本地预设存储的净荷数据块和校验数据块的对应关系,确定所述第一校验数据块对应的净荷数据块中的校验失败数据块的数目。
在一种可能的实现方式中,所述恢复模块,用于:
根据本地预先存储的净荷数据块和校验数据块的对应关系,确定所述第一校验数据块对应的校验成功数据块;
计算所述第一校验数据块对应的校验成功数据块的净荷异或结果;
根据所述净荷异或结果,对所述第一校验数据块对应的校验失败数据块进行数据恢复。
第六方面,提供了一种发送端,所述发送端包括处理器和存储器,所述存储器中存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如上述第一方面所述的数据传输的方法。
第七方面,提供了一种接收端,所述发送端包括处理器和存储器,所述存储器中存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如上述第二方面所述的数据传输的方法。
第八方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述至少一条指令由处理器加载并执行以实现如上述第一方面或第二方面所述的数据传输的方法。
附图说明
图1是本申请实施例提供的一种通信系统示意图;
图2是本申请实施例提供的一种数据传输的方法流程图;
图3是本申请实施例提供的一种净荷数据块的结构示意图;
图4是本申请实施例提供的一种以太网架构示意图;
图5是本申请实施例提供的一种MAC数据帧和净荷数据块之间的关系示意图;
图6是本申请实施例提供的一种数据传输的装置结构示意图;
图7是本申请实施例提供的一种数据传输的装置结构示意图;
图8是本申请实施例提供的一种通信设备的结构示意图。
具体实施方式
本申请实施例提供了一种数据传输的方法,该方法可以用于通信系统中,参见图1,通信系统可以包括发送端和接收端。其中,发送端和接收端均可以为计算机、服务器等通信设备。
在本申请实施例提供的数据传输的方法中,净荷数据块和校验数据块的对应关系是预先约定并存储在发送端和接收端的,也即是,发送端和接收端预先存储的净荷数据块和校验数据块的对应关系是相同的。这样,发送端在生成校验数据块时,不再随机选择净荷数据块进行生成,而是根据存储的净荷数据块和校验数据块的对应关系,选择对应的净荷数据块生成校验数据块。因为在接收端也存储有净荷数据块和校验数据块的对应关系,所以发送端也就无需再向接收端发送该对应关系,可以节省链路的有效带宽。
参见图2,本申请实施例提供的数据传输的方法,可以包括如下处理步骤。
步骤201、发送端对待发送数据进行定长处理,得到待发送数据对应的净荷数据块。
在实施中,发送端根据实际业务需求获取待发送数据,对待发送数据进行定长处理。
定长处理可以为:发送端可以将待发送数据切分为至少一份预设长度的数据。在切分得到每份预设长度的数据时,可以按照预设子长度进行切分。例如,预设长度为62字节(bytes),在对待发送数据切分时,可以依次按照预设子长度16字节、16字节、16字节和14字节切分,得到一份62字节的数据。
在一种可能的情况下,待发送数据的长度不是预设长度的整数倍,在切分时,对于剩余的小于预设长度的待发送数据,可以将这部分待发送数据补齐为预设长度。具体补齐方式本申请不做限定,例如,可以在末尾补零。
对于得到的每份预设长度的数据,发送端分别进行校验编码,得到对应的校验数据。此处,校验编码可以为循环冗余校验(cyclic redundancy check,CRC)编码等。
另外,对于每份预设长度的数据还可以添加标识数据,在不同的实现方式中,标识数据的作用也可以不同,具体的在以下实施例中进行介绍。
通过上述处理,每份预设长度的数据均对应有校验数据和标识数据。发送端按照预设的净荷数据块结构,对于每份预设长度的数据,将该预设长度的数据作为净荷数据,并将净荷数据、对应的标识数据和对应的校验数据进行组合,得到相应的净荷数据块。这样,参见图3,一个净荷数据块可以包括标识数据、净荷数据和校验数据三部分。
参见如下表1,示例性的给出了几种净荷数据块的字段划分情况。
表1
Figure PCTCN2022137337-appb-000001
Figure PCTCN2022137337-appb-000002
表1中,净荷数据长度即为上述预设长度,净荷数据长度的括号中为预设子长度。例如,对于净荷数据长度的第一行表示:净荷数据长度为62字节,预设长度为16字节、16字节、16字节和14字节。
此外,需要说明的是,净荷数据块还可以称为净荷数据帧等,本申请实施例对其具体名称不做限定。
在一种可能的实现方式中,本申请实施例在标准以太网架构中引入夹层(shimlayer)。如图4中的(a)所示,标准以太网架构包括物理介质相关(physical medium dependent,PMD)子层、物理介质连接(physical medium attachment,PMA)子层、物理编码子层(physical coding sublayer,PCS)、媒体访问控制(media access control,MAC)子层和更高层(higher layer)。如图4中的(b)所示,shimlayer位于MAC子层和PCS之间。
相应的,上述步骤201中的待发送数据可以为经过MAC子层封装后的MAC数据帧。Shimlayer对MAC数据帧进行定长处理。
参见图5,示出了一种MAC数据帧切分为净荷数据块的示意图。其中,MAC数据帧可以包括帧标识(frame token)、头部(header)、净荷(payload)、CRC数据和特殊格式数据段(IDLE)。一个MAC数据帧切分为X个净荷数据块,X为正整数,X取值与MAC数据帧的长度和预设长度有关。每个净荷数据块包括标识数据、净荷数据和校验数据。其中,净荷数据处的U 0、U 1……U n-1表示预设子长度。例如,净荷数据长度为62字节,那么,U 0、U 1……U n-1的取值可以为:U 0=16、U 1=16、U 2=16、U 3=14。
步骤202、根据预先存储的净荷数据块和校验数据块之间的对应关系,生成净荷数据块对应的校验数据块。
在实施中,发送端可以预先设置有净荷数据发送周期和校验数据发送周期。每N个连续发送的净荷数据块作为一个净荷数据发送周期。每个净荷数据发送周期对应有一个校验数据发送周期,每M个连续发送的校验数据块作为一个校验数据发送周期。每个校验数据周期内的M个校验数据块由对应的净荷数据发送周期中的N个净荷数据块生成。
净荷数据块和校验数据块之间的对应关系表示了校验数据块和净荷数据块之间的构造关系,下面假设一个净荷数据发送周期包括2n个净荷数据块,一个校验数据发送周期包括m个校验数据块,示例性的列举几种校验数据块和净荷数据块之间可能的构造关系。
构造关系一、
Figure PCTCN2022137337-appb-000003
构造关系二、
Figure PCTCN2022137337-appb-000004
其中,p 0、p 1...p m-1分别表示m个校验数据块的净荷数据,d 0、d 1...d 2n-1分别表示2n个净荷数据块的净荷数据,
Figure PCTCN2022137337-appb-000005
表示异或计算。
一个校验数据块可能由多个净荷数据块的净荷数据异或计算得到,在此情况下,在生成一个净荷数据块后,可能还无法计算得到该净荷数据块对应的校验数据块。因此,校验数据块的生成处理可以如下:
发送端每得到一个净荷数据块,可以根据预先存储的净荷数据块和校验数据块的对应关系,确定该净荷数据块对应的目标校验数据块。如果本地未缓存目标校验数据块的中间数据,则将该净荷数据块的净荷数据作为该目标校验数据块的中间数据进行缓存。如果本地缓存有目标校验数据块的中间数据,则将该净荷数据块的净荷数据与目标校验数据块的中间数据进行异或,以更新目标校验数据块的中间数据。此外,对于每个校验数据块来说,还可以记录当前缓存的该校验数据块的中间数据的组成数目,其中,组成数目表示当前缓存的中间数据是由几个净荷数据块得到的。
在确定当前缓存的目标校验数据块的中间数据满足完成条件时,将当前缓存的目标校验数据块的中间数据作为目标校验数据块的净荷数据。其中,完成条件是指当前缓存的目标校验数据块的中间数据的组成数目为目标校验数据块对应的净荷数据块数目。
在得到校验数据块的净荷数据后,可以对校验数据块的净荷数据进行校验编码,生成对应的校验数据。此处,校验编码可以为CRC编码等。
另外,还可以在净荷数据的基础上添加标识数据。在不同的实现方式中,标识数据的作用也可以不同,具体的在以下实施例中进行介绍。
这样,通过上述处理便可以得到一个包括标识数据、净荷数据和校验数据的校验数据块。此外,在生成校验数据块时,可以不对校验数据块的净荷数据进行校验编码,也即是,在生成的校验数据块中也可以不包括校验数据。
值得说明的是,上述净荷数据块和校验数据块的对应关系有多种可能的实现方式,下面分别针对几种不同的实现方式进行说明。
在一种可能的实现方式中,净荷数据块和校验数据块的对应关系可以为净荷数据块的发送次序和校验数据块的发送次序的对应关系。
其中,净荷数据块的发送次序是指净荷数据块在一个净荷数据发送周期内的发送次序,校验数据块的发送次序是指校验数据块在一个校验数据发送周期内的发送次序。发送端对于每个发送次序的校验数据块均缓存该校验数据块的中间数据。下面通过一个示例对此种实现方式下,校验数据块的净荷数据生成进行说明。
例如,一个净荷数据发送周期包括四个净荷数据块,一个校验数据周期包括三个校验数 据块。四个净荷数据块的发送次序和三个校验数据块的发送次序之间的对应关系如下表2所示。
表2
净荷数据块的发送次序 校验数据块的发送次序
T0 S0、S1、S2
T1 S2
T2 S1、S2
T3 S2
其中,T0、T1、T2、T3依次表示发送次序为第一位、第二位、第三位、第四位。S0、S1、S2依次表示发送次序为第一位、第二位、第三位。
表2中由上到下的第一个数据行表示:发送次序为第一位的净荷数据块参与生成发送次序为第一位、第二位、第三位的校验数据块。
第二个数据行表示:发送次序为第二位的净荷数据块参与生成发送次序为第三位的校验数据块。
第三个数据行表示:发送次序为第三位的净荷数据块参与生成发送次序为第二位和第三位的校验数据块。
第四个数据行表示:发送次序为第四位的净荷数据块参与生成发送次序为第三位的校验数据块。
此外,通过表2还可以获知发送次序为第一位的校验数据块需要由一个净荷数据块生成,该净荷数据块为:发送次序为第一位的净荷数据块。发送次序为第二位的校验数据块需要由两个净荷数据块生成,这两个净荷数据块为:发送次序为第一位和第三位的净荷数据块。发送次序为第三位的校验数据块需要由四个净荷数据块生成,这四个净荷数据块为:发送次序为第一位、第二位、第三位和第四位的净荷数据块。
相应的,校验数据块和净荷数据块之间的构造关系如下:
Figure PCTCN2022137337-appb-000006
其中,p 0是发送次序为第一位的校验数据块的净荷数据,p 1是发送次序为第二位的校验数据块的净荷数据,p 2是发送次序为第三位的校验数据块的净荷数据,d 0是发送次序为第一位的净荷数据块的净荷数据,d 1是发送次序为第二位的净荷数据块的净荷数据,d 2是发送次序为第三位的净荷数据块的净荷数据,d 3是发送次序为第四位的净荷数据块的净荷数据。
在得到发送次序为第一位的净荷数据块后,根据上述净荷数据块的发送次序和校验数据块的发送次序的对应关系,确定发送次序为第一位的净荷数据块对应发送次序为第一位、第二位和第三位的校验数据块。然后,确定本地还未缓存发送次序为第一位、第二位和第三位的校验数据块的中间数据,则将d 0作为发送次序为第一位、第二位和第三位的校验数据块的中间数据,如下公式所示:
Figure PCTCN2022137337-appb-000007
其中,p 0'、p 1'、p 2'分别表示发送次序为第一位、第二位和第三位的校验数据块的中间数据。
此外,还可以记录当前缓存的p 0'的组成数目为1,记录当前缓存的p 1'的组成数目为1,记录当前缓存的p 2'的组成数目为1。
发送端确定p 0'的组成数目为1,满足对应的完成条件,则将p 0'作为发送次序为第一位的校验数据块的净荷数据。在此情况下,可以将记录的p 0'的组成数目归零。
在得到发送次序为第二位的净荷数据块后,根据上述净荷数据块的发送次序和校验数据块的发送次序的对应关系,确定发送次序为第二位的净荷数据块对应发送次序为第三位的校验数据块。然后,将d 1与当前缓存的发送次序为第三位的校验数据块的中间数据异或,如下公式所示:
Figure PCTCN2022137337-appb-000008
此外,还可以对记录的各中间数据的组成数目进行更新,具体的,可以将当前缓存的p 2'的组成数目更新为2。
在得到发送次序为第三位的净荷数据块后,根据上述净荷数据块的发送次序和校验数据块的发送次序的对应关系,确定发送次序为第三位的净荷数据块对应发送次序为第二位和第三位的校验数据块。然后,将d 2与当前缓存的发送次序为第二位和第三位的校验数据块的中间数据异或,如下公式所示:
Figure PCTCN2022137337-appb-000009
此外,还可以对记录的各中间数据的组成数目进行更新,具体的,可以将当前缓存的p 1'的组成数目更新为2,将当前缓存的p 2'的组成数目更新为3。
发送端确定p 1'的组成数目为2,满足对应的完成条件,则将p 1'作为发送次序为第二位的校验数据块的净荷数据。在此情况下,可以将记录的p 1'的组成数目归零。
在得到发送次序为第四位的净荷数据块后,根据上述净荷数据块的发送次序和校验数据块的发送次序的对应关系,确定发送次序为第四位的净荷数据块对应发送次序为第三位的校验数据块。然后,将d 3与当前缓存的发送次序为第三位的校验数据块的中间数据异或,如下公式所示:
Figure PCTCN2022137337-appb-000010
此外,还可以对记录的各中间数据的组成数目进行更新,具体的,可以将当前缓存的p 2'的组成数目更新为4。
发送端确定p 2'的组成数目为4,满足对应的完成条件,则将p 2'作为发送次序为第三位的校验数据块的净荷数据。在此情况下,可以将记录的p 2'的组成数目归零。
需要说明的是,在此种实现方式中,上述标识数据用于标识数据块的类型,即区分数据块是净荷数据块还是校验数据块,相应的,各净荷数据块中的标识数据相同,各校验数据块中的标识数据相同,且净荷数据块中的标识数据和校验数据块中的标识数据不同。
在又一种可能的实现方式中,净荷数据块和校验数据块的对应关系可以为净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系。
假设每N个连续发送的净荷数据块作为一个净荷发送周期,那么,可以设置有N个不同的净荷数据标识。假设每M个连续发送的校验数据块作为一个校验数据发送周期,那么,可以设置有M个不同的校验数据标识。
在此情况下,上述步骤201中净荷数据块中的标识数据即可以为此处的净荷数据标识。相应的,在一个净荷数据发送周期内,在生成每个净荷数据块时,对应的净荷数据标识可以按照预设规则选取。
例如,N个净荷数据标识与一个净荷数据发送周期包括的N个净荷数据块的发送次序一一对应。生成一个净荷数据块时,根据该净荷数据块在当前净荷数据发送周期中的发送次序,根据发送次序,在N个净荷数据标识中选取对应的净荷数据标识。
又例如,在生成一个净荷数据块时,可以在N个净荷数据标识中进行不放回随机选取。其中,不放回随机选取是指每次选取均为随机选取,且在一个净荷数据发送周期内,如果某一个净荷数据标识已经被选取过,则不再选取该净荷数据标识。
下面通过一个示例对此种实现方式下,校验数据块的净荷数据生成进行说明。
例如,一个净荷数据发送周期包括四个净荷数据块,一个校验数据周期包括三个校验数据块。四个净荷数据块的净荷数据标识和三个校验数据块的校验数据标识之间的对应关系如下表3所示。
表3
净荷数据块的净荷数据标识 校验数据块的校验数据标识
D0 P0、P1、P2
D1 P2
D2 P1、P2
D3 P2
表3中由上到下的第一个数据行表示:净荷数据标识为D0的净荷数据块参与生成校验数据标识为P0、P1、P2的校验数据块。
第二个数据行表示:净荷数据标识为D1的净荷数据块参与生成校验数据标识为P2的校验数据块。
第三个数据行表示:净荷数据标识为D2的净荷数据块参与生成校验数据标识为P1、P2的校验数据块。
第四个数据行表示:净荷数据标识为D3的净荷数据块参与生成校验数据标识为P2的校验数据块。
此外,通过表3还可以获知校验数据标识为P0的校验数据块需要由一个净荷数据块生成,该净荷数据块为:净荷数据标识为D0净荷数据块。校验数据标识为P1的校验数据块需要由两个净荷数据块生成,这两个净荷数据块为:净荷数据标识为D0和D2的净荷数据块。校验数据标识为P2的校验数据块需要由四个净荷数据块生成,这四个净荷数据块为:净荷数据标识为D0、D1、D2和D3的净荷数据块。
相应的,校验数据块和净荷数据块之间的构造关系如下:
Figure PCTCN2022137337-appb-000011
其中,p 0是校验数据标识为P0的校验数据块的净荷数据,p 1是校验数据标识为P1的校验数据块的净荷数据,p 2是校验数据标识为P0的校验数据块的净荷数据,d 0是净荷数据标识为D0的净荷数据块的净荷数据,d 1是净荷数据标识为D1的净荷数据块的净荷数据,d 2是净荷数据标识为D2的净荷数据块的净荷数据,d 3是净荷数据标识为D3的净荷数据块的净荷数据。
在得到净荷数据标识为D0的净荷数据块后,根据上述净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定D0的净荷数据块对应的校验数据标识为P0、P1、P2。然后,确定本地还未缓存校验数据标识为P0、P1、P2的校验数据块的中间数据,则将d 0作为校验数据标识为P0、P1、P2的校验数据块的中间数据,如下公式所示:
Figure PCTCN2022137337-appb-000012
其中,p 0'、p 1'、p 2'分别表示发送次序为校验数据标识为P0、P1、P2的校验数据块的中间数据。
此外,还可以记录当前缓存的p 0'的组成数目为1,记录当前缓存的p 1'的组成数目为1,记录当前缓存的p 2'的组成数目为1。
发送端确定p 0'的组成数目为1,满足对应的完成条件,则将p 0'作为校验数据标识为P0的校验数据块的净荷数据。在此情况下,可以将记录的p 0'的组成数目归零。
在得到净荷数据标识为D1的净荷数据块后,根据上述净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定D1的净荷数据块对应的校验数据标识为P2。然后,将d 1与当前缓存的校验数据标识为P2的校验数据块的中间数据异或,如下公式所示:
Figure PCTCN2022137337-appb-000013
此外,还可以对记录的各中间数据的组成数目进行更新,具体的,可以将当前缓存的p 2'的组成数目更新为2。
在得到净荷数据标识为D2的净荷数据块后,根据上述净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定D2对应的校验数据标识为P1、P2。然后,将d 2与当前缓存的校验数据标识为P1、P2的校验数据块的中间数据异或,如下公式所示:
Figure PCTCN2022137337-appb-000014
此外,还可以对记录的各中间数据的组成数目进行更新,具体的,可以将当前缓存的p 1'的组成数目更新为2,将当前缓存的p 2'的组成数目更新为3。
发送端确定p 1'的组成数目为2,满足对应的完成条件,则将p 1'作为净荷数据标识为P1的校验数据块的净荷数据。在此情况下,可以将记录的p 1'的组成数目归零。
在得到净荷数据标识为D3的净荷数据块后,根据上述净荷数据块的净荷数据标识和校 验数据块的校验数据标识的对应关系,确定D3对应校验数据标识为P2。然后,将d 3与当前缓存的校验数据标识为P2的校验数据块的中间数据异或,如下公式所示:
Figure PCTCN2022137337-appb-000015
此外,还可以对记录的各中间数据的组成数目进行更新,具体的,可以将当前缓存的p 2'的组成数目更新为4。
发送端确定p 2'的组成数目为4,满足对应的完成条件,则将p 2'作为校验数据标识为P2的校验数据块的净荷数据。在此情况下,可以将记录的p 2'的组成数目归零。
需要说明的是,在此种实现方式中,校验数据块中携带的标识数据为校验数据标识,属于同一校验数据发送周期的校验数据块中携带的校验数据标识不同。净荷数据块中携带的标识数据为净荷数据标识,属于同一净荷数据发送周期的净荷数据块中携带的净荷数据标识不同。
步骤203、发送端发送净荷数据块和校验数据块。
在实施中,对于净荷数据块的发送,在净荷数据块中的净荷数据和对应的校验数据块的中间数据异或之后,便可以按照净荷数据块的发送次序向接收端发送该净荷数据块。
对于校验数据块的发送,可以在校验数据块生成后便向接收端发送。或者,在链路空闲时,再向接收端发送。链路空闲是指链路没有需要传输的净荷数据块。需要说明的是,在链路空闲时发送校验数据块的情况,需要保证所属校验数据发送周期在前的校验数据块已经发送完,再发送所属校验数据发送周期在后的校验数据块。
步骤204、接收端每当接收到净荷数据块,对该净荷数据块进行校验。
在实施中,接收端在接收到净荷数据块后,对该净荷数据块进行校验。校验方法可以如下:
对净荷数据块中的净荷数据进行校验编码生成比对校验数据。然后,将比对校验数据与净荷数据块中携带的校验数据进行比对。如果比对校验数据与净荷数据块中携带的校验数据不一致,则判定校验数据块校验失败,也即是,校验数据块的净荷数据中存在误码。如果比对校验数据与净荷数据块中携带的校验数据一致,则判定校验数据块校验成功。
需要说明的是,接收端进行校验时所使用校验编码与发送端生成校验数据时所使用的校验编码相同。
步骤205、接收端根据本地预先存储的净荷数据块和校验数据块的对应关系,确定净荷数据块对应的校验数据块。
其中,净荷数据块和校验数据块的对应关系可以为净荷数据块的接收次序和校验数据块的接收次序的对应关系。或者,净荷数据块和校验数据块的对应关系可以为净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系。
在实施中,该步骤205可以在步骤204之前执行,也可以在步骤204之后执行。
在净荷数据块和校验数据块的对应关系可以为净荷数据块的接收次序和校验数据块的接收次序的对应关系的情况下,接收端接收到一个净荷数据块之后,确定该净荷数据块在当前净荷数据发送周期中的接收次序。然后,根据本地存储的净荷数据块的接收次序和校验数据块的接收次序的对应关系,确定该净荷数据块的接收次序对应的校验数据块在当前校验数据 发送周期中的接收次序为第一接收次序。也即是,当前校验数据发送周期中第一接收次序的校验数据块为该净荷数据块对应的校验数据块。
在净荷数据块和校验数据块的对应关系可以为净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系的情况下,接收端接收到一个净荷数据块之后,获取该净荷数据块携带的目标净荷数据标识。然后,根据本地预先存储的净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定目标净荷数据标识对应的目标校验数据标识。也即是,目标校验数据标识所对应的校验数据为该净荷数据块对应的校验数据块。
在一种可能的实现方式中,对于一个校验数据发送周期的每个校验数据块来说,在接收端可以记录该校验数据块的相关信息。这样,在接收到每个校验数据块之后,可以直接根据记录的相关信息,对该校验数据块对应的校验失败数据块进行恢复。
参见表4,相关信息可以包括每个校验数据块对应的校验失败数据块的数目、每个校验数据块对应的校验失败数据块的标识和每个校验数据块对应的校验成功数据块的净荷异或结果。
在净荷数据块和校验数据块的对应关系为净荷数据块的接收次序和校验数据块的接收次序的对应关系的情况下,校验失败数据块的标识为该校验失败数据块在所属净荷数据发送周期中的接收次序的标识。在净荷数据块和校验数据块的对应关系为净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系的情况下,校验失败数据块的标识为携带的净荷数据标识。
表4
Figure PCTCN2022137337-appb-000016
其中,在净荷数据块和校验数据块的对应关系为净荷数据块的接收次序和校验数据块的接收次序的对应关系的情况下,校验数据块的标识为该校验数据块在所属校验数据发送周期中的接收次序的标识。在净荷数据块和校验数据块的对应关系为净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系的情况下,校验数据块的标识为携带的校验数据标识。
下面针对净荷数据块的不同校验结果,对更新校验数据块的相关信息进行说明。
如果判断净荷数据块校验失败,则将该净荷数据块的标识作为对应的校验数据块的校验失败数据块的标识进行记录,并将对应的校验数据块的校验失败数据块的数目加1。
例如,净荷数据块B3对应校验数据块A0,在净荷数据块B3校验失败的情况下,将B3作为校验数据块A0的校验失败数据块的标识进行记录。并且,将校验数据块A0对应的校验失败数据块的数目加1。更新后的相关信息,参见如下表5所示。
表5
Figure PCTCN2022137337-appb-000017
如果判断净荷数据块校验成功,则将该净荷数据块作为对应的校验数据块的校验成功数据块,将该净荷数据块的净荷数据和对应的校验数据块的校验成功数据块的净荷异或结果进行异或。
例如,净荷数据块B4对应校验数据块A1,在该净荷数据块B4校验成功的情况下,将该净荷数据块B4的净荷数据d 4和校验数据块A1的校验成功数据块的净荷异或结果进行异或。更新后的相关信息,参见如下表6所示。
表6
Figure PCTCN2022137337-appb-000018
步骤206、接收端每当接收到校验数据块,在该校验数据块对应的校验失败数据块的数目满足恢复条件的情况下,对该校验数据块的校验失败数据块进行数据恢复。
在实施中,接收端在接收到校验数据块之后,在记录的校验数据块的相关信息中,查询该校验数据块的相关信息。
在一种可能的情况下,接收端接收到校验数据块之后,确定该校验数据块在当前校验数据块接收周期中的目标接收次序。然后,在记录的校验数据块的相关信息中,查询目标接收次序的标识对应的相关信息。
在又一种可能的情况下,接收端接收到校验数据块之后,获取该校验数据块中携带的目标校验数据标识。然后,在记录的校验数据块的相关信息中,查询目标校验数据标识对应的相关信息。
查询到相关信息后,判断该校验数据块对应的校验失败数据块的数目是否为1,如果该校验数据块对应的校验失败数据块的数目为1,则可以对该校验数据块对应的校验失败数据块进行数据恢复。
例如,接收到校验数据块A1,在上述表6记录的校验数据块的相关信息中,查询到校验数据块A1的校验识别数据块数目为1,则可以对该校验失败数据块B2进行恢复。
如果该校验数据块对应的校验失败数据块的数目不为1,则需要先将该校验数据块进行缓存。
例如,接收到校验数据块A0,在上述表6记录的校验数据块的相关信息中,查询到校验数据块A1的校验识别数据块数目为2,即不为1,则可以先将该校验数据块A0进行缓存。
对校验失败数据块的数据恢复处理可以为:将校验数据块中的净荷数据与该校验数据块对应的校验成功数据块的净荷异或结果进行异或,即可得到该校验失败数据块的正确净荷数据。然后,可以根据正确净荷数据块对校验识别数据块中的错误数据进行恢复。
当一个校验失败数据块完成数据恢复后,将记录的校验失败数据块的标识进行删除,并将对应的校验数据块的校验失败数据块的数目减1。
此外,在对一个校验失败数据块完成数据恢复后,如果该校验失败数据块还对应有其他校验数据块,则获取该校验失败数据块进行数据恢复后的净荷数据,并将获取的净荷数据与该校验失败数据块对应的其他校验数据块的校验成功数据块的净荷异或结果进行异或。
例如,校验失败数据块B2完成数据恢复,则将表6中记录的B2删除,并将校验数据块A0对应的校验失败数据块的数目减1,将校验数据块A1对应的校验失败数据块的数目减1。此外,因为校验数据块A1的校验失败数据块均已恢复完成,则可以将校验数据块A1对应的校验成功数据块的净荷异或结果进行删除。
此外,校验失败数据块B2还对应有校验数据块A0,在此情况下,获取校验失败数据块B2数据恢复后的净荷数据d 2,将d 2与校验数据块A0对应的校验成功数据块的净荷异或结果d 0异或。更新后的相关信息,参见如下表7所示。
表7
Figure PCTCN2022137337-appb-000019
此外,在完成上述更新后,如果存在校验数据块的校验失败数据块的数目变为1,且本地缓存有该校验数据块,则对该校验数据块的校验失败数据块进行恢复。
例如,在完成上述更新后,校验数据块A0对应的校验失败数据块的数目变为1,且地缓存有校验数据块A0,则可以对校验数据块A0对应的校验失败数据块B3进行数据恢复。
另外,接收端还可以记录校验失败数据块的总数目,每当接收到一个校验失败的净荷数据块,将该总数目加1,每当有一个校验失败数据块完成数据恢复后,将该总数目减1。当该总数目为0时,则表明接收端所有的校验失败数据块均已完成数据恢复。
在一种可能的实现方式中,上述步骤205和步骤206可以替换为如下步骤207。
步骤207、每当接收到校验数据块,根据预先存储的净荷数据块和校验数据块的对应关系,确定接收到的校验数据块对应的校验失败数据块的数目,在该校验数据块对应的校验失败数据块的数目满足恢复条件的情况下,对该校验数据块的校验失败数据块进行数据恢复。
在实施中,在步骤204对净荷数据块校验完成后,如果净荷数据块校验失败,则将该净荷数据块作为校验失败数据块进行缓存,并记录该净荷数据块的标识。如果净荷数据块校验成功,则可以获取该净荷数据块的净荷数据进行缓存,并记录该净荷数据块的标识。此外,对于校验成功的净荷数据块的标识和校验失败的净荷数据块的标识需要分别记录。且对于校验失败的净荷数据块,可以建立净荷数据块的标识和对应的净荷数据块存储位置的对应关系,对于校验成功的净荷数据块,可以建立净荷数据块的标识和对应的净荷数据块的净荷数据存 储位置的对应关系,对于校验成功的净荷数据块。
对于净荷数据块的标识,在净荷数据块和校验数据块的对应关系为净荷数据块的接收次序和校验数据块的接收次序的对应关系的情况下,净荷数据块的标识为该净荷数据块在所属净荷数据发送周期中的接收次序的标识。在净荷数据块和校验数据块的对应关系为净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系的情况下,净荷数据块的标识为携带的净荷数据标识。
在接收到校验数据块之后,先根据预先存储的净荷数据块和校验数据块的对应关系,确定该校验数据块对应的校验失败数据块的数目。如果确定校验数据块对应的校验失败数据块的数目为1,则对该校验数据块对应的校验失败数据块进行数据恢复。
下面针对净荷数据块和校验数据块的对应关系的不同情况,对此处的处理进行说明。
情况一、净荷数据块和校验数据块的对应关系为净荷数据块的接收次序和校验数据块的接收次序的对应关系。
在此情况下,在接收到校验数据块之后,先确定该校验数据块在当前校验数据发送周期中的目标接收次序。然后,在本地存储的净荷数据块的接收次序和校验数据块的接收次序的对应关系中,确定目标接收次序对应的净荷数据块的接收次序。再然后,在记录的当前净荷数据发送周期中接收到的校验失败数据块的接收次序的标识中,确定与目标接收次序对应的净荷数据块的接收次序的标识相同的标识数目,作为该校验数据块对应的校验失败数据块的数目。
如果确定校验数据块对应的校验失败数据块的数目为1,则在记录的当前净荷数据发送周期接收到的校验成功数据块的接收次序的标识中,查询目标接收次序对应的净荷数据块的接收次序的目标标识。然后,在目标标识对应的净荷数据存储位置中获取缓存的净荷数据,并对获取的净荷数据和该校验数据块中携带的校验数据进行异或,得到对应的校验失败数据块的正确净荷数据。
情况二、净荷数据块和校验数据块的对应关系为净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系。
在此情况下,在接收到校验数据块之后,先获取该校验数据块中携带的目标校验数据标识。然后,在本地存储的净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系中,确定目标校验数据标识对应的净荷数据标识。再然后,在记录的当前净荷数据发送周期中接收到的校验失败数据块的净荷数据标识中,确定与目标校验数据标识对应的净荷数据标识相同的标识数目,作为该校验数据块对应的校验失败数据块的数目。
如果确定校验数据块对应的校验失败数据块的数目为1,则在记录的当前净荷数据发送周期接收到的校验成功数据块的净荷数据标识中,查询目标校验数据标识对应的目标净荷数据标识。然后,在目标净荷数据标识对应的净荷数据存储位置中获取缓存的净荷数据,并对获取的净荷数据和该校验数据块中携带的校验数据进行异或,得到对应的校验失败数据块的正确净荷数据。
在本申请中,净荷数据块和校验数据块的对应关系是预先约定并存储在发送端和接收端的,也即是,发送端和接收端预先存储的净荷数据块和校验数据块的对应关系是相同的。这样,发送端在生成校验数据块时,不再随机选择净荷数据块进行生成,而是根据存储的净荷数据块和校验数据块的对应关系,选择对应的净荷数据块生成校验数据块。因此,发送端也 就无需再向接收端发送该对应关系,可以节省链路的有效带宽。
基于相同的技术构思,本发明实施例还提供了一种数据传输的装置,如图6所示,该装置包括:
获取模块610,用于获取第一净荷数据;具体的,可以实现步骤201中获取净荷数据块的处理。
生成模块620,用于根据所述第一净荷数据块的净荷数据以及本地预先存储的净荷数据块和校验数据块的对应关系,生成所述第一净荷数据块对应的第一校验数据块;具体的,可以实现步骤202中生成校验数据块的处理。
发送模块630,用于向接收端发送所述第一净荷数据块和所述第一校验数据块。具体的,可以实现步骤203中的发送功能。
在一种可能的实现方式中,所述第一净荷数据块对应的一个或多个第一校验数据块。
在一种可能的实现方式中,所述生成模块620,用于:
确定所述第一净荷数据块在当前净荷数据发送周期中的第一发送次序;
根据本地预先存储的净荷数据块的发送次序和校验数据块的发送次序的对应关系,确定所述第一发送次序对应的校验数据块的发送次序为第二发送次序;
根据所述第一净荷数据块的净荷数据,生成当前校验数据发送周期中发送次序为所述第二发送次序的第一校验数据块,其中,每个净荷数据发送周期对应一个校验数据发送周期。
在一种可能的实现方式中,所述发送模块630,用于:
根据所述第一净荷数据块在所述当前净荷数据发送周期中的发送次序,发送所述第一净荷数据块;
根据所述第一校验数据块在所述当前校验数据发送周期中的所述第一发送次序,发送所述第一校验数据块。
在一种可能的实现方式中,所述第一净荷数据块中携带第一净荷数据标识,所述生成模块620,用于:
根据预先存储的净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定所述第一净荷数据标识对应的校验数据标识为第二校验数据标识;
根据所述第一净荷数据块的净荷数据,生成所述第二校验数据标识对应的校验数据块。
需要说明的是:上述实施例提供的数据传输的装置在进行数据传输时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将通信设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的数据传输的装置与数据传输的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
基于相同的技术构思,本发明实施例还提供了一种数据传输的装置,如图7所示,该装置包括:
校验模块710,用于接收发送端发送的净荷数据块,对所述净荷数据块进行校验,得到所述净荷数据块的校验结果;具体的,可以实现步骤204中的接收功能和校验功能。
接收模块720,用于接收第一校验数据块;具体的,可以实现步骤206中的接收功能。
恢复模块730,用于如果所述第一校验数据块对应的净荷数据块中校验失败数据块的数目满足数据恢复条件,则对所述校验失败数据块进行数据恢复,其中,所述数目是根据每个净荷数据块的校验结果以及本地预先存储的净荷数据块与校验数据块的对应关系确定出的。具体的,可以实现步骤206中的数据恢复功能。
在一种可能的实现方式中,所述恢复模块730,还用于:
在所述净荷数据块的校验结果为校验失败的情况下,根据本地预先存储的净荷数据块和校验数据块的对应关系,确定所述净荷数据块为所述第一校验数据块对应的校验失败数据块。
在一种可能的实现方式中,所述恢复模块730,还用于:
将记录的所述第一校验数据块对应的校验失败数据块的数目加1;
所述恢复模块,用于:
如果所述第一校验数据块对应的校验失败数据块的数目为1,则对所述校验失败数据块进行数据恢复。
在一种可能的实现方式中,所述恢复模块730,还用于:
将记录的所述第一校验数据块对应的校验失败数据块的数目减1;
在所述校验失败数据块还对应有第二校验数据块的情况下,将记录的所述第二校验数据块对应的校验失败数据块的数目减1;
如果所述第二校验数据块对应的校验失败数据块的数目减1后为1,则对所述第二校验数据块对应的校验失败数据块进行数据恢复。
在一种可能的实现方式中,所述恢复模块730,用于:
确定所述净荷数据块在当前净荷数据发送周期中的第一接收次序;
根据本地预先存储的净荷数据块的接收次序和校验数据块的接收次序的对应关系,确定所述第一接收次序对应的校验数据块的第二接收次序,将所述净荷数据块作为在当前校验数据接收周期中接收次序为所述第二接收次序的第一校验数据块对应的校验失败数据块。
在一种可能的实现方式中,所述恢复模块730,用于:
确定所述净荷数据块中携带的第一净荷数据标识;
根据本地预先存储的净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定所述第一净荷数据标识对应的第一校验数据标识,将所述净荷数据块作为所述第一净荷数据标识所对应的第一校验数据块对应的校验失败数据块。
在一种可能的实现方式中,所述恢复模块730,还用于:
在所述净荷数据块校验成功的情况下,根据本地预先存储的净荷数据块和校验数据块的对应关系,将所述净荷数据块作为所述第一校验数据块对应的校验成功数据块;
根据所述净荷数据块,更新记录的所述第一校验数据块对应的校验成功数据块的净荷异或结果。
在一种可能的实现方式中,所述恢复模块730,用于:
根据所述第一校验数据块和记录的所述第一校验数据块对应的校验成功数据块的净荷异或结果,对所述第一校验数据块对应的校验失败数据块进行数据恢复。
在一种可能的实现方式中,所述恢复模块730,还用于:
根据本地预设存储的净荷数据块和校验数据块的对应关系,确定所述第一校验数据块对应的净荷数据块中的校验失败数据块的数目。
在一种可能的实现方式中,所述恢复模块,用于:
根据本地预先存储的净荷数据块和校验数据块的对应关系,确定所述第一校验数据块对应的校验成功数据块;
计算所述第一校验数据块对应的校验成功数据块的净荷异或结果;
根据所述净荷异或结果,对所述第一校验数据块对应的校验失败数据块进行数据恢复。
需要说明的是:上述实施例提供的数据传输的装置在进行数据传输时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将通信设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的数据传输的装置与数据传输的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
参见图8,本申请实施例还提供了一种通信设备。通信设备800可以为图1所示的通信系统中的发送端或者接收端。通信设备800可以包括处理器810,与所述处理器810耦合连接的存储器820,收发器830。处理器810可以是中央处理器(central processing unit,CPU),网络处理器(Network Processor,NP)或者CPU和NP的组合。处理器还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(Application Specific Integrated Circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(Complex Programmable logic device,CPLD),现场可编程逻辑门阵列(Field Programmable Gate Array,FPGA),通用逻辑器件(generic array logic,GAL)或其任意组合。处理器810可以是指一个处理器,也可以包括多个处理器。存储器820可以包括易失性存储器(volatile memory),例如随机存取存储器(Random Access Memory,RAM);存储器也可以包括非易失性存储器(non-volatile memory),例如,只读存储器(Read-Only Memory,ROM),快闪存储器(flash memory),硬盘驱动器(Hard Disk Drive,HDD)或固态硬盘(Solid State Disk,SSD);存储器还可以包括上述种类的存储器的组合。存储器820可以是指一个存储器,也可以包括多个存储器。在一个实施方式中,存储器820中存储有计算机可读指令,处理器810执行存储器820中的计算机可读指令后,可以按照所述计算机可读指令的指示,执行如图2所示的数据传输的方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现,当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令,在设备上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴光缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是设备能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(如软盘、硬盘和磁带等),也可以是光介质(如数字视盘(Digital Video Disk,DVD)等),或者半导体介质(如固态硬盘等)。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请一个实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (24)

  1. 一种数据传输的方法,其特征在于,所述方法包括:
    获取第一净荷数据块;
    根据所述第一净荷数据块的净荷数据、以及本地预先存储的净荷数据块和校验数据块的对应关系,生成所述第一净荷数据块对应的第一校验数据块;
    向接收端发送所述第一净荷数据块和所述第一校验数据块。
  2. 根据权利要求1所述的方法,其特征在于,所述第一净荷数据块对应一个或多个第一校验数据块。
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据所述第一净荷数据块的净荷数据、以及本地预先存储的净荷数据块和校验数据块的对应关系,生成所述第一净荷数据块对应的第一校验数据块之前,还包括:
    确定所述第一净荷数据块在当前净荷数据发送周期中的第一发送次序;
    所述根据所述第一净荷数据块的净荷数据、以及本地预先存储的净荷数据块和校验数据块的对应关系,生成所述第一净荷数据块对应的第一校验数据块,包括:
    根据本地预先存储的净荷数据块的发送次序和校验数据块的发送次序的对应关系,确定所述第一发送次序对应的校验数据块的发送次序为第二发送次序;
    根据所述第一净荷数据块的净荷数据,生成当前校验数据发送周期中发送次序为所述第二发送次序的第一校验数据块,其中,每个净荷数据发送周期对应一个校验数据发送周期。
  4. 根据权利要求1或2所述的方法,其特征在于,所述据所述第一净荷数据块的净荷数据、以及本地预先存储的净荷数据块和校验数据块的对应关系,生成所述第一净荷数据块对应的第一校验数据块,包括:
    根据预先存储的净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定所述第一净荷数据标识对应的校验数据标识为第二校验数据标识;
    根据所述第一净荷数据块的净荷数据,生成所述第二校验数据标识对应的校验数据块。
  5. 一种数据传输的方法,其特征在于,所述方法包括:
    接收发送端发送的净荷数据块,对所述净荷数据块进行校验,得到所述净荷数据块的校验结果;
    接收第一校验数据块;
    如果所述第一校验数据块对应的净荷数据块中校验失败数据块的数目为1,则对所述校验失败数据块进行数据恢复,其中,所述数目是根据每个净荷数据块的校验结果以及本地预先存储的净荷数据块与校验数据块的对应关系确定出的。
  6. 根据权利要求5所述的方法,其特征在于,所述发送端预先存储有所述净荷数据块与 校验数据块的对应关系。
  7. 根据权利要求5或6所述的方法,其特征在于,所述接收第一校验数据块之前,所述方法还包括:
    在所述净荷数据块的校验结果为校验失败的情况下,根据本地预先存储的净荷数据块和校验数据块的对应关系,确定所述净荷数据块为所述第一校验数据块对应的校验失败数据块。
  8. 根据权利要求7所述的方法,其特征在于,所述确定所述净荷数据块为所述第一校验数据块对应的校验失败数据块之后,所述方法还包括:
    将记录的所述第一校验数据块对应的校验失败数据块的数目加1。
  9. 根据权利要求8所述的方法,其特征在于,所述对所述校验失败数据块进行数据恢复之后,所述方法还包括:
    将记录的所述第一校验数据块对应的校验失败数据块的数目减1;
    在所述校验失败数据块还对应有第二校验数据块的情况下,将记录的所述第二校验数据块对应的校验失败数据块的数目减1;
    如果所述第二校验数据块对应的校验失败数据块的数目减1后为1,则对所述第二校验数据块对应的校验失败数据块进行数据恢复。
  10. 根据权利要求7-9中任一项所述的方法,其特征在于,所述根据本地预先存储的净荷数据块和校验数据块的对应关系,确定所述净荷数据块为所述第一校验数据块对应的校验失败数据块,包括:
    确定所述净荷数据块在当前净荷数据发送周期中的第一接收次序;
    根据本地预先存储的净荷数据块的接收次序和校验数据块的接收次序的对应关系,确定所述第一接收次序对应的校验数据块的第二接收次序,将所述净荷数据块作为在当前校验数据接收周期中接收次序为所述第二接收次序的第一校验数据块对应的校验失败数据块。
  11. 根据权利要求7-9中任一项所述的方法,其特征在于,所述根据本地预先存储的净荷数据块和校验数据块的对应关系,确定所述净荷数据块为所述第一校验数据块对应的校验失败数据块,包括:
    确定所述净荷数据块中携带的第一净荷数据标识;
    根据本地预先存储的净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定所述第一净荷数据标识对应的第一校验数据标识,将所述净荷数据块作为所述第一净荷数据标识所对应的第一校验数据块对应的校验失败数据块。
  12. 根据权利要求7-11中任一项所述的方法,其特征在于,所述方法还包括:
    在所述净荷数据块校验成功的情况下,根据本地预先存储的净荷数据块和校验数据块的对应关系,将所述净荷数据块作为所述第一校验数据块对应的校验成功数据块;
    根据所述净荷数据块,更新记录的所述第一校验数据块对应的校验成功数据块的净荷异 或结果。
  13. 根据权利要求12所述的方法,其特征在于,所述对所述第一校验数据块对应的校验失败数据块进行数据恢复,包括:
    根据所述第一校验数据块和记录的所述第一校验数据块对应的校验成功数据块的净荷异或结果,对所述第一校验数据块对应的校验失败数据块进行数据恢复。
  14. 根据权利要求5所述的方法,其特征在于,所述接收第一校验数据块之后,所述方法还包括:
    根据本地预设存储的净荷数据块和校验数据块的对应关系,确定所述第一校验数据块对应的净荷数据块中的校验失败数据块的数目。
  15. 根据权利要求14所述的方法,其特征在于,所述对所述第一校验数据块对应的校验失败数据块进行数据恢复,包括:
    根据本地预先存储的净荷数据块和校验数据块的对应关系,确定所述第一校验数据块对应的校验成功数据块;
    计算所述第一校验数据块对应的校验成功数据块的净荷异或结果;
    根据所述净荷异或结果,对所述第一校验数据块对应的校验失败数据块进行数据恢复。
  16. 根据权利要求5-15中任一项所述的方法,其特征在于,所述接收发送端发送的净荷数据块,对所述净荷数据块进行校验,包括:
    接收发送端发送的净荷数据块,根据所述净荷数据块中携带的校验数据,对所述净荷数据块中携带的净荷数据进行校验。
  17. 一种通信系统,其特征在于,所述通信系统包括发送端和接收端,所述发送端和所述接收端均预先存储有相同的净荷数据块和校验数据块的对应关系,其中,
    所述发送端,用于获取第一净荷数据块,根据所述第一净荷数据块的净荷数据、以及所述净荷数据块和校验数据块的对应关系,生成所述第一净荷数据块对应的第一校验数据块,向所述接收端发送所述第一净荷数据块和所述第一校验数据块;
    所述接收端,用于接收所述第一净荷数据块,对所述第一净荷数据块进行校验,得到所述第一净荷数据块的校验结果,如果接收的校验数据块对应的净荷数据块中校验失败数据块的数目为1,则根据接收的校验数据块对所述校验失败数据块进行数据恢复。
  18. 根据权利要求17所述的通信系统,其特征在于,所述发送端,用于:
    确定所述第一净荷数据块在当前净荷数据发送周期中的第一发送次序;
    根据本地预先存储的净荷数据块的发送次序和校验数据块的发送次序的对应关系,确定所述第一发送次序对应的校验数据块的发送次序为第二发送次序;
    根据所述第一净荷数据块的净荷数据,生成当前校验数据发送周期中发送次序为所述第二发送次序的第一校验数据块,其中,每个净荷数据发送周期对应一个校验数据发送周期。
  19. 根据权利要求17所述的通信系统,其特征在于,所述发送端,用于:
    根据预先存储的净荷数据块的净荷数据标识和校验数据块的校验数据标识的对应关系,确定所述第一净荷数据标识对应的校验数据标识为第二校验数据标识;
    根据所述第一净荷数据块的净荷数据,生成所述第二校验数据标识对应的校验数据块。
  20. 一种数据传输的装置,其特征在于,所述装置包括:
    获取模块,用于获取第一净荷数据块;
    生成模块,用于根据所述第一净荷数据块的净荷数据、以及本地预先存储的净荷数据块和校验数据块的对应关系,生成所述第一净荷数据块对应的第一校验数据块;
    发送模块,用于向接收端发送所述第一净荷数据块和所述第一校验数据块。
  21. 一种数据传输的装置,其特征在于,所述装置包括:
    校验模块,用于接收发送端发送的净荷数据块,对所述净荷数据块进行校验,得到所述净荷数据块的校验结果;
    接收模块,用于接收第一校验数据块;
    恢复模块,用于如果所述第一校验数据块对应的净荷数据块中校验失败数据块的数目满足数据恢复条件,则对所述校验失败数据块进行数据恢复,其中,所述数目是根据每个净荷数据块的校验结果以及本地预先存储的净荷数据块与校验数据块的对应关系确定出的。
  22. 一种发送端,其特征在于,所述发送端包括处理器和存储器,所述存储器中存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如权利要求1至4任一所述的数据传输的方法。
  23. 一种接收端,其特征在于,所述发送端包括处理器和存储器,所述存储器中存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如权利要求5至16任一所述的数据传输的方法。
  24. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有至少一条指令,所述至少一条指令由处理器加载并执行以实现如权利要求1至4或权利要求5至16任一所述的数据传输的方法。
PCT/CN2022/137337 2021-12-16 2022-12-07 数据传输的方法、装置和通信系统 WO2023109616A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111544176.X 2021-12-16
CN202111544176.XA CN116266777A (zh) 2021-12-16 2021-12-16 数据传输的方法、装置和通信系统

Publications (1)

Publication Number Publication Date
WO2023109616A1 true WO2023109616A1 (zh) 2023-06-22

Family

ID=86743216

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/137337 WO2023109616A1 (zh) 2021-12-16 2022-12-07 数据传输的方法、装置和通信系统

Country Status (2)

Country Link
CN (1) CN116266777A (zh)
WO (1) WO2023109616A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030185181A1 (en) * 1998-02-23 2003-10-02 Krishna Balachandran System and method for incremental redundancy transmission in a communication system
US20080034269A1 (en) * 2006-08-03 2008-02-07 Samsung Electronics Co., Ltd. Apparatus and method for recording data in information recording medium to which extra ecc is applied or reproducing data from the medium
US20080320104A1 (en) * 2007-06-19 2008-12-25 Turner Bryan C Streaming network coding
CN101662335A (zh) * 2009-09-15 2010-03-03 中国人民解放军国防科学技术大学 前向纠错编码方法、前向纠错译码方法及其装置
US20120317461A1 (en) * 2011-06-11 2012-12-13 Samsung Electronics Co. Ltd. Apparatus and method for transmitting and receiving packet in broadcasting and communication system
WO2021139751A1 (zh) * 2020-01-10 2021-07-15 维沃移动通信有限公司 数据处理方法、配置方法及通信设备
US20210271557A1 (en) * 2018-09-03 2021-09-02 Here Data Technology Data encoding, decoding and recovering method for a distributed storage system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030185181A1 (en) * 1998-02-23 2003-10-02 Krishna Balachandran System and method for incremental redundancy transmission in a communication system
US20080034269A1 (en) * 2006-08-03 2008-02-07 Samsung Electronics Co., Ltd. Apparatus and method for recording data in information recording medium to which extra ecc is applied or reproducing data from the medium
US20080320104A1 (en) * 2007-06-19 2008-12-25 Turner Bryan C Streaming network coding
CN101662335A (zh) * 2009-09-15 2010-03-03 中国人民解放军国防科学技术大学 前向纠错编码方法、前向纠错译码方法及其装置
US20120317461A1 (en) * 2011-06-11 2012-12-13 Samsung Electronics Co. Ltd. Apparatus and method for transmitting and receiving packet in broadcasting and communication system
US20210271557A1 (en) * 2018-09-03 2021-09-02 Here Data Technology Data encoding, decoding and recovering method for a distributed storage system
WO2021139751A1 (zh) * 2020-01-10 2021-07-15 维沃移动通信有限公司 数据处理方法、配置方法及通信设备

Also Published As

Publication number Publication date
CN116266777A (zh) 2023-06-20

Similar Documents

Publication Publication Date Title
US9158806B2 (en) Integrity checking and selective deduplication based on network parameters
US11762745B2 (en) Encoding data based on targeted storage unit information
CN103444087B (zh) 使用弹性代码与柔性源块映射进行编码和解码
US6445717B1 (en) System for recovering lost information in a data stream
US9183073B2 (en) Maintaining data concurrency with a dispersed storage network
WO2021139751A1 (zh) 数据处理方法、配置方法及通信设备
WO2016058262A1 (zh) 一种基于二进制域里德所罗门码的数据编解码方法
US11134129B2 (en) System for determining whether to forward packet based on bit string within the packet
US8924439B2 (en) System for and method of partial file hashing
WO2011103741A1 (zh) 数据的校验处理方法及装置
EP3117546A1 (en) Low-delay packet erasure coding
CN103684684A (zh) 用于处理端到端网络连接的无线段上的分组的方法和系统
CN110519004B (zh) 一种编码方法及相关设备
WO2023109616A1 (zh) 数据传输的方法、装置和通信系统
US20090074046A1 (en) Data Structure Boundary Synchronization Between a Transmitter and Receiver
US7516393B2 (en) System and method of error detection for unordered data delivery
WO2023051424A1 (zh) 一种基于纠删码的编码方法以及相关设备
WO2019214265A1 (zh) 计算循环冗余校验crc编码的方法及装置
WO2022105753A1 (zh) 网络数据编码传输方法及装置
JP2023552774A (ja) 相互参照を用いてブロック・テンプレートをストリーミングする方法及びシステム
CN110138505B (zh) 一种异构协议转换的crc计算方法及系统
US8065374B2 (en) Application-level lossless compression
WO2020200304A1 (zh) 一种数据传输的方法和装置
WO2011144179A2 (zh) 对数据包进行循环冗余校验的方法及装置
US20220294560A1 (en) Fast Cyclic Redundancy Check: Utilizing Linearity of Cyclic Redundancy Check for Accelerating Correction of Corrupted Network Packets

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

Country of ref document: EP

Kind code of ref document: A1