CN114337942B - Message retransmission method and device and electronic equipment - Google Patents

Message retransmission method and device and electronic equipment Download PDF

Info

Publication number
CN114337942B
CN114337942B CN202111648224.XA CN202111648224A CN114337942B CN 114337942 B CN114337942 B CN 114337942B CN 202111648224 A CN202111648224 A CN 202111648224A CN 114337942 B CN114337942 B CN 114337942B
Authority
CN
China
Prior art keywords
message
retransmission
lost
initial
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.)
Active
Application number
CN202111648224.XA
Other languages
Chinese (zh)
Other versions
CN114337942A (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.)
WELLAV TECHNOLOGIES Ltd
Original Assignee
WELLAV TECHNOLOGIES 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 WELLAV TECHNOLOGIES Ltd filed Critical WELLAV TECHNOLOGIES Ltd
Priority to CN202111648224.XA priority Critical patent/CN114337942B/en
Publication of CN114337942A publication Critical patent/CN114337942A/en
Application granted granted Critical
Publication of CN114337942B publication Critical patent/CN114337942B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Communication Control (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

The application discloses a message retransmission method, a message retransmission device and electronic equipment, wherein the method comprises the following steps: receiving message data, and storing the message data in a preset storage area; determining at least one lost message needing to be retransmitted in the storage area; generating a corresponding retransmission message according to the loss rule of the lost message, wherein the retransmission message at least comprises retransmission information of an initial message and retransmission requirement information of a plurality of message packets with continuous sequence numbers behind the initial message; and sending the retransmission message to obtain at least one message packet which corresponds to the retransmission message and needs to be retransmitted. The embodiment of the application improves the return efficiency, reduces the occupation of network resources, and further can improve the reliability of data transmission.

Description

Message retransmission method and device and electronic equipment
Technical Field
The present invention relates to the field of data transmission, and in particular, to a method and apparatus for retransmitting a message, and an electronic device.
Background
The current internet transmission technology is complex in network environment, and packet loss phenomenon is easy to occur in the data transmission process. To ensure the integrity of the transmitted data, it is often necessary to collate the received data and to retransmit if there is a packet loss.
In a specific transmission implementation, when multiple data packets are to be transmitted consecutively. The message sender defines the message identifiers of each message to be sent in sequence, and then sends the messages to the receiver one by one. After the receiving end receives part of the message, it will check if the received message mark is continuous to determine if there is packet loss. If the packet loss phenomenon exists, the receiving end marks the lost message and feeds back the message to the transmitting end through the retransmission message, namely the NACK message.
Because the number of losses is not determined, the receiving end usually detects that one message is lost, and then performs a backhaul action. When the receiving end detects that two messages are lost, the receiving end executes the action of returning twice, and so on. After receiving the returned message, the transmitting end analyzes the message identifier corresponding to the lost message in the retransmission message and transmits the message packet corresponding to the message identifier to the receiving end again. So as to achieve the function of packet loss retransmission.
In the existing data transmission mode, the number of times of returning the lost messages corresponds to the number of the lost messages detected by the receiving end, if the network environment is poor and the number of the lost messages is large, the data returning efficiency is low, meanwhile, the message returning action can increase the network burden, and further the packet loss condition can be increased, so that the data transmission reliability is affected.
Disclosure of Invention
The application provides a message retransmission method, a message retransmission device and electronic equipment, which can improve the data transmission reliability by improving the return efficiency.
The application discloses a message retransmission method, which is applied to electronic equipment and comprises the following steps:
receiving message data, and storing the message data in a preset storage area;
determining at least one lost message needing to be retransmitted in the storage area;
generating a corresponding retransmission message according to the loss rule of the lost message, wherein the retransmission message at least comprises a starting message and retransmission requirements of a plurality of message packets with continuous sequence numbers behind the starting message;
and sending the retransmission message to obtain at least one message packet which corresponds to the retransmission message and needs to be retransmitted.
In an embodiment, the generating a corresponding retransmission message according to the loss characteristics of the at least one packet that needs to be retransmitted includes:
determining an initial message in at least one message packet needing to be retransmitted;
judging the number of lost messages in a continuous preset number of message packets behind the initial message based on the initial message;
selecting and executing retransmission strategies of corresponding lost messages according to the number of the lost messages in the continuous preset number of message packets behind the initial message; wherein the retransmission policy at least comprises a retransmission policy based on a bitmask pattern and/or a retransmission policy based on a range pattern;
and generating a corresponding retransmission message according to the retransmission strategy.
In an embodiment, the selecting a retransmission policy for executing the corresponding lost message according to the number of the lost messages in the continuous preset number of message packets behind the initial message includes:
when the number of the lost messages in the continuous preset number of message packets behind the initial message is larger than a preset value, adopting a retransmission strategy based on a range mode;
and when the number of the lost messages in the continuous preset number of message packets behind the initial message is smaller than or equal to a preset value, adopting the retransmission strategy based on the bit mask mode.
In an embodiment, the retransmission policy adopting the bitmask mode includes:
forming bit masks for lost states in a continuous preset number of message packets behind the initial message;
the bit order in the bit mask corresponds to the sequence number order of the packets with the continuous preset number behind the initial packet, and the mark information of each bit in the bit mask corresponds to the lost state of the packets with the continuous preset number behind the initial packet;
the generating a corresponding retransmission message according to the retransmission policy includes:
and generating a corresponding retransmission message according to the retransmission information of the initial message and the information of the bit mask.
In one embodiment, the flag information of each bit in the bit mask adopts binary values to correspond to the lost state of the packet.
In an embodiment, the range mode based retransmission strategy includes:
determining the subsequent continuous lost message number of the initial message;
the generating a corresponding retransmission message according to the retransmission policy includes:
and generating a corresponding retransmission message according to the retransmission information of the initial message and the continuous lost message number.
In an embodiment, the preset value is 16, and the length of the bit mask in the retransmission strategy based on the bit mask pattern is 16 bits.
In an embodiment, the generating a corresponding retransmission message according to the retransmission policy further includes:
and adding the definition mark corresponding to the retransmission strategy into the retransmission message.
The application also discloses a message retransmission device, which comprises:
the receiving module is used for receiving the message data and storing the message data in a preset storage area;
the processing module is used for determining at least one lost message needing to be retransmitted in the storage area; generating a corresponding retransmission message according to the loss rule of the lost message, wherein the retransmission message at least comprises retransmission information of an initial message and retransmission requirement information of a plurality of message packets with continuous sequence numbers behind the initial message;
and the sending module is used for sending the retransmission message to obtain at least one message packet which corresponds to the retransmission message and needs to be retransmitted.
The application also discloses electronic equipment, electronic equipment includes:
a processor; and
the memory stores a computer program, and the processor is configured to execute the method for retransmitting a message according to any one of the above by calling the computer program stored in the memory.
As can be seen from the foregoing, according to the method, the device and the electronic device for retransmitting a message disclosed in the present application, at least one missing message that needs to be retransmitted in received message data is determined, and a corresponding retransmission message is generated according to a loss rule of the missing message to retransmit, where the retransmission message at least includes retransmission information of a starting message and retransmission requirement information of a plurality of message packets with continuous sequence numbers behind the starting message. According to the method and the device, the retransmission messages are returned, the sending end can learn the message retransmission requirements of one or more quantity only through one retransmission feedback, and repeated returning of the retransmission messages is not needed when the network conditions are poor, so that the returning efficiency is improved, the occupation of network resources is reduced, and the data transmission reliability can be improved.
Drawings
Fig. 1 is an application scenario diagram of a message retransmission method provided in an embodiment of the present application.
Fig. 2 is a flowchart of an implementation of a method for retransmitting a message according to an embodiment of the present application.
Fig. 3 is a flowchart of an implementation of generating a retransmission packet according to an embodiment of the present application.
Fig. 4 is a schematic diagram of a retransmission packet structure based on a bitmask pattern according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a retransmission packet structure based on a range mode according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a message retransmission apparatus according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The preferred embodiments of the present application will be described in detail below with reference to the attached drawings so that the advantages and features of the present application will be more readily understood by those skilled in the art, thereby more clearly defining the scope of the present application.
In the description of the present application, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically connected, electrically connected or can be communicated with each other; can be directly connected or indirectly connected through an intermediate medium, and can be communicated with the inside of two elements or the interaction relationship of the two elements. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art as the case may be.
Referring to fig. 1, an application scenario of a message retransmission method provided in an embodiment of the present application is shown in the figure.
As shown in fig. 1, the application scenario includes a transmitting apparatus 1 and a receiving apparatus 2, and the transmitting apparatus 1 and the receiving apparatus 2 are connected to each other through a plurality of transmission networks. The transmitting device 1 and the receiving device 2 may be common electronic devices, such as a mobile phone, a personal computer, a server, or other devices that can be used for transmitting and receiving electronic messages, and the specific electronic device type is not limited in this application.
The transmission network may be implemented by a cloud server, for example, by a cloud server of a local service provider such as china telecommunication, china mobile, etc., and the plurality of transmission networks (for example, transmission networks a-N in the figure) may simultaneously include transmission networks provided by the same or different local service providers, and the number of transmission networks is not limited. Of course, the transmission network is not limited to the local service provider, and the transmission device 1 and the reception device 2 may be connected by a wire harness alone, and the connection manner may be determined according to the actual situation.
The transmission network may be connected to the transmitting device 1 and the receiving device 2 through corresponding transmission ports (for example, transmission ports a to N in the figure), and may be implemented in hardware such as RJ45, USB, PCIE, or the like, or may be implemented in a wireless network such as WIFI, 4/5G, or the like, as a transmission port, and the configuration of the transmission port is not limited.
When the receiving device 2 receives the message data through the transmission network port, the message data can be stored in the memory to be used, if the message data needing to be retransmitted is detected, the retransmission message can be generated and returned to the transmitting device 1, and the transmitting device 1 can retransmit the message data according to the retransmission message.
In addition, the transmitting device 1 and the receiving device 2 may further include a power source, a signal input/output module, a display, and other hardware modules commonly used in the art, which are not limited in this application.
Referring to fig. 2, a flow of implementing the method for retransmitting a message provided in the embodiment of the present application is shown.
As shown in fig. 2, the method for retransmitting the message is applied to an electronic device, and includes:
101. receiving message data and storing the message data in a preset storage area.
The storage area may be an area of the electronic device for data storage and buffering, such as a buffer or a memory, and the type of the storage area is not limited.
The message data may be received through a transmission network port connected to a transmission network, and the message data may be message data sent by a sending device through the transmission network. The message data may be in a data transmission protocol format commonly used in the art, and the type and format of the message data are not limited in the application.
102. At least one missing message in the storage area that needs to be retransmitted is determined.
The message data stored in the storage area may be stored according to a preset rule, for example, in a sequence number ordering manner, and then the position of the lost message may be determined by detecting whether the message data is not received at a certain storage position under the preset rule.
In an embodiment, the number of lost messages in a certain message interval and the corresponding message sequence number may be determined. The loss rule of the lost message can be obtained by determining the condition of the lost message.
103. And generating a corresponding retransmission message according to the loss rule of the lost message, wherein the retransmission message at least comprises retransmission information of the initial message and retransmission requirement information of a plurality of message packets with continuous sequence numbers behind the initial message.
After determining at least one lost message that needs to be retransmitted in the storage area, the loss rule of the lost message can be determined according to the loss rule of the lost message. By obtaining the loss rule of the lost message, a retransmission policy corresponding to the loss rule can be executed.
For example, it may be determined whether the lost packet is a plurality of packets that are continuously lost in a certain interval, and at this time, the lost packets in the interval may be retransmitted at the same time. Or whether the lost message is only a few of the packets, and the individual retransmission can be performed for the few packets.
Further, in order to improve retransmission efficiency of the NACK message and reduce occupation of network resources caused by retransmission, the retransmission message may include retransmission information of the initial message and retransmission requirement information of a plurality of packets with consecutive sequence numbers after the initial message. Specifically, the initial message may be a retransmission message sequenced earlier in the determined lost message, or a certain message selected in a specific retransmission rule, and a specific selection mode is not limited.
The retransmission requirement information may be corresponding information showing packet loss states of a plurality of messages.
In an embodiment, in the case of missing a few packets with similar sequence numbers, the retransmission requirement information with the packet loss state of the packets as a bit mask can be adopted, the bit mask uses the sequence number of the initial packet as a calibration, and the binary or other binary digits represent the packet loss states of a plurality of packets at specific positions subsequent to the initial packet, so that the sending device can quickly acquire whether the packets at the specific positions need to be retransmitted according to the bit mask in the retransmission packet.
In another embodiment, in the case of continuously losing multiple messages, information related to the message sequence number range of several continuously lost messages may be used as retransmission requirement information. The message sequence number range of the continuous lost message can enable the sending device to retransmit the message in the message sequence number range according to the information, so that the positions of the plurality of continuous lost messages are not required to be acquired by receiving NACK retransmission messages one by one.
104. And sending the retransmission message to obtain at least one message packet which corresponds to the retransmission message and needs to be retransmitted.
The retransmission message can be returned through the transmission network port and is returned to the sending device for sending the message data, so that the sending device retransmits the lost message based on the information of the lost message in the retransmission message.
The retransmission message carrying the retransmission information of the initial message and the retransmission requirement information of a plurality of message packets with continuous sequence numbers behind the initial message is transmitted back, so that a transmitting device can simultaneously know the information of a plurality of lost messages by only analyzing one retransmission message, thereby arranging retransmission of the plurality of lost messages and reducing the retransmission times of NACK retransmission messages. In addition, the network can be more reasonably arranged by reducing the retransmission times, network resources occupied by retransmission actions are reduced, and the reliability of the data transmission process is improved.
Referring to fig. 3, an implementation manner of generating a retransmission packet according to an embodiment of the present application is shown.
As shown in fig. 3, in a process of generating a retransmission message, the following steps may be included:
201. and determining the initial message in at least one message packet needing to be retransmitted.
The initial message may be a retransmission message sequenced earlier in the determined lost message, or a certain message selected in a specific retransmission rule, and the specific selection mode is not limited.
202. Based on the initial message, determining the number of lost messages in the continuous preset number of message packets behind the initial message.
The preset value can be set according to the requirement, and can be determined according to the characteristic of the number of the returned retransmission strategies.
In an embodiment, since the bit mask in the bit mask pattern can represent the lost state of 16 messages at maximum, the preset value can be set to the number of 16 lost messages, so that when the number of consecutive lost messages behind the initial message is in different interval ranges, retransmission can be performed through the corresponding retransmission policy.
It can be appreciated that the preset value may be determined according to the format size of the retransmission request information of the actual packet for storing the subsequent packet, for example, a storage size of 16 bits is used as a bit mask, if the 1bit can record the lost state of 1 packet, the preset value may be set to 16, and when the number of consecutive lost packets after the initial packet is less than or equal to 16 lost packets, a corresponding retransmission policy based on the bit mask is executed. Of course, if 32 bits are used as the memory size of the bitmask, the preset value may be set to 32, and so on.
203. The number of lost messages in the continuous preset number of message packets behind the initial message is larger than a preset value.
By setting the preset value as a judgment threshold, the receiving device can adaptively adjust to a proper retransmission strategy according to the number of the continuous lost messages behind the initial message so as to consider the retransmission success rate and the retransmission efficiency.
204. A range mode based retransmission strategy is employed.
When the number of the lost messages in the continuous preset number of message packets behind the initial message is larger than the preset value, the condition that the transmission network is possibly interrupted and the like is indicated, so that a large number of message packets are lost. At this time, if several messages are retransmitted, the efficiency is low, and the efficiency requirement cannot be met.
Therefore, the retransmission strategy based on the range mode can take the sequence number of the initial message as the initial sequence number, the sequence numbers of a plurality of message packets in the range are taken as the sequence numbers of the message packets needing to be retransmitted by determining the range between the sequence number of the initial message and the sequence number of the subsequent lost message, and then the corresponding retransmission message is generated by the framed sequence number range value, so that the sending device can retransmit the messages in batches through the sequence number range value.
In an embodiment, a range mode based retransmission strategy includes: determining the subsequent continuous lost message number of the initial message; generating a corresponding retransmission message according to a retransmission strategy, including: and generating a corresponding retransmission message according to the retransmission information of the initial message and the number of the continuous lost messages.
For example, if the sequence number of the initial packet is 10000, the subsequent 11000 packets of the initial packet are detected to be lost, at this time, the packets with sequence numbers ranging from 10000 to 21000 can be considered as lost packets, and the number of the packets 11000 in the range can be regarded as the number of continuous lost packets, and the number of the continuous lost packets can be used for generating corresponding retransmission packets.
205. A retransmission strategy based on a bit mask pattern is employed.
When the number of the lost messages in the continuous preset number of message packets behind the initial message is smaller than the preset value, the lost messages can be considered to be not large in number, and retransmission based on the range is performed at the moment, so that the condition of repeated transmission can occur.
Therefore, the retransmission of a plurality of packets can meet the retransmission requirement. The retransmission policy based on the bitmask pattern may include:
forming bit masks for lost states in a continuous preset number of message packets behind the initial message; generating a corresponding retransmission message according to a retransmission strategy, including: and generating a corresponding retransmission message according to the retransmission information of the initial message and the information of the bit mask.
The bit order in the bit mask corresponds to the sequence number order of the packets of the continuous preset number behind the initial packet, and the mark information of each bit in the bit mask corresponds to the lost state of the packets of the continuous preset number behind the initial packet.
Through the lost states corresponding to a plurality of subsequent packets of the initial message recorded in the bit mask, the sending device can locate the positions of a plurality of subsequent lost messages of the initial message by receiving the retransmission message once.
In one embodiment, the flag information of each bit in the bitmask uses a binary value to correspond to the lost state of the packet. The binary value is indicated by a "1" or a "0" to indicate the status of the message "lost" or "not lost".
For example, if the bit mask is 1001, it may be defined as the first 4 messages of the initial message, and the 1 st and 4 th messages are required to be retransmitted. Thus, enough retransmission message information can be returned in the limited NACK message size. If the 16bit is used as the information storage size of the bit mask, the 1bit is used for recording the lost state of the corresponding message, the 16bit information can record the lost state of 16 message packets, and the initial message is also the lost message, so that the lost state of 17-bit continuous messages can be recorded once.
Of course, instead of using binary values to compose a bitmask as described above, other forms of markers may be used to compose a bitmask, which is not limited in this application.
206. And generating a corresponding retransmission message according to the retransmission strategy.
In order to enable the transmitting device to determine the retransmission policy of the retransmission message, a definition flag (payload type) may be set on the retransmission message to identify the current retransmission policy. For example, a range-based retransmission policy is denoted 204, and a bit mask-based retransmission policy is denoted 205. When the transmitting device detects the corresponding definition mark, the corresponding identification mode is adopted to identify the retransmission requirement information of a plurality of continuous packets behind the initial message.
It will be appreciated that the definition mark may be marked in a corresponding manner according to actual needs, which is not limited in this application.
Referring to fig. 4, a retransmission packet structure based on a bitmask pattern provided in an embodiment of the present application is shown.
In an embodiment, the sequence number information of the initial message occupies 16 bits, the information of the definition mark occupies 8 bits, and the 16 bits can be used as a bit mask for transmission, so that the sending device or the cloud can know the packet loss states of 17 continuous messages including the initial message through the NACK message, and retransmit the message packet in which the packet loss is determined.
For example, the information defining the flag in fig. 4 is located at the L1 position in the packet, and other parts of L1 may be used to carry other packet information of the NACK packet. The sequence number information and the bit mask of the initial message are positioned at the L2 position, and the sequence number information and the bit mask of the initial message occupy 32 bits in total.
Referring to fig. 5, a retransmission message structure based on range mode provided in an embodiment of the present application is shown.
In another embodiment, the sequence number information of the initial message occupies 16 bits, the information of the definition mark occupies 8 bits, and the 16 bits can be used as a value corresponding to the number of N lost messages for transmission, so that the sending device or the cloud can know the packet loss state of 1+n continuous messages including the initial message through the NACK message, and retransmit the packets in the range number.
For example, the information defining the flag in fig. 5 is located at the L1 position in the packet, and other parts of L1 may be used to carry other packet information of the NACK packet. The number corresponding to the number of the initial message and the number of the lost message is located at the L2 position, and the number corresponding to the number of the initial message and the number of the lost message occupies 32 bits.
Of course, other message structure modes besides the retransmission message format can be formulated according to the actual protocol type. The sequence number information of the initial message, the bit mask, and the information size and length corresponding to the numerical values corresponding to the number of the N missing messages may be determined according to different protocol types and preset manners, which is not limited in this application.
By generating the retransmission message structure, the transmitting device can determine the retransmission strategy corresponding to the retransmission message by defining the mark only by receiving the retransmission message once, and analyze the information of a plurality of lost messages by utilizing the corresponding retransmission strategy so as to improve the retransmission efficiency.
Referring to fig. 6, a structure of a message retransmission apparatus provided in an embodiment of the present application is shown.
As shown in fig. 6, the message retransmission apparatus 30 includes a receiving module 31, a processing module 32, and a transmitting module 33.
The receiving module 31 and the transmitting module 33 may be implemented through a transmission network port connected to a transmission network, or may be implemented by other hardware interfaces, which is not limited in this application.
The receiving module 31 is configured to receive the message data, and store the message data in a preset storage area.
The storage area may be an area of the electronic device for data storage and buffering, such as a buffer or a memory, and the type of the storage area is not limited.
The message data may be received through a transmission network port connected to a transmission network, and the message data may be message data sent by a sending device through the transmission network. The message data may be in a data transmission protocol format commonly used in the art, and the type and format of the message data are not limited in the application.
The processing module 32 is configured to determine at least one missing message that needs to be retransmitted in the storage area; and generating a corresponding retransmission message according to the loss rule of the lost message, wherein the retransmission message at least comprises retransmission information of the initial message and retransmission requirement information of a plurality of message packets with continuous sequence numbers behind the initial message.
The processing module 32 may be implemented by an MCU, a CPU, or a common data processing component. The memory area may be implemented by a memory.
The message data stored in the storage area may be stored according to a preset rule, for example, in a sequence number ordering manner, and then the position of the lost message may be determined by detecting whether the message data is not received at a certain storage position under the preset rule.
In an embodiment, the number of lost messages in a certain message interval and the corresponding message sequence number may be determined. The loss rule of the lost message can be obtained by determining the condition of the lost message.
After determining at least one lost message that needs to be retransmitted in the storage area, the loss rule of the lost message can be determined according to the loss rule of the lost message. By obtaining the loss rule of the lost message, a retransmission policy corresponding to the loss rule can be executed.
For example, it may be determined whether the lost packet is a plurality of packets that are continuously lost in a certain interval, and at this time, the lost packets in the interval may be retransmitted at the same time. Or whether the lost message is only a few of the packets, and the individual retransmission can be performed for the few packets.
Further, in order to improve retransmission efficiency of the NACK message and reduce occupation of network resources caused by retransmission, the retransmission message may include retransmission information of the initial message and retransmission requirement information of a plurality of packets with consecutive sequence numbers after the initial message. Specifically, the initial message may be a retransmission message sequenced earlier in the determined lost message, or a certain message selected in a specific retransmission rule, and a specific selection mode is not limited.
The retransmission requirement information may be corresponding information showing packet loss states of a plurality of messages.
In an embodiment, in the case of missing a few packets with similar sequence numbers, the retransmission requirement information with the packet loss state of the packets as a bit mask can be adopted, the bit mask uses the sequence number of the initial packet as a calibration, and the binary or other binary digits represent the packet loss states of a plurality of packets at specific positions subsequent to the initial packet, so that the sending device can quickly acquire whether the packets at the specific positions need to be retransmitted according to the bit mask in the retransmission packet.
In another embodiment, in the case of continuously losing multiple messages, information related to the message sequence number range of several continuously lost messages may be used as retransmission requirement information. The message sequence number range of the continuous lost message can enable the sending device to retransmit the message in the message sequence number range according to the information, so that the positions of the plurality of continuous lost messages are not required to be acquired by receiving NACK retransmission messages one by one.
The sending module 33 is configured to send a retransmission message to obtain at least one packet that needs to be retransmitted corresponding to the retransmission message.
The retransmission message can be returned through the transmission network port and is returned to the sending device for sending the message data, so that the sending device retransmits the lost message based on the information of the lost message in the retransmission message.
The retransmission message carrying the retransmission information of the initial message and the retransmission requirement information of a plurality of message packets with continuous sequence numbers behind the initial message is transmitted back, so that a transmitting device can simultaneously know the information of a plurality of lost messages by only analyzing one retransmission message, thereby arranging retransmission of the plurality of lost messages and reducing the retransmission times of NACK retransmission messages. In addition, the network can be more reasonably arranged by reducing the retransmission times, and network resources occupied by the retransmission action are reduced.
Referring to fig. 7, a structure of an electronic device provided in an embodiment of the present application is shown.
The electronic device may be a mobile phone, a personal computer, a server or other devices that may be used for receiving and transmitting electronic messages, and the specific electronic device type is not limited in this application. The electronic device 4 may further include a power source, a signal input/output module, a display, and other hardware modules commonly used in the art, which is not limited in this application.
As shown in fig. 7, the electronic device 4 includes a processor 41 and a memory 42, where the processor 41 and the memory 42 are electrically connected;
the memory 42 stores a computer program, and the processor 41 executes the following steps by calling the computer program stored in the memory 42:
receiving message data, and storing the message data in a preset storage area; determining at least one lost message needing to be retransmitted in the storage area; generating a corresponding retransmission message according to the loss rule of the lost message, wherein the retransmission message at least comprises retransmission information of an initial message and retransmission requirement information of a plurality of message packets with continuous sequence numbers behind the initial message; and sending the retransmission message to obtain at least one message packet which corresponds to the retransmission message and needs to be retransmitted.
It should be understood that the element models of the processor 41 and the memory 42 may be any model, for example, CPU, MCU, FPGA or an ASIC or other operation processing unit may be used as the processor 41 according to the requirements, which is not limited in this application.
In an embodiment, the processor 41 is further configured to:
determining an initial message in at least one message packet needing to be retransmitted; determining the number of lost messages in a continuous preset number of message packets behind the initial message based on the initial message; selecting and executing retransmission strategies of corresponding lost messages according to the number of the lost messages in the continuous preset number of message packets behind the initial message; wherein the retransmission policy at least comprises a retransmission policy based on a bitmask pattern and/or a retransmission policy based on a range pattern; and generating a corresponding retransmission message according to the retransmission strategy.
In an embodiment, the processor 41 is further configured to:
when the number of the lost messages in the continuous preset number of message packets behind the initial message is larger than a preset value, adopting a retransmission strategy based on a range mode; and when the number of the lost messages in the continuous preset number of message packets behind the initial message is smaller than or equal to a preset value, adopting the retransmission strategy based on the bit mask mode.
In an embodiment, the processor 41 is further configured to:
forming bit masks for lost states in a continuous preset number of message packets behind the initial message; the bit order in the bit mask corresponds to the sequence number order of the packets with the continuous preset number behind the initial packet, and the mark information of each bit in the bit mask corresponds to the lost state of the packets with the continuous preset number behind the initial packet; the generating a corresponding retransmission message according to the retransmission policy includes: and generating a corresponding retransmission message according to the retransmission information of the initial message and the information of the bit mask.
In an embodiment, the processor 41 is further configured to:
determining the subsequent continuous lost message number of the initial message; the generating a corresponding retransmission message according to the retransmission policy includes: and generating a corresponding retransmission message according to the retransmission information of the initial message and the continuous lost message number.
For implementation of the above steps, reference may be made to embodiments of a method for retransmitting a message as shown in fig. 1 to 5, which is not described herein in detail.
In the embodiment of the application, the retransmission message is returned, and the sending end can learn the retransmission requirement of one or more messages only through retransmission feedback once, so that repeated returning of the retransmission message is not needed when the network condition is poor, the returning efficiency is improved, the occupation of network resources is reduced, and the reliability of data transmission can be improved.
In the embodiment of the present application, the electronic device and the message retransmission apparatus belong to the same concept as the message retransmission method in the above embodiment, and any method step provided in the embodiment of the message retransmission method may be operated on the electronic device and the message retransmission apparatus, and the specific implementation process is detailed in the embodiment of the message Wen Chong transmission method, and may be combined arbitrarily to form an optional embodiment of the present application, which is not repeated herein.
The embodiments of the present application have been described in detail above with reference to the drawings, but the present application is not limited to the above embodiments, and various changes can be made within the knowledge of one of ordinary skill in the art without departing from the spirit of the present application.

Claims (8)

1. The message retransmission method is applied to electronic equipment and is characterized by comprising the following steps:
receiving message data, and storing the message data in a preset storage area;
determining at least one lost message needing to be retransmitted in the storage area;
generating a corresponding retransmission message according to the loss rule of the lost message, wherein the retransmission message at least comprises retransmission information of an initial message and retransmission requirement information of a plurality of message packets with continuous sequence numbers behind the initial message;
transmitting the retransmission message to obtain at least one message packet which corresponds to the retransmission message and needs to be retransmitted;
the generating a corresponding retransmission message according to the loss rule of the lost message comprises the following steps:
determining an initial message in at least one message packet needing to be retransmitted;
determining the number of lost messages in a continuous preset number of message packets behind the initial message based on the initial message;
selecting and executing retransmission strategies of corresponding lost messages according to the number of the lost messages in the continuous preset number of message packets behind the initial message; wherein the retransmission policy at least comprises a retransmission policy based on a bitmask pattern and/or a retransmission policy based on a range pattern;
generating a corresponding retransmission message according to the retransmission strategy;
and selecting and executing a retransmission strategy of the corresponding lost message according to the number of the lost message in the continuous preset number of message packets behind the initial message, wherein the retransmission strategy comprises the following steps:
when the number of the lost messages in the continuous preset number of message packets behind the initial message is larger than a preset value, adopting a retransmission strategy based on a range mode;
and when the number of the lost messages in the continuous preset number of message packets behind the initial message is smaller than or equal to a preset value, adopting the retransmission strategy based on the bit mask mode.
2. The method for retransmitting messages according to claim 1, wherein the retransmission strategy based on the bitmask pattern comprises:
forming bit masks for lost states in a continuous preset number of message packets behind the initial message;
the bit order in the bit mask corresponds to the sequence number order of the packets with the continuous preset number behind the initial packet, and the mark information of each bit in the bit mask corresponds to the lost state of the packets with the continuous preset number behind the initial packet;
the generating a corresponding retransmission message according to the retransmission policy includes:
and generating a corresponding retransmission message according to the retransmission information of the initial message and the information of the bit mask.
3. The method of packet retransmission according to claim 2, wherein the flag information of each bit in the bit mask adopts a binary value to correspond to the lost state of the packet.
4. The method for retransmitting messages according to claim 1, wherein the retransmission policy based on the range mode comprises:
determining the subsequent continuous lost message number of the initial message;
the generating a corresponding retransmission message according to the retransmission policy includes:
and generating a corresponding retransmission message according to the retransmission information of the initial message and the continuous lost message number.
5. The method for retransmitting a message according to any one of claims 1 to 4, wherein the preset value is 16, and the length of the bit mask in the retransmission policy based on the bit mask pattern is 16 bits.
6. The method for retransmitting messages according to claim 2 or 4, wherein the generating a corresponding retransmission message according to the retransmission policy further comprises:
and adding the definition mark corresponding to the retransmission strategy into the retransmission message.
7. A message retransmission apparatus, wherein the apparatus comprises:
the receiving module is used for receiving the message data and storing the message data in a preset storage area;
the processing module is used for determining at least one lost message needing to be retransmitted in the storage area; generating a corresponding retransmission message according to the loss rule of the lost message, wherein the retransmission message at least comprises retransmission information of an initial message and retransmission requirement information of a plurality of message packets with continuous sequence numbers behind the initial message;
a sending module, configured to send the retransmission message to obtain at least one packet that needs to be retransmitted corresponding to the retransmission message;
the generating a corresponding retransmission message according to the loss rule of the lost message comprises the following steps:
determining an initial message in at least one message packet needing to be retransmitted;
determining the number of lost messages in a continuous preset number of message packets behind the initial message based on the initial message;
selecting and executing retransmission strategies of corresponding lost messages according to the number of the lost messages in the continuous preset number of message packets behind the initial message; wherein the retransmission policy at least comprises a retransmission policy based on a bitmask pattern and/or a retransmission policy based on a range pattern;
generating a corresponding retransmission message according to the retransmission strategy;
and selecting and executing a retransmission strategy of the corresponding lost message according to the number of the lost message in the continuous preset number of message packets behind the initial message, wherein the retransmission strategy comprises the following steps:
when the number of the lost messages in the continuous preset number of message packets behind the initial message is larger than a preset value, adopting a retransmission strategy based on a range mode;
and when the number of the lost messages in the continuous preset number of message packets behind the initial message is smaller than or equal to a preset value, adopting the retransmission strategy based on the bit mask mode.
8. An electronic device, the electronic device comprising:
a processor; and
a memory, in which a computer program is stored, and the processor is configured to execute the method for retransmitting a message according to any one of claims 1 to 6 by calling the computer program stored in the memory.
CN202111648224.XA 2021-12-29 2021-12-29 Message retransmission method and device and electronic equipment Active CN114337942B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111648224.XA CN114337942B (en) 2021-12-29 2021-12-29 Message retransmission method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111648224.XA CN114337942B (en) 2021-12-29 2021-12-29 Message retransmission method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN114337942A CN114337942A (en) 2022-04-12
CN114337942B true CN114337942B (en) 2023-06-13

Family

ID=81019202

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111648224.XA Active CN114337942B (en) 2021-12-29 2021-12-29 Message retransmission method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114337942B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115913473B (en) * 2023-02-21 2023-05-12 深圳云豹智能有限公司 Data selective retransmission method and system, storage medium and electronic equipment thereof

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104518853A (en) * 2013-09-27 2015-04-15 北京新媒传信科技有限公司 Data retransmission method, receiving end and system
CN106878191A (en) * 2015-12-14 2017-06-20 华为技术有限公司 A kind of data transferring method, sending node, receiving node and data communication system
WO2018058803A1 (en) * 2016-09-30 2018-04-05 瞬已网络科技(上海)有限公司 Network-based real-time video transmission method and device
CN109039549A (en) * 2018-07-13 2018-12-18 新华三技术有限公司 A kind of message retransmission method and device
CN110958084A (en) * 2018-09-27 2020-04-03 华为技术有限公司 Method and communication equipment for transmitting acknowledgement message
CN111786748A (en) * 2019-08-29 2020-10-16 北京京东尚科信息技术有限公司 Data retransmission method and system, network card, device, server and storage medium
CN112688876A (en) * 2020-12-18 2021-04-20 北京华环电子股份有限公司 Method for rapidly recovering TCP congestion

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030137948A1 (en) * 2001-06-19 2003-07-24 Sridhar Komandur Retransmission control in wireless packet data networks
CN108616334B (en) * 2018-05-10 2020-09-29 南京中兴软件有限责任公司 Message transmission method, device, system, storage medium and electronic device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104518853A (en) * 2013-09-27 2015-04-15 北京新媒传信科技有限公司 Data retransmission method, receiving end and system
CN106878191A (en) * 2015-12-14 2017-06-20 华为技术有限公司 A kind of data transferring method, sending node, receiving node and data communication system
WO2018058803A1 (en) * 2016-09-30 2018-04-05 瞬已网络科技(上海)有限公司 Network-based real-time video transmission method and device
CN109039549A (en) * 2018-07-13 2018-12-18 新华三技术有限公司 A kind of message retransmission method and device
CN110958084A (en) * 2018-09-27 2020-04-03 华为技术有限公司 Method and communication equipment for transmitting acknowledgement message
CN111786748A (en) * 2019-08-29 2020-10-16 北京京东尚科信息技术有限公司 Data retransmission method and system, network card, device, server and storage medium
CN112688876A (en) * 2020-12-18 2021-04-20 北京华环电子股份有限公司 Method for rapidly recovering TCP congestion

Also Published As

Publication number Publication date
CN114337942A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN113411313B (en) Data transmission method, device and system
Gomez et al. Modeling the maximum throughput of bluetooth low energy in an error-prone link
WO2020164570A1 (en) Physical uplink shared channel transmission method, terminal, and network device
JP6549739B2 (en) Method of transmitting channel state information, access point and station
CN101578805A (en) Collision-free group hopping in a wireless communication system
CN104518853A (en) Data retransmission method, receiving end and system
WO2014065512A1 (en) Apparatus and method for retransmitting messages
KR100714675B1 (en) Method for frame retransmission and network apparatus employing the method
CN114337942B (en) Message retransmission method and device and electronic equipment
CN114039703A (en) Data transmission method, device, equipment and medium
EP3490293A1 (en) Data transmission method, data receiving device, and data sending device
CN105933453A (en) Data transmission method and system
CN105406915A (en) File transmission method facing satellite-to-earth link
CN115118663A (en) Method for acquiring network congestion information by combining in-band network telemetry
US11502986B2 (en) Reducing transmission delay of transmitting data in Wi-Fi
US20220217721A1 (en) Wireless communication device and method
CN110958084B (en) Method and communication equipment for transmitting acknowledgement message
CN115801691B (en) Method and device for processing data packet loss and storage medium
KR100947530B1 (en) Method and apparatus for polling transmission status in a wireless communications system
CN112637055B (en) Multi-link aggregation method, system and storage medium based on VPN tunnel
Setia et al. Collision-aware rate adaptation algorithm for high-throughput ieee 802.11 n wlans
Seytnazarov et al. Performance Analysis of Aggregation-Enabled IEEE 802.11 WLANs With Variable Aggregation Size
CN115499108B (en) Closed loop network communication method and system based on UDP protocol
US20240187334A1 (en) Data Sending Method and Communication Apparatus
WO2024027367A1 (en) Encoding method and apparatus, and decoding method and apparatus

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