CN106791575A - The control method and equipment of a kind of data is activation - Google Patents

The control method and equipment of a kind of data is activation Download PDF

Info

Publication number
CN106791575A
CN106791575A CN201611199912.1A CN201611199912A CN106791575A CN 106791575 A CN106791575 A CN 106791575A CN 201611199912 A CN201611199912 A CN 201611199912A CN 106791575 A CN106791575 A CN 106791575A
Authority
CN
China
Prior art keywords
sent
video
audio
bandwidth
queue
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.)
Granted
Application number
CN201611199912.1A
Other languages
Chinese (zh)
Other versions
CN106791575B (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.)
MICSVIEW Corp
Original Assignee
MICSVIEW Corp
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 MICSVIEW Corp filed Critical MICSVIEW Corp
Priority to CN201611199912.1A priority Critical patent/CN106791575B/en
Publication of CN106791575A publication Critical patent/CN106791575A/en
Application granted granted Critical
Publication of CN106791575B publication Critical patent/CN106791575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/15Conference systems
    • H04N7/155Conference systems involving storage of or access to video conference sessions
    • 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/70Media network packetisation
    • 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/75Media network packet handling
    • H04L65/762Media network packet handling at the source 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/15Conference systems

Landscapes

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

Abstract

The purpose of the application is to provide the control method and equipment of a kind of data is activation, and the application is by being repeated below step:Acquired director data, voice data, video data are respectively processed into packet, are correspondingly placed into instruction queue, audio queue and video queue;Judge to whether there is packet to be sent in the instruction queue, if so, then sending the packet to be sent, and the current weighted average network bandwidth is calculated after being sent completely;Successively judge to whether there is packet to be sent in the audio queue and video queue afterwards, if, then compare the current weighted average network bandwidth and pre-set bandwidths threshold value, obtain comparative result, corresponding delivery plan is selected to send the packet to be sent according to comparative result, and recalculate the current weighted average network bandwidth after being sent completely, it is to avoid and the unclear problem of video blur that the mode that taking reduces image quality and resolution ratio is caused, adapt to the demand of user.

Description

