[go: up one dir, main page]

CN108494702B - Transmission control method and apparatus, storage medium, and electronic apparatus - Google Patents

Transmission control method and apparatus, storage medium, and electronic apparatus Download PDF

Info

Publication number
CN108494702B
CN108494702B CN201810155696.3A CN201810155696A CN108494702B CN 108494702 B CN108494702 B CN 108494702B CN 201810155696 A CN201810155696 A CN 201810155696A CN 108494702 B CN108494702 B CN 108494702B
Authority
CN
China
Prior art keywords
data
transmission
streaming media
transmission rate
control window
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810155696.3A
Other languages
Chinese (zh)
Other versions
CN108494702A (en
Inventor
周炳
冯涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810155696.3A priority Critical patent/CN108494702B/en
Publication of CN108494702A publication Critical patent/CN108494702A/en
Application granted granted Critical
Publication of CN108494702B publication Critical patent/CN108494702B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/27Evaluation or update of window size, e.g. using information derived from acknowledged [ACK] packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0002Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/25Flow control; Congestion control with rate being modified by the source upon detecting a change of network conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses a transmission control method and device, a storage medium and an electronic device. Wherein, the method comprises the following steps: acquiring a current data transmission state of a playing client, wherein the data transmission state is used for determining the transmission rate grade of streaming media data to be transmitted; adjusting a congestion control window corresponding to the streaming media data according to the transmission rate grade, wherein the congestion control window is used for controlling the transmission rate of the streaming media data; and controlling the streaming media data to be transmitted according to the adjusted congestion control window. The invention solves the technical problem of poor flexibility of the existing streaming media data transmission control.

Description

Transmission control method and apparatus, storage medium, and electronic apparatus
Technical Field
The present invention relates to the field of computers, and in particular, to a transmission control method and apparatus, a storage medium, and an electronic apparatus.
Background
At present, in the process of streaming media transmission, the transmission of streaming media data is generally controlled according to the network load condition. That is, under the condition of fully utilizing network load, the transmission throughput rate is improved as much as possible so as to ensure the definition and the fluency of the streaming media data playing.
However, for different streaming media playing scenarios, the transmission throughput is only increased in one direction, so that not only bandwidth resources may be wasted, but also the transmission of other users will be affected. In other words, the single fluid data transmission control method has the problem of poor flexibility.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
Embodiments of the present invention provide a transmission control method and apparatus, a storage medium, and an electronic apparatus, so as to at least solve the technical problem of poor flexibility in transmission control of streaming media data in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a transmission control method including: acquiring a current data transmission state of a playing client, wherein the data transmission state is used for determining the transmission rate grade of streaming media data to be transmitted; adjusting a congestion control window corresponding to the streaming media data according to the transmission rate grade, wherein the congestion control window is used for controlling the transmission rate of the streaming media data; and controlling the transmission of the streaming media data according to the adjusted congestion control window.
According to another aspect of the embodiments of the present invention, there is also provided a transmission control apparatus, including: the device comprises a first acquisition unit, a second acquisition unit and a processing unit, wherein the first acquisition unit is used for acquiring the current data transmission state of a playing client, and the data transmission state is used for determining the transmission rate grade of streaming media data to be transmitted; the adjusting unit is used for adjusting a congestion control window corresponding to the streaming media data according to the transmission rate grade, wherein the congestion control window is used for controlling the transmission rate of the streaming media data; and the control transmission unit is used for controlling the transmission of the streaming media data according to the adjusted congestion control window.
According to yet another aspect of the embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is configured to perform the above method when executed.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the method through the computer program.
In the embodiment of the invention, the transmission rate grade of the streaming media data which is determined to be transmitted by the client is obtained according to the current data transmission state of the client by obtaining the data transmission state of the playing client for reflecting the current data requirement of the playing client; the congestion control window corresponding to the streaming media data is adjusted according to the obtained transmission rate grade, and the transmission of the streaming media data is controlled according to the adjusted congestion control window, so that the purpose of controlling the transmission rate of the streaming media data according to the data transmission state of the playing client is achieved, the technical effect of flexibly controlling the data transmission rate of the streaming media data is achieved, and the technical problem that the existing streaming media data transmission control is poor in flexibility is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of an application environment of a transmission control method according to an embodiment of the present invention;
fig. 2 is a flow chart illustrating an alternative transmission control method according to an embodiment of the present invention;
FIGS. 3(a) - (b) are schematic diagrams of an alternative transmission control method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of another alternative transmission control method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of yet another alternative transmission control method according to an embodiment of the present invention;
fig. 6 is a schematic diagram of yet another alternative transmission control method according to an embodiment of the present invention;
fig. 7 is a schematic diagram of yet another alternative transmission control method according to an embodiment of the present invention;
fig. 8 is a schematic diagram of yet another alternative transmission control method according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an alternative transmission control apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, there is provided a transmission control method, which may be, but is not limited to, applied in the application environment shown in fig. 1. The program is being played in the playing client 102 in fig. 1. The lower bar in the play window is the play progress of the program. Wherein the black part represents the content that the program has been played, the shaded filled part is the buffer of the program, and the white part is the content of the program that has not been buffered. In the transmission control method, the server 104 obtains the current data transmission state in the playing client 102, wherein the current data transmission state is used for determining the transmission rate level of the streaming media data to be transmitted; the server 104 adjusts a congestion control window corresponding to the streaming media data according to the transmission rate level, wherein the congestion control window is used for controlling the transmission rate of the transmitted streaming media data; the server 104 controls the transmission of the streaming media data according to the adjusted congestion control window.
Optionally, the playing client may be, but is not limited to, a video playing client, a voice playing client, and the like.
Alternatively, the above application environment is only an optional example, and the above transmission control method may also be applied, but not limited, to an application environment of peer-to-peer networking (P2P for short).
Optionally, in this embodiment, the client may include, but is not limited to, at least one of the following: mobile phones, tablet computers, notebook computers, PCs and other hardware devices for controlling intelligent hardware. The network may include, but is not limited to, a wireless network, wherein the wireless network includes: bluetooth, WIFI, and other networks that enable wireless communication. The server may include, but is not limited to, at least one of: notebook computers, PCs, and other devices used for computing services. The above is only an example, and the present embodiment is not limited to this.
Optionally, the transmission control method includes:
s202, acquiring the current data transmission state of the playing client, wherein the data transmission state is used for determining the transmission rate grade of the streaming media data to be transmitted;
s204, adjusting a congestion control window corresponding to the streaming media data according to the transmission rate grade, wherein the congestion control window is used for controlling the transmission rate of the streaming media data;
and S206, controlling the transmission of the streaming media data according to the adjusted congestion control window.
Optionally, the data transmission state may be, but is not limited to, a playing state or a buffering state of the current streaming media data of the playing client. For example, a playback client needs to play 60 minutes of content, which is currently played for 20 minutes. The urheen total deterioration playing client needs to cache 500M of content, which is currently 20M.
Alternatively, the streaming media data amount may be, but not limited to, set (episode), bit (bit abbreviated as B), head (song), and department (movie). For example, a episode of a television show may have a low corresponding transmission rate level; the transmission rate grade corresponding to the two television plays is a middle grade; the transmission rate level corresponding to the three television plays is high level, etc.
Optionally, adjusting the congestion control window corresponding to the streaming media data according to the transmission rate level includes: s1, acquiring a transmission control threshold according to the transmission rate grade, wherein the transmission control threshold is used for controlling the change speed of the congestion control window, and the higher the transmission rate grade is, the larger the transmission control threshold is; and S2, adjusting the congestion control window according to the transmission control threshold value.
Alternatively, the transmission control threshold may be, but is not limited to, a numerical value for controlling the congestion control window to increase or decrease. E.g., a transmission control threshold of 50, the congestion control window is increased by 50. The transmission control threshold is-50, the congestion control window is decreased by 50. It should be noted that the above is only an example, and the specific transmission control threshold is not specifically limited herein.
Alternatively, the transmission control threshold may be set according to a network condition, or may be set manually according to experience.
Optionally, adjusting the congestion control window according to the transmission control threshold comprises: s1, under the condition that the data packet transmitted last time is detected to be transmitted successfully, adjusting the congestion control window according to the starting threshold value, wherein the starting threshold value is used for controlling the increasing speed of the congestion control window; and S2, under the condition that the data packet transmitted last time is detected not to be transmitted successfully, adjusting the congestion control window according to the congestion threshold value, wherein the congestion threshold value is used for controlling the reduction speed of the congestion control window.
Optionally, the activation threshold and the congestion threshold may be, but not limited to, numerical values or indexes. For example, if the start threshold is 1, the increase rate of the congestion control window is 1 added every predetermined time, and if the start threshold is 120%, the increase rate of the congestion control window is 20% added every predetermined time. If the congestion threshold is 1, the speed of reducing the congestion control window is 1 per predetermined time, and if the congestion threshold is 80%, the speed of reducing the congestion control window is 20 per predetermined time.
It should be noted that the above is only an example, and the embodiment of the start threshold and the congestion threshold is not specifically limited herein.
Optionally, before adjusting the congestion control window corresponding to the streaming media data according to the transmission rate level, the method further includes: s1, acquiring the data volume of the streaming media data to be transmitted by the playing client according to the data transmission state; and S2, determining the transmission rate grade of the playing client according to the data volume of the streaming media data.
For example, the playing client acquires that the data volume to be transmitted is 800M according to the data playing progress of the playing client, and the data transmission level corresponding to 800M is a middle level, then the congestion control window is adjusted according to the middle level data transmission level, and the transmission of the streaming media data is controlled according to the adjusted congestion control window; or, the playing client acquires that the data volume to be transmitted is 2000M, and the data transmission level corresponding to 2000M is high, then adjusts the congestion control window according to the high data transmission level, and controls the transmission of the streaming media data according to the adjusted congestion control window; or the playing client acquires that the data volume to be transmitted is 200M, and the data transmission level corresponding to 200M is low, then the congestion control window is adjusted according to the low data transmission level, and the transmission of the streaming media data is controlled according to the adjusted congestion control window.
Alternatively, the transmission rate level may be set to a fast transmission rate level, a medium transmission rate level, a slow transmission rate level. Wherein, the fast transmission rate grade > medium transmission rate grade > slow transmission rate grade.
Optionally, the correspondence between the data amount of the streaming media data and the transmission rate level may be set in advance, but not limited to, and the data amount of different streaming media data corresponds to different transmission rate levels. For example, different transmission rate levels are set according to the number of bits of the data amount of the streaming media data. When the data volume of the streaming media data is between 0 and 10M, the corresponding transmission rate grade is slow; when the data volume of the streaming media data is 10-300M, the corresponding transmission rate grade is medium; when the buffer duration is above 300M, the corresponding transmission rate level is fast.
Optionally, the corresponding transmission rate level may be selected, but not limited to, according to the setting of the client. For example, a selection prompt for selecting a transmission rate class is set on the client, and a corresponding transmission rate class is selected according to the transmission rate class indication selected by the client to perform data transmission. For example, a setting button of the transmission rate level is displayed on the client, and when the transmission rate level button is set to be fast by the client, the fast transmission rate level is selected for data transmission; and when the client sets the transmission rate level button to be slow, selecting the slow transmission rate level for data transmission.
It should be noted that the transmission rate level can be set to three levels, but not limited to three levels, and the number of specific set levels can be determined according to the requirement. The correspondence between the buffer duration and the transmission rate level is merely an example, and the specific setting needs to be determined as appropriate.
According to the method, the effect of controlling the transmission rate of the streaming media data according to the buffering duration of the playing buffer area of the playing client is achieved, the transmission flexibility of the streaming media data is improved, and the problem of poor transmission control flexibility of the streaming media data is solved.
As an alternative embodiment, adjusting the congestion control window of the streaming media data according to the transmission rate level comprises:
s1, acquiring a transmission control threshold according to the transmission rate grade, wherein the transmission control threshold is used for controlling the change speed of the congestion control window, and the higher the transmission rate grade is, the larger the transmission control threshold is;
and S2, adjusting the congestion control window according to the transmission control threshold value.
Alternatively, as described with reference to fig. 3, as shown in fig. 3(a) and 3(b), fig. 3 shows the correspondence between the transmission rate level and the transmission control threshold value and the correspondence between the transmission control threshold value and the transmission congestion control window. As shown in fig. 3(a), the higher the transmission rate level, the larger the corresponding transmission control threshold value, and the lower the transmission rate level, the smaller the corresponding transmission control threshold value. As shown in fig. 3(b), the transmission control threshold is used to control the speed of change of the congestion control window. And obtaining a corresponding transmission control threshold value through the transmission rate grade, and adjusting the change rate of the congestion control window according to the obtained transmission control threshold value. Specifically, the change rate of the congestion control window may be adjusted by determining the size of the transmission control threshold and the congestion control window. When the transmission control threshold is greater than the congestion control window, the congestion control window is raised; when the transmission control threshold is less than the congestion control window, the congestion control window is decreased.
According to the embodiment of the application, the transmission control threshold value is obtained according to the transmission rate grade, and the congestion control window is adjusted according to the transmission control threshold value, so that the congestion control window can be controlled according to the transmission rate grade, and the effect of flexibly controlling the data transmission speed according to different transmission rate grades is achieved.
As an alternative embodiment, adjusting the congestion control window according to the transmission control threshold comprises:
s1, under the condition that the data packet transmitted last time is detected to be transmitted successfully, adjusting the congestion control window according to the starting threshold value, wherein the starting threshold value is used for controlling the increasing speed of the congestion control window;
and S2, under the condition that the data packet transmitted last time is detected not to be transmitted successfully, adjusting the congestion control window according to the congestion threshold value, wherein the congestion threshold value is used for controlling the reduction speed of the congestion control window.
Wherein adjusting the congestion control window according to the start threshold comprises:
s11, under the condition that the congestion control window is smaller than the starting threshold, adjusting the width value of the congestion control window to exponentially increase;
and S12, when the congestion control window is larger than or equal to the starting threshold, adjusting the width value of the congestion control window to linearly increase.
Wherein adjusting the congestion control window according to the congestion threshold comprises:
s21, under the condition that the time length of the unsuccessfully transmitted data packet of the last transmission reaches the overtime threshold, determining that the data packet of the last transmission is lost, and reducing the width value of the congestion control window according to a first amplitude;
s22, reducing the width of the congestion control window according to a second amplitude under the condition that the time length of unsuccessfully transmitted data packet of the last transmission does not reach the overtime threshold but the transmission round-trip delay reaches the congestion threshold;
wherein the congestion threshold is less than the timeout threshold, and the second amplitude is less than the first amplitude.
Alternatively, the start threshold and the congestion threshold may be set in advance according to the transmission rate class. For example, the startup threshold is 300 and the congestion threshold is 10 seconds.
Fig. 4 shows a specific flow of adjusting the congestion control window by the start threshold, the congestion threshold and the timeout threshold. As shown in fig. 4, after the streaming media data is transmitted in step S402, it is determined whether the streaming media data is successfully transmitted. There are two results, S402-1 streaming data successfully sent and S402-2 streaming data unsuccessfully sent, respectively. The successful transmission of the S402-1 streaming media data is also divided into two cases, namely that the S402-1-1 starting threshold is greater than the congestion control window, the S402-1-2 starting threshold is less than the congestion control window, and the unsuccessful transmission of the S402-2 streaming media data also exists, namely that the transmission time length of the S402-2-1 is greater than the timeout threshold, and the transmission time length of the S402-2-2 is less than the timeout threshold. When the starting threshold value of S402-1-1 is larger than the congestion control window, executing step S402-1-1-1 to control the exponential increase of the congestion control window; when the S402-1-2 streaming media data are successfully sent and the starting threshold value is smaller than the congestion control window, executing the step S402-1-2-1 to control the congestion control window to linearly increase; when the streaming media data are not successfully sent in the S402-2-1 and the transmission duration is greater than the overtime threshold, executing the step S402-2-1-1 to control the congestion control window to be reduced according to a first amplitude; and when the streaming media data are not successfully sent in the step S402-2-2 and the transmission duration is less than the overtime threshold, executing the step S402-2-2-1 to control the congestion control window to be reduced according to a second amplitude.
Optionally, fig. 5 shows an alternative method of controlling the congestion control window. As shown in fig. 5, the upper left corner in fig. 5 is a curve of the congestion control window as the data packet is successfully transmitted. The upper right corner of fig. 5 is the straight line of change in the congestion control window with successful transmission of a data packet. The lower left corner of fig. 5 is a curve of the congestion control window as a function of unsuccessful transmission of a packet; the lower right hand corner of fig. 5 is a straight line of congestion control window changes with unsuccessful transmission of a packet.
It should be noted that, the index of the exponential change and the coefficient of the linear change in the congestion control window changing process may be set in advance, and are not limited in this respect.
According to the embodiment of the application, the congestion control window is adjusted by combining the starting threshold, the congestion threshold and the overtime threshold according to the success and the failure of data packet transmission, so that the congestion control window is flexibly adjusted according to the transmission rate grade, and the data transmission process is flexibly controlled through the congestion control window.
As an optional implementation, before adjusting the congestion control window corresponding to the streaming media data according to the transmission rate level, the method further includes:
s1, acquiring the data volume of the streaming media data to be transmitted by the playing client according to the data transmission state;
and S2, determining the transmission rate grade of the playing client according to the data volume of the streaming media data.
The method for acquiring the data volume of the streaming media data to be transmitted by the playing client according to the data transmission state comprises the following steps:
s11, acquiring at least one of the following control parameters indicated by the data transmission state: the buffer capacity of the streaming media data and the number of data sources of the streaming media data to be transmitted;
and S21, determining the data volume of the streaming media data according to the acquired control parameters.
Optionally, the buffering amount of the streaming media data may be, but is not limited to, a buffering duration of the currently played content, or a video duration that needs to be buffered.
Taking the buffer duration as an example, for example, as shown in fig. 6, taking a video player as an example, fig. 6 shows a playing interface of the video player, where a program is being played on the playing interface. In fig. 6, the black bar portion in the playing interface is the playing progress, and S1 represents the buffer portion during the playing of the program. The buffer represents content that has been buffered but not yet played, and the white bar portion after S1 represents a portion that has not yet been played and not yet buffered. The buffer duration obtained S1 for the partial buffer is 60S, and the transmission rate level may be obtained according to the obtained buffer duration. Or as shown in fig. 7, taking an audio player as an example, fig. 7 shows a playing interface of the audio player, and the playing progress of music is displayed on the playing interface. Wherein, the lower black bar part of the music playing interface represents the part where the music has been played, S2 represents the buffering time length of the music buffer, and the white bar part at the rear of S2 represents the part where the music has not been played and has not been buffered. The buffer duration obtained S2 for the partial buffer is 27 seconds, and the transmission rate level may be obtained according to the obtained buffer duration.
Or taking the video duration as an example, as shown in fig. 6, the total duration of the video in fig. 6 is 20:00, the video has been played for 10 minutes and 20 seconds, the hatched portion indicated by the oblique lines in the playing progress is the buffer duration, the white portion indicates the video duration that has not been buffered, and the transmission rate level corresponding to the video duration is determined. Or as shown in fig. 7, the white portion in the playing progress is the video duration that is not buffered, and the transmission rate level corresponding to the video duration is determined according to the video duration.
According to the embodiment of the application, the transmission rate grade is determined by obtaining the buffering amount of the streaming media data, so that the data transmission rate can be flexibly controlled according to the buffering amount of the streaming media data of the client, and the effect of setting the data transmission rate according to the requirement of the client is realized.
As an optional implementation, before acquiring the data amount of the streaming media data to be transmitted by the playing client according to the data transmission state, the method further includes:
s1, obtaining the comparison result between the data volume of the streaming media data and the preset threshold value;
and S2, determining the transmission rate grade of the data volume of the streaming media data according to the comparison result, wherein, under the condition that the transmission rate grade is the ith grade, the transmission rate corresponding to the ith grade is configured for the data volume of the streaming media data, and i is a natural number which is more than or equal to 1.
For example, fig. 8 shows an optional correspondence relationship between the data amount of streaming media data and the transmission rate level. As shown in fig. 8, i is 3, and the data amount of the streaming media data is the buffer duration. When the buffering duration is between 0 and 60S, the corresponding transmission rate grade is a first grade; when the buffering duration is between 60S and 180S, the corresponding transmission rate grade is a second grade; and when the buffering time length is more than 180S, the corresponding transmission rate grade is a third grade. Wherein the first level is greater than the second level and greater than the third level of the transmission rate level.
According to the embodiment of the application, the proper transmission rate grade is selected according to the data volume of the streaming media data, so that the transmission rate can be set according to the real-time buffering condition of the client, and the effect of flexibly controlling the data transmission rate according to the buffering duration is achieved.
As an optional implementation, before determining the transmission rate level of the playing client according to the data amount of the streaming media data, at least one of the following is further included:
s1, receiving a notification instruction sent by an application layer, wherein the notification instruction carries the data volume of the streaming media data;
s2, acquiring an interface calling instruction sent by an application layer, wherein the interface calling instruction carries a transmission rate grade corresponding to the data volume of the streaming media data; according to the calling, the transmission control interface corresponding to the transmission rate grade;
and S3, acquiring a shared global variable, wherein the shared global variable is used for recording the transmission rate grade determined by the application layer according to the data volume of the streaming media data.
For example, after the client acquires the data volume of the streaming media data, the transmission rate level corresponding to the acquired data volume of the streaming media data is sent to the server, and the server transmits the data according to the transmission rate level; or after the client acquires the data volume of the streaming media data, selecting interfaces with different transmission rate grades set by the server according to the data volume of the streaming media data, and selecting interfaces with different transmission rate grades according to the data volume of different streaming media data to carry out transmission rate; or the client and the server share a global variable, the transmission rate level corresponding to the data volume of the streaming media data of the client is recorded in the global variable, and the server calls the global variable and transmits the data according to the transmission rate level corresponding to the global variable.
According to the embodiment of the application, different methods can be adopted to connect the connection between the client and the server, so that the server transmits the data according to the buffering duration of the client, and the aim of flexibly transmitting the data according to the buffering requirement of the client is fulfilled.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
According to another aspect of the embodiments of the present invention, there is also provided a transmission control apparatus for implementing the transmission control method, as shown in fig. 9, the apparatus including:
a first obtaining unit 902, configured to obtain a current data transmission state of a playing client, where the data transmission state is used to determine a transmission rate level of streaming media data to be transmitted;
an adjusting unit 904, which adjusts a congestion control window corresponding to the streaming media data according to the transmission rate level, wherein the congestion control window is used for controlling the transmission rate of the streaming media data;
a control transmission unit 906, configured to control transmission of the streaming media data according to the adjusted congestion control window.
Alternatively, the transmission control apparatus may be applied, but not limited to, an environment in which the transmission control method is applied.
Optionally, the data transmission state may be, but is not limited to, a playing state or a buffering state of the current streaming media data of the playing client. For example, a playback client needs to play 60 minutes of content, which is currently played for 20 minutes. Or the playing client needs to cache 500M of content, which is currently cached by 20M.
Alternatively, the streaming media data amount may be, but not limited to, set (episode), bit (bit abbreviated as B), head (song), and department (movie). For example, a episode of a television show may have a low corresponding transmission rate level; the transmission rate grade corresponding to the two television plays is a middle grade; the transmission rate level corresponding to the three television plays is high level, etc.
Optionally, adjusting the congestion control window corresponding to the streaming media data according to the transmission rate level includes: s1, acquiring a transmission control threshold according to the transmission rate grade, wherein the transmission control threshold is used for controlling the change speed of the congestion control window, and the higher the transmission rate grade is, the larger the transmission control threshold is; and S2, adjusting the congestion control window according to the transmission control threshold value.
Alternatively, the transmission control threshold may be, but is not limited to, a numerical value for controlling the congestion control window to increase or decrease. E.g., a transmission control threshold of 50, the congestion control window is increased by 50. The transmission control threshold is-50, the congestion control window is decreased by 50. It should be noted that the above is only an example, and the specific transmission control threshold is not specifically limited herein.
Alternatively, the transmission control threshold may be set according to a network condition, or may be set manually according to experience.
Optionally, adjusting the congestion control window according to the transmission control threshold comprises: s1, under the condition that the data packet transmitted last time is detected to be transmitted successfully, adjusting the congestion control window according to the starting threshold value, wherein the starting threshold value is used for controlling the increasing speed of the congestion control window; and S2, under the condition that the data packet transmitted last time is detected not to be transmitted successfully, adjusting the congestion control window according to the congestion threshold value, wherein the congestion threshold value is used for controlling the reduction speed of the congestion control window.
Optionally, the activation threshold and the congestion threshold may be, but not limited to, numerical values or indexes. For example, if the start threshold is 1, the increase rate of the congestion control window is 1 added every predetermined time, and if the start threshold is 120%, the increase rate of the congestion control window is 20% added every predetermined time. If the congestion threshold is 1, the speed of reducing the congestion control window is 1 per predetermined time, and if the congestion threshold is 80%, the speed of reducing the congestion control window is 20 per predetermined time.
It should be noted that the above is only an example, and the embodiment of the start threshold and the congestion threshold is not specifically limited herein.
Optionally, before adjusting the congestion control window corresponding to the streaming media data according to the transmission rate level, the method further includes: s1, acquiring the data volume of the streaming media data to be transmitted by the playing client according to the data transmission state; and S2, determining the transmission rate grade of the playing client according to the data volume of the streaming media data.
For example, the playing client acquires that the data volume to be transmitted is 800M according to the data playing progress of the playing client, and the data transmission level corresponding to 800M is a middle level, then the congestion control window is adjusted according to the middle level data transmission level, and the transmission of the streaming media data is controlled according to the adjusted congestion control window; or, the playing client acquires that the data volume to be transmitted is 2000M, and the data transmission level corresponding to 2000M is high, then adjusts the congestion control window according to the high data transmission level, and controls the transmission of the streaming media data according to the adjusted congestion control window; or the playing client acquires that the data volume to be transmitted is 200M, and the data transmission level corresponding to 200M is low, then the congestion control window is adjusted according to the low data transmission level, and the transmission of the streaming media data is controlled according to the adjusted congestion control window.
Alternatively, the transmission rate level may be set to a fast transmission rate level, a medium transmission rate level, a slow transmission rate level. Wherein, the fast transmission rate grade > medium transmission rate grade > slow transmission rate grade.
Optionally, the correspondence between the data amount of the streaming media data and the transmission rate level may be set in advance, but not limited to, and the data amount of different streaming media data corresponds to different transmission rate levels. For example, different transmission rate levels are set according to the number of bits of the data amount of the streaming media data. When the data volume of the streaming media data is between 0 and 10M, the corresponding transmission rate grade is slow; when the data volume of the streaming media data is 10-300M, the corresponding transmission rate grade is medium; when the buffer duration is above 300M, the corresponding transmission rate level is fast.
Optionally, the corresponding transmission rate level may be selected, but not limited to, according to the setting of the client. For example, a selection prompt for selecting a transmission rate class is set on the client, and a corresponding transmission rate class is selected according to the transmission rate class indication selected by the client to perform data transmission. For example, a setting button of the transmission rate level is displayed on the client, and when the transmission rate level button is set to be fast by the client, the fast transmission rate level is selected for data transmission; and when the client sets the transmission rate level button to be slow, selecting the slow transmission rate level for data transmission.
It should be noted that the transmission rate level can be set to three levels, but not limited to three levels, and the number of specific set levels can be determined according to the requirement. The correspondence between the buffer duration and the transmission rate level is merely an example, and the specific setting needs to be determined as appropriate.
According to the method, the effect of controlling the transmission rate of the streaming media data according to the buffering duration of the playing buffer area of the playing client is achieved, the transmission flexibility of the streaming media data is improved, and the problem of poor transmission control flexibility of the streaming media data is solved.
As an alternative embodiment, the adjusting unit includes:
(1) the first acquisition module is used for acquiring a transmission control threshold according to the transmission rate grade, wherein the transmission control threshold is used for controlling the change speed of a congestion control window, and the higher the transmission rate grade is, the larger the transmission control threshold is;
(2) and the adjusting module is used for adjusting the congestion control window according to the transmission control threshold value.
Alternatively, as described with reference to fig. 3, as shown in fig. 3(a) and 3(b), fig. 3 shows the correspondence between the transmission rate level and the transmission control threshold value and the correspondence between the transmission control threshold value and the transmission congestion control window. As shown in fig. 3(a), the higher the transmission rate level, the larger the corresponding transmission control threshold value, and the lower the transmission rate level, the smaller the corresponding transmission control threshold value. As shown in fig. 3(b), the transmission control threshold is used to control the speed of change of the congestion control window. And obtaining a corresponding transmission control threshold value through the transmission rate grade, and adjusting the change rate of the congestion control window according to the obtained transmission control threshold value. Specifically, the change rate of the congestion control window may be adjusted by determining the size of the transmission control threshold and the congestion control window. When the transmission control threshold is greater than the congestion control window, the congestion control window is raised; when the transmission control threshold is less than the congestion control window, the congestion control window is decreased.
In the embodiment of the present application, the numbers (1) and (2) of the unit modules are used to distinguish the difference, and the order between the unit modules is not limited at all.
According to the embodiment of the application, the transmission control threshold value is obtained according to the transmission rate grade, and the congestion control window is adjusted according to the transmission control threshold value, so that the congestion control window can be controlled according to the transmission rate grade, and the effect of flexibly controlling the data transmission speed according to different transmission rate grades is achieved.
As an alternative embodiment, the adjusting module comprises:
(1) the first adjusting submodule is used for adjusting a congestion control window according to a starting threshold value under the condition that the successful transmission of a data packet transmitted last time is detected, wherein the starting threshold value is used for controlling the growth speed of the congestion control window;
(2) and the second adjusting submodule is used for adjusting the congestion control window according to the congestion threshold value under the condition that the data packet transmitted last time is detected to be unsuccessfully transmitted, wherein the congestion threshold value is used for controlling the reduction speed of the congestion control window.
The first adjusting submodule adjusts a congestion control window according to a starting threshold value through the following steps:
(1) under the condition that the congestion control window is smaller than the starting threshold value, adjusting the exponential increase of the width value of the congestion control window;
(2) and under the condition that the congestion control window is larger than or equal to the starting threshold, adjusting the width value of the congestion control window to linearly increase.
The second adjusting submodule adjusts the congestion control window according to the congestion threshold by the following steps:
(1) under the condition that the unsuccessfully transmitted time length of the last transmitted data packet reaches the overtime threshold value, determining that the last transmitted data packet is lost, and reducing the width value of the congestion control window according to a first amplitude;
(2) under the condition that the unsuccessfully transmitted time length of the last transmitted data packet does not reach the overtime threshold value but the transmission round-trip delay reaches the congestion threshold value, reducing the width value of the congestion control window according to a second amplitude;
wherein the congestion threshold is less than the timeout threshold, and the second amplitude is less than the first amplitude.
Alternatively, the start threshold and the congestion threshold may be set in advance according to the transmission rate class. For example, the startup threshold is 300 and the congestion threshold is 10 seconds.
Fig. 4 shows a specific flow of adjusting the congestion control window by the start threshold, the congestion threshold and the timeout threshold. As shown in fig. 4, after the streaming media data is transmitted in step S402, it is determined whether the streaming media data is successfully transmitted. There are two results, S402-1 streaming data successfully sent and S402-2 streaming data unsuccessfully sent, respectively. The successful transmission of the S402-1 streaming media data is also divided into two cases, namely that the S402-1-1 starting threshold is greater than the congestion control window, the S402-1-2 starting threshold is less than the congestion control window, and the unsuccessful transmission of the S402-2 streaming media data also exists, namely that the transmission time length of the S402-2-1 is greater than the timeout threshold, and the transmission time length of the S402-2-2 is less than the timeout threshold. When the starting threshold value of S402-1-1 is larger than the congestion control window, executing step S402-1-1-1 to control the exponential increase of the congestion control window; when the S402-1-2 streaming media data are successfully sent and the starting threshold value is smaller than the congestion control window, executing the step S402-1-2-1 to control the congestion control window to linearly increase; when the streaming media data are not successfully sent in the S402-2-1 and the transmission duration is greater than the overtime threshold, executing the step S402-2-1-1 to control the congestion control window to be reduced according to a first amplitude; and when the streaming media data are not successfully sent in the step S402-2-2 and the transmission duration is less than the overtime threshold, executing the step S402-2-2-1 to control the congestion control window to be reduced according to a second amplitude.
Optionally, fig. 5 shows an alternative method of controlling the congestion control window. As shown in fig. 5, the upper left corner in fig. 5 is a curve of the congestion control window as the data packet is successfully transmitted. The upper right corner of fig. 5 is the straight line of change in the congestion control window with successful transmission of a data packet. The lower left corner of fig. 5 is a curve of the congestion control window as a function of unsuccessful transmission of a packet; the lower right hand corner of fig. 5 is a straight line of congestion control window changes with unsuccessful transmission of a packet.
It should be noted that, the index of the exponential change and the coefficient of the linear change in the congestion control window changing process may be set in advance, and are not limited in this respect.
According to the embodiment of the application, the congestion control window is adjusted by combining the starting threshold, the congestion threshold and the overtime threshold according to the success and the failure of data packet transmission, so that the congestion control window is flexibly adjusted according to the transmission rate grade, and the data transmission process is flexibly controlled through the congestion control window.
As an alternative embodiment, the above apparatus further comprises:
(1) a second obtaining unit, configured to obtain, according to a data transmission state, a data amount of streaming media data to be transmitted by a playing client before adjusting a congestion control window corresponding to the streaming media data according to a transmission rate level;
(2) and the determining unit is used for determining the transmission rate grade of the playing client according to the data volume of the streaming media data before adjusting the congestion control window of the streaming media data according to the transmission rate grade.
Wherein, the second obtaining unit further comprises:
(1) a second obtaining module, configured to obtain at least one of the following control parameters indicated by the data transmission status: the buffer capacity of the streaming media data and the number of data sources of the streaming media data to be transmitted;
(2) and the first determining module is used for determining the data volume of the streaming media data according to the acquired control parameters.
Optionally, the buffering amount of the streaming media data may be, but is not limited to, a buffering duration of the currently played content, or a video duration of the currently played content that has not been played yet.
Optionally, the buffering amount of the streaming media data may be, but is not limited to, a buffering duration of the currently played content, or a video duration that needs to be buffered.
Taking the buffer duration as an example, for example, as shown in fig. 6, taking a video player as an example, fig. 6 shows a playing interface of the video player, where a program is being played on the playing interface. In fig. 6, the black bar portion in the playing interface is the playing progress, and S1 represents the buffer portion during the playing of the program. The buffer represents content that has been buffered but not yet played, and the white bar portion after S1 represents a portion that has not yet been played and not yet buffered. The buffer duration obtained S1 for the partial buffer is 60S, and the transmission rate level may be obtained according to the obtained buffer duration. Or as shown in fig. 7, taking an audio player as an example, fig. 7 shows a playing interface of the audio player, and the playing progress of music is displayed on the playing interface. Wherein, the lower black bar part of the music playing interface represents the part where the music has been played, S2 represents the buffering time length of the music buffer, and the white bar part at the rear of S2 represents the part where the music has not been played and has not been buffered. The buffer duration obtained S2 for the partial buffer is 27 seconds, and the transmission rate level may be obtained according to the obtained buffer duration.
Or taking the video duration as an example, as shown in fig. 6, the total duration of the video in fig. 6 is 20:00, the video has been played for 10 minutes and 20 seconds, the hatched portion indicated by the oblique lines in the playing progress is the buffer duration, the white portion indicates the video duration that has not been buffered, and the transmission rate level corresponding to the video duration is determined. Or as shown in fig. 7, the white portion in the playing progress is the video duration that is not buffered, and the transmission rate level corresponding to the video duration is determined according to the video duration.
According to the embodiment of the application, the transmission rate grade is determined by obtaining the buffering amount of the streaming media data, so that the data transmission rate can be flexibly controlled according to the buffering amount of the streaming media data of the client, and the effect of setting the data transmission rate according to the requirement of the client is realized.
As an optional implementation, the second obtaining unit further includes:
(1) a fifth obtaining module, configured to obtain a comparison result between the data amount of the streaming media data and a predetermined threshold before obtaining the transmission rate level according to the buffering duration;
(2) and a second determining module, configured to determine, according to the comparison result, a transmission rate level of the data volume of the streaming media data before obtaining the transmission rate level according to the buffer duration, where, in a case that the transmission rate level is an ith level, a transmission rate corresponding to the ith level is configured for the data volume of the streaming media data, and i is a natural number greater than or equal to 1.
For example, fig. 8 shows an optional correspondence relationship between the data amount of streaming media data and the transmission rate level. As shown in fig. 8, i is 3, and the data amount of the streaming media data is the buffer duration. When the buffering duration is between 0 and 60S, the corresponding transmission rate grade is a first grade; when the buffering duration is between 60S and 180S, the corresponding transmission rate grade is a second grade; and when the buffering time length is more than 180S, the corresponding transmission rate grade is a third grade. Wherein the first level is greater than the second level and greater than the third level of the transmission rate level.
According to the embodiment of the application, the proper transmission rate grade is selected according to the data volume of the streaming media data, so that the transmission rate can be set according to the real-time buffering condition of the client, and the effect of flexibly controlling the data transmission rate according to the buffering duration is achieved.
As an alternative embodiment, the determining unit includes at least one of:
(1) the receiving module is used for receiving a notification instruction sent by an application layer before determining the transmission rate grade of the playing client according to the data volume of the streaming media data, wherein the notification instruction carries the data volume of the streaming media data;
(2) a third obtaining module, configured to obtain an interface call instruction sent by an application layer before determining a transmission rate level of a playing client according to a data amount of streaming media data, where the interface call instruction carries the transmission rate level corresponding to the data amount of the streaming media data, so as to call a transmission control interface corresponding to the transmission rate level;
(3) and a fourth obtaining module, configured to obtain a shared global variable before determining a transmission rate level of the playing client according to the data amount of the streaming media data, where the shared global variable is used to record the transmission rate level determined by the application layer according to the data amount of the streaming media data.
For example, after the client acquires the data volume of the streaming media data, the transmission rate level corresponding to the acquired data volume of the streaming media data is sent to the server, and the server transmits the data according to the transmission rate level; or after the client acquires the data volume of the streaming media data, selecting interfaces with different transmission rate grades set by the server according to the data volume of the streaming media data, and selecting interfaces with different transmission rate grades according to the data volume of different streaming media data to carry out transmission rate; or the client and the server share a global variable, the transmission rate level corresponding to the data volume of the streaming media data of the client is recorded in the global variable, and the server calls the global variable and transmits the data according to the transmission rate level corresponding to the global variable.
According to the embodiment of the application, different methods can be adopted to connect the connection between the client and the server, so that the server transmits the data according to the buffering duration of the client, and the aim of flexibly transmitting the data according to the buffering requirement of the client is fulfilled.
According to a further aspect of embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring the current data transmission state of the playing client, wherein the data transmission state is used for determining the transmission rate grade of the streaming media data to be transmitted;
s2, adjusting a congestion control window corresponding to the streaming media data according to the transmission rate level, wherein the congestion control window is used for controlling the transmission rate of the streaming media data;
and S3, controlling the transmission of the streaming media data according to the adjusted congestion control window.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring a transmission control threshold according to the transmission rate grade, wherein the transmission control threshold is used for controlling the change speed of the congestion control window, and the higher the transmission rate grade is, the larger the transmission control threshold is;
and S2, adjusting the congestion control window according to the transmission control threshold value.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, under the condition that the data packet transmitted last time is detected to be transmitted successfully, adjusting the congestion control window according to the starting threshold value, wherein the starting threshold value is used for controlling the increasing speed of the congestion control window;
and S2, under the condition that the data packet transmitted last time is detected not to be transmitted successfully, adjusting the congestion control window according to the congestion threshold value, wherein the congestion threshold value is used for controlling the reduction speed of the congestion control window.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, under the condition that the congestion control window is smaller than the starting threshold, adjusting the width value of the congestion control window to exponentially increase;
and S2, when the congestion control window is larger than or equal to the starting threshold, adjusting the width value of the congestion control window to linearly increase.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, under the condition that the time length of the unsuccessfully transmitted data packet of the last transmission reaches the overtime threshold, determining that the data packet of the last transmission is lost, and reducing the width value of the congestion control window according to a first amplitude;
s2, reducing the width of the congestion control window according to a second amplitude under the condition that the time length of unsuccessfully transmitted data packet of the last transmission does not reach the overtime threshold but the transmission round-trip delay reaches the congestion threshold;
s3, wherein the congestion threshold is less than the timeout threshold and the second magnitude is less than the first magnitude.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring the data volume of the streaming media data to be transmitted by the playing client according to the data transmission state;
and S2, determining the transmission rate grade of the playing client according to the data volume of the streaming media data.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring at least one of the following control parameters indicated by the data transmission state: the buffer capacity of the streaming media data and the number of data sources of the streaming media data to be transmitted;
and S2, determining the data volume of the streaming media data according to the acquired control parameters.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, receiving a notification instruction sent by an application layer, wherein the notification instruction carries the data volume of the streaming media data;
s2, acquiring an interface calling instruction sent by an application layer, wherein the interface calling instruction carries a transmission rate grade corresponding to the data volume of the streaming media data so as to call a transmission control interface corresponding to the transmission rate grade;
and S3, acquiring a shared global variable, wherein the shared global variable is used for recording the transmission rate grade determined by the application layer according to the data volume of the streaming media data.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, obtaining the comparison result between the data volume of the streaming media data and the preset threshold value;
and S2, determining the transmission rate grade of the data volume of the streaming media data according to the comparison result, wherein, under the condition that the transmission rate grade is the ith grade, the transmission rate corresponding to the ith grade is configured for the data volume of the streaming media data, and i is a natural number which is more than or equal to 1.
Optionally, the storage medium is further configured to store a computer program for executing the steps included in the method in the foregoing embodiment, which is not described in detail in this embodiment.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device for implementing the transmission control method, as shown in fig. 10, the electronic device includes a memory 1002, a processor 1004, a user interface 1006 and a display 1008, the memory 1002 stores computer programs, the processor 1004 is configured to execute the steps in any one of the method embodiments through the computer programs, the user interface 1006 is used for receiving streaming media data, and the display 1008 is used for displaying the streaming media data.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring the current data transmission state of the playing client, wherein the data transmission state is used for determining the transmission rate grade of the streaming media data to be transmitted;
s2, adjusting a congestion control window corresponding to the streaming media data according to the transmission rate level, wherein the congestion control window is used for controlling the transmission rate of the streaming media data;
and S3, controlling the transmission of the streaming media data according to the adjusted congestion control window.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring a transmission control threshold according to the transmission rate grade, wherein the transmission control threshold is used for controlling the change speed of the congestion control window, and the higher the transmission rate grade is, the larger the transmission control threshold is;
and S2, adjusting the congestion control window according to the transmission control threshold value.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, under the condition that the data packet transmitted last time is detected to be transmitted successfully, adjusting the congestion control window according to the starting threshold value, wherein the starting threshold value is used for controlling the increasing speed of the congestion control window;
and S2, under the condition that the data packet transmitted last time is detected not to be transmitted successfully, adjusting the congestion control window according to the congestion threshold value, wherein the congestion threshold value is used for controlling the reduction speed of the congestion control window.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring the data volume of the streaming media data to be transmitted by the playing client according to the data transmission state;
and S2, determining the transmission rate grade of the playing client according to the data volume of the streaming media data.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, receiving a notification instruction sent by an application layer, wherein the notification instruction carries the data volume of the streaming media data;
s2, acquiring an interface calling instruction sent by an application layer, wherein the interface calling instruction carries a transmission rate grade corresponding to the data volume of the streaming media data so as to call a transmission control interface corresponding to the transmission rate grade;
and S3, acquiring a shared global variable, wherein the shared global variable is used for recording the transmission rate grade determined by the application layer according to the data volume of the streaming media data.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, obtaining the comparison result between the data volume of the streaming media data and the preset threshold value;
and S2, determining the transmission rate grade of the data volume of the streaming media data according to the comparison result, wherein, under the condition that the transmission rate grade is the ith grade, the transmission rate corresponding to the ith grade is configured for the data volume of the streaming media data, and i is a natural number which is more than or equal to 1.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 10 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 10 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., couplers, etc.) than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
The memory 1002 may be used to store software programs and modules, such as program instructions/modules corresponding to the transmission control method and apparatus in the embodiments of the present invention, and the processor 1004 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002, that is, implementing the transmission control method described above. The memory 1002 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1002 may further include memory located remotely from the processor 1004, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The user interface 1006 is used to receive or transmit data via a network. Examples of the network may include a wired network and a wireless network. In one example, user Interface 1006 includes a Network adapter (NIC) that can be coupled to a router via a Network cable to communicate with the internet or a local area Network. In one example, the user interface 1006 is a Radio Frequency (RF) module that is used to communicate with the internet via wireless means.
Specifically, the memory 1002 is configured to store a correspondence between a buffer duration and a transmission rate level, parameter contents such as a congestion control window, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A transmission control method, comprising:
acquiring a current data transmission state of a playing client, wherein the data transmission state is used for determining the transmission rate grade of streaming media data to be transmitted;
acquiring the buffering time length of the current playing content of the client, the video time length of the client needing to be buffered, and the number of data sources of the streaming media data to be transmitted, which are indicated by the data transmission state;
determining the data volume of the streaming media data to be transmitted by the playing client according to the buffering time length of the current playing content of the client, the video time length of the client which needs to be buffered, and the number of the data sources of the streaming media data to be transmitted, which are indicated by the data transmission state;
obtaining a comparison result between the data volume of the streaming media data and a preset threshold value;
determining the transmission rate grade of the data volume of the streaming media data according to the comparison result, wherein when the transmission rate grade is an ith grade, a transmission rate corresponding to the ith grade is configured for the data volume of the streaming media data, i is a natural number greater than or equal to 1, and when the data volume is larger, the transmission rate grade is higher;
acquiring a transmission control threshold according to the transmission rate grade, wherein the higher the transmission rate grade is, the larger the transmission control threshold is;
adjusting a congestion control window according to the transmission control threshold, wherein the congestion control window is used for controlling the transmission rate of the streaming media data;
and controlling the transmission of the streaming media data according to the adjusted congestion control window.
2. The method of claim 1, wherein the adjusting the congestion control window according to the transmission control threshold comprises:
under the condition that the successful transmission of the data packet transmitted last time is detected, adjusting the congestion control window according to a starting threshold value, wherein the starting threshold value is used for controlling the growth speed of the congestion control window;
and under the condition that the data packet transmitted last time is detected not to be transmitted successfully, adjusting the congestion control window according to a congestion threshold, wherein the congestion threshold is used for controlling the reduction speed of the congestion control window.
3. The method of claim 2, wherein the adjusting the congestion control window according to a startup threshold comprises:
adjusting the exponential increase of the width value of the congestion control window when the congestion control window is smaller than the starting threshold;
and adjusting the width value of the congestion control window to linearly increase under the condition that the congestion control window is larger than or equal to the starting threshold.
4. The method of claim 2, wherein the adjusting the congestion control window according to a congestion threshold comprises:
under the condition that the unsuccessfully transmitted time length of the last transmitted data packet reaches an overtime threshold value, determining that the last transmitted data packet is lost, and reducing the width value of the congestion control window according to a first amplitude;
when the unsuccessfully transmitted time length of the last transmitted data packet does not reach the overtime threshold value but the transmission round-trip delay reaches the congestion threshold value, reducing the width value of the congestion control window according to a second amplitude;
wherein the congestion threshold is less than the timeout threshold, and the second magnitude is less than the first magnitude.
5. The method according to claim 1, wherein before said determining the transmission rate level of the data volume of the streaming media data according to the comparison result, at least one of the following is further included:
receiving a notification instruction sent by an application layer, wherein the notification instruction carries the data volume of the streaming media data;
acquiring an interface calling instruction sent by an application layer, wherein the interface calling instruction carries the transmission rate grade corresponding to the data volume of the streaming media data so as to call a transmission control interface corresponding to the transmission rate grade;
and acquiring a shared global variable, wherein the shared global variable is used for recording the transmission rate grade determined by the application layer according to the data volume of the streaming media data.
6. A transmission control apparatus, comprising:
the device comprises a first acquisition unit, a second acquisition unit and a processing unit, wherein the first acquisition unit is used for acquiring the current data transmission state of a playing client, and the data transmission state is used for determining the transmission rate grade of streaming media data to be transmitted;
the device is also used for acquiring the data volume of the streaming media data to be transmitted by the playing client according to the data transmission state; determining the transmission rate grade according to the data volume of the streaming media data;
the device further comprises: a second obtaining module, configured to obtain a buffering duration of a currently played content of the client, a video duration of the client that needs to be buffered, and a number of data sources of the streaming media data to be transmitted, where the number is indicated by the data transmission state; a first determining module, configured to determine, according to a buffering duration of a currently played content of the client, a video duration of the client that still needs to be buffered, and a number of data sources of the streaming media data to be transmitted, where the number is indicated by the data transmission state, a data amount of the streaming media data to be transmitted by the playing client;
the device further comprises: a fifth obtaining module, configured to obtain a comparison result between the data amount of the streaming media data and a predetermined threshold; a second determining module, configured to determine the transmission rate level of the data volume of the streaming media data according to the comparison result, where, when the transmission rate level is an ith level, a transmission rate corresponding to the ith level is configured for the data volume of the streaming media data, i is a natural number greater than or equal to 1, and when the data volume is larger, the transmission rate level is higher; the device further comprises an adjusting unit, wherein the adjusting unit comprises a first obtaining module, which is used for obtaining a transmission control threshold value according to the transmission rate grade, wherein the higher the transmission rate grade is, the larger the transmission control threshold value is; an adjusting module, configured to adjust a congestion control window according to the transmission control threshold, where the congestion control window is used to control a transmission rate of the streaming media data;
and the control transmission unit is used for controlling the transmission of the streaming media data according to the adjusted congestion control window.
7. The apparatus of claim 6, wherein the adjustment module comprises:
a first adjusting submodule, configured to adjust the congestion control window according to a start threshold when it is detected that a data packet transmitted last time is successfully transmitted, where the start threshold is used to control a growth speed of the congestion control window;
and the second adjusting submodule is used for adjusting the congestion control window according to a congestion threshold value under the condition that the data packet transmitted last time is detected to be unsuccessfully transmitted, wherein the congestion threshold value is used for controlling the reduction speed of the congestion control window.
8. The apparatus of claim 7, wherein the first adjustment submodule enables adjustment of the congestion control window based on a startup threshold by:
adjusting the exponential increase of the width value of the congestion control window when the congestion control window is smaller than the starting threshold;
and adjusting the width value of the congestion control window to linearly increase under the condition that the congestion control window is larger than or equal to the starting threshold.
9. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 5 when executed.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 5 by means of the computer program.
CN201810155696.3A 2018-02-23 2018-02-23 Transmission control method and apparatus, storage medium, and electronic apparatus Active CN108494702B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810155696.3A CN108494702B (en) 2018-02-23 2018-02-23 Transmission control method and apparatus, storage medium, and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810155696.3A CN108494702B (en) 2018-02-23 2018-02-23 Transmission control method and apparatus, storage medium, and electronic apparatus

Publications (2)

Publication Number Publication Date
CN108494702A CN108494702A (en) 2018-09-04
CN108494702B true CN108494702B (en) 2021-05-11

Family

ID=63340740

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810155696.3A Active CN108494702B (en) 2018-02-23 2018-02-23 Transmission control method and apparatus, storage medium, and electronic apparatus

Country Status (1)

Country Link
CN (1) CN108494702B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109257298A (en) * 2018-11-06 2019-01-22 上海航天测控通信研究所 Method for controlling network flow based on adaptive ratio control algolithm
CN112039686B (en) * 2019-06-03 2023-08-04 杭州海康威视系统技术有限公司 Data stream transmission control method, device, monitoring equipment and storage medium
CN117835317A (en) * 2023-10-19 2024-04-05 湖北星纪魅族科技有限公司 Short-range data transmission method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873189A (en) * 2012-12-13 2014-06-18 联想(北京)有限公司 Data transmission method and device
WO2014089752A1 (en) * 2012-12-11 2014-06-19 华为技术有限公司 Stream media transmission method, apparatus and communication device
CN106789702A (en) * 2016-12-30 2017-05-31 广州华多网络科技有限公司 Control the method and device of TCP transmission performance
CN106789718A (en) * 2016-12-05 2017-05-31 广东神马搜索科技有限公司 The jamming control method of data transfer, equipment, server and programmable device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014089752A1 (en) * 2012-12-11 2014-06-19 华为技术有限公司 Stream media transmission method, apparatus and communication device
CN103873189A (en) * 2012-12-13 2014-06-18 联想(北京)有限公司 Data transmission method and device
CN106789718A (en) * 2016-12-05 2017-05-31 广东神马搜索科技有限公司 The jamming control method of data transfer, equipment, server and programmable device
CN106789702A (en) * 2016-12-30 2017-05-31 广州华多网络科技有限公司 Control the method and device of TCP transmission performance

Also Published As

Publication number Publication date
CN108494702A (en) 2018-09-04

Similar Documents

Publication Publication Date Title
CN101001362B (en) Method and terminal of on-line playing flow media
CN106576198B (en) The system and method for adaptive bitrate streaming
CN110636339B (en) Scheduling method and device based on code rate and electronic equipment
CN108494702B (en) Transmission control method and apparatus, storage medium, and electronic apparatus
CN105898388B (en) A kind of node download schedule method and apparatus
KR20130104358A (en) Apparatus and method for processing a multimedia data in terminal equipment
CN108063769A (en) A kind of implementation method of content service, device and content delivery network node
CN103457966A (en) Method, equipment and system for accessing cloud storage equipment on basis of DLNA (digital living network alliance) technology
CN103430489A (en) File download method, device, and system in content delivery network
CN104219286A (en) Method and device for processing stream media, client, CDN (content delivery network) node server and terminal
CN109152057A (en) Time slice distribution method and device and electronic equipment
CN108235136A (en) A kind of data playing method and terminal device
CN105828134A (en) A playback control method and device in an audio and video playback system
JP5669818B2 (en) Method, electronic device and server device for receiving and transmitting multimedia content
CN110139123A (en) The broadcasting of files in stream media, transmission, treating method and apparatus
US9699103B2 (en) Method and system for flow controlling
JP6485865B2 (en) Delivery control device, relay device, delivery system, delivery control method, and program
EP3249891B1 (en) File download method and play device
CN104618736B (en) Multimedia downloading method and device
CN110602338B (en) Audio processing method, device, system, storage medium and equipment
CN114745572A (en) Video cache control method, device, equipment and storage medium
JP6305738B2 (en) Media playback control device, media playback control method, and program
KR20090059263A (en) Method and system for providing distributed streaming service of mobile terminal
US20240292265A1 (en) Automatic adjustment of throughput rate to optimize wireless device battery performance
JP7162019B2 (en) DATA STREAMING METHOD, DATA STREAMING DEVICE, AND COMPUTER PROGRAM

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant