Data transmission method and device, electronic equipment and readable storage medium

By using continuous serial number data packets and a rate adjustment method based on packet loss rate in the visual network, the problem of low data transmission efficiency caused by network congestion in the visual network is solved, and more efficient data transmission is achieved.

CN119172327APending Publication Date: 2024-12-20VISIONVERA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411153476.9
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

Technical Problem

The prior art cannot effectively solve the problem of low data transmission efficiency caused by network congestion in visual networks, especially because the TCP congestion control strategy cannot be applied.

Method used

When transmitting data packets between the user terminal and the server, carry data packets with continuous serial numbers, and determine the packet loss rate and data reception rate based on the received serial numbers, adjust the data transmission rate to reduce packet loss rate and improve transmission efficiency .

Benefits of technology

It effectively reduces packet loss rate and improves data transmission efficiency, and is suitable for real-time high-definition video transmission scenarios of video networking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172327A_ABST
    Figure CN119172327A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data transmission method and device, electronic equipment and a readable storage medium, and the method comprises the steps: transmitting at least one data packet to a server according to a preset data transmission rate; each data packet carries a serial number, the serial numbers of different data packets are different, and the serial numbers of all data packets are continuously arranged; the server side is used for determining the packet loss rate according to the serial numbers carried in the received data packets, and the server side is also used for determining the data receiving rate according to the number of the received data packets; and adjusting the data sending rate based on the packet loss rate and the data receiving rate returned by the server. According to the invention, the data transmission efficiency in an articulated naturality web scene can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of visual networking, and in particular to a data transmission method, a data transmission device, an electronic device and a computer-readable storage medium. Background Art

[0002] Video Internet is a real-time network that can realize real-time transmission of high-definition video. In the data transmission of video Internet, due to the limited capacity of network resources (such as bandwidth, memory, etc.), when the network load exceeds its capacity, data packets will be lost in the network, causing network congestion.

[0003] Currently, there is no good solution to network congestion in visual networking scenarios, resulting in low data transmission efficiency. Summary of the invention

[0004] In view of the above problems, embodiments of the present application are proposed to provide a data transmission method, a data transmission device, an electronic device, and a computer-readable 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 discloses a data transmission method, which is applied to a user terminal, and the method includes:

[0006] At least one data packet is sent to the server at a preset data transmission rate; each data packet carries a sequence number, different data packets have different sequence numbers, and the sequence numbers of all data packets are arranged continuously; the server is used to determine the packet loss rate according to the sequence number carried in the received data packet, and the server is also used to determine the data receiving rate according to the number of the received data packets;

[0007] The data sending rate is adjusted based on the packet loss rate and the data receiving rate returned by the server.

[0008] In a second aspect, an embodiment of the present application discloses a data transmission method, which is applied to a server, and the method includes:

[0009] Receive data packets sent by user terminals;

[0010] Determine the packet loss rate based on the sequence number carried in the received data packet;

[0011] Determining a data receiving rate according to the number of received data packets, the size of the data packets and the receiving time;

[0012] The packet loss rate and the data receiving rate are returned to the user terminal, so that the user terminal adjusts the data sending rate based on the packet loss rate and the data receiving rate.

[0013] In a third aspect, an embodiment of the present application discloses a data transmission device, which is applied to a user terminal, and the device includes:

[0014] A data transmission module, configured to transmit at least one data packet to a server according to a preset data transmission rate; each data packet carries a sequence number, different data packets have different sequence numbers, and the sequence numbers of all data packets are arranged continuously; the server is configured to determine a packet loss rate according to the sequence number carried in the received data packet, and the server is further configured to determine a data receiving rate according to the number of the received data packets;

[0015] The rate adjustment module is used to adjust the data sending rate based on the packet loss rate and the data receiving rate returned by the server.

[0016] In a fourth aspect, an embodiment of the present application discloses a data transmission device, which is applied to a server, and the device includes:

[0017] A data receiving module, used for receiving data packets sent by a user terminal;

