CN103957221A - Colony concurrence network media stream sending method - Google Patents

Colony concurrence network media stream sending method Download PDF

Info

Publication number
CN103957221A
CN103957221A CN201410211224.7A CN201410211224A CN103957221A CN 103957221 A CN103957221 A CN 103957221A CN 201410211224 A CN201410211224 A CN 201410211224A CN 103957221 A CN103957221 A CN 103957221A
Authority
CN
China
Prior art keywords
module
message
task
playing
media stream
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
CN201410211224.7A
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.)
AVONACO COMMUNICATION SYSTEMS (SUZHOU) Co Ltd
Original Assignee
AVONACO COMMUNICATION SYSTEMS (SUZHOU) 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 AVONACO COMMUNICATION SYSTEMS (SUZHOU) Co Ltd filed Critical AVONACO COMMUNICATION SYSTEMS (SUZHOU) Co Ltd
Priority to CN201410211224.7A priority Critical patent/CN103957221A/en
Publication of CN103957221A publication Critical patent/CN103957221A/en
Pending legal-status Critical Current

Links

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The invention relates to a colony concurrence network media stream sending method which is especially suitable for multimedia polyphonic large-scale concurrence network playing. A playing system is arranged into a message receiving module, a message processing module, a sending module and a delete playing module according to different complexities, each module is in charge of one part of the whole task, and tasks corresponding to processing of different thread numbers are distributed to the modules. The message receiving module can process instructions from an upper layer, the message processing module can distribute tasks and set finishing states, the media stream sending module reads files and sends rtp stream regularly to achieve playing effects, and Session and related clear data can be deleted by a delete task module. The colony concurrence network media stream sending method can achieve call responding 150 caps per second and can achieve the playing purpose of simultaneously and concurrently sending 2500 paths of audio files or 1500 paths of audio and video files.

Description

The method of the concurrent transmission network media stream of a kind of cluster
Technical field
The method that the present invention relates to the concurrent transmission network media stream of a kind of cluster, can be used for multimedia color ring back tone large-scale concurrent netcast etc.
Background technology
Multimedia Ring Back Tone service is the value-added service based on 3G (Third Generation) Moblie, and it can be video and the music that has individual character.User is dialing in mobile phone process, if main one of them side of called subscriber or both sides all opened Multimedia Ring Back Tone service, under idle condition after putting through, before call, caller called or main automatically play one section by the other side's elaborate, abundant in content multimedia color ring back tone colorful, that have characteristic specially by both sides' call terminal.
In the time that carrier-class multimedia color ring back tone is applied, due to the user group of its magnanimity, make machine can respond a large amount of callings in moment simultaneously, and the concurrent multichannel of energy, and concurrent way is more, more can reduce the cost of operator.
If use traditional multithreading treatment technology, in the time calling out for one, server plays this calling of thread process, need to read this file content from hard disk again, press the files specify such as WAV/MP4/3GP, read successively corresponding data, then use the packing of rtp packaging technique, sequential with regulation sends, until signaling stops sending under upper strata.Detect through actual, even if this mode also can only be supported 200 multichannels at the MIPS64 of high performance 16 cores board, because linux thread is too much, too frequently there is mistake in scheduling.
Summary of the invention
Problem to be solved by this invention is to overcome the deficiency that prior art exists, and provides the method for the concurrent transmission network media stream of a kind of cluster for responding multimedia color ring back tone playing request, realizes the effect that performance is powerful, effectively reduce equipment cost.
The technical scheme that reaches foregoing invention object is to provide the method for the concurrent transmission network media stream of a kind of cluster, Play System is divided into message sink module, message processing module, sending module and deletion playing module, process corresponding task to the different Thread Count of each module assignment, comprise the steps:
(1) global session state is set in message processing module;
(2) message processing module is delivered in the message instruction from upper layer message module of collecting by message sink module;
(3) message processing module is according to type of message, by global session allocating task or be arranged to done state;
(4) sending module finds that there is after new session task, reads the file of appointment and file is packaged into audio-video frequency media stream to send to terminal by task, plays; Each rtp bag of playing is 1~3 second, and each transmission finished rear inspection global session state, deletes to get back to play in queue if do not need;
(5) delete task module and find that there is session and be set to after deletion state, remove the mission bit stream of session and the recovery of memory source.
The present invention is by individual call handling process in the past, server need to play this calling of thread process, need to read this file content from hard disk again, press the files specify such as WAV/MP4/3GP, read successively corresponding data, use again the packing of rtp packaging technique, send with the sequential specifying, until signaling stops sending this method under upper strata.In technical solution of the present invention, the effect of each module is as follows:
(1) file read module (IoCache module), most of polyphonic ringtone playing file can be by Reusability, only has a small amount of needs to read temporarily, and this module is used traditional computer IO buffering area principle, active file can be buffered in internal memory, accelerate reading speed.
(2) collect the message sink module (prsMsgReeeive module) of upper layer message, be responsible for receiving the XIPC message of upper strata instruction
(3) message processing module (prsMsgSwitch module), is responsible for processing XIPC message threads, according to descended message, Session Determines Session is set and starts to play or finish broadcasting
(4) sending module (prsSendData module) of transmission Media Stream, need the Session playing to enter after queue, this module is responsible for that file reads, the send-thread of parsing and RTP bag, and the Session having play is put into deletion queue.
(5) delete playing module (prsSessionDelete module), be responsible for deleting Session and the relevant work that clears data.
The present invention and existing multithreading, simply complete whole operation and compare, and has following advantages:
1, task is accurately divided into disparate modules, each module is carried out a part of task, and cooperative work has reduced inner Thread Count greatly.
2, both can ensure minority work time, exceeded occupying system resources, efficient processing response in time large concurrent processing can be ensured again time.
3,, in same environment, the number of concurrent that can complete whole task than a simple multithreading increases more than 7 times.
Brief description of the drawings
Fig. 1 is the Media Stream sending module process chart that the embodiment of the present invention provides;
Fig. 2 is the flow chart of the cluster concurrent processing that provides of the embodiment of the present invention.
Embodiment
Below in conjunction with drawings and Examples, technical solution of the present invention is further elaborated.
Embodiment 1
The method of the concurrent transmission network media stream of a kind of cluster of the present embodiment, the module adopting and step are done to following concrete description:
(1) collect the message sink module (prsMsgReceive module) of upper layer message, be responsible for receiving the XIPC message of upper strata instruction.More have the module of the special sip+msml of place signaling in upper strata in this module, convert inner xipc message to, notice PRS module is processed.Concerning multimedia color ring back tone, play exactly file and 2 instructions of end broadcasting under specified path.Here receiving after instruction, carrying out a preliminary distribution, compressing into the queue of prsMsgSwitch module message.
(2) message processing module (prsMsgSwitch module), is responsible for the XIPC of place message threads, according to descended message, Session Determines Session is set and starts to play or finish broadcasting.If start to play, to call iocache module local file is read and is pressed in internal memory, the task that needs are play is pressed into prsSendData module.If need to finish to play, only do the setting of session state here.
(3) sending module (prsSendData module) of transmission Media Stream, this module is the most complicated, so thread need to distribute at most.The thread of this module in the time there is no task by dormancy to avoid taking cpu, come in to start to process until there is task, need the Session playing to enter after queue, this module only can be resolved the bag with certain hour, will stop sending out to enter to have play queue, when next time is again to there being an inspection whether to need the operation of deleting before playing queue processing, thereby response upper strata stops playing signaling.In the time of a small amount of broadcasting, such go out team's operation of joining the team and in fact also can increase cpu treating capacity, respond how in time upper strata and stop playing this problem but just can solve when large-scale concurrent.
(4) delete task module (prsSessionDelete module), be responsible for deleting Session and the relevant work that clears data.
If use traditional multithreading treatment technology, while processing a calling, server plays this calling of thread process, need to read this file content from hard disk again, press the files specify such as WAV/MP4/3GP, read successively corresponding data, then use the packing of rtp packaging technique, sequential with regulation sends, until signaling stops sending under upper strata.This shortcoming is exactly not to task subdivision, differs in processing procedure thread busy extent, causes processing quantity and only can reach 200 multichannels.
The present invention adopts and is divided into four module, each module plays the Thread Count of varying number and processes bearing of task, for example prsMsgSwitch module, if 2 threads are set, whether each thread regularly travels through message queue new data, there is new data to carry out respective handling by the description of above-mentioned prsMsgSwitch module, without sleep (1us) of new data, temporarily discharge the cpu right to use.Through reality test, the Thread Count of setting at present respectively, thread of prsMsgReceive module, two threads of prsMsgSwitch module, 12 threads of prsSendData module, three threads of prsSessionDelete module.Owing to adopting modular technical scheme, actual in different application scene can also be adjusted Thread Count very easily.
Referring to accompanying drawing 2, it is the flow chart of the cluster concurrent processing that provides of the present embodiment, and concrete handling process is as follows:
(1) playing task of assigning when upper strata, prsMsgReceive module is received after this message, is placed in module message queue, its task completes, and processes next message.
(2) any one thread of prsMsgSwitch module detects the processing messages being newly pressed into, and processes accordingly, and task is pressed into prsSendData module.
(3) prsSendData module detects corresponding task, by describing and send rtp package operation, sends multimedia color ring back tone to the user who specifies above.
(4) in the time that user's communication starts, operator can stop multimedia color ring back tone and play, and through a series of processing, stops playing signaling under upper strata, and prsMsgReceive module is received after this message, is pressed in the queue of prsMsgSwitch module message.
(5) any one thread of prsMsgSwitch module detect be newly pressed into stop playing message, find corresponding task, its state is set to deleting state.
(6) as shown in Figure 1, the thread in prsSendData module just sends a period of time to be again pressed into tail of the queue by task at every turn, and the benefit of doing like this can avoid follow-up play task long-time without response, has solved again and has stopped playback problem here.Again while obtaining task, can detect its state, in the time that state is deleting, this task is pressed into prsSessionDelete module at every turn.
(7) any one thread of prsSessionDelete module detects the deletion task being newly pressed into, and carries out respective handling.
Adopt technical solution of the present invention, in the time processing single channel, obviously increase handling process, but after task amount increases, all threads will start work with all strength, because the complexity of different phase processing is different, therefore, in the present embodiment, prsMsgReceive module arranges a thread, prsMsgSwitch module arranges two threads, prsSendData module arranges 12 threads, prsSessionDelete module arranges three threads, both ensured that system cpu was simultaneously in Efficient Operation state, increase the complexity of system call thread but be not activated too much thread.Due to the employing of technical solution of the present invention, make originally can only support 200 multichannels, reach and can call out above by response 150caps per second, the design object that concurrent 2500 road audio frequency or 1500 road audio-video documents are play simultaneously.
After tested, adopt technical solution of the present invention, can on the MIPS64 of 16 cores board, realize single deck tape-recorder response per second and call out for 156 times, the broadcasting of concurrent 2500 road audio frequency or 1500 road audio-video documents, effectively reduces equipment cost simultaneously.Program, based on the upper exploitation of Linux, can be easily transplanted to other Linux platform machines, according to the Thread Count of the rapid adjusting module of CPU check figure of machine, realizes equally efficient concurrent broadcasting.

Claims (1)

1. the method for the concurrent transmission network media stream of cluster, it is characterized in that: Play System is divided into message sink module, message processing module, sending module and deletion playing module, process corresponding task to the different Thread Count of each module assignment, comprises the steps:
(1) global session state is set in message processing module;
(2) message processing module is delivered in the message instruction from upper layer message module of collecting by message sink module;
(3) message processing module is according to type of message, by global session allocating task or be arranged to done state;
(4) sending module finds that there is after new session task, reads the file of appointment and file is packaged into audio-video frequency media stream to send to terminal by task, plays; Each rtp bag of playing is 1~3 second, and each transmission finished rear inspection global session state, deletes to get back to play in queue if do not need;
(5) delete task module and find that there is session and be set to after deletion state, remove the mission bit stream of session and the recovery of memory source.
CN201410211224.7A 2014-05-20 2014-05-20 Colony concurrence network media stream sending method Pending CN103957221A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410211224.7A CN103957221A (en) 2014-05-20 2014-05-20 Colony concurrence network media stream sending method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410211224.7A CN103957221A (en) 2014-05-20 2014-05-20 Colony concurrence network media stream sending method

Publications (1)

Publication Number Publication Date
CN103957221A true CN103957221A (en) 2014-07-30

Family

ID=51334447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410211224.7A Pending CN103957221A (en) 2014-05-20 2014-05-20 Colony concurrence network media stream sending method

Country Status (1)

Country Link
CN (1) CN103957221A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101163172A (en) * 2007-11-12 2008-04-16 东方通信股份有限公司 High-capacity media broadcasting system and method for mobile phone or fixed telephone switching system
CN101640853A (en) * 2008-07-30 2010-02-03 中兴通讯股份有限公司 Method and device for processing multimedia messaging service notification message and multimedia messaging service receiving system
CN101867665A (en) * 2009-04-15 2010-10-20 中兴通讯股份有限公司 Media resource playing system, method and business server thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101163172A (en) * 2007-11-12 2008-04-16 东方通信股份有限公司 High-capacity media broadcasting system and method for mobile phone or fixed telephone switching system
CN101640853A (en) * 2008-07-30 2010-02-03 中兴通讯股份有限公司 Method and device for processing multimedia messaging service notification message and multimedia messaging service receiving system
CN101867665A (en) * 2009-04-15 2010-10-20 中兴通讯股份有限公司 Media resource playing system, method and business server thereof

Similar Documents

Publication Publication Date Title
US9894112B2 (en) Video media playing methods, apparatuses and systems, and computer storage medium
CN101977218B (en) Internet playing file transcoding method and system
CN102609302B (en) Multimedia application concurrent-management method and multimedia application concurrent-management device
CN101616222A (en) The way of recording of videoconference and equipment
CN101364188A (en) Mobile terminal and multimedia playing control method thereof
CN103188305A (en) Multithreading breakpoint resume method and system
CN103096131B (en) A kind of live method for stream processing and device
CN104506920A (en) Method and device for playing omnimedia data information
KR20110018350A (en) Wireless communication device having dynamically escalated media transmission handling
CN1750571A (en) Medium processing system suitable for IP medium server
CN107786619A (en) Media server dispatching method, apparatus and system
CN103957221A (en) Colony concurrence network media stream sending method
WO2010130193A1 (en) Device, method for controlling audio media packet transmission and audio media server
CN104394283A (en) Dynamic adjustment method and system of IVR menu
CN107370895A (en) Number concealing device, method and number hide system
CN201590869U (en) Data and audio/video transmitting system based on three-net interfused technology
US9525987B2 (en) System and method for facilitating audio access to radio stations
CN100440784C (en) Digital user line cut-in multiplexer, stream medium data transmission system and method
JP6367592B2 (en) Call recording system and call voice transfer method
CN104301551A (en) Method for music playing and equipment for music playing
CN113613038A (en) Intelligent streaming media service system and video stream scheduling method thereof
CN102682741A (en) Multi-display control system and implementation method of multi-display control system
CN104795073A (en) Method and device for processing audio data
CN103067627B (en) Multichannel conversation fast-switching method based on VoIP (Voice over Internet Phone) system
CN105162997A (en) Virtual call switching 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
DD01 Delivery of document by public notice
DD01 Delivery of document by public notice

Addressee: Avonaco Communication Systems (Suzhou) Co., Ltd.

Document name: Notification that Application Deemed to be Withdrawn

WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140730