CN116232550A - Link layer error data retransmission method, system and storage medium - Google Patents

Link layer error data retransmission method, system and storage medium Download PDF

Info

Publication number
CN116232550A
CN116232550A CN202310036918.0A CN202310036918A CN116232550A CN 116232550 A CN116232550 A CN 116232550A CN 202310036918 A CN202310036918 A CN 202310036918A CN 116232550 A CN116232550 A CN 116232550A
Authority
CN
China
Prior art keywords
data
retransmission
state
receiving
frames
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310036918.0A
Other languages
Chinese (zh)
Inventor
庄戌堃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
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 Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202310036918.0A priority Critical patent/CN116232550A/en
Publication of CN116232550A publication Critical patent/CN116232550A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • H04L1/1835Buffer management
    • H04L1/1841Resequencing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end

Abstract

The invention provides a link layer error data retransmission method, which comprises the following steps: selecting N frames of data, wherein N is a natural number greater than or equal to 1, and adding sequential codes representing the sequence into the frame head of each data frame; sequentially sending N frames of data frames serving as a group of data; respectively performing CRC (cyclic redundancy check) on N frames of data in the received group of data, returning a confirmation instruction containing sequential encoding of the data frame with no error in terms of the check, and returning a retransmission instruction containing sequential encoding of the specific data frame with respect to the specific data frame with the error in terms of the check; retransmitting a specific data frame pointed by the sequence code according to the sequence code in the received retransmission instruction; performing CRC (cyclic redundancy check) on the retransmitted specific data frame again, and returning a confirmation instruction when the specific data frame is checked without errors; and after receiving the confirmation instructions of all the data frames in the group of data, completing the transmission of the group of data and carrying out the transmission of the next group of data.

Description

