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

Message retransmission method and device and electronic equipment Download PDF

Info

Publication number
CN114337942A
CN114337942A CN202111648224.XA CN202111648224A CN114337942A CN 114337942 A CN114337942 A CN 114337942A CN 202111648224 A CN202111648224 A CN 202111648224A CN 114337942 A CN114337942 A CN 114337942A
Authority
CN
China
Prior art keywords
message
retransmission
lost
initial
packet
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
CN202111648224.XA
Other languages
Chinese (zh)
Other versions
CN114337942B (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

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 demand 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 application relates to the field of data transmission, and in particular, to a method and an apparatus for retransmitting a packet, and an electronic device.
Background
The current internet transmission technology is easy to generate packet loss phenomenon in the transmission process of data due to the complex network environment. In order to ensure the integrity of the transmitted data, the received data generally needs to be checked, and if there is a packet loss, retransmission needs to be performed.
In a particular transmission implementation, when multiple data packets are to be transmitted in succession. The message sending end defines the message identification of each message to be sent in sequence, and then sends the messages to the receiving end one by one. After receiving part of the message, the receiving end checks whether the received message identification is continuous or not to determine whether a packet loss phenomenon exists or not. If packet loss occurs, the receiving end will identify the lost message and feed back the message to the transmitting end through the retransmission message, i.e. NACK message.
Because the number of lost packets is uncertain, usually, when the receiving end detects that one packet is lost, a backhaul operation is executed. When the receiving end detects that two messages are lost, two return actions are executed, and so on. And after the sending end receives the returned message, analyzing the message identification corresponding to the lost message in the retransmitted message, and sending the message packet corresponding to the message identification 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 lost messages corresponds to the number of lost messages detected by a receiving end, if the network environment is poor and the number of lost messages is large, the data returning efficiency is low, and meanwhile, the message returning action can increase the network load, thereby possibly aggravating the packet loss condition and affecting the data transmission reliability.
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 an initial message and retransmission requirements 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.
In an embodiment, the generating a corresponding retransmission packet according to the loss characteristic of at least one packet that needs to be retransmitted includes:
determining an initial message in the at least one message packet needing to be retransmitted;
based on the initial message, judging the number of lost messages in the message packets with the continuous preset number behind the initial message;
selecting and executing a retransmission strategy of the corresponding lost message according to the number of the lost messages in the message packets with the continuously preset number behind the initial message; wherein the retransmission policy comprises at least a bit mask mode based retransmission policy and/or a range mode based retransmission policy;
and generating a corresponding retransmission message according to the retransmission strategy.
In an embodiment, the selecting, according to the number of lost packets in the packet packets of the preset number that follow the initial packet, a retransmission policy for executing the corresponding lost packet includes:
when the number of lost messages in the message packets of the continuous preset number behind the initial message is larger than the preset value, a retransmission strategy based on a range mode is adopted;
and when the number of the lost messages in the message packets of the continuous preset number behind the initial message is less than or equal to the preset value, adopting the retransmission strategy based on the bit mask mode.
In an embodiment, the retransmission policy using the bit mask mode includes:
forming a bit mask by the lost states in a continuous preset number of message packets behind the initial message;
the bit order sequence in the bit mask corresponds to the sequence number sequence of the message packets of the continuous preset number behind the initial message, and the marking information of each bit order in the bit mask corresponds to the loss state of the message packets of the continuous preset number behind the initial message;
the generating of the corresponding retransmission packet 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 flag information of each bit in the bit mask adopts a binary value to correspond to the loss state of the packet.
In an embodiment, the retransmission policy based on the range mode includes:
determining the number of subsequent continuous lost messages of the initial message;
the generating of the corresponding retransmission packet according to the retransmission policy includes:
and generating a corresponding retransmission message according to the retransmission information of the initial message and the number of the continuously lost messages.
In an embodiment, the preset value is 16, and the length of the bit mask in the retransmission strategy based on the bit mask mode is 16 bits.
In an embodiment, the generating a corresponding retransmission packet 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, the device includes:
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 demand 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 an electronic device, the electronic device includes:
a processor; and
a memory, in which a computer program is stored, and the processor is configured to execute the message retransmission method according to any one of the above items by calling the computer program stored in the memory.
In view of the above, the message retransmission method, the message retransmission apparatus, and the electronic device disclosed in the present application determine at least one lost message that needs to be retransmitted in received message data, and generate a corresponding retransmission message according to a loss rule of the lost message for retransmission, where the retransmission message at least includes retransmission information of an initial message and retransmission requirement information of a plurality of message packets with consecutive sequence numbers behind the initial message. According to the method and the device, the retransmission message is transmitted back, the transmitting end can learn the message retransmission requirements of one or more quantities only through one-time retransmission feedback, so that the retransmission message does not need to be transmitted back for many times when the network conditions are not good, the transmission 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 according to an embodiment of the present application.
Fig. 2 is a flowchart of an implementation of a message retransmission method 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 bit mask mode 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 following detailed description of the preferred embodiments of the present application, taken in conjunction with the accompanying drawings, will make the advantages and features of the present application more readily appreciated by those skilled in the art, and thus will more clearly define the scope of the invention.
In the description of the present application, it is to be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; may be mechanically connected, may be electrically connected or may be in communication with each other; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
Referring to fig. 1, an application scenario of a message retransmission method according to an embodiment of the present application is shown in the figure.
As shown in fig. 1, the application scenario includes a transmitting device 1 and a receiving device 2, and the transmitting device 1 and the receiving device 2 are connected to each other through a plurality of transmission networks. The sending 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 electronic message transceiving, and the specific type of the electronic devices is not limited in the present 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 telecom, china mobile, and the like, and the multiple transmission networks (for example, the transmission networks a to N in the figure) may simultaneously include transmission networks provided by the same or different local service providers, and the number of the transmission networks is not limited. Of course, the transmission network is not limited to the local service provider, and may be connected between the transmitter 1 and the receiver 2 only by a wire harness, and the connection mode may be determined according to the actual situation.
The transmission network may be connected to the sending device 1 and the receiving device 2 through corresponding transmission network ports (e.g., transmission network ports a-N in the figure), for example, the transmission network ports may be implemented in hardware such as RJ45, USB, or PCIE, or wireless networks such as WIFI and 4/5G may be used as the transmission network ports, and the configuration form of the transmission network ports is not limited.
After receiving the message data through the transmission network port, the receiving apparatus 2 may store the message data in the memory to be used, and if the message data to be retransmitted is detected, the retransmission message may be generated and transmitted back to the transmitting apparatus 1, and the transmitting apparatus 1 may retransmit the message data according to the retransmission message.
In addition, the transmitting device 1 and the receiving device 2 may further include, for example, a power supply, a signal input/output module, a display, and the like, and may also adopt other hardware modules commonly used in the art, which is not limited in the present application.
Referring to fig. 2, a flow of implementing a message retransmission method according to an embodiment of the present application is shown.
As shown in fig. 2, the message retransmission method 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 used by the electronic device for data storage 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 port connected to a transmission network, and the message data may be message data transmitted by a transmitting apparatus through the transmission network. The message data may be in a data transmission protocol format commonly used in the art, and the application is not limited to the type and format of the message data.
102. At least one missing message requiring retransmission in the storage area is determined.
The message data stored in the storage area may be stored according to a preset rule, for example, the message data is stored according to a sequence number sorting mode, and 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 one embodiment, the number of lost packets and corresponding packet sequence numbers in a packet interval 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 demand information of a plurality of message packets with continuous sequence numbers behind the initial message.
After determining at least one lost message needing to be retransmitted in the storage area, determining a loss rule of the lost message according to the loss rule of the lost message. By obtaining the loss rule of the lost packet, 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 simultaneously. Or determining whether the lost packet is only a few packets of a plurality of packets, and then retransmitting the packets individually.
Further, in order to improve the retransmission efficiency of the NACK packet and reduce the occupation of network resources caused by retransmission, the retransmission packet may include retransmission information of the initial packet and retransmission requirement information of a plurality of packet packets with consecutive sequence numbers behind the initial packet. Specifically, the initial packet may be a retransmission packet ordered in the determined lost packet, or a certain packet selected in a specific retransmission rule, and the specific selection manner is not limited.
The retransmission demand information may be corresponding information reflecting packet loss states of a plurality of packets.
In an embodiment, when a few messages with similar sequence numbers are lost, the retransmission demand information may be obtained by using packet loss states of the messages as bit masks, where the bit masks are calibrated by using the sequence numbers of the initial messages, and binary or other binary numbers represent packet loss states of a plurality of packets at specific positions subsequent to the initial messages, so that the sending device may quickly determine whether the packets at the specific positions need to be retransmitted according to the bit masks in the retransmission messages.
In another embodiment, in the case of multiple messages being lost consecutively, information related to the message sequence number range of several consecutively lost messages may be used as retransmission demand information. The message sequence number range of the continuous lost messages can enable the sending device to retransmit the messages in the message sequence number range according to the information, so that the positions of the plurality of continuous lost messages can be obtained without 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 returned to the sending device sending the message data, so that the sending device can retransmit the lost message based on the information of the lost message in the retransmission message.
By returning the retransmission messages carrying the retransmission information of the initial message and the retransmission demand information of a plurality of message packets with continuous sequence numbers behind the initial message, the sending device can simultaneously know the information of a plurality of lost messages by analyzing only one retransmission message, thereby arranging the retransmission of the plurality of lost messages and reducing the retransmission times of NACK retransmission messages. And the network can be more reasonably arranged by reducing the retransmission times, the network resources occupied by the retransmission action are reduced, and the reliability of the data transmission process is improved.
Referring to fig. 3, a diagram illustrates an implementation manner of generating a retransmission packet according to an embodiment of the present application.
As shown in fig. 3, in a process of generating a retransmission packet, the following steps may be included:
201. and determining a starting message in at least one message packet needing to be retransmitted.
The initial message may be a retransmission message in the determined lost message, which is ordered in the top, or a certain message selected in a specific retransmission rule, and the specific selection manner is not limited.
202. And determining the quantity of lost messages in the message packets with the continuous preset quantity behind the initial message based on the initial message.
The default value can be set as required, and can be determined according to the characteristics of the number of backtransmissions of different retransmission strategies.
In an embodiment, since the bit mask in the bit mask mode can indicate the loss state of 16 packets at the maximum, the preset value may be set to the number of 16 lost packets, so that when the number of consecutive lost packets after the initial packet is in different interval ranges, retransmission may be performed through a corresponding retransmission policy.
It can be understood that the preset value may be determined according to a format size of the actual message for storing the retransmission requirement information of the subsequent message, for example, 16 bits are used as a bit mask, if a loss state of 1 packet can be recorded in 1bit, the preset value may be set to 16, and when the number of consecutive lost messages after the initial message is less than or equal to 16 lost messages, a corresponding retransmission policy based on the bit mask is executed. Of course, if 32 bits are used as the storage size of the bit mask, the preset values may be set to 32, and so on.
203. The number of lost messages in the message packets with the continuous preset number behind the initial message is larger than the preset value.
By setting the preset value as a judgment threshold value, the receiving device can adaptively adjust to a proper retransmission strategy according to the number of continuously lost messages behind the initial message, so as to take account of the retransmission success rate and the retransmission efficiency.
204. A retransmission strategy based on a range mode is adopted.
When the number of lost packets in the subsequent continuous preset number of packets of the initial packet is greater than the preset value, it indicates that the transmission network may be interrupted, resulting in the loss of a large number of packets. 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, take the sequence numbers of a plurality of message packets in the range as the sequence number of the message packet 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 generate the corresponding retransmission message by the framed sequence number range value, so that the sending device can retransmit the message in batches by the sequence number range value.
In one embodiment, a retransmission policy based on range mode includes: determining the number of subsequent continuous lost messages of the initial message; generating a corresponding retransmission message according to a retransmission strategy, wherein the method comprises the following steps: and generating corresponding retransmission messages 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 to be lost is 10000, 11000 subsequent packets of the initial packet are all lost after detection, and at this time, the packet with the sequence number ranging from 10000-.
205. A bit mask pattern based retransmission strategy is employed.
When the number of lost messages in the message packets of the continuous preset number behind the initial message is smaller than the preset value, the number of the lost messages is considered to be not large, and at the moment, the range-based retransmission is performed on the lost messages, so that the situation of repeated transmission occurs.
Therefore, the retransmission of a plurality of message packets can meet the retransmission requirement. The retransmission policy based on the bit mask pattern may include:
forming a bit mask by the lost states in a continuous preset number of message packets behind the initial message; generating a corresponding retransmission message according to a retransmission strategy, wherein the method comprises the following steps: 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 sequence in the bit mask corresponds to the sequence number sequence of the message packets of the continuous preset number behind the initial message, and the marking information of each bit order in the bit mask corresponds to the loss state of the message packets of the continuous preset number behind the initial message.
Through the loss states corresponding to a plurality of subsequent message 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 an embodiment, the tag information of each bit in the bit mask adopts a binary value to correspond to the loss state of the packet. The binary value also uses "1" or "0" to represent the "lost" or "not lost" state of the message.
For example, if the bit mask is 1001, it can be defined that the last 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 transmitted back in the limited NACK message size. If 16 bits are used as the information storage size of the bit mask, 1bit of the information is used for recording the loss state of the corresponding message, the 16 bits of information can record the loss state of 16 message packets, and the loss state of 17-bit continuous messages can be recorded once when the initial message is also the lost message.
Of course, in addition to the binary values to form the bit mask, other forms of markers may be used to form the bit mask, which is not limited in this application.
206. And generating a corresponding retransmission message according to the retransmission strategy.
In order to enable the sending apparatus to determine the retransmission policy of the retransmission packet, a definition flag (payload type) may be set on the retransmission packet to identify the current retransmission policy. For example, 204 is used to represent a range-based retransmission policy, and 205 is used to represent a bit-mask-based retransmission policy. When the sending device detects the corresponding definition mark, the corresponding identification mode is adopted to identify the retransmission demand information of a plurality of continuous message packets behind the initial message.
It is understood that the definition mark may adopt a corresponding marking mode according to actual needs, and the application does not limit this.
Referring to fig. 4, a retransmission packet structure based on a bit mask mode according to an embodiment of the present application is shown in the figure.
In an embodiment, the sequence number information of the initial packet occupies 16 bits, the information defining the tag 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 packet loss states of 17 consecutive packets including the initial packet through the NACK packet, and retransmit the packet in which the packet loss is determined.
For example, the information defining the flag in fig. 4 is located at the position of L1 in the message, and other parts of L1 may be used to carry other message information of the NACK message. The sequence number information and the bit mask of the initial message are located at the position of L2, and the sequence number information and the bit mask of the initial message occupy 32 bits.
Referring to fig. 5, a retransmission packet structure based on a range mode according to an embodiment of the present application is shown in the figure.
In another embodiment, the sequence number information of the initial packet occupies 16 bits, the information defining the tag occupies 8 bits, and 16 bits can be used as a numerical value corresponding to the number of N lost packets for transmission, so that the sending device or the cloud can know the packet loss states of 1+ N consecutive packets including the initial packet through the NACK packet, and retransmit the packets in the number within the range.
For example, the information defining the flag in fig. 5 is located at the position of L1 in the message, and other parts of L1 may be used to carry other message information of the NACK message. The numerical value corresponding to the number of the initial message and the number of the lost message is located at the position of L2, and the numerical value corresponding to the number of the initial message and the number of the lost message occupies 32 bits.
Of course, besides the above retransmission message format, other message structure modes can be established according to the actual protocol type. The information size and length corresponding to the numerical value corresponding to the number of the initial message, the bit mask and the N lost messages can be determined according to different protocol types and preset modes, and the application does not limit the information size and length.
By generating the retransmission message structure, the sending device can determine the retransmission strategy corresponding to the retransmission message by defining the mark and analyze the information of a plurality of lost messages by using the corresponding retransmission strategy only by receiving the retransmission message once, so as to improve the retransmission efficiency.
Referring to fig. 6, a structure of a message retransmission apparatus according to 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 sending module 33.
The receiving module 31 and the sending module 33 may be implemented by a transmission network port connected to a transmission network, and may also 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 used by the electronic device for data storage 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 port connected to a transmission network, and the message data may be message data transmitted by a transmitting apparatus through the transmission network. The message data may be in a data transmission protocol format commonly used in the art, and the application is not limited to the type and format of the message data.
The processing module 32 is configured to determine at least one lost packet 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 demand 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 storage 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, the message data is stored according to a sequence number sorting mode, and 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 one embodiment, the number of lost packets and corresponding packet sequence numbers in a packet interval 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 needing to be retransmitted in the storage area, determining a loss rule of the lost message according to the loss rule of the lost message. By obtaining the loss rule of the lost packet, 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 simultaneously. Or determining whether the lost packet is only a few packets of a plurality of packets, and then retransmitting the packets individually.
Further, in order to improve the retransmission efficiency of the NACK packet and reduce the occupation of network resources caused by retransmission, the retransmission packet may include retransmission information of the initial packet and retransmission requirement information of a plurality of packet packets with consecutive sequence numbers behind the initial packet. Specifically, the initial packet may be a retransmission packet ordered in the determined lost packet, or a certain packet selected in a specific retransmission rule, and the specific selection manner is not limited.
The retransmission demand information may be corresponding information reflecting packet loss states of a plurality of packets.
In an embodiment, when a few messages with similar sequence numbers are lost, the retransmission demand information may be obtained by using packet loss states of the messages as bit masks, where the bit masks are calibrated by using the sequence numbers of the initial messages, and binary or other binary numbers represent packet loss states of a plurality of packets at specific positions subsequent to the initial messages, so that the sending device may quickly determine whether the packets at the specific positions need to be retransmitted according to the bit masks in the retransmission messages.
In another embodiment, in the case of multiple messages being lost consecutively, information related to the message sequence number range of several consecutively lost messages may be used as retransmission demand information. The message sequence number range of the continuous lost messages can enable the sending device to retransmit the messages in the message sequence number range according to the information, so that the positions of the plurality of continuous lost messages can be obtained without receiving NACK retransmission messages one by one.
The sending module 33 is configured to send a retransmission packet to obtain at least one packet that needs to be retransmitted and corresponds to the retransmission packet.
The retransmission message can be returned through the transmission network port and returned to the sending device sending the message data, so that the sending device can retransmit the lost message based on the information of the lost message in the retransmission message.
By returning the retransmission messages carrying the retransmission information of the initial message and the retransmission demand information of a plurality of message packets with continuous sequence numbers behind the initial message, the sending device can simultaneously know the information of a plurality of lost messages by analyzing only one retransmission message, thereby arranging the retransmission of the plurality of lost messages and reducing the retransmission times of NACK retransmission messages. And the network can be more reasonably arranged by reducing the retransmission times, and the network resources occupied by the retransmission action are reduced.
Referring to fig. 7, a structure of an electronic device according to 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 can be used for electronic message transceiving, and the specific type of the electronic device is not limited in the present application. The electronic device 4 may further include a power supply, 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, and the processor 41 is electrically connected to the memory 42;
the memory 42 has a computer program stored therein, and the processor 41 calls the computer program stored in the memory 42 to execute 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 demand 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 is understood that the type of the components of the processor 41 and the memory 42 can be any type according to the requirement, for example, an arithmetic processing unit such as a CPU, an MCU, an FPGA, or an ASIC is used as the processor 41, and the present application is not limited thereto.
In an embodiment, the processor 41 is further configured to:
determining an initial message in the at least one message packet needing to be retransmitted; determining the number of lost messages in a message packet with a continuous preset number behind the initial message based on the initial message; selecting and executing a retransmission strategy of the corresponding lost message according to the number of the lost messages in the message packets with the continuously preset number behind the initial message; wherein the retransmission policy comprises at least a bit mask mode based retransmission policy and/or a range mode based retransmission policy; 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 lost messages in the message packets of the continuous preset number behind the initial message is larger than the preset value, a retransmission strategy based on a range mode is adopted; and when the number of the lost messages in the message packets of the continuous preset number behind the initial message is less than or equal to the preset value, adopting the retransmission strategy based on the bit mask mode.
In an embodiment, the processor 41 is further configured to:
forming a bit mask by the lost states in a continuous preset number of message packets behind the initial message; the bit order sequence in the bit mask corresponds to the sequence number sequence of the message packets of the continuous preset number behind the initial message, and the marking information of each bit order in the bit mask corresponds to the loss state of the message packets of the continuous preset number behind the initial message; the generating of the corresponding retransmission packet 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 number of subsequent continuous lost messages of the initial message; the generating of the corresponding retransmission packet according to the retransmission policy includes: and generating a corresponding retransmission message according to the retransmission information of the initial message and the number of the continuously lost messages.
The implementation manner of the above steps may refer to multiple embodiments of the message retransmission method shown in fig. 1 to 5, which are not described herein again.
In the embodiment of the application, the retransmission message is returned, so that the sending end can obtain the retransmission requirements of one or more messages through one-time retransmission feedback, and the retransmission message does not need to be returned for multiple times when the network condition is not good, thereby improving the return efficiency, reducing the occupation of network resources, and further improving the reliability of data transmission.
In this embodiment, 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 message retransmission method embodiment may be executed on the electronic device and the message retransmission apparatus, and a specific implementation process thereof is described in detail in the message retransmission method embodiment, and any combination may be adopted to form an optional embodiment of the present application, which is not described herein again.
The embodiments of the present application have been described in detail with reference to the drawings, but the present application is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present application within the knowledge of those skilled in the art.

Claims (10)

1. A 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 demand 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.
2. The message retransmission method according to claim 1, wherein the generating of the corresponding retransmission message according to the loss characteristic of the at least one message packet that needs to be retransmitted comprises:
determining an initial message in the at least one message packet needing to be retransmitted;
determining the number of lost messages in a message packet with a continuous preset number behind the initial message based on the initial message;
selecting and executing a retransmission strategy of the corresponding lost message according to the number of the lost messages in the message packets with the continuously preset number behind the initial message; wherein the retransmission policy comprises at least a bit mask mode based retransmission policy and/or a range mode based retransmission policy;
and generating a corresponding retransmission message according to the retransmission strategy.
3. The message retransmission method according to claim 2, wherein the selecting, according to the number of lost messages in the consecutive predetermined number of message packets following the initial message, a retransmission policy for executing the corresponding lost message comprises:
when the number of lost messages in the message packets of the continuous preset number behind the initial message is larger than the preset value, a retransmission strategy based on a range mode is adopted;
and when the number of the lost messages in the message packets of the continuous preset number behind the initial message is less than or equal to the preset value, adopting the retransmission strategy based on the bit mask mode.
4. The message retransmission method according to claim 3, wherein the retransmission strategy using the bit mask mode includes:
forming a bit mask by the lost states in a continuous preset number of message packets behind the initial message;
the bit order sequence in the bit mask corresponds to the sequence number sequence of the message packets of the continuous preset number behind the initial message, and the marking information of each bit order in the bit mask corresponds to the loss state of the message packets of the continuous preset number behind the initial message;
the generating of the corresponding retransmission packet 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.
5. The message retransmission method according to claim 4, wherein the flag information of each bit in the bit mask corresponds to the loss status of the message packet by using a binary value.
6. The message retransmission method according to claim 3, wherein the range mode based retransmission policy comprises:
determining the number of subsequent continuous lost messages of the initial message;
the generating of the corresponding retransmission packet according to the retransmission policy includes:
and generating a corresponding retransmission message according to the retransmission information of the initial message and the number of the continuously lost messages.
7. The packet retransmission method according to any of claims 3-6, wherein the predetermined value is 16, and the length of the bit mask in the retransmission policy based on the bit mask mode is 16 bits.
8. The message retransmission method according to claim 4 or 6, wherein the generating of the corresponding retransmission message according to the retransmission policy further comprises:
and adding the definition mark corresponding to the retransmission strategy into the retransmission message.
9. An apparatus for retransmitting a message, the apparatus comprising:
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 demand 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.
10. An electronic device, characterized in that the electronic device comprises:
a processor; and
a memory, in which a computer program is stored, the processor being configured to execute the message retransmission method according to any one of claims 1 to 8 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 true CN114337942A (en) 2022-04-12
CN114337942B 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)

