CN102333226A - Audio/video data transmission method - Google Patents

Audio/video data transmission method Download PDF

Info

Publication number
CN102333226A
CN102333226A CN201110255874A CN201110255874A CN102333226A CN 102333226 A CN102333226 A CN 102333226A CN 201110255874 A CN201110255874 A CN 201110255874A CN 201110255874 A CN201110255874 A CN 201110255874A CN 102333226 A CN102333226 A CN 102333226A
Authority
CN
China
Prior art keywords
audio
video data
receiving thread
group
thread
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.)
Pending
Application number
CN201110255874A
Other languages
Chinese (zh)
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.)
Suzhou Codyy Network Technology Co Ltd
Original Assignee
Suzhou Codyy Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Codyy Network Technology Co Ltd filed Critical Suzhou Codyy Network Technology Co Ltd
Priority to CN201110255874A priority Critical patent/CN102333226A/en
Publication of CN102333226A publication Critical patent/CN102333226A/en
Priority to PCT/CN2012/078252 priority patent/WO2013029425A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides an audio/video data transmission method, which comprises the following steps: audio or video data transmitted by corresponding group users is received by a receiving thread group according to the corresponding relationship of the group and the receiving thread group; and the use condition of receiving threads in the receiving thread group is judged by a management thread, and idle receiving threads in the receiving thread group are treated according to a control strategy.

Description