Link layer error data retransmission method, system and storage medium
Technical Field
The present invention relates to the field of computers, and in particular, to a method, a system, and a storage medium for retransmitting link layer error data.
Background
The data link layer is a second layer of the OSI reference model (open system interconnection communication reference model), interposed between the physical layer and the network layer, and provides services to the network layer based on the services provided by the physical layer, the most basic of which is a target network layer that reliably transfers data from the physical layer to a neighboring node.
The data link layer must have a series of corresponding functions to combine data into data blocks, also called frames, control the transmission of frames over the physical channel without errors, provide management of the establishment, maintenance, release, etc. of the data link path between the two communicating entities.
The reliable transmission of the data link layer is very important, and directly determines the quality of data communication, and the link layer must have a function of retransmitting error data so as to ensure the reliable transmission of the data.
Disclosure of Invention
Currently, the link layer mainly uses an error detection technique (for example, cyclic redundancy check CRC), and the data link layer of the receiving side can detect whether a frame generates an error during transmission.
Currently, there are three main protocols for achieving reliable transmission: (1) a stop-wait protocol; (2) rollback N frame protocol; (3) selecting a retransmission protocol. All three reliable transmission protocols are widely used for link layer data retransmission, but each of the three protocols has advantages and disadvantages.
The stop-wait protocol is that a sender sends data, a receiver returns an ACK acknowledgement to the sender after receiving the data, the sender receives the ACK and then sends the next frame of data, and if the CRC check error or the data frame loss is found, the TIMEOUT of a TIMEOUT counter is carried out, and the data frame is resent. The protocol is simple and reliable, but sends out one frame of acknowledgement and has extremely low channel utilization.
The rollback N-frame protocol is updated based on the stop-wait protocol, and can send multiple frames at a time, and then return an ACK, so that the channel utilization rate is improved, but the information of the data packet which has been correctly received by the receiver cannot be reflected to the sender in time. When a CRC check error occurs or a data frame is lost, all retransmission is needed, and the efficiency is low.
The retransmission protocol is selected, and only the wrong or lost data frame is retransmitted for the wrong data frame or the lost data frame on the basis of the rollback N frame protocol, but due to the fact that a sliding window is required to be realized by the protocol, the problem of repeated receiving possibly occurs due to improper setting of the sliding window.
In view of the above, the present invention is directed to a link layer error data retransmission method, system, storage medium and apparatus for solving the drawbacks of the conventional transmission protocol.
Based on the above object, the present invention provides a link layer error data retransmission method, comprising the following steps:
selecting N frames of data, wherein N is a natural number greater than or equal to 1, and adding sequential codes representing the sequence into the frame head of each data frame;
the N frames of data frames are used as a group of data to be sequentially transmitted;
respectively performing CRC (cyclic redundancy check) on N frames of data frames in the received group of data, returning a confirmation instruction of sequential encoding of the data frames with no check errors aiming at the data frames with no check errors, and returning a retransmission instruction of sequential encoding of the specific data frames aiming at the specific data frames with check errors;
retransmitting the specific data frame pointed by the sequence code according to the sequence code in the received retransmission instruction;
performing CRC (cyclic redundancy check) on the retransmitted specific data frame again, and returning a confirmation instruction when the specific data frame is checked without errors; and
and after receiving the confirmation instructions of all the data frames in the group of data, completing the transmission of the group of data and carrying out the transmission of the next group of data.
In some embodiments, the method further comprises setting a transmit buffer such that the transmit buffer depth is greater than N, placing the transmitted set of data into the transmit buffer for retransmission of the particular data frame, and, when transmission of the set of data is complete, clearing the transmit buffer for reading the next set of data.
In some embodiments, the method further comprises setting a receive buffer to a depth greater than N, placing the error-free data frame into the receive buffer, and, when the transmission of the set of data is complete, clearing the receive buffer for receiving the next set of data.
In some embodiments, the method further comprises switching the received retransmission state. Switching the receiving retransmission state to an IDLE state when waiting for receiving data; when the group of data has no CRC check error, switching the receiving retransmission state to a NORMAL state; when a CRC check error is detected in the group of data, switching the receiving retransmission state to a REQ state, sending the retransmission instruction and the confirmation instruction according to the condition of each data frame in the group of data in the REQ state, and switching the receiving retransmission state to an IDLE state; when the specific data frame which is retransmitted is received and passes the CRC, the receiving retransmission state is switched to a NORMAL state; and when the specific data frame which is retransmitted is not received, switching the receiving retransmission state to an ABORT state, and waiting for the link connection to be carried out again.
In some embodiments, the method further comprises performing a retransmission receive timing. Starting the retransmission receiving timing after transmitting the retransmission request, and retransmitting the retransmission request when the first time limit is exceeded and the retransmitted specific data frame is not received; when the number of times of sending the retransmission request reaches the first preset number of times and the specific data frame which is retransmitted is not received, the receiving retransmission state is switched to an ABORT state, and the link connection is waited to be carried out again.
In some embodiments, the method further comprises switching the transmission retransmission state. After the group of data is sent, the sending retransmission state is switched to an IDLE state; switching the sending retransmission state to a NORMAL state when receiving acknowledgement instructions of all data frames of the group of data; when receiving a retransmission instruction, switching the transmission retransmission state to an ACK state, retransmitting the specific data frame according to sequential codes in the retransmission instruction in the ACK state, and switching the transmission retransmission state to an IDLE state; and when the retransmission is repeated for a plurality of times and the acknowledgement instruction is not received, switching the retransmission sending state to the ABORT state, and waiting for the link connection to be carried out again.
In some embodiments, the method further comprises performing a retransmission transmit timing. After retransmitting the specific data frame, starting the retransmission timing, and retransmitting the specific data frame again when the second time limit is exceeded and the confirmation instruction is not received; and when the number of times of retransmitting the specific data frame reaches a second preset number of times and no confirmation instruction is received, switching the retransmission sending state to an ABORT state, and waiting for the link connection to be restarted.
In another aspect of the present invention, there is also provided a link layer error data retransmission system, including: a transmitting module; and a receiving module. The transmitting module is used for selecting N frames of data, N is a natural number greater than or equal to 1, sequential codes representing the sequence are added into the frame header of each frame of data, and the N frames of data are used as a group of data to be sequentially transmitted. The receiving module is used for respectively performing CRC check on N frames of data frames in the group of data received, returning a confirmation instruction of sequential encoding of the data frames with no check errors aiming at the data frames with no check errors, and returning a retransmission instruction of sequential encoding of the specific data frames aiming at the specific data frames with check errors. The sending module is further configured to retransmit the specific data frame pointed by the sequential encoding according to the sequential encoding in the received retransmission instruction. The receiving module is also used for carrying out CRC check on the retransmitted specific data frame again, and returning a confirmation instruction when the specific data frame is checked without errors.
In some embodiments, the system further comprises a transmit buffer module disposed in the transmit module for setting a transmit buffer depth greater than N, placing the transmitted set of data into the transmit buffer for retransmission of the particular data frame, and when transmission of the set of data is complete, the transmit buffer module empties the transmit buffer for reading the next set of data.
In some embodiments, the system further comprises a receive buffer module disposed in the receive module for setting a receive buffer depth greater than N, placing the error-free data frame into the receive buffer, and when the transmission of the set of data is complete, the receive buffer module empties the receive buffer for receiving the next set of data.
In some embodiments, the system further comprises a receive retransmission state module disposed in the receiving module for receiving a switch of retransmission states. When the receiving module waits for receiving data, the receiving retransmission state module switches the receiving retransmission state to an IDLE state; when the group of data has no CRC check error, the receiving retransmission state module switches the receiving retransmission state to a NORMAL state; when a CRC check error is detected in the group of data, the receiving and retransmitting state module switches the receiving and retransmitting state to a REQ state, and in the REQ state, according to the condition of each data frame in the group of data, the receiving module sends the retransmitting instruction and the confirming instruction, and then the receiving and retransmitting state module switches the receiving and retransmitting state to an IDLE state; when the receiving module receives the retransmitted specific data frame and passes the CRC check, the receiving retransmission state module switches the receiving retransmission state to a NORMAL state; and when the receiving module does not receive the retransmitted specific data frame, the receiving retransmission state module switches the receiving retransmission state to an ABORT state and waits for the link connection to be carried out again.
In some embodiments, the system further comprises a first retransmission timing module disposed in the receiving module. And after the receiving module sends the retransmission request, the first retransmission timing module starts retransmission receiving timing, and when the first time limit is exceeded and the receiving module does not receive the retransmitted specific data frame, the receiving module sends the retransmission request again. And when the number of times that the receiving module sends the retransmission request reaches a first preset number of times and the receiving module does not receive the retransmitted specific data frame, the receiving retransmission state module switches the receiving retransmission state to an ABORT state and waits for the link connection to be carried out again.
In some embodiments, the system further includes a transmit retransmission status module disposed in the transmit module for switching of the transmit retransmission status. After the sending module sends data, the sending retransmission state module switches the sending retransmission state to an IDLE state; when the sending module receives the acknowledgement instruction of all data frames of the group of data, the sending retransmission state module switches the sending retransmission state to a NORMAL state; when the sending module receives a retransmission instruction, the sending retransmission state module switches the sending retransmission state to an ACK state, and in the ACK state, the sending module retransmits the specific data frame according to sequential codes in the retransmission instruction, and then the sending retransmission state module switches the sending retransmission state to an IDLE state; and when the sending module resends for a plurality of times and does not receive the confirmation instruction, the sending retransmission state module switches the sending retransmission state to an ABORT state and waits for the link connection to be carried out again.
In some embodiments, the system further comprises a second retransmission timing module disposed in the transmitting module. After the sending module resends the specific data frame, the second retransmission timing module starts retransmission sending timing, and when the second time limit is exceeded and the sending module does not receive a confirmation instruction, the specific data frame is resent again; and when the number of times that the sending module resends the specific data frame reaches a second preset number of times and no confirmation instruction is received, the sending retransmission state module switches the sending retransmission state to an ABORT state and waits for the link connection to be carried out again.
In yet another aspect of the present invention, there is also provided a computer readable storage medium storing computer program instructions which, when executed, implement any of the methods described above.
The invention has at least the following beneficial technical effects:
the invention provides a link layer error frame retransmission method system, a storage medium and equipment, which simultaneously solve the defects of a stop-wait protocol, a rollback N frame protocol and a selective retransmission protocol, realize the reliable transmission of a link layer data frame, can transmit multi-frame data in a grouping way, improve the utilization rate of a channel and solve the problem of low utilization rate of the channel; similarly, the state module records the transmission condition of the data frame, a sliding window is not required to be set, and the frame is only required to be retransmitted for the data frame with CRC check failure or the lost data frame, so that all retransmission is not required, the transmission efficiency is effectively improved, and the design of a link layer is greatly simplified.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a link layer error data retransmission method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of a link layer error data retransmission method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a link layer error data retransmission system according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a computer readable storage medium implementing a link layer error data retransmission method according to an embodiment of the present invention;
fig. 5 is a schematic hardware structure of a computer device for performing a link layer error data retransmission method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
It should be noted that, in the embodiments of the present invention, all the expressions "first" and "second" are used to distinguish two non-identical entities with the same name or non-identical parameters, and it is noted that the "first" and "second" are only used for convenience of expression, and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprise" and "have," and any variations thereof, are intended to cover a non-exclusive inclusion, such as a process, method, system, article, or other step or unit that comprises a list of steps or units.
Based on the above object, a first aspect of the embodiments of the present invention proposes an embodiment of a link layer error data retransmission method. Fig. 1 is a schematic diagram of an embodiment of a link layer error data retransmission method provided by the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
s10, selecting N frame data frames, wherein N is a natural number greater than or equal to 1, and adding sequential codes representing the sequence into the frame head of each data frame;
step S20, using the N frame data frames as a group of data, and sequentially transmitting the N frame data frames;
step S30, CRC check is carried out on N frames of data frames in the received group of data respectively, a confirmation instruction of sequential encoding of the data frames with no check is returned aiming at the data frames with no check, and a retransmission instruction of sequential encoding of the specific data frames is returned aiming at the specific data frames with check errors;
step S40, retransmitting the specific data frame pointed by the sequence code according to the sequence code in the received retransmission instruction;
s50, performing CRC check again on the retransmitted specific data frame, and returning a confirmation instruction when the specific data frame is checked without any error; and
step S60, after receiving the confirmation instruction of all data frames in a group of data, the transmission of the group of data is completed and the transmission of the next group of data is carried out.
When sequential encoding representing a sequence is added to the frame header of each data frame, for example, when n=5, it is necessary to sequentially encode, for example, 000, 001, 010, 011, 100, for each data frame, which is recorded in the frame header of the data frame, so that the receiving side sorts the received data frames.
Accordingly, the format in the ACK frame returned by the receiver also contains the corresponding sequential encoding to determine whether the particular data frame passes the check. For example, the lower three bits of the ACK frame may be the error frame code field, no error when coded 111, and error when coded 010, representing the third frame, and the sender may retransmit the third frame after receiving this code.
In some embodiments, the method further comprises setting a transmit buffer to a depth greater than N, placing the transmitted set of data in the transmit buffer for retransmission of the particular data frame, and, when transmission of the set of data is complete, clearing the transmit buffer for reading the next set of data. The method further includes setting a receive buffer to a depth greater than N, placing the error-proof data frame into the receive buffer, and when transmission of one set of data is completed, emptying the receive buffer for receiving a next set of data. For example, when n=5, the depth of the buffer area needs to be greater than 5, so that all 5 frames of data can be buffered.
In some embodiments, the method further comprises switching the received retransmission state. And when waiting for receiving the data, switching the receiving retransmission state to the IDLE state. When a group of data has no CRC check error, the receiving retransmission state is switched to the NORMAL state. When a CRC check error is detected in a group of data, the receiving retransmission state is switched to a REQ state, and in the REQ state, a retransmission instruction and an acknowledgement instruction are sent according to the condition of each data frame in the group of data. Specifically, in the REQ state, each group of conditions of each data frame may be recorded, and when an error occurs in a certain data frame, the coding of the frame is fed back to the sender, and the receiving retransmission state is switched to the IDLE state, and retransmission is awaited. When a specific data frame which is retransmitted is received and passes CRC check, switching a receiving retransmission state to a NORMAL state; when no specific data frame is received, the receiving retransmission state is switched to the ABORT state, and the link connection is waited to be carried out again.
In some embodiments, the method further comprises performing a retransmission receive timing. Starting retransmission reception timing after transmitting a retransmission request, and retransmitting the retransmission request when a first time limit is exceeded and a retransmitted specific data frame is not received; when the number of times of transmitting the retransmission request reaches the first predetermined number of times and the specific data frame of retransmission is not received, the received retransmission state is switched to the ABORT state, and the link connection is waited for to be carried out again.
For example, when the receiver sends a retransmission command, the receiver enters the IDLE state from the REQ state, and the counter is started at this time, and when TIMEOUT of timeout_1 (first time limit) occurs, if no retransmission data has been received yet, the retransmission command is sent again. When the REQ request signal arrives at MAX_NUM_REQ (a first predetermined number of times) and a retransmission data frame is not received, the method enters an ABORT state and the link connection is carried out again.
In some embodiments, the method further comprises switching the transmission retransmission state. After sending a group of data, switching the sending retransmission state to an IDLE state; when receiving the acknowledgement instruction of all data frames of a group of data, switching the sending retransmission state to the NORMAL state; when receiving a retransmission instruction, switching a transmission retransmission state to an ACK state, retransmitting a specific data frame according to sequential codes in the retransmission instruction in the ACK state, and switching the transmission retransmission state to an IDLE state; and when the retransmission is repeated for a plurality of times and the acknowledgement instruction is not received, switching the retransmission sending state to the ABORT state, and waiting for the link connection to be carried out again.
In some embodiments, the method further comprises performing a retransmission transmit timing. After retransmitting the specific data frame, starting retransmission timing, and retransmitting the specific data frame again when the second time limit is exceeded and the confirmation instruction is not received; and when the number of times of retransmitting the specific data frame reaches a second preset number of times and the confirmation instruction is not received, switching the retransmission sending state to the ABORT state, and waiting for the link connection to be carried out again.
For example, when the sender sends retransmission data, the sender enters the IDLE state from the ACK state, and the counter starts at this time, when timeout_2 (second time limit) expires, if no returned ACK acknowledgement is received, the retransmission frame is retransmitted, and when the number of retransmissions reaches max_num_ack (second predetermined number), no ACK is received, and the sender enters the ABORT state, and resumes the link connection.
The above-mentioned "first time limit", "second time limit", "first predetermined number of times", "second predetermined number of times" may be set according to actual needs.
The link layer error data retransmission method according to the present invention will be further described below by taking the embodiment shown in fig. 2 as an example. In this embodiment, the link layer error data retransmission method according to the present invention includes the steps of:
1) Selecting n=5, namely transmitting 5 frames of data at a time;
2) At this time, both state machines are in NORMAL state;
3) The sender sends 5 frames of data, which are encoded as 000, 001, 010, 011 and 100, and sends the 5 frames of data to the receiver in sequence;
4) After receiving the 5 frames of data, the receiver sequentially performs CRC (cyclic redundancy check) and puts the data without errors into a receiving buffer for waiting;
5) At this time, the receiver finds that the frame CRC encoded as 010 is checked for errors, and at this time, the receiver state machine enters the REQ state, and sends REQ to the sender: 010, indicating that 010 is in error, requesting retransmission. And send an ACK:000 001 011 100 shows that there is no problem with these four frames of data; after the transmission is completed, the state machine enters an IDLE state from the REQ, and a timeout_1 counter is started to wait for data retransmission.
6) After receiving REQ, the state machine enters an ACK state from a NORMAL state, the sender analyzes REQ data, takes out a frame coded into 010 from a sending buffer according to the coding, and sends the frame again, and after the sending is completed, the state machine enters an IDLE state from the ACK state, and a timeout_2 counter is started at the moment to wait for ACK to return;
7) And the receiving party receives retransmission data returned by the sending party, and the timeout_1 counter is cleared to stop working. The receiving side performs CRC check again on the retransmitted data frame, and if the check is passed, the receiving side sends ACK to the sending side: 010, indicating that the reception is correct. The state machine jumps from IDLE to NORMAL state. Meanwhile, the buffer is put into the buffer after the original data frames are reordered, when the data frames are reorganized and completely received without errors, the data frames in the buffer are sent to an upper layer for use, and the buffer is cleared and waits for the next data receiving.
8) The sender receives the ACK: after 010, timeout_1 counter is cleared to stop operation. The state machine jumps from IDLE to NORMAL state. And simultaneously, the transmission buffer is emptied to prepare for the next transmission.
Through the method, the retransmission of the error data is completed.
The link layer error data retransmission method of the embodiment of the invention simultaneously solves the defects of a stop-wait protocol, a rollback N frame protocol and a selective retransmission protocol, realizes the reliable transmission of a link layer data frame, can transmit multi-frame data in a grouping way, improves the channel utilization rate and solves the problem of low channel utilization rate; similarly, the state module records the transmission condition of the data frame, a sliding window is not required to be set, and the frame is only required to be retransmitted for the data frame with CRC check failure or the lost data frame, so that all retransmission is not required, the transmission efficiency is effectively improved, and the design of a link layer is greatly simplified.
In a second aspect of the embodiment of the present invention, a link layer error data retransmission system is also provided. Fig. 3 is a schematic diagram of an embodiment of a link layer error data retransmission system according to the present invention. As shown in fig. 3, a link layer error data retransmission system includes: a transmission module 10; and a receiving module 20. The transmitting module 10 is configured to select N frame data frames, where N is a natural number greater than or equal to 1, and add sequential codes representing a sequence to a frame header of each data frame, and sequentially transmit the N frame data frames as a set of data. The receiving module 20 is configured to perform CRC check on N frames of data in the received set of data, return, for a data frame with no error, a confirmation instruction of sequential encoding of the data frame with no error, and return, for a specific data frame with error, a retransmission instruction of sequential encoding of the specific data frame. The sending module 10 is further configured to retransmit the specific data frame pointed to by the sequential encoding according to the sequential encoding in the received retransmission instruction. The receiving module 20 is further configured to perform CRC check again on the retransmitted specific data frame, and return an acknowledgement command when the specific data frame is checked without any error.
In some embodiments, the system further comprises a transmission buffer module 101, the transmission buffer module 101 being arranged in the transmission module 10 for setting a transmission buffer depth to be greater than N, placing a transmitted set of data into the transmission buffer for retransmission of a particular data frame, and when transmission of the set of data is completed, the transmission buffer module 101 empties the transmission buffer for reading the next set of data.
In some embodiments, the system further comprises a receive buffer module 201, the receive buffer module 201 being disposed in the receive module 20 for setting the receive buffer depth to be greater than N, placing the error-free data frames into the receive buffer, and when the transmission of one set of data is completed, the receive buffer module 201 empties the receive buffer for receiving the next set of data.
In some embodiments, the system further comprises a receive retransmission status module 202, where the receive retransmission status module 202 is disposed in the receiving module 20 and is configured to receive a switch of retransmission status. While the receiving module 20 waits for receiving data, the receiving retransmission state module 202 switches the receiving retransmission state to the IDLE state; when a set of data has no CRC check error, the receiving retransmission state module 202 switches the receiving retransmission state to the NORMAL state; when a CRC check error is detected in a set of data, the receiving retransmission state module 202 switches the receiving retransmission state to the REQ state, in which the receiving module 20 transmits a retransmission instruction and an acknowledgement instruction according to the condition of each data frame in the set of data, and then the receiving retransmission state module 202 switches the receiving retransmission state to the IDLE state; when the receiving module 20 receives the retransmitted specific data frame and passes the CRC check, the receiving retransmission state module 202 switches the receiving retransmission state to the NORMAL state; when the receiving module 20 does not receive the retransmitted specific data frame, the receiving retransmission state module 202 switches the receiving retransmission state to the ABORT state, waiting for the link connection to be re-made.
In some embodiments, the system further comprises a first retransmission timing module 203, the first retransmission timing module 203 being provided in the receiving module 20. After the receiving module 20 sends the retransmission request, the first retransmission timing module 203 starts the retransmission reception timing, and when the first time limit is exceeded and the receiving module 20 does not receive the retransmitted specific data frame, the receiving module 20 sends the retransmission request again. When the number of times the receiving module 20 transmits the retransmission request reaches the first predetermined number of times and the receiving module 20 does not receive the retransmitted specific data frame, the receiving retransmission state module 202 switches the receiving retransmission state to the ABORT state, waiting for the link connection to be re-made.
In some embodiments, the system further comprises a transmission retransmission state module 102, where the transmission retransmission state module 102 is provided in the transmission module 10, for switching of transmission retransmission states. After the transmitting module 10 transmits the data, the transmitting retransmission state module 102 switches the transmitting retransmission state to the IDLE state; when the transmitting module 10 receives acknowledgement instructions of all data frames of a group of data, the transmitting retransmission state module 102 switches the transmitting retransmission state to the NORMAL state; when the transmitting module 10 receives the retransmission instruction, the transmitting retransmission state module 102 switches the transmitting retransmission state to the ACK state, in the ACK state, the transmitting module 10 retransmits the specific data frame according to the sequential codes in the retransmission instruction, and then the transmitting retransmission state module 102 switches the state to the IDLE state; when the transmitting module 10 retransmits a plurality of times and does not receive an acknowledgement instruction, the transmitting retransmission state module 102 switches the transmitting retransmission state to the ABORT state, waiting for the link connection to be resumed.
In some embodiments, the system further comprises a second retransmission timing module 103, the second retransmission timing module 103 being provided in the transmitting module 10. After the sending module resends the specific data frame, the second retransmission timing module 103 starts retransmitting the sending timing, and resends the specific data frame again when the second time limit is exceeded and the sending module 10 has not received the confirmation instruction; when the number of times the transmission module 10 retransmits the specific data frame reaches the second predetermined number of times and the acknowledgement instruction is not received, the transmission retransmission state module 102 switches the transmission retransmission state to the ABORT state, waiting for the link connection to be resumed.
The link layer error data retransmission system of the embodiment of the invention simultaneously solves the defects of a stop-wait protocol, a rollback N frame protocol and a selective retransmission protocol, realizes the reliable transmission of a link layer data frame, can transmit multi-frame data in a grouping way, improves the channel utilization rate and solves the problem of low channel utilization rate; similarly, the state module records the transmission condition of the data frame, a sliding window is not required to be set, and the frame is only required to be retransmitted for the data frame with CRC check failure or the lost data frame, so that all retransmission is not required, the transmission efficiency is effectively improved, and the design of a link layer is greatly simplified.
In a third aspect of the embodiments of the present invention, a computer readable storage medium is provided, and fig. 4 is a schematic diagram of a computer readable storage medium for implementing a link layer error data retransmission method according to an embodiment of the present invention. As shown in fig. 4, the computer-readable storage medium 3 stores computer program instructions 31, which computer program instructions 31 are executable by a processor. The computer program instructions 31 when executed implement the method of any of the embodiments described above.
It should be appreciated that all of the embodiments, features and advantages set forth above for a link layer error data retransmission method according to the present invention equally apply to a link layer error data retransmission system and storage medium according to the present invention without conflicting with each other.
In a fourth aspect of the embodiments of the present invention, there is also provided a computer device comprising a memory 402 and a processor 401, the memory storing a computer program which, when executed by the processor, implements the method of any of the embodiments described above.
Fig. 5 is a schematic hardware structure diagram of an embodiment of a computer device for performing a link layer error data retransmission method according to the present invention. Taking the example of a computer device as shown in fig. 5, a processor 401 and a memory 402 are included in the computer device, and may further include: an input device 403 and an output device 404. The processor 401, memory 402, input device 403, and output device 404 may be connected by a bus or otherwise, for example in fig. 5. The input device 403 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the link layer error data retransmission system. The output 404 may include a display device such as a display screen.
The memory 402 is used as a non-volatile computer readable storage medium, and may be used to store non-volatile software programs, non-volatile computer executable programs, and modules, such as program instructions/modules corresponding to the link layer error data retransmission method in the embodiments of the present application. Memory 402 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created using a link layer error data retransmission method, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 402 may optionally include memory located remotely from processor 401, which may be connected to the local module via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 401 executes various functional applications of the server and data processing, i.e., implements the link layer error data retransmission method of the above-described method embodiment, by running nonvolatile software programs, instructions, and modules stored in the memory 402.
Finally, it should be noted that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of example, and not limitation, RAM may be available in a variety of forms such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP and/or any other such configuration.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items. The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.