[0018] A packet loss determination module, used to determine the packet loss rate according to the sequence number carried in the received data packet;

[0019] A receiving rate module, used to determine a data receiving rate according to the number of received data packets, the size of the data packets and the receiving time;

[0020] The packet loss feedback module is used to return the packet loss rate and the data receiving rate to the user terminal, so that the user terminal adjusts the data sending rate based on the packet loss rate and the data receiving rate.

[0021] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the data transmission method described in the first and second aspects is implemented.

[0022] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that enables a processor to execute the data transmission method as described in the first and second aspects.

[0023] The embodiments of the present invention include the following advantages:

[0024] In an embodiment of the present invention, the user terminal sends at least one data packet to the server according to a preset data transmission rate; each data packet carries a sequence number, different data packets have different sequence numbers, and the sequence numbers of all data packets are arranged continuously; the server determines the packet loss rate according to the sequence number carried in the received data packet, and the server also determines the data receiving rate according to the number of received data packets; based on the packet loss rate and data receiving rate returned by the server, the user terminal adjusts the data transmission rate. The packet loss rate can be accurately counted based on continuous sequence numbers, and the data transmission rate can be adjusted based on the packet loss rate and data receiving rate, which can effectively reduce the packet loss rate and thus improve the data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a step diagram of a data transmission method of the present application;

[0026] Figure 2 is a schematic diagram of the data transmission path of the present application;

[0027] Figure 3 is a step diagram of another data transmission method of the present application;

[0028] Figure 4 is a step diagram of another data transmission method of the present application;

[0029] Figure 5 It is a software architecture diagram of data transmission control of this application;

[0030] Figure 6 It is a structural block diagram of a data transmission device of the present application;

[0031] Figure 7 is a structural block diagram of another data transmission device of the present application;

[0032] Figure 8 It is a structural block diagram of an electronic device of the present application. DETAILED DESCRIPTION

[0033] 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.

[0034] The visual network is a real-time network that can achieve real-time transmission of high-definition video and push many Internet applications towards high-definition video. The visual network uses real-time high-definition video exchange technology, which can integrate the required services such as high-definition video conferencing, video monitoring, intelligent monitoring analysis, emergency command, digital radio and television, delayed television, online teaching, live broadcast, VOD (Video On Demand), TV mail, personal recording (PVR, Personal videorecorder), intranet (self-run) channels, intelligent video broadcast control, information release and dozens of other video, voice, picture, text, communication, data and other services into one system platform, and achieve high-definition quality video playback through TV or computer.

[0035] Currently, the Internet uses protocols such as Transmission Control Protocol / Internet Protocol (TCP / IP), and existing TCP congestion control strategies can be applied. However, the visual Internet uses different protocols from the Internet, such as the V2V protocol, so the TCP congestion control strategy cannot be applied, resulting in no better way to solve the network congestion problem of the visual Internet.

[0036] Figure 1 This is a step diagram of a data transmission method provided by an embodiment of the present disclosure, which is applied to a user terminal. The method includes:

[0037] Step 101, at least one data packet is sent to the server according to a preset data transmission rate; each data packet carries a sequence number, different data packets have different sequence numbers, and the sequence numbers of all data packets are arranged continuously; the server is used to determine the packet loss rate according to the sequence number carried in the received data packet, and the server is also used to determine the data receiving rate according to the number of the received data packets.

[0038] In the disclosed embodiment, the user terminal and the server can communicate based on the visual network. The user terminal and the server need to join the visual network according to their respective media access control addresses (MAC, Media Access Control Address), and the user terminal and the server will obtain their respective visual network numbers. Based on the visual network number, the user terminal can accurately communicate with a specific server, and similarly, the server can also accurately communicate with a specific user terminal. Figure 2 is a schematic diagram of a data transmission path provided by an embodiment of the present disclosure; Figure 2 The user terminal 201 transmits data to the server 202 through the visual network.