A kind of audio/video data transmission method
Technical field
The invention belongs to field of data transmission, relate in particular to a kind of audio/video data transmission method.
Background technology
Along with the continuous development of social informatization, seem more and more important in the daily information interchange that is transmitted in people of audio-video signal and the communication.Yet present audio, video data receives, and adopts usually single-threaded forms data to be handled, and so, can't improve the utilance of receiving thread.And, when needs use receiving thread to receive the audio or video data, need to create new receiving thread, when not using receiving thread, then need close receiving thread.So, frequently create and close the load pressure that receiving thread has increased server, also increased the expense of system resource.
Summary of the invention
The present invention provides a kind of audio/video data transmission method, to address the above problem.
The present invention provides a kind of audio/video data transmission method.Said method may further comprise the steps: the receiving thread group receives the audio or video data of corresponding group user transmission according to the group and the corresponding relation of receiving thread group; Management thread is judged the operating position of receiving thread in all receiving thread groups, and handles the idle receiving thread in the receiving thread group according to control strategy.
Compared to prior art, according to the transmission method of audio, video data provided by the invention, management thread is handled the idle receiving thread in the receiving thread group according to control strategy, thereby has improved the utilance of receiving thread.Simultaneously, can prevent by frequent establishment and close receiving thread and increase the load pressure of server and the expense of system resource.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
The flow chart of the audio/video data transmission method that provides for preferred embodiment according to the present invention shown in Figure 1;
The sketch map of the audio data block that provides for preferred embodiment according to the present invention shown in Figure 2.
Embodiment
Hereinafter will and combine embodiment to specify the present invention with reference to accompanying drawing.Need to prove that under the situation of not conflicting, embodiment and the characteristic among the embodiment among the application can make up each other.
The flow chart of the audio/video data transmission method that provides for preferred embodiment according to the present invention shown in Figure 1.As shown in Figure 1, the audio/video data transmission method that preferred embodiment of the present invention provides comprises step 101~105.
In step 101, the receiving thread group receives the audio or video data of corresponding group user transmission according to the group and the corresponding relation of receiving thread group.For example, the corresponding relation of receiving thread group and group can be as shown in the table.
The receiving thread group Group
Receiving thread group one The crowd of Legal Service
Receiving thread group two The crowd of technology department
Receiving thread group three The crowd of sales department
Receiving thread group four The crowd of Finance Department
Wherein, each receiving thread group comprises two receiving threads of creating in advance at least.For example, receiving thread group one comprises 3 receiving threads, and receiving thread group two comprises 4 receiving threads, and receiving thread group three comprises 3 receiving threads, and receiving thread group four comprises 5 receiving threads.Yet the present invention does not limit the number of receiving thread group and the number of the receiving thread that the receiving thread group comprises, as long as guarantee that receiving thread group and group can be corresponding one by one.In practical application, the receiving thread group of respective number can be set according to the number of group.
In step 102, management thread is judged the operating position of receiving thread in all receiving thread groups, and handles the idle receiving thread in the receiving thread group according to control strategy.Wherein, Control strategy is: when the receiving thread in certain receiving thread group can't satisfy the audio or video data that receive corresponding group user transmission one to one, the idle receiving thread that calls in the highest receiving thread group of idle degree according to the priority orders of receiving thread group free time degree was said receiving thread group service; In a special time period, if having idle receiving thread in certain receiving thread group, and said idle receiving thread is not called, and then closes said idle receiving thread.Wherein, the idle degree of receiving thread group is the ratio of idle receiving thread number and total receiving thread number in the receiving thread group.
For example, when two Legal Service's group user transmission of audio or video data, receiving thread group one activates the audio or video data that two receiving threads receive said two Legal Service's group user transmission respectively.If the audio or video data of Legal Service's group user transmission surpass three groups (for example, five groups of audio or video data), then the receiving thread in the receiving thread group one can't satisfy the audio or video data that receive Legal Service's group user transmission one to one.At this moment, management thread can be judged the operating position of receiving thread in other receiving thread groups, and obtains the priority orders of receiving thread group free time degree according to said operating position.For example; Idle receiving thread is 2 in receiving thread group two; Idle receiving thread is 1 in the receiving thread group three; Idle receiving thread is 3 in the receiving thread group four, and then the priority orders of receiving thread group two, three and four idle degree is from high to low: receiving thread group four, receiving thread group two, receiving thread group three.So, management thread is one service of receiving thread group according to the idle thread (for example, two idle receiving threads) that control strategy can call in the receiving thread group four.In addition; If management thread is called the reception service of the audio or video data that still can't satisfy Legal Service's group user transmission after the idle thread in the receiving thread group four, then to call the idle receiving thread in receiving thread group two and the receiving thread group three successively again be one service of receiving thread group to management thread.Wherein, after invoked idle receiving thread is finished the work, will be the service of the receiving thread group under it.
In addition, in a special time period, if management thread detects in certain receiving thread group and has idle receiving thread, and said idle receiving thread do not call by other receiving thread groups, and then said idle receiving thread can be closed.In addition; Idle thread in all thread reception groups is all finished using, and in the time of still can't satisfying the reception demand of audio or video data, management thread can be created the new receiving thread of respective number to carry out corresponding reception operation; Simultaneously, after being finished, close said newly-built receiving thread.
In step 103, each receiving thread writes buffer area with the audio or video data after receiving the audio or video data.
In step 104, the data processing thread is from the information area that buffering area obtains the audio or video data block, and the resolving information district is with the size information of the data field of the size information that obtains previous audio or video data block and said audio or video data block.Wherein, the information area has fixed size.Particularly, each audio or video data block comprises the information area and data field, and the information area comprises the size information and the timestamp of data field of size information, the audio or video data block of previous audio or video data block.For example, the information area consistent length of each audio or video data block is 15 bytes.Wherein, the content of preceding 4 bytes is the size information of previous audio or video data block, and the content of back 4 bytes is the size information of the data field of audio or video data block for this reason, and the content of all the other bytes can be timestamp information.Yet the present invention does not do any qualification to this.In this, above-mentioned timestamp information can guarantee the time synchronized of audio or video data.
In addition, the operation for preventing that buffering area from reading and writing data simultaneously is provided with mutual exclusion lock, thereby the audio or video data of stopping buffering area when visit and read-write the entanglement of data message amount take place, to guarantee the accuracy of audio or video transfer of data.
In step 105, whether the size information of the current previous audio or video data block that obtains of data processing thread checking big or small consistent with previous audio or video data block.If both are consistent, then the data processing thread obtains the data field of the audio or video data block consistent with the size information of the data field of said audio or video data block from buffering area.If both are inconsistent, then the data processing thread abandons the information area of the current audio or video data block of obtaining, and the information area of postponing again and obtaining the audio or video data block towards the district.
In this, be the example explanation with the audio data transmission.Shown in Figure 2 for the sketch map of the audio data block that preferred embodiment provides according to the present invention.As shown in Figure 2, audio data block B comprises information area b1 and data field b2, and information area b1 comprises the size information b12 of data field b2 of size information b11 and the audio data block B of previous audio data block A.
Particularly, the data processing thread obtains the information area b1 of audio data block B from buffering area, and resolving information district b1, thereby obtains the size information b11 of audio data block A and the size information b12 of audio data block B.Then, the size information b11 of the current audio data block A that obtains of data processing thread checking big or small consistent with audio data block A whether.If the data processing thread detects both unanimities, then the data processing thread obtains the data field of the audio data block B consistent with the size information b12 of data field b2 from buffering area.In addition, if the data processing thread detects both when inconsistent, then the data processing thread abandons the information area b1 of audio data block B, obtains the information area of next audio data block again from buffering area.Yet the present invention does not do any qualification to this.In like manner, the block of video data of obtaining for the data processing thread also has corresponding processing.So repeat no more in this.So, can detect previous audio or video data block, thereby be convenient in data transmission procedure, in time find data exception, guarantee the accuracy of transfer of data through the current information area that obtains.
In addition, the data processing thread can be realized from the mode that buffering area obtains the information area or data field in the following manner.When buffering area had the information area or the data field of audio or video data block of the size of meeting the demands, buffering area can eject the information area or the data field of this audio or video data block.So, the data processing thread can directly obtain above-mentioned audio or video data block information district or data field.Otherwise the data processing thread need be waited for to buffering area, having when meeting the demands the big or small information area or data field and just obtain.Yet the present invention does not do any qualification to this.
In practical application, the data processing thread is corresponding with the number of receiving thread.So, help to guarantee the continuity of audio or video transfer of data and the high efficiency of audio or video Data Receiving.In addition, after the data processing thread normally receives the audio or video data, can be with audio or video transfer of data to audio or video decoder, with real-time decoding audio or video data, thereby guarantee the real-time play of audio frequency and video data.
In sum, the transmission method of the audio, video data that preferred embodiment provides according to the present invention, management thread is handled the idle receiving thread in the receiving thread group according to control strategy, thereby has improved the utilance of receiving thread.Simultaneously, can prevent by frequent establishment and close receiving thread and increase the load pressure of server and the expense of system resource.In addition, the data processing thread verifies according to the data block size information whether the transmission of previous audio or video data block is correct, thereby the accuracy of the audio, video data that has guaranteed to receive is convenient in time find data transmission exception.So, the continuity and the high efficiency of audio, video data transmission have been guaranteed.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (7)

1. an audio/video data transmission method is characterized in that, may further comprise the steps:
The receiving thread group receives the audio or video data of corresponding group user transmission according to the group and the corresponding relation of receiving thread group;
Management thread is judged the operating position of receiving thread in all receiving thread groups, and handles the idle receiving thread in the receiving thread group according to control strategy.
2. audio/video data transmission method according to claim 1; It is characterized in that; Said control strategy is: when the receiving thread in certain receiving thread group can't satisfy the audio or video data that receive corresponding group user transmission one to one; The idle receiving thread that calls in the highest receiving thread group of idle degree priority according to the priority orders of receiving thread group free time degree is said receiving thread group service; Wherein, the idle degree of said receiving thread group is the ratio of idle receiving thread number and total receiving thread number in the said receiving thread group
In a special time period, if having idle receiving thread in certain receiving thread group, and said idle receiving thread is not called, and then closes said idle receiving thread.
3. audio/video data transmission method according to claim 1 is characterized in that, after said each receiving thread receives the audio or video data, said audio or video data is write buffer area.
4. audio/video data transmission method according to claim 3; It is characterized in that; The data processing thread obtains the information area of audio or video data block from said buffering area; And resolve the size information of the said information area with the data field of the size information that obtains previous audio or video data block and said audio or video data block, wherein, the said information area has fixed size.
5. audio/video data transmission method according to claim 4 is characterized in that the said information area also comprises timestamp.
6. audio/video data transmission method according to claim 4; It is characterized in that; Whether the size information of the current said previous audio or video data block that obtains of said data processing thread checking big or small consistent with previous audio or video data block; If both are consistent, then said data processing thread obtains the data field of the said audio or video data block consistent with the size information of the data field of said audio or video data block from said buffering area.
7. audio/video data transmission method according to claim 6; It is characterized in that; If the size information and the not of uniform size of previous audio or video data block of the current said previous audio or video data block that obtains of said data processing thread checking cause; Then said data processing thread abandons the information area of the current said audio or video data block of obtaining, and obtains the information area of next audio or video data block from said buffering area again.
CN201110255874A 2011-09-01 2011-09-01 Audio/video data transmission method Pending CN102333226A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201110255874A CN102333226A (en) 2011-09-01 2011-09-01 Audio/video data transmission method
PCT/CN2012/078252 WO2013029425A1 (en) 2011-09-01 2012-07-05 Audio and video data transmission method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110255874A CN102333226A (en) 2011-09-01 2011-09-01 Audio/video data transmission method

Publications (1)

Publication Number Publication Date
CN102333226A true CN102333226A (en) 2012-01-25

Family

ID=45484811

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110255874A Pending CN102333226A (en) 2011-09-01 2011-09-01 Audio/video data transmission method

Country Status (2)

Country Link
CN (1) CN102333226A (en)
WO (1) WO2013029425A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013029425A1 (en) * 2011-09-01 2013-03-07 苏州阔地网络科技有限公司 Audio and video data transmission method
CN104753711A (en) * 2013-12-31 2015-07-01 华为技术有限公司 Method and device for adjusting resource allocation of network equipment
CN105872696A (en) * 2016-03-29 2016-08-17 杭州施强网络科技有限公司 Method for transmitting, decompressing and playing audio data in stream media direct broadcast
CN109814406A (en) * 2019-01-24 2019-05-28 成都戴瑞斯智控科技有限公司 A kind of data processing method and decoder architecture of the automatically controlled analogue system of model trajectory

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1604573A (en) * 2004-11-09 2005-04-06 北京中星微电子有限公司 A multipath audio frequency buffering method under IP network environment
CN101466034A (en) * 2008-12-25 2009-06-24 华为技术有限公司 Method and device for sending and playing stream medium data and stream medium program request system
CN101911685A (en) * 2007-12-29 2010-12-08 中兴通讯股份有限公司 Method for receiving and playing back video data
CN102307198A (en) * 2011-08-30 2012-01-04 苏州阔地网络科技有限公司 Audio and video data transmission method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100442709C (en) * 2005-06-17 2008-12-10 华为技术有限公司 Apparatus operation method in network management system
CN100542139C (en) * 2006-12-31 2009-09-16 华为技术有限公司 A kind of resource allocation methods and device based on the task grouping
US9354944B2 (en) * 2009-07-27 2016-05-31 Advanced Micro Devices, Inc. Mapping processing logic having data-parallel threads across processors
CN102333226A (en) * 2011-09-01 2012-01-25 苏州阔地网络科技有限公司 Audio/video data transmission method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1604573A (en) * 2004-11-09 2005-04-06 北京中星微电子有限公司 A multipath audio frequency buffering method under IP network environment
CN101911685A (en) * 2007-12-29 2010-12-08 中兴通讯股份有限公司 Method for receiving and playing back video data
CN101466034A (en) * 2008-12-25 2009-06-24 华为技术有限公司 Method and device for sending and playing stream medium data and stream medium program request system
CN102307198A (en) * 2011-08-30 2012-01-04 苏州阔地网络科技有限公司 Audio and video data transmission method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013029425A1 (en) * 2011-09-01 2013-03-07 苏州阔地网络科技有限公司 Audio and video data transmission method
CN104753711A (en) * 2013-12-31 2015-07-01 华为技术有限公司 Method and device for adjusting resource allocation of network equipment
CN104753711B (en) * 2013-12-31 2018-03-09 华为技术有限公司 Method and device for adjusting resource allocation of network equipment
CN105872696A (en) * 2016-03-29 2016-08-17 杭州施强网络科技有限公司 Method for transmitting, decompressing and playing audio data in stream media direct broadcast
CN109814406A (en) * 2019-01-24 2019-05-28 成都戴瑞斯智控科技有限公司 A kind of data processing method and decoder architecture of the automatically controlled analogue system of model trajectory

Also Published As

Publication number Publication date
WO2013029425A1 (en) 2013-03-07

Similar Documents

Publication Publication Date Title
CN102307198A (en) Audio and video data transmission method
CN101082928B (en) Method for accessing database and data-base mapping system
CN103838859B (en) A method of data copy between multi-process under reduction linux
US11068499B2 (en) Method, device, and system for peer-to-peer data replication and method, device, and system for master node switching
CN103246616A (en) Global shared cache replacement method for realizing long-short cycle access frequency
HK1132121A1 (en) Personal video channels
KR101545626B1 (en) System for interoperation between dds and dbms
CN102333226A (en) Audio/video data transmission method
CN101771723A (en) Data synchronization method
TW200631399A (en) System and method for information handling system image network communication
US20220374407A1 (en) Multi-tenant partitioning in a time-series database
CA2422252A1 (en) Reduced synchronization reservation system and method for a shared memory buffer
US11553023B2 (en) Abstraction layer for streaming data sources
US11256719B1 (en) Ingestion partition auto-scaling in a time-series database
WO2019042174A1 (en) Method for synchronization between primary database and standby database, database system and device
CN103593257A (en) Data backup method and device
ATE387665T1 (en) RESOURCE MANAGEMENT FOR DATA STORAGE SERVICES
CN102467525A (en) Document associating method and system
CN104598615A (en) Memory access method and device supporting data persistence
CN103078810A (en) Efficient rich media showing system and method
WO2005111849A3 (en) System and method for a user interface that provides contact-based sharing of resources
CN109271247A (en) Memory Optimize Method, device, computer installation and storage medium
CN101789963A (en) Data synchronization system
CN106855869A (en) A kind of methods, devices and systems for realizing database High Availabitity
CN111541747B (en) Data check point setting method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120125