Data retransmission method and device, electronic equipment and storage medium
The data retransmission method addresses the unreliability of UDP by initiating a reliable transmission service, caching data packets, and retransmitting lost packets to ensure complete data delivery, enhancing the success rate of data transfer in environments with packet loss.
Patent Information
- Application Number
- CN202411152709.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-20
AI Technical Summary
Existing data transmission protocols like UDP are unreliable for applications requiring guaranteed data integrity, such as device version upgrades and large file transfers, as they do not ensure accurate and complete data delivery in environments with packet loss.
A data retransmission method that determines whether to start a reliable transmission service for business data in an unreliable mode, creates a data buffer area, caches data packets, and retransmits lost packets based on sequence numbers and network conditions.
Ensures reliable transmission of business data by retransmitting lost packets, improving the success rate of data transfer and ensuring complete data delivery in environments with packet loss.
Smart Images

Figure CN119172040A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data transmission, and in particular to a data retransmission method, device, electronic device and storage medium. Background Art
[0002] UDP (User Datagram Protocol) is a connectionless protocol. The source and the terminal do not establish a connection before transmitting data, which reduces the overhead of establishing and disconnecting connections, thereby reducing latency. This connectionless feature makes UDP very suitable for applications that require fast data transmission. Small header overhead: The header format of UDP is very simple, only 8 bytes. Compared with the 20-byte header of TCP (Transmission Control Protocol), the additional overhead of UDP is very small. This helps to reduce the amount of data transmitted over the network and improve the efficiency of data transmission. The throughput of UDP is not regulated by the congestion control algorithm, but is only limited by the rate at which the application software generates data, the transmission bandwidth, and the performance of the source and terminal hosts. This makes UDP suitable for applications that have high real-time requirements and can tolerate a certain amount of data loss, such as IP telephony and real-time video conferencing.
[0003] The video channel in the visual networking environment is also unreliable for transmission, such as video conferencing, video calls, live broadcasts, etc. Due to the characteristics of the business, packet loss can be tolerated. However, if this channel is used for device version upgrades, large file transfers, etc., the transmission will fail. Summary of the invention
[0004] In view of the above problems, embodiments of the present application are proposed to provide a data retransmission method, device, electronic device and storage medium that overcome the above problems or at least partially solve the above problems.
[0005] In a first aspect, an embodiment of the present application provides a data retransmission method, the method comprising:
[0006] For business data in an unreliable transmission mode, determining whether to start a reliable transmission service corresponding to the business data;
[0007] When it is determined to start the reliable transmission service corresponding to the business data, a data buffer area is created, a data packet corresponding to the business data is buffered in the data buffer area, and the data packet is sent to the terminal;
[0008] When receiving the packet loss confirmation message sent by the terminal, the lost data packet is extracted from the data buffer area for retransmission.
[0009] Optionally, the determining whether to start a reliable transmission service corresponding to the business data includes:
[0010] A reliable transmission confirmation message for the service data is obtained from the terminal, and it is determined whether to start a reliable transmission service corresponding to the service data.
[0011] Optionally, the step of caching a data packet corresponding to the service data into the data cache area and sending the data packet to a terminal includes:
[0012] Encapsulating the service data to generate a data packet corresponding to the service data, wherein a header of the data packet includes a data packet sequence number;
[0013] The data packet is cached in the data cache area, and the data packet is sent to the terminal, so that the terminal checks the packet loss information according to the sequence number of the data packet.
[0014] Optionally, when receiving the packet loss confirmation message sent by the terminal, extracting the lost data packet from the data buffer area for retransmission includes:
[0015] Parsing the packet loss confirmation message to obtain the target data packet sequence number of the lost data packet;
[0016] The lost data packet is extracted from the data buffer area according to the target data packet sequence number, and the lost data packet is retransmitted.
[0017] Optionally, when receiving the packet loss confirmation message sent by the terminal, extracting the lost data packet from the data buffer area for retransmission includes:
[0018] Parsing the packet loss confirmation message to determine the lost data packets, packet loss amount information and network bandwidth information of the terminal;
[0019] Determine a data packet transmission rate corresponding to the lost data packet based on the packet loss amount information and the network bandwidth information;
[0020] The lost data packets are extracted from the data buffer area, and the lost data packets are retransmitted based on the data packet transmission rate.
[0021] Optionally, after extracting the lost data packet from the data buffer area for retransmission upon receiving the packet loss confirmation message sent by the terminal, the method further includes:
[0022] When a data packet reception completion message sent by the terminal is received, the reliable transmission service corresponding to the business data is closed.
[0023] Optionally, the business data is version upgrade data.
[0024] The obtaining of a reliable transmission confirmation message of the service data by the terminal includes:
[0025] Generate a version upgrade instruction for the terminal, and send the version upgrade instruction to the terminal through a specified protocol;
[0026] A reliable transmission confirmation message for the version upgrade data returned by the terminal in response to the version upgrade instruction is obtained.
[0027] Optionally, the method further comprises:
[0028] Obtaining the upgraded version information reported by the terminal after the version upgrade is completed;
[0029] Update the upgrade version information of the terminal.
[0030] In a second aspect, an embodiment of the present application provides a data retransmission device, the device comprising:
[0031] A reliable transmission service determination module, used to determine whether to start a reliable transmission service corresponding to the business data in an unreliable transmission mode;
[0032] A data packet sending module, used for creating a data buffer area when determining to start the reliable transmission service corresponding to the business data, buffering the data packet corresponding to the business data in the data buffer area, and sending the data packet to the terminal;
[0033] The data packet retransmission module is used to extract the lost data packet from the data buffer area for retransmission when receiving the packet loss confirmation message sent by the terminal.
[0034] Optionally, the reliable transmission service determination module includes:
[0035] The reliable transmission service determination unit is used to obtain a reliable transmission confirmation message from the terminal for the service data, and determine whether to start the reliable transmission service corresponding to the service data.
[0036] Optionally, the data packet sending module includes:
[0037] A data packet generating unit, configured to encapsulate the service data and generate a data packet corresponding to the service data, wherein the header of the data packet includes a data packet sequence number;
[0038] The data packet sending unit is used to cache the data packet in the data buffer area and send the data packet to the terminal, so that the terminal checks the packet loss information according to the data packet sequence number.
[0039] Optionally, the data packet retransmission module includes:
[0040] A target sequence number acquisition unit, used to parse the packet loss confirmation message to obtain a target data packet sequence number of the lost data packet;
[0041] The data packet retransmission unit is used to extract the lost data packet from the data buffer area according to the target data packet sequence number, and retransmit the lost data packet.
[0042] Optionally, the data packet retransmission module includes:
[0043] A packet loss information determination unit, configured to parse the packet loss confirmation message to determine the lost data packets, packet loss amount information, and network bandwidth information of the terminal;
[0044] A transmission rate determining unit, configured to determine a data packet transmission rate corresponding to the lost data packet based on the packet loss amount information and the network bandwidth information;
[0045] A packet loss retransmission unit is used to extract the lost data packet from the data buffer area and retransmit the lost data packet based on the data packet transmission rate.
[0046] Optionally, the device further comprises:
[0047] The transmission service closing module is used to close the reliable transmission service corresponding to the business data when receiving the data packet reception completion message sent by the terminal.
[0048] Optionally, the business data is version upgrade data.
[0049] The reliable transmission service determination unit includes:
[0050] An upgrade instruction issuing subunit, used for generating a version upgrade instruction of the terminal, and issuing the version upgrade instruction to the terminal through a specified protocol;
[0051] The confirmation message acquisition subunit is used to acquire the reliable transmission confirmation message for the version upgrade data returned by the terminal in response to the version upgrade instruction.
[0052] Optionally, the device further comprises:
[0053] An upgrade version acquisition module is used to obtain the upgrade version information reported by the terminal after the version upgrade is completed;
[0054] The upgrade version update module is used to update the upgrade version information of the terminal.
[0055] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0056] one or more processors; and
[0057] One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the device to perform any of the data retransmission methods described above.
[0058] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that enables a processor to execute any of the data retransmission methods described above.
[0059] The embodiments of the present application include the following advantages:
[0060] The solution provided by the embodiment of the present application determines whether to start the reliable transmission service corresponding to the business data for the business data in the unreliable transmission mode. When it is determined to start the reliable transmission service corresponding to the business data, a data buffer area is created, the data packets corresponding to the business data are cached in the data buffer area, and the data packets are sent to the terminal. When a packet loss confirmation message sent by the terminal is received, the lost data packets are extracted from the data buffer area for retransmission. The embodiment of the present application creates a data buffer area by notifying the terminal to start the reliable transmission service corresponding to the business data. The data packets corresponding to the business data are cached in the data buffer area, and the data packets are sent to the terminal. When a packet loss confirmation message sent by the terminal is received, the lost data packets are extracted from the data buffer area for retransmission, so that the reliable transmission of the specified business data can be achieved, and the success rate of the specified business data transmission is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 A flowchart of a data retransmission method provided in an embodiment of the present application;
[0062] Figure 2 A flowchart of a method for sending a data packet provided in an embodiment of the present application;
[0063] Figure 3 A flowchart of a method for retransmitting a data packet provided in an embodiment of the present application;
[0064] Figure 4 A flowchart of another method for retransmitting a data packet provided in an embodiment of the present application;
[0065] Figure 5 A flowchart of a method for obtaining a reliable transmission confirmation message provided in an embodiment of the present application;
[0066] Figure 6 A schematic diagram of a reliable transmission structure in a visual networking environment provided by an embodiment of the present application;
[0067] Figure 7A functional block diagram of a reliable transmission modularization provided in an embodiment of the present application;
[0068] Figure 8 A schematic diagram of the structure of a data retransmission device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0069] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0070] Reference Figure 1 , shows a flow chart of the steps of a data retransmission method provided by an embodiment of the present application. Figure 1 As shown, the data retransmission method may include: step 101, step 102 and step 103.
[0071] Step 101: for business data in an unreliable transmission mode, determine whether to start a reliable transmission service corresponding to the business data.
[0072] The embodiments of the present application can be applied to scenarios where reliable transmission of specified business data is achieved in an unreliable transmission environment.
[0073] An unreliable transmission mode refers to a data transmission mode in which the integrity of data is not guaranteed during transmission, and data loss, disorder, or errors may occur.
[0074] Reliable transmission service is a technical service that ensures that data can be transmitted accurately and completely between the sender and the receiver.
[0075] When transmitting business data in an unreliable transmission mode, it can be determined whether to start the reliable transmission service corresponding to the business data. In actual applications, the reliable transmission flag corresponding to the reliable transmission service can be pre-set on the server side, and the reliable transmission service can be turned on or off by starting or turning off the reliable transmission flag. In a specific implementation, the reliable transmission flag refers to a flag used to reliably transmit business data. In this example, the reliable transmission flag can be a specific identifier added to the business data to indicate that the specified business data is to be reliably transmitted, or it can be a switch added to the business data to indicate that the business data is to be reliably transmitted, etc. The type of the reliable transmission flag can be determined according to business requirements, and this embodiment does not limit this.
[0076] In a specific implementation of the present application, the reliable transmission service corresponding to the business data may be initiated by the server.
[0077] In some examples, the server side can pre-set the conditions for starting a reliable transmission service during data transmission for some important business data, such as version upgrade data, so that the corresponding reliable transmission service can be automatically started when transmitting version upgrade data.
[0078] In some examples, the server can choose whether to start a reliable transmission service based on the current data transmission network environment. For example, when the current data transmission network environment is poor, it is predicted that there may be a risk of data packet loss during data transmission on the current network. At this time, the reliable transmission service corresponding to the business data being transmitted can be started.
[0079] It can be understood that the above examples are only listed for a better understanding of the technical solutions of the embodiments of the present application. In actual applications, the server can also start the reliable transmission service according to actual needs, and this embodiment does not limit this.
[0080] In another specific implementation of the present application, the reliable transmission service corresponding to the business data may be started by an instruction from the terminal side. Specifically, a reliable transmission confirmation message of the terminal for the business data may be obtained, and whether to start the reliable transmission service corresponding to the business data may be determined from the reliable transmission confirmation message sent by the terminal. Specifically, when sending specified business data to the terminal, an instruction for reliable data transmission may be first issued to the terminal, and the instruction may be used to indicate to the terminal whether the business data is to be reliably transmitted. After receiving the instruction, the terminal may feedback a reliable transmission confirmation message for the business data, and the reliable transmission confirmation message may be used to indicate that the business data is to be reliably transmitted.
[0081] In this example, the business data can be version upgrade data. The process of obtaining the instruction issuance and reliable transmission confirmation message can be combined with Figure 2 This is described in detail as follows.
[0082] Reference Figure 2 , shows a flowchart of a reliable transmission confirmation message acquisition method provided by an embodiment of the present application. Figure 2 As shown, the reliable transmission confirmation message acquisition method may include: step 201 and step 202.
[0083] Step 201: Generate a version upgrade instruction for the terminal, and send the version upgrade instruction to the terminal via a specified protocol.
[0084] In this embodiment, when the service data is version upgrade data, a version upgrade instruction of the terminal may be generated and sent to the terminal through a specified protocol, such as using the SNMP (Simple Network Management Protocol) protocol to send the version instruction.
[0085] After the version upgrade instruction is sent to the terminal through the specified protocol, step 202 is executed.
[0086] Step 202: Obtain a reliable transmission confirmation message for the version upgrade data returned by the terminal in response to the version upgrade instruction.
[0087] After issuing a version upgrade instruction to the terminal through a specified protocol, a reliable transmission confirmation message for the version upgrade data returned by the terminal in response to the version upgrade instruction can be obtained. For example, in the visual network, the integrated management system (abbreviated as IMS) upgrades the specified terminal, and because it is a reliable transmission, it notifies the terminal to turn on the reliable transmission switch. Specifically, the version upgrade instruction can be issued using the SNMP protocol, and then packaged and sent through the VVSDK (software development kit for visual network terminals). The VVSDK of the terminal obtains the data for data extraction and uploads the data to the SNMP application layer. The SNMP application layer parses the data and judges the upgrade status. If the terminal does not need to upgrade the version, it can return a non-upgrade information to the IMS, and no subsequent processing is required. If a version upgrade is required, a reliable transmission confirmation message can be returned to the IMS, and the IMS will turn on the reliable transmission switch of the version upgrade data.
[0088] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation to the embodiments.
[0089] The embodiment of the present application achieves the purpose of reliable transmission of designated business data by sending an instruction to the terminal regarding whether the version upgrade data is to be transmitted reliably, and the terminal confirms whether the version upgrade data is to be transmitted reliably.
[0090] When it is determined not to start the reliable transmission service corresponding to the business data, the business data can be transmitted in the unreliable transmission mode without subsequent processing.
[0091] After determining to start the reliable transmission service corresponding to the business data, step 102 is executed.
[0092] Step 102: when it is determined to start the reliable transmission service corresponding to the business data, a data buffer area is created, a data packet corresponding to the business data is buffered in the data buffer area, and the data packet is sent to the terminal.
[0093] When it is determined to start the reliable transmission service corresponding to the business data, a data buffer area can be created. Then, the data packet corresponding to the business data can be cached in the data buffer area, and the data packet can be sent to the terminal. Specifically, the business data can be encapsulated to obtain an encapsulated data packet, and the encapsulated data packet can be cached in the data buffer area while the data packet is sent to the terminal. Figure 3 This is described in detail as follows.
[0094] Reference Figure 3 , shows a flowchart of a method for sending a data packet provided by an embodiment of the present application. Figure 3 As shown, the data packet sending method may include: step 301 and step 302.
[0095] Step 301: encapsulate the service data to generate a data packet corresponding to the service data, wherein the header of the data packet includes a data packet sequence number.
[0096] In this embodiment, after starting the reliable transmission service corresponding to the business data and creating a data buffer area, the business data can be encapsulated to generate a data packet corresponding to the business data, wherein the packet header of the data packet contains a data packet sequence number. Specifically, the encapsulation process can be: first determine the communication protocol to be used (such as the visual networking protocol, etc.), and before encapsulation, ensure that the business data is ready and meets the requirements of the application layer protocol. Add a data packet header, which can include: source address, destination address, port number, data length, data packet sequence number and other information. The data packet header is combined with data of a specified length in the business data to generate a data packet of business data, etc.
[0097] After the service data is encapsulated to generate a data packet corresponding to the service data, step 302 is executed.
[0098] Step 302: Cache the data packet in the data cache area, and send the data packet to the terminal, so that the terminal checks the packet loss information according to the sequence number of the data packet.
[0099] After the service data is encapsulated and processed to generate a data packet corresponding to the service data, the data packet can be cached in the data cache area, and the data packet is sent to the terminal so that the terminal can check the packet loss information according to the data packet sequence number. Specifically, when sending a data packet of service data to the terminal, the data packet sequence numbers of all data packets of the service data can be sent to the terminal at the same time, so that a packet loss check can be performed according to the data packet sequence numbers of all data packets. For example, the data packet sequence numbers of all data packets of the service data are 0 to 100. After the terminal receives the data packet of the service data, it can check the lost data packet according to the data packet sequence numbers 0 to 100.
[0100] The embodiment of the present application encapsulates data packets according to the data packet sequence number, so that the terminal can check the lost data packets according to the data packet sequence number. For the visual network, it can make full use of the data sequence number in the visual network protocol structure, add a check and confirmation mechanism, ensure the complete data transmission, and improve the reliability of data transmission.
[0101] After the data packet corresponding to the service data is cached in the data cache area and the data packet is sent to the terminal, step 103 is executed.
[0102] Step 103: upon receiving the packet loss confirmation message sent by the terminal, extracting the lost data packet from the data buffer area for retransmission.
[0103] After the data packets corresponding to the service data are cached in the data cache area and the data packets are sent to the terminal, the terminal can check the lost data packets and return a packet loss confirmation message.
[0104] When a packet loss confirmation message sent by the terminal is received, the lost data packet can be extracted from the data buffer area for retransmission, that is, the lost data packet is retransmitted to the terminal.
[0105] The embodiment of the present application starts the corresponding reliable transmission service for the business data in the unreliable transmission mode and creates a corresponding data cache area. It can search for lost data packets in the cache area and resend them without affecting the normal processing of other businesses, thereby realizing reliable transmission of designated business data and improving the success rate of designated business data transmission.
[0106] In this embodiment, the corresponding lost data packet can be extracted from the data buffer area for retransmission according to the data packet sequence number in the packet loss confirmation message sent by the terminal. Figure 3 This is described in detail as follows.
[0107] Reference Figure 4 , shows a flowchart of the steps of a data packet retransmission method provided by an embodiment of the present application. Figure 4 As shown, the data packet retransmission method may include: step 401 and step 402.
[0108] Step 401: Parse the packet loss confirmation message to obtain the target data packet sequence number of the lost data packet.
[0109] In this embodiment, the target data packet sequence number refers to the data packet sequence number of the data packet that the terminal has not received.
[0110] After receiving the packet loss confirmation message sent by the terminal, the packet loss confirmation message can be parsed to obtain the target data packet sequence number of the lost data packet.
[0111] After parsing the packet loss confirmation message to obtain the target data packet sequence number of the lost data packet, step 402 is executed.
[0112] Step 402: extract the lost data packet from the data buffer area according to the target data packet sequence number, and retransmit the lost data packet.
[0113] After parsing the packet loss confirmation message to obtain the target data packet sequence number of the lost data packet, the lost data packet can be extracted from the data buffer according to the target data packet sequence number, and the lost data packet can be retransmitted. For example, when the target data packet sequence number is: 0, 10, 23, 45, the data packets with the data packet sequence number of 0, 10, 23, 45 can be extracted from the data buffer to retransmit these data packets to the terminal.
[0114] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation to the embodiments.
[0115] The embodiment of the present application can avoid repeated transmission of full data packets by including the data packet sequence number of the lost data packet in the packet loss confirmation message sent by the terminal, and extracting the lost data packet from the data buffer area for retransmission. At the same time, the terminal can receive all data packets of business data, thereby reducing the amount of data transmission and achieving reliable transmission of business data.
[0116] In this embodiment, the packet loss confirmation message also carries the packet loss amount and the network bandwidth of the terminal. The rate of retransmission of lost data packets can be adjusted according to the packet loss amount and the network bandwidth. Figure 5 This is described in detail as follows.
[0117] Reference Figure 5 , shows a flowchart of another method for retransmitting a data packet provided by an embodiment of the present application. Figure 5 As shown, the data packet retransmission method may include: step 501, step 502 and step 503.
[0118] Step 501: Parse the packet loss confirmation message to determine the lost data packets, packet loss amount information and network bandwidth information of the terminal.
[0119] In this embodiment, after receiving the packet loss confirmation message sent by the terminal, the packet loss confirmation message can be parsed to determine the lost data packets (i.e., determine which data packets are lost according to the sequence numbers of the lost data packets), packet loss amount information (which can be the number of lost data packets and / or the amount of memory occupied by the lost data packets, etc.) and the current network bandwidth information of the terminal.
[0120] After parsing the packet loss confirmation message to determine the lost data packet, packet loss amount information and the network bandwidth information of the terminal, step 502 is executed.
[0121] Step 502: Based on the packet loss information and the network bandwidth information, determine the data packet transmission rate corresponding to the lost data packet.
[0122] Packet transmission rate refers to the number or rate of data packets transmitted through a channel or network per unit time.
[0123] After parsing the packet loss confirmation message to determine the lost data packets, the packet loss amount information, and the network bandwidth information of the terminal, the data packet transmission rate corresponding to the lost data packets can be determined based on the packet loss amount information and the network bandwidth information. For example, when the packet loss amount information indicates that the number of lost data packets is large, and the network bandwidth indicates that the current network of the terminal is poor, it can be determined that the data packet transmission rate corresponding to the lost data packets is a smaller transmission rate. When the packet loss amount information indicates that the number of lost data packets is large, and the network bandwidth indicates that the current network of the terminal is good, it can be determined that the data packet transmission rate corresponding to the lost data packets is a larger transmission rate, etc.
[0124] In a specific implementation, the corresponding relationship between the packet loss amount information, the network bandwidth information and the data packet transmission rate can also be preset, and the data packet transmission rate of the lost data packet can be determined through the corresponding relationship, the parsed packet loss amount information and the network bandwidth information of the terminal. Of course, it is not limited to this. In practical applications, other methods can also be used to confirm the data packet transmission rate, such as the business personnel customizing the data packet transmission rate according to the packet loss amount and the network bandwidth, etc. This embodiment does not limit this.
[0125] After the data packet transmission rate corresponding to the lost data packet is determined based on the packet loss amount information and the network bandwidth information, step 503 is executed.
[0126] Step 503: extract the lost data packet from the data buffer area, and retransmit the lost data packet based on the data packet transmission rate.
[0127] After determining the data packet transmission rate corresponding to the lost data packet based on the packet loss information and the network bandwidth information, the lost data packet can be extracted from the data buffer area and retransmitted to the terminal based on the data packet transmission rate.
[0128] The embodiment of the present application determines the data transmission rate of the lost data packets according to the packet loss amount and the network bandwidth of the terminal, thereby avoiding the situation where the data transmission link is blocked due to the data packet transmission rate being too fast and the lost data packets cannot be transmitted normally to the terminal.
[0129] In a specific implementation of the present application, when the terminal receives the retransmission information, it performs statistics and verification until all the data is received, verifies the legality and integrity, and sends a confirmation message to the integrated management. The confirmation message includes the completion of reception. After receiving this information, the reliable transmission service corresponding to the business data can be closed.
[0130] In another specific implementation of the present application, after the terminal is restarted for upgrading the upgrade file, the terminal may report the upgrade version information, and then the upgrade version information of the terminal may be updated.
[0131] Next, combine Figure 6 and Figure 7 The technical solution of this embodiment is described in detail by taking the visual network as an example.
[0132] First, combine Figure 7 The architecture of the reliable transmission solution based on visual networking is described as follows.
[0133] like Figure 7 As shown, the architecture of the solution may include two parts: visual network management and transmission management.
[0134] Visual network management can include: network access management, service management, data security management and network exit management. Transmission management can include: data cache management, bandwidth management, packet loss management, SNMP management and account management.
[0135] Among them, network access management means that after starting the integrated management (i.e., the server), it can support terminal registration and manage the networked terminals, such as terminal upgrades and terminal information updates. When the terminal starts, it applies for network access according to the configured visual network mac, and the visual network server provides a legal visual network number after a legality check. Since the terminal has been registered on the integrated management, the visual network number of the integrated management can be obtained from the keep-alive heartbeat.
[0136] Business management means that the integrated management can manage the business data that needs to be transmitted reliably, such as adding and deleting business data that needs to be transmitted reliably, and adding version upgrade data for reliable transmission.
[0137] Data security management refers to the reasonable, effective and secure processing, transmission, storage and use of data to ensure the confidentiality, integrity and availability of data.
[0138] Network delisting management refers to the management of terminals that need to be delisted, such as deleting the assigned network number of the terminal and the terminal's record in the integrated management system.
[0139] Data cache management refers to the management of cached data packets that need to be transmitted reliably, such as the cache duration of data packets and cache clearing after data packet transmission is completed.
[0140] Bandwidth management refers to the process of effectively allocating, monitoring, controlling and optimizing the bandwidth of data transmission in the network to ensure network performance, improve user experience and ensure business continuity.
[0141] Packet loss management refers to the management of lost data packets, such as the number of retransmissions of lost data packets, the increase in the cache time of lost data packets, etc.
[0142] SNMP management mainly refers to network management, especially the management of network hardware (such as workstations, servers, routers, switches, etc.).
[0143] Account management refers to the management of login accounts of terminals registered on the visual network, such as account security storage.
[0144] Next, combine Figure 6 The process of reliable data transmission is described in detail.
[0145] like Figure 6 As shown in the figure, when the integrated management upgrades the specified terminal through the live broadcast service, such as upgrading terminal A and terminal B, reliable transmission is required, so the terminal is notified to turn on the reliable transmission switch. This instruction is sent using the SNMP protocol, and then packaged and sent through the VVSDK.
[0146] The VVSDK of terminal A and terminal B obtains data, extracts data, and uploads the data to the SNMP application layer. The SNMP application layer parses the data and judges the upgrade status. If the terminal chooses not to upgrade, it returns a non-upgrade message. If the terminal chooses to upgrade the version, it returns a confirmation message. The reliable transmission flag is turned on by the integrated management.
[0147] The integrated management obtains the confirmation information, creates a buffer, and starts publishing live broadcast for information transmission. To publish live broadcast information, you first need to encapsulate the data packet sequence number. Record the start time of packet transmission. The data is first sent to the buffer and then to the terminal. By recording the start time of packet transmission, you can monitor the terminal feedback information to avoid the problem that the data packet is not sent to the terminal for a long time due to network problems, so as to repair the network in time and improve the efficiency of terminal version upgrade.
[0148] The terminal receives data by watching live broadcasts, and counts bandwidth, packet loss rate, etc. according to the sequence number of the data packet. At the same time, the terminal feedbacks confirmation information in 1 second units. The confirmation information includes the lost packet data and packet sequence number, as well as the current bandwidth. That is, after receiving a data packet or performing an operation, the terminal will wait for about 1 second, and then send a confirmation signal (ACK, Acknowledgment) to the sender to indicate that it has successfully received and processed the data packet or operation.
[0149] The IMS receives the confirmation information, extracts the packet loss information, extracts it from the buffer and retransmits it, and adjusts the packet sending rate according to the current packet loss situation and bandwidth situation to solve the network congestion problem.
[0150] The terminal receives the retransmission information, performs statistics and verification, and receives all the data, verifies the legality and integrity, and sends a confirmation message to the integrated management system. The confirmation message contains the completion of reception. The integrated management system receives this message and turns off the reliable transmission flag. The terminal upgrades and restarts according to the upgrade file, and then reports the upgrade version. The integrated management system updates the terminal information.
[0151] The above solution can solve the problem of reliable transmission of version upgrade data packets in an unreliable transmission environment such as live broadcast service, and at the same time improve the success rate of terminal upgrades in the visual network.
[0152] The data retransmission method provided in the embodiment of the present application notifies the terminal to start the reliable transmission service corresponding to the business data and creates a data buffer area. The data packets corresponding to the business data are cached in the data buffer area, and the data packets are sent to the terminal. When the packet loss confirmation message sent by the terminal is received, the lost data packets are extracted from the data buffer area for retransmission, so that the reliable transmission of the specified business data can be achieved, and the success rate of the specified business data transmission is improved.
[0153] It should be noted that, for the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described action sequence, because according to the embodiments of the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0154] Reference Figure 8 , shows a schematic diagram of the structure of a data retransmission device provided in an embodiment of the present application. Figure 8 As shown, the data retransmission device 800 may include the following modules:
[0155] A reliable transmission service determination module 810 is used to determine whether to start a reliable transmission service corresponding to the service data in an unreliable transmission mode;
[0156] The data packet sending module 820 is used to create a data buffer area when it is determined to start the reliable transmission service corresponding to the business data, buffer the data packet corresponding to the business data in the data buffer area, and send the data packet to the terminal;
[0157] The data packet retransmission module 830 is used to extract the lost data packet from the data buffer area for retransmission when receiving the packet loss confirmation message sent by the terminal.
[0158] Optionally, the reliable transmission service determination module includes:
[0159] The reliable transmission service determination unit is used to obtain a reliable transmission confirmation message from the terminal for the service data, and determine whether to start the reliable transmission service corresponding to the service data.
[0160] Optionally, the data packet sending module includes:
[0161] A data packet generating unit, configured to encapsulate the service data and generate a data packet corresponding to the service data, wherein the header of the data packet includes a data packet sequence number;
[0162] The data packet sending unit is used to cache the data packet in the data buffer area and send the data packet to the terminal, so that the terminal checks the packet loss information according to the data packet sequence number.
[0163] Optionally, the data packet retransmission module includes:
[0164] A target sequence number acquisition unit, used to parse the packet loss confirmation message to obtain a target data packet sequence number of the lost data packet;
[0165] The data packet retransmission unit is used to extract the lost data packet from the data buffer area according to the target data packet sequence number, and retransmit the lost data packet.
[0166] Optionally, the data packet retransmission module includes:
[0167] A packet loss information determination unit, configured to parse the packet loss confirmation message to determine the lost data packets, packet loss amount information, and network bandwidth information of the terminal;
[0168] A transmission rate determining unit, configured to determine a data packet transmission rate corresponding to the lost data packet based on the packet loss amount information and the network bandwidth information;
[0169] A packet loss retransmission unit is used to extract the lost data packet from the data buffer area and retransmit the lost data packet based on the data packet transmission rate.
[0170] Optionally, the device further comprises:
[0171] The transmission service closing module is used to close the reliable transmission service corresponding to the business data when receiving the data packet reception completion message sent by the terminal.
[0172] Optionally, the business data is version upgrade data.
[0173] The reliable transmission service determination unit includes:
[0174] An upgrade instruction issuing subunit, used for generating a version upgrade instruction of the terminal, and issuing the version upgrade instruction to the terminal through a specified protocol;
[0175] The confirmation message acquisition subunit is used to acquire the reliable transmission confirmation message for the version upgrade data returned by the terminal in response to the version upgrade instruction.
[0176] Optionally, the device further comprises:
[0177] An upgrade version acquisition module is used to obtain the upgrade version information reported by the terminal after the version upgrade is completed;
[0178] The upgrade version update module is used to update the upgrade version information of the terminal.
[0179] The data retransmission device provided in the embodiment of the present application notifies the terminal to start the reliable transmission service corresponding to the business data and creates a data buffer area. The data packets corresponding to the business data are cached in the data buffer area, and the data packets are sent to the terminal. When the packet loss confirmation message sent by the terminal is received, the lost data packets are extracted from the data buffer area for retransmission, so that the reliable transmission of the specified business data can be achieved, and the success rate of the specified business data transmission is improved.
[0180] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0181] In an embodiment of the present application, an electronic device is also provided. The electronic device may include one or more processors, and one or more machine-readable media storing instructions thereon, the instructions being, for example, application programs. When the instructions are executed by the one or more processors, the processors are caused to execute any of the above-mentioned data retransmission methods.
[0182] In an embodiment of the present application, a non-temporary computer-readable storage medium is also provided, on which a computer program is stored, and the program can be executed by a processor of an electronic device to implement any of the above data retransmission methods. For example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0183] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0184] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0185] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0186] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0187] These computer program instructions can also be loaded into a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0188] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0189] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0190] The above is a detailed introduction to a data retransmission method, device, electronic device and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data retransmission method, It is characterized in that The method comprises: For business data in an unreliable transmission mode, determining whether to start a reliable transmission service corresponding to the business data; When it is determined to start the reliable transmission service corresponding to the business data, a data buffer area is created, a data packet corresponding to the business data is buffered in the data buffer area, and the data packet is sent to the terminal; When receiving the packet loss confirmation message sent by the terminal, the lost data packet is extracted from the data buffer area for retransmission.
2. The method according to claim 1, It is characterized in that The determining whether to start the reliable transmission service corresponding to the business data includes: A reliable transmission confirmation message for the service data is obtained from the terminal, and it is determined whether to start a reliable transmission service corresponding to the service data.
3. The method according to claim 1, It is characterized in that The step of caching the data packet corresponding to the service data into the data cache area and sending the data packet to the terminal includes: Encapsulating the service data to generate a data packet corresponding to the service data, wherein a header of the data packet includes a data packet sequence number; The data packet is cached in the data cache area, and the data packet is sent to the terminal, so that the terminal checks the packet loss information according to the sequence number of the data packet.
4. The method according to claim 1, It is characterized in that The step of extracting the lost data packet from the data buffer area for retransmission upon receiving the packet loss confirmation message sent by the terminal comprises: Parsing the packet loss confirmation message to obtain the target data packet sequence number of the lost data packet; The lost data packet is extracted from the data buffer area according to the target data packet sequence number, and the lost data packet is retransmitted.
5. The method according to claim 1, It is characterized in that The step of extracting the lost data packet from the data buffer area for retransmission upon receiving the packet loss confirmation message sent by the terminal comprises: Parsing the packet loss confirmation message to determine the lost data packets, packet loss amount information and network bandwidth information of the terminal; Determine a data packet transmission rate corresponding to the lost data packet based on the packet loss amount information and the network bandwidth information; The lost data packets are extracted from the data buffer area, and the lost data packets are retransmitted based on the data packet transmission rate.
6. The method according to claim 1, It is characterized in that After extracting the lost data packet from the data buffer area for retransmission upon receiving the packet loss confirmation message sent by the terminal, the method further includes: When a data packet reception completion message sent by the terminal is received, the reliable transmission service corresponding to the business data is closed.
7. The method according to claim 2, It is characterized in that The business data is version upgrade data, The obtaining of a reliable transmission confirmation message of the service data by the terminal includes: Generate a version upgrade instruction for the terminal, and send the version upgrade instruction to the terminal through a specified protocol; A reliable transmission confirmation message for the version upgrade data returned by the terminal in response to the version upgrade instruction is obtained.
8. The method according to claim 7, It is characterized in that The method further comprises: Obtaining the upgraded version information reported by the terminal after the version upgrade is completed; Update the upgrade version information of the terminal.
9. A data retransmission device, It is characterized in that The device comprises: A reliable transmission service determination module, used to determine whether to start a reliable transmission service corresponding to the business data in an unreliable transmission mode; A data packet sending module, used for creating a data buffer area when determining to start the reliable transmission service corresponding to the business data, buffering the data packet corresponding to the business data in the data buffer area, and sending the data packet to the terminal; The data packet retransmission module is used to extract the lost data packet from the data buffer area for retransmission when receiving the packet loss confirmation message sent by the terminal.
10. An electronic device, It is characterized in that include: one or more processors; and One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the apparatus to perform the data retransmission method according to any one of claims 1 to 7.
11. A computer-readable storage medium, It is characterized in that The computer program stored therein enables the processor to execute the data retransmission method according to any one of claims 1 to 7.