[0039] Figure 1The executor of the method steps may be a user terminal (hereinafter referred to as the terminal). Different terminals have different data transmission capabilities (bandwidths), which correspond to different data transmission rates. The bandwidth of the terminal can be set to flexibly change the data transmission rate. The terminal sends at least one data packet to the server based on the preset data transmission rate. The data packet may refer to a video packet or other types of data packets. The visual network may include multiple data transmission channels, such as video channels, business channels, and management channels, and the data carrying capacity of each channel is also different. The terminal sends the data packet to the server through a video channel.

[0040] Each data packet sent by the terminal carries a sequence number. Different data packets have different sequence numbers, and the sequence numbers of all data packets are arranged continuously as a whole. For example, if there are 5 data packets in total, the sequence numbers of the 5 data packets are "1, 2, 3, 4, 5" respectively.

[0041] It is understandable that there may be packet loss due to possible network congestion. For example, when the data received by the server is placed in the receiving buffer and the receiving buffer is full, the subsequent data packets will be lost. The data packets received by the server may be missing compared to the data packets sent by the terminal. For example, the terminal sent 5 data packets and the server received 4 data packets. Since the sequence numbers of the data packets are continuous, the server can determine the packet loss rate based on the sequence numbers carried in the received data packets.

[0042] In addition, the server can also determine the data receiving rate according to the number of received data packets. It is understandable that the size of each data packet in at least one data packet can be consistent, for example, the length of each data packet is 1092 bytes. The data receiving rate can be calculated according to the number of received data packets, the size of each data packet and the receiving time of receiving these data packets.

[0043] Step 102: Adjust the data sending rate based on the packet loss rate and the data receiving rate returned by the server.

[0044] In the disclosed embodiment, after determining the packet loss rate and the data receiving rate, the server returns a message carrying the packet loss rate and the data receiving rate to the terminal. The terminal can adjust the current data transmission rate based on the packet loss rate and the data receiving rate. The adjustment method can be to use the data receiving rate as the basic rate and the packet loss rate as an influencing factor to adjust the value of the data receiving rate, thereby obtaining the value of the data transmission rate. How to adjust the current data transmission rate based on the packet loss rate and the data receiving rate is not specifically limited here.

[0045] In summary, in the embodiment of the present invention, the user terminal sends at least one data packet to the server according to the preset data transmission rate; each data packet carries a sequence number, different data packets have different sequence numbers, and the sequence numbers of all data packets are arranged continuously; the server determines the packet loss rate according to the sequence number carried in the received data packet, and the server also determines the data receiving rate according to the number of received data packets; based on the packet loss rate and data receiving rate returned by the server, the user terminal adjusts the data transmission rate. The packet loss rate can be accurately counted based on continuous sequence numbers, and the data transmission rate can be adjusted based on the packet loss rate and data receiving rate, which can effectively reduce the packet loss rate and thus improve the data transmission efficiency.

[0046] Figure 3 is a flowchart of another data transmission method provided by an embodiment of the present disclosure;

[0047] Step 301, at least one data packet is sent to a server according to a preset data transmission rate; each data packet carries a sequence number, different data packets have different sequence numbers, and the sequence numbers of all data packets are arranged continuously; the server is used to determine the packet loss rate according to the sequence number carried in the received data packet, and the server is also used to determine the data receiving rate according to the number of the received data packets;

[0048] Step 302: Adjust the data sending rate based on the packet loss rate and the data receiving rate returned by the server.

[0049] For details of the above steps 301-302, please refer to Figure 1 The contents of the embodiments will not be repeated here.

[0050] Optionally, the step 301 of sending at least one data packet to the server according to a preset data transmission rate includes:

[0051] Sub-step 3011, determining the target data packet currently being sent at a preset data sending rate;

[0052] Sub-step 3012, when the target data packet is the first one, assigning a starting sequence number to it;

[0053] Sub-step 3013, when the target data packet is not the first one, determining the first sequence number of the previous data packet of the target data packet, and assigning a second sequence number adjacent to the first sequence number to the target data packet;

[0054] Sub-step 3014, sending the target data packet to the server.

[0055] In the disclosed embodiment, similar to the data receiving rate, when the size of the data packets is consistent, the number of data packets that need to be sent per second can be calculated based on the known data sending rate. Based on the number of data packets that need to be sent per second, the sending process of the data packets can be limited.

[0056] Then, the target data packet currently being sent is determined at the preset data transmission rate. In the case where the target data packet is the first, when the terminal reads the file to be sent, based on the size of the data packet, the corresponding part of the file to be sent is read, the first data packet is generated, and then the starting sequence number is encapsulated in the first data packet, and the terminal sends the first data packet to the server.

[0057] Furthermore, the remaining part of the file to be sent is continuously read to continuously generate target data packets, and the first sequence number of the previous data packet of the current target data packet is determined, and a second sequence number adjacent to the first sequence number is allocated to the target data packet.

[0058] For example, when the second data packet is generated, the target data packet at this time is not the first one. The first sequence number of the previous data packet of the target data packet (the second data packet), that is, the initial sequence number of the first data packet, is assigned a sequence number adjacent to the initial sequence number to the target data packet (the second data packet).

[0059] By implementing the embodiments of the present disclosure, a starting sequence number is assigned to the first data packet, and the sequence number of each subsequent data packet is adjacent to the sequence number of the previous data packet, so that at least one data packet has sequence number continuity, which can improve the convenience of determining the packet loss rate.

[0060] Optionally, the step of adjusting the data sending rate based on the packet loss rate and the data receiving rate returned by the server includes:

[0061] Based on a preset mapping relationship between packet loss rate and safety factor, determining a target safety factor corresponding to the packet loss rate; the packet loss rate and safety factor in the mapping relationship have a positive proportional relationship;

[0062] Determine a target data transmission rate according to the packet loss rate, the data receiving rate and the target safety factor, and adjust the data transmission rate to the target data transmission rate;

[0063] The target data transmission rate is inversely proportional to the packet loss rate, and the target data transmission rate is directly proportional to the data receiving rate.

[0064] In the embodiments of the present disclosure, it is understood that different packet loss rates may correspond to different adjustment ranges. For example, when the packet loss rate is small, the current data transmission rate may be slightly reduced; when the packet loss rate is large, the current data transmission rate may be significantly reduced.

[0065] Based on the preset mapping relationship between packet loss rate and safety factor, the target safety factor corresponding to the packet loss rate can be determined, that is, there can be a dynamic conversion relationship between the safety factor and the packet loss rate. For example, if the packet loss rate is less than 10%, the range of the safety factor can be [1, 1.2]; if the packet loss rate is greater than 10% and less than 50%, the range of the safety factor can be [1.2, 2]; if the packet loss rate is greater than 50%, the range of the safety factor can be [2, 2.5]. The adjustment of the safety factor can be dynamically learned and adjusted according to the packet loss situation when receiving data packets multiple times.

[0066] The process of determining the target data sending rate based on the packet loss rate, data receiving rate, and target safety factor can be expressed by the following formula:

[0067] S V =R V (1-A×D)×1024×1024÷L÷8

[0068] Among them, S V Indicates the target data sending rate, R V represents the data receiving rate, A represents the safety factor, D represents the packet loss rate, and L represents the size of the data packet. The data sending rate and the data receiving rate may be expressed in megabits per second (MBps), and the product of the safety factor and the packet loss rate may be less than 1.

[0069] The target data transmission rate is inversely proportional to the packet loss rate. The larger the packet loss rate, the smaller the target data transmission rate. The target data transmission rate is directly proportional to the data receiving rate. The larger the data receiving rate, the larger the target data transmission rate.

[0070] Optionally, after step 302 of adjusting the data sending rate based on the packet loss rate and the data receiving rate returned by the server, the method further includes:

[0071] Step 303, if the server does not return the packet loss rate within a preset time length, gradually increase the data transmission rate until the server returns a target packet loss rate of a preset size;

[0072] Step 304, when the server returns the target packet loss rate, determine the current target data transmission rate, and continue to send at least one data packet to the server based on the target data transmission rate.

