A HTCP transmission method and device for portable communication equipment in complex network environment

By constructing the intra-frame time difference-congestion window association table and dynamically adjusting the transmission window, the problem of the congestion window control method in portable communication devices being adjusted only when congestion occurs is solved, achieving more efficient data transmission effects.

CN117914796BActive Publication Date: 2024-09-10ZHUZHOU HUATONG TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311666237.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2024-09-10
Estimated Expiration
2043-12-06

AI Technical Summary

Technical Problem

The current congestion window control method of portable communication devices in complex network environments only adjusts when congestion occurs, resulting in poor control effects.

Method used

By acquiring multiple sets of test transmission frame sets, constructing an intra-frame time difference-congestion window association table, dynamically adjusting the sending window size, using the pre-built window control duration and speed formulas to calculate the current window control duration and speed, and realizing real-time monitoring of the dynamic send window Adjustment.

Benefits of technology

It improves data transmission efficiency in complex network environments, reduces packet loss rate and delay, and improves transmission effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117914796B
    Figure CN117914796B
Patent Text Reader

Abstract

The present invention relates to the field of HTCP transmission technology, and discloses a HTCP transmission method and device for a portable communication device in a complex network environment, including: querying the current target congestion window value according to the current intra-frame time difference of a single-frame data packet set, calculating the current window control duration using a window control duration formula according to the data reading speed and the number of single-frame data packets, calculating the current window control speed using a window speed control formula according to the current dynamic sending window value, the current target congestion window value and the current window control duration, adjusting the size of the current dynamic sending window according to the current window control speed, obtaining a dynamic HTCP sending buffer, sending the single-frame data packet in the dynamic HTCP sending buffer to the HTCP receiving buffer and then sending it to the application layer. The main purpose of the present invention is to solve the problem that the current congestion window control method is only triggered when congestion occurs, so the current congestion window control method has a poor control effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a HTCP transmission method and device of a portable communication device in a complex network environment, belonging to the technical field of HTCP transmission. Background Art

[0002] Traditional integrated portable communication devices usually use UDP (User Datagram Protocol) to transmit audio and video media data. Compared with TCP (Transmission Control Protocol) which requires retransmission and congestion control mechanisms to ensure reliable transmission, UDP has the greater advantage of real-time. Therefore, UDP is suitable for media transmission with high real-time requirements such as video conferencing systems, monitoring systems, and VOIP. Integrated portable communication devices are generally used in the wild and are more often transmitted wirelessly. Therefore, the network environment is relatively complex, and network packet loss, jitter, delay and other problems are very serious. Even if the FEC mechanism of network packet loss recovery is used, it is difficult to achieve a good audio and video transmission effect.

[0003] When using the TCP protocol to transmit data, mechanisms such as sliding windows and congestion control are usually used to optimize data transmission effects. The sliding window mechanism is a flow control mechanism in the TCP protocol, which is used to control the data transmission rate of the sender and the receiver to avoid excessive data causing the data to be unable to be processed in time. The congestion control mechanism defines a congestion window CWND (congestion window) at the sender. When the data sent exceeds the congestion window range, the data will not be sent. The congestion window will dynamically call its own size as the network situation changes. For example, if there is no congestion, the congestion window size will be expanded, otherwise the congestion window size will be reduced. The size of the congestion window is usually adjusted by slow start, congestion avoidance, etc., but this congestion window regulation method will only trigger adjustment when congestion occurs. Therefore, the current congestion window regulation method has the problem of poor regulation effect. Summary of the invention

[0004] The present invention provides a HTCP transmission method, device and computer-readable storage medium for a portable communication device in a complex network environment, the main purpose of which is to solve the problem that the current congestion window control method will only trigger adjustment when congestion occurs, so the current congestion window control method has a poor control effect.

[0005] To achieve the above object, the present invention provides a HTCP transmission method for a portable communication device in a complex network environment, comprising:

[0006] Acquire multiple groups of test transmission frame sets, and sequentially extract test transmission frame sets from the multiple groups of test transmission frame sets, wherein the intra-frame time differences of the test transmission frames in the test transmission frame sets are the same, and the intra-frame time differences of the groups of test transmission frame sets are different;

[0007] Transmitting the test transmission frame set in a preset complex network environment according to the pre-constructed congestion window sequence, and evaluating the transmission effect of the test transmission frame set to obtain a transmission evaluation value of each congestion window in the congestion window sequence;

[0008] Obtaining a target congestion window value corresponding to the test transmission frame set according to the transmission evaluation value, identifying a test frame intra-time difference of the test transmission frame set, constructing a corresponding relationship between the target congestion window value and the test frame intra-time difference, and obtaining an intra-frame time difference-congestion window association table;

[0009] Acquire a single-frame data packet set, and identify the number of single-frame data packets in the single-frame data packet set;

[0010] Acquire the current intra-frame time difference of the single-frame data packet set, and query the current target congestion window value in the intra-frame time difference-congestion window association table according to the current intra-frame time difference;

[0011] The data reading speed of the HTCP receiving buffer is obtained, and the current window control duration is calculated using a pre-built window control duration formula according to the data reading speed and the number of single-frame data packets. The window control duration formula is as follows:

[0012]

[0013] Among them, t n Indicates the current window adjustment duration, S d Indicates the number of single-frame data packets, v d Indicates data reading speed;

[0014] Obtain the current dynamic sending window value of the current dynamic sending window, and calculate the current window control speed by using a pre-built window speed control formula according to the current dynamic sending window value, the current target congestion window value, and the current window control duration, wherein the window speed control formula is as follows:

[0015]

[0016] Among them, v t Indicates the current window control speed, l1 indicates the current dynamic sending window value, and l2 indicates the current target congestion window value;

[0017] Adjust the size of the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer;

[0018] Using a pre-built UDP protocol, a single-frame data packet of a current dynamic sending window in the dynamic HTCP sending buffer is sent to the HTCP receiving buffer to obtain a current HTCP receiving buffer;

[0019] The current HTCP receiving buffer is sent to the pre-built application layer to complete the HTCP transmission of the portable communication device in a complex network environment.

[0020] Optionally, the evaluating the transmission effect of the test transmission frame set to obtain a transmission evaluation value of each congestion window in the congestion window sequence includes:

[0021] Monitoring the transmission packet loss rate and transmission delay of the test transmission frame set to obtain the test transmission bandwidth;

[0022] The transmission evaluation value of each congestion window in the congestion window sequence is calculated using a pre-constructed transmission evaluation formula according to the transmission packet loss rate, transmission delay and test transmission bandwidth, wherein the transmission evaluation formula is as follows:

[0023]

[0024] Where p represents the transmission evaluation value, d represents the test transmission bandwidth, and t c represents the transmission delay, r loss represents the transmission packet loss rate, α represents the adjustment factor of the transmission delay, γ represents the power weight of the transmission delay, β represents the adjustment factor of the transmission packet loss rate, and δ represents the power weight of the transmission packet loss rate.

[0025] Optionally, the identifying the time difference within the test frame of the test transmission frame set includes:

[0026] Obtaining the frame rate of the test transmission frame set and the number of single-frame data packets of each test transmission frame;

[0027] According to the frame rate of the test transmission frame set and the number of single-frame data packets, the test frame intra-time difference is calculated using a pre-constructed frame intra-time difference formula, wherein the frame intra-time difference formula is as follows:

[0028]

[0029] Among them, t z represents the time difference within the test frame, f represents the frame rate of the test transmission frame set, S, d Indicates the number of single-frame data packets in the test transmission frame.

[0030] Optionally, before acquiring the single-frame data packet set, the method further includes:

[0031] Acquire media data in the application layer, place the media data at the end of a pre-constructed initial RTP sending queue, and obtain a target RTP sending queue;

[0032] Using a pre-built HTCP protocol to smooth the media data in the target RTP sending queue to obtain a smoothed media data frame set;

[0033] Extracting smoothed media data frames in sequence from the smoothed media data frame set, splitting and packaging the smoothed media data frames to obtain a smoothed single-frame data packet set;

[0034] Acquire a smoothed frame rate of the smoothed media data frame and the number of smoothed single-frame data packets of the smoothed single-frame data packet set;

[0035] Calculate the intra-frame time difference of the smoothed media data frame according to the smoothed frame rate and the number of smoothed single-frame data packets, sort each smoothed single-frame data packet in the smoothed single-frame data packet set, and obtain the intra-frame sequence number of the smoothed single-frame data packet;

[0036] Constructing an HTCP format data packet of the smoothed single-frame data packet according to the intra-frame time difference and the intra-frame sequence number of the smoothed media data frame;

[0037] The HTCP format data packets are sorted in the initial RTP sending queue according to the intra-frame sequence numbers of the smoothed media data frames to obtain a target HTCP sending queue.

[0038] Optionally, acquiring a single-frame data packet set includes:

[0039] Identify the frame sequence number and intra-frame sequence number of the last single-frame data packet at the end of the preset available window in the preset current dynamic sending window;

[0040] Determining whether the last single-frame data packet is a preset retransmission data packet;

[0041] If the last single-frame data packet is a retransmitted data packet, return to the step of identifying the frame sequence number and the intra-frame sequence number of the last single-frame data packet at the end of the preset available window in the preset current dynamic sending window;

[0042] If the last single-frame data packet is not a retransmitted data packet, obtaining the number of smoothed single-frame data packets of the smoothed media data frame where the last single-frame data packet is located according to the frame sequence number;

[0043] According to the number of smoothed single-frame data packets and the intra-frame sequence number, determining whether the last single-frame data packet is the last smoothed single-frame data packet in the smoothed single-frame data packet set where the last single-frame data packet is located;

[0044] If the last single-frame data packet is not the last smoothed single-frame data packet in the smoothed single-frame data packet set where the last single-frame data packet is located, return to the step of identifying the frame sequence number and the intra-frame sequence number of the last single-frame data packet at the end of the preset available window in the current dynamic sending window;

[0045] If the last single-frame data packet is the last smoothed single-frame data packet in the smoothed single-frame data packet set where the last single-frame data packet is located, single-frame data packet sets are sequentially extracted from the target HTCP sending queue, wherein the single-frame data packets in the single-frame data packet set are HTCP format data packets.

[0046] Optionally, adjusting the size of the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer includes:

[0047] Determine the size of the current dynamic sending window value and the current target congestion window value;

[0048] If the current dynamic sending window value is greater than the current target congestion window value, reducing the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer;

[0049] If the current dynamic sending window value is less than the current target congestion window value, increasing the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer;

[0050] If the current dynamic sending window value is equal to the current target congestion window value, a dynamic HTCP sending buffer is obtained by maintaining the current dynamic sending window unchanged.

[0051] Optionally, after adjusting the size of the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer, the method further includes:

[0052] Identifying a dynamic sending window value of a current dynamic sending window in the dynamic HTCP sending buffer;

[0053] According to the dynamic sending window value, a retransmission timeout value is set using a pre-built retransmission timeout adjustment formula, wherein the retransmission timeout adjustment formula is as follows:

[0054] t a =k×l d

[0055] Among them, t a represents the retransmission timeout value, k represents the retransmission timeout adjustment coefficient, l d Indicates the dynamic sending window value.

[0056] Optionally, before using the pre-built UDP protocol to send the single-frame data packet of the current dynamic sending window in the dynamic HTCP sending buffer to the HTCP receiving buffer, the method further includes:

[0057] Determine whether there is a preset request resend packet;

[0058] If there is a request to resend packet, count the number of the request to resend packets;

[0059] Determine whether the number of the request resend packets is greater than a preset request resend threshold;

[0060] If the number of the request resend packets is not greater than the request resend threshold, identifying the HTCP start sequence number and the HTCP end sequence number of the request resend packet;

[0061] Obtaining a set of HTCP sequence numbers to be retransmitted between the HTCP start sequence number and the HTCP end sequence number;

[0062] Acquire a retransmitted data packet set according to the to-be-retransmitted HTCP sequence number set;

[0063] Sending the retransmitted data packet set to the HTCP receiving buffer in priority;

[0064] If the number of the request retransmission packets is greater than the request retransmission threshold, a preset video dynamic frame loss mechanism is started, and a retransmission data packet set is obtained according to the request retransmission packets;

[0065] Sending the retransmitted data packet set to the HTCP receiving buffer in priority;

[0066] If there is no request to resend the packet, obtain the current expected sequence number, and determine whether there is a current jump sequence number that skips the current expected sequence number;

[0067] If there is a current jump sequence number that skips the current expected sequence number, obtaining a retransmitted data packet set according to the current expected sequence number and the current jump sequence number;

[0068] Sending the retransmitted data packet set to the HTCP receiving buffer in priority;

[0069] If there is no current jump sequence number that skips the current expected sequence number, the preset abnormal retransmission judgment is completed.

[0070] Optionally, sending the current HTCP receive buffer to a pre-built application layer includes:

[0071] Extracting single-frame data packet sets in sequence from the current HTCP receiving buffer;

[0072] Smoothing the single-frame data packet set to obtain an RTP receiving queue;

[0073] The RTP receive queue is sent to the application layer.

[0074] In order to solve the above problems, the present invention also provides a HTCP transmission device for a portable communication device in a complex network environment, the device comprising:

[0075] An intra-frame time difference-congestion window association table acquisition module is used to acquire multiple groups of test transmission frame sets, and sequentially extract test transmission frame sets from the multiple groups of test transmission frame sets, wherein the intra-frame time differences of each test transmission frame in the test transmission frame set are the same, and the intra-frame time differences of each group of test transmission frame sets are different; the test transmission frame set is transmitted in a preset complex network environment according to a pre-constructed congestion window sequence, and the transmission effect of the test transmission frame set is evaluated to obtain a transmission evaluation value of each congestion window in the congestion window sequence; according to the transmission evaluation value, a target congestion window value corresponding to the test transmission frame set is obtained, the test frame intra-time difference of the test transmission frame set is identified, and a corresponding relationship between the target congestion window value and the test frame intra-time difference is constructed to obtain an intra-frame time difference-congestion window association table;

[0076] A current target congestion window value query module is used to obtain a single-frame data packet set, identify the number of single-frame data packets in the single-frame data packet set; obtain the current intra-frame time difference of the single-frame data packet set, and query the current target congestion window value in the intra-frame time difference-congestion window association table according to the current intra-frame time difference;

[0077] The current dynamic sending window control module is used to obtain the data reading speed of the HTCP receiving cache, and calculate the current window control duration using a pre-built window control duration formula according to the data reading speed and the number of single-frame data packets. The window control duration formula is as follows:

[0078]

[0079] Among them, t n Indicates the current window adjustment duration, S d Indicates the number of single-frame data packets, v d Indicates the data reading speed; obtains the current dynamic sending window value of the current dynamic sending window, and calculates the current window control speed using a pre-built window speed control formula according to the current dynamic sending window value, the current target congestion window value and the current window control duration, wherein the window speed control formula is as follows:

[0080]

[0081] Among them, v trepresents the current window regulation speed, l1 represents the current dynamic sending window value, and l2 represents the current target congestion window value; the size of the current dynamic sending window is adjusted according to the current window regulation speed to obtain a dynamic HTCP sending buffer;

[0082] The HTCP buffer data sending module is used to send the single-frame data packet of the current dynamic sending window in the dynamic HTCP sending buffer to the HTCP receiving buffer by using the pre-built UDP protocol to obtain the current HTCP receiving buffer; and send the current HTCP receiving buffer to the pre-built application layer.

[0083] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0084] at least one processor; and,

[0085] a memory communicatively connected to the at least one processor; wherein,

[0086] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to implement the HTCP transmission method of the portable communication device in a complex network environment as described above.

[0087] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned HTCP transmission method of the portable communication device in a complex network environment.

[0088] Compared with the problem described in the background technology, since there is an optimal target congestion window value for each single-frame data packet set with a time difference in each current frame, the present invention first needs to test the target congestion window value of each type of single-frame data packet set. During the test, multiple groups of test transmission frame sets with different intra-frame time differences are first obtained, and test transmission frame sets are sequentially extracted from the multiple groups of test transmission frame sets. Then, the test transmission frame sets are transmitted in a complex network environment according to a pre-constructed congestion window sequence, and the transmission effect of the test transmission frame set is evaluated to obtain a transmission evaluation value of each congestion window in the congestion window sequence. The higher the value, the better the transmission effect. Therefore, the target congestion window value corresponding to the test transmission frame set can be obtained according to the transmission evaluation value. At this time, the time difference within the test frame of the test transmission frame set can be identified, and then the corresponding relationship between the target congestion window value and the time difference within the test frame can be constructed to obtain an intra-frame time difference-congestion window association table. The intra-frame time difference-congestion window association table can realize the function of querying the corresponding target congestion window value according to the intra-frame time difference. At this time, a single-frame data packet set needs to be transmitted, so it is necessary to first know the current target congestion window value of the single-frame data packet set, that is, to obtain the current Intra-frame time difference, and then query the current target congestion window value in the intra-frame time difference-congestion window association table according to the current intra-frame time difference. At this time, knowing the current target congestion window value can dynamically adjust the current dynamic sending window, and the adjustment needs to know the current window adjustment speed. The current window adjustment speed can be calculated according to the current window adjustment duration and the adjustment value. When calculating the current window adjustment duration, it is necessary to obtain the data reading speed of the HTCP receiving cache, and then according to the data reading speed and the number of single-frame data packets, the current window adjustment duration can be calculated using the window adjustment duration formula. At this time, the current window adjustment speed can be calculated according to the current dynamic sending window value, the current target congestion window value and the current window adjustment duration using the window speed adjustment formula. Finally, the size of the current dynamic sending window is adjusted according to the current window adjustment speed to obtain a dynamic HTCP sending cache. After obtaining the dynamic HTCP sending cache, the single-frame data packet of the current dynamic sending window in the dynamic HTCP sending cache can be sent to the HTCP receiving cache using the UDP protocol to obtain the current HTCP receiving cache, and then the current HTCP receiving cache is sent to the pre-built application layer. Therefore, the HTCP transmission method, device, electronic device and computer-readable storage medium of a portable communication device in a complex network environment proposed in the present invention mainly aim to solve the problem that the current congestion window control method will only trigger adjustment when congestion occurs, so the current congestion window control method has the problem of poor control effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] Figure 1A schematic diagram of a flow chart of an HTCP transmission method for a portable communication device in a complex network environment provided by an embodiment of the present invention;

[0090] Figure 2 A schematic diagram of a video packet of an HTCP transmission method of a portable communication device in a complex network environment provided by an embodiment of the present invention;

[0091] Figure 3 A schematic diagram of an audio packet of an HTCP transmission method of a portable communication device in a complex network environment provided by an embodiment of the present invention;

[0092] Figure 4 A schematic diagram of a receiving confirmation packet of an HTCP transmission method in a complex network environment provided by a portable communication device according to an embodiment of the present invention;

[0093] Figure 5 A schematic diagram of a request retransmission packet of an HTCP transmission method of a portable communication device in a complex network environment provided by an embodiment of the present invention;

[0094] Figure 6 A schematic diagram of a transmission process of an HTCP transmission method for a portable communication device in a complex network environment provided by an embodiment of the present invention;

[0095] Figure 7 A functional module diagram of an HTCP transmission device of a portable communication device in a complex network environment provided by an embodiment of the present invention;

[0096] Figure 8 A schematic diagram of the structure of an electronic device for implementing the HTCP transmission method of the portable communication device in a complex network environment provided by an embodiment of the present invention.

[0097] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0098] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0099] The embodiment of the present application provides a HTCP transmission method for a portable communication device in a complex network environment. The execution subject of the HTCP transmission method for a portable communication device in a complex network environment includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the HTCP transmission method for a portable communication device in a complex network environment can be executed by software or hardware installed in a terminal device or a server device. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0100] Embodiment 1:

[0101] Reference Figure 1 FIG. 1 is a flow chart of a HTCP transmission method for a portable communication device in a complex network environment provided by an embodiment of the present invention. In this embodiment, the HTCP transmission method for a portable communication device in a complex network environment includes:

[0102] S1. Acquire multiple groups of test transmission frame sets, and sequentially extract test transmission frame sets from the multiple groups of test transmission frame sets, wherein the intra-frame time differences of the test transmission frames in the test transmission frame sets are the same, and the intra-frame time differences of the groups of test transmission frame sets are different.

[0103] In the embodiment of the present invention, the multiple test transmission frame sets refer to multiple sets of media data frames used for testing. To facilitate testing, the intra-frame time difference of each test transmission frame set needs to change in a gradient. For example, there are multiple test videos, each of which is composed of a set of test transmission frames with the same intra-frame time difference. The intra-frame time difference of the test transmission frames in each test video can be 1ms, 5ms, 10ms, 15ms, 20ms, etc.

[0104] S2. Transmit the test transmission frame set in a preset complex network environment according to the pre-constructed congestion window sequence, and evaluate the transmission effect of the test transmission frame set to obtain a transmission evaluation value of each congestion window in the congestion window sequence.

[0105] It is understandable that the congestion window (CWND) sequence refers to a sequence of congestion windows of different sizes. For example, the congestion window sequence may be a congestion window of 1 segment, a congestion window of 5 segments, a congestion window of 10 segments, a congestion window of 15 segments, a congestion window of 20 segments, etc.

[0106] In the embodiment of the present invention, the evaluating the transmission effect of the test transmission frame set to obtain the transmission evaluation value of each congestion window in the congestion window sequence includes:

[0107] Monitoring the transmission packet loss rate and transmission delay of the test transmission frame set to obtain the test transmission bandwidth;

[0108] The transmission evaluation value of each congestion window in the congestion window sequence is calculated using a pre-constructed transmission evaluation formula according to the transmission packet loss rate, transmission delay and test transmission bandwidth, wherein the transmission evaluation formula is as follows:

[0109]

[0110] Where p represents the transmission evaluation value, d represents the test transmission bandwidth, and tc represents the transmission delay, r loss represents the transmission packet loss rate, α represents the adjustment factor of the transmission delay, γ represents the power weight of the transmission delay, β represents the adjustment factor of the transmission packet loss rate, and δ represents the power weight of the transmission packet loss rate.

[0111] Furthermore, the adjustment factors and power weights of different types of test transmission frame sets are different. The adjustment factor and power weight of the transmission delay of the test transmission frame set with high real-time requirements should be improved. For the test transmission frame set with higher data transmission accuracy, the adjustment factor and power weight of the transmission packet loss rate can be increased.

[0112] It should be understood that by testing the transmission effects of test transmission frame sets with different intra-frame time differences under different congestion windows, the optimal congestion window of the test transmission frame set with each intra-frame time difference can be obtained.

[0113] S3. Obtain a target congestion window value corresponding to the test transmission frame set according to the transmission evaluation value, identify the intra-test frame time difference of the test transmission frame set, construct a corresponding relationship between the target congestion window value and the intra-test frame time difference, and obtain an intra-frame time difference-congestion window association table.

[0114] It can be explained that the target congestion window value refers to the number of message segments in the congestion window corresponding to the maximum transmission evaluation value.

[0115] In the embodiment of the present invention, the step of identifying the time difference within the test frame of the test transmission frame set includes:

[0116] Obtaining the frame rate of the test transmission frame set and the number of single-frame data packets of each test transmission frame;

[0117] According to the frame rate of the test transmission frame set and the number of single-frame data packets, the test frame intra-time difference is calculated using a pre-constructed frame intra-time difference formula, wherein the frame intra-time difference formula is as follows:

[0118]

[0119] Among them, t z represents the time difference within the test frame, f represents the frame rate of the test transmission frame set, S' d Indicates the number of single-frame data packets in the test transmission frame.

[0120] It is understandable that the intra-frame time difference refers to the time difference between different objects or areas in the same video frame, that is, the time interval between single-frame data packets in the test transmission frame. For example, when the frame rate of the test transmission frame set is 1 / 30, that is, the duration of a single test transmission frame is 1 / 30, if the number of single-frame data packets is 10, the intra-frame time difference is 1 / 300. The number of single-frame data packets refers to the number of data packets into which the test transmission frame is divided. When performing data transmission, it is generally necessary to divide the test transmission frame into multiple data packets.

[0121] S4. Acquire a single-frame data packet set, and identify the number of single-frame data packets in the single-frame data packet set.

[0122] It can be understood that the single-frame data packet set refers to a data packet set of a media data frame to be sent, and the data packets of the media data frame have not yet been sent to the pre-built HTCP sending buffer. The HTCP sending buffer refers to a buffer space for storing HTCP format data packets to be sent, and the HTCP sending buffer includes a first part (data packets that have been sent and received ACK confirmation), a second part (data packets that have been sent but have not received ACK confirmation), a third part (data packets that have not been sent but are within the processing range of the HTCP receiving buffer), and a fourth part (data packets that have not been sent and are outside the processing range of the HTCP receiving buffer), wherein the second part and the third part constitute the sending window of the HTCP sending buffer.

[0123] Further, the single frame data packet can refer to Figure 7 , Figure 8 As shown. The single-frame data packet can be a video packet or an audio packet, wherein the HTCP sequence number is used to determine whether the packet is lost, the frame type is used to distinguish between I frames and P frames, the frame mark is used to mark whether the frame ends, and the intra-frame sequence number is used to determine whether the packet is lost in the frame and to discard the P frame. The intra-frame time difference needs to first calculate the duration of each frame through the frame rate, then calculate the frame rate, and finally calculate the time interval difference of each HTCP format data packet in a media data frame according to the number of single-frame data packets and the frame rate, that is, the intra-frame time difference, for smoothing processing.

[0124] In the embodiment of the present invention, before obtaining the single-frame data packet set, the method further includes:

[0125] Acquire media data in the application layer, place the media data at the end of a pre-constructed initial RTP sending queue, and obtain a target RTP sending queue;

[0126] Using a pre-built HTCP protocol to smooth the media data in the target RTP sending queue to obtain a smoothed media data frame set;

[0127] Extracting smoothed media data frames in sequence from the smoothed media data frame set, splitting and packaging the smoothed media data frames to obtain a smoothed single-frame data packet set;

[0128] Acquire a smoothed frame rate of the smoothed media data frame and the number of smoothed single-frame data packets of the smoothed single-frame data packet set;

[0129] Calculate the intra-frame time difference of the smoothed media data frame according to the smoothed frame rate and the number of smoothed single-frame data packets, sort each smoothed single-frame data packet in the smoothed single-frame data packet set, and obtain the intra-frame sequence number of the smoothed single-frame data packet;

[0130] Constructing an HTCP format data packet of the smoothed single-frame data packet according to the intra-frame time difference and the intra-frame sequence number of the smoothed media data frame;

[0131] The HTCP format data packets are sorted in the initial RTP sending queue according to the intra-frame sequence numbers of the smoothed media data frames to obtain a target HTCP sending queue.

[0132] Furthermore, the initial RTP sending queue refers to the RTP priority queue before the media data is obtained. The RTP priority queue is a queue technology that solves the service quality of real-time services (including voice and video services). Its principle is to send the RTP message carrying voice or video into a high priority queue so that it can be sent first, ensuring that the delay and jitter are reduced to a minimum, thereby ensuring the service quality of delay-sensitive services such as voice or video.

[0133] It should be understood that see Figure 6 As shown in the figure, when the application layer sends media data, it does not send it directly through UDP, but throws the media data to the end of the RTP send queue and waits for HTCP to process it. HTCP analyzes the media data in the RTP send queue, smoothes the video data packets, especially the I-frame data, and generates the HTCP intra-frame sequence number and intra-frame time difference according to the frame rate and the number of single-frame data packets. At this time, it is necessary to obtain the media data from the head of the RTP send queue and package the media data according to the UTCP protocol format, and then form HTCP format data and throw it to the HTCP send buffer to wait for UDP to send.

[0134] In the embodiment of the present invention, the step of obtaining a single-frame data packet set includes:

[0135] Identify the frame sequence number and intra-frame sequence number of the last single-frame data packet at the end of the preset available window in the preset current dynamic sending window;

[0136] Determining whether the last single-frame data packet is a preset retransmission data packet;

[0137] If the last single-frame data packet is a retransmitted data packet, return to the step of identifying the frame sequence number and the intra-frame sequence number of the last single-frame data packet at the end of the preset available window in the preset current dynamic sending window;

[0138] If the last single-frame data packet is not a retransmitted data packet, obtaining the number of smoothed single-frame data packets of the smoothed media data frame where the last single-frame data packet is located according to the frame sequence number;

[0139] According to the number of smoothed single-frame data packets and the intra-frame sequence number, determining whether the last single-frame data packet is the last smoothed single-frame data packet in the smoothed single-frame data packet set where the last single-frame data packet is located;

[0140] If the last single-frame data packet is not the last smoothed single-frame data packet in the smoothed single-frame data packet set where the last single-frame data packet is located, return to the step of identifying the frame sequence number and the intra-frame sequence number of the last single-frame data packet at the end of the preset available window in the current dynamic sending window;

[0141] If the last single-frame data packet is the last smoothed single-frame data packet in the smoothed single-frame data packet set where the last single-frame data packet is located, single-frame data packet sets are sequentially extracted from the target HTCP sending queue, wherein the single-frame data packets in the single-frame data packet set are HTCP format data packets.

[0142] It can be understood that the current dynamic sending window refers to the current sending window in the HTCP sending buffer. The last bit of the available window refers to the last segment in the current dynamic sending window. The frame sequence number refers to the frame sequence number of the media data frame where the last single-frame data packet is located. A video can be composed of multiple media data frames. The frame sequence number of the first media data frame can be 001, the frame sequence number of the second media data frame can be 002, and so on. The intra-frame sequence number refers to the sequence number of the last single-frame data packet in the corresponding media data frame.

[0143] Furthermore, when sending a single-frame data packet of a media data frame, there may be a set of single-frame data packets that need to be retransmitted. At this time, the single-frame data packet immediately following the single-frame data packet set may not be continuous with the set of single-frame data packets that need to be retransmitted, and the data packet connected to the single-frame data packet that needs to be retransmitted does not need to be retransmitted. Therefore, the last single-frame data packet cannot be a single-frame data packet that needs to be retransmitted.

[0144] It should be understood that if the number of smoothed single-frame data packets is equal to the intra-frame sequence number, the last single-frame data packet is the last smoothed single-frame data packet in the smoothed single-frame data packet set where the last single-frame data packet is located. This indicates that part of the media data corresponding to the previous frame of the single-frame data packet set has been sent, and the other part is completely in the current dynamic sending window and is being sent, so the single-frame data packet set can start to be transmitted to the current dynamic sending window of the HTCP sending buffer.

[0145] S5. Obtain the current intra-frame time difference of the single-frame data packet set, and query the current target congestion window value in the intra-frame time difference-congestion window association table according to the current intra-frame time difference.

[0146] Furthermore, after knowing the current intra-frame time difference of the single-frame data packet set, the optimal current target congestion window value can be queried in the intra-frame time difference-congestion window association table according to the current intra-frame time difference. According to the current target congestion window value, the optimal current dynamic sending window of the single-frame data packet contains the number of segments. Therefore, when the single-frame data packet starts to be transmitted, the current dynamic sending window can be adjusted according to the current target congestion window value until the single-frame data packet set corresponding to the next frame of media data of the single-frame data packet set starts to be sent, and then adjusted to the current target congestion window value. At this time, the adjustment is stopped, and the current dynamic sending window is adjusted according to the optimal target congestion window value corresponding to the next frame of media data.

[0147] S6. Obtain the data reading speed of the HTCP receiving buffer, and calculate the current window control duration using a pre-built window control duration formula according to the data reading speed and the number of single-frame data packets.

[0148] It can be understood that the current window regulation duration is expressed as the duration of the single-frame data packet set adjusting the current dynamic sending window. When the current window regulation duration is reached, the number of segments contained in the current dynamic sending window is exactly equal to the current target congestion window value. At this time, it is necessary to start the next stage of dynamic sending window adjustment of the single-frame data packet.

[0149] In detail, the window adjustment duration formula is as follows:

[0150]

[0151] Among them, t n Indicates the current window adjustment duration, S d Indicates the number of single-frame data packets, v d Indicates the data reading speed.

[0152] S7. Obtain a current dynamic sending window value of the current dynamic sending window, and calculate the current window regulation speed using a pre-built window speed regulation formula according to the current dynamic sending window value, the current target congestion window value, and the current window regulation duration.

[0153] In detail, the window speed control formula is as follows:

[0154]

[0155] Among them, v t Indicates the current window control speed, l1 indicates the current dynamic sending window value, and l2 indicates the current target congestion window value.

[0156] It can be explained that the current window control speed may not be an integer. Therefore, when the current window control speed is not an integer, it can be rounded. For example, when the current window adjustment speed is 0.6 segments / s, and the initial value of the current dynamic sending window is 10 segments, then the adjusted current dynamic sending window value of the 1st second is 10.6 segments (10 segments are taken), the current dynamic sending window value of the 2nd second is 11.2 segments (11 segments are taken), and the current dynamic sending window value of the 4th second is 12.4 segments (12 segments are taken), and so on.

[0157] S8. Adjust the size of the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer.

[0158] It can be explained that the dynamic HTCP sending buffer refers to the HTCP sending buffer whose sending window is the current dynamic sending window.

[0159] In the embodiment of the present invention, the adjusting the size of the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer includes:

[0160] Determine the size of the current dynamic sending window value and the current target congestion window value;

[0161] If the current dynamic sending window value is greater than the current target congestion window value, reducing the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer;

[0162] If the current dynamic sending window value is less than the current target congestion window value, increasing the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer;

[0163] If the current dynamic sending window value is equal to the current target congestion window value, a dynamic HTCP sending buffer is obtained by maintaining the current dynamic sending window unchanged.

[0164] In the embodiment of the present invention, after adjusting the size of the current dynamic sending window according to the current window regulation speed to obtain the dynamic HTCP sending buffer, the method further includes:

[0165] Identifying a dynamic sending window value of a current dynamic sending window in the dynamic HTCP sending buffer;

[0166] According to the dynamic sending window value, a retransmission timeout value is set using a pre-built retransmission timeout adjustment formula, wherein the retransmission timeout adjustment formula is as follows:

[0167] t a =k×l d

[0168] Among them, t a represents the retransmission timeout value, k represents the retransmission timeout adjustment coefficient, l d Indicates the dynamic sending window value.

[0169] It is understandable that the dynamic sending window value in the HTCP sending buffer should be associated with the retransmission timeout value. The larger the dynamic sending window value in the HTCP sending buffer, the larger the retransmission timeout value.

[0170] S9. Use a pre-built UDP protocol to send a single-frame data packet of a current dynamic sending window in the dynamic HTCP sending buffer to the HTCP receiving buffer to obtain a current HTCP receiving buffer.

[0171] It is understandable that the UDP (User Datagram Protocol) protocol is a message-oriented transport layer protocol. Although UDP provides integrity verification of the header and payload (through checksum), it does not guarantee message delivery to upper layer protocols.

[0172] Further, the sending process of the single-frame data packet can refer to Figure 6 shown.

[0173] In the embodiment of the present invention, before the single-frame data packet of the current dynamic sending window in the dynamic HTCP sending buffer is sent to the HTCP receiving buffer by using the pre-built UDP protocol, the method further includes:

[0174] Determine whether there is a preset request resend packet;

[0175] If there is a request to resend packet, count the number of the request to resend packets;

[0176] Determine whether the number of the request resend packets is greater than a preset request resend threshold;

[0177] If the number of the request resend packets is not greater than the request resend threshold, identifying the HTCP start sequence number and the HTCP end sequence number of the request resend packet;

[0178] Obtaining a set of HTCP sequence numbers to be retransmitted between the HTCP start sequence number and the HTCP end sequence number;

[0179] Acquire a retransmitted data packet set according to the to-be-retransmitted HTCP sequence number set;

[0180] Sending the retransmitted data packet set to the HTCP receiving buffer in priority;

[0181] If the number of the request retransmission packets is greater than the request retransmission threshold, a preset video dynamic frame loss mechanism is started, and a retransmission data packet set is obtained according to the request retransmission packets;

[0182] Sending the retransmitted data packet set to the HTCP receiving buffer in priority;

[0183] If there is no request to resend the packet, obtain the current expected sequence number, and determine whether there is a current jump sequence number that skips the current expected sequence number;

[0184] If there is a current jump sequence number that skips the current expected sequence number, obtaining a retransmitted data packet set according to the current expected sequence number and the current jump sequence number;

[0185] Sending the retransmitted data packet set to the HTCP receiving buffer in priority;

[0186] If there is no current jump sequence number that skips the current expected sequence number, the preset abnormal retransmission judgment is completed.

[0187] For details, see Figure 6 As shown in the figure, if the data requested for retransmission by the other party is identified, it needs to be directly thrown to UDP for transmission. The request retransmission packet and the reception confirmation (ACK) packet also have independent HTCP sequence numbers. When the sender of the HTCP send buffer finds that the request retransmission packet or the reception confirmation packet sent by the receiver of the HTCP receive buffer has packet loss, or the request retransmission packet exceeds a certain threshold, HTCP will start the video dynamic frame loss mechanism and clear the multiple P frame data packets requested for retransmission from the HTCP send buffer and the HTCP receive buffer to reduce network pressure. When the sequence number of the data confirmation packet received by the sender skips the expected sequence number at this time and accumulates for multiple times (the number can be set), HTCP believes that packet loss has occurred. Without waiting for timeout, the sender directly sends the skipped sequence number packet, thereby improving the transmission speed when packet loss occurs.

[0188] Further, see Figure 6 As shown, after UDP receives HTCP format data, it first determines whether the received HTCP format data is normal. If the HTCP format data is normal, the HTCP format data is directly inserted into the HTCP receiving buffer according to the HTCP sequence number. Within a certain time window, a confirmation message is formed and thrown into the confirmation queue to notify the sender that the data has been received. Multiple data packets between the HTCP sequence number and a previous HTCP sequence number (such as Figure 6 If the HTCP sequence number of the data is not the expected sequence number (if it is a video packet, it is also manifested as an abnormality between the sequence number and the time difference within the HTCP frame), it means that packet loss or disorder occurs. If the data packet with the sequence number is not received within the receiving window period (reaching the retransmission timeout value), the HTCP sequence number packet is considered lost and the HTCP sequence number of the lost data packet is notified to the sender, requesting the data packet to be resent (such as Figure 6 Request to resend the data packet (indicated by the arrow line).

[0189] Further, the reception confirmation packet can refer to Figure 4 As shown, the request resend packet can refer to Figure 5 As shown in the figure, the ACK sequence number and REQ sequence number are the HTCP sequence numbers of the received confirmation packet and the request retransmission packet respectively. The HTCP start sequence number and HTCP end sequence number indicate that all the data packets between the start sequence number and the end sequence number have been received or the data packets between them need to be resent.

[0190] S10: Send the current HTCP receiving buffer to the pre-built application layer to complete the HTCP transmission of the portable communication device in a complex network environment.

[0191] It is understandable that the sending process of the current HTCP receiving buffer can be referred to Figure 6 shown.

[0192] In the embodiment of the present invention, the sending of the current HTCP receiving buffer to the pre-built application layer includes:

[0193] Extracting single-frame data packet sets in sequence from the current HTCP receiving buffer;

[0194] Smoothing the single-frame data packet set to obtain an RTP receiving queue;

[0195] The RTP receive queue is sent to the application layer.

[0196] It is understandable that after taking data out from the HCTP receiving buffer, the video data also needs to be smoothed. The smoothing process mainly readjusts the time difference within the frame to facilitate the RTP receiving queue to smoothly send data to the upper layer application.

[0197] Compared with the problem described in the background technology, since there is an optimal target congestion window value for each single-frame data packet set with a time difference in each current frame, the present invention first needs to test the target congestion window value of each type of single-frame data packet set. During the test, multiple groups of test transmission frame sets with different intra-frame time differences are first obtained, and test transmission frame sets are sequentially extracted from the multiple groups of test transmission frame sets. Then, the test transmission frame sets are transmitted in a complex network environment according to a pre-constructed congestion window sequence, and the transmission effect of the test transmission frame set is evaluated to obtain a transmission evaluation value of each congestion window in the congestion window sequence. The higher the value, the better the transmission effect. Therefore, the target congestion window value corresponding to the test transmission frame set can be obtained according to the transmission evaluation value. At this time, the time difference within the test frame of the test transmission frame set can be identified, and then the corresponding relationship between the target congestion window value and the time difference within the test frame can be constructed to obtain an intra-frame time difference-congestion window association table. The intra-frame time difference-congestion window association table can realize the function of querying the corresponding target congestion window value according to the intra-frame time difference. At this time, a single-frame data packet set needs to be transmitted, so it is necessary to first know the current target congestion window value of the single-frame data packet set, that is, to obtain the current Intra-frame time difference, and then query the current target congestion window value in the intra-frame time difference-congestion window association table according to the current intra-frame time difference. At this time, knowing the current target congestion window value can dynamically adjust the current dynamic sending window, and the adjustment needs to know the current window adjustment speed. The current window adjustment speed can be calculated according to the current window adjustment duration and the adjustment value. When calculating the current window adjustment duration, it is necessary to obtain the data reading speed of the HTCP receiving cache, and then according to the data reading speed and the number of single-frame data packets, the current window adjustment duration can be calculated using the window adjustment duration formula. At this time, the current window adjustment speed can be calculated according to the current dynamic sending window value, the current target congestion window value and the current window adjustment duration using the window speed adjustment formula. Finally, the size of the current dynamic sending window is adjusted according to the current window adjustment speed to obtain a dynamic HTCP sending cache. After obtaining the dynamic HTCP sending cache, the single-frame data packet of the current dynamic sending window in the dynamic HTCP sending cache can be sent to the HTCP receiving cache using the UDP protocol to obtain the current HTCP receiving cache, and then the current HTCP receiving cache is sent to the pre-built application layer. Therefore, the HTCP transmission method, device, electronic device and computer-readable storage medium of a portable communication device in a complex network environment proposed in the present invention mainly aim to solve the problem that the current congestion window control method will only trigger adjustment when congestion occurs, so the current congestion window control method has the problem of poor control effect.

[0198] Embodiment 2:

[0199] like Figure 71 is a functional module diagram of an HTCP transmission device of a portable communication device in a complex network environment provided by an embodiment of the present invention.

[0200] The HTCP transmission device 100 of the portable communication device in a complex network environment of the present invention can be installed in an electronic device. According to the functions implemented, the HTCP transmission device 100 of the portable communication device in a complex network environment can include an intra-frame time difference-congestion window association table acquisition module 101, a current target congestion window value query module 102, a current dynamic sending window control module 103 and a module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0201] The intra-frame time difference-congestion window association table acquisition module 101 is used to acquire multiple groups of test transmission frame sets, and sequentially extract test transmission frame sets from the multiple groups of test transmission frame sets, wherein the intra-frame time differences of each test transmission frame in the test transmission frame set are the same, and the intra-frame time differences of each group of test transmission frame sets are different; the test transmission frame set is transmitted in a preset complex network environment according to a pre-constructed congestion window sequence, and the transmission effect of the test transmission frame set is evaluated to obtain a transmission evaluation value of each congestion window in the congestion window sequence; according to the transmission evaluation value, a target congestion window value corresponding to the test transmission frame set is obtained, the test frame intra-time difference of the test transmission frame set is identified, and a corresponding relationship between the target congestion window value and the test frame intra-time difference is constructed to obtain an intra-frame time difference-congestion window association table;

[0202] The current target congestion window value query module 102 is used to obtain a single-frame data packet set, identify the number of single-frame data packets in the single-frame data packet set; obtain the current intra-frame time difference of the single-frame data packet set, and query the current target congestion window value in the intra-frame time difference-congestion window association table according to the current intra-frame time difference;

[0203] The current dynamic sending window control module 103 is used to obtain the data reading speed of the HTCP receiving buffer, and calculate the current window control duration according to the data reading speed and the number of single-frame data packets using a pre-built window control duration formula. The window control duration formula is as follows:

[0204]

[0205] Among them, t n Indicates the current window adjustment duration, S d Indicates the number of single-frame data packets, v dIndicates the data reading speed; obtains the current dynamic sending window value of the current dynamic sending window, and calculates the current window control speed using a pre-built window speed control formula according to the current dynamic sending window value, the current target congestion window value and the current window control duration, wherein the window speed control formula is as follows:

[0206]

[0207] Among them, v t represents the current window regulation speed, l1 represents the current dynamic sending window value, and l2 represents the current target congestion window value; the size of the current dynamic sending window is adjusted according to the current window regulation speed to obtain a dynamic HTCP sending buffer;

[0208] The HTCP buffer data sending module 104 is used to send the single-frame data packet of the current dynamic sending window in the dynamic HTCP sending buffer to the HTCP receiving buffer by using the pre-built UDP protocol to obtain the current HTCP receiving buffer; and send the current HTCP receiving buffer to the pre-built application layer.

[0209] In detail, the modules in the HTCP transmission device 100 of the portable communication device in the complex network environment of the embodiment of the present invention are used in the same manner as described above. Figure 1 The portable communication device described in the HTCP transmission method in a complex network environment has the same technical means and can produce the same technical effects, which will not be repeated here.

[0210] Embodiment 3:

[0211] like Figure 8 , which is a schematic diagram of the structure of an electronic device for implementing an HTCP transmission method of a portable communication device in a complex network environment provided by an embodiment of the present invention.

[0212] The electronic device 1 may include a processor 10, a memory 11, a bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an HTCP transmission program for a portable communication device in a complex network environment.

[0213] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the HTCP transmission program of the portable communication device in a complex network environment, but also be used to temporarily store data that has been output or is to be output.

[0214] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, and executes or executes the programs or modules stored in the memory 11 (such as the HTCP transmission program of the portable communication device in a complex network environment, etc.), and calls the data stored in the memory 11 to execute various functions of the electronic device 1 and process data.

[0215] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0216] Figure 8 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 8The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0217] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0218] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0219] Optionally, the electronic device 1 may further include a user interface, which may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0220] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0221] The HTCP transmission program of the portable communication device in a complex network environment stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0222] Acquire multiple groups of test transmission frame sets, and sequentially extract test transmission frame sets from the multiple groups of test transmission frame sets, wherein the intra-frame time differences of the test transmission frames in the test transmission frame sets are the same, and the intra-frame time differences of the groups of test transmission frame sets are different;

[0223] Transmitting the test transmission frame set in a preset complex network environment according to the pre-constructed congestion window sequence, and evaluating the transmission effect of the test transmission frame set to obtain a transmission evaluation value of each congestion window in the congestion window sequence;

[0224] Obtaining a target congestion window value corresponding to the test transmission frame set according to the transmission evaluation value, identifying a test frame intra-time difference of the test transmission frame set, constructing a corresponding relationship between the target congestion window value and the test frame intra-time difference, and obtaining an intra-frame time difference-congestion window association table;

[0225] Acquire a single-frame data packet set, and identify the number of single-frame data packets in the single-frame data packet set;

[0226] Acquire the current intra-frame time difference of the single-frame data packet set, and query the current target congestion window value in the intra-frame time difference-congestion window association table according to the current intra-frame time difference;

[0227] The data reading speed of the HTCP receiving buffer is obtained, and the current window control duration is calculated using a pre-built window control duration formula according to the data reading speed and the number of single-frame data packets. The window control duration formula is as follows:

[0228]

[0229] Among them, t n Indicates the current window adjustment duration, S d Indicates the number of single-frame data packets, v d Indicates data reading speed;

[0230] Obtain the current dynamic sending window value of the current dynamic sending window, and calculate the current window control speed by using a pre-built window speed control formula according to the current dynamic sending window value, the current target congestion window value, and the current window control duration, wherein the window speed control formula is as follows:

[0231]

[0232] Among them, v t Indicates the current window control speed, l1 indicates the current dynamic sending window value, and l2 indicates the current target congestion window value;

[0233] Adjust the size of the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer;

[0234] Using a pre-built UDP protocol, a single-frame data packet of a current dynamic sending window in the dynamic HTCP sending buffer is sent to the HTCP receiving buffer to obtain a current HTCP receiving buffer;

[0235] The current HTCP receiving buffer is sent to the pre-built application layer to complete the HTCP transmission of the portable communication device in a complex network environment.

[0236] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 7 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0237] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0238] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0239] Acquire multiple groups of test transmission frame sets, and sequentially extract test transmission frame sets from the multiple groups of test transmission frame sets, wherein the intra-frame time differences of the test transmission frames in the test transmission frame sets are the same, and the intra-frame time differences of the groups of test transmission frame sets are different;

[0240] Transmitting the test transmission frame set in a preset complex network environment according to the pre-constructed congestion window sequence, and evaluating the transmission effect of the test transmission frame set to obtain a transmission evaluation value of each congestion window in the congestion window sequence;

[0241] Obtaining a target congestion window value corresponding to the test transmission frame set according to the transmission evaluation value, identifying a test frame intra-time difference of the test transmission frame set, constructing a corresponding relationship between the target congestion window value and the test frame intra-time difference, and obtaining an intra-frame time difference-congestion window association table;

[0242] Acquire a single-frame data packet set, and identify the number of single-frame data packets in the single-frame data packet set;

[0243] Acquire the current intra-frame time difference of the single-frame data packet set, and query the current target congestion window value in the intra-frame time difference-congestion window association table according to the current intra-frame time difference;

[0244] The data reading speed of the HTCP receiving buffer is obtained, and the current window control duration is calculated using a pre-built window control duration formula according to the data reading speed and the number of single-frame data packets. The window control duration formula is as follows:

[0245]

[0246] Among them, t n Indicates the current window adjustment duration, S d Indicates the number of single-frame data packets, v d Indicates data reading speed;

[0247] Obtain the current dynamic sending window value of the current dynamic sending window, and calculate the current window control speed by using a pre-built window speed control formula according to the current dynamic sending window value, the current target congestion window value, and the current window control duration, wherein the window speed control formula is as follows:

[0248]

[0249] Among them, v t Indicates the current window control speed, l1 indicates the current dynamic sending window value, and l2 indicates the current target congestion window value;

[0250] Adjust the size of the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer;

[0251] Using a pre-built UDP protocol, a single-frame data packet of a current dynamic sending window in the dynamic HTCP sending buffer is sent to the HTCP receiving buffer to obtain a current HTCP receiving buffer;

[0252] The current HTCP receiving buffer is sent to the pre-built application layer to complete the HTCP transmission of the portable communication device in a complex network environment.

[0253] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0254] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0255] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0256] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A HTCP transmission method for a portable communication device in a complex network environment, characterized in that: The method comprises: Acquire multiple groups of test transmission frame sets, and extract test transmission frame sets in sequence from the multiple groups of test transmission frame sets, wherein the intra-frame time difference of each test transmission frame in the test transmission frame set is the same, and the intra-frame time difference of each group of test transmission frame sets is different; the intra-frame time difference refers to the time difference between different objects or areas in the same video frame, that is, the time interval between single-frame data packets in the test transmission frame; Transmitting the test transmission frame set in a preset complex network environment according to the pre-constructed congestion window sequence, and evaluating the transmission effect of the test transmission frame set to obtain a transmission evaluation value of each congestion window in the congestion window sequence; Obtaining a target congestion window value corresponding to the test transmission frame set according to the transmission evaluation value, identifying a test frame intra-time difference of the test transmission frame set, constructing a corresponding relationship between the target congestion window value and the test frame intra-time difference, and obtaining an intra-frame time difference-congestion window association table; Acquire a single-frame data packet set, and identify the number of single-frame data packets in the single-frame data packet set; Acquire the current intra-frame time difference of the single-frame data packet set, and query the current target congestion window value in the intra-frame time difference-congestion window association table according to the current intra-frame time difference; The data reading speed of the HTCP receiving cache is obtained. HTCP refers to the Hypertext Cache Protocol. According to the data reading speed and the number of single-frame data packets, the current window control duration is calculated using a pre-built window control duration formula. The window control duration formula is as follows: Among them, t n Indicates the current window adjustment duration, S d Indicates the number of single-frame data packets, v d Indicates data reading speed; Obtain the current dynamic sending window value of the current dynamic sending window, and calculate the current window control speed by using a pre-built window speed control formula according to the current dynamic sending window value, the current target congestion window value, and the current window control duration, wherein the window speed control formula is as follows: Among them, v t Indicates the current window control speed, l1 indicates the current dynamic sending window value, and l2 indicates the current target congestion window value; Adjust the size of the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer; Using a pre-built UDP protocol, a single-frame data packet of a current dynamic sending window in the dynamic HTCP sending buffer is sent to the HTCP receiving buffer to obtain a current HTCP receiving buffer; The current HTCP receiving buffer is sent to the pre-built application layer to complete the HTCP transmission of the portable communication device in a complex network environment.

2. The HTCP transmission method of a portable communication device in a complex network environment as claimed in claim 1, characterized in that: The step of evaluating the transmission effect of the test transmission frame set to obtain a transmission evaluation value of each congestion window in the congestion window sequence includes: Monitoring the transmission packet loss rate and transmission delay of the test transmission frame set to obtain the test transmission bandwidth; The transmission evaluation value of each congestion window in the congestion window sequence is calculated using a pre-constructed transmission evaluation formula according to the transmission packet loss rate, transmission delay and test transmission bandwidth, wherein the transmission evaluation formula is as follows: Where p represents the transmission evaluation value, d represents the test transmission bandwidth, and t c represents the transmission delay, r loss represents the transmission packet loss rate, α represents the adjustment factor of the transmission delay, γ represents the power weight of the transmission delay, β represents the adjustment factor of the transmission packet loss rate, and δ represents the power weight of the transmission packet loss rate.

3. The HTCP transmission method of a portable communication device in a complex network environment as claimed in claim 1, characterized in that: The identifying the time difference within the test frame of the test transmission frame set comprises: Obtaining the frame rate of the test transmission frame set and the number of single-frame data packets of each test transmission frame; According to the frame rate of the test transmission frame set and the number of single-frame data packets, the test frame intra-time difference is calculated using a pre-constructed frame intra-time difference formula, wherein the frame intra-time difference formula is as follows: Among them, t z represents the time difference within the test frame, f represents the frame rate of the test transmission frame set, S' d Indicates the number of single-frame data packets in the test transmission frame.

4. The HTCP transmission method of a portable communication device in a complex network environment as claimed in claim 1, characterized in that: Before obtaining the single-frame data packet set, the method further includes: Acquire media data in the application layer, place the media data at the end of a pre-constructed initial RTP sending queue, and obtain a target RTP sending queue; Using a pre-built HTCP protocol to smooth the media data in the target RTP sending queue to obtain a smoothed media data frame set; Extracting smoothed media data frames in sequence from the smoothed media data frame set, splitting and packaging the smoothed media data frames to obtain a smoothed single-frame data packet set; Acquire a smoothed frame rate of the smoothed media data frame and the number of smoothed single-frame data packets of the smoothed single-frame data packet set; Calculate the intra-frame time difference of the smoothed media data frame according to the smoothed frame rate and the number of smoothed single-frame data packets, sort each smoothed single-frame data packet in the smoothed single-frame data packet set, and obtain the intra-frame sequence number of the smoothed single-frame data packet; Constructing an HTCP format data packet of the smoothed single-frame data packet according to the intra-frame time difference and the intra-frame sequence number of the smoothed media data frame; The HTCP format data packets are sorted in the initial RTP sending queue according to the intra-frame sequence numbers of the smoothed media data frames to obtain a target HTCP sending queue.

5. The HTCP transmission method of a portable communication device in a complex network environment as claimed in claim 4, characterized in that: The step of obtaining a single-frame data packet set comprises: Identify the frame sequence number and intra-frame sequence number of the last single-frame data packet at the end of the preset available window in the preset current dynamic sending window; Determining whether the last single-frame data packet is a preset retransmission data packet; If the last single-frame data packet is a retransmitted data packet, return to the step of identifying the frame sequence number and the intra-frame sequence number of the last single-frame data packet at the end of the preset available window in the preset current dynamic sending window; If the last single-frame data packet is not a retransmitted data packet, obtaining the number of smoothed single-frame data packets of the smoothed media data frame where the last single-frame data packet is located according to the frame sequence number; According to the number of smoothed single-frame data packets and the intra-frame sequence number, determining whether the last single-frame data packet is the last smoothed single-frame data packet in the smoothed single-frame data packet set where the last single-frame data packet is located; If the last single-frame data packet is not the last smoothed single-frame data packet in the smoothed single-frame data packet set where the last single-frame data packet is located, return to the step of identifying the frame sequence number and the intra-frame sequence number of the last single-frame data packet at the end of the preset available window in the current dynamic sending window; If the last single-frame data packet is the last smoothed single-frame data packet in the smoothed single-frame data packet set where the last single-frame data packet is located, single-frame data packet sets are sequentially extracted from the target HTCP sending queue, wherein the single-frame data packets in the single-frame data packet set are HTCP format data packets.

6. The HTCP transmission method of a portable communication device in a complex network environment as claimed in claim 1, characterized in that: The step of adjusting the size of the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer includes: Determine the size of the current dynamic sending window value and the current target congestion window value; If the current dynamic sending window value is greater than the current target congestion window value, reducing the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer; If the current dynamic sending window value is less than the current target congestion window value, increasing the current dynamic sending window according to the current window regulation speed to obtain a dynamic HTCP sending buffer; If the current dynamic sending window value is equal to the current target congestion window value, a dynamic HTCP sending buffer is obtained by maintaining the current dynamic sending window unchanged.

7. The HTCP transmission method of a portable communication device in a complex network environment as claimed in claim 1, characterized in that: After adjusting the size of the current dynamic sending window according to the current window regulation speed to obtain the dynamic HTCP sending buffer, the method further includes: Identifying a dynamic sending window value of a current dynamic sending window in the dynamic HTCP sending buffer; According to the dynamic sending window value, a retransmission timeout value is set using a pre-built retransmission timeout adjustment formula, wherein the retransmission timeout adjustment formula is as follows: t a =k×l d Among them, t a represents the retransmission timeout value, k represents the retransmission timeout adjustment coefficient, t d Indicates the dynamic sending window value.

8. The HTCP transmission method of a portable communication device in a complex network environment as claimed in claim 7, characterized in that: Before sending the single-frame data packet of the current dynamic sending window in the dynamic HTCP sending buffer to the HTCP receiving buffer by using the pre-built UDP protocol, the method further includes: Determine whether there is a preset request resend packet; If there is a request to resend packet, count the number of the request to resend packets; Determine whether the number of the request resend packets is greater than a preset request resend threshold; If the number of the request resend packets is not greater than the request resend threshold, identifying the HTCP start sequence number and the HTCP end sequence number of the request resend packet; Obtaining a set of HTCP sequence numbers to be retransmitted between the HTCP start sequence number and the HTCP end sequence number; Acquire a retransmitted data packet set according to the to-be-retransmitted HTCP sequence number set; Sending the retransmitted data packet set to the HTCP receiving buffer in priority; If the number of the request retransmission packets is greater than the request retransmission threshold, a preset video dynamic frame loss mechanism is started, and a retransmission data packet set is obtained according to the request retransmission packets; Sending the retransmitted data packet set to the HTCP receiving buffer in priority; If there is no request to resend the packet, obtain the current expected sequence number, and determine whether there is a current jump sequence number that skips the current expected sequence number; If there is a current jump sequence number that skips the current expected sequence number, obtaining a retransmitted data packet set according to the current expected sequence number and the current jump sequence number; Sending the retransmitted data packet set to the HTCP receiving buffer in priority; If there is no current jump sequence number that skips the current expected sequence number, the preset abnormal retransmission judgment is completed.

9. The HTCP transmission method of a portable communication device in a complex network environment as claimed in claim 8, characterized in that: The sending the current HTCP receiving buffer to the pre-built application layer includes: Extracting single-frame data packet sets in sequence from the current HTCP receiving buffer; Smoothing the single-frame data packet set to obtain an RTP receiving queue; The RTP receive queue is sent to the application layer.

10. A HTCP transmission device for a portable communication device in a complex network environment, characterized in that: The device comprises: An intra-frame time difference-congestion window association table acquisition module is used to acquire multiple groups of test transmission frame sets, and extract test transmission frame sets in sequence from the multiple groups of test transmission frame sets, wherein the intra-frame time difference of each test transmission frame in the test transmission frame set is the same, and the intra-frame time difference of each group of test transmission frame sets is different, and the intra-frame time difference refers to the time difference between different objects or areas in the same video frame, that is, the time interval between single-frame data packets in the test transmission frame; the test transmission frame set is transmitted in a preset complex network environment according to a pre-constructed congestion window sequence, and the transmission effect of the test transmission frame set is evaluated to obtain a transmission evaluation value of each congestion window in the congestion window sequence; according to the transmission evaluation value, a target congestion window value corresponding to the test transmission frame set is obtained, the test frame intra-time difference of the test transmission frame set is identified, and a corresponding relationship between the target congestion window value and the test frame intra-time difference is constructed to obtain an intra-frame time difference-congestion window association table; A current target congestion window value query module is used to obtain a single-frame data packet set, identify the number of single-frame data packets in the single-frame data packet set; obtain the current intra-frame time difference of the single-frame data packet set, and query the current target congestion window value in the intra-frame time difference-congestion window association table according to the current intra-frame time difference; The current dynamic sending window control module is used to obtain the data reading speed of the HTCP receiving cache. HTCP refers to the Hypertext Cache Protocol. According to the data reading speed and the number of single-frame data packets, the current window control duration is calculated using a pre-built window control duration formula. The window control duration formula is as follows: Among them, t n Indicates the current window adjustment duration, S d Indicates the number of single-frame data packets, v d Indicates the data reading speed; obtains the current dynamic sending window value of the current dynamic sending window, and calculates the current window control speed using a pre-built window speed control formula according to the current dynamic sending window value, the current target congestion window value and the current window control duration, wherein the window speed control formula is as follows: Among them, v t represents the current window regulation speed, l1 represents the current dynamic sending window value, and l2 represents the current target congestion window value; the size of the current dynamic sending window is adjusted according to the current window regulation speed to obtain a dynamic HTCP sending buffer; The HTCP buffer data sending module is used to send the single-frame data packet of the current dynamic sending window in the dynamic HTCP sending buffer to the HTCP receiving buffer by using the pre-built UDP protocol to obtain the current HTCP receiving buffer; and send the current HTCP receiving buffer to the pre-built application layer.