The control method and equipment of a kind of data is activation
Technical field
The application is related to computer realm, more particularly to a kind of data is activation control method and equipment.
Background technology
With the development of information technology so that people carry out ditch by the network teleconference and business associate or friend It is logical.This communication is probably the teleconference in strange land, it is also possible to occurred between different office of same company.Cross Go, in order to ensure the quality of call, usually require that network communication uses corporate private network network.And present, increasing user It is directly to be communicated using flat board or mobile phone, the Office Wireless of family or company turns into the main company of above-mentioned communication Mode is connect, but this connected mode can not provide uncertain reliable transmission bandwidth, and its result is exactly that Web conference often breaks.
In this case, all building network is carried out according to certain standard because all of user cannot be required, so at present Having had some softwares can solve this problem, such as immediately according to the network bandwidth by way of reducing image quality and frame per second Communication video etc..Although solving subproblem by this way, the problem that video blur can be caused unclear, Consumer's Experience Difference.
Application content
One purpose of the application is to provide the control method and equipment of a kind of data is activation, and solution passes through in the prior art The mode of reduction image quality and resolution ratio causes the unclear problem of video blur while reducing bandwidth demand.
According to the one side of the application, there is provided a kind of control method of data is activation, the method includes being repeated below Step:
Acquired director data, voice data, video data are respectively processed into packet, instruction is correspondingly placed into In queue, audio queue and video queue;
Judge to whether there is packet to be sent in the instruction queue, if so, then sending the data to be sent Bag, and the current weighted average network bandwidth is calculated after being sent completely;
Judge to whether there is packets of audio data to be sent in the audio queue, if so, then comparing described current adding The weight average network bandwidth and preset audio bandwidth threshold, obtain comparative result, select corresponding audio to send according to comparative result Scheme sends the packets of audio data to be sent, and current weighted average Netowrk tape is recalculated after being sent completely It is wide;
Judge to whether there is video data bag to be sent in the video queue, if so, then compare current weighting putting down The equal network bandwidth and default video bandwidth threshold value, obtain comparative result, and corresponding video delivery plan is selected according to comparative result The video data bag to be sent is sent, and the current weighted average network bandwidth is recalculated after being sent completely.
Further, the current weighted average network bandwidth of the calculating, including:
Transmission information according to a transmitted recently packet determines currently transmitted speed, and remembers in queue is counted The transmission information of a nearest packet is recorded, wherein, the transmission information includes a transmitted length for packet With the time of transmission;
The transmission information of the packet in statistics queue calculates the of transmitted nearest n packet respectively One average transmission rate, the second average transmission rate of transmitted nearest m data bag, transmitted nearest w packet The 3rd average transmission rate, wherein, n, m and w are positive integer, and n>m>w;
By the currently transmitted speed, the first average transmission rate, the second average transmission rate and described Three average transmission rates are weighted averagely, obtain the weighted average network bandwidth.
Further, judge to whether there is packets of audio data to be sent in the audio queue, if so, then relatively more current The weighted average network bandwidth and preset audio bandwidth threshold, obtain comparative result, corresponding audio is selected according to comparative result Delivery plan sends the packets of audio data to be sent, including:
Judge to whether there is packets of audio data to be sent in the audio queue, if so, then compare current weighting putting down Whether the equal network bandwidth is more than the first preset audio bandwidth threshold;
If being less than or equal to, it is not send the packets of audio data to be sent to select corresponding audio delivery plan, and The packets of audio data is taken out from the audio queue;
If being more than, the scope choosing of the preset audio bandwidth threshold according to where the current weighted average network bandwidth Select corresponding audio delivery plan and send the packets of audio data to be sent.
Further, judge to whether there is video data bag to be sent in the video queue, if so, then relatively more current The weighted average network bandwidth and default video bandwidth threshold value, obtain comparative result, corresponding video is selected according to comparative result Delivery plan sends the video data bag to be sent, including:
Judge to whether there is video data bag to be sent in the video queue, if so, then compare current weighting putting down Whether the equal network bandwidth is more than the first default video bandwidth threshold value;
If being less than or equal to, it is not send the video data bag to be sent to select corresponding video delivery plan, and The video data bag is taken out from the video queue;
If being more than, the scope choosing of the default video bandwidth threshold value according to where the current weighted average network bandwidth Select corresponding video delivery plan and send the video data bag to be sent.
According to the another aspect of the application, a kind of control device of data is activation is additionally provided, the equipment includes:
Acquisition device, for acquired director data, voice data, video data to be respectively processed into data Bag, is correspondingly placed into instruction queue, audio queue and video queue;
Control instruction device, for judging to whether there is packet to be sent in the instruction queue, if so, then sending The packet to be sent, and the current weighted average network bandwidth is calculated after being sent completely;
Voice data dispensing device, for judging to whether there is packets of audio data to be sent in the audio queue, if It is, then the current weighted average network bandwidth and preset audio bandwidth threshold, obtains comparative result, according to compares knot Fruit selects corresponding audio delivery plan to send the packets of audio data to be sent, and is recalculated after being sent completely and work as The preceding weighted average network bandwidth;
Video data sends device, for judging to whether there is video data bag to be sent in the video queue, if It is that the then more current weighted average network bandwidth and default video bandwidth threshold value obtain comparative result, is selected according to comparative result Select corresponding video delivery plan to send the video data bag to be sent, and recalculated after being sent completely current The weighted average network bandwidth.
Further, the control instruction device, voice data dispensing device and video data send device and are used to:
Transmission information according to a transmitted recently packet determines currently transmitted speed, and remembers in queue is counted The transmission information of a nearest packet is recorded, wherein, the transmission information includes a transmitted length for packet With the time of transmission;
The transmission information of the packet in statistics queue calculates the of transmitted nearest n packet respectively One average transmission rate, the second average transmission rate of transmitted nearest m data bag, transmitted nearest w packet The 3rd average transmission rate, wherein, n, m and w are positive integer, and n>m>w;
By the currently transmitted speed, the first average transmission rate, the second average transmission rate and described Three average transmission rates are weighted averagely, obtain the weighted average network bandwidth.
Further, the voice data dispensing device is used for:
Judge to whether there is packets of audio data to be sent in the audio queue, if so, then compare current weighting putting down Whether the equal network bandwidth is more than the first preset audio bandwidth threshold;
If being less than or equal to, it is not send the packets of audio data to be sent to select corresponding audio delivery plan, and The packets of audio data is taken out from the audio queue;
If being more than, the scope choosing of the preset audio bandwidth threshold according to where the current weighted average network bandwidth Select corresponding audio delivery plan and send the packets of audio data to be sent.
Further, the video data sends device and is used for:
Judge to whether there is video data bag to be sent in the video queue, if so, then compare current weighting putting down Whether the equal network bandwidth is more than the first default video bandwidth threshold value;
If being less than or equal to, it is not send the video data bag to be sent to select corresponding video delivery plan, and The video data bag is taken out from the video queue;
If being more than, the scope choosing of the default video bandwidth threshold value according to where the current weighted average network bandwidth Select corresponding video delivery plan and send the video data bag to be sent.
Compared with prior art, the application is by being repeated below step:By acquired director data, voice data, regard Frequency is correspondingly placed into instruction queue, audio queue and video queue according to packet is respectively processed into;Judge the instruction Whether there is packet to be sent in queue, if so, then sending the packet to be sent, and calculated after being sent completely The current weighted average network bandwidth;Judge to whether there is packets of audio data to be sent in the audio queue, if so, then comparing The current weighted average network bandwidth and preset audio bandwidth threshold, obtain comparative result, are selected according to comparative result Corresponding audio delivery plan sends the packets of audio data to be sent, and current adding is recalculated after being sent completely The weight average network bandwidth;Judge to whether there is video data bag to be sent in the video queue, if so, then comparing current The weighted average network bandwidth and default video bandwidth threshold value, obtain comparative result, and corresponding video hair is selected according to comparative result Send scheme to send the video data bag to be sent, and current weighted average Netowrk tape is recalculated after being sent completely It is wide.Using according to different network states, change the transmission priority of control instruction, voice data and video data, it is adaptable to The network teleconference, when adjusting the automatic frame per second for reducing video when priority cannot ensure transmission of video, ensures as far as possible The control mode of control instruction stream and audio stream, with the continuation reduction of user bandwidth, can reduce sample frequency of audio etc. Mode comes under bandwidth as small as possible to ensure that audio is smooth, it is to avoid take the video that the mode for reducing image quality and resolution ratio is caused Ambiguous problem, adapts to the demand of user.
Brief description of the drawings
By the detailed description made to non-limiting example made with reference to the following drawings of reading, the application other Feature, objects and advantages will become more apparent upon:
Fig. 1 shows a kind of schematic flow sheet of the control method of the data is activation according to the application one side;
Fig. 2 shows the transmission priority of change control instruction, voice data and video data in the embodiment of the application one Schematic flow sheet;
Fig. 3 shows the flow chart of the calculating weighted average network bandwidth in the embodiment of the application one;
Fig. 4 shows to select the flow of corresponding audio delivery plan in the embodiment of the present application according to current network state Figure;
Fig. 5 shows to select the flow of corresponding video delivery plan in the embodiment of the present application according to current network state Figure;
Fig. 6 shows a kind of structural representation of the control device of the data is activation according to the application another aspect.
Same or analogous reference represents same or analogous part in accompanying drawing.
Specific embodiment
The application is described in further detail below in conjunction with the accompanying drawings.
In one typical configuration of the application, terminal, the equipment of service network and trusted party include one or more Processor (CPU), input/output interface, network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium Example.
Computer-readable medium includes that permanent and non-permanent, removable and non-removable media can be by any method Or technology realizes information Store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, magnetic disk storage or other magnetic storage apparatus or Any other non-transmission medium, can be used to store the information that can be accessed by a computing device.Defined according to herein, computer Computer-readable recording medium does not include non-temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
Fig. 1 shows a kind of schematic flow sheet of the control method of the data is activation according to the application one side;The side Method includes repeat step S11~step S14:
Step S11, packet is respectively processed into by acquired director data, voice data, video data, correspondence It is put into instruction queue, audio queue and video queue;Here, four queues of initialization:Instruction queue is (in the examples below Control instruction queue and instruction queue are alternatively used), audio queue and video queue and a transmission data statistics queue. When video calling at first, capture user desktop or camera simultaneously be compressed into packet, added in video queue; Current voice data and compressed encoding can be also obtained from sound card simultaneously, the packet after compressed encoding is then added to sound In frequency queue, the operation of all users and control instruction can all be packaged into packet and be stored in instruction queue.
Step S12, judges to whether there is packet to be sent in the instruction queue, if so, then sending described pending The packet for sending, and the current weighted average network bandwidth is calculated after being sent completely;In the embodiment of the present application, in initialization When stating four queues, can also start a data is activation thread, dedicated for sending instruction, packets of audio data and video data Bag, whether the thread is first looked in control instruction queue has the packet to send, if not then checks audio queue, if Have and just call transmission function (Send TcpMesg functions) all to send the packet in all of control instruction queue.Send The major function of TcpMesg functions is to send the data to other equipment, while also to be carried out to current network transmission bandwidth Assessment, after the completion of calling the function to send the packet within, is estimated to current network transmission bandwidth, obtains current adding The weight average network bandwidth.
Step S13, judges to whether there is packets of audio data to be sent in the audio queue, if so, then relatively more described The current weighted average network bandwidth and preset audio bandwidth threshold, obtain comparative result, select corresponding according to comparative result Audio delivery plan sends the packets of audio data to be sent, and current weighted average is recalculated after being sent completely The network bandwidth;In embodiments herein, whether there is packet to send in inspection audio queue, skipped if not, If then first calling voice data to send function (CouldSendAudioNow functions) audio number can be sent to check whether According to bag, the function can be according to current network state, the weighted average network bandwidth and preset audio bandwidth threshold that will be current It is compared, obtains comparative result, corresponding audio delivery plan is selected by the audio number to be sent according to comparative result Sent according to bag, such as selection does not send or continuously transmits audio delivery plan, and current adding is recalculated after being sent completely The weight average network bandwidth.
In step S14, judge to whether there is video data bag to be sent in the video queue, if so, then comparing The current weighted average network bandwidth and default video bandwidth threshold value, obtain comparative result, select corresponding according to comparative result Video delivery plan sends the video data bag to be sent, and current weighted average is recalculated after being sent completely The network bandwidth.In the embodiment of the present application, determine in audio queue in the absence of after the packets of audio data for needing to send, it is necessary to check Whether having video data bag in video queue needs to send, if directly skipped without if, if video data bag will send, Then first calling video data to send function (CouldSendVideoNow functions) can send video data bag to check whether, The detailed process of inspection is that the current weighted average network bandwidth is compared with default video bandwidth threshold value, obtains comparing knot Really, corresponding video delivery plan is selected to send the video data bag to be sent according to comparative result.
Fig. 2 shows the transmission priority of change control instruction, voice data and video data in the embodiment of the application one Schematic flow sheet.First, log-on data sends thread, judges whether network connection is normal in the case where program is not exited, such as It is really abnormal to need to reconnect, judge whether control instruction queue has data to send in the case of network connection is normal, If so, then calling SendTcpMesg functions to send data, and calculating network bandwidth again;If it is not, then audio data queue Whether have data to send, if so, then calling CouldSendVideoNow functions, voice data can be sent checking whether, Whether the function returns to a value iRetValue according to current network state, the return value is judged more than 0, if so, then taking sound First bag data of frequency data queue, calls SendTcpMesg functions to send function, and calculating network bandwidth again;Work as audio , it is necessary to whether have data to send in judging video data queue when there is no the data to be sent in data queue, if so, then taking First bag data of video data queue, calling CouldSendVideoNow functions checking whether can send video data, Return value iRetValue2 is determined according to current network state, whether the return value is judged more than 0, if it is not, then abandoning this Bag data, if so, then call SendTcpMesg functions to send function, and calculating network bandwidth again, to this transmission cycle Complete, whether program returns thread and start to check again for have the control instruction need to send.The control of data is activation described above Method processed is preferably applied to video conference, using according to different network states, changes control instruction, voice data and video counts According to transmission priority, it is to avoid the mode of image quality and resolution ratio is reduced because taking to reduce the video caused by the demand of bandwidth Ambiguous problem.
It should be noted that whether being judged the return value of only the application in above-described embodiment more than 0 with return value One citing of threshold value, it is also possible to be set to other values, other return value threshold values that are existing or being likely to occur from now on can such as be fitted For the application, should also be included within the application protection domain, and be incorporated herein by reference herein.
With continued reference to Fig. 2, calculating network bandwidth is to assess current network state, by calculating current weighted average The network bandwidth realizes that detailed process is:Transmission information according to a transmitted recently packet determines currently transmitted speed, And the transmission information of a nearest packet is recorded in queue is counted, wherein, the transmission information includes transmitted One length of packet and transmission time;Transmitted by the transmission information of the packet in statistics queue is calculated respectively Nearest n packet the first average transmission rate, the second average transmission rate, the institute of transmitted nearest m data bag 3rd average transmission rate of the nearest w packet for sending, wherein, n, m and w are positive integer, and n>m>w;Described will work as Preceding transmission rate, the first average transmission rate, the second average transmission rate and the 3rd average transmission rate are entered Row weighted average, obtains the weighted average network bandwidth.
Here, the length and transmission time according to a transmitted recently packet obtain currently transmitted speed, and Before the transmission information of a nearest packet is recorded in statistics queue, including:Judge whether transmitted packet is sent out Send successfully, if it is not, then closing network connection, empty the transmission information in statistics queue.
In the embodiment of the application one, after a packet has been sent, according to the length and consuming that send packet Time can calculate currently transmitted speed framerate1;Meanwhile, it is described to record the packet in queue is counted Transmission information, including:By the length of transmitted packet and the end of transmission time press-in statistics queue;Judge described Whether the transmission information number of the packet recorded in statistics queue exceedes default threshold value, if so, then will be pre- more than described If threshold value corresponding to the transmission information of the packet of earliest preservation deleted.Here, length and time will be sent The end of statistics queue is pressed onto, statistics queue only preserves the value of nearest 300 bag data, if it exceeds just deleting earliest data Remove.It should be noted that nearest 300 bag is a citing of default threshold value, other numerical value are may be alternatively provided as.
Then, the data of the traversal statistics all records of queue, count the average transmission rate of nearest 300 bag data respectively Framerate2, the average transmission rate framerate3 of nearest 30 bag data, the average transmission rate of nearest 10 bag data Framerater4, then calculates the weighted average network bandwidth according to following formula:
The weighted average network bandwidth=weight 1*framerate1+ weight 2*framerate2+ weights 3*framerate3+ Weight 4*framerate4,
The weighted average network bandwidth is the core data of whole network data is activation speed control, and specific flow chart is such as Shown in Fig. 3:Call SendTcpMesg to send data, if sending failure, close network connection and empty statistics queue, return It is worth for -1;If sending successfully, according to transmission data length and transmission Time Calculation this bag data transmission rate framerate1, Then, whether the length and transmission time for this being sent put statistics queue tail into, judge the length for counting queue more than 10 Bag, if it is not, 1 is then returned, if so, whether then judge to count the length of queue more than 300 bags, if so, then by statistics queue most An early bag statistics is deleted, and when of length no more than 300 bag counted in counting queue, is calculated according to statistics queue respectively The average transmission rate framerate2 of nearest 300 bag, then directly acquiescence is entered as less than 300 bag datas by framerate2 Value, here, what the Mean Speed that default value can count all of statistics bag of queue according to determined, such as only 200 bags Data, then calculate the average transmission rate of 200 bags;The average transmission rate of nearest 100 bag is calculated according to statistics queue Framerate3, then directly default value is entered as less than 100 bag datas by framerate3;Nearest 10 are calculated according to statistics queue Bag average transmission rate framerate4, framerate4 is directly then entered as default value less than 10 bag datas, according to Each average transmission rate and respective weight of upper calculating are weighted the calculating of averaging network bandwidth.
In step S13, judge to whether there is packets of audio data to be sent in the audio queue, if so, then compare working as Whether the preceding weighted average network bandwidth is more than the first preset audio bandwidth threshold;If being less than or equal to, corresponding audio is selected Delivery plan is not send the packets of audio data to be sent, and the packets of audio data is taken from the audio queue Go out;If being more than, the scope selection of the preset audio bandwidth threshold according to where the current weighted average network bandwidth is right The audio delivery plan answered sends the packets of audio data to be sent.
In the embodiment of the application one, as shown in Fig. 2 being needed according to current network-like when packets of audio data is transmitted State selects the scheme that corresponding audio sends to send packets of audio data to be sent, by relatively more current weighted average Netowrk tape Wide and the first preset audio bandwidth threshold, determines a return value, and the value is if less than 0 or equal to 0, then it represents that can not send number According to, then directly the data of taking-up are abandoned, if the value is more than 0, then it represents that the number of the packets of audio data that can be continuously transmitted, Several packets of audio data are so continuously transmitted according to the return value.
When return value is more than 0, the scope of the preset audio bandwidth threshold according to where the current weighted average network bandwidth Corresponding audio delivery plan is selected to send the packets of audio data to be sent, in step s 13, current weighted average net The scope of the preset audio bandwidth threshold where network bandwidth is the bandwidth range of any one appearance in step S131~step S133, Wherein, step S131, if the scope of the preset audio bandwidth threshold where the current weighted average network bandwidth be more than Equal to the second audio pre-set bandwidths threshold value, then it is that audio sample parameter is set to a width of to select corresponding audio delivery plan The binary channels of the first sampled value, the packets of audio data is sent according to the audio sample parameter.Step S132, if described current The weighted average network bandwidth where the scope of preset audio bandwidth threshold be less than the second preset audio bandwidth threshold and big It is that audio sample parameter is set to bandwidth in corresponding audio delivery plan equal to the 3rd preset audio bandwidth threshold, is then selected It is the binary channels of the second sampled value, the packets of audio data is sent according to the audio sample continuous parameters.Step S133, if institute The scope of the preset audio bandwidth threshold where stating the current weighted average network bandwidth is less than the 3rd preset audio bandwidth threshold And more than or equal to the first preset audio bandwidth threshold, then it is to be set to audio sample parameter to select corresponding audio delivery plan Single channel with a width of 3rd sampled value, the packets of audio data is sent according to the audio sample continuous parameters.
In the embodiment of the application one, the current network state of basis as shown in Figure 4 selects corresponding audio sender The flow chart of case, will first call CouldSendAudioNow functions to determine the speed of transmission speed before sending voice data And adjustment audio sample parameter adapts to the network bandwidth.Due to a width of 196KB/s of band that the sampling parameter of system default needs; When the weighted average network bandwidth is more than 196KB/s, voice data can just be sent with maximal rate;When the network bandwidth is less than 196KB/s and it is accomplished by for the sample frequency of audio being reduced to 16K when more than 48KB/s, can so ensures that audio is smooth While also for transmission of video leaves appropriate bandwidth;When the network bandwidth is less than 48KB/s and when more than 8KB/s, just need The sample frequency of audio is reduced to 8K, and using single channel sampling, can so ensure that audio is smooth under extremely low bandwidth; When bandwidth further declines, then audio transmission is temporarily interrupted, the transmission of control instruction is ensured with all strength.It should be noted that on The first preset audio bandwidth threshold is 8KB/s in stating embodiment, and the second preset audio bandwidth threshold is 196KB/s, and the 3rd presets Audio bandwidth threshold value is 48KB/s, and each preset audio bandwidth threshold is only for example, other it is existing or be likely to occur from now on it is each Preset audio bandwidth threshold is such as applicable to the application, should also be included within the application protection domain, and herein with reference side Formula is incorporated herein.
In step S14, judge to whether there is video data bag to be sent in the video queue, if so, then compare working as Whether the preceding weighted average network bandwidth is more than the first default video bandwidth threshold value;If being less than or equal to, corresponding video is selected Delivery plan is not send the video data bag to be sent, and the video data bag is taken from the video queue Go out;If being more than, the scope selection of the default video bandwidth threshold value according to where the current weighted average network bandwidth is right The video delivery plan answered sends the video data bag to be sent.
In the another embodiment of the application, as shown in Fig. 2 being needed according to current network when video data bag is transmitted The scheme that the corresponding video of condition selecting sends sends video data bag to be sent, by relatively more current weighted average network Bandwidth and the first default video bandwidth threshold value, determine a return value, and the value is if less than 0 or equal to 0, then it represents that abandon this bag Data are not transmitted, if the value is more than 0, call SendTcpMesg to send this bag data.
When return value is more than 0, the scope of the default video bandwidth threshold value according to where the current weighted average network bandwidth Corresponding video delivery plan is selected to send the video data bag to be sent, in step S14, current weighted average net The scope of the default video bandwidth threshold value where network bandwidth is the bandwidth range of any one appearance in step S141~step S145, Wherein, step S141, if the scope of the default video bandwidth threshold value where the current weighted average network bandwidth be more than Equal to the second default video bandwidth threshold value, then it is continuously to be sent out with current maximum speed to select corresponding video delivery plan Send the video data bag to be sent.Step S142, the pre- setting video where the current weighted average network bandwidth The scope of bandwidth threshold is selection when video bandwidth threshold value is preset less than second and video bandwidth threshold value is preset more than or equal to the 3rd Corresponding video delivery plan is to judge whether current video data bag to be sent is key frame, if so, then sending described working as Preceding video data bag to be sent, if it is not, then being sent when the frame number cached in the video queue is less than or equal to default frame number The current video data bag to be sent;If current video data bag to be sent is for non-key frame or when the video queue When the frame number of middle caching is more than default frame number, then the current packet to be sent is abandoned.Step S143, when described current The scope of the default video bandwidth threshold value where the weighted average network bandwidth is less than the 3rd default video bandwidth threshold value and is more than During equal to the 4th default video bandwidth threshold value, it is to judge current video data bag to be sent to select corresponding video delivery plan Whether it is key frame, if it is not, the current video data bag to be sent is then sent, if so, then abandoning described current to be sent Packet.Step S144, when the scope of the default video bandwidth threshold value where the current weighted average network bandwidth is When less than the 4th default video bandwidth threshold value and presetting video bandwidth threshold value more than or equal to the 5th, corresponding video sender is selected Case is to judge whether current video data bag to be sent is key frame, if so, the time that then judging distance previous frame sends is It is no more than the first preset time threshold, if so, then sending the current video data bag to be sent;If currently to be sent regard Frequency packet be time for sending of non-key frame or judging distance previous frame not less than the first preset time threshold, then abandon described Current packet to be sent.Step S145, the default video bandwidth threshold where the current weighted average network bandwidth The scope of value is when video bandwidth threshold value is preset less than the 5th and video bandwidth threshold value is preset more than or equal to the 6th, to select corresponding Video delivery plan is to judge whether current video data bag to be sent is key frame, if so, then judging distance previous frame hair Whether the time sent is more than the second preset time threshold, if so, then sending the current video data bag to be sent;If current Video data bag to be sent be time for sending of non-key frame or judging distance previous frame not less than the second preset time threshold, Then abandon the current packet to be sent.
In the embodiment of the application one, the current network state of basis as shown in Figure 5 selects corresponding video sender The schematic flow sheet of case, CouldSendVideoNow functions will be first called before video data bag is sent, and the function is according to adding The weight average network bandwidth come determine whether send this bag data.Consideration based on compression algorithm and user's screen resolution, System default needs the bandwidth of 1MB/s;When the weighted average network bandwidth is more than 1MB/s, video data just can be with maximum speed Degree sends;When the weighted average network bandwidth is less than 1MB/s and during more than 300KB/s, then need to abandon partial video data, if Current data are that key frame can then send, if non-key frame, then according to outgoing data bag in video data queue Quantity is determined, and can be sent if the data for buffering are less, and current data must be abandoned if more, for example, judge Whether the frame number cached in video data queue is more than default frame number 10, if it is not, can then send data;When weighted average network Bandwidth can only send key frame less than 300KB/s and during more than 196KB/s, and other all non-key frames are all abandoned;When plus The weight average network bandwidth then sends a key in 3 seconds less than 196KB/s and during more than 48KB/s every the first preset time threshold Frame, and other data are all abandoned;It is when the weighted average network bandwidth is less than 48KB/s and during more than 16KB/s, then pre- every second If time threshold sends a key frame for 10 seconds, and other data are all abandoned;When bandwidth further declines, then temporarily interrupt Transmission of video, ensures the transmission of control instruction and voice data with all strength.It should be noted that the Key-Frame in Fig. 5 is key Frame, in above-described embodiment, the first default video bandwidth threshold value is 16KB/s, and the second default video bandwidth threshold value is 1MB/s, the 3rd Default video bandwidth threshold value is 300KB/s, and the 4th default video bandwidth threshold value is 196KB/s, the 5th default video bandwidth threshold value It is 48KB/s, each default video bandwidth threshold value is only for example, other each default video bandwidths that are existing or being likely to occur from now on Threshold value is such as applicable to the application, should also be included within the application protection domain, and is incorporated herein by reference herein.
In sum, by the control method of data is activation described herein, using according to heterogeneous networks state, change The transmission priority of control instruction, voice data and video data, will when priority cannot ensure transmission of video when adjusting The automatic frame per second for reducing video, ensures the control mode of control instruction stream and audio stream as far as possible;As user bandwidth continues to reduce, Guarantee audio is smooth under the modes such as the sample frequency of audio bandwidth as small as possible can be reduced.
Fig. 6 shows a kind of structural representation of the control device of the data is activation according to the application another aspect;It is described Equipment includes:
Acquisition device 11, for acquired director data, voice data, video data to be respectively processed into data Bag, is correspondingly placed into instruction queue, audio queue and video queue;Here, four queues of initialization:Instruction queue is (following Control instruction queue and instruction queue are alternatively used in embodiment), audio queue and video queue and a transmission data Statistics queue.When video calling at first, the desktop or camera for capturing user are simultaneously compressed into packet, added to regarding In frequency queue;Current voice data and compressed encoding can be also obtained from sound card simultaneously, then by the data after compressed encoding Bag is added in audio queue, and the operation of all users and control instruction can all be packaged into packet and be stored in instruction queue.
Control instruction device 12, for judging to whether there is packet to be sent in the instruction queue, if so, then sending out The packet to be sent is sent, and the current weighted average network bandwidth is calculated after being sent completely;In the embodiment of the present application In, during initialization aforementioned four queue, can also start a data is activation thread, dedicated for sending instruction, packets of audio data And video data bag, whether the thread is first looked in control instruction queue has the packet to send, if not then checks sound Frequency queue, if just calling transmission function (Send TcpMesg functions) that the packet in all of control instruction queue is complete Portion sends.The major function of Send TcpMesg functions is to send the data to other equipment, while will also be to current network Transmission bandwidth is estimated, and after the completion of calling the function to send the packet within, current network transmission bandwidth is estimated, Obtain the current weighted average network bandwidth.
Voice data dispensing device 13, for judging to whether there is packets of audio data to be sent in the audio queue, If so, then comparing the current weighted average network bandwidth and preset audio bandwidth threshold, comparative result is obtained, according to comparing Result selects corresponding audio delivery plan to send the packets of audio data to be sent, and is recalculated after being sent completely The current weighted average network bandwidth;In embodiments herein, whether there is packet to send in inspection audio queue, such as Fruit does not skip then, if then first calling voice data to send function (CouldSendAudioNow functions) to check whether Packets of audio data can be sent, the function can according to current network state, the weighted average network bandwidth that will be current with it is pre- If audio bandwidth threshold value is compared, comparative result is obtained, according to the corresponding audio delivery plan of comparative result selection by described in Packets of audio data to be sent sends, and such as selection does not send or continuously transmits audio delivery plan, and the weight after being sent completely Newly calculate the current weighted average network bandwidth.
Video data sends device 14, for judging to whether there is video data bag to be sent in the video queue, If so, then comparing the current weighted average network bandwidth and default video bandwidth threshold value, comparative result is obtained, according to comparative result Select corresponding video delivery plan to send the video data bag to be sent, and recalculated after being sent completely current The weighted average network bandwidth.In the embodiment of the present application, the packets of audio data sent in the absence of needs in audio queue is determined Afterwards, it is necessary to whether have in checking video queue video data bag need send, if directly skipped without if, if video counts To be sent according to bag, then first calling video data to send function (CouldSendVideoNow functions) can send to check whether Video data bag, the detailed process of inspection is to be compared the current weighted average network bandwidth with default video bandwidth threshold value Compared with, comparative result is obtained, corresponding video delivery plan is selected by the video data bag hair to be sent according to comparative result Send.
During the equipment is used for the transmission of control data, control method as shown in Fig. 2 Fig. 2 shows the embodiment of the application one Change the schematic flow sheet of the transmission priority of control instruction, voice data and video data.First, log-on data sends line Journey, judges whether network connection is normal in the case where program is not exited, if abnormal need to reconnect, in network connection Judge whether control instruction queue has data to send in the case of normal, if so, then calling SendTcpMesg functions to send number According to, and calculating network bandwidth again;If it is not, then whether audio data queue has data to send, if so, then calling CouldSendVideoNow functions can send voice data to check whether, the function is returned according to current network state One value iRetValue, judges that whether the return value, more than 0, if so, then taking the first bag data of voice data queue, is called SendTcpMesg functions send function, and calculating network bandwidth again;When there is no the data to be sent in voice data queue When, it is necessary to judge video data queue in whether have data to send, if so, then take the first bag data of video data queue, Calling CouldSendVideoNow functions can send video data checking whether, be determined to return according to current network state Whether value iRetValue2 is returned, the return value is judged more than 0, if it is not, this bag data is then abandoned, if so, then calling SendTcpMesg functions send function, and calculating network bandwidth again, and cycle completion is sent to this, and program returns line Whether journey starts to check again for have the control instruction need to send.The control method of data is activation described above is preferably applied to regard Frequency meeting, using according to different network states, changes the transmission priority of control instruction, voice data and video data, keeps away The problem that to have exempted to be reduced because taking the mode of image quality and resolution ratio unclear to reduce video blur caused by the demand of bandwidth.
It should be noted that whether being judged the return value of only the application in above-described embodiment more than 0 with return value One citing of threshold value, it is also possible to be set to other values, other return value threshold values that are existing or being likely to occur from now on can such as be fitted For the application, should also be included within the application protection domain, and be incorporated herein by reference herein.
With continued reference to Fig. 2, calculating network bandwidth is to assess current network state, by calculating current weighted average The network bandwidth realizes that detailed process is:Transmission information according to a transmitted recently packet determines currently transmitted speed, And the transmission information of a nearest packet is recorded in queue is counted, wherein, the transmission information includes transmitted One length of packet and transmission time;Transmitted by the transmission information of the packet in statistics queue is calculated respectively Nearest n packet the first average transmission rate, the second average transmission rate, the institute of transmitted nearest m data bag 3rd average transmission rate of the nearest w packet for sending, wherein, n, m and w are positive integer, and n>m>w;Described will work as Preceding transmission rate, the first average transmission rate, the second average transmission rate and the 3rd average transmission rate are entered Row weighted average, obtains the weighted average network bandwidth.
Here, the equipment also includes the (not shown) of emptying apparatus 15, for according to a transmitted recently packet Length and the transmission time obtain currently transmitted speed, and the transmission letter of a nearest packet is recorded in queue is counted Before breath, judge whether transmitted packet sends successfully, if it is not, then close network connection, in emptying statistics queue Transmission information.
In the embodiment of the application one, after a packet has been sent, according to the length and consuming that send packet Time can calculate currently transmitted speed framerate1;Meanwhile, by the length of transmitted packet and transmission time The end of press-in statistics queue;Judge whether the transmission information number of the packet recorded in statistics queue exceedes Default threshold value, if so, will then exceed the transmission information of the packet of the earliest preservation corresponding to the default threshold value Deleted.Here, the end that length and time is pressed onto statistics queue will be sent, statistics queue only preserves nearest 300 bag data Value, if it exceeds just earliest data are deleted.It should be noted that a citing of nearest 300 bag for default threshold value, May be alternatively provided as other numerical value.
Then, the data of the traversal statistics all records of queue, count the average transmission rate of nearest 300 bag data respectively Framerate2, the average transmission rate framerate3 of nearest 30 bag data, the average transmission rate of nearest 10 bag data Framerater4, then calculates the weighted average network bandwidth according to following formula:
The weighted average network bandwidth=weight 1*framerate1+ weight 2*framerate2+ weights 3*framerate3+ Weight 4*framerate4,
The weighted average network bandwidth is the core data of whole network data is activation speed control, and specific flow chart is such as Shown in Fig. 3:Call SendTcpMesg to send data, if sending failure, close network connection and empty statistics queue, return It is worth for -1;If sending successfully, according to transmission data length and transmission Time Calculation this bag data transmission rate framerate1, Then, whether the length and transmission time for this being sent put statistics queue tail into, judge the length for counting queue more than 10 Bag, if it is not, 1 is then returned, if so, whether then judge to count the length of queue more than 300 bags, if so, then by statistics queue most An early bag statistics is deleted, and when of length no more than 300 bag counted in counting queue, is calculated according to statistics queue respectively The average transmission rate framerate2 of nearest 300 bag, then directly acquiescence is entered as less than 300 bag datas by framerate2 Value, here, what the Mean Speed that default value can count all of statistics bag of queue according to determined, such as only 200 bags Data, then calculate the average transmission rate of 200 bags;The average transmission rate of nearest 100 bag is calculated according to statistics queue Framerate3, then directly default value is entered as less than 100 bag datas by framerate3;Nearest 10 are calculated according to statistics queue Bag average transmission rate framerate4, framerate4 is directly then entered as default value less than 10 bag datas, according to Each average transmission rate and respective weight of upper calculating are weighted the calculating of averaging network bandwidth.
Voice data dispensing device 13 is used for, and judges to whether there is packets of audio data to be sent in the audio queue, If so, then comparing whether the current weighted average network bandwidth is more than the first preset audio bandwidth threshold;If being less than or equal to, select It is not send the packets of audio data to be sent to select corresponding audio delivery plan, and by the packets of audio data from the sound Taken out in frequency queue;If being more than, preset audio bandwidth threshold according to where the current weighted average network bandwidth Scope selects corresponding audio delivery plan to send the packets of audio data to be sent.
In the embodiment of the application one, as shown in Fig. 2 being needed according to current network-like when packets of audio data is transmitted State selects the scheme that corresponding audio sends to send packets of audio data to be sent, by relatively more current weighted average Netowrk tape Wide and the first preset audio bandwidth threshold, determines a return value, and the value is if less than 0 or equal to 0, then it represents that can not send number According to, then directly the data of taking-up are abandoned, if the value is more than 0, then it represents that the number of the packets of audio data that can be continuously transmitted, Several packets of audio data are so continuously transmitted according to the return value.
When return value is more than 0, the scope of the preset audio bandwidth threshold according to where the current weighted average network bandwidth Corresponding audio delivery plan is selected to send the packets of audio data to be sent, voice data dispensing device 13 is used for following three Any one bandwidth range for occurring in the situation of kind:The first situation, if where the current weighted average network bandwidth The scope of preset audio bandwidth threshold is more than or equal to the second audio pre-set bandwidths threshold value, then to select corresponding audio delivery plan It is that audio sample parameter is set to the binary channels with a width of first sampled value, the sound is sent according to the audio sample parameter Frequency packet.Second situation, if the scope of the preset audio bandwidth threshold where the current weighted average network bandwidth It is less than the second preset audio bandwidth threshold and more than or equal to the 3rd preset audio bandwidth threshold, then to select corresponding audio to send Scheme is that audio sample parameter is set into the binary channels with a width of second sampled value, is sent out according to the audio sample continuous parameters Send the packets of audio data.The third situation, if the preset audio bandwidth threshold where the current weighted average network bandwidth The scope of value then selects corresponding sound less than the 3rd preset audio bandwidth threshold and more than or equal to the first preset audio bandwidth threshold Frequency delivery plan is that audio sample parameter is set into the single channel with a width of 3rd sampled value, according to the audio sample parameter Continuously transmit the packets of audio data.
In the embodiment of the application one, the current network state of basis as shown in Figure 4 selects what corresponding audio sent The flow chart of scheme, will first call CouldSendAudioNow functions to determine the fast of transmission speed before sending voice data Slow and adjustment audio sample parameter adapts to the network bandwidth.Due to a width of 196KB/ of band that the sampling parameter of system default needs s;When the weighted average network bandwidth is more than 196KB/s, voice data can just be sent with maximal rate;When the network bandwidth is less than 196KB/s and it is accomplished by for the sample frequency of audio being reduced to 16K when more than 48KB/s, can so ensures that audio is smooth While also for transmission of video leaves appropriate bandwidth;When the network bandwidth is less than 48KB/s and when more than 8KB/s, just need The sample frequency of audio is reduced to 8K, and using single channel sampling, can so ensure that audio is smooth under extremely low bandwidth; When bandwidth further declines, then audio transmission is temporarily interrupted, the transmission of control instruction is ensured with all strength.It should be noted that on The first preset audio bandwidth threshold is 8KB/s in stating embodiment, and the second preset audio bandwidth threshold is 196KB/s, and the 3rd presets Audio bandwidth threshold value is 48KB/s, and each preset audio bandwidth threshold is only for example, other it is existing or be likely to occur from now on it is each Preset audio bandwidth threshold is such as applicable to the application, should also be included within the application protection domain, and herein with reference side Formula is incorporated herein.
Video data sends device 14 to be used for, and judges to whether there is video data bag to be sent in the video queue, If so, whether then comparing the current weighted average network bandwidth more than the first default video bandwidth threshold value;If being less than or equal to, select It is not send the video data bag to be sent to select corresponding video delivery plan, and the video data bag is regarded from described Taken out in frequency queue;If being more than, default video bandwidth threshold value according to where the current weighted average network bandwidth Scope selects corresponding video delivery plan to send the video data bag to be sent.
In the another embodiment of the application, as shown in Fig. 2 being needed according to current network when video data bag is transmitted The scheme that the corresponding video of condition selecting sends sends video data bag to be sent, by relatively more current weighted average network Bandwidth and the first default video bandwidth threshold value, determine a return value, and the value is if less than 0 or equal to 0, then it represents that abandon this bag Data are not transmitted, if the value is more than 0, call SendTcpMesg to send this bag data.
When return value is more than 0, the scope of the default video bandwidth threshold value according to where the current weighted average network bandwidth Corresponding video delivery plan is selected to send the video data bag to be sent, video data sends device 14 is used for following five Any one bandwidth range for occurring in the situation of kind:The first situation, if where the current weighted average network bandwidth The scope of default video bandwidth threshold value is more than or equal to the second default video bandwidth threshold value, then to select corresponding video delivery plan It is to carry out continuously transmitting the video data bag to be sent with current maximum speed.Second situation, when described current The scope of the default video bandwidth threshold value where the weighted average network bandwidth is less than the second default video bandwidth threshold value and is more than During equal to the 3rd default video bandwidth threshold value, it is to judge current video data bag to be sent to select corresponding video delivery plan Whether it is key frame, if so, the current video data bag to be sent is then sent, if it is not, then when slow in the video queue When the frame number deposited is less than or equal to default frame number, the current video data bag to be sent is sent;If current video to be sent Packet is then abandoned described current pending for non-key frame or when the frame number cached in the video queue is more than default frame number The packet for sending.The third situation, when the model of the default video bandwidth threshold value where the current weighted average network bandwidth Enclose is when video bandwidth threshold value is preset less than the 3rd and video bandwidth threshold value is preset more than or equal to the 4th, to select corresponding video hair It is to judge whether current video data bag to be sent is key frame to send scheme, if it is not, then sending described current to be sent regard Frequency packet, if so, then abandoning the current packet to be sent.4th kind of situation, when the current weighted average net The scope of the default video bandwidth threshold value where network bandwidth is less than the 4th default video bandwidth threshold value and pre- more than or equal to the 5th During setting video bandwidth threshold, it is to judge whether current video data bag to be sent is crucial to select corresponding video delivery plan Frame, if so, whether the time that then judging distance previous frame sends is more than the first preset time threshold, if so, then sending described working as Preceding video data bag to be sent;If current video data bag to be sent sends for non-key frame or judging distance previous frame Time not less than the first preset time threshold, then abandons the current packet to be sent.5th kind of situation, when described current The weighted average network bandwidth where the scope of default video bandwidth threshold value be less than the 5th default video bandwidth threshold value and big When equal to the 6th default video bandwidth threshold value, it is to judge current video data to be sent to select corresponding video delivery plan Whether bag is key frame, if so, whether the time that then judging distance previous frame sends is more than the second preset time threshold, if so, Then send the current video data bag to be sent;If current video data bag to be sent is non-key frame or judging distance The time that previous frame sends not less than the second preset time threshold, then abandons the current packet to be sent.
In the embodiment of the application one, the current network state of basis as shown in Figure 5 selects corresponding video sender The schematic flow sheet of case, CouldSendVideoNow functions will be first called before video data bag is sent, and the function is according to adding The weight average network bandwidth come determine whether send this bag data.Consideration based on compression algorithm and user's screen resolution, System default needs the bandwidth of 1MB/s;When the weighted average network bandwidth is more than 1MB/s, video data just can be with maximum speed Degree sends;When the weighted average network bandwidth is less than 1MB/s and during more than 300KB/s, then need to abandon partial video data, if Current data are that key frame can then send, if non-key frame, then according to outgoing data bag in video data queue Quantity is determined, and can be sent if the data for buffering are less, and current data must be abandoned if more, such as judges to regard Whether the frame number cached in frequency data queue is more than default frame number 10, if it is not, can then send data;When weighted average Netowrk tape Width can only send key frame less than 300KB/s and during more than 196KB/s, and other all non-key frames are all abandoned;Work as weighting Averaging network bandwidth then sends a key frame for 3 seconds less than 196KB/s and during more than 48KB/s every very first time threshold value, and Other data are all abandoned;When the weighted average network bandwidth is less than 48KB/s and during more than 16KB/s, then every the second time threshold Value sends a key frame for 10 seconds, and other data are all abandoned;When bandwidth further declines, then temporary transient break of video is passed It is defeated, the transmission of control instruction and voice data is ensured with all strength.It should be noted that the Key-Frame in Fig. 5 is key frame, on State in embodiment, the first default video bandwidth threshold value is 16KB/s, and the second default video bandwidth threshold value is 1MB/s, and the 3rd presets Video bandwidth threshold value is 300KB/s, and the 4th default video bandwidth threshold value is 196KB/s, and the 5th default video bandwidth threshold value is 48KB/s, each default video bandwidth threshold value is only for example, other each default video bandwidth thresholds that are existing or being likely to occur from now on Value is such as applicable to the application, should also be included within the application protection domain, and is incorporated herein by reference herein.
In sum, by the control method of data is activation described herein, using according to heterogeneous networks state, change The transmission priority of control instruction, voice data and video data, will when priority cannot ensure transmission of video when adjusting The automatic frame per second for reducing video, ensures the control mode of control instruction stream and audio stream as far as possible;As user bandwidth continues to reduce, Guarantee audio is smooth under the modes such as the sample frequency of audio bandwidth as small as possible can be reduced.
Obviously, those skilled in the art can carry out the essence of various changes and modification without deviating from the application to the application God and scope.So, if these modifications of the application and modification belong to the scope of the application claim and its equivalent technologies Within, then the application is also intended to comprising these changes and modification.
It should be noted that the application can be carried out in the assembly of software and/or software with hardware, for example, can adopt Realized with application specific integrated circuit (ASIC), general purpose computer or any other similar hardware device.In one embodiment In, the software program of the application can be by computing device realizing steps described above or function.Similarly, the application Software program (including related data structure) can be stored in computer readable recording medium storing program for performing, for example, RAM memory, Magnetically or optically driver or floppy disc and similar devices.In addition, some steps or function of the application can employ hardware to realize, example Such as, coordinate so as to perform the circuit of each step or function as with processor.
In addition, the part of the application can be applied to computer program product, such as computer program instructions, when its quilt When computer is performed, by the operation of the computer, can call or provide according to the present processes and/or technical scheme. And the programmed instruction of the present processes is called, it is possibly stored in fixed or moveable recording medium, and/or pass through Data flow in broadcast or other signal bearing medias and be transmitted, and/or be stored according to described program instruction operation In the working storage of computer equipment.Here, the one embodiment according to the application includes a device, the device includes using In the memory and the processor for execute program instructions of storage computer program instructions, wherein, when the computer program refers to When order is by the computing device, method and/or skill that the plant running is based on foregoing multiple embodiments according to the application are triggered Art scheme.
It is obvious to a person skilled in the art that the application is not limited to the details of above-mentioned one exemplary embodiment, Er Qie In the case of without departing substantially from spirit herein or essential characteristic, the application can be in other specific forms realized.Therefore, no matter From the point of view of which point, embodiment all should be regarded as exemplary, and be nonrestrictive, scope of the present application is by appended power Profit requires to be limited rather than described above, it is intended that all in the implication and scope of the equivalency of claim by falling Change is included in the application.Any reference in claim should not be considered as the claim involved by limitation.This Outward, it is clear that " including " word is not excluded for other units or step, odd number is not excluded for plural number.The multiple stated in device claim Unit or device can also be realized by a unit or device by software or hardware.The first, the second grade word is used for table Show title, and be not offered as any specific order.

Claims (28)

1. a kind of control method of data is activation, wherein, methods described includes being repeated below step:
Acquired director data, voice data, video data are respectively processed into packet, instruction team is correspondingly placed into In row, audio queue and video queue;
Judge to whether there is packet to be sent in the instruction queue, if so, the packet to be sent is then sent, and The current weighted average network bandwidth is calculated after being sent completely;
Judge to whether there is packets of audio data to be sent in the audio queue, if so, then compare the current weighting putting down The equal network bandwidth and preset audio bandwidth threshold, obtain comparative result, and corresponding audio delivery plan is selected according to comparative result The packets of audio data to be sent is sent, and the current weighted average network bandwidth is recalculated after being sent completely;
Judge to whether there is video data bag to be sent in the video queue, if so, then comparing current weighted average net Network bandwidth and default video bandwidth threshold value, obtain comparative result, and corresponding video delivery plan is selected by institute according to comparative result State video data bag to be sent to send, and the current weighted average network bandwidth is recalculated after being sent completely.
2. method according to claim 1, wherein, it is described to calculate the current weighted average network bandwidth, including:
Transmission information according to a transmitted recently packet determines currently transmitted speed, and records institute in queue is counted The transmission information of a nearest packet is stated, wherein, the transmission information includes the length and hair of a transmitted packet Send the time;
Calculate transmitted nearest n packet respectively according to the transmission information for counting the packet in queue first is flat Equal transmission rate, the second average transmission rate of transmitted nearest m data bag, the of transmitted nearest w packet Three average transmission rates, wherein, n, m and w are positive integer, and n>m>w;
By the currently transmitted speed, the first average transmission rate, the second average transmission rate and described 3rd flat Equal transmission rate is weighted averagely, obtains the weighted average network bandwidth.
3. method according to claim 2, the transmission information that the packet is recorded in queue is counted, including:
By the length of transmitted packet and the end of transmission time press-in statistics queue;
Judge whether the transmission information number of the packet recorded in statistics queue exceedes default threshold value, if so, then The transmission information that the packet of the earliest preservation corresponding to the default threshold value will be exceeded is deleted.
4. method according to claim 2, wherein, according to a transmitted recently length for packet and send the time Currently transmitted speed is obtained, and before the transmission information for recording a nearest packet in counting queue, including:
Judge whether transmitted packet sends successfully, if it is not, then closing network connection, empty the hair in statistics queue Deliver letters breath.
5. method according to claim 1, wherein, judge in the audio queue with the presence or absence of voice data to be sent Bag, if so, then comparing the current weighted average network bandwidth and preset audio bandwidth threshold, obtains comparative result, according to comparing Result selects corresponding audio delivery plan to send the packets of audio data to be sent, including:
Judge to whether there is packets of audio data to be sent in the audio queue, if so, then comparing current weighted average net Whether network bandwidth is more than the first preset audio bandwidth threshold;
If being less than or equal to, it is not send the packets of audio data to be sent to select corresponding audio delivery plan, and by institute Packets of audio data is stated to be taken out from the audio queue;
If being more than, the scope selection of the preset audio bandwidth threshold according to where the current weighted average network bandwidth is right The audio delivery plan answered sends the packets of audio data to be sent.
6. method according to claim 5, the preset audio band according to where the current weighted average network bandwidth The scope of threshold value wide selects corresponding audio delivery plan to send the packets of audio data to be sent, including:
If the scope of the preset audio bandwidth threshold where the current weighted average network bandwidth is more than or equal to the second sound Frequency pre-set bandwidths threshold value, then it is that audio sample parameter is set to a width of first sampled value to select corresponding audio delivery plan Binary channels, send the packets of audio data according to the audio sample parameter.
7. method according to claim 5, the preset audio band according to where the current weighted average network bandwidth The scope of threshold value wide selects corresponding audio delivery plan to send the packets of audio data to be sent, including:
If the scope of the preset audio bandwidth threshold where the current weighted average network bandwidth is less than the second default sound Bandwidth threshold value and more than or equal to the 3rd preset audio bandwidth threshold, then it is by audio sample to select corresponding audio delivery plan Parameter is set to the binary channels with a width of second sampled value, and the voice data is sent according to the audio sample continuous parameters Bag.
8. method according to claim 5, the preset audio band according to where the current weighted average network bandwidth The scope of threshold value wide selects corresponding audio delivery plan to send the packets of audio data to be sent, including:
If the scope of the preset audio bandwidth threshold where the current weighted average network bandwidth is less than the 3rd preset audio Bandwidth threshold and more than or equal to the first preset audio bandwidth threshold, then it is to join audio sample to select corresponding audio delivery plan Number is set to the single channel with a width of 3rd sampled value, and the packets of audio data is sent according to the audio sample continuous parameters.
9. method according to claim 1, wherein, judge in the video queue with the presence or absence of video data to be sent Bag, if so, then comparing the current weighted average network bandwidth and default video bandwidth threshold value, obtains comparative result, according to comparing Result selects corresponding video delivery plan to send the video data bag to be sent, including:
Judge to whether there is video data bag to be sent in the video queue, if so, then comparing current weighted average net Whether network bandwidth is more than the first default video bandwidth threshold value;
If being less than or equal to, it is not send the video data bag to be sent to select corresponding video delivery plan, and by institute Video data bag is stated to be taken out from the video queue;
If being more than, the scope selection of the default video bandwidth threshold value according to where the current weighted average network bandwidth is right The video delivery plan answered sends the video data bag to be sent.
10. method according to claim 9, wherein, it is default according to where the current weighted average network bandwidth The scope of video bandwidth threshold value selects corresponding video delivery plan to send the video data bag to be sent, including:
If the scope of the default video bandwidth threshold value where the current weighted average network bandwidth is pre- more than or equal to second Setting video bandwidth threshold, then select corresponding video delivery plan be with current maximum speed continuously transmit it is described pending The video data bag sent.
11. methods according to claim 9, wherein, it is default according to where the current weighted average network bandwidth The scope of video bandwidth threshold value selects corresponding video delivery plan to send the video data bag to be sent, including:
When the scope of the default video bandwidth threshold value where the current weighted average network bandwidth is regards default less than second Bandwidth threshold value and during more than or equal to the 3rd default video bandwidth threshold value, selects corresponding video delivery plan to judge currently to treat Whether the video data bag of transmission is key frame,
If so, the current video data bag to be sent is then sent, if it is not, then when the frame number cached in the video queue is small When equal to default frame number, the current video data bag to be sent is sent;
If current video data bag to be sent is for non-key frame or when the frame number cached in the video queue is more than default frame During number, then the current packet to be sent is abandoned.
12. methods according to claim 9, wherein, it is default according to where the current weighted average network bandwidth The scope of video bandwidth threshold value selects corresponding video delivery plan to send the video data bag to be sent, including:
When the scope of the default video bandwidth threshold value where the current weighted average network bandwidth is regards default less than the 3rd Bandwidth threshold value and during more than or equal to the 4th default video bandwidth threshold value, selects corresponding video delivery plan to judge currently to treat Whether the video data bag of transmission is key frame,
If it is not, the current video data bag to be sent is then sent, if so, then abandoning the current packet to be sent.
13. methods according to claim 9, wherein, it is default according to where the current weighted average network bandwidth The scope of video bandwidth threshold value selects corresponding video delivery plan to send the video data bag to be sent, including:
When the scope of the default video bandwidth threshold value where the current weighted average network bandwidth is regards default less than the 4th Bandwidth threshold value and during more than or equal to the 5th default video bandwidth threshold value, selects corresponding video delivery plan to judge currently to treat Whether the video data bag of transmission is key frame,
If so, whether the time that then judging distance previous frame sends is more than the first preset time threshold, if so, then sending described working as Preceding video data bag to be sent;
If current video data bag to be sent is pre- not less than first for the time that non-key frame or judging distance previous frame send If time threshold, then the current packet to be sent is abandoned.
14. methods according to claim 9, wherein, it is default according to where the current weighted average network bandwidth The scope of video bandwidth threshold value selects corresponding video delivery plan to send the video data bag to be sent, including:
When the scope of the default video bandwidth threshold value where the current weighted average network bandwidth is regards default less than the 5th Bandwidth threshold value and during more than or equal to the 6th default video bandwidth threshold value, selects corresponding video delivery plan to judge currently to treat Whether the video data bag of transmission is key frame,
If so, whether the time that then judging distance previous frame sends is more than the second preset time threshold, if so, then sending described working as Preceding video data bag to be sent;
If current video data bag to be sent is pre- not less than second for the time that non-key frame or judging distance previous frame send If time threshold, then the current packet to be sent is abandoned.
A kind of 15. control devices of data is activation, wherein, following device is used in the repetition equipment:
Acquisition device, it is right for acquired director data, voice data, video data to be respectively processed into packet Should be put into instruction queue, audio queue and video queue;
Control instruction device, for judging to whether there is packet to be sent in the instruction queue, if so, then sending described Packet to be sent, and the current weighted average network bandwidth is calculated after being sent completely;
Voice data dispensing device, for judging to whether there is packets of audio data to be sent in the audio queue, if so, then Compare the current weighted average network bandwidth and preset audio bandwidth threshold, obtain comparative result, selected according to comparative result Select corresponding audio delivery plan to send the packets of audio data to be sent, and recalculated after being sent completely current The weighted average network bandwidth;
Video data sends device, for judging to whether there is video data bag to be sent in the video queue, if so, then Compare the current weighted average network bandwidth and default video bandwidth threshold value, obtain comparative result, select right according to comparative result The video delivery plan answered sends the video data bag to be sent, and current weighting is recalculated after being sent completely Averaging network bandwidth.
16. equipment according to claim 15, wherein, the control instruction device, voice data dispensing device and video Data sending device is used to:
Transmission information according to a transmitted recently packet determines currently transmitted speed, and records institute in queue is counted The transmission information of a nearest packet is stated, wherein, the transmission information includes the length and hair of a transmitted packet Send the time;
Calculate transmitted nearest n packet respectively according to the transmission information for counting the packet in queue first is flat Equal transmission rate, the second average transmission rate of transmitted nearest m data bag, the of transmitted nearest w packet Three average transmission rates, wherein, n, m and w are positive integer, and n>m>w;
By the currently transmitted speed, the first average transmission rate, the second average transmission rate and described 3rd flat Equal transmission rate is weighted averagely, obtains the weighted average network bandwidth.
17. equipment according to claim 16, the control instruction device, voice data dispensing device and video data transmitting Device is sent to be additionally operable to:
By the length of transmitted packet and the end of transmission time press-in statistics queue;
Judge whether the transmission information number of the packet recorded in statistics queue exceedes default threshold value, if so, then The transmission information that the packet of the earliest preservation corresponding to the default threshold value will be exceeded is deleted.
18. equipment according to claim 16, wherein, the equipment also includes:
Whether emptying apparatus, the packet for judging transmitted sends successfully, if it is not, then closing network connection, empties described Transmission information in statistics queue.
19. equipment according to claim 15, wherein, the voice data dispensing device is used for:
Judge to whether there is packets of audio data to be sent in the audio queue, if so, then comparing current weighted average net Whether network bandwidth is more than the first preset audio bandwidth threshold;
If being less than or equal to, it is not send the packets of audio data to be sent to select corresponding audio delivery plan, and by institute Packets of audio data is stated to be taken out from the audio queue;
If being more than, the scope selection of the preset audio bandwidth threshold according to where the current weighted average network bandwidth is right The audio delivery plan answered sends the packets of audio data to be sent.
20. equipment according to claim 19, the voice data dispensing device is used for:
If the scope of the preset audio bandwidth threshold where the current weighted average network bandwidth is more than or equal to the second sound Frequency pre-set bandwidths threshold value, then it is that audio sample parameter is set to a width of first sampled value to select corresponding audio delivery plan Binary channels, send the packets of audio data according to the audio sample parameter.
21. equipment according to claim 19, the voice data dispensing device is used for:
If the scope of the preset audio bandwidth threshold where the current weighted average network bandwidth is less than the second default sound Bandwidth threshold value and more than or equal to the 3rd preset audio bandwidth threshold, then it is by audio sample to select corresponding audio delivery plan Parameter is set to the binary channels with a width of second sampled value, and the voice data is sent according to the audio sample continuous parameters Bag.
22. equipment according to claim 19, the voice data dispensing device is used for:
If the scope of the preset audio bandwidth threshold where the current weighted average network bandwidth is less than the 3rd preset audio Bandwidth threshold and more than or equal to the first preset audio bandwidth threshold, then it is to join audio sample to select corresponding audio delivery plan Number is set to the single channel with a width of 3rd sampled value, and the packets of audio data is sent according to the audio sample continuous parameters.
23. equipment according to claim 15, wherein, the video data sends device to be used for:
Judge to whether there is video data bag to be sent in the video queue, if so, then comparing current weighted average net Whether network bandwidth is more than the first default video bandwidth threshold value;
If being less than or equal to, it is not send the video data bag to be sent to select corresponding video delivery plan, and by institute Video data bag is stated to be taken out from the video queue;
If being more than, the scope selection of the default video bandwidth threshold value according to where the current weighted average network bandwidth is right The video delivery plan answered sends the video data bag to be sent.
24. equipment according to claim 23, wherein, the video data sends device to be used for:
If the scope of the default video bandwidth threshold value where the current weighted average network bandwidth is pre- more than or equal to second Setting video bandwidth threshold, then select corresponding video delivery plan be with current maximum speed continuously transmit it is described pending The video data bag sent.
25. equipment according to claim 23, wherein, the video data sends device to be used for:
When the scope of the default video bandwidth threshold value where the current weighted average network bandwidth is regards default less than second Bandwidth threshold value and during more than or equal to the 3rd default video bandwidth threshold value, selects corresponding video delivery plan to judge currently to treat Whether the video data bag of transmission is key frame,
If so, the current video data bag to be sent is then sent, if it is not, then when the frame number cached in the video queue is small When equal to default frame number, the current video data bag to be sent is sent;
If current video data bag to be sent is for non-key frame or when the frame number cached in the video queue is more than default frame During number, then the current packet to be sent is abandoned.
26. equipment according to claim 23, wherein, the video data sends device to be used for:
When the scope of the default video bandwidth threshold value where the current weighted average network bandwidth is regards default less than the 3rd Bandwidth threshold value and during more than or equal to the 4th default video bandwidth threshold value, selects corresponding video delivery plan to judge currently to treat Whether the video data bag of transmission is key frame,
If it is not, the current video data bag to be sent is then sent, if so, then abandoning the current packet to be sent.
27. equipment according to claim 23, wherein, the video data sends device to be used for:
When the scope of the default video bandwidth threshold value where the current weighted average network bandwidth is regards default less than the 4th Bandwidth threshold value and during more than or equal to the 5th default video bandwidth threshold value, selects corresponding video delivery plan to judge currently to treat Whether the video data bag of transmission is key frame,
If so, whether the time that then judging distance previous frame sends is more than the first preset time threshold, if so, then sending described working as Preceding video data bag to be sent;
If current video data bag to be sent is pre- not less than first for the time that non-key frame or judging distance previous frame send If time threshold, then the current packet to be sent is abandoned.
28. equipment according to claim 23, wherein, the video data sends device to be used for:
When the scope of the default video bandwidth threshold value where the current weighted average network bandwidth is regards default less than the 5th Bandwidth threshold value and during more than or equal to the 6th default video bandwidth threshold value, selects corresponding video delivery plan to judge currently to treat Whether the video data bag of transmission is key frame,
If so, whether the time that then judging distance previous frame sends is more than the second preset time threshold, if so, then sending described working as Preceding video data bag to be sent;
If current video data bag to be sent is pre- not less than second for the time that non-key frame or judging distance previous frame send If time threshold, then the current packet to be sent is abandoned.
CN201611199912.1A 2016-12-22 2016-12-22 A kind of control method and equipment that data are sent Active CN106791575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611199912.1A CN106791575B (en) 2016-12-22 2016-12-22 A kind of control method and equipment that data are sent

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611199912.1A CN106791575B (en) 2016-12-22 2016-12-22 A kind of control method and equipment that data are sent

Publications (2)

Publication Number Publication Date
CN106791575A true CN106791575A (en) 2017-05-31
CN106791575B CN106791575B (en) 2019-11-15

Family

ID=58899672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611199912.1A Active CN106791575B (en) 2016-12-22 2016-12-22 A kind of control method and equipment that data are sent

Country Status (1)

Country Link
CN (1) CN106791575B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108900427A (en) * 2018-06-13 2018-11-27 盐城师范学院 Digital content delivery system
CN111524529A (en) * 2020-04-15 2020-08-11 广州极飞科技有限公司 Audio data processing method, device and system, electronic equipment and storage medium
CN111698262A (en) * 2020-06-24 2020-09-22 北京达佳互联信息技术有限公司 Bandwidth determination method, device, terminal and storage medium
CN111757151A (en) * 2020-06-30 2020-10-09 平安国际智慧城市科技股份有限公司 Video stream sending method, device, equipment and medium based on RTP (real-time transport protocol)
CN112019448A (en) * 2020-10-29 2020-12-01 北京安盟信息技术股份有限公司 Reliability control method and system based on unidirectional data transmission
CN113163346A (en) * 2021-04-21 2021-07-23 成都锐成芯微科技股份有限公司 Broadcast packet filtering method and wireless communication system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101827033A (en) * 2010-04-30 2010-09-08 北京搜狗科技发展有限公司 Method and device for controlling network traffic and local area network system
US20130042276A1 (en) * 2011-08-12 2013-02-14 Charles R. Payette Method and apparatus for controlling wireless uplink sessions
CN105429983A (en) * 2015-11-27 2016-03-23 刘军 Media data acquisition method, media terminal and music teaching system
CN105847182A (en) * 2016-04-18 2016-08-10 武汉烽火众智数字技术有限责任公司 Method and system thereof for preferentially transmitting audio in audio and video system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101827033A (en) * 2010-04-30 2010-09-08 北京搜狗科技发展有限公司 Method and device for controlling network traffic and local area network system
US20130042276A1 (en) * 2011-08-12 2013-02-14 Charles R. Payette Method and apparatus for controlling wireless uplink sessions
CN105429983A (en) * 2015-11-27 2016-03-23 刘军 Media data acquisition method, media terminal and music teaching system
CN105847182A (en) * 2016-04-18 2016-08-10 武汉烽火众智数字技术有限责任公司 Method and system thereof for preferentially transmitting audio in audio and video system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108900427A (en) * 2018-06-13 2018-11-27 盐城师范学院 Digital content delivery system
CN111524529A (en) * 2020-04-15 2020-08-11 广州极飞科技有限公司 Audio data processing method, device and system, electronic equipment and storage medium
CN111524529B (en) * 2020-04-15 2023-11-24 广州极飞科技股份有限公司 Audio data processing method, device and system, electronic equipment and storage medium
CN111698262A (en) * 2020-06-24 2020-09-22 北京达佳互联信息技术有限公司 Bandwidth determination method, device, terminal and storage medium
CN111757151A (en) * 2020-06-30 2020-10-09 平安国际智慧城市科技股份有限公司 Video stream sending method, device, equipment and medium based on RTP (real-time transport protocol)
CN111757151B (en) * 2020-06-30 2022-08-19 平安国际智慧城市科技股份有限公司 Video stream sending method, device, equipment and medium based on RTP (real-time transport protocol)
CN112019448A (en) * 2020-10-29 2020-12-01 北京安盟信息技术股份有限公司 Reliability control method and system based on unidirectional data transmission
CN113163346A (en) * 2021-04-21 2021-07-23 成都锐成芯微科技股份有限公司 Broadcast packet filtering method and wireless communication system
CN113163346B (en) * 2021-04-21 2022-04-05 成都锐成芯微科技股份有限公司 Broadcast packet filtering method and wireless communication system

Also Published As

Publication number Publication date
CN106791575B (en) 2019-11-15

Similar Documents

Publication Publication Date Title
CN106791575A (en) The control method and equipment of a kind of data is activation
US10819766B2 (en) Voice encoding and sending method and apparatus
CN107864084B (en) The transmission method and device of data packet
CA2786806C (en) Congestion level indication with explicit congestion notification in communication systems
CN103731887A (en) Network bandwidth adjusting method, mobile terminal and server
CN106304180A (en) A kind of method and device of the speech service quality determining user
JP2012525780A (en) Adaptive speed control based on overload signal
EP1906589A1 (en) An overload control method for the access media gateway and an access media gateway
CN104102570B (en) A kind of method and device of APP operations control
CN113301392B (en) Code rate determining method, device, equipment and storage medium
CN105162555B (en) A kind of code rate adjustment method and its terminal
WO2013094118A1 (en) Content delivery system
CN106656649A (en) Channel switching method based on speed measurement in real time conversations, user terminal and server
CN108476176A (en) Real-time transport protocol Research of Congestion Control Techniques in visual telephone
EP3541054B1 (en) Call recording system, call recording method, and call recording program
WO2023155747A1 (en) Data coding bitrate adaptive adjustment method, apparatus and device, and storage medium
EP3024176A1 (en) Method for assessing a quality of service of a data communication over a data communications line, a related system and devices
CN101436924B (en) Method, apparatus and system for synchronizing data
CN112087416B (en) Communication method and system of bidirectional hidden channel
CA3137556A1 (en) System and method for congestion management in computer networks
CN113747102A (en) Video call processing method, device, equipment and storage medium
US20160308632A1 (en) Data processing
JP2014160911A (en) Packet processing device, method, and program
CN111295864A (en) Method, terminal and system for improving voice call quality
CN101296110A (en) Real-time monitoring apparatus and method

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