Claims (10)

1. A method for retransmitting link layer error data, comprising the steps of:
selecting N frames of data, wherein N is a natural number greater than or equal to 1, and adding sequential codes representing the sequence into the frame head of each data frame;
the N frames of data frames are used as a group of data to be sequentially transmitted;
respectively performing CRC (cyclic redundancy check) on N frames of data frames in the received group of data, returning a confirmation instruction of sequential encoding of the data frames with no check errors aiming at the data frames with no check errors, and returning a retransmission instruction of sequential encoding of the specific data frames aiming at the specific data frames with check errors;
retransmitting the specific data frame pointed by the sequence code according to the sequence code in the received retransmission instruction;
performing CRC (cyclic redundancy check) on the retransmitted specific data frame again, and returning a confirmation instruction when the specific data frame is checked without errors; and
and after receiving the confirmation instructions of all the data frames in the group of data, completing the transmission of the group of data and carrying out the transmission of the next group of data.
2. The method as recited in claim 1, further comprising:
setting a transmission buffer having a depth greater than N, placing the transmitted set of data into the transmission buffer for retransmission of the particular data frame, and
when the transmission of the set of data is completed, the transmission buffer is emptied for reading the next set of data.
3. The method of claim 1, further comprising:
setting a receiving buffer area, making the depth of the receiving buffer area greater than N, putting the data frame with no error into the receiving buffer area, and
when the transmission of the set of data is completed, the receiving buffer is emptied for receiving the next set of data.
4. The method of claim 1, further comprising:
the received retransmission state is switched, wherein,
switching the receiving retransmission state to an IDLE state when waiting for receiving data;
when the group of data has no CRC check error, switching the receiving retransmission state to a NORMAL state;
when a CRC check error is detected in the group of data, switching the receiving retransmission state to a REQ state, sending the retransmission instruction and the confirmation instruction according to the condition of each data frame in the group of data in the REQ state, and switching the receiving retransmission state to an IDLE state;
when the specific data frame which is retransmitted is received and passes the CRC, the receiving retransmission state is switched to a NORMAL state;
and when the specific data frame which is retransmitted is not received, switching the receiving retransmission state to an ABORT state, and waiting for the link connection to be carried out again.
5. The method of claim 4, further comprising:
a retransmission receive timing is performed, wherein,
starting the retransmission receiving timing after transmitting the retransmission request, and retransmitting the retransmission request when the first time limit is exceeded and the retransmitted specific data frame is not received;
when the number of times of sending the retransmission request reaches the first preset number of times and the specific data frame which is retransmitted is not received, the receiving retransmission state is switched to an ABORT state, and the link connection is waited to be carried out again.
6. The method of claim 1, further comprising:
the transmission retransmission state is switched, wherein,
after the group of data is sent, the sending retransmission state is switched to an IDLE state;
switching the sending retransmission state to a NORMAL state when receiving acknowledgement instructions of all data frames of the group of data;
when receiving a retransmission instruction, switching the transmission retransmission state to an ACK state, retransmitting the specific data frame according to sequential codes in the retransmission instruction in the ACK state, and switching the transmission retransmission state to an IDLE state;
and when the retransmission is repeated for a plurality of times and the acknowledgement instruction is not received, switching the retransmission sending state to the ABORT state, and waiting for the link connection to be carried out again.
7. The method of claim 6, further comprising:
a retransmission timing is performed, wherein,
after retransmitting the specific data frame, starting the retransmission timing, and retransmitting the specific data frame again when the second time limit is exceeded and the confirmation instruction is not received;
and when the number of times of retransmitting the specific data frame reaches a second preset number of times and no confirmation instruction is received, switching the retransmission sending state to an ABORT state, and waiting for the link connection to be restarted.
8. A link layer error data retransmission system, comprising:
a transmitting module; and
the receiving module is configured to receive the received signal,
wherein, the liquid crystal display device comprises a liquid crystal display device,
the transmitting module is used for selecting N frames of data, N is a natural number greater than or equal to 1, adding sequential codes representing the sequence into the frame head of each frame of data, using the N frames of data as a group of data, transmitting the N frames of data in turn,
the receiving module is used for respectively performing CRC check on N frames of data frames in the group of data received, returning a confirmation instruction of sequential encoding of the data frames with no check errors aiming at the data frames with no check errors, returning a retransmission instruction of sequential encoding of the specific data frames aiming at the specific data frames with check errors,
the transmitting module is further configured to retransmit the specific data frame pointed by the sequential encoding according to the sequential encoding in the received retransmission instruction,
the receiving module is also used for carrying out CRC check on the retransmitted specific data frame again, and returning a confirmation instruction when the specific data frame is checked without errors.
9. A computer readable storage medium, characterized in that computer program instructions are stored, which when executed implement the method of any of claims 1-7.
10. A computer device comprising a memory and a processor, wherein the memory has stored therein a computer program which, when executed by the processor, performs the method of any of claims 1-7.
CN202310036918.0A 2023-01-10 2023-01-10 Link layer error data retransmission method, system and storage medium Pending CN116232550A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310036918.0A CN116232550A (en) 2023-01-10 2023-01-10 Link layer error data retransmission method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310036918.0A CN116232550A (en) 2023-01-10 2023-01-10 Link layer error data retransmission method, system and storage medium