Cited By (1)

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

Citations (9)

* 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
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
CN108616334A (en) * 2018-05-10 2018-10-02 中兴通讯股份有限公司 Message transmitting method and device, system, storage medium, electronic 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

Patent Citations (9)

* 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
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
CN108616334A (en) * 2018-05-10 2018-10-02 中兴通讯股份有限公司 Message transmitting method and device, system, storage medium, electronic 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

Cited By (2)

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

Also Published As

Publication number Publication date
CN114337942B (en) 2023-06-13

Similar Documents

Publication Publication Date Title
CN113411313B (en) Data transmission method, device and system
CN106612284B (en) Streaming data transmission method and device
JP2015027100A (en) Transmission control method for packet communication, and packet communication system
CN104980257B (en) Internet of things communication method and device
CN101562500B (en) Data transmission request method, data transmission method and data transmission device
KR100714675B1 (en) Method for frame retransmission and network apparatus employing the method
CN114629856B (en) Congestion control method and device, electronic equipment and readable storage medium
CN115037700B (en) Complex network data packet transmission method, system, terminal and storage medium
CN114337942A (en) Message retransmission method and device and electronic equipment
CN110351757A (en) A kind of scheduling request transmission method, terminal and network side equipment
CN114051013A (en) Communication data transmission method and device
CN111064768B (en) Printer data transmission control method, device, equipment and storage medium
CN116074253B (en) Message chained forwarding method and device
CN105634894B (en) A kind of enhanced CAN bus data re-transmitting method and device
CN112637055B (en) Multi-link aggregation method, system and storage medium based on VPN tunnel
CN110958084B (en) Method and communication equipment for transmitting acknowledgement message
CN108322402B (en) Message processing method, device and system
CN115913473A (en) Data selective retransmission method and system, storage medium and electronic equipment
CN115344405A (en) Data processing method, network interface card, electronic equipment and storage medium
CN104348711A (en) Apparatus and method for receiving messages
CN114079652A (en) Data processing method
CN114039881B (en) Communication connection monitoring method
CN114817113B (en) Method, system, equipment and storage medium for judging SDA data direction
CN111065080B (en) Data transmission method based on Bluetooth router and Bluetooth router
CN114285747B (en) TCP data receiving method, device, equipment and storage medium

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