[0073] In the disclosed embodiment, it is understandable that after the data transmission rate is adjusted in step 302, the terminal can continue to execute step 301 to continue to send data packets based on the adjusted target data transmission rate, and can continue to execute step 302 to cyclically optimize and adjust the data transmission rate.

[0074] After several rounds of adjustments, a packet loss free state can be achieved, i.e., a packet loss rate of 0%. At this time, the server may not return information about the packet loss rate to the terminal. After the server does not return the packet loss rate for a preset time (e.g., 20 seconds), the terminal may start to gradually increase the data transmission rate.

[0075] It is understandable that the terminal gradually increases the data transmission rate, and after increasing the data transmission rate to a certain extent, packet loss will occur again. However, since the data transmission rate is gradually increased, the packet loss rate will have a process of increasing from 0%, such as 0%, 0.1%, 0.5%...

[0076] Until the server returns a target packet loss rate of a preset size (for example, 1%), the target packet loss rate of the preset size can be understood as packet loss tolerance, indicating that the packet loss rate is acceptable within the preset size and will not significantly affect data transmission. Determine the current target data transmission rate, which is the maximum data transmission rate that can be achieved under the condition of meeting the target packet loss rate of the preset size. This maximum data transmission rate can be used as the final data transmission configuration to continuously send at least one data packet to the server.

[0077] The embodiment of the present disclosure is implemented by gradually increasing the data transmission rate when the server does not return the packet loss rate within the preset time length until the server returns the target packet loss rate of the preset size, and determining the current target data transmission rate, and continuously sending at least one data packet to the server based on the target data transmission rate. Under certain packet loss rate conditions, the maximum data transmission rate can be determined, so that the bandwidth can be fully utilized, thereby improving the efficiency of data transmission.

[0078] Figure 4 Another data transmission method provided by the embodiment of the present disclosure is applied to a server, and the method includes:

[0079] Step 401, receiving a data packet sent by a user terminal;

[0080] Step 402, determining a packet loss rate according to a sequence number carried in a received data packet;

[0081] Step 403, determining a data receiving rate according to the number of received data packets, the size of the data packets and the receiving time;

[0082] Step 404: Return the packet loss rate and the data receiving rate to the user terminal, so that the user terminal adjusts the data sending rate based on the packet loss rate and the data receiving rate.

[0083] For details of steps 401-404, please refer to Figure 1 The contents of the embodiments are not described in detail.

[0084] Optionally, the step of determining the packet loss rate according to the sequence number carried in the received data packet includes:

[0085] Compare the sequence number carried in the received data packet with the preset complete sequence number sequence to determine the missing sequence number;

[0086] A packet loss rate is determined based on the missing sequence number and a maximum sequence number in the received data packets.

[0087] In the disclosed embodiment, since the sequence numbers of the data packets are continuous, the server can determine the complete sequence number sequence according to the starting sequence number of the data packet and the maximum sequence number in the received data packet. Alternatively, when the terminal sends the data packet, it also sends the relevant information of the complete sequence number sequence to the server. How to determine the preset complete sequence number sequence is not specifically limited here.

[0088] By comparing the sequence number of the received data packet with the complete sequence number sequence, the missing sequence number can be determined. For example, if the complete sequence number sequence is "1, 2, 3, 4, 5" and the sequence number of the received data packet is "1, 2, 3, 5", it can be determined that sequence number 4 is the missing sequence number and the corresponding data packet is lost.

[0089] Since the sequence numbers are continuous, the total number of data packets actually sent by the terminal can be determined based on the maximum sequence number in the received data packets. For example, if the starting sequence number is 1 and the maximum sequence number in the received data packets is 200, the number of data packets actually sent by the terminal can be considered to be 200, and the packet loss rate can be determined in combination with the missing sequence number.

[0090] Optionally, the step of determining the packet loss rate according to the missing sequence number and the maximum sequence number in the received data packets includes:

[0091] Determining a first number of missing data packets according to the missing sequence numbers;

[0092] Determining a second number of complete data packets according to the maximum sequence number;

[0093] The ratio of the first number to the second number is determined as the packet loss rate.

[0094] In the disclosed embodiment, the missing sequence numbers may be counted to determine the number of missing data packets, i.e., the first number. The number of complete data packets, i.e., all data packets sent by the terminal, i.e., the second number, may be determined based on the maximum sequence number. The ratio of the first number to the second number may be determined as the packet loss rate.

[0095] In summary, in the embodiment of the present invention, the user terminal sends at least one data packet to the server according to the preset data transmission rate; each data packet carries a sequence number, different data packets have different sequence numbers, and the sequence numbers of all data packets are arranged continuously; the server determines the packet loss rate according to the sequence number carried in the received data packet, and the server also determines the data receiving rate according to the number of received data packets; based on the packet loss rate and data receiving rate returned by the server, the user terminal adjusts the data transmission rate. The packet loss rate can be accurately counted based on continuous sequence numbers, and the data transmission rate can be adjusted based on the packet loss rate and data receiving rate, which can effectively reduce the packet loss rate and thus improve the data transmission efficiency.

[0096] Figure 5 : is a software architecture diagram of data transmission control provided by an embodiment of the present disclosure; the data transmission control module 50 includes a visual network management submodule 51 and a congestion control management submodule 52; the visual network management submodule 51 may include a network access management unit, a service management unit, a data security management unit and a network exit management unit. The congestion control management submodule 52 may include a data cache management unit, a bandwidth management unit, a packet loss management unit, a packet sending and receiving management unit and a congestion control management unit.

[0097] Among them, the network access management unit is used to manage the user terminals and servers joining the visual network; the service management unit is used for various services provided by the visual network; the network exit management unit is used to manage the user terminals and servers exiting the visual network; the data security management unit is used to manage the data in the visual network and improve data security; the data cache management unit is used to manage the data in the receiving buffer; the bandwidth management unit is used to control the bandwidth of the user terminal; the packet loss management unit is used to count the packet loss and calculate the packet loss rate; the packet sending and receiving management unit is used to control and manage the packet sending process of the user terminal and the packet receiving process of the server; the congestion control management unit is used to adjust the data sending rate when network congestion occurs.

[0098] Reference Figure 6 , shows a structural block diagram of a data transmission device 60 of the present application, which is applied to a user terminal, and the device includes:

[0099] The data transmission module 601 is used to send at least one data packet to the server according to a preset data transmission rate; each data packet carries a sequence number, different data packets have different sequence numbers, and the sequence numbers of all data packets are arranged continuously; the server is used to determine the packet loss rate according to the sequence number carried in the received data packet, and the server is also used to determine the data receiving rate according to the number of the received data packets;

[0100] The rate adjustment module 602 is used to adjust the data sending rate based on the packet loss rate and the data receiving rate returned by the server.

[0101] Optionally, the data sending module includes:

[0102] The target determination submodule is used to determine the target data packet currently being sent at a preset data transmission rate;

[0103] The first data submodule is used to assign a starting sequence number to the target data packet when the target data packet is the first one;

[0104] A non-first data submodule, used for determining the first sequence number of the previous data packet of the target data packet when the target data packet is not the first one, and allocating a second sequence number adjacent to the first sequence number to the target data packet;

[0105] The target sending submodule is used to send the target data packet to the server.

[0106] Optional, rate adjustment module, including:

[0107] A safety factor submodule, for determining a target safety factor corresponding to the packet loss rate based on a preset mapping relationship between the packet loss rate and the safety factor; the packet loss rate and the safety factor in the mapping relationship have a positive proportional relationship;

[0108] a coefficient adjustment submodule, configured to determine a target data transmission rate according to the packet loss rate, the data receiving rate and the target safety factor, and adjust the data transmission rate to the target data transmission rate;

[0109] The target data transmission rate is inversely proportional to the packet loss rate, and the target data transmission rate is directly proportional to the data receiving rate.

[0110] Optionally, the device further comprises:

[0111] A gradual increase module, used for gradually increasing the data transmission rate when the server does not return the packet loss rate within a preset time length, until the server returns a target packet loss rate of a preset size;

[0112] The maximum rate module is used to determine the current target data transmission rate when the server returns the target packet loss rate, and continuously send at least one data packet to the server based on the target data transmission rate.

[0113] In summary, in the embodiment of the present invention, the user terminal sends at least one data packet to the server according to the preset data transmission rate; each data packet carries a sequence number, different data packets have different sequence numbers, and the sequence numbers of all data packets are arranged continuously; the server determines the packet loss rate according to the sequence number carried in the received data packet, and the server also determines the data receiving rate according to the number of received data packets; based on the packet loss rate and data receiving rate returned by the server, the user terminal adjusts the data transmission rate. The packet loss rate can be accurately counted based on continuous sequence numbers, and the data transmission rate can be adjusted based on the packet loss rate and data receiving rate, which can effectively reduce the packet loss rate and thus improve the data transmission efficiency.

[0114] Figure 7 : is a structural block diagram of another data transmission device 70 provided in an embodiment of the present disclosure, which is applied to a server, and the device includes:

[0115] The data receiving module 701 is used to receive data packets sent by the user terminal;

[0116] The packet loss determination module 702 is used to determine the packet loss rate according to the sequence number carried in the received data packet;

[0117] The receiving rate module 703 is used to determine the data receiving rate according to the number of received data packets, the size of the data packets and the receiving time;

[0118] The packet loss feedback module 704 is configured to return the packet loss rate and the data receiving rate to the user terminal, so that the user terminal adjusts the data sending rate based on the packet loss rate and the data receiving rate.

[0119] Optionally, a packet loss determination module includes:

[0120] A sequence comparison submodule is used to compare the sequence number carried in the received data packet with a preset complete sequence of sequence numbers to determine the missing sequence number;

[0121] The packet loss ratio submodule is used to determine the packet loss ratio according to the missing sequence number and the maximum sequence number in the received data packets.

[0122] Optional, packet loss ratio submodule, including:

[0123] a missing quantity unit, configured to determine a first quantity of missing data packets according to the missing sequence number;

[0124] a complete number unit, configured to determine a second number of complete data packets according to the maximum sequence number;

[0125] The ratio calculation unit is used to determine the ratio of the first number to the second number as the packet loss rate.

[0126] In summary, in the embodiment of the present invention, the user terminal sends at least one data packet to the server according to the preset data transmission rate; each data packet carries a sequence number, different data packets have different sequence numbers, and the sequence numbers of all data packets are arranged continuously; the server determines the packet loss rate according to the sequence number carried in the received data packet, and the server also determines the data receiving rate according to the number of received data packets; based on the packet loss rate and data receiving rate returned by the server, the user terminal adjusts the data transmission rate. The packet loss rate can be accurately counted based on continuous sequence numbers, and the data transmission rate can be adjusted based on the packet loss rate and data receiving rate, which can effectively reduce the packet loss rate and thus improve the data transmission efficiency.

[0127] 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.

[0128] The embodiment of the present invention discloses an electronic device, such as Figure 8 As shown, it includes: a processor 81 and a memory 82, the memory 82 stores programs or instructions that can be run on the processor 81, and when the program or instruction is executed by the processor 81, it implements the data transmission method as described in any one of the above items.

[0129] An embodiment of the present invention discloses a computer-readable storage medium, wherein a computer program stored in the storage medium enables a processor to execute any of the above-mentioned data transmission methods.

[0130] 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.

[0131] 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.

[0132] 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.

[0133] 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.

[0134] These computer program instructions can also be loaded onto 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, thereby providing instructions for executing on the computer or other programmable terminal device to implement 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.

[0135] 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.

[0136] 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.

[0137] The above is a detailed introduction to a data transmission method, device, equipment and readable 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 transmission method, characterized in that: Applied to a user terminal, the method comprises: At least one data packet is sent to the server at a preset data transmission rate; each data packet carries a sequence number, different data packets have different sequence numbers, and the sequence numbers of all data packets are arranged continuously; the server is used to determine the packet loss rate according to the sequence number carried in the received data packet, and the server is also used to determine the data receiving rate according to the number of the received data packets; The data sending rate is adjusted based on the packet loss rate and the data receiving rate returned by the server.

2. The method according to claim 1, characterized in that The step of sending at least one data packet to the server according to a preset data transmission rate includes: At a preset data transmission rate, determining a target data packet currently being transmitted; When the target data packet is the first one, assign a starting sequence number to it; In the case that the target data packet is not the first one, determining the first sequence number of the previous data packet of the target data packet, and assigning a second sequence number adjacent to the first sequence number to the target data packet; The target data packet is sent to the server.

3. The method according to claim 1, characterized in that The step of adjusting the data sending rate based on the packet loss rate and the data receiving rate returned by the server includes: Based on a preset mapping relationship between packet loss rate and safety factor, determining a target safety factor corresponding to the packet loss rate; the packet loss rate and safety factor in the mapping relationship have a positive proportional relationship; Determine a target data transmission rate according to the packet loss rate, the data receiving rate and the target safety factor, and adjust the data transmission rate to the target data transmission rate; The target data transmission rate is inversely proportional to the packet loss rate, and the target data transmission rate is directly proportional to the data receiving rate.

4. The method according to claim 1, characterized in that: After the step of adjusting the data sending rate based on the packet loss rate and the data receiving rate returned by the server, the method further includes: If the server does not return the packet loss rate within a preset time length, gradually increase the data transmission rate until the server returns a target packet loss rate of a preset size; In the case where the server returns the target packet loss rate, a current target data sending rate is determined, and at least one data packet is continuously sent to the server based on the target data sending rate.

5. A data transmission method, characterized in that: Applied to the server, the method includes: Receive data packets sent by user terminals; Determine the packet loss rate based on the sequence number carried in the received data packet; Determining a data receiving rate according to the number of received data packets, the size of the data packets and the receiving time; The packet loss rate and the data receiving rate are returned to the user terminal, so that the user terminal adjusts the data sending rate based on the packet loss rate and the data receiving rate.

6. The method according to claim 5, characterized in that The step of determining the packet loss rate according to the sequence number carried in the received data packet comprises: Compare the sequence number carried in the received data packet with the preset complete sequence number sequence to determine the missing sequence number; A packet loss rate is determined based on the missing sequence number and a maximum sequence number in the received data packets.

7. The method according to claim 6, characterized in that The step of determining the packet loss rate according to the missing sequence number and the maximum sequence number in the received data packets comprises: Determining a first number of missing data packets according to the missing sequence numbers; Determining a second number of complete data packets according to the maximum sequence number; The ratio of the first number to the second number is determined as the packet loss rate.

8. A data transmission device, characterized in that: Applied to a user terminal, the device comprises: A data transmission module, configured to transmit at least one data packet to a server according to a preset data transmission rate; each data packet carries a sequence number, different data packets have different sequence numbers, and the sequence numbers of all data packets are arranged continuously; the server is configured to determine a packet loss rate according to the sequence number carried in the received data packet, and the server is further configured to determine a data receiving rate according to the number of the received data packets; The rate adjustment module is used to adjust the data sending rate based on the packet loss rate and the data receiving rate returned by the server.

9. A data transmission device, characterized in that: Applied to the server, the device comprises: A data receiving module, used for receiving data packets sent by a user terminal; A packet loss determination module, used to determine the packet loss rate according to the sequence number carried in the received data packet; A receiving rate module, used to determine a data receiving rate according to the number of received data packets, the size of the data packets and the receiving time; The packet loss feedback module is used to return the packet loss rate and the data receiving rate to the user terminal, so that the user terminal adjusts the data sending rate based on the packet loss rate and the data receiving rate.

10. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the data transmission method according to any one of claims 1 to 7 is implemented.

11. A computer-readable storage medium, characterized in that: The computer program stored therein enables the processor to execute the data transmission method as claimed in any one of claims 1 to 7.