CN115499932A - Communication method and device - Google Patents

Communication method and device Download PDF

Info

Publication number
CN115499932A
CN115499932A CN202110750224.4A CN202110750224A CN115499932A CN 115499932 A CN115499932 A CN 115499932A CN 202110750224 A CN202110750224 A CN 202110750224A CN 115499932 A CN115499932 A CN 115499932A
Authority
CN
China
Prior art keywords
data
data packet
packet
sequence number
packets
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.)
Granted
Application number
CN202110750224.4A
Other languages
Chinese (zh)
Other versions
CN115499932B (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110750224.4A priority Critical patent/CN115499932B/en
Priority to PCT/CN2022/101247 priority patent/WO2023274082A1/en
Publication of CN115499932A publication Critical patent/CN115499932A/en
Application granted granted Critical
Publication of CN115499932B publication Critical patent/CN115499932B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/12Wireless traffic scheduling

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

The application relates to a communication method and a device, wherein the method comprises the following steps: the first device transmitting at least one data packet to the second device; the first device receives indication information from the second device, wherein the indication information is used for indicating at least one first data packet expected by the second device; the first device transmits one or more data packets to the second device based on a sequential or out-of-order transmission scheme. The communication method and the communication device provided by the embodiment of the application can give consideration to the expected receiving condition of the second device and different sending modes for transmitting the data packet, thereby improving the flexibility of data transmission and improving the communication performance.

Description

Communication method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a communication method and apparatus.
Background
Communication technology plays an important role in people's daily life. Taking short-distance communication service as an example, there is a demand for short-distance communication in the fields of intelligent terminals, intelligent homes, intelligent manufacturing, intelligent automobiles, and the like. The short-range communication technology includes a bluetooth technology, an Ultra Wide Band (UWB) technology, a ZigBee (a low-speed short-range Wireless communication technology), a Wireless Fidelity (WiFi) technology, and the like. Short-range communication technology has been widely used in connection with mouse, keyboard, wearable device, and True Wireless Stereo (TWS) headset due to its low power consumption and low cost.
In actual communication, a plurality of different types of services may exist on a communication device, such as a short message service, a call service, a song service, and the like, and how to consider transmission requirements of the various services and improve the flexibility and the communication performance of a communication system is a technical problem which needs to be solved urgently.
Disclosure of Invention
In view of this, a communication method and apparatus are provided, which can improve flexibility of data transmission and improve communication performance.
In a first aspect, an embodiment of the present application provides a communication method, where the method includes: transmitting at least one data packet to the second device; receiving indication information from the second device, wherein the indication information is used for indicating at least one first data packet expected by the second device; and transmitting one or more data packets to the second device based on the first data transmission mode.
In the embodiment of the present application, after the first device determines at least one first data packet expected by the second device, it may determine one or more data packets to be sent to the second device, instead of simply sending the expected first data packet to the second device, according to the expected situation of the second device and the first data transmission mode, so as to increase the possibility of sending the data packets by the first device, improve the flexibility of data transmission, and improve the communication performance. Specifically, a data packet that the second device desires to retransmit and a data packet waiting for first transmission coexist in the first device, and the sequence number of the data packet to be retransmitted is smaller than the sequence number of the data packet waiting for first transmission. On one hand, one or more data packets sent by the first device based on the first data transmission mode may include a data packet with a larger sequence number waiting for first sending, so that the data packet does not need to wait for successful retransmission or discard of the data packet needing to be retransmitted before being sent, and waiting time for waiting for the data packet with the larger sequence number sent for the first time is shortened. On the other hand, one or more data packets sent by the first device based on the first data transmission mode may further include a data packet to be retransmitted, so that the retransmitted data packet is not always preempted in sending opportunities by a data packet with a larger sequence number waiting for first sending, and retransmission of the data packet with a smaller sequence number is ensured. Therefore, the method provided by the embodiment of the application increases the possibility of the data packet sent by the first device, improves the flexibility of data transmission, and improves the communication performance. Furthermore, the time for waiting for sending the data packet is saved, so that the storage time in a data packet sending end and a data packet receiving end is reduced, the communication method provided by the embodiment of the application can also save the storage resources and energy consumption of the sending end and the receiving end, and the applicability to the short-distance communication equipment with low cost and low power consumption is improved.
According to the first aspect, in a first possible implementation manner of the communication method, the first data transmission manner is a sequential transmission manner; the one or more data packets comprise a plurality of second data packets, the sequence numbers of the plurality of second data packets are continuous, and the data packet with the smallest sequence number in the plurality of second data packets is the third data packet with the smallest sequence number in at least one third data packet; wherein for any third data packet, the third data packet belongs to the at least one data packet, and the first device has not received acknowledgement feedback for the third data packet.
In the embodiment of the application, on one hand, by continuously sending a plurality of second data packets, a subsequent data packet can be sent out without waiting for a feedback result of a previous data packet, so that the time of waiting for sending of a subsequent data packet is reduced; on the other hand, the sequential sending of the data is always ensured, the second device does not need to store more data packets due to waiting for the rearrangement of the data packets, and the storage resources and the energy consumption of the second device are saved.
According to the first aspect, in a second possible implementation manner of the communication method, the first data transmission manner is an out-of-order transmission manner; the one or more data packets comprise one or more fourth data packets, the sequence number of any one of the fourth data packets is greater than the sequence number of the third data packet with the largest sequence number in at least one third data packet, the difference value between the sequence number P of any one of the fourth data packets and the sequence number M of each third data packet is less than or equal to K, and K is preset or defined; for any one third data packet, the third data packet belongs to the at least one data packet, and the first device has not received acknowledgement feedback for the third data packet, where P, M, and K are integers greater than or equal to 0.
In the embodiment of the application, the out-of-order sending mode is adopted, so that the first device can break up the sending sequence of the data packets, the data packets with larger sequence numbers and waiting for being sent for the first time can be sent without waiting for the data packets with smaller sequence numbers and needing to be retransmitted to be successfully received or discarded, the sending opportunity is provided for the data packets with larger sequence numbers and waiting for being sent for the first time as soon as possible, and the waiting time for waiting for the data packets with larger sequence numbers and sent for the first time is shortened. Meanwhile, the range of the sequence numbers of the data packets which can be sent before the data packets with the smaller sequence numbers are retransmitted is limited, so that the data packets which need to be retransmitted cannot always be preempted by the data packets with the larger sequence numbers, and the sending opportunity is provided for the data packets which need to be retransmitted. Therefore, in the embodiment of the application, the transmission of the data packet with the smaller sequence number and the transmission of the data packet with the larger sequence number can be considered, and the data transmission efficiency is improved.
In a third possible implementation manner of the communication method according to the second possible implementation manner of the first aspect, the priority of any one of the fourth data packets is greater than the priority of any one of the third data packets.
In the embodiment of the application, the first device can flexibly select the transmitted data packets through out-of-order transmission, when the low-priority data packets needing to be retransmitted and the high-priority data packets waiting to be transmitted for the first time exist at the same time, the high-priority data packets can be transmitted without waiting for the successful reception or discarding of the low-priority data packets, the waiting time of the high-priority data packets is shortened, the low-priority data packets needing to be retransmitted can not be preempted by the high-priority data packets all the time, the transmission opportunity of the low-priority data packets and the high-priority data is considered, and the data transmission efficiency is improved.
According to a third possible implementation manner of the first aspect, in a fourth possible implementation manner of the communication method, the sequence number of any one of the fourth packets belongs to a first sequence number segment, the sequence number of any one of the third packets belongs to a second sequence number segment, the priority level corresponding to the first sequence number segment is higher than the priority level corresponding to the second sequence number segment, and the sequence number included in the first sequence number segment is different from the sequence number included in the second sequence number segment.
In the embodiment of the application, the sequence numbers of the different sequence number sections are distributed to the data packets with different priorities, so that the sequence numbers have priority attributes, and the intelligence of decision making is favorably improved.
According to the first aspect or any one of the above possible implementations of the first aspect, in a fifth possible implementation of the communication method, the method further includes: and receiving first configuration information from the second device, wherein the first configuration information is used for configuring the first data transmission mode.
In this embodiment of the present application, the first data transmission method adopted by the first device may be configured by the second device, which is beneficial to reducing the complexity of the first device, thereby reducing the cost of the first device.
According to the first aspect, or any one of the first possible implementation manner to the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner of the communication method, the method further includes: and sending first information to the second device, wherein the first information is used for indicating a data transmission mode expected by the first device or a data transmission mode supported by the first device.
In this embodiment of the application, the first device may provide the second device with a data transmission mode desired by the first device or a data transmission mode supported by the first device, which is beneficial to the second device to determine a suitable first data feedback mode on one hand, and is beneficial to the second device to determine a suitable first data transmission mode for the first device on the other hand, thereby providing a guarantee for data transmission.
In a seventh possible implementation manner of the communication method according to any one of the second possible implementation manner to the fourth possible implementation manner of the first aspect, the K is configured or defined based on a cache region attribute of the first apparatus and/or a cache region attribute of the second apparatus; alternatively, K is configured or defined based on a transmission window size of the first apparatus and/or a reception window size of the second apparatus.
In a second aspect, an embodiment of the present application provides a communication method, where the method includes: receiving at least one data packet from a first device; sending indication information to the first device based on a first data feedback mode, wherein the indication information is used for indicating at least one first data packet expected by a second device; one or more data packets are received from the first device.
In this embodiment, the second device may determine to feed back one or more desired first data packets to the first device based on the first data feedback manner, instead of simply feeding back ACK or NACK to the first device. In the embodiment of the application, through flexible data feedback, the selectable range and the selectable mode of the data packets sent by the first device are increased, so that the first device has the possibility of sending the data packets in batch or out of order. Under the condition that the data packet with the smaller sequence number needs to be retransmitted, a sending opportunity is provided for the data packet with the larger sequence number, so that the data packet with the larger sequence number can be sent without waiting for confirmation feedback of the data packet with the smaller sequence number, and thus, the data packet with the larger sequence number cannot be blocked due to retransmission of the data packet with the smaller sequence number, the sending of the data packet with the larger sequence number is ensured, and the user experience is improved.
According to the second aspect, in a first possible implementation manner of the communication method, the first data feedback manner is a single-packet feedback manner; the at least one first data packet includes a fifth data packet indicating a data packet with a minimum sequence number among data packets which are not successfully received.
In this embodiment of the application, the receiving end determines the data packet with the smallest sequence number in the unsuccessfully received data packets as the first data packet expected to be received, so that the sending end can retransmit the data packet unsuccessfully received by the receiving end.
According to the second aspect, in a second possible implementation manner of the communication method, the first data feedback manner is a single-packet feedback manner; the at least one first data packet comprises a sixth data packet, the priority of the sixth data packet is higher than that of a fifth data packet, and the fifth data packet represents the data packet with the smallest sequence number in the data packets which are not successfully received in the at least one data packet.
In the embodiment of the application, the receiving end determines the data packet with higher priority than the data packet with the minimum sequence number in the unsuccessfully received data packets as the first data packet expected to be received, so that the transmitting end can preferentially transmit the data packet with higher priority.
According to the second aspect, in a third possible implementation manner of the communication method, the first data feedback manner is a batch feedback manner; the at least one first packet includes one or more seventh packets representing unsuccessfully received ones of the at least one packet.
In the embodiment of the application, the receiving end feeds back the receiving conditions of the data packets in batch, so that the sending end can continuously send a plurality of data packets, and the sending end can consider the transmission of the data packets with larger sequence numbers waiting for first sending and the data packets with smaller sequence numbers needing to be retransmitted.
In a fourth possible implementation manner of the communication method according to the second aspect as such or any one of the above second implementation manners, the method further includes: and sending first configuration information to the first device, wherein the first configuration information is used for configuring a first data transmission mode, and the first data transmission mode is a sequential sending mode or a disordered sending mode.
In a fifth possible implementation manner of the communication method according to the fourth possible implementation manner of the second aspect, the method further includes: receiving first information from the first device, wherein the first information is used for indicating a data transmission mode expected by the first device or a data transmission mode supported by the first device.
In a third aspect, an embodiment of the present application provides a communication apparatus, including: a sending module for sending at least one data packet to a second device; a receiving module, configured to receive indication information from the second device, where the indication information is used to indicate at least one first data packet expected by the second device; the sending module is further configured to send one or more data packets to the second device based on the first data transmission mode.
According to a third aspect, in a first possible implementation manner of the communication apparatus, the first data transmission manner is a sequential transmission manner; the one or more data packets comprise a plurality of second data packets, the sequence numbers of the plurality of second data packets are continuous, and the data packet with the minimum sequence number in the plurality of second data packets is the third data packet with the minimum sequence number in at least one third data packet; wherein for any third data packet, the third data packet belongs to the at least one data packet, and the first device has not received acknowledgement feedback for the third data packet.
According to a third aspect, in a second possible implementation manner of the communication device, the first data transmission manner is an out-of-order transmission manner; the one or more data packets comprise one or more fourth data packets, the sequence number of any one of the fourth data packets is greater than the sequence number of the third data packet with the largest sequence number in at least one third data packet, the difference value between the sequence number P of any one of the fourth data packets and the sequence number M of each third data packet is less than or equal to K, and K is preset or defined; wherein for any third packet belonging to the at least one packet and for which acknowledgement feedback has not been received by the first device, P, M, and K are integers greater than or equal to 0.
In a second possible implementation manner of the third aspect, in a third possible implementation manner of the communication device, the priority of any one of the fourth data packets is greater than the priority of any one of the third data packets.
According to a third possible implementation manner of the third aspect, in a fourth possible implementation manner of the communication device, the sequence number of any one of the fourth packets belongs to a first sequence number section, the sequence number of any one of the third packets belongs to a second sequence number section, the priority level corresponding to the first sequence number section is higher than the priority level corresponding to the second sequence number section, and the sequence number included in the first sequence number section is different from the sequence number included in the second sequence number section.
According to the third aspect, or any one of the foregoing possible implementation manners of the third aspect, in a fifth possible implementation manner of the communication apparatus, the receiving module is further configured to receive first configuration information from the second apparatus, where the first configuration information is used to configure the first data transmission manner.
According to the third aspect, or any one of the first possible implementation manner to the fifth possible implementation manner of the third aspect, in a sixth possible implementation manner of the communication apparatus, the sending module is further configured to send first information to the second apparatus, where the first information is used to indicate a data transmission manner desired by the first apparatus or a data transmission manner supported by the first apparatus.
According to any one of the second possible implementation manner to the fourth possible implementation manner of the third aspect, in a seventh possible implementation manner of the communication apparatus, the K is configured or defined based on a buffer attribute of the first apparatus and/or a buffer attribute of the second apparatus; alternatively, K is configured or defined based on a transmit window size of the first apparatus and/or a receive window size of the second apparatus.
In a fourth aspect, an embodiment of the present application provides a communication apparatus, including: a receiving module for receiving at least one data packet from a first device; a sending module, configured to send, to the first device, indication information based on a first data feedback manner, where the indication information is used to indicate at least one first data packet expected by a second device; the receiving module is further configured to receive one or more data packets from the first device.
In a first possible implementation manner of the communication device according to the fourth aspect, the first data feedback manner is a single-packet feedback manner; the at least one first data packet includes a fifth data packet, and the fifth data packet represents a data packet with a smallest sequence number in data packets which are not successfully received in the at least one data packet.
In a second possible implementation manner of the communication device according to the fourth aspect, the first data feedback manner is a single-packet feedback manner; the at least one first data packet comprises a sixth data packet, the priority of the sixth data packet is higher than that of a fifth data packet, and the fifth data packet represents the data packet with the smallest sequence number in the data packets which are not successfully received in the at least one data packet.
In a third possible implementation manner of the communication device according to the fourth aspect, the first data feedback manner is a batch feedback manner; the at least one first data packet includes one or more seventh data packets, the one or more seventh data packets representing unsuccessfully received data packets of the at least one data packet.
In a fourth possible implementation manner of the communication apparatus according to the fourth aspect or any one of the foregoing fourth aspects, the sending module is further configured to send first configuration information to the first apparatus, where the first configuration information is used to configure a first data transmission manner, and the first data transmission manner is a sequential sending manner or a random sending manner.
In a fifth possible implementation manner of the communication apparatus according to the fourth aspect, or any one of the above possible implementation manners of the fourth aspect, the receiving module is further configured to receive first information from the first apparatus, where the first information is used to indicate a data transmission manner desired by the first apparatus or a data transmission manner supported by the first apparatus.
In a fifth aspect, embodiments of the present application provide a communication apparatus, which may perform a communication method of one or more of the above first aspect or multiple possible implementations of the first aspect, or perform a communication method of one or more of the above second aspect or multiple possible implementations of the second aspect.
In a sixth aspect, embodiments of the present application provide a computer program product, which includes computer readable code or a non-transitory computer readable storage medium carrying computer readable code, and when the computer readable code runs in an electronic device, a processor in the electronic device performs a communication method of one or more of the above first aspect or multiple possible implementation manners of the first aspect, or performs a communication method of one or more of the above second aspect or multiple possible implementation manners of the second aspect.
These and other aspects of the present application will be more readily apparent from the following description of the embodiment(s).
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the application and, together with the description, serve to explain the principles of the application.
Fig. 1a shows a flow chart of a communication method in the related art;
fig. 1b is a schematic view showing variations of SN and NESN in a related art communication method;
fig. 1c is a schematic view showing variations of SN and NESN in a related art communication method;
fig. 2a illustrates an application scenario diagram of a communication method provided in an embodiment of the present application;
fig. 2b is a schematic diagram illustrating an architecture of a communication system provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a communication method provided in an embodiment of the present application;
fig. 5a is an exemplary diagram illustrating a data packet in a buffer of a first device in an embodiment of the present application;
fig. 5b shows a flowchart of a communication method provided in the embodiment of the present application in a scenario in which a sequential sending manner and a batch feedback manner are combined;
fig. 5c is a flowchart illustrating a communication method provided in the embodiment of the present application in a scenario in which an out-of-order transmission mode and a single packet feedback mode are combined;
fig. 5d is a flowchart illustrating a communication method provided in the embodiment of the present application in a scenario in which an out-of-order sending manner and a batch feedback manner are combined;
fig. 6 is a schematic structural diagram of a communication device provided in an embodiment of the present application;
fig. 7 shows a schematic structural diagram of a communication device provided in an embodiment of the present application.
Detailed Description
Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present application. It will be understood by those skilled in the art that the present application may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present application.
The short-distance communication device is generally a low-cost and low-power device, and since a larger buffer area increases the cost of the communication device and the power consumption of the communication device is higher due to the fact that more data is stored in the buffer area, the buffer area of the short-distance communication device is usually smaller, and the number of data packets that can be stored in the buffer area is smaller. Therefore, in the related art, data transmission is generally performed by using a sequential transmission method. For example, in some prior art, data packets are transmitted in a sequential transmission manner, and retransmission of the data packets is controlled by correlation between Sequence Number (SN) and Expected sequence Number (NESN).
Specifically, a SN is stored and maintained in the transmitting end, and a NESN is stored and maintained in the receiving end. The length of SN and NESN is 1bit (i.e. 1 bit), that is, the selectable values of SN and NESN are 0 and 1. The SN stored in the transmitting end and the NESN stored in the receiving end are both initialized to 0. The SN stored in the transmitting end is used for indicating which data packet the transmitting end transmits, and the NESN stored in the receiving end is used for indicating which data packet the receiving end expects to receive. The head of the data packet sent from the sending end to the receiving end includes SN. The feedback information sent by the receiving end to the sending end includes NESN.
Fig. 1a shows a flowchart of a communication method in the related art. As shown in fig. 1a, a sending end sends a data packet according to a locally stored SN, for example, when the locally stored SN is 0, the sending end sends a data packet with SN of 0 in a header; and when the locally stored SN is 1, the sending end sends a data packet with the SN of 1 in the packet header. After receiving the data packet from the transmitting end, the receiving end determines whether the SN in the received data packet is the same as the locally stored NESN. When the SN in the received data packet is the same as the locally stored NESN, it indicates that the receiving end receives the data packet that the receiving end expects to receive, the receiving end adds 1 to the locally stored NESN, and sends feedback information (at this time, the sent feedback information may be referred to as ACK) according to the locally stored NESN (i.e., the NESN after adding 1) to instruct the sending end to send a new data packet. When the SN in the received data packet is different from the locally stored NESN, it indicates that the receiving end does not receive the data packet that the receiving end expects to receive, the receiving end keeps the locally stored NESN unchanged, and sends feedback information (at this time, the sent feedback information may be referred to as NACK) according to the locally stored NESN (i.e., the locally stored NESN) to instruct the sending end to retransmit the data packet. And the sending end receives the feedback information and determines whether the NESN in the feedback information is the same as the SN stored locally. Under the condition that the NESN in the received feedback information is the same as the SN stored locally, the data packet sent before is indicated to be unsuccessfully received, and the sending end keeps the SN stored locally unchanged so as to resend the data packet; in case the NESN in the received response message is different from the locally stored SN, indicating that the previously transmitted data packet has been successfully received, the transmitting end adds 1 to the locally stored SN to transmit a new data packet.
In an alternative implementation, the feedback information sent by the receiving end to the sending end may be included in a header (header) of a data packet sent by the receiving end to the sending end.
Fig. 1b shows a schematic diagram of variations of SN and NESN in a related art communication method. Initially, the SN locally stored at the transmitting end is 0, and the NESN locally stored at the receiving end is 0. The data packets cached in the cache area of the sending end include: packet 1 and packet 2. Here, SN in the header of the packet 1 (simply referred to as the packet 1) is 0, and SN in the packet 2 is 1. As shown in fig. 1b, since the SN locally stored by the transmitting end is 0 and the SN in the packet 1 is 0, the transmitting end transmits the packet 1 in step S101. In step S102, the receiving end receives the data packet 1, and determines that SN in the data packet 1 is the same as (both are 0) the locally stored NESN through comparison, and adds 1 to the locally stored NESN. That is, the locally stored NESN in the receiving end changes from 0 to 1. At this time, the receiving end may generate feedback information 1 with NESN of 1. In step S103, the receiving end transmits feedback information 1. In step S104, the transmitting end receives the feedback information 1, determines through comparison that the NESN in the feedback information 1 is different from the locally stored SN (the former is 1, and the latter is 0), and adds 1 to the locally stored SN. That is, the SN locally stored in the transmitting end is changed from 0 to 1. Therefore, the transmitting end subsequently transmits a packet with SN 1, i.e., packet 2. In step S105, the transmitting end transmits packet 2.
Fig. 1c is a diagram illustrating variations of SN and NESN in a related art communication method. As shown in fig. 1c, the transmitting end transmits a packet 1 in step S101. In step S106, the receiving end does not receive the packet 1 for a certain time (which may be set as needed, for example, 30 seconds or 1 minute, etc.), and the receiving end keeps the locally stored NESN unchanged (still 0). At this time, the receiving end may generate feedback information 2 having NESN of 0. In step S107, the receiving end transmits feedback information 2. In step S108, the sending end receives the feedback information 2, and determines that the NESN in the feedback information 2 is the same as the locally stored SN (both are 0) or does not receive the feedback information for the data packet 1 within a certain time through comparison, and the sending end keeps the locally stored SN unchanged (still 0). Therefore, the transmitting end subsequently transmits a packet with SN 0, i.e., packet 1. In step S109, the transmitting end transmits packet 1. If the subsequent packet 1 is still not successfully received by the receiving end, the transmitting end repeatedly executes step S108 and step S109, and retransmits the packet 1 again. This occurs when packet 2 is blocked by packet 1. In this case, the transmitting end transmits the data packet 2 only after the data packet 1 is successfully received or the data packet 1 is discarded due to the maximum retransmission number. If the data packet 2 is a data packet of a high-priority service, it is difficult to ensure the quality of the high-priority service, which affects the user experience.
Therefore, in the sequential transmission manner adopted in the related art, when a sending end is retransmitting a data packet, if a data packet with a high priority arrives, the sending end needs to wait for the retransmitted data packet to be successfully received or the retransmitted data packet to be discarded due to reaching the maximum retransmission times, and then retransmit the data packet with the high priority. This causes a situation that the high-priority data packet is blocked by the retransmitted data packet, which makes it difficult to ensure the transmission of the high-priority data, and also makes it difficult to ensure the quality of the high-priority service, thereby affecting the user experience. In addition, if the sending end unconditionally transmits the high-priority data packet after the high-priority data packet arrives, the retransmission data packet is always preempted by the high-priority data packet to send, so that the retransmission data packet is stored in the cache of the sending end for a long time, the storage resource of the sending end is occupied, and the energy consumption of the sending end is increased; meanwhile, the high-priority data packets in the receiving end are stored in the cache of the receiving end for a long time due to the sequencing of the data packets waiting for retransmission, so that the storage resources of the receiving end are occupied, and the energy consumption of the receiving end is increased.
In the embodiment of the present application, after the first device determines at least one first data packet expected by the second device, the first device may determine one or more data packets to be sent to the second device, instead of simply sending the expected first data packet to the second device, according to the expected situation of the second device and the first data transmission manner, so that the possibility of sending the data packets by the first device is increased, the flexibility of data transmission is improved, and the communication performance is improved. Specifically, a data packet that the second apparatus expects to retransmit and a data packet waiting to be transmitted for the first time coexist in the first apparatus, and the sequence number of the data packet to be retransmitted is smaller than the sequence number of the data packet waiting to be transmitted for the first time. On one hand, one or more data packets sent by the first device based on the first data transmission mode may include a data packet with a larger sequence number waiting for being sent for the first time, so that the data packet does not need to be sent again after the data packet needing to be retransmitted is successfully retransmitted or discarded, and the waiting time for waiting for the data packet with the larger sequence number to be sent for the first time is shortened. On the other hand, one or more data packets sent by the first device based on the first data transmission mode may further include a data packet to be retransmitted, so that the retransmitted data packet is not always preempted in sending opportunities by a data packet with a larger sequence number waiting for first sending, and retransmission of the data packet with a smaller sequence number is ensured. Therefore, the method provided by the embodiment of the application increases the possibility of the data packet sent by the first device, improves the flexibility of data transmission, and improves the communication performance. Furthermore, the time for waiting for sending the data packet is saved, so that the storage time in a data packet sending end and a data packet receiving end is reduced, the communication method provided by the embodiment of the application can also save the storage resources and energy consumption of the sending end and the receiving end, and the applicability to the short-distance communication equipment with low cost and low power consumption is improved.
The short-distance communication equipment related to the embodiment of the application comprises and is not limited to short-distance communication equipment with low cost and low power consumption, such as a mouse, a keyboard, a camera, a wireless earphone, wearable equipment, a router, intelligent household appliances (such as a refrigerator, an electric cooker, an air conditioner, a washing machine and the like), an intelligent socket, a sensor and the like. Certainly, terminal devices such as a mobile phone, a notebook computer, a netbook, a tablet computer and the like also have a short-distance communication function and can be used as short-distance communication equipment to perform short-distance communication. The communication method provided by the embodiment of the application can also be applied to the short-distance communication equipment. The embodiment of the application does not limit the short-distance communication mode and the short-distance communication equipment.
Fig. 2a is a schematic view illustrating an application scenario of the communication method according to the embodiment of the present application. As shown in fig. 2a, short-distance wireless communication connections such as bluetooth can be established among devices such as the router 11, the wireless headset 12, the camera 13, the smart watch 14, the tablet computer 15, the mobile phone 16, and the notebook computer 17. Packets may be transmitted between these devices. The priority of the packets of different types of traffic may be different. For example, the priority of the data packet of the voice service is higher than that of the data packet of the data service, the priority of the instant messaging service is higher than that of the web service, and the like. According to the communication method provided by the embodiment of the application, when the data packets are transmitted between the devices, the transmission of the data packets with high priority and the transmission of the data packets with low priority can be considered.
Fig. 2b shows an architecture diagram of a communication system provided in an embodiment of the present application. As shown in fig. 2b, the communication system comprises a first device 21 and a second device 22. Wherein, the first apparatus 21 may be deployed at a transmitting end, and the second apparatus 22 may be deployed at a receiving end. The first device 21 may send at least one data packet to the second device 22, receive the indication from the second device 22, and send one or more data packets to the second device 22 based on the first data transmission scheme.
Fig. 3 shows a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device shown in fig. 3 may be used as a transmitting end or a receiving end in the communication system provided in the embodiment of the present application, and may be configured to deploy the first apparatus 21 shown in fig. 2b or the second apparatus 22 shown in fig. 2 b. As shown in fig. 3, the electronic device may include at least one processor 301, memory 302, input output device 303. The following describes each component of the electronic device in detail with reference to fig. 3:
the processor 301 is a control center of the electronic device, and may be a single processor or a collective term for multiple processing elements. For example, the processor 301 is a CPU, and may also be an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present disclosure, such as: one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs).
Among other things, the processor 301 may perform various functions of the electronic device by running or executing software programs stored in the memory 302, as well as invoking data stored in the memory 302.
In particular implementations, processor 301 may include one or more CPUs, such as CPU 0 and CPU 1 shown in the figure, as one embodiment.
In particular implementations, an electronic device may include multiple processors, such as processor 301 and processor 305 shown in FIG. 3, for example, as an embodiment. Each of these processors may be a single-Core Processor (CPU) or a multi-Core Processor (CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
Memory 302 may be, but is not limited to, a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 302 may be self-contained and coupled to the processor 301 via a bus 304. The memory 302 may also be integrated with the processor 301. In the disclosed embodiment, the memory may be used to store the first, second, third, fourth, fifth, sixth, and seventh data packets, as well as SN, NESN, and K, etc.
An input output device 303 for communicating with other devices or a communication network. The communication network may be a possible wireless communication network, in particular a short-range communication network. Further optionally, the method may also be used for communication with a communication network such as an ethernet network, a Radio Access Network (RAN), and the like. Accordingly, the input-output device 303 may include all or part of a baseband processor, and may also optionally include a Radio Frequency (RF) processor. The RF processor is used for transceiving RF signals, and the baseband processor is used for processing baseband signals converted from RF signals or baseband signals to be converted into RF signals.
In a specific implementation, the input-output device 303 may include a transmitter and a receiver (or referred to as a transmitting unit and a receiving unit), as an embodiment. The transmitter is used for transmitting signals to other equipment or a communication network, and the receiver is used for receiving the signals transmitted by the other equipment or the communication network. The transmitter and receiver may be separate or integrated. In the disclosed embodiment, the input-output device 303 may be used to transceive: the first data packet, the second data packet, the third data packet, the fourth data packet, the fifth data packet, the sixth data packet and the seventh data packet, and the indication information, the first information and the first configuration information, etc. The present application does not limit the form of the transmitter and the receiver, and may be provided independently or integrally.
Optionally, the system may further include a bus 304, which may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (enhanced Industry Standard Architecture) bus, or other possible types of buses. For ease of illustration, only one thick line is shown in FIG. 3, but this does not mean only one bus or one type of bus.
The device structure shown in fig. 3 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some of the components may be combined, or a different arrangement of components.
Fig. 4 shows a flowchart of a communication method provided in an embodiment of the present application. The method may be applied to the communication system shown in fig. 2 b. As shown in fig. 4, the communication method may include:
in step S401, the first device transmits at least one data packet to the second device.
In this step, at least one packet indicates a packet that has been transmitted by the first device. The at least one data packet may or may not be successfully received by the second device.
In this embodiment, after the first device sends a data packet to the second device, the first device determines that the reception of the acknowledgement feedback for the data packet indicates that the second device successfully received the data packet, and the data packet has no retransmission requirement; the acknowledgement feedback that the first device determines that the data packet is not received indicates that the second device did not successfully receive the data packet, which has a retransmission requirement.
The following describes how the first device determines whether acknowledgement feedback for a packet has been received. Take the example of a first device sending packet a to a second device. If the second device successfully receives the data packet a, the second device transmits feedback information indicating successful reception of the data packet a to the first device. If the second device does not successfully receive the data packet a, the second device does not transmit feedback information indicating successful reception of the data packet a to the first device. As a result, in the case where the second device has not successfully received the packet a, or in the case where the second device has successfully received the packet a but the feedback information indicating successful reception of the packet a, which the second device has transmitted to the first device, is lost, the first device cannot receive the feedback information indicating successful reception of the packet a from the second device. After the first device transmits the packet a to the second device, it starts waiting for feedback information for the packet a from the second device. If the first device receives feedback information indicating successful reception of the data packet a before the waiting time reaches the first preset time, the first device may determine that acknowledgement feedback for the data packet a is received. If the waiting time reaches the first preset time and the first device still does not receive the feedback information indicating the successful reception of the data packet a, the first device may determine that the acknowledgement feedback for the data packet a is not received. Optionally, when the second device expects to receive the data packet a but does not receive the data packet a within the second preset time, the second device may send feedback information indicating that the data packet a is not successfully received to the first device. Accordingly, when the first device receives the feedback information indicating that the data packet a is not successfully received, the first device may immediately determine that the acknowledgement feedback for the data packet a is not received, without determining that the waiting time reaches the first preset time.
In one possible implementation, the feedback information may be carried by physical layer control information, e.g., ACK is used to identify successful reception of a data packet; NACK is used to identify that the data packet was not successfully received.
In another possible implementation manner, the feedback information may also be carried by a Protocol layer above a physical layer, for example, included in a header of a Protocol Data Unit (PDU) of a link layer or a header of a Data frame; for example, an indicator bit is carried in the header of the link layer PDU, where 1 identifies that the data packet was successfully received and 0 identifies that the data packet was not successfully received.
In a possible implementation manner, after the first device sends a data packet, subsequent sending operations need to be performed after determining a feedback result of the data packet (including determining that acknowledgement feedback for the data packet is received or determining that acknowledgement feedback for the data packet is not received).
For example, the at least one data packet includes data packet 1 and data packet 2. When the first device transmits the packet 1 to the second device and determines that the acknowledgment feedback for the packet 1 is received (i.e., it is determined that the second device successfully received the packet 1) or determines that the acknowledgment feedback for the packet 1 is not received (i.e., it is determined that the second device did not successfully receive the packet 1), the first device transmits the packet 2 to the second device or retransmits the packet 1. It follows that in this implementation, the second device needs to perform a single packet feedback every time it receives a data packet. For example, after receiving the data packet 1, the second device needs to send a feedback message (e.g., ACK corresponding to the sequence number of the data packet 1) for indicating that the data packet 1 is successfully received with respect to the data packet 1, and after receiving the data packet 2, needs to send a feedback message (e.g., ACK corresponding to the sequence number of the data packet 2) for indicating that the data packet 2 is successfully received with respect to the data packet 2.
It should be noted that the first preset time and the second preset time may be set as needed, and the first preset time may be smaller than the second preset time, for example, the first preset time may be set to 0.1 second, and the second preset time may be set to 0.2 second.
In a possible implementation manner, after the first device transmits one data packet, subsequent transmission can be performed without waiting for a physical layer feedback result of the data packet, that is, the first device may continuously transmit at least one data packet.
The number of consecutively transmitted data packets may be preset in the first device. For example, the first device may continuously send 4 data packets at a time, which are: packet 1, packet 2, packet 3, and packet 4. After the first device sends the data packet 1 to the second device, the data packet 2 can be sent without determining whether confirmation feedback aiming at the data packet 1 is received or not; after sending data packet 2, data packet 3 may be sent without also determining whether acknowledgement feedback for data packet 2 is received; after sending data packet 3, data packet 4 may be sent again without determining whether acknowledgement feedback for data packet 3 was received. In this case, the second device may perform unified batch feedback for the reception of multiple data packets.
The second device performs batch feedback on the receiving conditions of the plurality of data packets as follows: and the second device performs batch feedback on the data packets received within the third preset time. In the batch feedback scenario, the indication information in the feedback information sent by the second device may indicate the reception condition of multiple data packets at the same time. The second device needs to generate the indication information in combination with the data transmission mode of the first device, which is adopted when sending the at least one data packet. The data transmission mode adopted by the first device can be a sequential transmission mode or a disordered transmission mode. The third preset time may be set as needed, and the timing start time of the third preset time may be a time when the feedback information is sent last time, or a time when the data packet is received for the first time after the feedback information is sent last time, and the like.
In a possible implementation manner, a data transmission manner adopted by the first apparatus to transmit the at least one data packet is a sequential transmission manner, and in this case, each bit (i.e., a bit, which may be referred to as an indication bit) of the indication information may represent a reception condition of one data packet. For example, the first bit of the indication information represents the reception condition of the first data packet among the data packets continuously transmitted by the first device, and the second bit of the indication information represents the reception condition of the second data packet among the data packets continuously transmitted by the first device. The number of packets continuously transmitted by the first device may be preset in the first device and the second device, or the number of packets continuously transmitted by the first device may be preset between the first device and the second device according to information such as the size of the buffer. Optionally, when a value of a certain bit of the indication information is "1", it represents that the data packet corresponding to the bit is successfully received, and when a value of a certain bit of the indication information is "0", it represents that the data packet corresponding to the bit is not successfully received. For example, if the first device continuously transmits the data packet 1, the data packet 2, the data packet 3, and the data packet 4 to the second device, and the second device receives the data packet 1 and the data packet 3 within the third preset time and does not receive the data packet 2 and the data packet 4, the value of each bit of the indication information in the feedback information transmitted by the second device to the first device may be 1010. For another example, if the first device continuously transmits the data packet 1, the data packet 2, the data packet 3, and the data packet 4 to the second device, and the second device receives the data packet 1, the data packet 3, and the data packet 4 within the third preset time and does not receive the data packet 2, the value of each bit of the indication information in the feedback information transmitted by the second device to the first device may be 1011. After receiving the indication information, the first device may determine, according to an order in which the first device transmits the packets, the packets represented by each bit in the indication information, and further determine a reception condition of each transmitted packet.
In another possible implementation manner, a data transmission manner used by the first device to send the at least one data packet is an out-of-order sending manner, and in this case, the indication information may include a sequence number of the data packet received within the third preset time. For example, if the first device continuously transmits the data packet 1, the data packet 2, the data packet 3, and the data packet 4 to the second device, the second device receives the data packet 1 and the data packet 3 within the third preset time, and does not receive the data packet 2 and the data packet 4, the indication information transmitted by the second device to the first device may include the sequence number of the data packet 1 and the sequence number of the data packet 3. For another example, if the first device continuously transmits the data packet 1, the data packet 2, the data packet 3, and the data packet 4 to the second device, and the second device receives the data packet 1, the data packet 3, and the data packet 4 within the third preset time, the feedback information that the second device may transmit to the first device may include the sequence number of the data packet 1, the sequence number of the data packet 3, and the sequence number of the data packet 4. After receiving the indication information, the first device may determine the reception of each transmitted data packet.
In view of that, the first device may send the at least one data packet in a sequential sending manner, or may send the at least one data packet in a non-sequential sending manner, in this embodiment, the manner of sending the at least one data packet in step S401 is not limited. The specific implementation of the sequential and out-of-order delivery modes will be described in detail later.
In step S402, the second device receives at least one data packet from the first device.
It is understood that, of the at least one data packet transmitted by the first device, some data packets may be successfully received by the second device, and some data packets may not be successfully received by the second device. The second device may determine the expected first packet based on the receipt of the packet.
In one possible implementation, the NESN or SN may consist of a plurality of bits. Taking 2 bits as an example, the values of NESN and SN range from 0,1,2, and 3. The NESN stored or maintained in the second device represents the sequence number of the data packet that it expects to receive (or the sequence number of the data packet with the lowest sequence number among the data packets that it expects to receive). Assume that the NESN stored or maintained in the second device is 1. In one example, if the second device receives a data packet with SN 2 or the second device does not receive a data packet with SN 1 within a certain time (the second preset time or the third preset time), the second device may determine that the data packet with SN 1 is not successfully received, may determine that the data packet with SN 1 is a desired one of the first data packets, and may update the stored or maintained NESN to 1. In another example, if the second device receives a data packet with SN 3 when it does not receive a data packet with SN 1 and a data packet with SN 2, the second device may determine that the data packet with SN 1 and the data packet with SN 2 are a desired one of the first data packets, and at the same time, the second device may maintain the stored or maintained NESN at 1. In yet another example, if the second device receives a data packet with SN 1, a data packet with SN 2, and a data packet with SN 3 within a certain time (the second preset time or the third preset time), the second device may determine that the data packet with SN 1, the data packet with SN 2, and the data packet with SN 3 are successfully received, may determine that the data packet with SN 4 is a desired one of the first data packets, and may update the stored or maintained NESN to 4.
In step S403, the second device sends, to the first device, indication information based on the first data feedback manner, where the indication information is used to indicate at least one first data packet that the second device desires.
The first data feedback mode may represent a data feedback mode adopted by the second device, and the first data feedback mode is a single-packet feedback mode or a batch feedback mode. The single-packet feedback mode indicates that the receiving condition of one data packet is fed back through one piece of indication information. Specifically, the feedback information (for example, ACK may be sent once per received data packet). Optionally, in the single-packet feedback manner, if a data packet represented by the locally stored or maintained NESN is not received within the second preset time, the feedback information is sent once (for example, NACK may be sent). The batch feedback mode indicates that the receiving condition of a plurality of data packets is fed back simultaneously through one piece of indication information. Specifically, the condition of the data packet received within the third preset time is fed back once. In one example, in batch feedback, each bit of the indication information represents the reception of one data packet. In another example, in the batch feedback, the indication information includes a sequence number of a data packet received within a third preset time.
In a possible implementation manner, the first data feedback manner may be negotiated by the first device and the second device. In one possible implementation, the first data feedback manner may be configured or defined in the second device in advance. In this way, in implementation, the second device may skip the process of determining the first data feedback mode from the single packet feedback mode and the batch feedback mode, and directly send the indication information to the first device after receiving at least one data packet from the first device. Thus, the equipment cost is favorably reduced.
The first packet may represent a packet expected by the second device. The number of the first data packets may be one or more. The first data packet may be determined according to the reception of the current data packet.
In one possible implementation, the first data packet may include one or more data packets that were not successfully received.
In another possible implementation, the first data packet may include a next data packet of the successfully received data packet. It should be noted that the next packet of the successfully received packet refers to a packet whose sequence number is greater than the sequence number of the successfully received packet and whose sequence number is consecutive to the sequence number of the successfully received packet. For example, assume that the sequence number can be chosen to have a value of 0,1,2,3. Considering that the sequence numbers of the packets are sequentially incremented, and thus the second device successfully receives the packet with the sequence number 1, the next packet of the successfully received packets is the packet with the sequence number 2. Of course, it is understood that the sequence numbers may be cyclically rolling. For example, after the second device successfully receives the packet with sequence number 3, the next packet is the packet with sequence number 0. In this case, the sequence numbers of the packet having sequence number 0 and the packet having sequence number 3 are consecutive, and the packet having sequence number 0 may be understood to be greater than the packet having sequence number 3. It is to be understood that, assuming that a packet with sequence number 0 is followed by a packet with sequence number 1, the sequence number of the packet with sequence number 1 is also greater than that of the packet with sequence number 3.
For the single packet feedback mode, the first data packet is a data packet that is not successfully received by the second device or a data packet next to the data packet that is successfully received by the second device. For example, packet 2 and packet 3 are consecutive in sequence number, and packet 2 has a sequence number less than the sequence number of packet 3. If the second device does not successfully receive packet 2, the first packet expected by the second device is packet 2. If the second device successfully receives packet 2, the first packet expected by the second device is packet 3.
For the batch feedback mode, the first data packet is one or more data packets that the second device did not successfully receive. For example, the sequence numbers of packet 1, packet 2, packet 3, and packet 4 increase consecutively and sequentially. The first device transmits packet 1, packet 2, and packet 3 to the second device. If the second device has not successfully received the data packet 1 and the data packet 2 and has successfully received the data packet 3, the first data packet expected by the second device includes the data packet 1 and the data packet 2. If the second device does not successfully receive packet 4 and successfully receives packets 1,2, and 3, the first packet expected by the second device includes packet 4.
In one possible implementation, the one or more first data packets indicating the second apparatus desires may be indicated by an expected sequence number. For example, if the first device transmits a packet with sequence number 1 and the second device successfully receives the packet with sequence number 1, the sequence number 2 may be used in the indication information to indicate that the second device expects to receive the packet with sequence number 2. For another example, if the first device transmits a packet with sequence number 1, sequence number 2, and sequence number 3, the second device does not successfully receive the packet with sequence number 1 and the packet with sequence number 2, and successfully receives the packet with sequence number 3, the indication information may indicate that the second device expects to receive the packet with sequence number 1 and the packet with sequence number 2 by using sequence number "1" and sequence number "2". Optionally, the indication information may be included in the physical layer control information, or may be included in a packet header of another protocol layer (e.g., a link control layer or a MAC layer) above the physical layer.
When the data transmission scheme adopted by the first device is the sequential transmission scheme, if the second device expects a plurality of first packets, only one first packet may be indicated, and the first packet may be an unsuccessfully received packet with the smallest sequence number. In this way, the data amount of the indication information can be saved. For example, if the first device transmits a packet with sequence number 1, sequence number 2, and sequence number 3, the second device does not successfully receive the packet with sequence number 1 and the packet with sequence number 3, and successfully receives the packet with sequence number 2, the indication information may indicate that the second device expects to receive the packet with sequence number 1 and the next packet or packets with sequence number 1.
In another possible implementation manner, the one or more first data packets indicating the second apparatus desires may also be indicated by using a plurality of indication bits, such as a bitmap (bitmap). For example, if the first device transmits data packet 1, data packet 2, data packet 3, and data packet 4, the second device successfully receives data packet 3 and data packet 4, and does not successfully receive data packet 1 and data packet 2, then "0011" may be used to indicate that the second device expects data packet 1 and data packet 2, where the first "0" corresponds to data packet 1, which indicates that data packet 1 is not successfully received; the second "0" corresponds to packet 2, indicating that packet 2 was not successfully received; the first "1" corresponds to packet 3, indicating successful receipt of packet 3; the second "1" corresponds to packet 4, indicating successful receipt of packet 4.
In another possible implementation manner, the one or more first data packets expected by the second device may be indicated by feedback information indicating whether the reception is successful or not.
In step S404, the first device receives indication information from the second device.
After receiving the indication information, the first device may determine at least one first data packet expected by the second device according to the indication information.
In a possible implementation manner, for the single packet feedback manner, the indication information sent by the second apparatus to the first apparatus may include a sequence number of the first data packet. After receiving the indication information, the first device may determine the first data packet expected by the second device according to the sequence number therein.
In a possible implementation manner, for the batch feedback mode, the indication information sent by the second apparatus to the first apparatus may include multiple bits, which are called indication bits, for example, a bitmap (bitmap). Each indicating bit corresponds to the reception of one data packet. When the indication bit is 0, it indicates that the corresponding data packet is not successfully received, and when the indication bit is 1, it indicates that the corresponding data packet is successfully received. Of course, the two indication modes may be exchanged, that is, 0 indicates that the reception is successful, and 1 indicates that the reception is failed, which is not specifically limited in this application. After receiving the indication information, the first device may determine, according to the reception condition indicated by each indication bit, which data packets are successfully received and which data packets are not successfully received by the second device, that is, may determine which acknowledgement feedback of the data packets is received and which acknowledgement feedback of the data packets is not received, based on which the first data packet expected by the second device may be determined. It is to be understood that, in the case that the receiving conditions indicated by the respective indication bits are all successful receiving, the first device may determine that the first data packet expected by the second device is one or more data packets with sequence numbers larger than the data packets already transmitted. In the case where the result of one or more of the indicator bits indicates unsuccessful reception, the first device may determine that the first data packet expected by the second device is one or more unsuccessfully received data packets.
In another possible implementation, for the batch feedback mode, the indication information sent by the second device to the first device may include sequence numbers of one or more first data packets, and after receiving the indication information, the first device may determine, according to the sequence numbers in the indication information, the first data packets expected by the second device. Of course, the second device may also determine which data packets were successfully received by the second device according to the sequence number in the indication information, that is, may determine which acknowledgement feedback of the data packets was received.
In the case where the second device expects a plurality of first packets, the indication information may include sequence numbers of all expected first packets, or may include only the sequence number of the packet with the smallest sequence number among all expected first packets.
In one example, the second device expects a plurality of first data packets, the indication information includes a sequence number of one data packet, and the data packet is a data packet which has the smallest sequence number and is not successfully received. For example, if the first device transmits data packets having sequence numbers 0,1,2, and 3, the second device successfully receives the data packets having sequence numbers 0 and 2, and fails to successfully receive the data packets having sequence numbers 1 and 3, the second device may transmit indication information including sequence number "1" to the first device. After receiving the indication information, the first device determines that the data packet with the sequence number of 1 is the first data packet expected by the second device. Meanwhile, the first device may also determine that the data packets with sequence numbers greater than 1 are all the first data packets expected by the second device. This case corresponds to the sequential transmission mode.
In yet another example, the second device expects a plurality of first data, and the indication information may include sequence numbers of the plurality of first data packets. For example, if the first device transmits data packets having sequence numbers 0,1,2, and 3, wherein the second device successfully receives the data packets having sequence numbers 0 and 2, and fails to successfully receive the data packets having sequence numbers 1 and 3, the second device may transmit indication information including sequence number "1" and sequence number "3" to the first device. After receiving the indication information, the first device determines that the data packet with the sequence number 1 and the data packet with the sequence number 3 are the data packets expected by the second device. Meanwhile, the first device may also determine each of the data packets with the sequence number greater than 3 as the first data packet expected by the second device. This situation corresponds to an out-of-order delivery scheme.
In this embodiment, the second device may determine to feed back one or more desired first data packets to the first device based on the first data feedback manner, instead of simply feeding back ACK or NACK to the first device. In the embodiment of the application, through flexible data feedback, the selectable range and the selectable mode of the data packets sent by the first device are increased, so that the first device has the possibility of sending the data packets in batch or out of order. Under the condition that the data packet with the smaller sequence number needs to be retransmitted, a sending opportunity is provided for the data packet with the larger sequence number, so that the data packet with the larger sequence number can be sent without waiting for confirmation feedback of the data packet with the smaller sequence number, and thus, the data packet with the larger sequence number cannot be blocked due to retransmission of the data packet with the smaller sequence number, the sending of the data packet with the larger sequence number is guaranteed, and user experience is improved.
In step S405, the first device sends one or more data packets to the second device based on the first data transmission mode.
The first data transmission mode may represent a data transmission mode adopted by the first device, and the first data transmission mode is a sequential sending mode or a random sending mode. The sequential transmission mode indicates that the data packets are transmitted in the sequence of the sequence numbers from small to large, and the sequence numbers of the transmitted data packets are continuous. The out-of-order transmission mode means that the data packets are not transmitted in a continuous mode with the sequence numbers from small to large. When the data feedback mode adopted by the second device is a single-packet feedback mode, or when the data feedback mode adopted by the second device is batch feedback and the indication information includes the sequence number, the out-of-order transmission mode specifically indicates that the data need not be transmitted in the sequence of the sequence number from small to large, and the sequence number of the transmitted data packet may be discontinuous. When the data feedback method adopted by the second device is a batch feedback method and the indication information includes a plurality of indication bits, the out-of-order transmission method specifically indicates that the sequence numbers of the data packets transmitted in the sequence from small to large are not continuous.
When the first data transmission mode is a sequential transmission mode, the one or more data packets comprise a plurality of second data packets, the sequence numbers of the second data packets are continuous, and the data packet with the minimum sequence number in the second data packets is the third data packet with the minimum sequence number in at least one third data packet; wherein for any third data packet, the third data packet belongs to the at least one data packet, and the first device has not received acknowledgement feedback for the third data packet.
The third data packet belongs to at least one data packet transmitted by the first device to the second device in step S401, and the first device has not received acknowledgement feedback for the third data packet. That is, the third packet is a packet that has been sent by the first device and that has not been successfully received by the second device. The number of the third packet is one or more. Therefore, each third data packet belongs to at least one first data packet expected by the second device, and retransmission of each third data packet is required. In the sequential transmission method, the first device needs to transmit the data packets in the order of the sequence numbers from small to large, and the sequence numbers of the transmitted data packets need to be consecutive. Therefore, the first device needs to start transmission from the packet with the smallest sequence number among the packets that need to be retransmitted (i.e., the third packet with the smallest sequence number among the at least one third packet), and sequentially transmit packets with sequence numbers that are consecutive to the sequence number of the previously transmitted packet and that are larger than the sequence number of the previously transmitted packet. Therefore, the data packet with the sequence number larger than that of the data packet needing to be retransmitted is sent, the data packet needing to be retransmitted can be sent again, and the data packet with the larger sequence number and the data packet with the smaller sequence number needing to be retransmitted which are sent for the first time are both sent. For example, in step S401, the first device transmits data packet 1, data packet 2, data packet 3, and data packet 4, whose sequence numbers are 1,2,3, and 4, respectively, to the second device. Thereafter, the first device determines that the acknowledgement feedback for the data packet 1 and the data packet 3 is received and determines that the acknowledgement feedback for the data packet 2 and the data packet 3 is not received, and thus, the first device determines that the data packet 2 and the data packet 4 are the third data packet, and the third data packet with the smallest sequence number in the third data packet is the data packet 2. Since the data packet with the smallest sequence number in the plurality of second data packets is the third data packet with the smallest sequence number in the third data packets, the data packet with the smallest sequence number in the plurality of second data packets is the data packet 2. That is, in this step, the packet with the smallest sequence number among the plurality of second packets transmitted from the first device to the second device is packet 2. Therefore, in this step, the first device may sequentially transmit the packet 2, the packet 3, the packet 4, the packet 5 (the sequence number of which is 5), and the like to the second device. Therefore, the data packet 5 with a large sequence number and the data packets 2 and 4 with a small sequence number and needing to be retransmitted, which are waiting for the first transmission, can be transmitted without waiting for confirmation feedback of other data packets, so that the waiting time and the storage resources are saved, and the user experience is improved.
In the above example, if the first device continues to transmit subsequent packets with larger sequence numbers, such as the packet 6 (with the sequence number of 6) and the packet 7 (with the sequence number of 7), after transmitting the packet 5, and if the packet 2 needs to be retransmitted again, the packet 2 needs to wait for a longer time before being retransmitted. In order to shorten the waiting time of the data packet that needs to be retransmitted and provide the retransmission opportunity for the data packet that needs to be retransmitted as soon as possible, in the embodiment of the present application, the sequence number of the second data packet sent in this step is limited. Optionally, a difference between the sequence number N of each of the second data packets in the plurality of second data packets and the sequence number M of the data packet with the smallest sequence number in the third data packet is less than or equal to K. Wherein N, M and K are integers greater than or equal to 0. Taking K as an example, in the above example, the value of the sequence number N of the packet 6 is 6, the value of the sequence number M of the packet having the smallest sequence number among the third packets is 2, and the difference between the two values is 4 greater than K, so that the first device does not transmit the packet 6 for a while after transmitting the packet 5. Thus, if a packet to be retransmitted occurs among the packets 2 to 5, the retransmission can be performed without waiting too long.
Since the sequence numbers may be continuously rolling. Therefore, the difference between the sequence number N of each of the second packets and the sequence number M of the packet with the smallest sequence number in the third packets may be abs (N-M), i.e., the absolute value of N-M.
When the first data transmission mode is an out-of-order transmission mode, the one or more data packets include one or more fourth data packets, a sequence number of any one of the fourth data packets is greater than a sequence number of a third data packet with a largest sequence number in at least one third data packet, a difference value between a sequence number P of any one of the fourth data packets and a sequence number M of any one of the third data packets is less than or equal to K, and the K is preconfigured or defined; p, M and K are integers greater than or equal to 0.
Consider that the sequence numbers may be continuously rolling. Therefore, in a possible implementation, the sequence number of a fourth packet being greater than the sequence number of a third packet includes: the lot of the fourth packet is subsequent to the lot of the third packet (e.g., the lot number of the fourth packet is greater than the lot number of the third packet). The difference between the sequence number P of any one of the fourth packets and the sequence number M of the third packet with the largest sequence number in the third packets may be abs (P-M), i.e. the absolute value of P-M. It should be noted that, in an actual scenario, the parameter of the lot number does not necessarily exist, but the apparatus may determine the order of the lots.
As described above, the third data packet belongs to at least one first data packet expected by the second device and needs to be retransmitted. The number of the third packet may be one or more. In the out-of-order transmission mode, the sequence number of the data packet transmitted by the first device before and the sequence number of the data packet transmitted by the first device after may not be consecutive. Therefore, the first device can skip the data packet with smaller sequence number needing to be retransmitted and transmit the data packet with larger sequence number waiting for the first transmission.
When the second device uses the single packet feedback mode as the data feedback mode, the first device needs to perform subsequent transmission after determining whether acknowledgement feedback for the data packet is received every time the first device transmits one data packet. Therefore, when the second device adopts the single-packet feedback mode as the data feedback mode, the one or more data packets sent by the first device in this step include a fourth data packet, and the sequence number of the fourth data packet needs to be greater than the sequence number of the third data packet with the largest sequence number in the third data packets, so that the data packet with the larger sequence number waiting for the first sending is not blocked by the retransmission of any third data packet, and a sending opportunity is obtained. Meanwhile, in the embodiment of the present application, the sequence number of the fourth packet is limited, and when the difference between the sequence number P of one packet and the sequence number M of each third packet is less than or equal to K, the packet is determined as the fourth packet. Therefore, the third data packet with a smaller sequence number and needing to be retransmitted cannot always be preempted by the data packet with a larger sequence number and waiting for being transmitted for the first time. Therefore, in the embodiment of the application, the transmission of the data packet with the larger sequence number waiting for the first transmission and the data packet with the smaller sequence number needing to be retransmitted is considered. For example, assume that K is 3. The first device sends packet 1 with sequence number 1 to the second device, and determines that acknowledgement feedback for packet 1 is not received, that is, packet 1 is a third packet, and the value of M is 1. For the data packet 2 with the sequence number of 2, the value of the sequence number P is 2, and the difference value between P and M is 1 and less than 3. At this time, the first device may transmit the packet 2 to the second device. Similarly, the first device may then transmit packet 3 having sequence number 3 and packet 4 having sequence number 4. For the data packet 5 with the sequence number of 5, the value of the sequence number P is 5, and the difference between P and M is 1 and is larger than 3. At this point, the first device retransmits packet 1 without continuing to transmit packet 5.
When the second device adopts a batch feedback mode as a data feedback mode, the first device can continuously send a plurality of data packets. Therefore, when the second device adopts the batch feedback mode as the data feedback mode, the one or more data packets sent by the first device in this step may include one or more fourth data packets, and the sequence number of any one of the fourth data packets needs to be greater than the sequence number of the third data packet, so that the data packet with a larger sequence number waiting for the first sending is not blocked by the retransmission of the third data packet, and a sending opportunity is obtained. Meanwhile, in the embodiment of the present application, the sequence number of the fourth data packet is limited, and when the difference between the sequence number P of one data packet and the sequence number M of the third data packet is less than or equal to K, the data packet is determined as the fourth data packet. In this way, the third data packet with a smaller sequence number that needs to be retransmitted will not always be preempted by the data packet with a larger sequence number waiting for the first transmission.
It should be noted that, when the number of the fourth data packets is less than the number of data packets that can be continuously transmitted by the first device at a time, the one or more data packets transmitted to the second device in this step may include one or more third data packets in addition to the one or more fourth data packets. In addition, in the case where the instruction information in step S404 includes a sequence number, this step does not limit the transmission order of the packets when transmitting one or more packets. If the indication information in step S404 includes the indication bit, the step first transmits the packet with the smaller sequence number and then transmits the packet with the larger sequence number when transmitting one or more packets, so that the accuracy of the feedback result can be improved.
It is understood that K is pre-configured or defined, including but not limited to, K being agreed upon by the protocol, or K being configured by the second device for the first device through the configuration information.
In a possible implementation manner, K may be configured or defined based on the cache region attribute of the first apparatus and the cache region attribute of the second apparatus; alternatively, K may be configured or defined based on a transmit window size of the first apparatus and a receive window size of the second apparatus.
It can be understood that, in general, a sending end always maintains a sending window in the sending process, and only data packets (or data frames) falling within the sending window are allowed to be sent; meanwhile, the receiving end maintains a receiving window, and only the data packets (or data frames) falling in the receiving window are allowed to be received. The sending window size represents the number of data packets that the sending end is allowed to send at most, and the receiving window size represents the number of data packets that the receiving end is allowed to receive at most.
Wherein the cache region attribute comprises one or more of capacity (capacity), upper bound (limit), position (position), or mark (mark). Wherein the capacity represents the maximum number of packets that the buffer can accommodate. This capacity is a fixed value set at the time of buffer creation. The upper bound represents the number of packets actually stored in the buffer. The location represents the index of the next packet to be read or written. The flag indicates a memo position, the flag is undefined before setting, the flag may be set to position, and the position may also be set to flag. The relationship between these four attributes is 0< = mark < = position < = upper bound < = capacity.
In one example, K is determined by negotiation between the first device and the second device. In one example, the first device may determine K as specified by the protocol. In one possible implementation, the first device may negotiate a minimum value of the determined K and the protocol-specified K to determine the K to be used.
In one possible implementation, K may be determined according to the length of the sequence number. In one example, K =2^ (L-1), where L is the length of the SN. For example, when the length of SN is 2 bits, the value of SN ranges from 0 to 3, L =2, k =2; when the length of SN is 3, the value range of SN is an integer of 0-7, L =3, K =4; when the SN is 4 bits in length, the value of SN ranges from 0 to 15, L =4, k =8. In the embodiment of the present application, the determination method of K is not limited.
In one possible implementation, the priority of any one of the fourth data packets is greater than the priority of any one of the third data packets. In the embodiment of the application, when the priority of a data packet with a larger sequence number needing to be transmitted for the first time is higher than the priority of a data packet with a smaller sequence number needing to be retransmitted, an out-of-order transmission mode is adopted. Therefore, when the data packet with low priority needs to be retransmitted, the sending opportunity is provided for the data packet with high priority, and meanwhile, the sending opportunity cannot be always preempted by the data packet with high priority for the data packet with low priority, so that the transmission of the data packet with high priority and the data packet with low priority is considered.
When the priority of the data packet with the larger sequence number to be transmitted for the first time is the same as the priority of the data packet with the smaller sequence number to be retransmitted, the influence caused by the fact that the priority of the data packet with the larger sequence number to be transmitted waits for the data packet with the smaller sequence number to be retransmitted and then transmits the data packet with the larger sequence number to be transmitted for the first time after the data packet with the smaller sequence number to be retransmitted is smaller.
In a possible implementation manner, the sequence number of any one of the fourth packets belongs to a first sequence number segment, the sequence number of any one of the third packets belongs to a second sequence number segment, the priority level corresponding to the first sequence number segment is higher than the priority level corresponding to the second sequence number segment, and the sequence number included in the first sequence number segment is different from the sequence number included in the second sequence number segment. Therefore, the data packets with high priority and the data packets with low priority can be distinguished through the sequence numbers, so that when the sequence numbers of the data packets belong to different sequence number sections, the data packets are sent in a disorder sending mode, a sending opportunity is provided for the data packets with high priority, and the user experience of high-priority services is improved.
In one example, taking the value range of the sequence number as 0 to 7 as an example, 0 to 3 may be determined as the second sequence number segment, and 4 to 7 may be determined as the first sequence number segment. In this way, the first device can treat packet 4 as the fourth packet, and not treat packets 2 and 3 as the fourth packet, thereby ensuring the transmission of high priority packets. Meanwhile, the first device does not regard the data packet 5 as a fourth data packet, and after the first device transmits the data packet 4, the data packet 5 is not transmitted, and the data packet 1 is retransmitted, which ensures the transmission of the low-priority data packet. Therefore, the communication method provided by the embodiment of the application can be used for transmitting the data packet with high priority and the data packet with low priority at the same time. Meanwhile, the data transmission efficiency is improved.
In one possible implementation, the first data transmission mode may be determined by the first device. In one example, the first device may determine the first data transmission manner according to one or more of its buffer attributes (e.g., buffer size, transmit data buffer size, etc.), energy consumption requirements of the first device, and the like. In yet another example, the first apparatus may further determine the first data transmission manner in combination with one or more of a buffer attribute (e.g., buffer size, receive data buffer size, etc.) of the second apparatus to which the second apparatus transmits, an energy consumption requirement of the second apparatus, etc. For example, in a scenario where the buffer area is small and the requirement for device energy saving is high, the first device may adopt a sequential transmission mode; otherwise, an out-of-order sending mode is adopted.
In one possible embodiment, the first apparatus may send first information to the second apparatus, where the first information indicates a data transmission mode desired by the first apparatus or a data transmission mode supported by the first apparatus.
In short-range communication, when communication is performed between both communication parties (i.e., a first device and a second device), one is a master node and the other is a slave node. The master node refers to a party capable of searching for other communication devices and actively establishing connection, and the slave node cannot actively establish connection and only waits for the master node to connect with the slave node. One master node may connect a plurality of slave nodes. In a possible implementation manner, in a case where the first device is a slave node and the second device is a master node, the first data transmission manner may be configured by the second device. The first data transmission mode adopted by the first device is configured by the second device through the first configuration information. In one example, the second apparatus may determine a first data transmission manner according to one or more of a buffer attribute, an energy consumption requirement, and the like, and send first configuration information including the first data transmission manner to the first apparatus. The process of determining the first data transmission mode by the second device according to one or more of the attribute of the buffer area, the energy consumption requirement, and the like may refer to the process of determining the first data transmission mode by the first device according to the attribute of the buffer area, the energy consumption requirement, and the like, and details are not repeated here. In another example, a first apparatus may transmit first information to a second apparatus, where the first information indicates a data transmission mode desired by the first apparatus or a data transmission mode supported by the first apparatus. Optionally, the second apparatus may determine the first data transmission mode based on the first information. Thereafter, the second device may transmit first configuration information indicating the first data transmission manner to the first device. The first device receives first configuration information from the second device and determines a first data transmission mode based on the first configuration information.
In one example, when the data transmission manner desired by the first apparatus is the sequential transmission manner, the second apparatus may determine the sequential transmission manner as the first data transmission manner. When the data transmission method desired by the first device is the out-of-order transmission method, the second device may determine the out-of-order transmission method as the first data transmission method. In yet another example, where the first apparatus supports both the sequential and out-of-order transmission manners. The second device may determine the first data transmission mode, for example, according to the first data feedback mode. For example, when the first data feedback method is single packet feedback, the second device may determine the out-of-order transmission method as the first data transmission method, so as to achieve transmission of a data packet with a large sequence number waiting for first transmission and a data packet with a small sequence number requiring retransmission. When the first data feedback mode is batch feedback, if the buffer area of the second device is small, the second device may determine the sequential transmission mode as a first data transmission mode; if the buffer of the second device is larger, the second device may determine the out-of-order transmission mode as the first data transmission mode. Of course, the second device may also determine and configure the first data transmission manner in other manners, for example, based on the buffer attribute (e.g., the size of the buffer for receiving data, etc.) of the second device, the energy consumption requirement of the second device, etc., which is not limited in this embodiment of the application.
In one possible implementation, the first data transmission mode may be configured or defined in the first device in advance. Thus, in an implementation, the first device need not select, but rather sends one or more data packets to the second device according to the first data transmission scheme. Thus, the equipment cost is favorably reduced.
In step S406, the second device receives one or more data packets from the first device.
In the embodiment of the present application, after the first device determines at least one first packet expected by the second device, the one or more packets to be sent to the second device may be determined instead of simply sending the expected first packet to the second device, according to the condition of the second device and the first data transmission manner, so that the possibility of the packets sent by the first device is increased, the flexibility of data transmission is improved, and the communication performance is improved. For example, when the second device expects the first device to retransmit the first packet with a smaller sequence number, if the packet with a larger sequence number needs to be transmitted, the one or more packets sent by the first device based on the first data transmission manner may include the packet with a larger sequence number, so that the packet with a larger sequence number is not blocked by the packet with a smaller sequence number that needs to be retransmitted, transmission of the packet with a larger sequence number is ensured, and user experience is improved. Therefore, the possibility of the data packet sent by the first device is increased in the process, the flexibility of data transmission is improved, and the communication performance is improved. In addition, when the second device expects the first device to retransmit the first data packet with a smaller sequence number, if the data packet with a larger sequence number needs to be transmitted, the one or more data packets transmitted by the first device based on the first data transmission mode still can include the data packet with a smaller sequence number that needs to be retransmitted, so that the retransmitted data packet with a smaller sequence number cannot always preempt the transmission opportunity by the data packet with a larger sequence number, thereby ensuring the retransmission of the data packet with a smaller sequence number, saving the storage resources and energy consumption of the transmitting end (i.e., the first device) and the receiving end (i.e., the second device), and improving the applicability to the short-distance communication equipment with low cost and low power consumption.
In this embodiment of the present application, the first data transmission mode includes a sequential sending mode and a disorder sending mode, and the first data feedback mode includes a single-packet feedback mode and a batch feedback mode. This results in four combinations, respectively: the combination of the sequential sending mode and the single-packet feedback mode, the combination of the sequential sending mode and the batch feedback mode, the combination of the disorder sending mode and the single-packet feedback mode, and the combination of the disorder sending mode and the batch feedback mode.
In the related art, a sequential transmission method and a single packet feedback method (see fig. 1a, fig. 1b and fig. 1 c) are used, and in this way, when a packet with a smaller sequence number is not successfully received or discarded, a packet with a larger sequence number cannot be transmitted, and therefore, a packet with a larger sequence number waiting for being transmitted for the first time is blocked by a packet with a smaller sequence number that needs to be retransmitted. In order to solve the problem, the embodiment of the application provides two modes of batch feedback and out-of-order sending, and the first device can send subsequent data packets without successfully receiving or discarding the sent data packets through the batch feedback, so that a sending opportunity is provided for the data packets with larger sequence numbers; the first device may be caused to shuffle the transmission order by sending out of order, also providing transmission opportunities for packets with larger sequence numbers. Therefore, the situations that the data packet with a larger sequence number waiting for first transmission is blocked by the data packet with a smaller sequence number needing to be retransmitted can be reduced by both the batch feedback mode and the out-of-order transmission mode. The communication method provided by the embodiment of the application can realize a scene of combining the sequential sending mode and the batch feedback mode, a scene of combining the disorder sending mode and the single-packet feedback mode, and a scene of combining the disorder sending mode and the batch feedback mode.
The following describes a scenario in which the sequential transmission method and the batch feedback method are combined.
In this scenario, the first data transmission mode is a sequential transmission mode, and the first data feedback mode is a batch feedback mode.
In this scenario, in step S403, the at least one first packet expected by the second device includes one or more seventh packets. Wherein the one or more seventh data packets represent data packets that the second device did not successfully receive, among the at least one data packet transmitted by the first device in step S401.
In this scenario, in step S405, the one or more data packets transmitted by the first device to the second device include a plurality of second data packets. The sequence numbers of the second data packets are continuous, and the data packet with the minimum sequence number in the second data packets is a third data packet. The third data packet belongs to at least one data packet sent by the first device in step S401, and the first device has not received acknowledgement feedback for the third data packet.
Optionally, a difference between the sequence number N of each second data packet in the at least one second data packet and the sequence number M of each third data packet is less than or equal to K. Wherein K is pre-configured or defined. N, M and K are integers greater than or equal to 0.
Considering that the sequence numbers may be continuously rolling, the sequence number of the next batch of packets may be smaller than the sequence number of the last batch of packets. Thus, in one possible implementation, the difference between the sequence number N of the second packet and the sequence number M of the third packet may be expressed as abs (N-M), i.e. the absolute value of N-M.
It is understood that K being preconfigured or defined may include, but is not limited to: k is agreed by the protocol, or K is configured for the first device by the second device through the configuration information.
Wherein the first apparatus not having received acknowledgement feedback for the third data packet comprises the first apparatus having received a NACK for the first data packet or the first apparatus not having received an ACK for the first data packet within a certain time.
Fig. 5a is an exemplary diagram illustrating a packet in a buffer of a first device in an embodiment of the present application. As shown in fig. 5a, SN corresponding to packet 0, packet 1, packet 2, packet 3, packet 4, packet 5, packet 6 and packet 7 are 0,1,2,3, 4, 5, 6 and 7, respectively. Assume that K is 3.
Fig. 5b shows a flowchart of a communication method provided in the embodiment of the present application in a scenario in which a sequential sending manner and a batch feedback manner are combined. On the basis of fig. 5a, as shown in fig. 5b, the communication method includes:
in step S501, the first device transmits packet 0, packet 1, packet 2, and packet 3 to the second device.
In step S502, the second device receives packet 0 and packet 2, and does not receive packet 1 and packet 3.
In step S503, the second device transmits indication information to the first device, where the indication information is 1010.
In step S504, the first device receives the indication information from the second device, and then confirms that packet 1 and packet 3 are the first packets expected by the second device.
In step S505, the first device determines that packet 1, packet 2, packet 3, and packet 4 are second packets.
Since the data packet 1 and the data packet 3 belong to the data packets which have been transmitted in step S501 and have not been received by the second device in step S502. Thus, the first device may determine that packet 1 and packet 3 are the first packets expected by the second device. The first device receives 1010 the indication that the second device did not successfully receive packet 1 and packet 3. At this time, the first device may determine that acknowledgement feedback has not been received for data packet 1 and data packet 3. Thus, the first device may confirm packet 1 and packet 3 as the third packet. At this time, the sequence numbers of the third packets include 1 and 3, and the packet with the smallest sequence number in the third packets is packet 1.
Considering the sequence numbers of the second data packets to be consecutive, the data packet with the smallest sequence number in the second data packets is the data packet with the smallest sequence number in the third data packet, and the difference between the sequence number N of each second data packet in the at least one second data packet and the sequence number M of the third data packet with the smallest sequence number in the third data packet is smaller than or equal to K. Since the packet 1 is the packet with the smallest sequence number among the third packets, the packet 1 is the packet with the smallest sequence number among the second packets. For the packet 2, the sequence number (2) is consecutive to the sequence number (1) of the second packet "packet 1", and the difference between the sequence number N (2) and the sequence number M (1) of the packet with the smallest sequence number among the third packets is smaller than K (3), so that the packet 2 can be regarded as the second packet. Similarly, the data packet 3 may also be used as the second data packet. For packet 4, it is consecutive to the sequence number of the second packet "packet 3", and the difference between the sequence number N (4) and the sequence number M (1) of the packet with the lowest sequence number in the third packet is equal to K (3), so that packet 4 can be the second packet. For the packet 5, the difference between the sequence number N (5) of the packet and the sequence number M (1) of the packet having the smallest sequence number among the third packets is larger than K (3), and therefore the packet 5 cannot be the second packet. Accordingly, the packet 6 having the sequence number consecutive to the packet 5 cannot be the second packet. As can be seen, the first device may determine that the plurality of second packets are: packet 1, packet 2, packet 3, and packet 4.
In step S506, the first device transmits packet 1, packet 2, packet 3, and packet 4 to the second device.
In the embodiment of the present application, although the second device desires the data packet 1 and the data packet 3, the first device transmits not only the data packet 1 and the data packet 3 but also the data packet 4 and the data packet 5 to the second device. This provides a transmission opportunity for packet 4 with a larger sequence number, so that packet 4 is not blocked by the retransmission of packets 1 and 3. Meanwhile, the data packets 1 and 3 are still transmitted, so that the retransmission of the data packets needing to be retransmitted is guaranteed, and the data packets with larger sequence numbers cannot preempt the transmission opportunity. Therefore, the transmission of the data packet with a large sequence number waiting for the first transmission and the data packet with a small sequence number needing to be retransmitted are considered. In addition, the method does not disturb the sending sequence of the data, and the second device does not need to store more data packets due to waiting for the rearrangement of the data packets, thereby saving the storage resources and the energy consumption of the second device. Particularly, when the priority of the data packet 4 is higher than the priorities of the data packet 1 and the data packet 3, the data packet 4 does not need to be transmitted after the data packet 1 and the data packet 3 are retransmitted successfully, and the transmission of the data packet with the high priority is guaranteed. Meanwhile, the data packet 1 and the data packet 3 are still transmitted, so that the low-priority data packet cannot be always preempted by the high-priority data packet to transmit, and the transmission of the low-priority data packet is guaranteed.
The following describes a scenario in which the out-of-order transmission method and the single packet feedback method are combined.
In this scenario, the first data transmission mode is an out-of-order transmission mode, and the first data feedback mode is a single-packet feedback mode.
In this scenario, in step S403, the at least one first packet expected by the second device includes a fifth packet. Wherein the one fifth packet represents a packet with a smallest sequence number among the packets that the second device has not successfully received, among the at least one packet transmitted by the first device in step S401.
In this scenario, in step S405, the one or more data packets sent by the first device to the second device include a fourth data packet, a sequence number of the fourth data packet is greater than a sequence number of a third data packet with a largest sequence number in at least one third data packet, and a difference between a sequence number P of any one of the fourth data packets and a sequence number M of each third data packet is less than or equal to K. The third data packet belongs to the at least one data packet sent in step S401, and the first device has not received acknowledgement feedback for the third data packet. Fig. 5c shows a flowchart of the communication method provided in the embodiment of the present application in a scenario in which the out-of-order transmission mode and the single packet feedback mode are combined. On the basis of fig. 5a, as shown in fig. 5c, the communication method includes:
in step S601, the first device transmits packet 0 and packet 1 to the second device.
In step S602, the second device receives packet 0 and does not receive packet 1.
In step S603, the second device transmits indication information to the first device, where a sequence number in the indication information is 1.
In step S604, the first device receives the indication information from the second device, and determines that packet 1 is the first packet expected by the second device.
Since the data packet 1 belongs to the data packets already transmitted in step S601, and the data packet with the smallest sequence number is the data packet that has not been successfully received in step S602. Thus, packet 1 is the first packet expected by the second device. The indication information transmitted by the second device to the first device may include a sequence number of packet 1, i.e., 1. The first device may determine that acknowledgement feedback for packet 1 has not been received after receiving the indication information. Thus, the first device may confirm packet 1 as the third packet. At this time, the sequence number of the third packet is 1.
Considering that the sequence number of the fourth data packet is greater than the sequence number of the third data packet, the difference between the sequence number P of any one of the fourth data packets and the sequence number M of the third data packet is less than or equal to K. Since the sequence number of the third packet is 1, the sequence number of the fourth packet needs to be greater than 1. For the data packet 2, the sequence number (2) is greater than the sequence number (1) of the third data packet with the largest sequence number in the third data packets, and the difference between the sequence number P (2) and the sequence number M of each third data packet is less than K (3), so the data packet 2 can be used as the fourth data packet. Similarly, the data packet 3 and the data packet 4 may also be used as the fourth data packet. Packet 5, packet 6, and packet 7 cannot be the fourth packet. Therefore, the second device can treat the data packet 2, the data packet 3, and the data packet 4 as the fourth data packet.
In step S605, the first device determines that the packet 2, the packet 3, and the packet 4 are fourth packets.
In step S606, the first device transmits packet 1 to the second device after transmitting packet 2, packet 3, and packet 4 to the second device.
The following describes a scenario in which the out-of-order transmission method and the batch feedback method are combined.
In this scenario, the first data transmission mode is an out-of-order transmission mode, and the first data feedback mode is a batch feedback mode.
In this scenario, in step S403, the at least one first packet expected by the second device includes one or more seventh packets. Wherein the one or more seventh data packets represent data packets that the second device did not successfully receive, among the at least one data packet transmitted by the first device in step S401.
In this scenario, in step S405, the one or more data packets sent by the first device to the second device include a plurality of fourth data packets, where a sequence number of the fourth data packet is greater than a sequence number of the third data packet, and a difference between a sequence number P of the fourth data packet and a sequence number M of the third data packet is less than or equal to K. The third data packet belongs to the at least one data packet sent in step S401, and the first device has not received acknowledgement feedback for the third data packet. K is pre-configured or defined. P, M and K are integers greater than or equal to 0.
Fig. 5d shows a flowchart of the communication method provided in the embodiment of the present application in a scenario in which the out-of-order sending manner and the batch feedback manner are combined. On the basis of fig. 5a, as shown in fig. 5d, the communication method includes:
in step S701, the first device transmits packet 0, packet 1, packet 2, and packet 3 to the second device.
In step S702, the second device has received packet 0 and packet 2, and has not received packet 1 and packet 3.
In step S703, the second device transmits indication information to the first device, where the indication information is 1010.
In step S704, the first device receives the indication information from the second device, and then confirms that the data packets 1 and 3 are the first data packets expected by the second device.
In step S705, the first device determines that the packet 4 is a fourth packet.
Since the data packets 1 and 3 belong to the data packets that have been transmitted in step S501, and the data packets that have not been received by the second device in step S502. Thus, packet 1 and packet 3 are the first packets expected by the second device. The second device sends 1010 the indication information to the first device to indicate that the second device did not successfully receive packet 1 and packet 3. The first device, upon receiving the indication, may determine that acknowledgement feedback for data packet 1 and data packet 3 was not received. Thus, the first device may confirm packet 1 and packet 3 as the third packet. At this time, the sequence number of the third packet includes 1 and 3.
Considering that the sequence number of any one fourth data packet is greater than the sequence number of the third data packet with the largest sequence number in the at least one third data packet, the difference between the sequence number P of any one fourth data packet and the sequence number M of each third data packet is less than or equal to K. Since the sequence number of the third packet includes 1 and 3, the sequence number of the fourth packet needs to be greater than 3. For the data packets 0 to 3, the sequence number thereof is smaller than 3, and thus it cannot be the fourth data packet. For the packet 4, the sequence number (4) is greater than the sequence number M (including 1 and 3) of the third packet, and the difference between the sequence number P (4) and the sequence number M (including 1 and 3) of the third packet is less than or equal to K (3). Thus, packet 4 may be the fourth packet. For the packet 5, there is a case where the difference between the sequence number P (5) thereof and the sequence number M (including 1 and 3) of the third packet is larger than K (3), and therefore, the packet 5 cannot be the fourth packet. Similarly, the data packet 6 and the data packet 7 cannot be regarded as the fourth data packet.
It is to be understood that, for simplicity, the first device may determine which data packets can be regarded as the fourth data packets by only using the sequence number of the data packet with the smallest sequence number in the at least one third data packet and the sequence number of any fourth data packet.
In step S706, the first device transmits packet 1, packet 3, packet 4, and packet 5 to the second device.
In the case where the number of packets that the first device can continuously transmit to the second device is 4, the number of fourth packets is smaller than the number of packets that the first device can continuously transmit to the second device, and thus, one or more packets transmitted by the first device to the second device may include packets "packet 1" and "packet 3" that need to be retransmitted, in addition to "packet 4" determined as the fourth packet. Since the number of data packets that need to be retransmitted plus the number of fourth data packets is still less than the number of data packets that the first device can continuously transmit to the second device, the one or more data packets that the first device transmits to the second device may also include data packet 5.
In the embodiment of the present application, although the second device desires the data packets 1 and 3, the first device transmits the data packets 4 and 5 to the second device. Thus, a transmission opportunity is provided for the data packet with a larger sequence number. Especially, for the case that the priority of the data packet with a larger sequence number is higher, the method provides a sending opportunity for the data packet with a higher priority and provides a guarantee for the service with a high priority.
In the above process, one or more data packets sent by the first device to the second device need to have sequence numbers that satisfy a certain condition, for example, a difference between the sequence numbers of the one or more data packets and the sequence numbers of the third data packets is less than or equal to K, continuity is satisfied, and the sequence numbers of the one or more data packets are greater than the sequence number of the third data packet. This approach pertains to the data packets being sent under control of the first device. In a possible implementation manner of the embodiment of the present application, the first device may transmit the at least one first data packet completely according to the expectation of the second device. This possible embodiment is explained below.
In the scenario of combining the out-of-order transmission mode and the single packet feedback mode, in step S403, the at least one first data packet expected by the second device includes a sixth data packet, where the sixth data packet indicates a priority higher than that of the fifth data packet. In step S405, the one or more data packets sent by the first device to the second device include a sixth data packet, that is, the sixth data packet indicated in the indication information. The second device determines whether the expected packet is a retransmitted packet or a high priority packet. Thus, a low priority packet and a high priority packet can be considered at the same time. In step S401, when the first device transmits at least one data packet to the second device, the sequence number of the high-priority data packet is carried in the data packet. Thus, the second device can know whether any data packet has a high priority data packet or not after receiving any data packet, and therefore whether the data packet is retransmitted or the high priority data packet is retransmitted firstly is determined.
For example, taking a value range of the sequence number as 0 to 7 as an example, 0 to 3 may be determined as the second sequence number segment, and 4 to 7 may be determined as the first sequence number segment, where the priority corresponding to the first sequence number segment is higher than the priority corresponding to the second sequence number segment, and the sequence number included in the first sequence number segment is different from the sequence number included in the second sequence number segment. When the second device successfully receives the data packet with the sequence number of 1 and the data packet indicates that the data packet with the sequence number of 4 exists in the first device, the second device may determine the value of the NESN according to its own requirements. If the second device expects to receive a high priority packet, it may set NESN to 4, causing the first device to transmit the high priority packet in the next transmission, at which point the first device does not have to determine whether the sequence number of the packet with sequence number 4 satisfies a certain condition. If the second device does not expect to receive a high priority packet, it may set NESN to 2 (i.e., the sequence number of the next packet). Thus, by the flexible selection of the second device, the transmission of the data packet with low priority and the data packet with high priority can be considered.
It should be noted that, in the embodiment of the present application, the NESN stored in the second device may be maintained as the minimum sequence number of the data packet that is not received, and the data packet may be discarded when a certain time elapses. Add 1 to NESN. Or the smallest sequence number added to the next unreceived packet.
Fig. 6 shows a schematic structural diagram of a communication device provided in an embodiment of the present application. The communication device may be the first device 21 shown in fig. 2b, which may be deployed in the electronic apparatus shown in fig. 3. As shown in fig. 6, the communication device 80 may include: a sending module 81, configured to send at least one data packet to the second apparatus; a receiving module 82, configured to receive indication information from the second device, where the indication information is used to indicate at least one first data packet expected by the second device; the sending module 81 is further configured to send one or more data packets to the second apparatus based on the first data transmission manner.
In the embodiment of the present application, after the first device determines at least one first data packet expected by the second device, the first device may determine one or more data packets to be sent to the second device, instead of simply sending the expected first data packet to the second device, according to the expected situation of the second device and the first data transmission manner, so that the possibility of sending the data packets by the first device is increased, the flexibility of data transmission is improved, and the communication performance is improved. Specifically, a data packet that the second device desires to retransmit and a data packet waiting for first transmission coexist in the first device, and the sequence number of the data packet to be retransmitted is smaller than the sequence number of the data packet waiting for first transmission. On one hand, one or more data packets sent by the first device based on the first data transmission mode may include a data packet with a larger sequence number waiting for first sending, so that the data packet does not need to wait for successful retransmission or discard of the data packet needing to be retransmitted before being sent, and waiting time for waiting for the data packet with the larger sequence number sent for the first time is shortened. On the other hand, the one or more data packets sent by the first device based on the first data transmission mode may further include a data packet to be retransmitted, so that the retransmitted data packet is not always preempted in sending opportunity by a data packet with a large sequence number waiting for being sent for the first time, and retransmission of the data packet with a small sequence number is ensured. Therefore, the communication method provided by the embodiment of the application can be used for simultaneously waiting for the transmission of the data packet with the larger sequence number which is sent for the first time and the transmission of the data packet with the smaller sequence number which needs to be retransmitted. Furthermore, the time for waiting for sending the data packet is saved, so that the storage time in a data packet sending end and a data packet receiving end is reduced, the communication method provided by the embodiment of the application can also save the storage resources and energy consumption of the sending end and the receiving end, and the applicability to the short-distance communication equipment with low cost and low power consumption is improved.
In one possible implementation manner, the first data transmission manner is a sequential transmission manner; the one or more data packets comprise a plurality of second data packets, the sequence numbers of the plurality of second data packets are continuous, and the data packet with the minimum sequence number in the plurality of second data packets is the third data packet with the minimum sequence number in at least one third data packet; wherein for any third data packet, the third data packet belongs to the at least one data packet, and the first device has not received acknowledgement feedback for the third data packet.
Optionally, a difference between the sequence number N of each second packet in the at least one second packet and the sequence number M of each third packet is less than or equal to K, where K is preconfigured or defined, and N, M, and K are integers greater than or equal to 0.
In a possible implementation manner, the first data transmission manner is a disordered transmission manner; the one or more data packets include one or more fourth data packets, the sequence number of any one of the fourth data packets is greater than the sequence number of the third data packet with the largest sequence number in at least one third data packet, the difference between the sequence number P of any one of the fourth data packets and the sequence number M of each of the third data packets is less than or equal to K, and K is preconfigured or defined; wherein for any third packet belonging to the at least one packet and for which acknowledgement feedback has not been received by the first device, P, M, and K are integers greater than or equal to 0.
In one possible implementation, the priority of any one of the fourth packets is greater than the priority of any one of the third packets.
In a possible implementation manner, the sequence number of any one of the fourth packets belongs to a first sequence number segment, the sequence number of any one of the third packets belongs to a second sequence number segment, the priority level corresponding to the first sequence number segment is higher than the priority level corresponding to the second sequence number segment, and the sequence number included in the first sequence number segment is different from the sequence number included in the second sequence number segment.
In a possible implementation manner, the sending module is further configured to send first information to the second apparatus, where the first information is used to indicate a data transmission manner desired by the first apparatus or a data transmission manner supported by the first apparatus.
In a possible implementation manner, the receiving module is further configured to receive first configuration information from the second apparatus, where the first configuration information is used to configure the first data transmission manner.
In a possible implementation manner, the K is configured or defined based on the cache region attribute of the first apparatus and the cache region attribute of the second apparatus; or K is configured or defined based on a transmission window size of the first apparatus and a reception window size of the second apparatus.
Fig. 7 shows a schematic structural diagram of a communication device provided in an embodiment of the present application. The communication device may be the second device 22 shown in fig. 2b, which may be deployed on the electronic apparatus shown in fig. 3. As shown in fig. 7, the communication device 90 may include: a receiving module 91, configured to receive at least one data packet from a first device; a sending module 92, configured to send, to the first device, indication information based on a first data feedback manner, where the indication information is used to indicate at least one first data packet expected by a second device; the receiving module 91 is further configured to receive one or more data packets from the first device.
In this embodiment, the second device may determine to feed back one or more desired first data packets to the first device based on the first data feedback manner, instead of simply feeding back ACK or NACK to the first device. In the embodiment of the application, through flexible data feedback, the selectable range and the selectable mode of the data packets sent by the first device are increased, so that the first device has the possibility of sending the data packets in batch or out of order. Under the condition that the data packet with the smaller sequence number needs to be retransmitted, a sending opportunity is provided for the data packet with the larger sequence number, so that the data packet with the larger sequence number can be sent without waiting for confirmation feedback of the data packet with the smaller sequence number, and thus, the data packet with the larger sequence number cannot be blocked due to retransmission of the data packet with the smaller sequence number, the sending of the data packet with the larger sequence number is guaranteed, and user experience is improved.
In a possible implementation manner, the first data feedback manner is a single-packet feedback manner; the at least one first data packet includes a fifth data packet, and the fifth data packet represents the data packet with the smallest sequence number in the data packets which are not successfully received in the at least one data packet.
In a possible implementation manner, the first data feedback manner is a batch feedback manner; the at least one first packet includes one or more seventh packets representing unsuccessfully received ones of the at least one packet.
In a possible implementation manner, the first data feedback manner is a single-packet feedback manner; the at least one first packet includes a sixth packet having a higher priority than the fifth packet.
In a possible implementation manner, the receiving module is further configured to receive first information from the first apparatus, where the first information is used to indicate a data transmission manner desired by the first apparatus or a data transmission manner supported by the first apparatus.
In a possible implementation manner, the sending module is further configured to send first configuration information to the first apparatus, where the first configuration information is used to configure a first data transmission manner, and the first data transmission manner is a sequential sending manner or a random sending manner.
An embodiment of the present application provides a communication apparatus, including: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions.
An embodiment of the present application further provides a communication apparatus, including: at least one processor and an interface circuit, wherein the at least one processor is configured to implement the above method via the interface circuit.
An embodiment of the present application provides an electronic device, including: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions.
An embodiment of the present application further provides a terminal, including: at least one processor and an interface circuit, wherein the at least one processor is configured to implement the above method via the interface circuit.
In one possible implementation manner, the terminal includes, but is not limited to, an intelligent manufacturing device, an intelligent wearing device, an intelligent transportation device, an intelligent home device, or the like. For example, intelligence manufacture equipment can be digit control machine tool and intelligent electric welding etc. and intelligence wearing equipment can be for motion wrist-watch, intelligent glasses and bluetooth headset etc. and intelligence transportation equipment can be for intelligent conveyer and intelligent carrier etc. and intelligent household equipment can be for smart jack, intelligent TV, intelligent refrigerator and intelligent washing machine etc..
Embodiments of the present application provide a non-transitory computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.
Embodiments of the present application provide a computer program product comprising computer readable code, or a non-transitory computer readable storage medium carrying computer readable code, which when run in a processor of an electronic device, the processor in the electronic device performs the above method.
The computer-readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an erasable Programmable Read-Only Memory (EPROM or flash Memory), a Static Random Access Memory (SRAM), a portable Compact Disc Read-Only Memory (CD-ROM), a Digital Versatile Disc (DVD), a Memory stick, a floppy disk, a mechanical coding device, such as a punch card or in-groove bump structure having instructions stored thereon, and any suitable combination of the foregoing.
Various aspects of the present application are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
It is also noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by hardware (e.g., a Circuit or an ASIC) for performing the corresponding function or action, or by combinations of hardware and software, such as firmware.
While the invention has been described in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from a review of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the word "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
The foregoing description of the embodiments of the present application has been presented for purposes of illustration and description and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope of the described embodiments. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or improvements to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (31)

1. A method of communication, the method comprising:
transmitting at least one data packet to the second device;
receiving indication information from the second device, wherein the indication information is used for indicating at least one first data packet expected by the second device;
and transmitting one or more data packets to the second device based on the first data transmission mode.
2. The method of claim 1, wherein the first data transmission mode is a sequential transmission mode;
the one or more data packets comprise a plurality of second data packets, the sequence numbers of the plurality of second data packets are continuous, and the data packet with the smallest sequence number in the plurality of second data packets is the third data packet with the smallest sequence number in at least one third data packet;
wherein for any third data packet, the third data packet belongs to the at least one data packet, and the first device has not received acknowledgement feedback for the third data packet.
3. The method of claim 1, wherein the first data transmission mode is an out-of-order transmission mode;
the one or more data packets comprise one or more fourth data packets, the sequence number of any one of the fourth data packets is greater than the sequence number of the third data packet with the largest sequence number in at least one third data packet, the difference value between the sequence number P of any one of the fourth data packets and the sequence number M of each third data packet is less than or equal to K, and K is preset or defined;
wherein for any third packet belonging to the at least one packet and for which acknowledgement feedback has not been received by the first device, P, M, and K are integers greater than or equal to 0.
4. The method of claim 3, further characterized by,
the priority of any one of the fourth packets is greater than the priority of any one of the third packets.
5. The method of claim 4, further characterized by,
the sequence number of any one of the fourth data packets belongs to a first sequence number section, the sequence number of any one of the third data packets belongs to a second sequence number section, the priority level corresponding to the first sequence number section is higher than the priority level corresponding to the second sequence number section, and the sequence number included in the first sequence number section is different from the sequence number included in the second sequence number section.
6. The method according to any one of claims 1 to 5, further comprising:
and receiving first configuration information from the second device, wherein the first configuration information is used for configuring the first data transmission mode.
7. The method according to any one of claims 1 to 6, further comprising:
and sending first information to the second device, wherein the first information is used for indicating a data transmission mode expected by the first device or a data transmission mode supported by the first device.
8. The method according to any one of claims 3 to 5,
the K is configured or defined based on the cache region attribute of the first device and/or the cache region attribute of the second device;
or,
the K is configured or defined based on a transmit window size of the first device and/or a receive window size of the second device.
9. A method of communication, the method comprising:
receiving at least one data packet from a first device;
sending indication information to the first device based on a first data feedback mode, wherein the indication information is used for indicating at least one first data packet expected by a second device;
one or more data packets are received from the first device.
10. The method according to claim 9, wherein the first data feedback mode is a single-packet feedback mode;
the at least one first data packet includes a fifth data packet, and the fifth data packet represents a data packet with a smallest sequence number in data packets which are not successfully received in the at least one data packet.
11. The method of claim 9, wherein the first data feedback mode is a single-packet feedback mode;
the at least one first data packet comprises a sixth data packet, the priority of the sixth data packet is higher than that of a fifth data packet, and the fifth data packet represents the data packet with the smallest sequence number in the data packets which are not successfully received in the at least one data packet.
12. The method of claim 9, wherein the first data feedback mode is a batch feedback mode;
the at least one first data packet includes one or more seventh data packets, the one or more seventh data packets representing unsuccessfully received data packets of the at least one data packet.
13. The method according to any one of claims 9 to 12, further comprising:
and sending first configuration information to the first device, wherein the first configuration information is used for configuring a first data transmission mode, and the first data transmission mode is a sequential sending mode or a disordered sending mode.
14. The method according to any one of claims 9 to 13, further comprising:
receiving first information from the first device, wherein the first information is used for indicating a data transmission mode expected by the first device or a data transmission mode supported by the first device.
15. A communications apparatus, the apparatus comprising:
a sending module, configured to send at least one data packet to a second device;
a receiving module, configured to receive indication information from the second device, where the indication information is used to indicate at least one first data packet expected by the second device;
the sending module is further configured to send one or more data packets to the second device based on the first data transmission mode.
16. The apparatus of claim 15, wherein the first data transmission mode is a sequential transmission mode;
the one or more data packets comprise a plurality of second data packets, the sequence numbers of the plurality of second data packets are continuous, and the data packet with the minimum sequence number in the plurality of second data packets is the third data packet with the minimum sequence number in at least one third data packet;
wherein for any third data packet, the third data packet belongs to the at least one data packet, and the first device has not received acknowledgement feedback for the third data packet.
17. The apparatus of claim 15, wherein the first data transmission mode is an out-of-order transmission mode;
the one or more data packets include one or more fourth data packets, the sequence number of any one of the fourth data packets is greater than the sequence number of the third data packet with the largest sequence number in at least one of the third data packets, the difference between the sequence number P of any one of the fourth data packets and the sequence number M of each third data packet is less than or equal to K, and K is preconfigured or defined;
wherein for any third packet belonging to the at least one packet and for which acknowledgement feedback has not been received by the first device, P, M, and K are integers greater than or equal to 0.
18. The apparatus of claim 17, further characterized by,
the priority of any one of the fourth packets is greater than the priority of any one of the third packets.
19. The apparatus of claim 18, further characterized in that,
the sequence number of any one of the fourth data packets belongs to a first sequence number section, the sequence number of any one of the third data packets belongs to a second sequence number section, the priority level corresponding to the first sequence number section is higher than the priority level corresponding to the second sequence number section, and the sequence number included in the first sequence number section is different from the sequence number included in the second sequence number section.
20. The apparatus of any one of claims 15 to 19,
the receiving module is further configured to receive first configuration information from the second device, where the first configuration information is used to configure the first data transmission mode.
21. The apparatus of any one of claims 15 to 20,
the sending module is further configured to send first information to the second apparatus, where the first information is used to indicate a data transmission mode desired by the first apparatus or a data transmission mode supported by the first apparatus.
22. The apparatus of any one of claims 17 to 19,
the K is configured or defined based on the cache region attribute of the first device and/or the cache region attribute of the second device;
or,
the K is configured or defined based on a transmit window size of the first device and/or a receive window size of the second device.
23. A communications apparatus, the apparatus comprising:
a receiving module for receiving at least one data packet from a first device;
a sending module, configured to send, to the first device, indication information based on a first data feedback manner, where the indication information is used to indicate at least one first data packet expected by a second device;
the receiving module is further configured to receive one or more data packets from the first device.
24. The apparatus of claim 23, wherein the first data feedback mode is a single-packet feedback mode;
the at least one first data packet includes a fifth data packet indicating a data packet with a minimum sequence number among data packets which are not successfully received.
25. The apparatus of claim 23, wherein the first data feedback mode is a single-packet feedback mode;
the at least one first data packet comprises a sixth data packet, the priority of the sixth data packet is higher than that of a fifth data packet, and the fifth data packet represents the data packet with the smallest sequence number in the data packets which are not successfully received in the at least one data packet.
26. The apparatus of claim 23, wherein the first data feedback mode is a batch feedback mode;
the at least one first packet includes one or more seventh packets representing unsuccessfully received ones of the at least one packet.
27. The apparatus of any one of claims 23 to 26,
the sending module is further configured to send first configuration information to the first device, where the first configuration information is used to configure a first data transmission mode, and the first data transmission mode is a sequential sending mode or a random sending mode.
28. The apparatus of any one of claims 23 to 27,
the receiving module is further configured to receive first information from the first device, where the first information is used to indicate a data transmission mode desired by the first device or a data transmission mode supported by the first device.
29. A communications apparatus, comprising:
at least one processor;
an interface circuit;
wherein the at least one processor is configured to implement the method of any one of claims 1 to 8, or to implement the method of any one of claims 9 to 14, by means of the interface circuit.
30. A non-transitory computer readable storage medium having stored thereon computer program instructions, wherein the computer program instructions, when executed by a processor, implement the method of any one of claims 1 to 8 or the method of any one of claims 9 to 14.
31. A terminal, comprising:
at least one processor;
an interface circuit;
wherein the at least one processor is configured to implement the method of any one of claims 1 to 8, or to implement the method of any one of claims 9 to 14, via the interface circuitry.
CN202110750224.4A 2021-07-02 2021-07-02 Communication method and device Active CN115499932B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110750224.4A CN115499932B (en) 2021-07-02 2021-07-02 Communication method and device
PCT/CN2022/101247 WO2023274082A1 (en) 2021-07-02 2022-06-24 Communication method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110750224.4A CN115499932B (en) 2021-07-02 2021-07-02 Communication method and device

Publications (2)

Publication Number Publication Date
CN115499932A true CN115499932A (en) 2022-12-20
CN115499932B CN115499932B (en) 2023-07-18

Family

ID=84465216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110750224.4A Active CN115499932B (en) 2021-07-02 2021-07-02 Communication method and device

Country Status (2)

Country Link
CN (1) CN115499932B (en)
WO (1) WO2023274082A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130010960A1 (en) * 2011-07-05 2013-01-10 Texas Instruments Incorporated Methods to Improve Bluetooth Low Energy Performance
WO2019029350A1 (en) * 2017-08-11 2019-02-14 华为技术有限公司 Data processing method and related device
CN111740808A (en) * 2019-03-25 2020-10-02 华为技术有限公司 Data transmission method and device
CN111865503A (en) * 2019-04-30 2020-10-30 华为技术有限公司 Method and equipment for sending and receiving feedback information
CN113346982A (en) * 2021-05-31 2021-09-03 合肥中感微电子有限公司 Data transmission method, data receiving method and data receiving device
US20210279126A1 (en) * 2020-03-03 2021-09-09 Qualcomm Incorporated Empty data packet hard align
WO2021212438A1 (en) * 2020-04-23 2021-10-28 深圳市大疆创新科技有限公司 Data transmission method, apparatus and system, terminal device, and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010108257A1 (en) * 2009-03-23 2010-09-30 Research In Motion Limited Systems and methods for allocating and transmitting uplink data block transmissions with piggy-backed ack/nack bitmap
US10430374B2 (en) * 2016-06-29 2019-10-01 Mellanox Technologies, Ltd. Selective acknowledgement of RDMA packets
GB2561545B (en) * 2017-03-24 2021-12-15 Tcl Communication Ltd Layer 2 architecture for cellular radio systems
KR20210083298A (en) * 2018-11-02 2021-07-06 지티이 코포레이션 Data transmission and measurement techniques

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130010960A1 (en) * 2011-07-05 2013-01-10 Texas Instruments Incorporated Methods to Improve Bluetooth Low Energy Performance
WO2019029350A1 (en) * 2017-08-11 2019-02-14 华为技术有限公司 Data processing method and related device
CN111740808A (en) * 2019-03-25 2020-10-02 华为技术有限公司 Data transmission method and device
CN111865503A (en) * 2019-04-30 2020-10-30 华为技术有限公司 Method and equipment for sending and receiving feedback information
US20210279126A1 (en) * 2020-03-03 2021-09-09 Qualcomm Incorporated Empty data packet hard align
WO2021212438A1 (en) * 2020-04-23 2021-10-28 深圳市大疆创新科技有限公司 Data transmission method, apparatus and system, terminal device, and storage medium
CN113346982A (en) * 2021-05-31 2021-09-03 合肥中感微电子有限公司 Data transmission method, data receiving method and data receiving device

Also Published As

Publication number Publication date
WO2023274082A1 (en) 2023-01-05
CN115499932B (en) 2023-07-18

Similar Documents

Publication Publication Date Title
TWI710279B (en) End-to-end data transmission method, apparatus, and system
US10594447B2 (en) Data transmission method, terminal, and ran device
KR102524306B1 (en) Communication method, network device and terminal
CN110168982B (en) System and method for adaptive multi-HARQ entity design
CN107645368B (en) Method and apparatus for unsolicited block acknowledgement
EP4154447A1 (en) Method and apparatus for configuring network coding and controlling network coding activation
WO2021072662A1 (en) Hybrid automatic repeat request feedback method and apparatus
WO2021081696A1 (en) Data transmission method and communication apparatus
CN111865503A (en) Method and equipment for sending and receiving feedback information
CN114157723B (en) Communication method and device
US20230188267A1 (en) Indication information receiving method, and apparatus
WO2021134659A1 (en) Method and device for relay transmission
CN115499932B (en) Communication method and device
US20190116597A1 (en) Mobile device and uplink data transmission method thereof
CN113455044A (en) Apparatus, method and computer program for communication using configuration authorization
WO2022077472A1 (en) Sidelink transmission method and communication apparatus
CN112399477B (en) Communication method and device
CN112235731B (en) Communication method, device and system
CN111867063B (en) Uplink transmission method and communication device
CN114337889A (en) Data transmission method, data reception method, communication device, and computer storage medium
WO2021134639A1 (en) Data feedback method and apparatus
WO2023165387A1 (en) Communication method and device
WO2023279359A1 (en) Communication method and apparatus
WO2024037254A1 (en) Communication method and apparatus
WO2023272444A1 (en) Communication method and communication apparatus therefor

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
GR01 Patent grant
GR01 Patent grant