Publications (1)

Publication Number Publication Date
CN116232550A true CN116232550A (en) 2023-06-06

Family

ID=86590357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310036918.0A Pending CN116232550A (en) 2023-01-10 2023-01-10 Link layer error data retransmission method, system and storage medium

Country Status (1)

Country Link
CN (1) CN116232550A (en)

Similar Documents

Publication Publication Date Title
US9014192B2 (en) Method and apparatus for improving data transmission reliability in a wireless communications system
CN104782072B (en) Using the system and method for hybrid automatic repeat-requests agreements such as reliably stopping
RU2622770C1 (en) Highly reliable transmission scheme with low level of use of resources
KR101366332B1 (en) A method of automatic repeat request(ARQ) in communication system
US7236740B2 (en) Data retransmission apparatus and method in a mobile communication system employing HARQ technique
US8233431B2 (en) WCDMA uplink HARQ operation during the reconfiguration of the TTI length
EP2898618B1 (en) Method and apparatus in a wireless communication system
JP2008503967A (en) Method and system for communicating data and station for transmitting data
KR20020042438A (en) Hybrid ARQ with parallel packet transmission
CN1768498A (en) Avoiding stall conditions and sequence number ambiguity in an automatic repeat request protocol
CN110391879B (en) Packet loss recovery method and device for data transmission network and computer equipment
US20160218837A1 (en) Method and apparatus to use more transmission opportunities in a distributed network topology with limited harq processes
CN103312478A (en) Method and system for data transmission in a data network
JP6126698B2 (en) Method and apparatus for a modified HARQ procedure after a receiver down event
EP1925114A1 (en) Data unit transmission method
US20040039979A1 (en) Data transmission system using a hybrid automatic repeat request protocol
JP5173790B2 (en) Method and apparatus for transmitting data and communication system
KR100901802B1 (en) Dual Receiving Window Method and Apparatus for Automatic Retransmission Request
JPH09247132A (en) Radio packet communication equipment and transmitting device
CN116232550A (en) Link layer error data retransmission method, system and storage medium
CN103166747A (en) Method and device of hybrid automatic repeat request (HARQ) merging
CN101296059A (en) Error detection and retransmission methods and devices for communication systems
CN107888326A (en) Data transmission method and device
KR100392096B1 (en) A re-transmission method at MAC layer to support hybrid ARQ in W-CDMA system
Bansal et al. Analysis of Sliding Window Protocol for Connected Node

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination