Data transmission method and device, video transmission method and device and electronic equipment

By recording the position of the unit to be transmitted in the data stream and the position of its data packet, and updating the data transmission method in combination with unit-level transmission status information, the problem that traditional congestion control methods cannot accurately reflect the transmission status of complete data units is solved, and more efficient data transmission is achieved.

CN121985156APending Publication Date: 2026-05-05ZHEJIANG TMALL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG TMALL TECH CO LTD
Filing Date
2025-12-08
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Traditional congestion control methods cannot accurately reflect the overall transmission status of complete data units, making it difficult to guarantee the real-time performance and stability of data transmission.

Method used

By recording the position of the unit to be transmitted in the data stream and the position of the data packets it contains, the unit-level transmission status is determined based on the status information of the associated data packets of the transmitted units, and the data transmission method is updated to match the overall transmission situation.

Benefits of technology

It improves the real-time performance and stability of data transmission, avoids misjudgments caused by relying on data packet status, and optimizes congestion control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121985156A_ABST
    Figure CN121985156A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method applied to a sending end, and the method comprises the steps: responding to each data packet corresponding to a to-be-transmitted unit of to-be-transmitted data to be sent through a data stream, and recording a unit occupied position of the to-be-transmitted unit in the data stream and a data packet occupied position of each data packet in the data stream; determining unit-level transmission state information corresponding to the transmitted unit according to data packet-level transmission state information corresponding to the associated data packet, wherein the associated data packet is a data packet of which the occupied position belongs to a position range occupied by the unit corresponding to the transmitted unit; and updating a data transmission mode based on the unit-level transmission state information so as to transmit new to-be-transmitted data through the updated data transmission mode. The invention further provides a video transmission method and device and electronic equipment. According to the scheme provided by the invention, the data transmission strategy can be adjusted according to the overall transmission condition of the data unit, so that congestion control is more accurately carried out, and the real-time performance and stability of data transmission are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data transmission technology, specifically to a data transmission method, a video transmission method, an apparatus, an electronic device, and a computer-readable storage medium. Background Technology

[0002] Congestion control is a crucial aspect of ensuring efficient and stable network operation during data transmission. Congestion control involves estimating network bandwidth based on transmission information of already sent data (such as packet loss rate and latency), and dynamically adjusting transmission methods, including the sending rate of subsequent data, to reduce network congestion.

[0003] Traditional congestion control largely adjusts transmission strategies based on the transmission status of individual data packets. However, during data transmission, a complete data unit (such as a video frame) is often encoded and divided into multiple smaller data packets for transmission to improve efficiency. This method of congestion control based on the transmission status of individual data packets may not accurately reflect the overall transmission status of a complete data unit. Adjusting the transmission strategy based on the transmission status of individual data packets may lead to misjudgments of the transmission status of individual data units, thus affecting the effectiveness of congestion control. The resulting transmission strategy makes it difficult to effectively guarantee the real-time performance and stability of data transmission. Summary of the Invention

[0004] This application provides a data transmission method, apparatus, electronic device, and computer-readable storage medium, which can adjust the data transmission strategy according to the overall transmission status of data units to more accurately control congestion and improve the real-time performance and stability of data transmission. The specific solution is as follows: In a first aspect, this application provides a data transmission method applied at a sending end, the method comprising: In response to the transmission unit corresponding to the data to be transmitted being sent through a data stream, the position of the transmission unit in the data stream and the position of each data packet in the data stream are recorded. The data to be transmitted includes at least one transmission unit. During data transmission, the unit-level transmission status information corresponding to the transmitted unit is determined based on the data packet-level transmission status information corresponding to each associated data packet of the transmitted unit. The associated data packet is a data packet whose position belongs to the position range of the unit corresponding to the transmitted unit. The data transmission method is updated based on the unit-level transmission status information so as to transmit new data to be transmitted through the updated data transmission method.

[0005] Secondly, this application provides a video transmission method, the method comprising: In response to the video frame to be transmitted, each data packet corresponding to the video frame to be transmitted is sent through a data stream, and the position of the unit of the video frame to be transmitted in the data stream and the position of each data packet in the data stream are recorded. During data transmission, the frame-level transmission status information corresponding to the transmitted video frame is determined based on the data packet-level transmission status information corresponding to each associated data packet of the transmitted video frame. The associated data packet is a data packet whose position belongs to the position range of the unit corresponding to the transmitted video frame. The data transmission method is updated based on the frame-level transmission status information so as to transmit new video frames to be transmitted through the updated data transmission method.

[0006] Thirdly, this application provides a data transmission apparatus for use at a transmitting end, the apparatus comprising: A marking unit is used to record the position of the unit to be transmitted in the data stream and the position of each data packet in the data stream in response to the transmission of each data packet corresponding to the unit to be transmitted through the data stream. The data to be transmitted includes at least one unit to be transmitted. A status determination unit is used to determine the unit-level transmission status information corresponding to the transmitted unit based on the data packet-level transmission status information corresponding to each associated data packet of the transmitted unit during the data transmission process. The associated data packets are data packets whose positions belong to the position range of the unit corresponding to the transmitted unit. The congestion control unit is used to update the data transmission mode based on the unit-level transmission status information, so as to transmit new data to be transmitted through the updated data transmission mode.

[0007] Fourthly, this application also provides an electronic device, comprising: a processor, a memory, and computer program instructions stored in the memory and executable on the processor; wherein the processor executes the computer program instructions to implement the method as described in any one of the first to second aspects.

[0008] Fifthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in any one of the first to second aspects.

[0009] Sixthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method as described in any one of the first to second aspects.

[0010] Compared with the prior art, this application has the following advantages: The data transmission method provided in this application embodiment, in response to the transmission of data packets corresponding to the transmission unit of the data to be transmitted through the data stream, records the position of the video frame to be transmitted within the data stream and the position of each data packet within the data stream. Thus, during subsequent data transmission, the sending end can determine which data packets are included in each transmitted unit based on whether the position of the data packet falls within the position range of the transmission unit. This allows the sending end to identify the associated data packets corresponding to the transmitted unit. The associated data packets are those whose positions fall within the position range of the unit corresponding to the transmitted unit. The sending end can then determine the unit-level transmission status of the transmitted unit based on the data packet-level transmission status information corresponding to the associated data packets. The system adjusts the data transmission method based on the unit-level transmission status information to transmit new data to be transmitted. Since the data to be transmitted includes at least one unit to be transmitted, that is, the data to be transmitted is divided into basic units based on transmission units, the unit to be transmitted is usually a relatively complete data unit of the data to be transmitted. However, this application adjusts the data transmission method based on the unit-level transmission status information corresponding to the unit to be transmitted when transmitting data. Therefore, the determined data transmission method can better match the overall transmission situation of each complete data unit, which can effectively avoid misjudgments that may occur when adjusting the transmission strategy based on the transmission status of each data packet. This improves the effect of congestion control and makes the real-time performance and stability of data transmission better.

[0011] Furthermore, this application records the position of each unit to be transmitted in the data stream, and also records the position of each data packet included in the unit to be transmitted in the data stream. This method facilitates the acquisition of unit-level transmission status during data transmission, improving the efficiency of obtaining unit-level transmission status information. The positional relationships clearly indicate the data packet situation corresponding to each data unit, which helps in accurately locating and handling problems in complex data transmission environments. Attached Figure Description

[0012] Figure 1 This is a schematic diagram illustrating the application scenario of the solution provided in this application.

[0013] Figure 2 This is a flowchart illustrating an example of the data transmission method provided in an embodiment of this application.

[0014] Figure 3 This is a flowchart illustrating another example of the data transmission method provided in the embodiments of this application.

[0015] Figure 4 This is a schematic diagram of an example of a data transmission device provided in an embodiment of this application.

[0016] Figure 5 This is a structural block diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

[0017] To enable those skilled in the art to better understand the technical solutions of this application, the application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. However, this application can be implemented in many other ways different from those described below. Therefore, based on the embodiments provided in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0018] It should be noted that the terms "first," "second," "third," etc., in the claims, specification, and drawings of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. Such data are interchangeable where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown or described in this application. Furthermore, the terms "comprising," "having," and their variations are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses.

[0019] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" is merely a description of the record information of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following associated objects are in an "or" relationship. "Containing A, B and / or C" means containing any one, two, or three of A, B, and C.

[0020] It should be understood that in the embodiments of this application, "B corresponding to A", "B corresponding to A", "A corresponds to B" or "B corresponds to A" means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.

[0021] To facilitate understanding of the various embodiments of this application, the application background of the embodiments will be explained.

[0022] Congestion control is a crucial aspect of ensuring efficient and stable network operation during data transmission. Congestion control involves estimating network bandwidth based on transmission information of already sent data (such as packet loss rate and latency), and dynamically adjusting transmission methods, including the sending rate of subsequent data, to reduce network congestion.

[0023] Traditional congestion control largely adjusts transmission strategies based on the transmission status of individual data packets. However, during data transmission, a complete data unit (such as a video frame) is often encoded and divided into multiple smaller data packets for transmission to improve efficiency. This method of congestion control based on the transmission status of individual data packets may not accurately reflect the overall transmission status of a complete data unit. Adjusting the transmission strategy based on the transmission status of individual data packets may lead to misjudgments of the transmission status of individual data units. For example, when a video frame is split into multiple data packets for transmission, some packets may experience delays or losses due to instantaneous network fluctuations. While the packet loss rate may be relatively low for the entire set of data packets over a period of time, the system might determine that the overall network status is good. In reality, the video frame may not be able to be decoded and played properly due to issues with some data packets; that is, the transmission status of a complete data unit is not good. However, adjusting the transmission strategy based on the transmission status of individual data packets cannot provide frame-level (i.e., transmission unit-level) network status estimation based on this situation, thus affecting the effectiveness of congestion control. The resulting transmission strategy makes it difficult to effectively guarantee the real-time performance and stability of data transmission.

[0024] To address the above problems, embodiments of this application provide a data transmission method, apparatus, electronic device, computer-readable storage medium, and computer program product. The aim is to adjust data transmission strategies based on the overall transmission status of data units, thereby achieving more accurate congestion control and improving the real-time performance and stability of data transmission.

[0025] The data transmission method provided in this application can be applied to data transmission in various fields. Specifically, it can be applied to the transmission of live video data, online game data, real-time communication data, online virtual try-on data, e-commerce page data, IoT device data, telemedicine data, intelligent transportation data, real-time virtual animation, etc., but is not limited to these.

[0026] To facilitate understanding of the method embodiments of this application, their application scenarios are described. Please refer to... Figure 1 , Figure 1 This is a schematic diagram illustrating an application scenario of the solution provided in the embodiments of this application. This application scenario is merely an illustrative example and is not intended to limit the specific application scenario. Figure 1As shown, in this application scenario, a transmitter 102 and a receiver 101 are set up. The receiver 101 and the transmitter 102 establish a connection through network communication to transmit data.

[0027] The sending end 102 can be a server or other device that sends data to the receiving end 101. The sending end 102 can have high computing power. The sending end 102 encodes and divides the various units of data to be transmitted into multiple data packets, then sends these data packets as a data stream, and finally transmits the data in the data stream to the receiving end 101 via the network. During data packet transmission, the sending end 102 updates the data transmission method of subsequent data to be transmitted based on the unit-level transmission status information corresponding to the unit to be transmitted, such as adjusting the encoding method, encoding rate, data transmission rate, transmission interval, and retransmission strategy of the unit to be transmitted. The sending end 102 can also generate corresponding data based on access requests and interaction information sent by the receiving end 101, and send it to the receiving end 101 through an appropriate channel.

[0028] The receiving end 101 can be an electronic device with data processing capabilities, such as a mobile phone, tablet, smartwatch, desktop computer, smart TV, VR device, in-vehicle device, wearable device, or laptop. The receiving end 101 can be a client or a server. It receives data from the sending end 102, decodes and processes this data to achieve the corresponding functions. The receiving end 101 can also send access requests and interactive information to the sending end 102, so that the sending end 102 sends the corresponding request data to the receiving end 101.

[0029] The receiver 101 and the transmitter 102 can communicate using various communication systems, such as wired or wireless communication systems.

[0030] Example 1 The first embodiment of this application provides a data transmission method. The method is applied to a sending end, which can be a server or other devices used to send data, such as desktop computers, laptops, mobile phones, tablets, smartwatches, smart TVs, and other electronic devices with data processing functions.

[0031] like Figure 2 As shown, the data transmission method provided in the first embodiment of this application includes the following steps S110 to S130.

[0032] Step S110: In response to the transmission of each data packet corresponding to the data to be transmitted being sent through the data stream, the position of the data to be transmitted in the data stream and the position of each data packet in the data stream are recorded. The data to be transmitted includes at least one data packet.

[0033] The data to be transmitted may be video data, audio data, file data, image data, text data, etc. For example, the data to be transmitted may be live video streams, real-time cloud-rendered video streams, real-time interactive video or audio streams, etc. This application does not limit the specific content of the data to be transmitted.

[0034] The data to be transmitted may include one or more units to be transmitted. Each unit to be transmitted is usually a relatively complete part of the data to be transmitted. For example, a unit to be transmitted may be a video frame, an audio segment of a preset duration, a file block, an image, a text paragraph, etc. Alternatively, those skilled in the art may determine the specific form of the unit to be transmitted according to the specific application scenario.

[0035] Optionally, the data to be transmitted can be a video to be transmitted, and the transmission unit can be a video frame of the video to be transmitted; or, the data to be transmitted can be audio to be transmitted, and the transmission unit can be an audio segment of the audio to be transmitted; or, the data to be transmitted can be a file to be transmitted, and the transmission unit can be a file block of the file to be transmitted.

[0036] In this embodiment of the application, before step S110, the following steps may be included: acquiring the data to be transmitted, including each unit to be transmitted; encoding each unit to be transmitted and dividing it into multiple data packets for transmission; specifically, each data packet can be sent in the form of a data stream, for example, through the Quick UDP Internet Connections (QUIC) protocol, where UDP stands for User Datagram Protocol. This allows for more efficient use of network resources for data transmission. For each unit to be transmitted, its corresponding data packets are sequentially placed into the data stream and await transmission.

[0037] A data stream is a method by which the sending end organizes individual data packets of data to be transmitted for continuous transmission. It can improve the efficiency and orderliness of data transmission, and the position of the data packets in the data stream reflects their transmission order. After the sending end obtains the data to be transmitted, it encodes and divides each unit to be transmitted into individual data packets according to the time order of each unit to be transmitted, and then puts these data packets into the data stream in chronological order.

[0038] In this embodiment, different data to be transmitted can form different data streams for parallel transmission, and different types of data to be transmitted can also form different data streams for parallel transmission. Different data streams can be assigned different priorities. For example, for data packets with high real-time requirements, such as live video stream data packets, the corresponding data stream can have a higher priority so that data in the higher priority data stream can be transmitted first when network resources are idle; for data packets with relatively low real-time requirements, such as file transfer data packets, the corresponding data stream can have a lower priority. This ensures that important data can be processed and transmitted first, improving the efficiency and quality of data transmission.

[0039] In this embodiment, the transmitting end transmits each unit to be transmitted sequentially, using the unit to be transmitted as the transmission unit. Specifically, each unit to be transmitted can be encoded and divided into corresponding data packets, and the data packets corresponding to each unit to be transmitted can be sent to the data stream as a unit. For example, when the data to be transmitted is video data, one video frame is one unit to be transmitted. The transmitting end will encode the video frame and divide it into multiple data packets, and then send all the data corresponding to one video frame as a whole to the data stream simultaneously.

[0040] After the data packets of any unit to be transmitted are sent in the form of a data stream, the sending end records the position of the unit to be transmitted in the data stream and the position of each data packet in the data stream. In this embodiment, the data packets of the same unit to be transmitted can be sent through the same data stream to ensure that the data packets of the unit to be transmitted can be transmitted completely, thereby facilitating accurate decoding and processing by the receiving end. Alternatively, the data packets of a unit to be transmitted can be sent through different data streams according to factors such as the type and importance of the data packets; this application does not specifically limit this.

[0041] The position of the unit to be transmitted in the data stream refers to the position of all data packets included in the unit to be transmitted within the data stream. In this embodiment, when the sending end transmits data, it can transmit different data in parallel through multiple data streams to improve data transmission efficiency. In this case, the position of the unit to be transmitted may include the data stream in which the unit to be transmitted is located, the start position of the unit to be transmitted within its data stream, and the end position of the unit to be transmitted within its data stream. The position of each data packet of the unit to be transmitted within the data stream refers to the specific position of each data packet within the data stream, which may include the data stream in which the data packet is located and its start position within that data stream. Recording this position information helps the sending end to accurately track the transmission status of each unit to be transmitted and its included data packets.

[0042] Optionally, the size of each data packet can also be recorded to facilitate the sender's analysis of data transmission. Data packets of different sizes may exhibit different behaviors during transmission; for example, larger data packets may be more susceptible to network fluctuations, resulting in a relatively higher probability of packet loss or delay. By recording the data packet size, the sender can combine this with the data packet location information to more accurately determine the transmission status of each unit to be transmitted.

[0043] In this embodiment, the position of the unit to be transmitted in the data stream can be recorded in the following way: A unit identifier (chunk_id) corresponding to the unit to be transmitted is created; unit position record information is created between the position of the unit to be transmitted in the data stream and the unit identifier corresponding to the unit to be transmitted; this unit position record information records the position of the unit to be transmitted in the data stream, thereby facilitating quick location of the unit to be transmitted in the data stream based on the unit identifier. For example, the unit position record information may include the unit identifier (chunk_id) of the unit to be transmitted, the stream identifier (stream_id) of the data stream in which the unit to be transmitted is located, the start position (stream_offset_start) and the end position (stream_offset_end) of the unit to be transmitted in the data stream.

[0044] The position of each data packet in the data stream can be recorded as follows: Assign a corresponding packet identifier (packet_id) to each data packet, and create a packet position record by linking the packet's position in the data stream to its corresponding packet identifier. This records the packet's position within the data stream. For example, the packet position record can include the packet identifier (packet_id), the stream identifier (stream_id) of the data stream the packet belongs to, and the starting position (stream_offset) of the data packet within its stream. In this way, the sending end can clearly record the specific position of each data packet in the data stream, facilitating subsequent tracking and management of the data packet transmission status and identifying which transmission unit the data packet belongs to.

[0045] The aforementioned unit identifier is used to uniquely identify a unit to be transmitted. The unit identifier can include at least one of the following forms: numbers, letters, symbols, and text. For example, it can be a number, a specific string, etc. Unit identifiers can be, for example, "Unit_001", "Unit_002", "chunk_001", "chunk_002", etc. The specific identifier form can be determined according to actual needs and system design. The unit identifier enables the identification and differentiation of different units to be transmitted throughout the entire data transmission process. The data packet identifier is used to uniquely identify a data packet. The data packet identifier can also use at least one of the following forms: numbers, letters, symbols, and text, or a combination thereof. The data packet identifier makes it easier for the sending and receiving ends to track and manage each data packet.

[0046] For example, if the data stream length corresponding to the unit to be transmitted is 1000, the data stream in which the unit to be transmitted is located is Stream_01, the start position of the unit to be transmitted in the data stream is stream_offset_start 200, the end position is stream_offset_end 1199, and the corresponding unit identifier is "Unit_003", then the unit position record information can be recorded as {chunk_id: "Unit_003", stream_id: "Stream_01", stream_offset_start: 200, stream_offset_end: 1199}. If the unit to be transmitted contains 3 data packets, the first data packet starts at position 200 in the data stream, is also in the data stream Stream_01, and the corresponding data packet identifier is "Packet_001", then the packet position record information can be recorded as {packet_id: "Packet_001", stream_id: "Stream_01", stream_offset: 200}, and so on, the packet position record information of the other 2 data packets can be recorded. The length of data packets can also be recorded. For example, packet1 (length 200, stream offset: 0, Stream_01), packet2 (length 500, stream offset: 200, Stream_01), and packet3 (length 300, stream offset: 700, Stream_01, data end marker) can be used to record the three data packets contained in the unit to be transmitted. It is evident that by recording unit position information and packet position information, the sending end can comprehensively and meticulously manage the position and status of each unit to be transmitted and its contained data packets in the data stream. During data transmission, this recorded information facilitates the retrieval of the data packets corresponding to a transmission unit and the transmission unit to which the data packets belong.

[0047] Step S120: During data transmission, the unit-level transmission status information corresponding to the transmitted unit is determined based on the data packet-level transmission status information corresponding to each associated data packet of the transmitted unit. The associated data packet is a data packet whose position belongs to the position range of the unit corresponding to the transmitted unit.

[0048] It is understandable that step S120 is a continuous process during data transmission. Specifically, during data transmission, the sending end can execute steps S120-S130 at preset time intervals to update the data transmission method. The preset time interval can be flexibly adjusted according to the actual network environment and transmission requirements. For example, the time interval can be extended in a relatively stable network environment, while it can be shortened in an environment with large network fluctuations. Alternatively, the sending end can also execute steps S120-S130 when other preset conditions for updating the transmission method are met. These preset conditions could include detecting a data packet loss rate reaching a preset threshold, detecting a data packet transmission delay exceeding a preset duration, etc.

[0049] Since step S110 records the position of each unit to be transmitted in the data stream and the position of each data packet in the data stream, step S120 can accurately find the associated data packets corresponding to the transmitted unit based on the recorded unit position information and packet position information. That is, it can find data packets whose positions belong to the range of the positions of the units corresponding to the transmitted unit, thereby determining the associated data packets included in the transmitted unit.

[0050] In this application, when creating corresponding unit location record information for each unit to be transmitted, step S120 can specifically determine the position occupied by the unit corresponding to the transmitted unit based on the unit location record information corresponding to each transmitted unit, and determine the data packets whose positions belong to the range of positions occupied by the units corresponding to the transmitted units based on the packet location record information corresponding to each sent data packet, thereby determining each data packet included in the transmitted unit.

[0051] Optionally, the aforementioned transmitted units can be units that meet the adjacent transmission conditions. The adjacent transmission conditions can include transmitted units sent to the data stream within a preset time period before the current time, or other adjacent transmission conditions. In this embodiment, by using the transmission status of transmitted units that meet the adjacent transmission conditions to update the data transmission mode, the adjustment of the data transmission mode can be made more in line with the actual transmission situation in the most recent time period, thereby improving the efficiency and stability of data transmission.

[0052] The aforementioned packet-level transmission status information is used to indicate the specific transmission status of the packet during the transmission process. For example, packet-level transmission status information may include whether the packet was successfully sent, whether it was lost, the transmission delay time, the feedback information (i.e., the acknowledgment character, or ACK) received by the receiving end when the packet is received, and may also include other information that can reflect the packet-level transmission status.

[0053] The sending end can determine the unit-level transmission status information corresponding to a transmitted unit based on the packet-level transmission status information of all data packets included in the transmitted unit. For example, the packet-level transmission status information of all data packets corresponding to a transmitted unit can be summarized to obtain the unit-level transmission status information corresponding to that transmitted unit. For instance, if a transmitted unit corresponds to 10 data packets, the reception time of the transmission unit corresponding to that transmitted unit can be determined based on the latest reception time of these 10 data packets. When determining the unit-level transmission status information, weighted calculations can also be performed based on the importance of different data packets. For example, keyframe data packets in video data are more important than non-keyframe data packets, and keyframe data packets can be assigned a higher weight when calculating the unit-level transmission status information.

[0054] Unit-level transmission status information can include the overall transmission duration of the transmission unit, the start time of transmission, the overall reception time of the transmission unit, whether packet loss occurred, the packet loss rate, and the average transmission delay. Through this unit-level transmission status information, the sending end can gain a more comprehensive understanding of the transmission status of each transmission unit.

[0055] In one implementation, step S120 can determine the unit-level transmission status information corresponding to the unit identifier according to the following steps S121~S122.

[0056] Step S121: Obtain the first transmission parameter that is preset for congestion control, wherein the first transmission parameter is a parameter of the transmission unit dimension.

[0057] The first transmission parameter may include at least one of the following: transmission duration of the transmission unit, packet loss rate, and average transmission delay, but is not limited thereto. These parameters are preset based on factors such as the overall performance of the network, transmission requirements, and system stability requirements. Those skilled in the art can set the specific content of the first transmission parameter according to the specific method of congestion control, and this application does not specifically limit it.

[0058] Step S122: Based on the transmission status information of the associated data packet of the transmitted unit related to the first transmission parameter, determine the unit-level transmission status information corresponding to the transmitted unit and related to the first transmission parameter.

[0059] After obtaining the preset first transmission parameter, the sending end can acquire the transmission status information of the associated data packets related to the first transmission parameter. For example, when the first transmission parameter is the transmission duration of a transmission unit, the transmission status information of the associated data packets related to the first transmission parameter may include the time when the data packet was sent to the data stream, the time when it started being sent to the network, and the time when it was received by the receiving end. Based on this transmission status information of each associated data packet, the sending end can determine the transmission duration of the transmitted unit. When the first transmission parameter is whether a transmission unit has lost packets, the transmission status information of the associated data packets related to the first transmission parameter may include whether the data packet was successfully sent and whether an acknowledgment character ACK was received from the receiving end. Based on this information, the sending end can determine whether there are any untransmitted data packets in the associated data packets, thereby determining whether the transmitted unit has lost packets. When the first transmission parameter is the average transmission delay of a transmission unit, the transmission status information of the associated data packets related to the first transmission parameter may include the sending time and receiving time of each data packet. By calculating the transmission delay of each associated data packet and averaging the values, the sending end can obtain the average transmission delay of the transmitted unit.

[0060] For example, the first transmission parameter for congestion control may include at least one of the following: the time when the transmission unit is sent, the time when the unit to be transmitted is sent, the first data packet of the transmission unit is sent to the network, all data packets of the transmission unit are sent to the network, all data packets of the transmission unit are received by the receiving end, and the sender cancels the transmission of the transmission unit. The specific unit-level transmission status information corresponding to the transmitted unit can be determined according to the parameters required by the specific congestion control algorithm, and this application does not specifically limit it.

[0061] This embodiment determines the transmission status information in a targeted manner based on the preset first transmission parameters required for congestion control, which makes the determination of unit-level transmission status information more accurate and effective, thereby providing a more reliable basis for subsequent data transmission mode adjustments.

[0062] Step S130: Update the data transmission mode based on the unit-level transmission status information, so as to transmit new data to be transmitted through the updated data transmission mode.

[0063] Once the unit-level transmission status information corresponding to the transmitted units is determined, the sending end can obtain a more comprehensive and accurate understanding of the transmission status of each transmission unit, such as the frame-level transmission status of video data. This provides a more accurate basis for adjusting the data transmission strategy. For example, if the unit-level transmission status of a certain transmission unit is poor, the sending end can promptly adjust the encoding method, encoding bitrate, transmission rate, transmission interval, and retransmission strategy of subsequent data packets of other units to be transmitted (such as video frames to be transmitted) to improve the transmission quality and real-time performance of that unit. Specifically, step S140 can be performed by updating the data transmission method according to the following steps S141~S142.

[0064] Step S141: Determine the current network transmission status information based on the unit-level transmission status information.

[0065] Specifically, the sending end can determine the current network bandwidth based on various indicators in the unit-level transmission status information. Network transmission bandwidth refers to the "maximum amount of data" that can pass from one point to another in the network per unit time. For example, the available bandwidth of the current network can be determined based on indicators such as the packet loss rate and average transmission delay of the transmission unit. If the packet loss rate of the transmission unit is high or the average transmission delay is long, it indicates that the network bandwidth may be tight; conversely, if the packet loss rate of the transmission unit is low and the average transmission delay is short, it indicates that the network bandwidth is relatively sufficient. If the packet loss rate of multiple transmission units is high or the average transmission delay is long, it can be judged that the current network is in a congested state and the available bandwidth of the network is low. If the transmission time of most transmission units is short, and the packet loss rate is low and the average transmission delay is small, it indicates that the current network transmission status is good and the available bandwidth of the network is high.

[0066] Optionally, network transmission status information such as network stability can also be determined based on information such as the overall transmission duration of the transmission unit. If the transmission duration fluctuates greatly, it indicates that there may be unstable factors in the network. Other current network transmission status information can also be determined. This application does not specifically limit this.

[0067] In one specific embodiment, step S141 can determine the current network transmission status information according to the following steps S141a~S141b.

[0068] Step S141a: Determine the data packet-level transmission status information corresponding to each sent data packet of the data to be transmitted.

[0069] The sending end can obtain packet-level transmission status information for each sent data packet. This information can include whether the data packet was successfully sent, whether it was lost, the transmission delay time, and whether an acknowledgment character (ACK) was received from the receiving end. By analyzing this packet-level transmission status information, a more detailed understanding of the transmission status of each data packet can be obtained.

[0070] Specifically, step S141a can determine the packet-level transmission status information corresponding to each sent data packet according to the following steps: obtaining a pre-set second transmission parameter for congestion control, wherein the second transmission parameter is a parameter of the data packet dimension; and determining the packet-level transmission status information of each sent data packet of the data to be transmitted corresponding to the second transmission parameter.

[0071] The second transmission parameters may include, but are not limited to, the data packet sending time, receiving time, whether transmission was successful, whether the packet was lost, and transmission delay time. Similar to the first transmission parameters, the second cycle number parameter is also preset according to the specific congestion control method, and this application does not specifically limit its content. After obtaining the preset second transmission parameters, the sending end can determine the data packet-level transmission status information corresponding to the second transmission parameters for each transmitted data packet of the data to be transmitted. In this way, the sending end can selectively collect information related to the second transmission parameters, thereby more accurately adjusting the subsequent transmission method based on the transmission status information of each data packet.

[0072] Step S141b: Determine network transmission status information based on the unit-level transmission status information and the data packet-level transmission status information corresponding to the sent data packet.

[0073] The sending end can combine the unit-level transmission status information with the data packet-level transmission status information corresponding to the sent data packets. For example, if the unit-level transmission status information shows that the packet loss rate of a certain transmission unit is high, and the data packet-level transmission status information indicates that multiple data packets in the transmission unit are lost and the transmission delay is long, then it can be more clearly determined that there is a serious problem with the transmission of the transmission unit, and thus determine that the current network transmission status is cross-cutting, thereby determining that the current network bandwidth is low.

[0074] This embodiment integrates both packet-level and unit-level transmission status information when determining network transmission status, making the judgment of network transmission status more accurate and comprehensive. Through this comprehensive judgment, the sending end can more accurately determine the actual situation of the network, providing a reliable basis for subsequent adjustments to the data transmission method.

[0075] Step S142: Update the data transmission method according to the network transmission status information.

[0076] Once the current network transmission status is determined, a data transmission method that better matches this status can be identified. For example, if the network is determined to be congested with low available bandwidth, the sender can reduce the transmission rate of the data to be transmitted to ensure effective data transmission. For video data, this means reducing the frame rate and encoding bitrate, decreasing the number of data packets sent per unit time, and preventing further network congestion. The retransmission strategy can also be adjusted, increasing the retransmission interval to reduce the bandwidth consumption of retransmission requests.

[0077] The data transmission method may include at least one of the following: the encoding method of the unit to be transmitted, the encoding code rate of the unit to be transmitted, the data transmission rate, the data transmission interval, and the data retransmission strategy.

[0078] When network transmission is in good condition and available bandwidth is high, the sending end can increase the transmission rate of the data to be transmitted. For example, increasing the encoding bitrate of video data can improve the video quality and clarity, while shortening the data packet transmission interval can speed up data transmission and improve transmission efficiency.

[0079] Updating data transmission methods can also include updating data stream management. Specifically, the priority and capacity of different data streams can be adjusted based on network transmission status information. When the network is congested, important data, such as keyframe data packets in video data, should be sent first, while the length threshold of the data stream should be reduced to avoid excessive data packet backlog. When the network is in good condition, the length threshold of the data stream can be increased to improve data buffering capacity and better cope with sudden high-volume data transmissions.

[0080] By continuously updating the data transmission method based on the unit-level transmission status information, data transmission can be made more adaptable to the actual network conditions, improving the efficiency, quality, and stability of data transmission, and ensuring that new data to be transmitted can be transmitted reliably and efficiently in different network environments.

[0081] The data transmission method provided in this application embodiment, in response to the transmission of data packets corresponding to the transmission unit of the data to be transmitted through the data stream, records the position of the video frame to be transmitted within the data stream and the position of each data packet within the data stream. Thus, during subsequent data transmission, the sending end can determine which data packets are included in each transmitted unit based on whether the position of the data packet falls within the position range of the transmission unit. This allows the sending end to identify the associated data packets corresponding to the transmitted unit. The associated data packets are those whose positions fall within the position range of the unit corresponding to the transmitted unit. The sending end can then determine the unit-level transmission status of the transmitted unit based on the data packet-level transmission status information corresponding to the associated data packets. The data transmission status information is used to update the data transmission mode based on the unit-level transmission status information, so as to transmit new data to be transmitted through the updated data transmission mode. Since the data to be transmitted includes at least one unit to be transmitted, that is, the data to be transmitted is divided into transmission units as the basic unit, the unit to be transmitted is usually a relatively complete data unit of the data to be transmitted. However, when transmitting data, this application adjusts the data transmission mode based on the unit-level transmission status information corresponding to the unit to be transmitted. Therefore, the determined data transmission mode can better match the overall transmission situation of each complete data unit, which can effectively avoid the misjudgment that may occur when adjusting the transmission strategy based on the transmission status of each data packet, thereby improving the effect of congestion control and making the real-time performance and stability of data transmission better.

[0082] Furthermore, this application records the position of each unit to be transmitted in the data stream, and also records the position of each data packet included in the unit to be transmitted in the data stream. This method facilitates the acquisition of unit-level transmission status during data transmission, improving the efficiency of obtaining unit-level transmission status information. The positional relationships clearly indicate the data packet situation corresponding to each data unit, which helps in accurately locating and handling problems in complex data transmission environments.

[0083] Furthermore, this application creates a system that can easily summarize the transmission status of each data packet at each transmission unit level in the transport layer by simply recording the unit position of the unit to be transmitted and the data packet position. This eliminates the need for architectural redesign of the existing data transmission protocol and the need to add too many interfaces, making congestion control at the frame level or other unit levels more convenient.

[0084] The following is an exemplary description of the data transmission method provided in this application, using a specific example, such as... Figure 3 As shown, the data transmission method in this example includes the following steps S1 to S4.

[0085] Step S1: In response to the transmission unit corresponding to the data to be transmitted being sent through the data stream, the position of the transmission unit in the data stream and the position of each data packet in the data stream are recorded.

[0086] Specifically, the cell location record information records the position of the cell to be transmitted in the data stream, and the packet location record information records the position of the data packet in the data stream. The cell location record information and the packet location record information are used to represent the position information of the data transmitted at the transport layer in the data stream. For example, ... Figure 3 As shown, the unit location record information records the unit identifier corresponding to the unit to be transmitted, the start and end positions of the unit to be transmitted in the data stream, the identifier of the data stream, etc. The packet location record information records the packet identifier, the identifier of the data stream in which the packet is located, the start position of the packet in the data stream, the packet length, etc. It may also contain other information, which will not be detailed here.

[0087] Step S2: Convert each data packet into a data packet of a preset format.

[0088] The preset format can be determined according to the specific transport layer protocol to facilitate data transmission. The specific format content is not specifically limited in this application.

[0089] Step S3: During data transmission, the transport layer determines the associated data packets based on the aforementioned unit location record information and packet location record information, and determines the unit-level transmission status information corresponding to the transmitted unit based on the data packet-level transmission status information corresponding to the associated data packets. The unit-level transmission status information is then sent to the congestion control module, and the data packet-level transmission status information corresponding to each transmitted data packet is also sent to the congestion control module.

[0090] Step S4: The congestion control module updates the data transmission method based on the unit-level transmission status information and the data packet-level transmission status information, and sends the new data transmission method to the data transmission module so that the data transmission module can transmit the new unit to be transmitted according to the updated data transmission method.

[0091] The specific implementation process of each step in this example can be found in the detailed explanation above, and will not be elaborated here.

[0092] Example 2 The second embodiment of this application also provides a video transmission method. This method is applied to a sending end, which can be a server or other devices used for sending data, such as desktop computers, laptops, mobile phones, tablets, smartwatches, smart TVs, and other electronic devices with data processing capabilities. The method includes the following steps S210 to S230.

[0093] Step S210: In response to the transmission of video frames corresponding to the video to be transmitted, each data packet is sent through the data stream, and the position of the unit of the video frame to be transmitted in the data stream and the position of each data packet in the data stream are recorded.

[0094] Step S220: During data transmission, determine the frame-level transmission status information corresponding to the transmitted video frame based on the data packet-level transmission status information corresponding to the associated data packet. The associated data packet is a data packet whose position belongs to the position range of the unit corresponding to the transmitted video frame.

[0095] Step S240: Update the data transmission method based on the frame-level transmission status information, so as to transmit the new video frame to be transmitted through the updated data transmission method.

[0096] The execution process of each step in Example 2 can be referred to in Example 1, and will not be described in detail here.

[0097] Example 3 The third embodiment of this application also provides a data transmission device. Since the device embodiment is basically similar to the method embodiment, it is described simply. For details of the relevant technical features and their effects, please refer to the corresponding descriptions of the data transmission method embodiments provided above. Figure 4 As shown, the data transmission device provided in this embodiment includes: The marking unit 310 is used to record the position of the unit to be transmitted in the data stream and the position of each data packet in the data stream in response to the transmission of each data packet corresponding to the unit to be transmitted through the data stream. The data to be transmitted includes at least one unit to be transmitted. The status determination unit 320 is used to determine the unit-level transmission status information corresponding to the transmitted unit based on the data packet-level transmission status information corresponding to the associated data packet during the data transmission process. The associated data packet is a data packet whose position belongs to the position range of the unit corresponding to the transmitted unit. The congestion control unit 330 is used to update the data transmission mode based on the unit-level transmission status information, so as to transmit new data to be transmitted through the updated data transmission mode.

[0098] The fourth embodiment of this application also provides an electronic device embodiment corresponding to the data transmission method provided in the first embodiment. This electronic device is a transmitting end, and the following description of the electronic device embodiment is merely illustrative. The electronic device embodiment is as follows: Please refer to Figure 5 Understanding the above electronic devices, Figure 5 This is a schematic diagram of an electronic device. The electronic device provided in this embodiment includes: a processor 1001, a memory 1002, a communication bus 1003, and a communication interface 1004; The memory 1002 is used to store computer instructions for data processing. When these computer instructions are read and executed by the processor 1001, the following steps are performed: In response to the transmission unit corresponding to the data to be transmitted being sent through a data stream, the position of the transmission unit in the data stream and the position of each data packet in the data stream are recorded. The data to be transmitted includes at least one transmission unit. During data transmission, the unit-level transmission status information corresponding to the transmitted unit is determined based on the data packet-level transmission status information corresponding to the associated data packet. The associated data packet is a data packet whose position belongs to the position range of the unit corresponding to the transmitted unit. The data transmission method is updated based on the unit-level transmission status information so as to transmit new data to be transmitted through the updated data transmission method.

[0099] The fifth embodiment of this application also provides a computer-readable storage medium for implementing the method of any one of the first or second embodiments. The embodiments of the computer-readable storage medium provided in this application are described in a relatively simple manner; relevant parts can be found in the corresponding descriptions of the above method embodiments. The embodiments described below are merely illustrative.

[0100] The computer-readable storage medium provided in this embodiment stores computer instructions, which, when executed by a processor, implement the steps of any one of the first to third embodiments.

[0101] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0102] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0103] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media, which can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined in this application, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.

[0104] 2. Those skilled in the art will understand that embodiments of this application can provide methods, systems, or computer program products. Therefore, embodiments of this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this application can take 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.

[0105] 3. This application embodiment may involve the use of user data. In practical applications, user-specific personal data may be used within the scope permitted by applicable laws and regulations of the country in which the application is located (e.g., with the user's explicit consent and effective notification to the user, etc.). Furthermore, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. The collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0106] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

Claims

1. A data transmission method, characterized in that, Applied to the sending end, the method includes: In response to the transmission unit corresponding to the data to be transmitted being sent through a data stream, the position of the transmission unit in the data stream and the position of each data packet in the data stream are recorded. The data to be transmitted includes at least one transmission unit. During data transmission, the unit-level transmission status information corresponding to the transmitted unit is determined based on the data packet-level transmission status information corresponding to each associated data packet of the transmitted unit. The associated data packet is a data packet whose position belongs to the position range of the unit corresponding to the transmitted unit. The data transmission method is updated based on the unit-level transmission status information so as to transmit new data to be transmitted through the updated data transmission method.

2. The data transmission method according to claim 1, characterized in that, The position occupied by the unit includes the data stream in which the unit to be transmitted is located, the start position and the end position of the unit to be transmitted in the data stream; the position occupied by the data packet includes the data stream in which the data packet is located and the start position of the data packet in the data stream.

3. The data transmission method according to claim 1, characterized in that, The data to be transmitted is a video to be transmitted, and the unit to be transmitted is a video frame of the video to be transmitted. Alternatively, the data to be transmitted is audio to be transmitted, and the unit to be transmitted is an audio segment of the audio to be transmitted; Alternatively, the data to be transmitted is a file to be transmitted, and the unit to be transmitted is a file block of the file to be transmitted.

4. The data transmission method according to claim 1, characterized in that, The step of determining the unit-level transmission status information corresponding to the transmitted unit based on the data packet-level transmission status information of each associated data packet of the transmitted unit includes: Obtain the first transmission parameter that is pre-set for congestion control, wherein the first transmission parameter is a parameter of the transmission unit dimension; Based on the transmission status information of each associated data packet of the transmitted unit related to the first transmission parameter, determine the unit-level transmission status information corresponding to the transmitted unit and related to the first transmission parameter.

5. The data transmission method according to claim 4, characterized in that, The first transmission parameter includes at least one of the following: the time when the transmission unit is sent, the time when all data packets of the transmission unit are received by the receiving end, the time when the first data packet of the transmission unit is sent into the network, the time when all data packets of the transmission unit are sent into the network, and whether the sending end cancels the transmission unit's message.

6. The data transmission method according to any one of claims 1 to 5, characterized in that, The method of updating data transmission based on the unit-level transmission status information includes: The current network transmission status information is determined based on the unit-level transmission status information; The data transmission method is updated based on the network transmission status information.

7. The data transmission method according to claim 6, characterized in that, Determining the current network transmission status information based on the unit-level transmission status information includes: Determine the packet-level transmission status information corresponding to each sent data packet; The network transmission status information is determined based on the unit-level transmission status information and the data packet-level transmission status information corresponding to the sent data packet.

8. The data transmission method according to claim 7, characterized in that, The determination of the data packet-level transmission status information corresponding to each sent data packet includes: Obtain the pre-set second transmission parameters for congestion control, wherein the second transmission parameters are parameters at the data packet level; Determine the packet-level transmission status information of each sent data packet corresponding to the second transmission parameter.

9. The data transmission method according to any one of claims 1 to 5, characterized in that, The data transmission method includes at least one of the following: the encoding method of the unit to be transmitted, the encoding code rate of the unit to be transmitted, the data transmission rate, the data transmission interval, and the data retransmission strategy.

10. A video transmission method, characterized in that, The method includes: In response to the video frame to be transmitted, each data packet corresponding to the video frame to be transmitted is sent through a data stream, and the position of the unit of the video frame to be transmitted in the data stream and the position of each data packet in the data stream are recorded. During data transmission, the frame-level transmission status information corresponding to the transmitted video frame is determined based on the data packet-level transmission status information corresponding to each associated data packet of the transmitted video frame. The associated data packet is a data packet whose position belongs to the position range of the unit corresponding to the transmitted video frame. The data transmission method is updated based on the frame-level transmission status information so as to transmit new video frames to be transmitted through the updated data transmission method.

11. A data transmission device, characterized in that, Applied to the transmitting end, the device includes: A marking unit is used to record the position of the unit to be transmitted in the data stream and the position of each data packet in the data stream in response to the transmission of each data packet corresponding to the unit to be transmitted through the data stream. The data to be transmitted includes at least one unit to be transmitted. A status determination unit is used to determine the unit-level transmission status information corresponding to the transmitted unit based on the data packet-level transmission status information corresponding to each associated data packet of the transmitted unit during the data transmission process. The associated data packets are data packets whose positions belong to the position range of the unit corresponding to the transmitted unit. The congestion control unit is used to update the data transmission mode based on the unit-level transmission status information, so as to transmit new data to be transmitted through the updated data transmission mode.

12. An electronic device, characterized in that, include: Processor, memory, and computer program instructions stored in said memory and executable on the processor; When the processor executes the computer program instructions, it implements the method as described in any one of claims 1-10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-10.