CN107342848B - Self-adaptive code stream transmission method, device and equipment - Google Patents

Self-adaptive code stream transmission method, device and equipment Download PDF

Info

Publication number
CN107342848B
CN107342848B CN201710734327.5A CN201710734327A CN107342848B CN 107342848 B CN107342848 B CN 107342848B CN 201710734327 A CN201710734327 A CN 201710734327A CN 107342848 B CN107342848 B CN 107342848B
Authority
CN
China
Prior art keywords
current
network state
bandwidth
time
current network
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
CN201710734327.5A
Other languages
Chinese (zh)
Other versions
CN107342848A (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.)
Hangzhou Lianji Technology Co ltd
Original Assignee
Hangzhou Lianji Technology 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 Hangzhou Lianji Technology Co ltd filed Critical Hangzhou Lianji Technology Co ltd
Priority to CN201710734327.5A priority Critical patent/CN107342848B/en
Publication of CN107342848A publication Critical patent/CN107342848A/en
Application granted granted Critical
Publication of CN107342848B publication Critical patent/CN107342848B/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
    • 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
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/18Vocoders using multiple modes
    • G10L19/24Variable rate codecs, e.g. for generating different qualities using a scalable representation such as hierarchical encoding or layered encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • H04L1/1621Group acknowledgement, i.e. the acknowledgement message defining a range of identifiers, e.g. of sequence numbers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1809Selective-repeat protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/164Feedback from the receiver or from the transmission channel

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Quality & Reliability (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

An adaptive code stream transmission method includes: determining the current network state according to the number of data packets or bytes sent by the sending end and received by the receiving end in each time slice within a first preset time range before the current time; and calling a code stream transmission strategy corresponding to the current network state according to the current network state. The method can accurately and effectively identify the current network state, and then search the corresponding code stream transmission strategy to transmit the code stream according to the identified current network state, so that the code stream can adapt to the requirements of different network states, and the method is favorable for reducing picture blockage and screen splash.

Description

Self-adaptive code stream transmission method, device and equipment
Technical Field
The present invention belongs to the field of communications, and in particular, to a method, an apparatus, and a device for transmitting an adaptive code stream.
Background
Streaming Media (Streaming Media) refers to a Media format that is played on the Internet in a Streaming manner. The advent of Streaming Media has greatly facilitated people's work and life. The time-base media such as sound, image or animation, etc. are continuously transmitted to the user terminal by the audio and video server or IPC, etc., and the user can watch the file without waiting for the whole file to be completely downloaded. The waiting time of the user is greatly reduced, and the cache capacity is reduced.
When streaming media data is transmitted, the quality of data transmission may be affected due to network congestion or packet loss and other abnormal conditions. In order to improve the data transmission quality, a retransmission strategy and a congestion control strategy similar to the TCP protocol are currently adopted, including: the client sends a receiving confirmation packet to the server; and the server detects whether packet loss exists or not according to the transmitted data and the received acknowledgement packet, and retransmits the packet-lost data.
The control strategy ensures that each outgoing packet needs to be acknowledged, otherwise it should be retransmitted. The server first estimates the round trip time of the packet beyond which the unacknowledged packets need to be retransmitted. The acknowledgement of several packets may be sent back to the sender by one packet. The packet sending capability of the server is controlled by the size of a congestion window, which refers to the number of unacknowledged packets that the server can send at most. When a packet has been sent, the window is decreased; when a packet is acknowledged, the window is increased.
Through a control strategy of packet loss retransmission, the quality of transmitted images can be effectively improved, but when the network environment changes, such as bandwidth changes or network jitter, pictures are easy to be jammed and displayed.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, and a device for adaptive code stream transmission, so as to solve the problem that picture blocking and screen floating are likely to occur due to a change in a network environment during code stream transmission in the prior art.
A first aspect of an embodiment of the present invention provides an adaptive code stream transmission method, where the adaptive code stream transmission method includes:
determining the current network state according to the number of data packets or bytes sent by the sending end and received by the receiving end in each time slice within a first preset time range before the current time;
and calling a code stream transmission strategy corresponding to the current network state according to the current network state.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the determining, according to the number of data packets or the number of bytes received by the receiving end, sent by the sending end in each time slice within a first predetermined time range before the current time, a current network state includes:
acquiring the number of data packets or bytes sent by a sending end and received by a receiving end in each time slice within a first preset time range before the current time;
according to the time interval between the time slice and the current time, when the time interval is smaller, a higher weight is distributed to the time slice, and the current required bandwidth and the actual effective bandwidth are calculated through weighted average;
and comparing the current required bandwidth with the actual effective bandwidth, and determining the current network state according to the comparison result.
With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the invoking, according to the current network state, a code stream transmission policy corresponding to the current network state includes:
when the current network state is a network jitter state, if an acknowledgement packet ACK corresponding to the data packet is not received, and an acknowledgement packet ACK of the data packet sent by a time slice in which the data packet is positioned is received, or the corresponding acknowledgement packet ACK is not received within a second preset time range, the data packet is a packet to be retransmitted;
and if the interval between the current time and the initial transmission time of the data packet is more than a first preset time length or the packet to be retransmitted is retransmitted, the retransmission is not carried out.
With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the method further includes:
when the jitter value of the network jitter state exceeds a preset jitter threshold value, adding an error correction code on the packet to be retransmitted when retransmitting the packet to be retransmitted.
With reference to the first aspect, in a fourth possible implementation manner of the first aspect, the invoking, according to the current network state, a code stream transmission policy corresponding to the current network state includes:
when the current network state is insufficient bandwidth or the packet loss rate is continuous, calculating the current allowed bandwidth;
and searching the transmission quality corresponding to the currently allowed bandwidth according to the corresponding relation between the preset bandwidth and the transmission quality, and transmitting the code stream according to the searched transmission quality.
With reference to the first aspect, in a fifth possible implementation manner of the first aspect, the invoking, according to the current network state, a code stream transmission policy corresponding to the current network state includes:
and when the current network state is sufficient bandwidth, searching the transmission quality corresponding to the bandwidth of the current network state according to the corresponding relation between the preset bandwidth and the transmission quality to transmit the code stream.
With reference to the fourth possible implementation manner of the first aspect or the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the transmission quality includes: transmitting audio of less than normal quality, transmitting audio of normal quality and video of less than normal quality, transmitting audio of normal quality and video of normal quality.
A second aspect of an embodiment of the present invention provides an adaptive code stream transmission apparatus including:
a network state determining unit, configured to determine a current network state according to the number of data packets or the number of bytes sent by the sending end and received by the receiving end in each time slice within a first predetermined time range before the current time;
and the strategy calling unit is used for calling a code stream transmission strategy corresponding to the current network state according to the current network state.
A third aspect of embodiments of the present invention provides an adaptive codestream transmission device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the adaptive codestream transmission method according to any one of the first aspect when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the adaptive code stream transmission method according to any one of the first aspects.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: the current network state is determined according to the data packet quantity or byte quantity sent by the sending end and received by the receiving end in each time slice within a first preset time range before the current time, the current network state can be accurately and effectively identified, and then the corresponding code stream transmission strategy is searched for code stream transmission according to the identified current network state, so that the code stream meets the requirements of different network states, and the reduction of picture blockage and screen splash is facilitated.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart illustrating an implementation of an adaptive code stream transmission method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an implementation of determining a current network state according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating an implementation of an adaptive code stream transmission method in a network jitter state according to an embodiment of the present invention;
fig. 4 is a schematic flow chart of an implementation of an adaptive code stream transmission method when bandwidth is insufficient according to an embodiment of the present invention;
FIG. 5 is a diagram of an adaptive code stream transmission apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an adaptive code stream transmission apparatus according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 shows an implementation flow of an adaptive code stream transmission method according to an embodiment of the present invention, which is detailed as follows:
in step S101, a current network status is determined according to the number of data packets or bytes sent by the sending end and received by the receiving end in each time slice within a first predetermined time range before the current time.
Specifically, in the transmission process of the code stream, in order to ensure that the code stream data packet is effectively transmitted to the receiving end, after the client receives the code stream, an acknowledgement packet ACK is returned. The acknowledgement packet ACK may comprise acknowledgement information for a plurality of data packets. Here, the acknowledgement packet ACK is an abbreviation of acknowledge. During the transmission of the code stream, an ACK (acknowledgement) packet is returned in each time slice. An acknowledgement packet may be a message to all the clients receiving the data packet within the time slice.
The first predetermined time range may be set as the sum of the time lengths of a plurality of time slices. For example, N time slices may be set, where N is greater than or equal to 2. The time slice can be flexibly set according to the time when the network jitter occurs. Determining the current network state by obtaining the number of data packets and the number of bytes received and transmitted in each time slice within the first predetermined time range, as shown in fig. 2, may specifically include:
in step S201, the number of data packets or bytes sent by the sending end and received by the receiving end in each time slice within a first predetermined time range before the current time are obtained.
The length of each time slice is the same, a plurality of continuous time slices before the current time are obtained, and the number of data packets or the number of bytes sent by a sending end (generally a server or a network camera IPC) and received by a receiving end in each time slice are counted. The number of data packets or the number of bytes received by the receiving end may be obtained according to an ACK packet fed back to the transmitting end by the receiving end.
In step S202, according to the time interval between the time slice and the current time, when the time interval is smaller, a higher weight is assigned to the time slice, and the current required bandwidth and the actual effective bandwidth are calculated by weighted average.
After the number of data packets or the number of bytes sent by each time slice and the number of data packets or the number of bytes received by the receiving end are obtained, the current required bandwidth is calculated according to the number of data packets or the number of bytes sent by each time slice, and the current actual effective bandwidth is calculated according to the number of data packets or the number of bytes received by the receiving end of each time slice.
In a preferred embodiment, different weights may be assigned to different time slices, and the weight assigned to a time slice closer to the current time is higher. When the weighting calculation is carried out on a plurality of time slices, more effective current required bandwidth and actual effective bandwidth can be obtained.
The calculation of the current required bandwidth may be obtained by calculating the number of data packets or the number of bytes sent by each time slice according to weighting and combining with the corresponding weight.
The current actual effective bandwidth can be obtained by calculating the number of data packets or bytes received by the receiving end in each time slice according to weighting and combining with the corresponding weight.
Because the weight value corresponding to the time slice which is closer to the current time is higher, the calculated weighted average value can effectively reflect the data state of the current time, and the influence of single time slice abnormity on bandwidth calculation can be avoided.
In step S203, the current required bandwidth is compared with the actual effective bandwidth, and the current network status is determined according to the comparison result.
The current network state can be determined according to the comparison result of the current actual effective bandwidth and the current required bandwidth and the combination of the duration time. And if the difference value between the current actual effective bandwidth and the current required bandwidth is smaller than the preset difference value and the detected duration is smaller than the preset duration, the current network state is the network jitter state.
And if the current actual effective bandwidth is smaller than the current required bandwidth, the difference is larger than the preset difference, and the duration is longer than the preset duration, the current network state is that the network bandwidth is insufficient.
And if the current actual effective bandwidth is still smaller than the current required bandwidth after the corresponding strategy adjustment is adopted in the network bandwidth insufficiency or network jitter state, determining that the current network state is the network state including the environmental noise.
In step S102, a code stream transmission policy corresponding to the current network state is invoked according to the current network state.
According to the comparison result of the current required bandwidth and the actual effective bandwidth, whether the current network is in a network jitter state or not or whether the network bandwidth is insufficient can be determined.
When the current network state is a network jitter state, the problems of screen splash and blockage can be reduced through a data retransmission strategy.
When the current network state is that the network bandwidth is insufficient, the quality of the transmitted audio and/or video can be adjusted according to the current allowed bandwidth, and the problems of screen splash and blockage are reduced.
And after the strategy is applied, judging that the current state of the network is the network state of the environmental noise if the difference value between the current required bandwidth and the actual effective bandwidth is still larger than the preset difference value. Forward Error Correction FEC (generic Forward Error Correction in english) may be performed by starting audio and I frames; and then the code rate of the encoder is adjusted according to the allowed bandwidth under the condition of FEC starting.
The current network state is determined according to the data packet quantity or byte quantity sent by the sending end and received by the receiving end in each time slice within a first preset time range before the current time, the current network state can be accurately and effectively identified, and then the corresponding code stream transmission strategy is searched for code stream transmission according to the identified current network state, so that the code stream meets the requirements of different network states, and the reduction of picture blockage and screen splash is facilitated.
Fig. 3 is a flow chart of an implementation of an adaptive code stream transmission method in a network jitter state according to an embodiment of the present invention, which is detailed as follows:
in step S301, a current network status is determined according to the number of data packets or bytes sent by the sending end and received by the receiving end in each time slice within a first predetermined time range before the current time.
In step S302, when the current network state is the network jitter state, if the ACK corresponding to the data packet is not received, and the ACK of the data packet sent later than the time slice where the data packet is located is received, or the ACK corresponding to the data packet is not received within a second predetermined time range, the data packet is a packet to be retransmitted.
Specifically, according to the method for determining a current network state shown in fig. 2, when the current network state is determined to be the network jitter state, a corresponding transmission policy may be determined according to the return time of the acknowledgement packet ACK, which may specifically be:
and if the ACK corresponding to the data packet is not received and the ACK of the data packet sent by the time slice in which the data packet is positioned is received, the data packet is a packet to be retransmitted.
By the arrival of the next feedback information, it can be determined whether the reason why the ACK message is not acknowledged in the previous feedback information is delayed due to out-of-order or lost.
Or, in a second predetermined time range after the initial transmission time, if the corresponding acknowledgement packet ACK is not received, the packet is a packet to be retransmitted.
In step S303, if the interval between the current time and the initial transmission time of the data packet is greater than the first predetermined time period, or the packet to be retransmitted has been retransmitted, the retransmission is not performed.
And after the data packet is determined to be the packet to be retransmitted, retransmitting the packet to be retransmitted to ensure that the data packet still effectively arrives at the receiving end. In order to avoid that the data is invalid when the retransmission packet arrives at the receiving end, for example, the data is played, in this step, if the interval between the current time and the initial transmission time of the data packet is set to be longer than the first predetermined time, the retransmission is not performed, and if the interval between the current time and the initial transmission time of the data packet is shorter than the first predetermined time, the packet to be retransmitted is retransmitted. This is because the buffer space of the receiving end is limited, and when the retransmission packet interval is too long, the receiving end will not have time to frame, store or preview even though it has received the retransmission packet, and therefore the retransmission packet exceeding the first predetermined time period is invalid. If the data packet has been retransmitted, it may not be retransmitted.
In addition, if the jitter value in the network jitter state is larger than a certain threshold value and the network bandwidth is sufficient, a forward error correction mechanism can be further added on the basis of the retransmission,
the adaptive code stream transmission method shown in fig. 3 correspondingly adopts a retransmission transmission strategy for a network jitter state, so that the probability of a blocking and screen-splash fault at a receiving end can be effectively reduced.
Fig. 4 is a flow of implementing the adaptive code stream transmission method adopted for the current network state with insufficient bandwidth according to the embodiment of the present invention, which is detailed as follows:
in step S401, the current network status is determined according to the number of data packets or bytes sent by the sending end and received by the receiving end in each time slice within a first predetermined time range before the current time.
Step S401 is substantially the same as step S101.
In step S402, when the current network state is bandwidth shortage or packet loss rate is continuous, a current allowed bandwidth is calculated.
If the current actual effective bandwidth is smaller than the current required bandwidth, and the difference is larger than the predetermined difference, and the duration is longer than the predetermined duration, the server may determine the successfully transmitted data, the size of the successfully transmitted data packet, and the transmission time according to the received acknowledgement packet ACK, so as to calculate the current allowed bandwidth.
Due to insufficient network bandwidth, the current required bandwidth needs to be reduced by adjusting the encoder, so that the phenomenon of blocking or screen splash is avoided.
In step S403, according to the preset correspondence between the bandwidth and the transmission quality, the transmission quality corresponding to the currently allowed bandwidth is searched, and the code stream is transmitted according to the searched transmission quality.
The transmission quality may include:
transmitting lower than normal quality audio: the audio with the preset lower code rate can be coded.
Transmitting normal quality audio: and encoding the audio according to the normal code rate.
Transmitting normal quality audio and lower than normal quality video: on the basis of coding the audio by the normal code rate, Forward Error Correction (FEC) is started, and the video can only select I frame coding;
transmitting normal quality audio and normal quality video: normal audio coding and forward error correction FEC may be enabled or not enabled, video may be coded using only I frames and forward error correction FEC, or may be coded using normal rate video.
In addition, in the application, if the network condition is improved, the code rate can be correspondingly improved according to the current network state, so that the audio and video quality is improved. In addition, when the code rate is increased, the increased upper limit of the code rate should be smaller than the upper limit of the output code rate of the encoder.
In addition, when the code rate is increased, whether the bandwidth changes obviously in a period of time before the current time or not can be considered, or the interval between the time of last code rate adjustment and the current time can be considered.
For example, when there is no bandwidth change in a period of time before the current time and the time of the last code rate adjustment exceeds the current time by a set adjustment threshold time, the code rate adjustment is performed, otherwise, the code rate adjustment is not performed. When the code rate adjustment has reached the quality requirement, the code rate adjustment can also be stopped.
When the corresponding transmission strategy is adopted for the network jitter state and the network bandwidth insufficiency, and the difference value between the current required bandwidth and the actual effective bandwidth is still larger than the preset difference value, the current network is considered to have environmental noise, and the forward error correction FEC needs to be started.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 5 is a schematic structural diagram of an adaptive code stream transmission apparatus according to an embodiment of the present invention, which is detailed as follows:
the adaptive code stream transmission apparatus includes:
a network status determining unit 501, configured to determine a current network status according to the number of data packets or bytes sent by the sending end and received by the receiving end in each time slice within a first predetermined time range before the current time;
a policy invoking unit 502, configured to invoke, according to the current network state, a code stream transmission policy corresponding to the current network state.
The adaptive codestream transmission apparatus described in fig. 5 corresponds to the adaptive codestream transmission method described in fig. 1 to 4.
Fig. 6 is a schematic diagram of an adaptive code stream transmission apparatus according to an embodiment of the present invention. As shown in fig. 6, the adaptive code stream transmission apparatus 6 of this embodiment includes: a processor 60, a memory 61 and a computer program 62, such as an adaptive streaming program, stored in said memory 61 and executable on said processor 60. The processor 60, when executing the computer program 62, implements the steps in the various adaptive stream transmission method embodiments described above, such as the steps 101 to 102 shown in fig. 1. Alternatively, the processor 60, when executing the computer program 62, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 501 to 502 shown in fig. 5.
Illustratively, the computer program 62 may be partitioned into one or more modules/units that are stored in the memory 61 and executed by the processor 60 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the adaptive code stream transmission device 6. For example, the computer program 62 may be divided into a network status determination unit and a policy invocation unit, and each unit functions specifically as follows:
a network state determining unit, configured to determine a current network state according to the number of data packets or the number of bytes sent by the sending end and received by the receiving end in each time slice within a first predetermined time range before the current time;
and the strategy calling unit is used for calling a code stream transmission strategy corresponding to the current network state according to the current network state.
The adaptive code stream transmission device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The adaptive code stream transmission device may include, but is not limited to, a processor 60, a memory 61. It will be appreciated by those skilled in the art that fig. 6 is merely an example of an adaptive codestream transmission device 6 and does not constitute a limitation of the adaptive codestream transmission device 6 and may include more or fewer components than shown, or some components in combination, or different components, e.g., the adaptive codestream transmission device may also include an input output device, a network access device, a bus, etc.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the adaptive codestream transmitting device 6, such as a hard disk or a memory of the adaptive codestream transmitting device 6. The memory 61 may also be an external storage device of the adaptive code stream transmission device 6, such as a plug-in hard disk provided on the adaptive code stream transmission device 6, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 61 may also include both an internal storage unit of the adaptive code stream transmission apparatus 6 and an external storage apparatus. The memory 61 is used to store the computer program and other programs and data required by the adaptive codestream transmission device. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or 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, devices or units, and may be in an electrical, mechanical 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 integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. An adaptive code stream transmission method, comprising:
determining the current network state according to the number of data packets or bytes sent by the sending end and received by the receiving end in each time slice within a first preset time range before the current time, wherein the determining specifically comprises the following steps: acquiring the number of data packets or the number of bytes sent by a sending end and received by a receiving end in each time slice within a first preset time range before the current time, calculating the current required bandwidth according to the number of the data packets and the number of the bytes sent by each time slice, calculating the current actual effective bandwidth according to the number of the data packets and the number of the bytes received by the receiving end of each time slice, comparing the current required bandwidth with the actual effective bandwidth, and determining the current network state according to the comparison result;
calling a code stream transmission strategy corresponding to the current network state to transmit the code stream according to the current network state, wherein the network state comprises: network jitter state, network bandwidth insufficiency, network state including environmental noise, the code stream transmission strategies corresponding to the network state are respectively: data retransmission, adjusting the quality of transmitted audio and/or video, and adjusting the encoder rate according to the allowed bandwidth under the condition of audio and I frame forward error correction FEC starting.
2. The adaptive streaming method according to claim 1, wherein the step of determining the current network status according to the number of packets or bytes transmitted by the transmitting end and received by the receiving end in each time slice within a first predetermined time range before the current time comprises:
acquiring the number of data packets or bytes sent by a sending end and received by a receiving end in each time slice within a first preset time range before the current time;
according to the time interval between the time slice and the current time, when the time interval is smaller, a higher weight is distributed to the time slice, and the current required bandwidth and the actual effective bandwidth are calculated through weighted average;
and comparing the current required bandwidth with the actual effective bandwidth, and determining the current network state according to the comparison result.
3. The adaptive bitstream transmission method according to claim 1 or 2, wherein the invoking a bitstream transmission policy corresponding to the current network state according to the current network state comprises:
when the current network state is a network jitter state, if an acknowledgement packet ACK corresponding to the data packet is not received, and an acknowledgement packet ACK of the data packet sent by a time slice in which the data packet is positioned is received, or the corresponding acknowledgement packet ACK is not received within a second preset time range, the data packet is a packet to be retransmitted;
and if the interval between the current time and the initial transmission time of the data packet is more than a first preset time length or the packet to be retransmitted is retransmitted, the retransmission is not carried out.
4. The adaptive codestream transmission method according to claim 3, characterized in that it further comprises:
when the jitter value of the network jitter state exceeds a preset jitter threshold value, adding an error correction code on the packet to be retransmitted when retransmitting the packet to be retransmitted.
5. The adaptive bitstream transmission method according to claim 1, wherein the invoking a bitstream transmission policy corresponding to the current network state according to the current network state comprises:
when the current network state is insufficient bandwidth or the packet loss rate is continuous, calculating the current allowed bandwidth;
and searching the transmission quality corresponding to the currently allowed bandwidth according to the corresponding relation between the preset bandwidth and the transmission quality, and transmitting the code stream according to the searched transmission quality.
6. The adaptive bitstream transmission method according to claim 1, wherein the invoking a bitstream transmission policy corresponding to the current network state according to the current network state comprises:
and when the current network state is sufficient bandwidth, searching the transmission quality corresponding to the bandwidth of the current network state according to the corresponding relation between the preset bandwidth and the transmission quality to transmit the code stream.
7. The adaptive codestream transmission method according to claim 5 or 6, characterized in that the transmission quality comprises: transmitting audio of less than normal quality, transmitting audio of normal quality and video of less than normal quality, transmitting audio of normal quality and video of normal quality.
8. An adaptive codestream transmission apparatus, comprising:
a network state determining unit, configured to determine a current network state according to the number of data packets or the number of bytes sent by the sending end and received by the receiving end in each time slice within a first predetermined time range before the current time, where the determining unit specifically is: acquiring the number of data packets or the number of bytes sent by a sending end and received by a receiving end in each time slice within a first preset time range before the current time, calculating the current required bandwidth according to the number of the data packets and the number of the bytes sent by each time slice, calculating the current actual effective bandwidth according to the number of the data packets and the number of the bytes received by the receiving end of each time slice, comparing the current required bandwidth with the actual effective bandwidth, and determining the current network state according to the comparison result;
a policy invoking unit, configured to invoke, according to the current network state, a code stream transmission policy corresponding to the current network state to perform code stream transmission, where the network state includes: network jitter state, network bandwidth insufficiency, network state including environmental noise, the code stream transmission strategies corresponding to the network state are respectively: data retransmission, adjusting the quality of transmitted audio and/or video, and adjusting the encoder rate according to the allowed bandwidth under the condition of audio and I frame forward error correction FEC starting.
9. An adaptive codestream transmission device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor implements the steps of the adaptive codestream transmission method according to any of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the adaptive code streaming method according to any of claims 1 to 7.
CN201710734327.5A 2017-08-24 2017-08-24 Self-adaptive code stream transmission method, device and equipment Active CN107342848B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710734327.5A CN107342848B (en) 2017-08-24 2017-08-24 Self-adaptive code stream transmission method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710734327.5A CN107342848B (en) 2017-08-24 2017-08-24 Self-adaptive code stream transmission method, device and equipment

Publications (2)

Publication Number Publication Date
CN107342848A CN107342848A (en) 2017-11-10
CN107342848B true CN107342848B (en) 2020-05-01

Family

ID=60214388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710734327.5A Active CN107342848B (en) 2017-08-24 2017-08-24 Self-adaptive code stream transmission method, device and equipment

Country Status (1)

Country Link
CN (1) CN107342848B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108833930B (en) * 2018-06-20 2020-10-02 广州华多网络科技有限公司 Live broadcast data transmission control method and device, live broadcast equipment and storage medium
CN109343902B (en) * 2018-09-26 2021-08-03 Oppo广东移动通信有限公司 Audio processing assembly operation method and device, terminal and storage medium
CN109413442B (en) * 2018-10-12 2020-10-09 南京机器岛智能科技有限公司 Sound box self-adaptive code rate adjusting method
CN109600610B (en) * 2018-11-12 2020-10-23 深圳市景阳科技股份有限公司 Data encoding method, terminal and computer readable storage medium
CN111245769B (en) * 2018-11-28 2022-09-30 深圳技威时代科技有限公司 Audio and video transmission method and device and storage medium
CN109862400B (en) * 2019-02-18 2021-08-31 苏州长风航空电子有限公司 Streaming media transmission method, device and system
CN111010389B (en) * 2019-12-11 2022-10-18 浙江大华技术股份有限公司 Code stream adjusting method and device, storage medium and electronic device
CN111314439A (en) * 2020-01-20 2020-06-19 北京无限光场科技有限公司 Data sending method and device and electronic equipment
CN111193673B (en) * 2020-04-10 2020-08-25 亮风台(上海)信息科技有限公司 Data transmission rate control method, system and user equipment
CN111654761A (en) * 2020-04-20 2020-09-11 威比网络科技(上海)有限公司 Video processing method, system, device and medium based on online education
CN111628847B (en) * 2020-05-06 2022-04-08 上海幻电信息科技有限公司 Data transmission method and device
CN111741248B (en) * 2020-05-26 2024-03-15 视联动力信息技术股份有限公司 Data transmission method, device, terminal equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105531968A (en) * 2013-09-11 2016-04-27 思科技术公司 Network-based adaptive rate limiting
CN105634865A (en) * 2015-12-29 2016-06-01 广州华多网络科技有限公司 Method and system for obtaining bandwidth

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7315515B2 (en) * 2003-09-30 2008-01-01 Conexant Systems, Inc. TCP acceleration system
CN106982371B (en) * 2016-12-09 2020-08-11 上海谐桐信息技术有限公司 Code stream control method and system, code stream management method and system, and terminal equipment
CN106850579A (en) * 2017-01-03 2017-06-13 北京飞讯数码科技有限公司 Streaming media self-adapting flow rate adjusting method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105531968A (en) * 2013-09-11 2016-04-27 思科技术公司 Network-based adaptive rate limiting
CN105634865A (en) * 2015-12-29 2016-06-01 广州华多网络科技有限公司 Method and system for obtaining bandwidth

Also Published As

Publication number Publication date
CN107342848A (en) 2017-11-10

Similar Documents

Publication Publication Date Title
CN107342848B (en) Self-adaptive code stream transmission method, device and equipment
US9185045B1 (en) Transport protocol for interactive real-time media
US20160323062A1 (en) Packet recovery in interactive real-time media protocol
CA2591601C (en) Data flow control with duplicate acknowledgment
CN106416179A (en) Transport accelerator implementing extended transmission control functionality
CN111629210A (en) Data processing method and device and electronic equipment
CN110677355A (en) Packet loss coping method and device, electronic equipment and storage medium
CN114039703B (en) Data transmission method, device, equipment and medium
WO2017097201A1 (en) Data transmission method, transmission device and receiving device
US9130740B2 (en) Variable acknowledge rate to reduce bus contention in presence of communication errors
CN112769526B (en) Data packet retransmission method, system and storage medium
CN102694631B (en) Method and device for controlling data transmission
CN110022218B (en) Multicast communication method, terminal device and storage medium
CN107566291B (en) Multicast transmission method, device, electronic equipment and storage medium
CN116920364A (en) Data processing method, device, electronic equipment and storage medium
CN116546276A (en) Link bandwidth estimation method, device, equipment, storage medium and program product
CN116318545A (en) Video data transmission method, device, equipment and storage medium
CN114866196B (en) Data packet retransmission method, device, electronic equipment and storage medium
CN113242318B (en) Data transmission method and electronic equipment
EP3145187B1 (en) Method and apparatus for response of feedback information during video call
CN112351049B (en) Data transmission method, device, equipment and storage medium
CN115001632A (en) Information transmission method and device, electronic equipment and readable storage medium
CN114793146A (en) Data receiving method, data sending method and related equipment
CN116346952A (en) Transmission protocol parameter adjustment method, device, equipment and storage medium
CN114039702A (en) Data transmission method, device, equipment and medium

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